summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-03-05 13:32:28 +0100
committerEike Ziller <eike.ziller@theqtcompany.com>2015-03-05 13:32:28 +0100
commit2b954973d80015664e79a794124f628320d56001 (patch)
tree5ec36d3a3a38b87cdef512d863590658764eaa5c
parent1e2d2665414d7e62bd816e542fd3ea0b568c0b69 (diff)
parent4a1b6c1fd836c51a24f18fcbcccef4254fedbae4 (diff)
downloadqt-creator-2b954973d80015664e79a794124f628320d56001.tar.gz
Merge remote-tracking branch 'origin/3.4'
-rw-r--r--README6
-rw-r--r--dist/appdata.xml2
-rw-r--r--dist/changes-3.3.215
-rw-r--r--dist/changes-3.4.0165
-rw-r--r--doc/api/coding-style.qdoc6
-rw-r--r--doc/api/getting-and-building.qdoc5
-rw-r--r--doc/api/qtcreator-documentation.qdoc2
-rw-r--r--doc/src/debugger/creator-debugger-setup.qdoc2
-rw-r--r--doc/src/debugger/creator-debugger.qdoc2
-rw-r--r--doc/src/howto/qtcreator-faq.qdoc4
-rw-r--r--doc/src/overview/creator-tech-support.qdoc16
-rw-r--r--doc/src/projects/creator-projects-debuggers.qdoc15
-rw-r--r--doc/src/qnx/creator-deployment-bb10.qdoc4
-rw-r--r--doc/src/qnx/creator-developing-bb10.qdoc2
-rw-r--r--share/qtcreator/debugger/creatortypes.py5
-rw-r--r--share/qtcreator/debugger/dumper.py4
-rw-r--r--share/qtcreator/debugger/lldbbridge.py25
-rw-r--r--src/libs/cplusplus/LookupContext.cpp3
-rw-r--r--src/libs/qmljs/qmljsbind.h1
-rw-r--r--src/libs/qmljs/qmljsbundle.h2
-rw-r--r--src/libs/qmljs/qmljscheck.cpp1
-rw-r--r--src/libs/qmljs/qmljscompletioncontextfinder.cpp1
-rw-r--r--src/libs/qmljs/qmljscontext.cpp2
-rw-r--r--src/libs/qmljs/qmljscontext.h3
-rw-r--r--src/libs/qmljs/qmljsdialect.cpp9
-rw-r--r--src/libs/qmljs/qmljsdialect.h2
-rw-r--r--src/libs/qmljs/qmljsdocument.h5
-rw-r--r--src/libs/qmljs/qmljsevaluate.cpp1
-rw-r--r--src/libs/qmljs/qmljsimportdependencies.cpp1
-rw-r--r--src/libs/qmljs/qmljsimportdependencies.h3
-rw-r--r--src/libs/qmljs/qmljsindenter.cpp1
-rw-r--r--src/libs/qmljs/qmljsinterpreter.h5
-rw-r--r--src/libs/qmljs/qmljslineinfo.cpp1
-rw-r--r--src/libs/qmljs/qmljslineinfo.h2
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.cpp1
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.h8
-rw-r--r--src/libs/qmljs/qmljsreformatter.cpp1
-rw-r--r--src/libs/qmljs/qmljsscopechain.cpp1
-rw-r--r--src/libs/qmljs/qmljsstaticanalysismessage.cpp2
-rw-r--r--src/libs/qmljs/qmljsstaticanalysismessage.h7
-rw-r--r--src/libs/qmljs/qmljstypedescriptionreader.cpp1
-rw-r--r--src/libs/qmljs/qmljstypedescriptionreader.h6
-rw-r--r--src/libs/qmljs/qmljsutils.cpp2
-rw-r--r--src/libs/qmljs/qmljsutils.h2
-rw-r--r--src/libs/qmljs/qmljsviewercontext.h1
-rw-r--r--src/libs/qtcreatorcdbext/symbolgroupvalue.cpp18
-rw-r--r--src/libs/timeline/qml/Detail.qml4
-rw-r--r--src/libs/timeline/qml/MainView.qml4
-rw-r--r--src/libs/timeline/qml/RangeDetails.qml28
-rw-r--r--src/libs/timeline/qml/TimelineContent.qml11
-rw-r--r--src/libs/utils/fancylineedit.cpp11
-rw-r--r--src/libs/utils/fancylineedit.h2
-rw-r--r--src/libs/utils/historycompleter.cpp19
-rw-r--r--src/libs/utils/historycompleter.h1
-rw-r--r--src/libs/utils/mimetypes/mimemagicrule.cpp46
-rw-r--r--src/libs/utils/mimetypes/mimemagicrule_p.h3
-rw-r--r--src/libs/utils/mimetypes/mimetypeparser.cpp10
-rw-r--r--src/plugins/analyzerbase/analyzermanager.cpp2
-rw-r--r--src/plugins/analyzerbase/analyzermanager.h2
-rw-r--r--src/plugins/analyzerbase/analyzerplugin.cpp1
-rw-r--r--src/plugins/analyzerbase/analyzerruncontrol.h8
-rw-r--r--src/plugins/analyzerbase/analyzerutils.cpp9
-rw-r--r--src/plugins/analyzerbase/analyzerutils.h6
-rw-r--r--src/plugins/analyzerbase/detailederrorview.cpp2
-rw-r--r--src/plugins/analyzerbase/ianalyzertool.h3
-rw-r--r--src/plugins/android/androidbuildapkstep.h1
-rw-r--r--src/plugins/android/androidconfigurations.cpp4
-rw-r--r--src/plugins/android/androidconfigurations.h10
-rw-r--r--src/plugins/android/androidmanager.cpp1
-rw-r--r--src/plugins/android/androidmanager.h3
-rw-r--r--src/plugins/android/androidmanifestdocument.cpp3
-rw-r--r--src/plugins/android/androidmanifesteditor.h2
-rw-r--r--src/plugins/android/androidqtsupport.h13
-rw-r--r--src/plugins/android/androidrunconfiguration.h2
-rw-r--r--src/plugins/android/javaeditor.cpp11
-rw-r--r--src/plugins/bazaar/bazaarplugin.cpp1
-rw-r--r--src/plugins/beautifier/beautifierplugin.cpp1
-rw-r--r--src/plugins/bineditor/bineditorplugin.cpp22
-rw-r--r--src/plugins/bookmarks/bookmarkmanager.cpp1
-rw-r--r--src/plugins/classview/classviewmanager.cpp1
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp8
-rw-r--r--src/plugins/coreplugin/actionmanager/actioncontainer.cpp1
-rw-r--r--src/plugins/coreplugin/actionmanager/actionmanager.h2
-rw-r--r--src/plugins/coreplugin/actionmanager/commandbutton.cpp4
-rw-r--r--src/plugins/coreplugin/actionmanager/commandmappings.h2
-rw-r--r--src/plugins/coreplugin/basefilewizardfactory.h5
-rw-r--r--src/plugins/coreplugin/coreplugin.cpp1
-rw-r--r--src/plugins/coreplugin/designmode.cpp1
-rw-r--r--src/plugins/coreplugin/dialogs/ioptionspage.cpp11
-rw-r--r--src/plugins/coreplugin/dialogs/ioptionspage.h10
-rw-r--r--src/plugins/coreplugin/dialogs/newdialog.h1
-rw-r--r--src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp2
-rw-r--r--src/plugins/coreplugin/dialogs/saveitemsdialog.cpp2
-rw-r--r--src/plugins/coreplugin/editormanager/documentmodel.cpp1
-rw-r--r--src/plugins/coreplugin/editormanager/documentmodel.h7
-rw-r--r--src/plugins/coreplugin/editormanager/editorarea.cpp1
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp2
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.h10
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.cpp1
-rw-r--r--src/plugins/coreplugin/editormanager/ieditorfactory.h6
-rw-r--r--src/plugins/coreplugin/editormanager/openeditorsview.cpp1
-rw-r--r--src/plugins/coreplugin/editortoolbar.cpp1
-rw-r--r--src/plugins/coreplugin/editortoolbar.h2
-rw-r--r--src/plugins/coreplugin/externaltool.cpp1
-rw-r--r--src/plugins/coreplugin/externaltoolmanager.cpp2
-rw-r--r--src/plugins/coreplugin/featureprovider.h1
-rw-r--r--src/plugins/coreplugin/find/findplugin.cpp3
-rw-r--r--src/plugins/coreplugin/find/findtoolbar.cpp2
-rw-r--r--src/plugins/coreplugin/find/searchresultwindow.cpp1
-rw-r--r--src/plugins/coreplugin/idocument.h7
-rw-r--r--src/plugins/coreplugin/iwizardfactory.h2
-rw-r--r--src/plugins/coreplugin/jsexpander.h8
-rw-r--r--src/plugins/coreplugin/locator/filesystemfilter.cpp1
-rw-r--r--src/plugins/coreplugin/locator/opendocumentsfilter.cpp1
-rw-r--r--src/plugins/coreplugin/mimetypemagicdialog.cpp68
-rw-r--r--src/plugins/coreplugin/mimetypemagicdialog.h1
-rw-r--r--src/plugins/coreplugin/mimetypesettings.cpp11
-rw-r--r--src/plugins/coreplugin/modemanager.cpp1
-rw-r--r--src/plugins/coreplugin/modemanager.h2
-rw-r--r--src/plugins/coreplugin/outputpanemanager.cpp1
-rw-r--r--src/plugins/coreplugin/progressmanager/futureprogress.cpp1
-rw-r--r--src/plugins/coreplugin/progressmanager/futureprogress.h2
-rw-r--r--src/plugins/coreplugin/progressmanager/progressmanager.cpp1
-rw-r--r--src/plugins/coreplugin/variablechooser.h2
-rw-r--r--src/plugins/coreplugin/vcsmanager.cpp4
-rw-r--r--src/plugins/coreplugin/vcsmanager.h2
-rw-r--r--src/plugins/coreplugin/windowsupport.cpp1
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp1
-rw-r--r--src/plugins/cppeditor/cppeditorplugin.cpp1
-rw-r--r--src/plugins/cppeditor/cppelementevaluator.cpp1
-rw-r--r--src/plugins/cppeditor/cppelementevaluator.h2
-rw-r--r--src/plugins/cppeditor/cppfunctiondecldeflink.cpp2
-rw-r--r--src/plugins/cppeditor/cppquickfix_test.h2
-rw-r--r--src/plugins/cppeditor/cppquickfixassistant.cpp1
-rw-r--r--src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp1
-rw-r--r--src/plugins/cpptools/baseeditordocumentparser.cpp1
-rw-r--r--src/plugins/cpptools/builtinindexingsupport.cpp2
-rw-r--r--src/plugins/cpptools/cppclassesfilter.h2
-rw-r--r--src/plugins/cpptools/cppcodeformatter.h1
-rw-r--r--src/plugins/cpptools/cppcodemodelinspectordumper.cpp1
-rw-r--r--src/plugins/cpptools/cppcodemodelinspectordumper.h4
-rw-r--r--src/plugins/cpptools/cppcodestylesettings.cpp2
-rw-r--r--src/plugins/cpptools/cppcodestylesettings.h6
-rw-r--r--src/plugins/cpptools/cppcodestylesettingspage.cpp1
-rw-r--r--src/plugins/cpptools/cppcompletion_test.cpp35
-rw-r--r--src/plugins/cpptools/cppcompletionassist.cpp1
-rw-r--r--src/plugins/cpptools/cppcompletionassistprovider.h4
-rw-r--r--src/plugins/cpptools/cppcurrentdocumentfilter.cpp2
-rw-r--r--src/plugins/cpptools/cppincludesfilter.cpp1
-rw-r--r--src/plugins/cpptools/cppindexingsupport.h3
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp3
-rw-r--r--src/plugins/cpptools/cppmodelmanager.h4
-rw-r--r--src/plugins/cpptools/cppmodelmanager_test.cpp1
-rw-r--r--src/plugins/cpptools/cpppointerdeclarationformatter.cpp3
-rw-r--r--src/plugins/cpptools/cpppointerdeclarationformatter.h6
-rw-r--r--src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp1
-rw-r--r--src/plugins/cpptools/cppprojectfile.h2
-rw-r--r--src/plugins/cpptools/cppprojects.cpp3
-rw-r--r--src/plugins/cpptools/cppprojects.h6
-rw-r--r--src/plugins/cpptools/cpprefactoringchanges.cpp2
-rw-r--r--src/plugins/cpptools/cpprefactoringchanges.h5
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp2
-rw-r--r--src/plugins/cpptools/cpptoolsreuse.cpp1
-rw-r--r--src/plugins/cpptools/cpptoolstestcase.cpp3
-rw-r--r--src/plugins/cpptools/cpptoolstestcase.h6
-rw-r--r--src/plugins/cpptools/doxygengenerator.h2
-rw-r--r--src/plugins/cpptools/editordocumenthandle.h2
-rw-r--r--src/plugins/cpptools/insertionpointlocator.cpp3
-rw-r--r--src/plugins/cpptools/modelmanagertesthelper.h2
-rw-r--r--src/plugins/cpptools/semantichighlighter.cpp3
-rw-r--r--src/plugins/cpptools/semantichighlighter.h11
-rw-r--r--src/plugins/cpptools/symbolfinder.h11
-rw-r--r--src/plugins/cpptools/symbolsearcher_test.cpp1
-rw-r--r--src/plugins/cpptools/symbolsfindfilter.cpp2
-rw-r--r--src/plugins/cpptools/symbolsfindfilter.h2
-rw-r--r--src/plugins/cpptools/typehierarchybuilder.h5
-rw-r--r--src/plugins/debugger/cdb/cdbengine.h3
-rw-r--r--src/plugins/debugger/debuggerengine.cpp33
-rw-r--r--src/plugins/debugger/debuggerengine.h4
-rw-r--r--src/plugins/debugger/debuggeritem.cpp32
-rw-r--r--src/plugins/debugger/debuggeritem.h11
-rw-r--r--src/plugins/debugger/debuggeritemmanager.cpp10
-rw-r--r--src/plugins/debugger/debuggerkitinformation.cpp8
-rw-r--r--src/plugins/debugger/debuggermainwindow.cpp5
-rw-r--r--src/plugins/debugger/debuggeroptionspage.cpp14
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp15
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp7
-rw-r--r--src/plugins/debugger/debuggerstartparameters.h15
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.cpp291
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp30
-rw-r--r--src/plugins/debugger/gdb/gdbengine.h3
-rw-r--r--src/plugins/debugger/gdb/remotegdbserveradapter.h28
-rw-r--r--src/plugins/debugger/gdb/termgdbadapter.cpp22
-rw-r--r--src/plugins/debugger/imageviewer.cpp3
-rw-r--r--src/plugins/debugger/lldb/lldbengine.cpp49
-rw-r--r--src/plugins/debugger/lldb/lldbengine.h8
-rw-r--r--src/plugins/debugger/memoryagent.cpp1
-rw-r--r--src/plugins/debugger/qml/qmlcppengine.cpp89
-rw-r--r--src/plugins/debugger/qml/qmlcppengine.h2
-rw-r--r--src/plugins/debugger/watchhandler.cpp16
-rw-r--r--src/plugins/debugger/watchwindow.cpp7
-rw-r--r--src/plugins/designer/README.txt8
-rw-r--r--src/plugins/designer/formeditorplugin.cpp6
-rw-r--r--src/plugins/designer/formeditorw.cpp2
-rw-r--r--src/plugins/designer/formeditorw.h9
-rw-r--r--src/plugins/designer/formwindoweditor.cpp1
-rw-r--r--src/plugins/designer/formwindoweditor.h1
-rw-r--r--src/plugins/designer/formwindowfile.cpp1
-rw-r--r--src/plugins/designer/qt_private/abstractnewformwidget_p.h77
-rw-r--r--src/plugins/designer/qt_private/abstractoptionspage_p.h68
-rw-r--r--src/plugins/designer/qt_private/abstractsettings_p.h72
-rw-r--r--src/plugins/designer/qt_private/formwindowbase_p.h194
-rw-r--r--src/plugins/designer/qt_private/iconloader_p.h61
-rw-r--r--src/plugins/designer/qt_private/pluginmanager_p.h148
-rw-r--r--src/plugins/designer/qt_private/qdesigner_formwindowmanager_p.h88
-rw-r--r--src/plugins/designer/qt_private/qdesigner_integration_p.h141
-rw-r--r--src/plugins/designer/qt_private/qsimpleresource_p.h153
-rw-r--r--src/plugins/designer/qt_private/qtresourcemodel_p.h134
-rw-r--r--src/plugins/designer/qt_private/shared_enums_p.h88
-rw-r--r--src/plugins/designer/qt_private/shared_global_p.h65
-rw-r--r--src/plugins/designer/qtcreatorintegration.cpp1
-rw-r--r--src/plugins/designer/settingspage.cpp2
-rwxr-xr-xsrc/plugins/designer/syncqtheader.sh65
-rw-r--r--src/plugins/diffeditor/diffeditor.cpp1
-rw-r--r--src/plugins/diffeditor/diffeditorplugin.cpp1
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp4
-rw-r--r--src/plugins/genericprojectmanager/genericprojectplugin.cpp1
-rw-r--r--src/plugins/git/gitclient.cpp6
-rw-r--r--src/plugins/git/gitclient.h1
-rw-r--r--src/plugins/git/giteditor.cpp26
-rw-r--r--src/plugins/git/giteditor.h2
-rw-r--r--src/plugins/git/gitplugin.cpp2
-rw-r--r--src/plugins/help/helpwidget.cpp1
-rw-r--r--src/plugins/imageviewer/imageviewer.cpp1
-rw-r--r--src/plugins/imageviewer/imageviewerfile.cpp2
-rw-r--r--src/plugins/macros/texteditormacrohandler.cpp1
-rw-r--r--src/plugins/mercurial/mercurialplugin.cpp1
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp3
-rw-r--r--src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp3
-rw-r--r--src/plugins/projectexplorer/foldernavigationwidget.cpp1
-rw-r--r--src/plugins/projectexplorer/gccparser.cpp30
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp7
-rw-r--r--src/plugins/projectexplorer/kitmanagerconfigwidget.cpp19
-rw-r--r--src/plugins/projectexplorer/kitmanagerconfigwidget.h1
-rw-r--r--src/plugins/projectexplorer/kitmodel.cpp10
-rw-r--r--src/plugins/projectexplorer/ldparser.cpp15
-rw-r--r--src/plugins/projectexplorer/ldparser.h1
-rw-r--r--src/plugins/projectexplorer/nodesvisitor.cpp12
-rw-r--r--src/plugins/projectexplorer/nodesvisitor.h10
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp21
-rw-r--r--src/plugins/projectexplorer/projecttree.cpp2
-rw-r--r--src/plugins/projectexplorer/projecttreewidget.cpp1
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h1
-rw-r--r--src/plugins/projectexplorer/session.cpp3
-rw-r--r--src/plugins/projectexplorer/taskwindow.cpp1
-rw-r--r--src/plugins/qbsprojectmanager/qbsprojectmanager.cpp9
-rw-r--r--src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp1
-rw-r--r--src/plugins/qmakeprojectmanager/qmakenodes.cpp10
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp1
-rw-r--r--src/plugins/qmldesigner/components/componentcore/crumblebar.cpp1
-rw-r--r--src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp1
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp1
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp1
-rw-r--r--src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp1
-rw-r--r--src/plugins/qmldesigner/designercore/model/rewriterview.cpp1
-rw-r--r--src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp1
-rw-r--r--src/plugins/qmldesigner/designmodewidget.cpp1
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.cpp1
-rw-r--r--src/plugins/qmldesigner/shortcutmanager.cpp2
-rw-r--r--src/plugins/qmljseditor/qmljseditordocument.h1
-rw-r--r--src/plugins/qmljseditor/qmljsfindreferences.h2
-rw-r--r--src/plugins/qmljseditor/qmljshoverhandler.cpp1
-rw-r--r--src/plugins/qmljseditor/qmljswrapinloader.cpp1
-rw-r--r--src/plugins/qmljseditor/qmloutlinemodel.cpp1
-rw-r--r--src/plugins/qmljstools/qmlconsoleview.cpp2
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.cpp1
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.h4
-rw-r--r--src/plugins/qmljstools/qmljssemanticinfo.cpp3
-rw-r--r--src/plugins/qmljstools/qmljssemanticinfo.h10
-rw-r--r--src/plugins/qmljstools/qmljstools_test.cpp1
-rw-r--r--src/plugins/qmljstools/qmljstoolsplugin.cpp1
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp1
-rw-r--r--src/plugins/qmlprojectmanager/qmlapp.cpp1
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp1
-rw-r--r--src/plugins/qnx/blackberryruncontrolfactory.cpp2
-rw-r--r--src/plugins/qnx/qnxbaseconfiguration.cpp2
-rw-r--r--src/plugins/qnx/qnxconstants.h2
-rw-r--r--src/plugins/qnx/qnxplugin.cpp1
-rw-r--r--src/plugins/qtsupport/QtSupport.mimetypes.xml14
-rw-r--r--src/plugins/qtsupport/debugginghelperbuildtask.cpp1
-rw-r--r--src/plugins/qtsupport/debugginghelperbuildtask.h3
-rw-r--r--src/plugins/qtsupport/qtkitinformation.h1
-rw-r--r--src/plugins/qtsupport/qtoptionspage.cpp1
-rw-r--r--src/plugins/qtsupport/qtsupport.qrc1
-rw-r--r--src/plugins/qtsupport/qtsupportplugin.cpp4
-rw-r--r--src/plugins/qtsupport/uicodemodelsupport.cpp1
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp1
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentaspect.h2
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp1
-rw-r--r--src/plugins/remotelinux/remotelinuxsignaloperation.h1
-rw-r--r--src/plugins/resourceeditor/resourceeditorplugin.cpp2
-rw-r--r--src/plugins/tasklist/taskfile.cpp2
-rw-r--r--src/plugins/texteditor/texteditor.cpp1
-rw-r--r--src/plugins/texteditor/texteditoractionhandler.cpp1
-rw-r--r--src/plugins/texteditor/texteditorplugin.cpp1
-rw-r--r--src/plugins/todo/qmljstodoitemsscanner.cpp2
-rw-r--r--src/plugins/todo/todoitemsprovider.cpp1
-rw-r--r--src/plugins/valgrind/callgrindtool.cpp5
-rw-r--r--src/plugins/valgrind/memchecktool.cpp10
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.cpp1
-rw-r--r--src/qtcreatorplugin.pri32
-rw-r--r--tests/auto/qml/codemodel/check/tst_check.cpp1
-rw-r--r--tests/auto/qml/reformatter/tst_reformatter.cpp1
-rw-r--r--tests/auto/valgrind/memcheck/memcheck.pro15
-rw-r--r--tests/auto/valgrind/memcheck/testrunner.cpp2
-rw-r--r--tests/manual/shootout/tst_codesize.cpp32
-rw-r--r--tests/system/suite_general/tst_rename_file/test.py16
-rw-r--r--tests/tools/qml-ast2dot/main.cpp1
318 files changed, 1337 insertions, 2170 deletions
diff --git a/README b/README
index 9da0707989..74655f93c1 100644
--- a/README
+++ b/README
@@ -43,7 +43,7 @@ versions of Qt and Qt Creator on Windows. Alternatively, to avoid having to
compile Qt yourself, you can use one of the versions of Qt shipped with the Qt
SDK (release builds of Qt using MinGW and Visual C++ 2010 or later).
For detailed information on the supported compilers, see
-http://qt-project.org/wiki/Building_Qt_5_from_Git .
+http://wiki.qt.io/Building_Qt_5_from_Git .
1. Decide which compiler to use: MinGW or Microsoft Visual Studio. If you
plan to contribute to Qt Creator, you should compile your changes with
@@ -75,7 +75,7 @@ http://qt-project.org/wiki/Building_Qt_5_from_Git .
directory.
7. Install a compiler:
- - For a MinGW toolchain for Qt, see http://qt-project.org/wiki/MinGW .
+ - For a MinGW toolchain for Qt, see http://wiki.qt.io/MinGW .
- For Microsoft Visual C++, install the Windows SDK and the "Debugging
Tools for Windows" from the SDK image. We strongly recommend using the
@@ -122,7 +122,7 @@ http://qt-project.org/wiki/Building_Qt_5_from_Git .
You have to remove it from the path.
10. You are now ready to configure and build Qt and Qt Creator.
- Please see http://qt-project.org/wiki/Building_Qt_5_from_Git for
+ Please see http://wiki.qt.io/Building_Qt_5_from_Git for
recommended configure-options for Qt 5.
To use MinGW, open the the shell prompt and enter:
diff --git a/dist/appdata.xml b/dist/appdata.xml
index 017bbf9445..685eba7aa7 100644
--- a/dist/appdata.xml
+++ b/dist/appdata.xml
@@ -23,6 +23,6 @@
<screenshots>
<screenshot type="default" width="800" height="600">http://qt-project.org/uploads/image_upload/qtcreator-edit-mode.png</screenshot>
</screenshots>
- <url type="homepage">https://qt-project.org/wiki/Category:Tools::QtCreator</url>
+ <url type="homepage">https://wiki.qt.io/Category:Tools::QtCreator</url>
<project_group>Qt</project_group>
</application>
diff --git a/dist/changes-3.3.2 b/dist/changes-3.3.2
new file mode 100644
index 0000000000..a77efcd45b
--- /dev/null
+++ b/dist/changes-3.3.2
@@ -0,0 +1,15 @@
+Qt Creator version 3.3.2 contains bug fixes.
+
+The most important changes are listed in this document. For a complete
+list of changes, see the Git log for the Qt Creator sources that
+you can check out from the public Git repository. For example:
+
+git clone git://gitorious.org/qt-creator/qt-creator.git
+git log --cherry-pick --pretty=oneline v3.3.1..v3.3.2
+
+C++ Support
+ * Fixed deployment of Clang code model plugin (QTCREATORBUG-14038)
+
+Qt Quick Designer
+ * Fixed crash of Qt Quick emulation layer when using fallback emulation
+ (QTCREATORBUG-14031)
diff --git a/dist/changes-3.4.0 b/dist/changes-3.4.0
new file mode 100644
index 0000000000..d69578639b
--- /dev/null
+++ b/dist/changes-3.4.0
@@ -0,0 +1,165 @@
+Qt Creator version 3.4 contains bug fixes and new features.
+
+The most important changes are listed in this document. For a complete
+list of changes, see the Git log for the Qt Creator sources that
+you can check out from the public Git repository. For example:
+
+git clone git://gitorious.org/qt-creator/qt-creator.git
+git log --cherry-pick --pretty=oneline origin/3.3..origin/3.4
+
+General
+ * Added option to change environment for running external tools (QTCREATORBUG-4995)
+ * Improved performance of output panes
+ * Fixed that wizard windows were missing in Window menu (QTCREATORBUG-13766)
+
+Editing
+ * Switched to a QMimeDatabase based MIME database implementation
+ * Added hint in empty editor area
+ * Added "Copy Path and Line Number" to context menu of document selector
+ * Added parenthesis highlighting to generic highlighter
+ * Fixed that files with same file name but different path were not distinguishable
+ in document selector and open documents pane (QTCREATORBUG-10185)
+ * Fixed that symlinks and their target could be opened at the same time (QTCREATORBUG-5941)
+ * Fixed that wrong highlight definition was downloaded when sorting the list in the settings
+
+Help
+ * Fixed clean up of automatically registered documentation
+
+QMake Projects
+ * Added handling of QMAKE_CXXFLAGS_(APP|SHLIB|PLUGIN) variables
+ * Added option to put debug information in separate file (QTCREATORBUG-14009)
+ * Fixed ANSI color support for application output (QTCREATORBUG-13764)
+ * Fixed handling of DEFINES with escaped characters
+
+CMake Projects
+ * Fixed that static libraries were deployed
+ * Fixed finding source directory for build directory
+
+Qbs Projects
+ * Added option to show full command lines during build
+
+QML-Only Projects (.qmlproject)
+ * Disabled plugin by default
+
+Debugging
+ * LLDB
+ * Fixed debugging of console applications (QTCREATORBUG-13803)
+
+Analyzer
+ * Added Valgrind Memory Analyzer with GDB
+
+QML Profiler
+ * Made it possible to search through event notes (QTCREATORBUG-13417)
+
+C++ Support
+ * Added support for binary literals (n3472)
+ * Added locator filter for all included files (QTCREATORBUG-280)
+ * Added refactoring action that moves all function definitions out of a class declaration
+ * Added support for signal and slot completion in Qt 5 style connects
+ * Improved support for non-Qt projects that use Qt keywords
+ * Made auto-completion delay configurable (QTCREATORBUG-13393)
+ * Fixed auto-indentation for break in switch statement (QTCREATORBUG-13155)
+ * Fixed issues with case-insensitive file systems (QTCREATORBUG-12390)
+ * Fixed completion for enums inside member functions (QTCREATORBUG-13757)
+ * Fixed crash on closing one of multiple outline views (QTCREATORBUG-13614)
+ * Fixed that Move Definition to Class refactoring action was not available when using "override"
+ (QTCREATORBUG-13564)
+ * Fixed that Assign to Local Variable refactoring action was not working with chained
+ function calls (QTCREATORBUG-10355)
+ * Fixed several issues with completion and iterators (QTCREATORBUG-13799)
+
+QML Support
+ * Fixed crash on closing one of multiple outline views (QTCREATORBUG-13614)
+
+Version Control Systems
+ * Git
+ * Added support for "git stash --keep-index" (QTCREATORBUG-13587)
+ * Gerrit
+ * Fixed that it was not possible to abort query and fetch (QTCREATORBUG-9743)
+ * Fixed that not all remotes where shown in Push to Gerrit dialog (QTCREATORBUG-13718)
+ * Subversion
+ * Added option to show verbose log
+ * Changed to use the new unified diff viewer
+ * Fixed that committing failed when using non-Latin1 characters in commit message
+ (QTCREATORBUG-13979)
+ * Perforce
+ * Improved repository log (QTCREATORBUG-13526)
+
+FakeVim
+ * Fixed target column for various commands
+ * Fixed behavior of "D" in visual block mode
+ * Fixed cursor shape after failing search
+ * Fixed issues with pasting in presence of splits (QTCREATORBUG-13481)
+
+Platform Specific
+
+Windows
+
+OS X
+
+Android
+ * Added support for 64bit tool chains
+ * Fixed that active run configuration setting was ignored for deploying application
+ (QTCREATORBUG-13732)
+
+Remote Linux
+ * Added optional host key checking (QTCREATORBUG-13339)
+ * Added automatic closing of SSH connections after a period of inactivity
+ * Added support for SHA-256 HMAC for SSH
+ * Fixed that it was not possible to quote run arguments (QTCREATORBUG-14002)
+
+BareMetal
+ * Added GDB server configuration management (QTCREATORBUG-13686)
+ * Added support for remote channel without port
+ * Added support for generic projects
+
+Credits for these changes go to:
+Adam Strzelecki
+Alessandro Portale
+André Hartmann
+André Pönitz
+BogDan Vatra
+Christian Kandeler
+Christian Stenger
+Cristian Adam
+Daniel Teske
+David Schulz
+Denis Shienkov
+Eike Ziller
+Erik Verbruggen
+Fawzi Mohamed
+Francois Ferrand
+Friedemann Kleint
+Hugues Delorme
+Jake Petroules
+Jarek Kobus
+Jörg Bornemann
+Kai Köhne
+Leena Miettinen
+lemelisk
+Libor Tomsik
+Lorenz Haas
+Lukas Holecek
+Maksim Klimov
+Marco Bubke
+Mitch Curtis
+Montel Laurent
+Nikita Baryshnikov
+Nikolai Kosjar
+Orgad Shaneh
+Oswald Buddenhagen
+Przemyslaw Gorszkowski
+Robert Löhning
+Sune Vuorela
+Takumi Asaki
+Tasuku Suzuki
+Thiago Macieira
+Thomas Hartmann
+Tim Jenssen
+Tim Sander
+Tobias Hunger
+Tom Deblauwe
+Toralf Lund
+Ulf Hermann
+Volker Vogelhuber
+Yuchen Deng
diff --git a/doc/api/coding-style.qdoc b/doc/api/coding-style.qdoc
index 8c51f1d34d..a1a19999db 100644
--- a/doc/api/coding-style.qdoc
+++ b/doc/api/coding-style.qdoc
@@ -59,7 +59,7 @@
the philosophy behind Qt development. For more information about how to set up
the development environment for working on Qt Creator and how to submit code
and documentation for inclusion, see
- \l{http://wiki.qt-project.org/index.php/Main_Page}{Guidelines for Contributions to the Qt Project}.
+ \l{https://wiki.qt.io/Qt_Contribution_Guidelines}{Qt Contribution Guidelines}.
\section1 Binary and Source Compatibility
@@ -109,7 +109,7 @@
\li Do not reimplement functions (not even inlines,
nor protected or private functions).
\li Check
- \l {http://wiki.qt-project.org/index.php/Binary_Compatibility_Workarounds}{Binary Compatibility Workarounds}
+ \l {https://wiki.qt.io/Binary_Compatibility_Workarounds}{Binary Compatibility Workarounds}
for ways to preserve binary compatibility.
\endlist
@@ -640,7 +640,7 @@
\target coding-rules-namespacing
\section2 Namespacing
- Read \l {http://wiki.qt-project.org/index.php/Qt_In_Namespace}{Qt In Namespace}
+ Read \l{https://wiki.qt.io/Qt_In_Namespace}{Qt In Namespace}
and keep in mind that all of Qt Creator is \e{namespace aware} code.
The namespacing policy within Qt Creator is as follows:
diff --git a/doc/api/getting-and-building.qdoc b/doc/api/getting-and-building.qdoc
index 31baf943c6..29002b03bb 100644
--- a/doc/api/getting-and-building.qdoc
+++ b/doc/api/getting-and-building.qdoc
@@ -37,8 +37,7 @@
(You can find the current version in our source repository here:
\l{http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/qtcreator.pro}.)
- You can get prebuilt Qt packages from the
- \l{https://download.qt-project.org/official_releases/qt/}{Qt Project download page}.
+ You can get prebuilt Qt packages from \l{https://download.qt.io}{Qt Downloads}.
If you want to use Qt as provided by your Linux distribution, you need to make sure that all
Qt development packages and private header packages are also installed.
@@ -48,7 +47,7 @@
released source bundles, or from the Gitorious repository
\l{http://qt.gitorious.org/qt-creator}. If you intend to contribute to \QC
itself, you should use the repository from our Gerrit review tool as described
- in the developer wiki here: \l{http://wiki.qt-project.org/Setting_up_Gerrit}.
+ in: \l{https://wiki.qt.io/Setting_up_Gerrit}{Setting up Gerrit}.
We strongly encourage you to do out-of-source builds of \QC (also called
shadow-builds).
diff --git a/doc/api/qtcreator-documentation.qdoc b/doc/api/qtcreator-documentation.qdoc
index 8c7bbd52bd..0d9fc3d393 100644
--- a/doc/api/qtcreator-documentation.qdoc
+++ b/doc/api/qtcreator-documentation.qdoc
@@ -131,7 +131,7 @@
\section1 Writing Text
Follow the guidelines for
- \l{http://qt-project.org/wiki/Writing_Qt_Documentation}
+ \l{http://wiki.qt.io/Writing_Qt_Documentation}
{writing Qt documentation}.
The documentation must be grammatically correct English and use the standard
diff --git a/doc/src/debugger/creator-debugger-setup.qdoc b/doc/src/debugger/creator-debugger-setup.qdoc
index cbb8d3db46..3ea650a4d8 100644
--- a/doc/src/debugger/creator-debugger-setup.qdoc
+++ b/doc/src/debugger/creator-debugger-setup.qdoc
@@ -181,7 +181,7 @@
versions of MinGW. On most Linux distributions the GDB
builds shipped with the system are sufficient. You can
also build your own. Follow the instructions in
- \l{http://qt-project.org/wiki/QtCreatorBuildGdb}
+ \l{http://wiki.qt.io/QtCreator_Build_Gdb}
{Building GDB}.
Builds of GDB shipped with Xcode on OS X are no longer
supported.
diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc
index 59fa9c6f1d..3813d73130 100644
--- a/doc/src/debugger/creator-debugger.qdoc
+++ b/doc/src/debugger/creator-debugger.qdoc
@@ -273,7 +273,7 @@
\list 1
- \li Select \uicontrol {Debug > Start Debugging > Attach to Remote
+ \li Select \uicontrol {Debug > Start Debugging > Attach to Running
Debug Server}.
\li In the \uicontrol {Host and port} field, enter the name of the remote
diff --git a/doc/src/howto/qtcreator-faq.qdoc b/doc/src/howto/qtcreator-faq.qdoc
index ab99288517..9ac5727c62 100644
--- a/doc/src/howto/qtcreator-faq.qdoc
+++ b/doc/src/howto/qtcreator-faq.qdoc
@@ -191,7 +191,7 @@
installed when you install \QC and \QSDK. On OS X, GDB is no longer
officially supported. To build your own Python-enabled GDB, follow the
instructions in
- \l{http://qt-project.org/wiki/QtCreatorBuildGdb}{Building GDB}.
+ \l{https://wiki.qt.io/QtCreator_Build_Gdb}{Building GDB}.
You must use Python version 2.6 or 2.7.
@@ -220,7 +220,7 @@
On Windows, nmake does not support the \c{-j} parameter. Instead, we
provide a drop-in replacement called jom. You can download a precompiled
- version of jom from \l{http://releases.qt-project.org/jom/}{Qt Project Release server}.
+ version of jom from \l{https://download.qt.io/official_releases/jom/}{Qt Downloads}.
Put jom.exe in a location in the %PATH%. Go to the \uicontrol {Build Settings}
and set jom.exe as the make command.
diff --git a/doc/src/overview/creator-tech-support.qdoc b/doc/src/overview/creator-tech-support.qdoc
index b862606cbd..a358740639 100644
--- a/doc/src/overview/creator-tech-support.qdoc
+++ b/doc/src/overview/creator-tech-support.qdoc
@@ -40,24 +40,28 @@
\li Where to Go
\row
- \li Learn more about Qt
- \li \l{http://qt-project.org/wiki/developer-guides}
- {Qt Developer Guides}
+ \li View examples of what you can do with Qt
+ \li \l{https://doc.qt.io/qt-5/all-examples.html}{List of Qt Examples}
+
+ \l{https://doc.qt.io/qt-5/qtquick-codesamples.html}
+ {List of Qt Quick Examples}
\row
\li Develop Qt applications for desktop and mobile devices
- \li \l{http://qt-project.org}{Qt Developer Network}
+ \li \l{https://www.qt.io/developers/}{Qt Developers}
\row
\li Participate in Qt development
- \li \l{http://qt-project.org/contribute}{Contribute to Qt}
+ \li \l{https://wiki.qt.io/Qt_Contribution_Guidelines}
+ {Qt Contribution Guidelines}
\row
\li Find free Qt-based applications
\li \l{http://qt-apps.org/}{Qt Apps}
\row
- \li Develop with a commercial Qt license and support - Qt by The Qt Company
+ \li Develop with a commercial Qt license and support -
+ Qt by The Qt Company
\li \l{http://qt.io/licensing/}{Qt Licensing}
\endtable
diff --git a/doc/src/projects/creator-projects-debuggers.qdoc b/doc/src/projects/creator-projects-debuggers.qdoc
index 4158039f51..51bb7fe3f1 100644
--- a/doc/src/projects/creator-projects-debuggers.qdoc
+++ b/doc/src/projects/creator-projects-debuggers.qdoc
@@ -58,20 +58,7 @@
\li For GDB, specify the path to the GDB executable. The
executable must be built with Python scripting support
- enabled. The options you
- have depend on the development and target platform:
-
- \list
-
- \li For debugging on embedded devices using a different ABI,
- you must provide a special executable.
-
- \li For debugging on Windows using MinGW, select a Windows
- executable of GDB with Python scripting enabled. You can
- download it from
- \l{http://builds.qt-project.org/job/gdb-windows}.
-
- \endlist
+ enabled.
\li For LLDB (experimental), specify the path to the LLDB
executable.
diff --git a/doc/src/qnx/creator-deployment-bb10.qdoc b/doc/src/qnx/creator-deployment-bb10.qdoc
index a99fdd1ca6..224aa40ec4 100644
--- a/doc/src/qnx/creator-deployment-bb10.qdoc
+++ b/doc/src/qnx/creator-deployment-bb10.qdoc
@@ -84,7 +84,7 @@
filter, so you need to set this filter in the top-right corner of the
\uicontrol {New} dialog to enable those templates.
- \note Currently, the BlackBerry 10 devices and Simulator have Qt 4.8 libraries preinstalled. To use Qt 5 features, you must compile the Qt libraries for BlackBerry 10 yourself. For more information, see \l {http://qt-project.org/wiki/Building-Qt5-for-Blackberry}{http://qt-p roject.org/wiki/Building-Qt5-for-Blackberry}.
+ \note Currently, the BlackBerry 10 devices and Simulator have Qt 4.8 libraries preinstalled. To use Qt 5 features, you must compile the Qt libraries for BlackBerry 10 yourself. For more information, see \l {http://wiki.qt.io/Building_Qt5_for_Blackberry}{Building Qt5 for BlackBerry}.
- For more details please refer to the Qt-Project wiki page: \l {http://qt-project.org/wiki/BlackBerry} {http://qt-project.org/wiki/BlackBerry}.
+ For more details please refer to the Qt-Project wiki page: \l {http://wiki.qt.io/BlackBerry}{Qt for BlackBerry}.
*/
diff --git a/doc/src/qnx/creator-developing-bb10.qdoc b/doc/src/qnx/creator-developing-bb10.qdoc
index 54274f6ac9..d7b347d247 100644
--- a/doc/src/qnx/creator-developing-bb10.qdoc
+++ b/doc/src/qnx/creator-developing-bb10.qdoc
@@ -120,5 +120,5 @@
\include qnx/creator-key-management-qnx.qdocinc
- For more details please refer to the Qt-Project wiki page: \l {http://qt-project.org/wiki/BlackBerry} {http://qt-project.org/wiki/BlackBerry}.
+ For more details please refer to the Qt-Project wiki page: \l {http://wiki.qt.io/BlackBerry}{Qt for BlackBerry}.
*/
diff --git a/share/qtcreator/debugger/creatortypes.py b/share/qtcreator/debugger/creatortypes.py
index 9f57c25b43..64f31da3d5 100644
--- a/share/qtcreator/debugger/creatortypes.py
+++ b/share/qtcreator/debugger/creatortypes.py
@@ -31,7 +31,10 @@
from dumper import *
def dumpLiteral(d, value):
- d.putSimpleCharArray(value["_chars"], value["_size"])
+ if d.isNull(value):
+ d.putValue("<null>")
+ else:
+ d.putSimpleCharArray(value["_chars"], value["_size"])
def qdump__Core__Id(d, value):
try:
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 49d0b7537e..97c689b39b 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -1713,7 +1713,7 @@ class DumperBase:
result += ']'
return result
- def reloadDumper(self):
+ def reloadDumper(self, args):
for mod in self.dumpermodules:
m = sys.modules[mod]
if sys.version_info[0] >= 3:
@@ -1721,7 +1721,7 @@ class DumperBase:
else:
reload(m)
- setupDumper()
+ self.setupDumper(args)
def addDumperModule(self, args):
path = args['path']
diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py
index 71b5ddec0a..1dfd7233e1 100644
--- a/share/qtcreator/debugger/lldbbridge.py
+++ b/share/qtcreator/debugger/lldbbridge.py
@@ -829,6 +829,8 @@ class Dumper(DumperBase):
self.report('msg="No thread"')
return
+ self.reportLocation(thread.GetFrameAtIndex(0)) # FIXME
+
isNativeMixed = int(args.get('nativeMixed', 0))
limit = args.get('stacklimit', -1)
@@ -893,20 +895,6 @@ class Dumper(DumperBase):
if "continuation" in args:
self.report('continuation=\"%s\"' % args["continuation"])
- def reportStackPosition(self):
- thread = self.currentThread()
- if not thread:
- self.report('msg="No thread"')
- return
- frame = thread.GetSelectedFrame()
- if frame:
- self.report('stack-position={id="%s"}' % frame.GetFrameID())
- else:
- self.report('stack-position={id="-1"}')
-
- def reportStackTop(self):
- self.report('stack-top={}')
-
def extractBlob(self, base, size):
if size == 0:
return Blob("")
@@ -1220,7 +1208,6 @@ class Dumper(DumperBase):
else:
state = self.process.GetState()
if state == lldb.eStateStopped:
- self.reportStackPosition()
self.reportThreads()
self.reportVariables()
@@ -1340,10 +1327,7 @@ class Dumper(DumperBase):
stoppedThread = self.firstStoppedThread()
if stoppedThread:
self.process.SetSelectedThread(stoppedThread)
- self.reportStackTop()
self.reportThreads()
- if stoppedThread:
- self.reportLocation(stoppedThread.GetSelectedFrame())
elif eventType == lldb.SBProcess.eBroadcastBitInterrupt: # 2
pass
elif eventType == lldb.SBProcess.eBroadcastBitSTDOUT:
@@ -1568,7 +1552,6 @@ class Dumper(DumperBase):
self.reportState("running")
self.reportState("stopped")
self.reportError(error)
- self.reportLocation(self.currentFrame())
else:
self.reportData()
@@ -1605,9 +1588,7 @@ class Dumper(DumperBase):
def activateFrame(self, args):
thread = args['thread']
self.currentThread().SetSelectedFrame(args['index'])
- state = self.process.GetState()
- if state == lldb.eStateStopped:
- self.reportStackPosition()
+ self.reportContinuation(args)
def selectThread(self, args):
self.process.SetSelectedThreadByID(args['id'])
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 512700c016..35be29d6f2 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -1705,11 +1705,14 @@ bool CreateBindings::visit(Declaration *decl)
bool CreateBindings::visit(Function *function)
{
+ ClassOrNamespace *previous = _currentClassOrNamespace;
+ _currentClassOrNamespace = lookupType(function, previous);
for (unsigned i = 0, count = function->memberCount(); i < count; ++i) {
Symbol *s = function->memberAt(i);
if (Block *b = s->asBlock())
visit(b);
}
+ _currentClassOrNamespace = previous;
return false;
}
diff --git a/src/libs/qmljs/qmljsbind.h b/src/libs/qmljs/qmljsbind.h
index c40117efa6..14a64e024e 100644
--- a/src/libs/qmljs/qmljsbind.h
+++ b/src/libs/qmljs/qmljsbind.h
@@ -39,6 +39,7 @@
namespace QmlJS {
+class DiagnosticMessage;
class Document;
class QMLJS_EXPORT Bind: protected AST::Visitor
diff --git a/src/libs/qmljs/qmljsbundle.h b/src/libs/qmljs/qmljsbundle.h
index 3a75a1edb4..110f56ee36 100644
--- a/src/libs/qmljs/qmljsbundle.h
+++ b/src/libs/qmljs/qmljsbundle.h
@@ -33,7 +33,7 @@
#include <qmljs/qmljs_global.h>
#include <qmljs/persistenttrie.h>
-#include <qmljs/qmljsdocument.h>
+#include <qmljs/qmljsdialect.h>
#include <QString>
#include <QHash>
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp
index ce06d4cd8e..e71c0a2165 100644
--- a/src/libs/qmljs/qmljscheck.cpp
+++ b/src/libs/qmljs/qmljscheck.cpp
@@ -36,6 +36,7 @@
#include <utils/qtcassert.h>
+#include <QColor>
#include <QDir>
using namespace QmlJS;
diff --git a/src/libs/qmljs/qmljscompletioncontextfinder.cpp b/src/libs/qmljs/qmljscompletioncontextfinder.cpp
index 448677ebf6..b260c5ba93 100644
--- a/src/libs/qmljs/qmljscompletioncontextfinder.cpp
+++ b/src/libs/qmljs/qmljscompletioncontextfinder.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "qmljscompletioncontextfinder.h"
+#include "qmljsscanner.h"
#include <QTextDocument>
#include <QStringList>
diff --git a/src/libs/qmljs/qmljscontext.cpp b/src/libs/qmljs/qmljscontext.cpp
index f81cf2dccc..df467ed304 100644
--- a/src/libs/qmljs/qmljscontext.cpp
+++ b/src/libs/qmljs/qmljscontext.cpp
@@ -31,6 +31,8 @@
#include "qmljscontext.h"
#include "parser/qmljsast_p.h"
+#include "parser/qmljsengine_p.h"
+#include "qmljsvalueowner.h"
using namespace QmlJS;
using namespace QmlJS::AST;
diff --git a/src/libs/qmljs/qmljscontext.h b/src/libs/qmljs/qmljscontext.h
index 13f4355771..deaadddee6 100644
--- a/src/libs/qmljs/qmljscontext.h
+++ b/src/libs/qmljs/qmljscontext.h
@@ -32,7 +32,8 @@
#define QMLJS_CONTEXT_H
#include "qmljs_global.h"
-#include "qmljsvalueowner.h"
+#include "qmljsdocument.h"
+#include "qmljsinterpreter.h"
#include "qmljsviewercontext.h"
#include <QSharedPointer>
diff --git a/src/libs/qmljs/qmljsdialect.cpp b/src/libs/qmljs/qmljsdialect.cpp
index 60d4a1e46f..27069421bf 100644
--- a/src/libs/qmljs/qmljsdialect.cpp
+++ b/src/libs/qmljs/qmljsdialect.cpp
@@ -29,6 +29,9 @@
****************************************************************************/
#include "qmljsdialect.h"
+#include "qmljsconstants.h"
+
+#include <QDebug>
namespace QmlJS {
@@ -300,7 +303,11 @@ bool PathsAndLanguages::maybeInsert(const PathAndLanguage &pathAndLanguage) {
return true;
}
-void PathsAndLanguages::compact() {
+void PathsAndLanguages::compact()
+{
+ if (m_list.isEmpty())
+ return;
+
int oldCompactionPlace = 0;
Utils::FileName oldPath = m_list.first().path();
QList<PathAndLanguage> compactedList;
diff --git a/src/libs/qmljs/qmljsdialect.h b/src/libs/qmljs/qmljsdialect.h
index 6dac12cc3e..9d9113ca7e 100644
--- a/src/libs/qmljs/qmljsdialect.h
+++ b/src/libs/qmljs/qmljsdialect.h
@@ -31,7 +31,7 @@
#ifndef QMLJSDIALECT_H
#define QMLJSDIALECT_H
-#include "qmljsconstants.h"
+#include "qmljs_global.h"
#include <utils/fileutils.h>
diff --git a/src/libs/qmljs/qmljsdocument.h b/src/libs/qmljs/qmljsdocument.h
index d984b2deb8..5c8b6df12d 100644
--- a/src/libs/qmljs/qmljsdocument.h
+++ b/src/libs/qmljs/qmljsdocument.h
@@ -38,7 +38,7 @@
#include "qmljsdialect.h"
#include "parser/qmldirparser_p.h"
-#include "parser/qmljsengine_p.h"
+#include "parser/qmljsastfwd_p.h"
#include "qmljs_global.h"
#include "qmljsconstants.h"
#include "qmljsimportdependencies.h"
@@ -46,11 +46,14 @@
namespace QmlJS {
class Bind;
+class DiagnosticMessage;
+class Engine;
class Snapshot;
class ImportDependencies;
class QMLJS_EXPORT Document
{
+ Q_DISABLE_COPY(Document)
public:
typedef QSharedPointer<const Document> Ptr;
typedef QSharedPointer<Document> MutablePtr;
diff --git a/src/libs/qmljs/qmljsevaluate.cpp b/src/libs/qmljs/qmljsevaluate.cpp
index 2a7aa042d6..7c5ef71f46 100644
--- a/src/libs/qmljs/qmljsevaluate.cpp
+++ b/src/libs/qmljs/qmljsevaluate.cpp
@@ -31,6 +31,7 @@
#include "qmljsevaluate.h"
#include "qmljscontext.h"
#include "qmljsscopechain.h"
+#include "qmljsvalueowner.h"
#include "parser/qmljsast_p.h"
using namespace QmlJS;
diff --git a/src/libs/qmljs/qmljsimportdependencies.cpp b/src/libs/qmljs/qmljsimportdependencies.cpp
index dc0e745822..d383be4189 100644
--- a/src/libs/qmljs/qmljsimportdependencies.cpp
+++ b/src/libs/qmljs/qmljsimportdependencies.cpp
@@ -31,6 +31,7 @@
#include "qmljsimportdependencies.h"
#include "qmljsinterpreter.h"
#include "qmljsqrcparser.h"
+#include "qmljsviewercontext.h"
#include <utils/qtcassert.h>
diff --git a/src/libs/qmljs/qmljsimportdependencies.h b/src/libs/qmljs/qmljsimportdependencies.h
index 2125ac125f..62d0928229 100644
--- a/src/libs/qmljs/qmljsimportdependencies.h
+++ b/src/libs/qmljs/qmljsimportdependencies.h
@@ -31,7 +31,7 @@
#ifndef QMLJSIMPORTCACHE_H
#define QMLJSIMPORTCACHE_H
-#include "qmljsviewercontext.h"
+#include "qmljsconstants.h"
#include "qmljsdialect.h"
#include <languageutils/componentversion.h>
@@ -52,6 +52,7 @@ QT_END_NAMESPACE
namespace QmlJS {
class ImportInfo;
+class ViewerContext;
namespace Internal { class ImportDependenciesPrivate; }
class ImportDependencies;
diff --git a/src/libs/qmljs/qmljsindenter.cpp b/src/libs/qmljs/qmljsindenter.cpp
index f73515c6a2..89c1704442 100644
--- a/src/libs/qmljs/qmljsindenter.cpp
+++ b/src/libs/qmljs/qmljsindenter.cpp
@@ -67,6 +67,7 @@
*/
#include <qmljs/qmljsindenter.h>
+#include <qmljs/qmljsscanner.h>
#include <QTextBlock>
diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h
index 1756fbf3f6..6b8ffe549d 100644
--- a/src/libs/qmljs/qmljsinterpreter.h
+++ b/src/libs/qmljs/qmljsinterpreter.h
@@ -33,8 +33,10 @@
#include <qmljs/qmljs_global.h>
#include <qmljs/qmljsconstants.h>
-#include <qmljs/qmljsdocument.h>
#include <qmljs/qmljsimportdependencies.h>
+#include <qmljs/parser/qmljsastfwd_p.h>
+
+#include <languageutils/fakemetaobject.h>
#include <QFileInfoList>
#include <QHash>
@@ -67,6 +69,7 @@ class JSImportScope;
class NameId;
class NullValue;
class NumberValue;
+class ModuleApiInfo;
class ObjectValue;
class QmlEnumValue;
class QmlPrototypeReference;
diff --git a/src/libs/qmljs/qmljslineinfo.cpp b/src/libs/qmljs/qmljslineinfo.cpp
index e3e39d7e22..54c01a809d 100644
--- a/src/libs/qmljs/qmljslineinfo.cpp
+++ b/src/libs/qmljs/qmljslineinfo.cpp
@@ -67,6 +67,7 @@
*/
#include <qmljs/qmljslineinfo.h>
+#include <qmljs/qmljsscanner.h>
using namespace QmlJS;
diff --git a/src/libs/qmljs/qmljslineinfo.h b/src/libs/qmljs/qmljslineinfo.h
index b002da8fce..55b3702179 100644
--- a/src/libs/qmljs/qmljslineinfo.h
+++ b/src/libs/qmljs/qmljslineinfo.h
@@ -32,12 +32,12 @@
#define QMLJSLINEINFO_H
#include <qmljs/qmljs_global.h>
-#include <qmljs/qmljsscanner.h>
#include <QRegExp>
#include <QTextBlock>
namespace QmlJS {
+class Token;
class QMLJS_EXPORT LineInfo
{
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
index be839396e8..37d2e595c1 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
@@ -36,6 +36,7 @@
#include "qmljsplugindumper.h"
#include "qmljstypedescriptionreader.h"
#include "qmljsdialect.h"
+#include "qmljsviewercontext.h"
#include <cplusplus/cppmodelmanagerbase.h>
#include <utils/hostosinfo.h>
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h
index 8b4a91fc98..df23259881 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.h
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h
@@ -33,25 +33,21 @@
#include "qmljs_global.h"
#include "qmljsbundle.h"
-#include "qmljsconstants.h"
#include "qmljsdocument.h"
#include "qmljsqrcparser.h"
-#include "qmljsviewercontext.h"
#include "qmljsdialect.h"
#include <cplusplus/CppDocument.h>
#include <utils/environment.h>
-#include <utils/fileutils.h>
#include <QFuture>
#include <QFutureSynchronizer>
#include <QHash>
-#include <QMultiHash>
#include <QObject>
#include <QPointer>
#include <QStringList>
-#include <QStringList>
-#include <QTimer>
+
+QT_FORWARD_DECLARE_CLASS(QTimer)
namespace ProjectExplorer { class Project; }
diff --git a/src/libs/qmljs/qmljsreformatter.cpp b/src/libs/qmljs/qmljsreformatter.cpp
index be393f92ee..fd987851b8 100644
--- a/src/libs/qmljs/qmljsreformatter.cpp
+++ b/src/libs/qmljs/qmljsreformatter.cpp
@@ -33,6 +33,7 @@
#include "qmljscodeformatter.h"
#include "parser/qmljsast_p.h"
#include "parser/qmljsastvisitor_p.h"
+#include "parser/qmljsengine_p.h"
#include <QString>
#include <QTextBlock>
diff --git a/src/libs/qmljs/qmljsscopechain.cpp b/src/libs/qmljs/qmljsscopechain.cpp
index 1fa71328ce..5416b8e195 100644
--- a/src/libs/qmljs/qmljsscopechain.cpp
+++ b/src/libs/qmljs/qmljsscopechain.cpp
@@ -32,6 +32,7 @@
#include "qmljsbind.h"
#include "qmljsevaluate.h"
#include "qmljsmodelmanagerinterface.h"
+#include "parser/qmljsengine_p.h"
using namespace QmlJS;
diff --git a/src/libs/qmljs/qmljsstaticanalysismessage.cpp b/src/libs/qmljs/qmljsstaticanalysismessage.cpp
index bd8a7e78aa..df2cf1f61d 100644
--- a/src/libs/qmljs/qmljsstaticanalysismessage.cpp
+++ b/src/libs/qmljs/qmljsstaticanalysismessage.cpp
@@ -30,10 +30,12 @@
#include "qmljsstaticanalysismessage.h"
#include "qmljsconstants.h"
+#include "parser/qmljsengine_p.h"
#include <utils/qtcassert.h>
#include <QCoreApplication>
+#include <QRegExp>
using namespace QmlJS;
using namespace QmlJS::StaticAnalysis;
diff --git a/src/libs/qmljs/qmljsstaticanalysismessage.h b/src/libs/qmljs/qmljsstaticanalysismessage.h
index f4f22e373e..41e4bfd3ab 100644
--- a/src/libs/qmljs/qmljsstaticanalysismessage.h
+++ b/src/libs/qmljs/qmljsstaticanalysismessage.h
@@ -33,13 +33,16 @@
#include "qmljs_global.h"
#include "qmljsconstants.h"
-#include "parser/qmljsengine_p.h"
+#include "parser/qmljsastfwd_p.h"
-#include <QRegExp>
#include <QString>
#include <QList>
+QT_FORWARD_DECLARE_CLASS(QRegExp)
+
namespace QmlJS {
+class DiagnosticMessage;
+
namespace StaticAnalysis {
enum Type
diff --git a/src/libs/qmljs/qmljstypedescriptionreader.cpp b/src/libs/qmljs/qmljstypedescriptionreader.cpp
index e37d72aba0..a7351bd740 100644
--- a/src/libs/qmljs/qmljstypedescriptionreader.cpp
+++ b/src/libs/qmljs/qmljstypedescriptionreader.cpp
@@ -30,6 +30,7 @@
#include "qmljstypedescriptionreader.h"
+#include "qmljsdocument.h"
#include "parser/qmljsparser_p.h"
#include "parser/qmljslexer_p.h"
#include "parser/qmljsengine_p.h"
diff --git a/src/libs/qmljs/qmljstypedescriptionreader.h b/src/libs/qmljs/qmljstypedescriptionreader.h
index 7a4fe1f61f..f37367b59f 100644
--- a/src/libs/qmljs/qmljstypedescriptionreader.h
+++ b/src/libs/qmljs/qmljstypedescriptionreader.h
@@ -31,7 +31,10 @@
#ifndef QMLJSTYPEDESCRIPTIONREADER_H
#define QMLJSTYPEDESCRIPTIONREADER_H
-#include "qmljsdocument.h"
+#include "qmljs_global.h"
+#include <qmljs/parser/qmljsastfwd_p.h>
+
+#include <languageutils/fakemetaobject.h>
// for Q_DECLARE_TR_FUNCTIONS
#include <QCoreApplication>
@@ -43,6 +46,7 @@ QT_END_NAMESPACE
namespace QmlJS {
+class ModuleApiInfo;
namespace AST {
class UiProgram;
class UiObjectDefinition;
diff --git a/src/libs/qmljs/qmljsutils.cpp b/src/libs/qmljs/qmljsutils.cpp
index 3a721a54b0..bcbdde5ccc 100644
--- a/src/libs/qmljs/qmljsutils.cpp
+++ b/src/libs/qmljs/qmljsutils.cpp
@@ -32,6 +32,8 @@
#include "parser/qmljsast_p.h"
+#include <QColor>
+
using namespace QmlJS;
using namespace QmlJS::AST;
diff --git a/src/libs/qmljs/qmljsutils.h b/src/libs/qmljs/qmljsutils.h
index b0aab716b1..48de0b2229 100644
--- a/src/libs/qmljs/qmljsutils.h
+++ b/src/libs/qmljs/qmljsutils.h
@@ -36,7 +36,7 @@
#include "parser/qmljsastfwd_p.h"
#include "parser/qmljsengine_p.h"
-#include <QColor>
+QT_FORWARD_DECLARE_CLASS(QColor)
namespace QmlJS {
diff --git a/src/libs/qmljs/qmljsviewercontext.h b/src/libs/qmljs/qmljsviewercontext.h
index 955f384e4c..3bf85c2125 100644
--- a/src/libs/qmljs/qmljsviewercontext.h
+++ b/src/libs/qmljs/qmljsviewercontext.h
@@ -32,7 +32,6 @@
#define VIEWERCONTEXT_H
#include "qmljs_global.h"
-#include "qmljsconstants.h"
#include "qmljsdialect.h"
#include <QStringList>
diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
index 3fb27917e7..b08eacd1f6 100644
--- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
+++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
@@ -666,11 +666,23 @@ const QtInfo &QtInfo::get(const SymbolGroupValueContext &ctx)
modulePattern != total; ++modulePattern) {
const std::string pattern = *modulePattern + qstrdupSymbol;
const StringList &allMatches = SymbolGroupValue::resolveSymbolName(pattern.c_str(), ctx);
- const StringListConstIt match = *modulePattern == "*" ? allMatches.begin()
+ const bool wildcardPattern = *modulePattern == "*";
+ const StringListConstIt match = wildcardPattern
+ ? std::find_if(allMatches.begin(), allMatches.end(), SubStringPredicate("Core"))
: std::find_if(allMatches.begin(), allMatches.end(), SubStringPredicate(modulePattern->c_str()));
- if (match == allMatches.end())
+
+ if (match != allMatches.end()) {
+ qualifiedSymbol = *match;
+ } else if (wildcardPattern && !allMatches.empty()) {
+ // Use the first qstrdup symbol if there is no Core in all available qstrdup symbols
+ // This is useful when qt is statically linked.
+ qualifiedSymbol = *allMatches.begin();
+ } else {
+ // If we haven't found a match and this isn't the wildcard pattern we continue
+ // we could still find a dynamic qt library with a libinfix
continue;
- qualifiedSymbol = *match;
+ }
+
exclPos = qualifiedSymbol.find('!'); // Resolved: 'QtCored4!qstrdup'
libPos = qualifiedSymbol.find("Core");
if (exclPos != std::string::npos && libPos != std::string::npos)
diff --git a/src/libs/timeline/qml/Detail.qml b/src/libs/timeline/qml/Detail.qml
index 83bd262ba0..762ac62fff 100644
--- a/src/libs/timeline/qml/Detail.qml
+++ b/src/libs/timeline/qml/Detail.qml
@@ -32,10 +32,12 @@ import QtQuick 2.1
Text {
property bool isLabel: false
+ property int labelWidth: 85
+ property int valueWidth: 170
font.pixelSize: 12
font.bold: isLabel
textFormat: Text.PlainText
renderType: Text.NativeRendering
elide: Text.ElideRight
- width: text === "" ? 0 : (isLabel ? 85 : 170)
+ width: text === "" ? 0 : (isLabel ? labelWidth : valueWidth)
}
diff --git a/src/libs/timeline/qml/MainView.qml b/src/libs/timeline/qml/MainView.qml
index 984e672818..9c902cd145 100644
--- a/src/libs/timeline/qml/MainView.qml
+++ b/src/libs/timeline/qml/MainView.qml
@@ -321,7 +321,7 @@ Rectangle {
}
SelectionRangeDetails {
- z: 1
+ z: 3
x: 200
y: 125
@@ -347,7 +347,7 @@ Rectangle {
RangeDetails {
id: rangeDetails
- z: 1
+ z: 3
visible: false
x: 200
y: 25
diff --git a/src/libs/timeline/qml/RangeDetails.qml b/src/libs/timeline/qml/RangeDetails.qml
index 55d53c6de4..a890386366 100644
--- a/src/libs/timeline/qml/RangeDetails.qml
+++ b/src/libs/timeline/qml/RangeDetails.qml
@@ -54,7 +54,7 @@ Item {
signal clearSelection
width: col.width + 25
- height: col.height + 30
+ height: contentArea.height + titleBar.height
function hide() {
noteEdit.focus = false;
@@ -146,8 +146,8 @@ Item {
y: px + 1
}
- // title bar
Rectangle {
+ id: titleBar
width: parent.width
height: 20
color: "#55a3b8"
@@ -186,6 +186,7 @@ Item {
// Details area
Rectangle {
+ id: contentArea
color: "white"
width: parent.width
height: 10 + col.height + (noteEdit.visible ? (noteEdit.height + 5) : 0)
@@ -204,6 +205,7 @@ Item {
Repeater {
model: eventInfo
Detail {
+ valueWidth: dragHandle.x - x - 15
isLabel: index % 2 === 0
text: (content === undefined) ? "" : (isLabel ? (content + ":") : content)
}
@@ -298,4 +300,26 @@ Item {
}
}
+ Item {
+ id: dragHandle
+ width: 10
+ height: 10
+ x: 300
+ anchors.bottom: parent.bottom
+ clip: true
+ MouseArea {
+ anchors.fill: parent
+ drag.target: parent
+ drag.axis: Drag.XAxis
+ cursorShape: Qt.SizeHorCursor
+ }
+ Rectangle {
+ color: "#55a3b8"
+ rotation: 45
+ width: parent.width * Math.SQRT2
+ height: parent.height * Math.SQRT2
+ x: parent.width - width / 2
+ y: parent.height - height / 2
+ }
+ }
}
diff --git a/src/libs/timeline/qml/TimelineContent.qml b/src/libs/timeline/qml/TimelineContent.qml
index 998c5c108b..c4d1a27353 100644
--- a/src/libs/timeline/qml/TimelineContent.qml
+++ b/src/libs/timeline/qml/TimelineContent.qml
@@ -172,12 +172,11 @@ ScrollView {
if (modelData.endTime(selectedItem) < zoomer.rangeStart ||
modelData.startTime(selectedItem) > zoomer.rangeEnd) {
- var newStart = (modelData.startTime(selectedItem) +
- modelData.endTime(selectedItem) -
- zoomer.rangeDuration) / 2;
- zoomer.setRange(Math.max(newStart, zoomer.traceStart),
- Math.min(newStart + zoomer.rangeDuration,
- zoomer.traceEnd));
+ var newStart = Math.max((modelData.startTime(selectedItem) +
+ modelData.endTime(selectedItem) -
+ zoomer.rangeDuration) / 2, zoomer.traceStart);
+ zoomer.setRange(newStart,
+ Math.min(newStart + zoomer.rangeDuration, zoomer.traceEnd));
}
var row = modelData.row(selectedItem);
diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp
index d5316dfdb8..f2b7684b5c 100644
--- a/src/libs/utils/fancylineedit.cpp
+++ b/src/libs/utils/fancylineedit.cpp
@@ -172,6 +172,13 @@ FancyLineEdit::FancyLineEdit(QWidget *parent) :
FancyLineEdit::~FancyLineEdit()
{
+ if (d->m_historyCompleter) {
+ // When dialog with FancyLineEdit widget closed by <Escape>
+ // the QueuedConnection don't have enough time to call slot callback
+ // because edit widget and all of its connections are destroyed before
+ // QCoreApplicationPrivate::sendPostedEvents dispatch our queued signal.
+ d->m_historyCompleter->addEntry(text());
+ }
}
void FancyLineEdit::setButtonVisible(Side side, bool visible)
@@ -297,10 +304,12 @@ bool FancyLineEdit::hasAutoHideButton(Side side) const
return d->m_iconbutton[side]->hasAutoHide();
}
-void FancyLineEdit::setHistoryCompleter(const QString &historyKey)
+void FancyLineEdit::setHistoryCompleter(const QString &historyKey, bool restoreLastItemFromHistory)
{
QTC_ASSERT(!d->m_historyCompleter, return);
d->m_historyCompleter = new HistoryCompleter(historyKey, this);
+ if (restoreLastItemFromHistory)
+ setText(d->m_historyCompleter->historyItem());
QLineEdit::setCompleter(d->m_historyCompleter);
// Hitting <Return> in the popup first causes editingFinished()
diff --git a/src/libs/utils/fancylineedit.h b/src/libs/utils/fancylineedit.h
index 975da4d176..c50adfea30 100644
--- a/src/libs/utils/fancylineedit.h
+++ b/src/libs/utils/fancylineedit.h
@@ -114,7 +114,7 @@ public:
// Completion
// Enable a history completer with a history of entries.
- void setHistoryCompleter(const QString &historyKey);
+ void setHistoryCompleter(const QString &historyKey, bool restoreLastItemFromHistory = false);
// Sets a completer that is not a history completer.
void setSpecialCompleter(QCompleter *completer);
diff --git a/src/libs/utils/historycompleter.cpp b/src/libs/utils/historycompleter.cpp
index d2e660861c..4cf055ae3c 100644
--- a/src/libs/utils/historycompleter.cpp
+++ b/src/libs/utils/historycompleter.cpp
@@ -59,6 +59,8 @@ public:
QStringList list;
QString historyKey;
+ bool isLastItemEmpty;
+ QString historyKeyIsLastItemEmpty;
int maxLines;
};
@@ -149,8 +151,11 @@ void HistoryCompleterPrivate::clearHistory()
void HistoryCompleterPrivate::addEntry(const QString &str)
{
const QString entry = str.trimmed();
- if (entry.isEmpty())
+ if (entry.isEmpty()) {
+ isLastItemEmpty = true;
+ theSettings->setValue(historyKeyIsLastItemEmpty, isLastItemEmpty);
return;
+ }
int removeIndex = list.indexOf(entry);
beginResetModel();
if (removeIndex != -1)
@@ -159,6 +164,8 @@ void HistoryCompleterPrivate::addEntry(const QString &str)
list = list.mid(0, maxLines - 1);
endResetModel();
theSettings->setValue(historyKey, list);
+ isLastItemEmpty = false;
+ theSettings->setValue(historyKeyIsLastItemEmpty, isLastItemEmpty);
}
HistoryCompleter::HistoryCompleter(const QString &historyKey, QObject *parent)
@@ -170,6 +177,9 @@ HistoryCompleter::HistoryCompleter(const QString &historyKey, QObject *parent)
d->historyKey = QLatin1String("CompleterHistory/") + historyKey;
d->list = theSettings->value(d->historyKey).toStringList();
+ d->historyKeyIsLastItemEmpty = QLatin1String("CompleterHistory/")
+ + historyKey + QLatin1String(".IsLastItemEmpty");
+ d->isLastItemEmpty = theSettings->value(d->historyKeyIsLastItemEmpty, false).toBool();
setModel(d);
setPopup(new HistoryLineView(d));
@@ -180,6 +190,13 @@ bool HistoryCompleter::removeHistoryItem(int index)
return d->removeRow(index);
}
+QString HistoryCompleter::historyItem() const
+{
+ if (historySize() == 0 || d->isLastItemEmpty)
+ return QString();
+ return d->list.at(0);
+}
+
HistoryCompleter::~HistoryCompleter()
{
delete d;
diff --git a/src/libs/utils/historycompleter.h b/src/libs/utils/historycompleter.h
index 47dd6286ae..641eaaec61 100644
--- a/src/libs/utils/historycompleter.h
+++ b/src/libs/utils/historycompleter.h
@@ -51,6 +51,7 @@ public:
static void setSettings(QSettings *settings);
HistoryCompleter(const QString &historyKey, QObject *parent = 0);
bool removeHistoryItem(int index);
+ QString historyItem() const;
private:
~HistoryCompleter();
diff --git a/src/libs/utils/mimetypes/mimemagicrule.cpp b/src/libs/utils/mimetypes/mimemagicrule.cpp
index 397bf23c90..6fa471f2ca 100644
--- a/src/libs/utils/mimetypes/mimemagicrule.cpp
+++ b/src/libs/utils/mimetypes/mimemagicrule.cpp
@@ -233,14 +233,13 @@ QByteArray MimeMagicRule::makePattern(const QByteArray &value)
}
MimeMagicRule::MimeMagicRule(MimeMagicRule::Type theType,
- const QByteArray &theValue,
- int theStartPos,
- int theEndPos,
- const QByteArray &theMask) :
+ const QByteArray &theValue,
+ int theStartPos,
+ int theEndPos,
+ const QByteArray &theMask,
+ QString *errorString) :
d(new MimeMagicRulePrivate)
{
- Q_ASSERT(!theValue.isEmpty());
-
d->type = theType;
d->value = theValue;
d->startPos = theStartPos;
@@ -248,10 +247,23 @@ MimeMagicRule::MimeMagicRule(MimeMagicRule::Type theType,
d->mask = theMask;
d->matchFunction = 0;
+ if (d->value.isEmpty()) {
+ d->type = Invalid;
+ if (errorString)
+ *errorString = QLatin1String("Invalid empty magic rule value");
+ return;
+ }
+
if (d->type >= Host16 && d->type <= Byte) {
bool ok;
d->number = d->value.toUInt(&ok, 0); // autodetect
- Q_ASSERT(ok);
+ if (!ok) {
+ d->type = Invalid;
+ if (errorString)
+ *errorString = QString::fromLatin1("Invalid magic rule value \"%1\"").arg(
+ QString::fromLatin1(d->value));
+ return;
+ }
d->numberMask = !d->mask.isEmpty() ? d->mask.toUInt(&ok, 0) : 0; // autodetect
}
@@ -260,9 +272,23 @@ MimeMagicRule::MimeMagicRule(MimeMagicRule::Type theType,
d->pattern = makePattern(d->value);
d->pattern.squeeze();
if (!d->mask.isEmpty()) {
- Q_ASSERT(d->mask.size() >= 4 && d->mask.startsWith("0x"));
- d->mask = QByteArray::fromHex(QByteArray::fromRawData(d->mask.constData() + 2, d->mask.size() - 2));
- Q_ASSERT(d->mask.size() == d->pattern.size());
+ if (d->mask.size() < 4 || !d->mask.startsWith("0x")) {
+ d->type = Invalid;
+ if (errorString)
+ *errorString = QString::fromLatin1("Invalid magic rule mask \"%1\"").arg(
+ QString::fromLatin1(d->mask));
+ return;
+ }
+ const QByteArray &tempMask = QByteArray::fromHex(QByteArray::fromRawData(
+ d->mask.constData() + 2, d->mask.size() - 2));
+ if (tempMask.size() != d->pattern.size()) {
+ d->type = Invalid;
+ if (errorString)
+ *errorString = QString::fromLatin1("Invalid magic rule mask size \"%1\"").arg(
+ QString::fromLatin1(d->mask));
+ return;
+ }
+ d->mask = tempMask;
} else {
d->mask.fill(char(-1), d->pattern.size());
}
diff --git a/src/libs/utils/mimetypes/mimemagicrule_p.h b/src/libs/utils/mimetypes/mimemagicrule_p.h
index 495d216704..b1ebe1060c 100644
--- a/src/libs/utils/mimetypes/mimemagicrule_p.h
+++ b/src/libs/utils/mimetypes/mimemagicrule_p.h
@@ -65,7 +65,8 @@ class QTCREATOR_UTILS_EXPORT MimeMagicRule
public:
enum Type { Invalid = 0, String, Host16, Host32, Big16, Big32, Little16, Little32, Byte };
- MimeMagicRule(Type type, const QByteArray &value, int startPos, int endPos, const QByteArray &mask = QByteArray());
+ MimeMagicRule(Type type, const QByteArray &value, int startPos, int endPos,
+ const QByteArray &mask = QByteArray(), QString *errorString = 0);
MimeMagicRule(const MimeMagicRule &other);
~MimeMagicRule();
diff --git a/src/libs/utils/mimetypes/mimetypeparser.cpp b/src/libs/utils/mimetypes/mimetypeparser.cpp
index 2b953a9168..c1db64fb5c 100644
--- a/src/libs/utils/mimetypes/mimetypeparser.cpp
+++ b/src/libs/utils/mimetypes/mimetypeparser.cpp
@@ -176,10 +176,6 @@ static bool createMagicMatchRule(const QXmlStreamAttributes &atts,
return true;
}
const QString value = atts.value(QLatin1String(matchValueAttributeC)).toString();
- if (value.isEmpty()) {
- *errorMessage = QString::fromLatin1("Empty match value detected.");
- return false;
- }
// Parse for offset as "1" or "1:10"
int startPos, endPos;
const QString offsetS = atts.value(QLatin1String(matchOffsetAttributeC)).toString();
@@ -190,8 +186,12 @@ static bool createMagicMatchRule(const QXmlStreamAttributes &atts,
return false;
const QString mask = atts.value(QLatin1String(matchMaskAttributeC)).toString();
- rule = new MimeMagicRule(magicType, value.toUtf8(), startPos, endPos, mask.toLatin1());
+ MimeMagicRule *tempRule = new MimeMagicRule(magicType, value.toUtf8(), startPos, endPos,
+ mask.toLatin1(), errorMessage);
+ if (!tempRule->isValid())
+ return false;
+ rule = tempRule;
return true;
}
#endif
diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp
index 4db3caedee..42bddb4214 100644
--- a/src/plugins/analyzerbase/analyzermanager.cpp
+++ b/src/plugins/analyzerbase/analyzermanager.cpp
@@ -44,6 +44,7 @@
#include <coreplugin/rightpane.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/editormanager.h>
#include <projectexplorer/projectexplorer.h>
@@ -65,6 +66,7 @@
#include <QVBoxLayout>
#include <QDockWidget>
#include <QAction>
+#include <QMenu>
#include <QToolButton>
#include <QComboBox>
#include <QStackedWidget>
diff --git a/src/plugins/analyzerbase/analyzermanager.h b/src/plugins/analyzerbase/analyzermanager.h
index f8360061dd..786589b073 100644
--- a/src/plugins/analyzerbase/analyzermanager.h
+++ b/src/plugins/analyzerbase/analyzermanager.h
@@ -33,10 +33,8 @@
#define ANALYZERMANAGER_H
#include "analyzerbase_global.h"
-#include "analyzerconstants.h"
#include <coreplugin/id.h>
-#include <projectexplorer/projectexplorerconstants.h>
#include <QObject>
diff --git a/src/plugins/analyzerbase/analyzerplugin.cpp b/src/plugins/analyzerbase/analyzerplugin.cpp
index a396dc5056..ef9b53edda 100644
--- a/src/plugins/analyzerbase/analyzerplugin.cpp
+++ b/src/plugins/analyzerbase/analyzerplugin.cpp
@@ -30,6 +30,7 @@
****************************************************************************/
#include "analyzerplugin.h"
+#include "analyzerconstants.h"
#include "analyzermanager.h"
#include <projectexplorer/projectexplorer.h>
diff --git a/src/plugins/analyzerbase/analyzerruncontrol.h b/src/plugins/analyzerbase/analyzerruncontrol.h
index fd6619a869..82769b0768 100644
--- a/src/plugins/analyzerbase/analyzerruncontrol.h
+++ b/src/plugins/analyzerbase/analyzerruncontrol.h
@@ -35,20 +35,14 @@
#include "analyzerbase_global.h"
#include <projectexplorer/runconfiguration.h>
-#include <projectexplorer/task.h>
-#include "analyzerbase_global.h"
#include "analyzerstartparameters.h"
-#include <projectexplorer/task.h>
-#include <projectexplorer/runconfiguration.h>
#include <utils/outputformat.h>
#include <QObject>
#include <QString>
-namespace ProjectExplorer { class RunConfiguration; }
-
namespace Analyzer {
/**
@@ -105,6 +99,8 @@ signals:
void starting(const Analyzer::AnalyzerRunControl *);
private:
+ bool supportsReRunning() const { return false; }
+
ProjectExplorer::RunConfiguration *m_runConfig;
AnalyzerStartParameters m_sp;
};
diff --git a/src/plugins/analyzerbase/analyzerutils.cpp b/src/plugins/analyzerbase/analyzerutils.cpp
index 1216f9cfb5..3d4e71747d 100644
--- a/src/plugins/analyzerbase/analyzerutils.cpp
+++ b/src/plugins/analyzerbase/analyzerutils.cpp
@@ -33,6 +33,7 @@
#include "analyzerconstants.h"
#include <cpptools/cppmodelmanager.h>
+#include <projectexplorer/taskhub.h>
#include <texteditor/texteditor.h>
#include <texteditor/textdocument.h>
@@ -46,6 +47,7 @@
using namespace Analyzer;
using namespace Core;
+using namespace ProjectExplorer;
static void moveCursorToEndOfName(QTextCursor *tc)
{
@@ -93,3 +95,10 @@ CPlusPlus::Symbol *AnalyzerUtils::findSymbolUnderCursor()
const CPlusPlus::LookupItem &lookupItem = lookupItems.first(); // ### TODO: select best candidate.
return lookupItem.declaration();
}
+
+void AnalyzerUtils::logToIssuesPane(Task::TaskType type, const QString &message)
+{
+ TaskHub::addTask(type, message, Analyzer::Constants::ANALYZERTASK_ID);
+ if (type == Task::Error)
+ TaskHub::requestPopup();
+}
diff --git a/src/plugins/analyzerbase/analyzerutils.h b/src/plugins/analyzerbase/analyzerutils.h
index 210da4860d..a7d544e8b5 100644
--- a/src/plugins/analyzerbase/analyzerutils.h
+++ b/src/plugins/analyzerbase/analyzerutils.h
@@ -33,15 +33,15 @@
#include "analyzerbase_global.h"
-QT_BEGIN_NAMESPACE
-class QWidget;
-QT_END_NAMESPACE
+#include <projectexplorer/task.h>
namespace CPlusPlus { class Symbol; }
namespace AnalyzerUtils
{
ANALYZER_EXPORT CPlusPlus::Symbol *findSymbolUnderCursor();
+ ANALYZER_EXPORT void logToIssuesPane(ProjectExplorer::Task::TaskType type,
+ const QString &message);
}
#endif // ANALYZERUTILS_H
diff --git a/src/plugins/analyzerbase/detailederrorview.cpp b/src/plugins/analyzerbase/detailederrorview.cpp
index 73e94b53ee..1c31a7ff40 100644
--- a/src/plugins/analyzerbase/detailederrorview.cpp
+++ b/src/plugins/analyzerbase/detailederrorview.cpp
@@ -35,10 +35,12 @@
#include <utils/qtcassert.h>
+#include <QAction>
#include <QApplication>
#include <QClipboard>
#include <QContextMenuEvent>
#include <QFontMetrics>
+#include <QMenu>
#include <QPainter>
#include <QScrollBar>
diff --git a/src/plugins/analyzerbase/ianalyzertool.h b/src/plugins/analyzerbase/ianalyzertool.h
index 171bb6c903..31cec8cc71 100644
--- a/src/plugins/analyzerbase/ianalyzertool.h
+++ b/src/plugins/analyzerbase/ianalyzertool.h
@@ -33,7 +33,7 @@
#define IANALYZERTOOL_H
#include "analyzerbase_global.h"
-#include "analyzerstartparameters.h"
+#include "analyzerconstants.h"
#include <coreplugin/id.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -47,6 +47,7 @@ namespace ProjectExplorer { class RunConfiguration; }
namespace Analyzer {
+class AnalyzerStartParameters;
class AnalyzerRunControl;
/**
diff --git a/src/plugins/android/androidbuildapkstep.h b/src/plugins/android/androidbuildapkstep.h
index c8aff85c01..a32d78a6e8 100644
--- a/src/plugins/android/androidbuildapkstep.h
+++ b/src/plugins/android/androidbuildapkstep.h
@@ -34,7 +34,6 @@
#include "android_global.h"
#include <projectexplorer/abstractprocessstep.h>
-#include <qtsupport/baseqtversion.h>
QT_BEGIN_NAMESPACE
class QAbstractItemModel;
diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp
index 557425ade6..833de15485 100644
--- a/src/plugins/android/androidconfigurations.cpp
+++ b/src/plugins/android/androidconfigurations.cpp
@@ -1183,7 +1183,7 @@ void AndroidConfigurations::updateAutomaticKitList()
Debugger::DebuggerItem debugger;
debugger.setCommand(tc->suggestedDebugger());
debugger.setEngineType(Debugger::GdbEngineType);
- debugger.setDisplayName(tr("Android Debugger for %1").arg(tc->displayName()));
+ debugger.setUnexpandedDisplayName(tr("Android Debugger for %1").arg(tc->displayName()));
debugger.setAutoDetected(true);
debugger.setAbi(tc->targetAbi());
QVariant id = Debugger::DebuggerItemManager::registerDebugger(debugger);
@@ -1229,7 +1229,7 @@ void AndroidConfigurations::updateAutomaticKitList()
Debugger::DebuggerItem debugger;
debugger.setCommand(tc->suggestedDebugger());
debugger.setEngineType(Debugger::GdbEngineType);
- debugger.setDisplayName(tr("Android Debugger for %1").arg(tc->displayName()));
+ debugger.setUnexpandedDisplayName(tr("Android Debugger for %1").arg(tc->displayName()));
debugger.setAutoDetected(true);
debugger.setAbi(tc->targetAbi());
QVariant id = Debugger::DebuggerItemManager::registerDebugger(debugger);
diff --git a/src/plugins/android/androidconfigurations.h b/src/plugins/android/androidconfigurations.h
index 7c1d7649f9..f35cce897a 100644
--- a/src/plugins/android/androidconfigurations.h
+++ b/src/plugins/android/androidconfigurations.h
@@ -41,16 +41,18 @@
#include <QMap>
#include <QFutureInterface>
-#include <projectexplorer/abi.h>
-
#include <utils/fileutils.h>
-#include <utils/environment.h>
QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
-namespace ProjectExplorer { class Project; }
+namespace ProjectExplorer {
+class Abi;
+class Project;
+}
+
+namespace Utils { class Environment; }
namespace Android {
class AndroidPlugin;
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp
index 80b61e0bfa..3c2625c860 100644
--- a/src/plugins/android/androidmanager.cpp
+++ b/src/plugins/android/androidmanager.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "androidmanager.h"
+#include "androidconstants.h"
#include "androiddeployconfiguration.h"
#include "androidconfigurations.h"
#include "androidrunconfiguration.h"
diff --git a/src/plugins/android/androidmanager.h b/src/plugins/android/androidmanager.h
index acb81dfafd..771963a1fc 100644
--- a/src/plugins/android/androidmanager.h
+++ b/src/plugins/android/androidmanager.h
@@ -32,7 +32,6 @@
#define ANDROIDMANAGER_H
#include "android_global.h"
-#include <utils/fileutils.h>
#include <QPair>
#include <QObject>
@@ -43,6 +42,8 @@ class Kit;
class Target;
}
+namespace Utils { class FileName; }
+
namespace Android {
class AndroidQtSupport;
diff --git a/src/plugins/android/androidmanifestdocument.cpp b/src/plugins/android/androidmanifestdocument.cpp
index cce32f2edf..275e8db74c 100644
--- a/src/plugins/android/androidmanifestdocument.cpp
+++ b/src/plugins/android/androidmanifestdocument.cpp
@@ -33,6 +33,9 @@
#include "androidconstants.h"
#include <coreplugin/editormanager/ieditor.h>
+#include <coreplugin/idocument.h>
+
+#include <utils/fileutils.h>
#include <QFileInfo>
diff --git a/src/plugins/android/androidmanifesteditor.h b/src/plugins/android/androidmanifesteditor.h
index 848a092c62..c8aade5314 100644
--- a/src/plugins/android/androidmanifesteditor.h
+++ b/src/plugins/android/androidmanifesteditor.h
@@ -37,6 +37,8 @@
#include <coreplugin/editormanager/ieditor.h>
#include <texteditor/texteditor.h>
+#include <QActionGroup>
+
QT_BEGIN_NAMESPACE
class QToolBar;
class QActionGroup;
diff --git a/src/plugins/android/androidqtsupport.h b/src/plugins/android/androidqtsupport.h
index 013e28a3b2..b6e2867f5a 100644
--- a/src/plugins/android/androidqtsupport.h
+++ b/src/plugins/android/androidqtsupport.h
@@ -31,21 +31,20 @@
#ifndef ANDROIDSUPPORT_H
#define ANDROIDSUPPORT_H
+#include "android_global.h"
+
#include <QObject>
#include <QList>
-#include <projectexplorer/project.h>
-
-#include <utils/fileutils.h>
-
-#include "android_global.h"
-
namespace ProjectExplorer {
- class Target;
class DeployConfiguration;
class ProcessParameters;
+ class Project;
+ class Target;
}
+namespace Utils { class FileName; }
+
namespace Android {
class ANDROID_EXPORT AndroidQtSupport : public QObject
diff --git a/src/plugins/android/androidrunconfiguration.h b/src/plugins/android/androidrunconfiguration.h
index 67b0d41db0..d62936e8cd 100644
--- a/src/plugins/android/androidrunconfiguration.h
+++ b/src/plugins/android/androidrunconfiguration.h
@@ -32,8 +32,6 @@
#define ANDROIDRUNCONFIGURATION_H
#include "android_global.h"
-#include "androidconstants.h"
-#include "androidconfigurations.h"
#include <projectexplorer/runconfiguration.h>
diff --git a/src/plugins/android/javaeditor.cpp b/src/plugins/android/javaeditor.cpp
index b190c338c5..ec3c026a09 100644
--- a/src/plugins/android/javaeditor.cpp
+++ b/src/plugins/android/javaeditor.cpp
@@ -34,15 +34,16 @@
#include "androidconstants.h"
#include "javacompletionassistprovider.h"
-#include <texteditor/textdocument.h>
-#include <texteditor/texteditor.h>
-#include <utils/uncommentselection.h>
#include <coreplugin/editormanager/ieditorfactory.h>
-
+#include <texteditor/normalindenter.h>
+#include <texteditor/textdocument.h>
#include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditorconstants.h>
-#include <texteditor/normalindenter.h>
+#include <texteditor/texteditor.h>
+
#include <extensionsystem/pluginmanager.h>
+#include <utils/fileutils.h>
+#include <utils/uncommentselection.h>
#include <QFileInfo>
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp
index 9729f00d97..1bc842a1cc 100644
--- a/src/plugins/bazaar/bazaarplugin.cpp
+++ b/src/plugins/bazaar/bazaarplugin.cpp
@@ -48,6 +48,7 @@
#include <coreplugin/id.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/locator/commandlocator.h>
diff --git a/src/plugins/beautifier/beautifierplugin.cpp b/src/plugins/beautifier/beautifierplugin.cpp
index bc10838bfd..67bafd1a13 100644
--- a/src/plugins/beautifier/beautifierplugin.cpp
+++ b/src/plugins/beautifier/beautifierplugin.cpp
@@ -57,6 +57,7 @@
#include <QDir>
#include <QFileInfo>
#include <QFutureWatcher>
+#include <QMenu>
#include <QPlainTextEdit>
#include <QProcess>
#include <QScrollBar>
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp
index a47ddf9e92..586bb58e52 100644
--- a/src/plugins/bineditor/bineditorplugin.cpp
+++ b/src/plugins/bineditor/bineditorplugin.cpp
@@ -267,19 +267,19 @@ public:
bool open(QString *errorString, const QString &fileName, quint64 offset = 0) {
QFile file(fileName);
- quint64 size = static_cast<quint64>(file.size());
- if (size == 0 && !fileName.isEmpty()) {
- QString msg = tr("The Binary Editor cannot open empty files.");
- if (errorString)
- *errorString = msg;
- else
- QMessageBox::critical(ICore::mainWindow(), tr("File Error"), msg);
- return false;
- }
- if (offset >= size)
- return false;
if (file.open(QIODevice::ReadOnly)) {
file.close();
+ quint64 size = static_cast<quint64>(file.size());
+ if (size == 0) {
+ QString msg = tr("The Binary Editor cannot open empty files.");
+ if (errorString)
+ *errorString = msg;
+ else
+ QMessageBox::critical(ICore::mainWindow(), tr("File Error"), msg);
+ return false;
+ }
+ if (offset >= size)
+ return false;
setFilePath(FileName::fromString(fileName));
m_widget->setSizes(offset, file.size());
return true;
diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp
index fbca8c0a72..17936c7f10 100644
--- a/src/plugins/bookmarks/bookmarkmanager.cpp
+++ b/src/plugins/bookmarks/bookmarkmanager.cpp
@@ -36,6 +36,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <projectexplorer/projectexplorer.h>
diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp
index caf39ef7ff..ba2db7452b 100644
--- a/src/plugins/classview/classviewmanager.cpp
+++ b/src/plugins/classview/classviewmanager.cpp
@@ -42,6 +42,7 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
+#include <coreplugin/idocument.h>
#include <texteditor/texteditor.h>
#include <QThread>
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
index b0f5b8b49b..476d3da3d9 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
@@ -35,15 +35,17 @@
#include "cmakesettingspage.h"
#include "cmaketoolmanager.h"
-#include <utils/synchronousprocess.h>
-
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/actionmanager/actioncontainer.h>
-#include <projectexplorer/projecttree.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/projecttree.h>
+
+#include <utils/synchronousprocess.h>
+
+#include <QAction>
#include <QDateTime>
using namespace CMakeProjectManager::Internal;
diff --git a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
index ef618123d6..a1aef0885f 100644
--- a/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
+++ b/src/plugins/coreplugin/actionmanager/actioncontainer.cpp
@@ -32,6 +32,7 @@
#include "actionmanager.h"
#include <coreplugin/coreconstants.h>
+#include <coreplugin/icontext.h>
#include <coreplugin/id.h>
#include <utils/hostosinfo.h>
diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.h b/src/plugins/coreplugin/actionmanager/actionmanager.h
index 493143cfbb..7e924af38c 100644
--- a/src/plugins/coreplugin/actionmanager/actionmanager.h
+++ b/src/plugins/coreplugin/actionmanager/actionmanager.h
@@ -48,6 +48,8 @@ QT_END_NAMESPACE
namespace Core {
class ActionContainer;
+class Command;
+class Context;
namespace Internal {
class CorePlugin;
diff --git a/src/plugins/coreplugin/actionmanager/commandbutton.cpp b/src/plugins/coreplugin/actionmanager/commandbutton.cpp
index 76e0fd4bf3..0b6c273d4e 100644
--- a/src/plugins/coreplugin/actionmanager/commandbutton.cpp
+++ b/src/plugins/coreplugin/actionmanager/commandbutton.cpp
@@ -29,8 +29,10 @@
****************************************************************************/
#include "commandbutton.h"
+#include "actionmanager.h"
+#include "command.h"
+#include "../id.h"
-#include <coreplugin/actionmanager/actionmanager.h>
#include <utils/proxyaction.h>
using namespace Core;
diff --git a/src/plugins/coreplugin/actionmanager/commandmappings.h b/src/plugins/coreplugin/actionmanager/commandmappings.h
index 8fbb395171..00da450901 100644
--- a/src/plugins/coreplugin/actionmanager/commandmappings.h
+++ b/src/plugins/coreplugin/actionmanager/commandmappings.h
@@ -33,8 +33,6 @@
#include <coreplugin/dialogs/ioptionspage.h>
-#include <QObject>
-
QT_BEGIN_NAMESPACE
class QLineEdit;
class QTreeWidget;
diff --git a/src/plugins/coreplugin/basefilewizardfactory.h b/src/plugins/coreplugin/basefilewizardfactory.h
index 44f3d64248..e402852261 100644
--- a/src/plugins/coreplugin/basefilewizardfactory.h
+++ b/src/plugins/coreplugin/basefilewizardfactory.h
@@ -33,14 +33,11 @@
#include "core_global.h"
#include "generatedfile.h"
-#include "featureprovider.h"
#include <coreplugin/iwizardfactory.h>
-#include <extensionsystem/iplugin.h>
-
-#include <QSharedDataPointer>
#include <QList>
+#include <QVariantMap>
QT_BEGIN_NAMESPACE
class QIcon;
diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp
index 923bd2cdcb..4246dfe729 100644
--- a/src/plugins/coreplugin/coreplugin.cpp
+++ b/src/plugins/coreplugin/coreplugin.cpp
@@ -31,6 +31,7 @@
#include "coreplugin.h"
#include "designmode.h"
#include "editmode.h"
+#include "idocument.h"
#include "helpmanager.h"
#include "mainwindow.h"
#include "modemanager.h"
diff --git a/src/plugins/coreplugin/designmode.cpp b/src/plugins/coreplugin/designmode.cpp
index fe5dd3556f..f119a29eba 100644
--- a/src/plugins/coreplugin/designmode.cpp
+++ b/src/plugins/coreplugin/designmode.cpp
@@ -31,6 +31,7 @@
#include "designmode.h"
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/coreconstants.h>
diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.cpp b/src/plugins/coreplugin/dialogs/ioptionspage.cpp
index f25a8169ab..9b6bdd2ba8 100644
--- a/src/plugins/coreplugin/dialogs/ioptionspage.cpp
+++ b/src/plugins/coreplugin/dialogs/ioptionspage.cpp
@@ -35,6 +35,7 @@
#include <QCheckBox>
#include <QGroupBox>
+#include <QIcon>
#include <QLabel>
#include <QPushButton>
@@ -80,6 +81,11 @@
side of the \gui Options dialog.
*/
+QIcon Core::IOptionsPage::categoryIcon() const
+{
+ return QIcon(m_categoryIcon);
+}
+
/*!
\fn QWidget *IOptionsPage::widget()
@@ -183,3 +189,8 @@ bool Core::IOptionsPage::matches(const QString &searchKeyWord) const
return true;
return false;
}
+
+QIcon Core::IOptionsPageProvider::categoryIcon() const
+{
+ return QIcon(m_categoryIcon);
+}
diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.h b/src/plugins/coreplugin/dialogs/ioptionspage.h
index 247437fbb5..4d0a35af42 100644
--- a/src/plugins/coreplugin/dialogs/ioptionspage.h
+++ b/src/plugins/coreplugin/dialogs/ioptionspage.h
@@ -33,10 +33,14 @@
#include <coreplugin/id.h>
-#include <QIcon>
#include <QObject>
#include <QStringList>
+QT_BEGIN_NAMESPACE
+class QIcon;
+class QWidget;
+QT_END_NAMESPACE
+
namespace Core {
class CORE_EXPORT IOptionsPage : public QObject
@@ -51,7 +55,7 @@ public:
QString displayName() const { return m_displayName; }
Id category() const { return m_category; }
QString displayCategory() const { return m_displayCategory; }
- QIcon categoryIcon() const { return QIcon(m_categoryIcon); }
+ QIcon categoryIcon() const;
virtual bool matches(const QString &searchKeyWord) const;
virtual QWidget *widget() = 0;
@@ -92,7 +96,7 @@ public:
Id category() const { return m_category; }
QString displayCategory() const { return m_displayCategory; }
- QIcon categoryIcon() const { return QIcon(m_categoryIcon); }
+ QIcon categoryIcon() const;
virtual QList<IOptionsPage *> pages() const = 0;
virtual bool matches(const QString & /* searchKeyWord*/) const = 0;
diff --git a/src/plugins/coreplugin/dialogs/newdialog.h b/src/plugins/coreplugin/dialogs/newdialog.h
index 3ce9c6158c..bf1b0d6da3 100644
--- a/src/plugins/coreplugin/dialogs/newdialog.h
+++ b/src/plugins/coreplugin/dialogs/newdialog.h
@@ -36,6 +36,7 @@
#include <QDialog>
#include <QIcon>
#include <QList>
+#include <QVariantMap>
QT_BEGIN_NAMESPACE
class QAbstractProxyModel;
diff --git a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
index c85216ed0a..fded4d11c8 100644
--- a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
@@ -460,7 +460,7 @@ void ReadOnlyFilesDialogPrivate::initDialog(const QStringList &fileNames)
ui.treeWidget->setAlternatingRowColors(true);
// Do not show any options to the user if he has no choice.
- if (!useSaveAs && (useVCS || !useMakeWritable)) {
+ if (!useSaveAs && (!useVCS || !useMakeWritable)) {
ui.treeWidget->setColumnHidden(MakeWritable, true);
ui.treeWidget->setColumnHidden(OpenWithVCS, true);
ui.treeWidget->setColumnHidden(SaveAs, true);
diff --git a/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp b/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp
index 52f1f631e4..89b59da6d9 100644
--- a/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/saveitemsdialog.cpp
@@ -32,6 +32,8 @@
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/idocument.h>
+
+#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <QDir>
diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp
index aa4b7b0401..79652c1d38 100644
--- a/src/plugins/coreplugin/editormanager/documentmodel.cpp
+++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp
@@ -37,6 +37,7 @@
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
+#include <QAbstractItemModel>
#include <QDir>
#include <QIcon>
#include <QMimeData>
diff --git a/src/plugins/coreplugin/editormanager/documentmodel.h b/src/plugins/coreplugin/editormanager/documentmodel.h
index daf2996755..28d1f9348e 100644
--- a/src/plugins/coreplugin/editormanager/documentmodel.h
+++ b/src/plugins/coreplugin/editormanager/documentmodel.h
@@ -36,9 +36,10 @@
#include <utils/fileutils.h>
-#include <QAbstractItemModel>
-
-QT_FORWARD_DECLARE_CLASS(QIcon)
+QT_BEGIN_NAMESPACE
+class QAbstractItemModel;
+class QIcon;
+QT_END_NAMESPACE
namespace Core {
diff --git a/src/plugins/coreplugin/editormanager/editorarea.cpp b/src/plugins/coreplugin/editormanager/editorarea.cpp
index ef5d1662b0..d1227e5f5e 100644
--- a/src/plugins/coreplugin/editormanager/editorarea.cpp
+++ b/src/plugins/coreplugin/editormanager/editorarea.cpp
@@ -35,6 +35,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/icontext.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index e7ff06cff0..82a156ab42 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -40,6 +40,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/dialogs/openwithdialog.h>
#include <coreplugin/dialogs/readonlyfilesdialog.h>
@@ -68,6 +69,7 @@
#include <utils/hostosinfo.h>
#include <utils/macroexpander.h>
#include <utils/mimetypes/mimedatabase.h>
+#include <utils/mimetypes/mimetype.h>
#include <utils/qtcassert.h>
#include <QClipboard>
diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h
index f2b123c3ba..dc94580250 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.h
+++ b/src/plugins/coreplugin/editormanager/editormanager.h
@@ -35,18 +35,14 @@
#include "documentmodel.h"
-#include <coreplugin/id.h>
-#include <coreplugin/idocument.h> // enumerations
-#include <utils/mimetypes/mimetype.h>
-
#include <QList>
#include <QWidget>
-#include <QMenu>
#include <functional>
-QT_BEGIN_NAMESPACE
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QMenu)
+
+namespace Utils { class MimeType; }
namespace Core {
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index ae541c885a..85fb0baf32 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -50,6 +50,7 @@
#include <QHBoxLayout>
#include <QLabel>
+#include <QMenu>
#include <QMouseEvent>
#include <QPainter>
#include <QStackedWidget>
diff --git a/src/plugins/coreplugin/editormanager/ieditorfactory.h b/src/plugins/coreplugin/editormanager/ieditorfactory.h
index e7e3e69ba0..ec97906744 100644
--- a/src/plugins/coreplugin/editormanager/ieditorfactory.h
+++ b/src/plugins/coreplugin/editormanager/ieditorfactory.h
@@ -31,7 +31,11 @@
#ifndef IEDITORFACTORY_H
#define IEDITORFACTORY_H
-#include <coreplugin/idocumentfactory.h>
+#include <coreplugin/core_global.h>
+#include <coreplugin/id.h>
+
+#include <QObject>
+#include <QStringList>
namespace Core {
diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp
index 263f8ff7da..08ab777006 100644
--- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp
+++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp
@@ -35,6 +35,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <QApplication>
#include <QMenu>
diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp
index 50853a460b..f2dc220f9e 100644
--- a/src/plugins/coreplugin/editortoolbar.cpp
+++ b/src/plugins/coreplugin/editortoolbar.cpp
@@ -31,6 +31,7 @@
#include "editortoolbar.h"
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
diff --git a/src/plugins/coreplugin/editortoolbar.h b/src/plugins/coreplugin/editortoolbar.h
index 7d13929607..d2c16cf54e 100644
--- a/src/plugins/coreplugin/editortoolbar.h
+++ b/src/plugins/coreplugin/editortoolbar.h
@@ -35,8 +35,6 @@
#include <utils/styledbar.h>
-#include <QIcon>
-
#include <functional>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/coreplugin/externaltool.cpp b/src/plugins/coreplugin/externaltool.cpp
index 66023c5534..f3c0acc235 100644
--- a/src/plugins/coreplugin/externaltool.cpp
+++ b/src/plugins/coreplugin/externaltool.cpp
@@ -31,6 +31,7 @@
#include "externaltool.h"
#include "externaltoolmanager.h"
+#include "idocument.h"
#include "messagemanager.h"
#include "documentmanager.h"
#include "editormanager/editormanager.h"
diff --git a/src/plugins/coreplugin/externaltoolmanager.cpp b/src/plugins/coreplugin/externaltoolmanager.cpp
index 72efa03bb2..a95f93c0b2 100644
--- a/src/plugins/coreplugin/externaltoolmanager.cpp
+++ b/src/plugins/coreplugin/externaltoolmanager.cpp
@@ -31,10 +31,12 @@
#include "externaltoolmanager.h"
#include "externaltool.h"
#include "coreconstants.h"
+#include "icontext.h"
#include "icore.h"
#include "messagemanager.h"
#include "actionmanager/actionmanager.h"
#include "actionmanager/actioncontainer.h"
+#include "actionmanager/command.h"
#include <utils/qtcassert.h>
diff --git a/src/plugins/coreplugin/featureprovider.h b/src/plugins/coreplugin/featureprovider.h
index 32b3439cde..8155653fa1 100644
--- a/src/plugins/coreplugin/featureprovider.h
+++ b/src/plugins/coreplugin/featureprovider.h
@@ -35,7 +35,6 @@
#include <coreplugin/id.h>
-#include <QObject>
#include <QSet>
#include <QStringList>
diff --git a/src/plugins/coreplugin/find/findplugin.cpp b/src/plugins/coreplugin/find/findplugin.cpp
index 36b7dc99f1..f1ca96d63a 100644
--- a/src/plugins/coreplugin/find/findplugin.cpp
+++ b/src/plugins/coreplugin/find/findplugin.cpp
@@ -34,10 +34,13 @@
#include "findtoolbar.h"
#include "findtoolwindow.h"
#include "searchresultwindow.h"
+#include "icontext.h"
#include "ifindfilter.h"
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
+
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/id.h>
diff --git a/src/plugins/coreplugin/find/findtoolbar.cpp b/src/plugins/coreplugin/find/findtoolbar.cpp
index b21d7c0518..11fb61501e 100644
--- a/src/plugins/coreplugin/find/findtoolbar.cpp
+++ b/src/plugins/coreplugin/find/findtoolbar.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "findtoolbar.h"
+#include "icontext.h"
#include "ifindfilter.h"
#include "findplugin.h"
@@ -37,6 +38,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/findplaceholder.h>
#include <extensionsystem/pluginmanager.h>
diff --git a/src/plugins/coreplugin/find/searchresultwindow.cpp b/src/plugins/coreplugin/find/searchresultwindow.cpp
index 1edc96f4a5..8233dd4388 100644
--- a/src/plugins/coreplugin/find/searchresultwindow.cpp
+++ b/src/plugins/coreplugin/find/searchresultwindow.cpp
@@ -34,6 +34,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icontext.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/coreplugin/idocument.h b/src/plugins/coreplugin/idocument.h
index 450a9bed17..d65f43fd3a 100644
--- a/src/plugins/coreplugin/idocument.h
+++ b/src/plugins/coreplugin/idocument.h
@@ -32,14 +32,13 @@
#define IDOCUMENT_H
#include "core_global.h"
-#include "id.h"
-
-#include <utils/fileutils.h>
#include <QObject>
-namespace Core {
+namespace Utils { class FileName; }
+namespace Core {
+class Id;
class InfoBar;
namespace Internal {
diff --git a/src/plugins/coreplugin/iwizardfactory.h b/src/plugins/coreplugin/iwizardfactory.h
index 4c0d6b32a9..e18714e2cf 100644
--- a/src/plugins/coreplugin/iwizardfactory.h
+++ b/src/plugins/coreplugin/iwizardfactory.h
@@ -32,13 +32,11 @@
#define IWIZARDFACTORY_H
#include <coreplugin/core_global.h>
-#include <coreplugin/id.h>
#include <coreplugin/featureprovider.h>
#include <QIcon>
#include <QObject>
#include <QString>
-#include <QVariantMap>
namespace Core {
diff --git a/src/plugins/coreplugin/jsexpander.h b/src/plugins/coreplugin/jsexpander.h
index 6508b26f95..9bf8f99000 100644
--- a/src/plugins/coreplugin/jsexpander.h
+++ b/src/plugins/coreplugin/jsexpander.h
@@ -33,10 +33,10 @@
#include "core_global.h"
-#include <functional>
-
-#include <QFileInfo>
-#include <QString>
+QT_BEGIN_NAMESPACE
+class QObject;
+class QString;
+QT_END_NAMESPACE
namespace Core {
diff --git a/src/plugins/coreplugin/locator/filesystemfilter.cpp b/src/plugins/coreplugin/locator/filesystemfilter.cpp
index 211cf535ca..59ee3827aa 100644
--- a/src/plugins/coreplugin/locator/filesystemfilter.cpp
+++ b/src/plugins/coreplugin/locator/filesystemfilter.cpp
@@ -32,6 +32,7 @@
#include "locatorwidget.h"
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/idocument.h>
#include <utils/fileutils.h>
#include <QDir>
diff --git a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp
index 68cd259741..61b9c46117 100644
--- a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp
+++ b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp
@@ -34,6 +34,7 @@
#include <coreplugin/editormanager/ieditor.h>
#include <utils/fileutils.h>
+#include <QAbstractItemModel>
#include <QFileInfo>
#include <QMutexLocker>
diff --git a/src/plugins/coreplugin/mimetypemagicdialog.cpp b/src/plugins/coreplugin/mimetypemagicdialog.cpp
index 5dd17c4dfc..33be9bd02b 100644
--- a/src/plugins/coreplugin/mimetypemagicdialog.cpp
+++ b/src/plugins/coreplugin/mimetypemagicdialog.cpp
@@ -93,45 +93,12 @@ void MimeTypeMagicDialog::applyRecommended(bool checked)
void MimeTypeMagicDialog::validateAccept()
{
- Utils::Internal::MimeMagicRule::Type type = typeValue(ui.typeSelector->currentIndex());
- // checks similar to the one in MimeMagicRule constructor, which asserts on these...
- if (ui.valueLineEdit->text().isEmpty()) {
- QMessageBox::critical(ICore::dialogParent(), tr("Error"), tr("Empty value not allowed."));
- return;
- } else if (type >= Utils::Internal::MimeMagicRule::Host16
- && type <= Utils::Internal::MimeMagicRule::Byte) {
- bool ok;
- ui.valueLineEdit->text().toUInt(&ok, 0/*autodetect*/);
- if (!ok) {
- QMessageBox::critical(ICore::dialogParent(), tr("Error"), tr("Value must be a number."));
- return;
- }
- } else if (type == Utils::Internal::MimeMagicRule::String) {
- if (!ui.maskLineEdit->text().isEmpty()) {
- QByteArray mask = ui.maskLineEdit->text().toLatin1();
- if (mask.size() < 4) {
- QMessageBox::critical(ICore::dialogParent(), tr("Error"), tr("Mask too short."));
- return;
- } else if (!mask.startsWith("0x")) {
- QMessageBox::critical(ICore::dialogParent(), tr("Error"),
- tr("Mask must start with \"0x\"."));
- return;
- } else {
- QByteArray pattern = Utils::Internal::MimeMagicRule::makePattern(ui.valueLineEdit->text().toUtf8());
- mask = QByteArray::fromHex(QByteArray::fromRawData(mask.constData() + 2, mask.size() - 2));
- if (mask.size() != pattern.size()) {
- QMessageBox::critical(ICore::dialogParent(), tr("Error"),
- tr("Mask has different size than pattern."));
- return;
- }
- }
- }
- } else if (type == Utils::Internal::MimeMagicRule::Invalid) {
- QMessageBox::critical(ICore::dialogParent(), tr("Internal Error"),
- tr("Type is invalid."));
- return;
- }
- accept();
+ QString errorMessage;
+ Utils::Internal::MimeMagicRule rule = createRule(&errorMessage);
+ if (rule.isValid())
+ accept();
+ else
+ QMessageBox::critical(ICore::dialogParent(), tr("Error"), errorMessage);
}
void MimeTypeMagicDialog::setMagicData(const MagicData &data)
@@ -147,12 +114,7 @@ void MimeTypeMagicDialog::setMagicData(const MagicData &data)
MagicData MimeTypeMagicDialog::magicData() const
{
- MagicData data(Utils::Internal::MimeMagicRule(typeValue(ui.typeSelector->currentIndex()),
- ui.valueLineEdit->text().toUtf8(),
- ui.startRangeSpinBox->value(),
- ui.endRangeSpinBox->value(),
- ui.maskLineEdit->text().toLatin1()),
- ui.prioritySpinBox->value());
+ MagicData data(createRule(), ui.prioritySpinBox->value());
return data;
}
@@ -181,3 +143,19 @@ QByteArray MagicData::normalizedMask(const Utils::Internal::MimeMagicRule &rule)
}
return mask;
}
+
+Utils::Internal::MimeMagicRule MimeTypeMagicDialog::createRule(QString *errorMessage) const
+{
+ Utils::Internal::MimeMagicRule::Type type = typeValue(ui.typeSelector->currentIndex());
+ Utils::Internal::MimeMagicRule rule(type,
+ ui.valueLineEdit->text().toUtf8(),
+ ui.startRangeSpinBox->value(),
+ ui.endRangeSpinBox->value(),
+ ui.maskLineEdit->text().toLatin1(),
+ errorMessage);
+ if (type == Utils::Internal::MimeMagicRule::Invalid) {
+ if (errorMessage)
+ *errorMessage = tr("Internal error: Type is invalid");
+ }
+ return rule;
+}
diff --git a/src/plugins/coreplugin/mimetypemagicdialog.h b/src/plugins/coreplugin/mimetypemagicdialog.h
index af4873385a..b65c9934cd 100644
--- a/src/plugins/coreplugin/mimetypemagicdialog.h
+++ b/src/plugins/coreplugin/mimetypemagicdialog.h
@@ -73,6 +73,7 @@ public:
private:
void applyRecommended(bool checked);
void validateAccept();
+ Utils::Internal::MimeMagicRule createRule(QString *errorMessage = 0) const;
Ui::MimeTypeMagicDialog ui;
int m_customRangeStart;
diff --git a/src/plugins/coreplugin/mimetypesettings.cpp b/src/plugins/coreplugin/mimetypesettings.cpp
index f979841344..cd4a4f7f93 100644
--- a/src/plugins/coreplugin/mimetypesettings.cpp
+++ b/src/plugins/coreplugin/mimetypesettings.cpp
@@ -514,9 +514,16 @@ MimeTypeSettingsPrivate::UserMimeTypeHash MimeTypeSettingsPrivate::readUserModif
QPair<int, int> range = rangeFromString(rangeString);
int priority = atts.value(QLatin1String(priorityAttributeC)).toString().toInt();
QByteArray mask = atts.value(QLatin1String(matchMaskAttributeC)).toLatin1();
+ QString errorMessage;
Utils::Internal::MimeMagicRule rule(Utils::Internal::MimeMagicRule::type(typeName),
- value, range.first, range.second, mask);
- mt.rules[priority].append(rule);
+ value, range.first, range.second, mask,
+ &errorMessage);
+ if (rule.isValid()) {
+ mt.rules[priority].append(rule);
+ } else {
+ qWarning("Error reading magic rule in custom mime type %s: %s",
+ qPrintable(mt.name), qPrintable(errorMessage));
+ }
}
break;
case QXmlStreamReader::EndElement:
diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp
index 800d125d21..64c107def7 100644
--- a/src/plugins/coreplugin/modemanager.cpp
+++ b/src/plugins/coreplugin/modemanager.cpp
@@ -36,6 +36,7 @@
#include "mainwindow.h"
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/imode.h>
diff --git a/src/plugins/coreplugin/modemanager.h b/src/plugins/coreplugin/modemanager.h
index a219dcfd15..ae74dd4a94 100644
--- a/src/plugins/coreplugin/modemanager.h
+++ b/src/plugins/coreplugin/modemanager.h
@@ -32,7 +32,6 @@
#define MODEMANAGER_H
#include <coreplugin/core_global.h>
-#include <coreplugin/id.h>
#include <QObject>
QT_BEGIN_NAMESPACE
@@ -41,6 +40,7 @@ QT_END_NAMESPACE
namespace Core {
+class Id;
class IMode;
namespace Internal {
diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp
index 14865ff866..e77fa29dd8 100644
--- a/src/plugins/coreplugin/outputpanemanager.cpp
+++ b/src/plugins/coreplugin/outputpanemanager.cpp
@@ -39,6 +39,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.cpp b/src/plugins/coreplugin/progressmanager/futureprogress.cpp
index e068d0ad2c..837e35d05c 100644
--- a/src/plugins/coreplugin/progressmanager/futureprogress.cpp
+++ b/src/plugins/coreplugin/progressmanager/futureprogress.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "futureprogress.h"
+#include "id.h"
#include "progressbar.h"
#include <utils/stylehelper.h>
diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.h b/src/plugins/coreplugin/progressmanager/futureprogress.h
index 48ead2dfe4..189d4edfa0 100644
--- a/src/plugins/coreplugin/progressmanager/futureprogress.h
+++ b/src/plugins/coreplugin/progressmanager/futureprogress.h
@@ -32,13 +32,13 @@
#define FUTUREPROGRESS_H
#include <coreplugin/core_global.h>
-#include <coreplugin/id.h>
#include <QString>
#include <QFuture>
#include <QWidget>
namespace Core {
+class Id;
class FutureProgressPrivate;
class CORE_EXPORT FutureProgress : public QWidget
diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp
index dcfd838bcc..d20b22e4d8 100644
--- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp
+++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp
@@ -33,6 +33,7 @@
#include "progressbar.h"
#include "progressview.h"
#include "../actionmanager/actionmanager.h"
+#include "../actionmanager/command.h"
#include "../icontext.h"
#include "../coreconstants.h"
#include "../icore.h"
diff --git a/src/plugins/coreplugin/variablechooser.h b/src/plugins/coreplugin/variablechooser.h
index 3326ca923e..7266af6365 100644
--- a/src/plugins/coreplugin/variablechooser.h
+++ b/src/plugins/coreplugin/variablechooser.h
@@ -38,8 +38,6 @@
#include <utils/macroexpander.h>
#include <functional>
-namespace Utils { class MacroExpander; }
-
namespace Core {
namespace Internal { class VariableChooserPrivate; }
diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp
index 13f6cb5a7b..65182b46d9 100644
--- a/src/plugins/coreplugin/vcsmanager.cpp
+++ b/src/plugins/coreplugin/vcsmanager.cpp
@@ -415,8 +415,8 @@ QString VcsManager::msgAddToVcsFailedTitle()
QString VcsManager::msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc)
{
return files.size() == 1
- ? tr("Could not add the file\n%1\nto version control (%2)")
- .arg(files.front(), vc->displayName()) + QLatin1Char('\n')
+ ? tr("Could not add the file\n%1\nto version control (%2)\n")
+ .arg(files.front(), vc->displayName())
: tr("Could not add the following files to version control (%1)\n%2")
.arg(vc->displayName(), files.join(QString(QLatin1Char('\n'))));
}
diff --git a/src/plugins/coreplugin/vcsmanager.h b/src/plugins/coreplugin/vcsmanager.h
index 1cc5350e33..4631ee80ba 100644
--- a/src/plugins/coreplugin/vcsmanager.h
+++ b/src/plugins/coreplugin/vcsmanager.h
@@ -32,13 +32,13 @@
#define VCSMANAGER_H
#include "core_global.h"
-#include "id.h"
#include <QString>
#include <QObject>
namespace Core {
+class Id;
class IVersionControl;
namespace Internal { class MainWindow; }
diff --git a/src/plugins/coreplugin/windowsupport.cpp b/src/plugins/coreplugin/windowsupport.cpp
index 742472e8f7..5c46a1fbee 100644
--- a/src/plugins/coreplugin/windowsupport.cpp
+++ b/src/plugins/coreplugin/windowsupport.cpp
@@ -32,6 +32,7 @@
#include "actionmanager/actioncontainer.h"
#include "actionmanager/actionmanager.h"
+#include "actionmanager/command.h"
#include "coreconstants.h"
#include "icore.h"
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index 338cb5dab9..083394205e 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -61,6 +61,7 @@
#include <QApplication>
#include <QClipboard>
#include <QInputDialog>
+#include <QMenu>
#include <QUrl>
using namespace Core;
diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp
index 377d585703..c8afea541a 100644
--- a/src/plugins/cppeditor/cppeditorplugin.cpp
+++ b/src/plugins/cppeditor/cppeditorplugin.cpp
@@ -52,6 +52,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/icore.h>
diff --git a/src/plugins/cppeditor/cppelementevaluator.cpp b/src/plugins/cppeditor/cppelementevaluator.cpp
index 29759118fa..fa85a8eb05 100644
--- a/src/plugins/cppeditor/cppelementevaluator.cpp
+++ b/src/plugins/cppeditor/cppelementevaluator.cpp
@@ -30,6 +30,7 @@
#include "cppelementevaluator.h"
+#include <cpptools/cppmodelmanager.h>
#include <cpptools/cpptoolsreuse.h>
#include <cpptools/typehierarchybuilder.h>
diff --git a/src/plugins/cppeditor/cppelementevaluator.h b/src/plugins/cppeditor/cppelementevaluator.h
index 03505769bb..16fc718f48 100644
--- a/src/plugins/cppeditor/cppelementevaluator.h
+++ b/src/plugins/cppeditor/cppelementevaluator.h
@@ -35,6 +35,8 @@
#include <texteditor/texteditor.h>
#include <texteditor/helpitem.h>
+#include <cplusplus/CppDocument.h>
+
#include <QString>
#include <QStringList>
#include <QSharedPointer>
diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
index 46bf00bc83..4c359ed9b6 100644
--- a/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
+++ b/src/plugins/cppeditor/cppfunctiondecldeflink.cpp
@@ -34,6 +34,7 @@
#include "cppquickfixassistant.h"
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <cpptools/cppcodestylesettings.h>
#include <cpptools/cpplocalsymbols.h>
#include <cpptools/symbolfinder.h>
@@ -42,6 +43,7 @@
#include <cplusplus/ASTPath.h>
#include <cplusplus/CppRewriter.h>
+#include <cplusplus/Overview.h>
#include <cplusplus/TypeOfExpression.h>
#include <utils/proxyaction.h>
diff --git a/src/plugins/cppeditor/cppquickfix_test.h b/src/plugins/cppeditor/cppquickfix_test.h
index ec0345fc11..2950a0be4d 100644
--- a/src/plugins/cppeditor/cppquickfix_test.h
+++ b/src/plugins/cppeditor/cppquickfix_test.h
@@ -30,6 +30,8 @@
#include "cppeditortestcase.h"
+#include <cpptools/cppprojects.h>
+
#include <QByteArray>
#include <QList>
#include <QSharedPointer>
diff --git a/src/plugins/cppeditor/cppquickfixassistant.cpp b/src/plugins/cppeditor/cppquickfixassistant.cpp
index eb02f751fa..87f436639d 100644
--- a/src/plugins/cppeditor/cppquickfixassistant.cpp
+++ b/src/plugins/cppeditor/cppquickfixassistant.cpp
@@ -33,6 +33,7 @@
#include "cppeditorconstants.h"
#include "cppeditor.h"
+#include <cpptools/cppmodelmanager.h>
#include <texteditor/textdocument.h>
#include <cplusplus/ASTPath.h>
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
index 2de53e8e62..6fad7736c8 100644
--- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
+++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
@@ -42,6 +42,7 @@
#include <texteditor/codeassist/iassistproposal.h>
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/idocument.h>
#include <utils/fileutils.h>
diff --git a/src/plugins/cpptools/baseeditordocumentparser.cpp b/src/plugins/cpptools/baseeditordocumentparser.cpp
index 93bd1b6d8a..7f1e74785b 100644
--- a/src/plugins/cpptools/baseeditordocumentparser.cpp
+++ b/src/plugins/cpptools/baseeditordocumentparser.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "baseeditordocumentparser.h"
+#include "baseeditordocumentprocessor.h"
#include "editordocumenthandle.h"
diff --git a/src/plugins/cpptools/builtinindexingsupport.cpp b/src/plugins/cpptools/builtinindexingsupport.cpp
index 9d75998816..b9cc315b16 100644
--- a/src/plugins/cpptools/builtinindexingsupport.cpp
+++ b/src/plugins/cpptools/builtinindexingsupport.cpp
@@ -40,6 +40,7 @@
#include "searchsymbols.h"
#include <coreplugin/icore.h>
+#include <coreplugin/find/searchresultwindow.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <cplusplus/LookupContext.h>
@@ -47,6 +48,7 @@
#include <utils/runextensions.h>
#include <QCoreApplication>
+#include <QDir>
#include <QElapsedTimer>
using namespace CppTools;
diff --git a/src/plugins/cpptools/cppclassesfilter.h b/src/plugins/cpptools/cppclassesfilter.h
index fd6b7e58a5..8f63c3e2e1 100644
--- a/src/plugins/cpptools/cppclassesfilter.h
+++ b/src/plugins/cpptools/cppclassesfilter.h
@@ -32,11 +32,11 @@
#define CPPCLASSESFILTER_H
#include "cpptools_global.h"
-#include "cpplocatordata.h"
#include "cpplocatorfilter.h"
namespace CppTools {
+class CppLocatorData;
// TODO: un-export this
class CPPTOOLS_EXPORT CppClassesFilter : public Internal::CppLocatorFilter
diff --git a/src/plugins/cpptools/cppcodeformatter.h b/src/plugins/cpptools/cppcodeformatter.h
index 053482fb6e..eb09d0819e 100644
--- a/src/plugins/cpptools/cppcodeformatter.h
+++ b/src/plugins/cpptools/cppcodeformatter.h
@@ -36,7 +36,6 @@
#include <texteditor/tabsettings.h>
-#include <cplusplus/Token.h>
#include <cplusplus/SimpleLexer.h>
#include <QStack>
diff --git a/src/plugins/cpptools/cppcodemodelinspectordumper.cpp b/src/plugins/cpptools/cppcodemodelinspectordumper.cpp
index 11bfdfa793..11ecab7b3b 100644
--- a/src/plugins/cpptools/cppcodemodelinspectordumper.cpp
+++ b/src/plugins/cpptools/cppcodemodelinspectordumper.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "cppcodemodelinspectordumper.h"
+#include "cppmodelmanager.h"
#include "cppworkingcopy.h"
diff --git a/src/plugins/cpptools/cppcodemodelinspectordumper.h b/src/plugins/cpptools/cppcodemodelinspectordumper.h
index b967ef9829..5257a404a9 100644
--- a/src/plugins/cpptools/cppcodemodelinspectordumper.h
+++ b/src/plugins/cpptools/cppcodemodelinspectordumper.h
@@ -33,13 +33,15 @@
#include "cpptools_global.h"
-#include <cpptools/cppmodelmanager.h>
+#include <cpptools/cppprojects.h>
#include <cplusplus/CppDocument.h>
#include <QFile>
#include <QTextStream>
namespace CppTools {
+class WorkingCopy;
+
namespace CppCodeModelInspector {
struct CPPTOOLS_EXPORT Utils
diff --git a/src/plugins/cpptools/cppcodestylesettings.cpp b/src/plugins/cpptools/cppcodestylesettings.cpp
index 7e9ce21c59..913461042e 100644
--- a/src/plugins/cpptools/cppcodestylesettings.cpp
+++ b/src/plugins/cpptools/cppcodestylesettings.cpp
@@ -38,6 +38,8 @@
#include <projectexplorer/project.h>
#include <projectexplorer/projecttree.h>
+#include <cplusplus/Overview.h>
+
#include <utils/qtcassert.h>
#include <utils/settingsutils.h>
diff --git a/src/plugins/cpptools/cppcodestylesettings.h b/src/plugins/cpptools/cppcodestylesettings.h
index bb5f2e4e5d..de939badfc 100644
--- a/src/plugins/cpptools/cppcodestylesettings.h
+++ b/src/plugins/cpptools/cppcodestylesettings.h
@@ -33,14 +33,14 @@
#include "cpptools_global.h"
-#include <cplusplus/Overview.h>
-
-#include <QVariant>
+#include <QVariantMap>
QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
+namespace CPlusPlus { class Overview; }
+
namespace CppTools {
class CPPTOOLS_EXPORT CppCodeStyleSettings
diff --git a/src/plugins/cpptools/cppcodestylesettingspage.cpp b/src/plugins/cpptools/cppcodestylesettingspage.cpp
index e1b5807a20..d5fa67216d 100644
--- a/src/plugins/cpptools/cppcodestylesettingspage.cpp
+++ b/src/plugins/cpptools/cppcodestylesettingspage.cpp
@@ -45,6 +45,7 @@
#include <texteditor/snippets/isnippetprovider.h>
#include <texteditor/texteditorsettings.h>
+#include <cplusplus/Overview.h>
#include <cplusplus/pp.h>
#include <extensionsystem/pluginmanager.h>
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp
index fe82a7a196..f2eebca867 100644
--- a/src/plugins/cpptools/cppcompletion_test.cpp
+++ b/src/plugins/cpptools/cppcompletion_test.cpp
@@ -1482,7 +1482,7 @@ void CppToolsPlugin::test_completion_data()
<< QLatin1String("A")
<< QLatin1String("a"));
- QTest::newRow("nested_class_declaration_with_object_name_inside_function") << _(
+ QTest::newRow("nested_named_class_declaration_inside_function") << _(
"int foo()\n"
"{\n"
" struct Nested\n"
@@ -1495,6 +1495,39 @@ void CppToolsPlugin::test_completion_data()
<< QLatin1String("Nested")
<< QLatin1String("i"));
+ QTest::newRow("nested_class_inside_member_function") << _(
+ "struct User { void use(); };\n"
+ "void User::use()\n"
+ "{\n"
+ " struct Foo { int bar; };\n"
+ " Foo foo;\n"
+ " @\n"
+ "}\n"
+ ) << _("foo.") << (QStringList()
+ << QLatin1String("Foo")
+ << QLatin1String("bar"));
+
+ QTest::newRow("nested_typedef_inside_member_function") << _(
+ "struct User { void use(); };\n"
+ "template<class T>\n"
+ "struct Pointer { T *operator->(); };\n"
+ "struct Foo\n"
+ "{\n"
+ " typedef Pointer<Foo> Ptr;\n"
+ " int bar;\n"
+ "};\n"
+ "\n"
+ "void User::use()\n"
+ "{\n"
+ " typedef Foo MyFoo;\n"
+ " MyFoo::Ptr myfoo;\n"
+ " @\n"
+ "}\n"
+ ) << _("myfoo->") << (QStringList()
+ << QLatin1String("Foo")
+ << QLatin1String("Ptr")
+ << QLatin1String("bar"));
+
QTest::newRow("nested_anonymous_class_QTCREATORBUG10876_1") << _(
"struct EnclosingStruct\n"
"{\n"
diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp
index f07ce5a13a..58d0943267 100644
--- a/src/plugins/cpptools/cppcompletionassist.cpp
+++ b/src/plugins/cpptools/cppcompletionassist.cpp
@@ -59,6 +59,7 @@
#include <cplusplus/Overview.h>
#include <cplusplus/ResolveExpression.h>
+#include <QDirIterator>
#include <QLatin1String>
#include <QTextCursor>
#include <QTextDocument>
diff --git a/src/plugins/cpptools/cppcompletionassistprovider.h b/src/plugins/cpptools/cppcompletionassistprovider.h
index 34bc2ae974..735ca71c3b 100644
--- a/src/plugins/cpptools/cppcompletionassistprovider.h
+++ b/src/plugins/cpptools/cppcompletionassistprovider.h
@@ -36,12 +36,12 @@
#include <texteditor/codeassist/assistenums.h>
#include <texteditor/codeassist/completionassistprovider.h>
-#include <cplusplus/Token.h>
-
QT_BEGIN_NAMESPACE
class QTextDocument;
QT_END_NAMESPACE
+namespace CPlusPlus { struct LanguageFeatures; }
+
namespace TextEditor {
class BaseTextEditor;
class AssistInterface;
diff --git a/src/plugins/cpptools/cppcurrentdocumentfilter.cpp b/src/plugins/cpptools/cppcurrentdocumentfilter.cpp
index a068820e1c..2f03519d19 100644
--- a/src/plugins/cpptools/cppcurrentdocumentfilter.cpp
+++ b/src/plugins/cpptools/cppcurrentdocumentfilter.cpp
@@ -32,7 +32,9 @@
#include "cppmodelmanager.h"
+#include <coreplugin/idocument.h>
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/editormanager/ieditor.h>
#include <QStringMatcher>
diff --git a/src/plugins/cpptools/cppincludesfilter.cpp b/src/plugins/cpptools/cppincludesfilter.cpp
index 89855d7031..3f6ae40fee 100644
--- a/src/plugins/cpptools/cppincludesfilter.cpp
+++ b/src/plugins/cpptools/cppincludesfilter.cpp
@@ -34,6 +34,7 @@
#include <cplusplus/CppDocument.h>
#include <coreplugin/editormanager/documentmodel.h>
+#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
diff --git a/src/plugins/cpptools/cppindexingsupport.h b/src/plugins/cpptools/cppindexingsupport.h
index f6208fb9c9..4551a920d1 100644
--- a/src/plugins/cpptools/cppindexingsupport.h
+++ b/src/plugins/cpptools/cppindexingsupport.h
@@ -35,12 +35,13 @@
#include "cppmodelmanager.h"
-#include <coreplugin/find/searchresultwindow.h>
#include <coreplugin/find/textfindconstants.h>
#include <QFuture>
#include <QStringList>
+namespace Core { class SearchResultItem; }
+
namespace CppTools {
class CPPTOOLS_EXPORT SymbolSearcher: public QObject
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index d52d209a1e..6b4f8e24c0 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -31,6 +31,7 @@
#include "cppmodelmanager.h"
#include "abstracteditorsupport.h"
+#include "baseeditordocumentprocessor.h"
#include "builtinindexingsupport.h"
#include "cppcodemodelinspectordumper.h"
#include "cppcodemodelsettings.h"
@@ -48,6 +49,7 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <texteditor/textdocument.h>
+#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <extensionsystem/pluginmanager.h>
@@ -56,6 +58,7 @@
#include <QCoreApplication>
#include <QDebug>
+#include <QDir>
#include <QMutexLocker>
#include <QTextBlock>
#include <QTimer>
diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h
index 929275fee2..aab8a68f05 100644
--- a/src/plugins/cpptools/cppmodelmanager.h
+++ b/src/plugins/cpptools/cppmodelmanager.h
@@ -35,10 +35,6 @@
#include "cppprojects.h"
-#include <projectexplorer/project.h>
-#include <texteditor/texteditor.h>
-
-#include <cplusplus/CppDocument.h>
#include <cplusplus/cppmodelmanagerbase.h>
#include <QFuture>
diff --git a/src/plugins/cpptools/cppmodelmanager_test.cpp b/src/plugins/cpptools/cppmodelmanager_test.cpp
index a9ee6ccddd..16576454e1 100644
--- a/src/plugins/cpptools/cppmodelmanager_test.cpp
+++ b/src/plugins/cpptools/cppmodelmanager_test.cpp
@@ -28,6 +28,7 @@
**
****************************************************************************/
+#include "baseeditordocumentprocessor.h"
#include "builtineditordocumentparser.h"
#include "cppsourceprocessor.h"
#include "cpptoolsplugin.h"
diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter.cpp b/src/plugins/cpptools/cpppointerdeclarationformatter.cpp
index 74a2df3d7e..7e688675a3 100644
--- a/src/plugins/cpptools/cpppointerdeclarationformatter.cpp
+++ b/src/plugins/cpptools/cpppointerdeclarationformatter.cpp
@@ -31,6 +31,9 @@
#include "cpppointerdeclarationformatter.h"
+#include <cplusplus/Overview.h>
+
+#include <QDebug>
#include <QTextCursor>
#define DEBUG_OUTPUT 0
diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter.h b/src/plugins/cpptools/cpppointerdeclarationformatter.h
index 148aa8a320..7cf3d06979 100644
--- a/src/plugins/cpptools/cpppointerdeclarationformatter.h
+++ b/src/plugins/cpptools/cpppointerdeclarationformatter.h
@@ -34,7 +34,11 @@
#include "cpptools_global.h"
#include "cpprefactoringchanges.h"
-#include <cplusplus/Overview.h>
+#include <cplusplus/ASTVisitor.h>
+
+#include <utils/changeset.h>
+
+namespace CPlusPlus { class Overview; }
namespace CppTools {
diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp b/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp
index b41d66455f..09a3c7cc85 100644
--- a/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp
+++ b/src/plugins/cpptools/cpppointerdeclarationformatter_test.cpp
@@ -41,6 +41,7 @@
#include <utils/fileutils.h>
+#include <cplusplus/Overview.h>
#include <cplusplus/pp.h>
#include <QDebug>
diff --git a/src/plugins/cpptools/cppprojectfile.h b/src/plugins/cpptools/cppprojectfile.h
index cf3b01fe8b..bfc7d87b70 100644
--- a/src/plugins/cpptools/cppprojectfile.h
+++ b/src/plugins/cpptools/cppprojectfile.h
@@ -33,8 +33,6 @@
#include "cpptools_global.h"
-#include <utils/mimetypes/mimetype.h>
-
#include <QHash>
#include <QList>
#include <QString>
diff --git a/src/plugins/cpptools/cppprojects.cpp b/src/plugins/cpptools/cppprojects.cpp
index 03d5bdcbe8..db84381fce 100644
--- a/src/plugins/cpptools/cppprojects.cpp
+++ b/src/plugins/cpptools/cppprojects.cpp
@@ -34,11 +34,14 @@
#include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>
+#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
+#include <utils/fileutils.h>
#include <utils/qtcassert.h>
+#include <QDir>
#include <QSet>
#include <QTextStream>
diff --git a/src/plugins/cpptools/cppprojects.h b/src/plugins/cpptools/cppprojects.h
index f6c78c7852..0851803511 100644
--- a/src/plugins/cpptools/cppprojects.h
+++ b/src/plugins/cpptools/cppprojects.h
@@ -35,7 +35,6 @@
#include "cppprojectfile.h"
-#include <projectexplorer/project.h>
#include <projectexplorer/toolchain.h>
#include <cplusplus/Token.h>
@@ -45,7 +44,12 @@
#include <functional>
+namespace ProjectExplorer { class Project; }
+
+namespace Utils { class FileName; }
+
namespace CppTools {
+class ProjectFile;
class CPPTOOLS_EXPORT ProjectPart
{
diff --git a/src/plugins/cpptools/cpprefactoringchanges.cpp b/src/plugins/cpptools/cpprefactoringchanges.cpp
index 5498ead451..ff6c1fa21c 100644
--- a/src/plugins/cpptools/cpprefactoringchanges.cpp
+++ b/src/plugins/cpptools/cpprefactoringchanges.cpp
@@ -39,6 +39,8 @@
#include <utils/qtcassert.h>
+#include <QTextDocument>
+
using namespace CPlusPlus;
namespace CppTools {
diff --git a/src/plugins/cpptools/cpprefactoringchanges.h b/src/plugins/cpptools/cpprefactoringchanges.h
index 897a7d0669..6701ee73c7 100644
--- a/src/plugins/cpptools/cpprefactoringchanges.h
+++ b/src/plugins/cpptools/cpprefactoringchanges.h
@@ -32,11 +32,10 @@
#define CPPREFACTORINGCHANGES_H
#include "cpptools_global.h"
-#include "cppmodelmanager.h"
-#include <texteditor/refactoringchanges.h>
+#include <cplusplus/CppDocument.h>
-#include <cplusplus/LookupContext.h>
+#include <texteditor/refactoringchanges.h>
namespace CppTools {
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index 2a352a6b7d..4c79948d9f 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -52,9 +52,11 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/jsexpander.h>
#include <coreplugin/vcsmanager.h>
#include <cppeditor/cppeditorconstants.h>
+#include <projectexplorer/project.h>
#include <projectexplorer/projecttree.h>
#include <utils/fileutils.h>
diff --git a/src/plugins/cpptools/cpptoolsreuse.cpp b/src/plugins/cpptools/cpptoolsreuse.cpp
index d0dd2838e3..77d2ade298 100644
--- a/src/plugins/cpptools/cpptoolsreuse.cpp
+++ b/src/plugins/cpptools/cpptoolsreuse.cpp
@@ -31,6 +31,7 @@
#include "cpptoolsreuse.h"
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/idocument.h>
#include <texteditor/convenience.h>
#include <cplusplus/Overview.h>
diff --git a/src/plugins/cpptools/cpptoolstestcase.cpp b/src/plugins/cpptools/cpptoolstestcase.cpp
index f1839b2493..4d0627faa1 100644
--- a/src/plugins/cpptools/cpptoolstestcase.cpp
+++ b/src/plugins/cpptools/cpptoolstestcase.cpp
@@ -29,10 +29,11 @@
****************************************************************************/
#include "cpptoolstestcase.h"
-
+#include "cppmodelmanager.h"
#include "cppworkingcopy.h"
#include <coreplugin/editormanager/editormanager.h>
+#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <texteditor/texteditor.h>
diff --git a/src/plugins/cpptools/cpptoolstestcase.h b/src/plugins/cpptools/cpptoolstestcase.h
index a614911d9f..acc76c6871 100644
--- a/src/plugins/cpptools/cpptoolstestcase.h
+++ b/src/plugins/cpptools/cpptoolstestcase.h
@@ -31,10 +31,9 @@
#ifndef CPPTOOLSTESTCASE_H
#define CPPTOOLSTESTCASE_H
-#include "cppmodelmanager.h"
#include "cpptools_global.h"
-#include <coreplugin/editormanager/ieditor.h>
+#include <cplusplus/CppDocument.h>
#include <QStringList>
#include <QTemporaryDir>
@@ -53,6 +52,9 @@ class IAssistProposal;
}
namespace CppTools {
+class CppModelManager;
+class ProjectInfo;
+
namespace Tests {
class CPPTOOLS_EXPORT TestDocument
diff --git a/src/plugins/cpptools/doxygengenerator.h b/src/plugins/cpptools/doxygengenerator.h
index 271ae230a3..c2229cf43f 100644
--- a/src/plugins/cpptools/doxygengenerator.h
+++ b/src/plugins/cpptools/doxygengenerator.h
@@ -35,7 +35,7 @@
#include <cplusplus/Overview.h>
-#include <QTextCursor>
+QT_FORWARD_DECLARE_CLASS(QTextCursor)
namespace CPlusPlus { class DeclarationAST; }
diff --git a/src/plugins/cpptools/editordocumenthandle.h b/src/plugins/cpptools/editordocumenthandle.h
index 06ae5fc4df..687449dd47 100644
--- a/src/plugins/cpptools/editordocumenthandle.h
+++ b/src/plugins/cpptools/editordocumenthandle.h
@@ -31,10 +31,10 @@
#ifndef EDITORDOCUMENTHANDLE_H
#define EDITORDOCUMENTHANDLE_H
-#include "baseeditordocumentprocessor.h"
#include "cpptools_global.h"
namespace CppTools {
+class BaseEditorDocumentProcessor;
class CPPTOOLS_EXPORT CppEditorDocumentHandle
{
diff --git a/src/plugins/cpptools/insertionpointlocator.cpp b/src/plugins/cpptools/insertionpointlocator.cpp
index 9359bb7a55..529eada08c 100644
--- a/src/plugins/cpptools/insertionpointlocator.cpp
+++ b/src/plugins/cpptools/insertionpointlocator.cpp
@@ -30,12 +30,15 @@
#include "insertionpointlocator.h"
+#include "cppprojectfile.h"
#include "cpptoolsreuse.h"
#include "symbolfinder.h"
#include "cpptoolsconstants.h"
#include <coreplugin/icore.h>
+#include <cplusplus/LookupContext.h>
+
#include <utils/qtcassert.h>
using namespace CPlusPlus;
diff --git a/src/plugins/cpptools/modelmanagertesthelper.h b/src/plugins/cpptools/modelmanagertesthelper.h
index 6da987a581..85f4eb62d3 100644
--- a/src/plugins/cpptools/modelmanagertesthelper.h
+++ b/src/plugins/cpptools/modelmanagertesthelper.h
@@ -33,6 +33,8 @@
#include "cppmodelmanager.h"
+#include <projectexplorer/project.h>
+
#include <QObject>
namespace CppTools {
diff --git a/src/plugins/cpptools/semantichighlighter.cpp b/src/plugins/cpptools/semantichighlighter.cpp
index 2ebb070244..1319959629 100644
--- a/src/plugins/cpptools/semantichighlighter.cpp
+++ b/src/plugins/cpptools/semantichighlighter.cpp
@@ -29,13 +29,16 @@
****************************************************************************/
#include "semantichighlighter.h"
+#include "cppsemanticinfo.h"
#include <texteditor/fontsettings.h>
#include <texteditor/syntaxhighlighter.h>
+#include <texteditor/textdocument.h>
#include <utils/qtcassert.h>
#include <QLoggingCategory>
+#include <QTextDocument>
using namespace CPlusPlus;
using TextEditor::SemanticHighlighter::incrementalApplyExtraAdditionalFormats;
diff --git a/src/plugins/cpptools/semantichighlighter.h b/src/plugins/cpptools/semantichighlighter.h
index 947bc4d3a1..6cc81b9ba0 100644
--- a/src/plugins/cpptools/semantichighlighter.h
+++ b/src/plugins/cpptools/semantichighlighter.h
@@ -31,18 +31,19 @@
#ifndef SEMANTICHIGHLIGHTER_H
#define SEMANTICHIGHLIGHTER_H
-#include "cppsemanticinfo.h"
#include "cpptools_global.h"
-#include <texteditor/textdocument.h>
-#include <texteditor/semantichighlighter.h>
-
#include <QFutureWatcher>
#include <QScopedPointer>
-#include <QTextEdit>
+#include <QTextCharFormat>
#include <functional>
+namespace TextEditor {
+class HighlightingResult;
+class TextDocument;
+}
+
namespace CppTools {
class CPPTOOLS_EXPORT SemanticHighlighter : public QObject
diff --git a/src/plugins/cpptools/symbolfinder.h b/src/plugins/cpptools/symbolfinder.h
index 9ef908e162..e9c301aaf2 100644
--- a/src/plugins/cpptools/symbolfinder.h
+++ b/src/plugins/cpptools/symbolfinder.h
@@ -33,13 +33,20 @@
#include "cpptools_global.h"
-#include <cplusplus/CppDocument.h>
-
#include <QHash>
#include <QStringList>
#include <QMultiMap>
#include <QSet>
+namespace CPlusPlus {
+class Class;
+class Declaration;
+class Function;
+class LookupContext;
+class Snapshot;
+class Symbol;
+}
+
namespace CppTools {
class CPPTOOLS_EXPORT SymbolFinder
diff --git a/src/plugins/cpptools/symbolsearcher_test.cpp b/src/plugins/cpptools/symbolsearcher_test.cpp
index 6fcc0c08f4..729feb3a84 100644
--- a/src/plugins/cpptools/symbolsearcher_test.cpp
+++ b/src/plugins/cpptools/symbolsearcher_test.cpp
@@ -36,6 +36,7 @@
#include "searchsymbols.h"
#include <coreplugin/testdatadir.h>
+#include <coreplugin/find/searchresultwindow.h>
#include <utils/runextensions.h>
#include <QtTest>
diff --git a/src/plugins/cpptools/symbolsfindfilter.cpp b/src/plugins/cpptools/symbolsfindfilter.cpp
index da407a4baa..cf2a622cfc 100644
--- a/src/plugins/cpptools/symbolsfindfilter.cpp
+++ b/src/plugins/cpptools/symbolsfindfilter.cpp
@@ -36,6 +36,8 @@
#include <coreplugin/progressmanager/futureprogress.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/find/searchresultwindow.h>
+#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
diff --git a/src/plugins/cpptools/symbolsfindfilter.h b/src/plugins/cpptools/symbolsfindfilter.h
index 177978e1db..27d281ea46 100644
--- a/src/plugins/cpptools/symbolsfindfilter.h
+++ b/src/plugins/cpptools/symbolsfindfilter.h
@@ -41,6 +41,8 @@
#include <QCheckBox>
#include <QRadioButton>
+namespace Core { class SearchResult; }
+
namespace CppTools {
class CppModelManager;
diff --git a/src/plugins/cpptools/typehierarchybuilder.h b/src/plugins/cpptools/typehierarchybuilder.h
index 9323d5856b..50691e94f5 100644
--- a/src/plugins/cpptools/typehierarchybuilder.h
+++ b/src/plugins/cpptools/typehierarchybuilder.h
@@ -32,14 +32,15 @@
#define CPPTOOLS_TYPEHIERARCHYBUILDER_H
#include "cpptools_global.h"
-#include "cppmodelmanager.h"
+#include <cplusplus/CppDocument.h>
#include <cplusplus/Overview.h>
#include <QList>
-#include <QStringList>
#include <QSet>
+QT_FORWARD_DECLARE_CLASS(QStringList)
+
namespace CppTools {
class CPPTOOLS_EXPORT TypeHierarchy
diff --git a/src/plugins/debugger/cdb/cdbengine.h b/src/plugins/debugger/cdb/cdbengine.h
index 70055f2974..1b6845552a 100644
--- a/src/plugins/debugger/cdb/cdbengine.h
+++ b/src/plugins/debugger/cdb/cdbengine.h
@@ -79,6 +79,9 @@ public:
virtual bool setToolTipExpression(TextEditor::TextEditorWidget *editorWidget,
const DebuggerToolTipContext &context);
+
+ virtual DebuggerEngine *cppEngine() { return this; }
+
virtual void setupEngine();
virtual void setupInferior();
virtual void runEngine();
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 70f752d52a..061ad97253 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -53,6 +53,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/messagebox.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/progressmanager/futureprogress.h>
@@ -1177,6 +1178,38 @@ void DebuggerEngine::notifyInferiorExited()
d->queueShutdownEngine();
}
+void DebuggerEngine::notifyDebuggerProcessFinished(int exitCode,
+ QProcess::ExitStatus exitStatus, const QString &backendName)
+{
+ showMessage(_("%1 PROCESS FINISHED, status %2, exit code %3")
+ .arg(backendName).arg(exitStatus).arg(exitCode));
+
+ switch (state()) {
+ case DebuggerFinished:
+ // Nothing to do.
+ break;
+ case EngineShutdownRequested:
+ notifyEngineShutdownOk();
+ break;
+ case InferiorRunOk:
+ // This could either be a real gdb/lldb crash or a quickly exited inferior
+ // in the terminal adapter. In this case the stub proc will die soon,
+ // too, so there's no need to act here.
+ showMessage(_("The %1 process exited somewhat unexpectedly.").arg(backendName));
+ notifyEngineSpontaneousShutdown();
+ break;
+ default: {
+ notifyEngineIll(); // Initiate shutdown sequence
+ const QString msg = exitStatus == QProcess::CrashExit ?
+ tr("The %1 process terminated.") :
+ tr("The %2 process terminated unexpectedly (exitCode %1)").arg(exitCode);
+ AsynchronousMessageBox::critical(tr("Unexpected %1 Exit").arg(backendName),
+ msg.arg(backendName));
+ break;
+ }
+ }
+}
+
void DebuggerEngine::slaveEngineStateChanged(DebuggerEngine *slaveEngine,
DebuggerState state)
{
diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h
index 2ebe99c70e..c65a448568 100644
--- a/src/plugins/debugger/debuggerengine.h
+++ b/src/plugins/debugger/debuggerengine.h
@@ -35,6 +35,7 @@
#include "debuggerconstants.h"
#include <QObject>
+#include <QProcess>
QT_BEGIN_NAMESPACE
class QDebug;
@@ -256,6 +257,7 @@ public:
bool isSlaveEngine() const;
bool isMasterEngine() const;
DebuggerEngine *masterEngine() const;
+ virtual DebuggerEngine *cppEngine() { return 0; }
virtual bool canDisplayTooltip() const { return state() == InferiorStopOk; }
@@ -312,6 +314,8 @@ protected:
public:
virtual void notifyInferiorExited();
+ void notifyDebuggerProcessFinished(int exitCode, QProcess::ExitStatus exitStatus,
+ const QString &backendName);
protected:
virtual void notifyInferiorShutdownOk();
diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp
index 971a48e0d5..67b1f51d15 100644
--- a/src/plugins/debugger/debuggeritem.cpp
+++ b/src/plugins/debugger/debuggeritem.cpp
@@ -35,8 +35,10 @@
#include "debuggerprotocol.h"
#include <projectexplorer/abi.h>
+
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
+#include <utils/macroexpander.h>
#include <utils/qtcassert.h>
#include <QProcess>
@@ -83,7 +85,7 @@ DebuggerItem::DebuggerItem(const QVariantMap &data)
{
m_command = FileName::fromUserInput(data.value(QLatin1String(DEBUGGER_INFORMATION_COMMAND)).toString());
m_id = data.value(QLatin1String(DEBUGGER_INFORMATION_ID)).toString();
- m_displayName = data.value(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME)).toString();
+ m_unexpandedDisplayName = data.value(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME)).toString();
m_isAutoDetected = data.value(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTED), false).toBool();
m_autoDetectionSource = data.value(QLatin1String(DEBUGGER_INFORMATION_AUTODETECTION_SOURCE)).toString();
m_version = data.value(QLatin1String(DEBUGGER_INFORMATION_VERSION)).toString();
@@ -95,6 +97,9 @@ DebuggerItem::DebuggerItem(const QVariantMap &data)
if (!abi.isNull())
m_abis.append(abi);
}
+
+ if (m_version.isEmpty())
+ reinitializeFromFile();
}
void DebuggerItem::createId()
@@ -204,7 +209,7 @@ QStringList DebuggerItem::abiNames() const
bool DebuggerItem::operator==(const DebuggerItem &other) const
{
return m_id == other.m_id
- && m_displayName == other.m_displayName
+ && m_unexpandedDisplayName == other.m_unexpandedDisplayName
&& m_isAutoDetected == other.m_isAutoDetected
&& m_command == other.m_command;
}
@@ -212,7 +217,7 @@ bool DebuggerItem::operator==(const DebuggerItem &other) const
QVariantMap DebuggerItem::toMap() const
{
QVariantMap data;
- data.insert(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME), m_displayName);
+ data.insert(QLatin1String(DEBUGGER_INFORMATION_DISPLAYNAME), m_unexpandedDisplayName);
data.insert(QLatin1String(DEBUGGER_INFORMATION_ID), m_id);
data.insert(QLatin1String(DEBUGGER_INFORMATION_COMMAND), m_command.toString());
data.insert(QLatin1String(DEBUGGER_INFORMATION_ENGINETYPE), int(m_engineType));
@@ -223,9 +228,26 @@ QVariantMap DebuggerItem::toMap() const
return data;
}
-void DebuggerItem::setDisplayName(const QString &displayName)
+QString DebuggerItem::displayName() const
+{
+ if (!m_unexpandedDisplayName.contains(QLatin1Char('%')))
+ return m_unexpandedDisplayName;
+
+ MacroExpander expander;
+ expander.registerVariable("Debugger:Type", DebuggerKitInformation::tr("Type of Debugger Backend"),
+ [this] { return engineTypeName(); });
+ expander.registerVariable("Debugger:Version", DebuggerKitInformation::tr("Debugger"),
+ [this] { return !m_version.isEmpty() ? m_version :
+ DebuggerKitInformation::tr("Unknown debugger version"); });
+ expander.registerVariable("Debugger:Abi", DebuggerKitInformation::tr("Debugger"),
+ [this] { return !m_abis.isEmpty() ? abiNames().join(QLatin1Char(' ')) :
+ DebuggerKitInformation::tr("Unknown debugger ABI"); });
+ return expander.expand(m_unexpandedDisplayName);
+}
+
+void DebuggerItem::setUnexpandedDisplayName(const QString &displayName)
{
- m_displayName = displayName;
+ m_unexpandedDisplayName = displayName;
}
void DebuggerItem::setEngineType(const DebuggerEngineType &engineType)
diff --git a/src/plugins/debugger/debuggeritem.h b/src/plugins/debugger/debuggeritem.h
index fc3f85541b..6ffb2e7873 100644
--- a/src/plugins/debugger/debuggeritem.h
+++ b/src/plugins/debugger/debuggeritem.h
@@ -44,7 +44,9 @@
namespace Debugger {
class DebuggerItemManager;
+
namespace Internal {
+class DebuggerConfigWidget;
class DebuggerItemConfigWidget;
class DebuggerItemModel;
} // namespace Internal
@@ -68,8 +70,9 @@ public:
QVariant id() const { return m_id; }
- QString displayName() const { return m_displayName; }
- void setDisplayName(const QString &displayName);
+ QString displayName() const;
+ QString unexpandedDisplayName() const { return m_unexpandedDisplayName; }
+ void setUnexpandedDisplayName(const QString &unexpandedDisplayName);
DebuggerEngineType engineType() const { return m_engineType; }
void setEngineType(const DebuggerEngineType &engineType);
@@ -101,9 +104,10 @@ public:
private:
DebuggerItem(const QVariant &id);
void reinitializeFromFile();
+ void initMacroExpander();
QVariant m_id;
- QString m_displayName;
+ QString m_unexpandedDisplayName;
DebuggerEngineType m_engineType;
Utils::FileName m_command;
bool m_isAutoDetected;
@@ -111,6 +115,7 @@ private:
QString m_version;
QList<ProjectExplorer::Abi> m_abis;
+ friend class Internal::DebuggerConfigWidget;
friend class Internal::DebuggerItemConfigWidget;
friend class Internal::DebuggerItemModel;
friend class DebuggerItemManager;
diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp
index 924d493b63..cc04db5bc9 100644
--- a/src/plugins/debugger/debuggeritemmanager.cpp
+++ b/src/plugins/debugger/debuggeritemmanager.cpp
@@ -191,7 +191,7 @@ void DebuggerItemManager::autoDetectCdbDebuggers()
item.setAbis(Abi::abisOfBinary(cdb));
item.setCommand(cdb);
item.setEngineType(CdbEngineType);
- item.setDisplayName(uniqueDisplayName(tr("Auto-detected CDB at %1").arg(cdb.toUserOutput())));
+ item.setUnexpandedDisplayName(uniqueDisplayName(tr("Auto-detected CDB at %1").arg(cdb.toUserOutput())));
addDebugger(item);
}
}
@@ -260,7 +260,7 @@ void DebuggerItemManager::autoDetectGdbOrLldbDebuggers()
item.setCommand(command);
item.reinitializeFromFile();
//: %1: Debugger engine type (GDB, LLDB, CDB...), %2: Path
- item.setDisplayName(tr("System %1 at %2")
+ item.setUnexpandedDisplayName(tr("System %1 at %2")
.arg(item.engineTypeName()).arg(command.toUserOutput()));
item.setAutoDetected(true);
addDebugger(item);
@@ -299,7 +299,7 @@ void DebuggerItemManager::readLegacyDebuggers(const FileName &file)
item.setCommand(command);
item.setAutoDetected(true);
item.reinitializeFromFile();
- item.setDisplayName(tr("Extracted from Kit %1").arg(kitName));
+ item.setUnexpandedDisplayName(tr("Extracted from Kit %1").arg(kitName));
addDebugger(item);
}
}
@@ -379,7 +379,7 @@ QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item)
if (d.command() == item.command()
&& d.isAutoDetected() == item.isAutoDetected()
&& d.engineType() == item.engineType()
- && d.displayName() == item.displayName()
+ && d.unexpandedDisplayName() == item.unexpandedDisplayName()
&& d.abis() == item.abis()) {
return d.id();
}
@@ -407,7 +407,7 @@ void DebuggerItemManager::deregisterDebugger(const QVariant &id)
QString DebuggerItemManager::uniqueDisplayName(const QString &base)
{
foreach (const DebuggerItem &item, m_debuggers)
- if (item.displayName() == base)
+ if (item.unexpandedDisplayName() == base)
return uniqueDisplayName(base + QLatin1String(" (1)"));
return base;
diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp
index c477a14c74..7b22ae80b5 100644
--- a/src/plugins/debugger/debuggerkitinformation.cpp
+++ b/src/plugins/debugger/debuggerkitinformation.cpp
@@ -304,16 +304,16 @@ KitConfigWidget *DebuggerKitInformation::createConfigWidget(Kit *k) const
void DebuggerKitInformation::addToMacroExpander(Kit *kit, MacroExpander *expander) const
{
- expander->registerVariable("Debugger:Type", tr("Type of Debugger Backend"),
+ expander->registerVariable("Debugger:Name", tr("Name of Debugger"),
[this, kit]() -> QString {
const DebuggerItem *item = debugger(kit);
- return item ? item->engineTypeName() : tr("Unknown debugger type");
+ return item ? item->displayName() : tr("Unknown debugger");
});
- expander->registerVariable("Debugger:Name", tr("Debugger"),
+ expander->registerVariable("Debugger:Type", tr("Type of Debugger Backend"),
[this, kit]() -> QString {
const DebuggerItem *item = debugger(kit);
- return item ? item->displayName() : tr("Unknown debugger");
+ return item ? item->engineTypeName() : tr("Unknown debugger type");
});
expander->registerVariable("Debugger:Version", tr("Debugger"),
diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp
index 87075340d7..4458309616 100644
--- a/src/plugins/debugger/debuggermainwindow.cpp
+++ b/src/plugins/debugger/debuggermainwindow.cpp
@@ -39,6 +39,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/imode.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
@@ -55,9 +56,11 @@
#include <QDebug>
+#include <QAction>
#include <QDockWidget>
-#include <QVBoxLayout>
+#include <QMenu>
#include <QToolButton>
+#include <QVBoxLayout>
using namespace Core;
using namespace ProjectExplorer;
diff --git a/src/plugins/debugger/debuggeroptionspage.cpp b/src/plugins/debugger/debuggeroptionspage.cpp
index fc343cbfcb..c9262ff70f 100644
--- a/src/plugins/debugger/debuggeroptionspage.cpp
+++ b/src/plugins/debugger/debuggeroptionspage.cpp
@@ -55,7 +55,7 @@ using namespace Utils;
namespace Debugger {
namespace Internal {
-const char debuggingToolsWikiLinkC[] = "http://qt-project.org/wiki/Qt_Creator_Windows_Debugging";
+const char debuggingToolsWikiLinkC[] = "http://wiki.qt.io/Qt_Creator_Windows_Debugging";
// --------------------------------------------------------------------------
// DebuggerTreeItem
@@ -259,7 +259,7 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget(DebuggerItemModel *model)
DebuggerItem DebuggerItemConfigWidget::item() const
{
DebuggerItem item(m_id);
- item.setDisplayName(m_displayNameLineEdit->text());
+ item.setUnexpandedDisplayName(m_displayNameLineEdit->text());
item.setCommand(m_binaryChooser->fileName());
item.setAutoDetected(m_autodetected);
QList<ProjectExplorer::Abi> abiList;
@@ -295,7 +295,7 @@ void DebuggerItemConfigWidget::load(const DebuggerItem *item)
m_autodetected = item->isAutoDetected();
m_displayNameLineEdit->setEnabled(!item->isAutoDetected());
- m_displayNameLineEdit->setText(item->displayName());
+ m_displayNameLineEdit->setText(item->unexpandedDisplayName());
m_typeLineEdit->setText(item->engineTypeName());
@@ -435,11 +435,9 @@ void DebuggerConfigWidget::cloneDebugger()
DebuggerItem newItem;
newItem.createId();
- newItem.setAutoDetected(false);
newItem.setCommand(item->command());
- newItem.setEngineType(item->engineType());
- newItem.setAbis(item->abis());
- newItem.setDisplayName(DebuggerItemManager::uniqueDisplayName(tr("Clone of %1").arg(item->displayName())));
+ newItem.setUnexpandedDisplayName(DebuggerItemManager::uniqueDisplayName(tr("Clone of %1").arg(item->displayName())));
+ newItem.reinitializeFromFile();
newItem.setAutoDetected(false);
m_model.addDebugger(newItem, true);
m_debuggerView->setCurrentIndex(m_model.lastIndex());
@@ -451,7 +449,7 @@ void DebuggerConfigWidget::addDebugger()
item.createId();
item.setAutoDetected(false);
item.setEngineType(NoEngineType);
- item.setDisplayName(DebuggerItemManager::uniqueDisplayName(tr("New Debugger")));
+ item.setUnexpandedDisplayName(DebuggerItemManager::uniqueDisplayName(tr("New Debugger")));
item.setAutoDetected(false);
m_model.addDebugger(item, true);
m_debuggerView->setCurrentIndex(m_model.lastIndex());
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index f9ea096e3f..a684881c45 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -74,6 +74,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/find/itemviewfind.h>
#include <coreplugin/imode.h>
#include <coreplugin/coreconstants.h>
@@ -942,10 +943,12 @@ public slots:
void handleOperateByInstructionTriggered(bool operateByInstructionTriggered)
{
// Go to source only if we have the file.
- if (currentEngine()->stackHandler()->currentIndex() >= 0) {
- const StackFrame frame = currentEngine()->stackHandler()->currentFrame();
- if (operateByInstructionTriggered || frame.isUsable())
- currentEngine()->gotoLocation(Location(frame, true));
+ if (DebuggerEngine *cppEngine = currentEngine()->cppEngine()) {
+ if (cppEngine->stackHandler()->currentIndex() >= 0) {
+ const StackFrame frame = cppEngine->stackHandler()->currentFrame();
+ if (operateByInstructionTriggered || frame.isUsable())
+ cppEngine->gotoLocation(Location(frame, true));
+ }
}
}
@@ -2634,11 +2637,11 @@ void DebuggerPluginPrivate::extensionsInitialized()
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::attachCore);
act = m_attachToRemoteServerAction = new QAction(this);
- act->setText(tr("Attach to Remote Debug Server..."));
+ act->setText(tr("Attach to Running Debug Server..."));
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::attachToRemoteServer);
act = m_startRemoteServerAction = new QAction(this);
- act->setText(tr("Start Remote Debug Server Attached to Process..."));
+ act->setText(tr("Start Debug Server Attached to Process..."));
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::startRemoteServerAndAttachToProcess);
act = m_attachToRunningApplication = new QAction(this);
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index dc5711d30b..4162ca1629 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -414,13 +414,10 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate
const bool useCppDebugger = aspect->useCppDebugger() && (sp.languages & CppLanguage);
const bool useQmlDebugger = aspect->useQmlDebugger() && (sp.languages & QmlLanguage);
if (useQmlDebugger) {
- if (useCppDebugger) {
+ if (useCppDebugger)
sp.masterEngineType = QmlCppEngineType;
- sp.firstSlaveEngineType = sp.cppEngineType;
- sp.secondSlaveEngineType = QmlCppEngineType;
- } else {
+ else
sp.masterEngineType = QmlEngineType;
- }
} else {
sp.masterEngineType = sp.cppEngineType;
}
diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h
index cb083d0173..abe24ae120 100644
--- a/src/plugins/debugger/debuggerstartparameters.h
+++ b/src/plugins/debugger/debuggerstartparameters.h
@@ -72,15 +72,8 @@ public:
class DEBUGGER_EXPORT DebuggerStartParameters
{
public:
- enum CommunicationChannel {
- CommunicationChannelTcpIp,
- CommunicationChannelUsb
- };
-
DebuggerStartParameters()
: masterEngineType(NoEngineType),
- firstSlaveEngineType(NoEngineType),
- secondSlaveEngineType(NoEngineType),
cppEngineType(NoEngineType),
runConfiguration(0),
isSnapshot(false),
@@ -97,16 +90,10 @@ public:
startMode(NoStartMode),
closeMode(KillAtClose),
useCtrlCStub(false),
- testReceiver(0),
- testCallback(0),
testCase(0)
{}
- //Core::Id profileId;
-
DebuggerEngineType masterEngineType;
- DebuggerEngineType firstSlaveEngineType;
- DebuggerEngineType secondSlaveEngineType;
DebuggerEngineType cppEngineType;
QString sysRoot;
QString deviceSymbolsRoot;
@@ -171,8 +158,6 @@ public:
bool useCtrlCStub;
// For Debugger testing.
- QObject *testReceiver;
- const char *testCallback;
int testCase;
};
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index 2a51e29c7a..e7d82050e6 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -204,6 +204,7 @@ public:
QString name;
QString value;
QString type;
+ QString expression;
QColor color;
bool expandable;
QByteArray iname;
@@ -217,6 +218,7 @@ ToolTipWatchItem::ToolTipWatchItem(WatchItem *item)
iname = item->d.iname;
color = item->color();
expandable = item->d.hasChildren;
+ expression = item->expression();
foreach (TreeItem *child, item->children())
appendChild(new ToolTipWatchItem(static_cast<WatchItem *>(child)));
}
@@ -366,136 +368,35 @@ void ToolTipModel::restoreTreeModel(QXmlStreamReader &r)
class DebuggerToolTipTreeView : public QTreeView
{
public:
- explicit DebuggerToolTipTreeView(QWidget *parent = 0);
+ explicit DebuggerToolTipTreeView(QWidget *parent)
+ : QTreeView(parent)
+ {
+ setHeaderHidden(true);
+ setEditTriggers(NoEditTriggers);
+ setUniformRowHeights(true);
+ setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ }
QSize sizeHint() const { return m_size; }
- void computeSize();
-
- void setEngine(DebuggerEngine *engine);
-private:
- int computeHeight(const QModelIndex &index) const;
+ int sizeHintForColumn(int column) const
+ {
+ return QTreeView::sizeHintForColumn(column);
+ }
- WatchHandler *watchHandler() const
+ int computeHeight(const QModelIndex &index) const
{
- return m_model.m_engine->watchHandler();
+ int s = rowHeight(index);
+ const int rowCount = model()->rowCount(index);
+ for (int i = 0; i < rowCount; ++i)
+ s += computeHeight(model()->index(i, 0, index));
+ return s;
}
QSize m_size;
-
-public:
- ToolTipModel m_model;
- void reexpand(const QModelIndex &idx);
};
-DebuggerToolTipTreeView::DebuggerToolTipTreeView(QWidget *parent)
- : QTreeView(parent)
-{
- setHeaderHidden(true);
- setEditTriggers(NoEditTriggers);
-
- setUniformRowHeights(true);
- setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
- setModel(&m_model);
-
- connect(this, &QTreeView::collapsed, this, &DebuggerToolTipTreeView::computeSize,
- Qt::QueuedConnection);
- connect(this, &QTreeView::expanded, this, &DebuggerToolTipTreeView::computeSize,
- Qt::QueuedConnection);
-
- connect(this, &QTreeView::expanded, &m_model, &ToolTipModel::expandNode);
- connect(this, &QTreeView::collapsed, &m_model, &ToolTipModel::collapseNode);
-}
-
-void DebuggerToolTipTreeView::setEngine(DebuggerEngine *engine)
-{
- m_model.m_engine = engine;
-}
-
-int DebuggerToolTipTreeView::computeHeight(const QModelIndex &index) const
-{
- int s = rowHeight(index);
- const int rowCount = model()->rowCount(index);
- for (int i = 0; i < rowCount; ++i)
- s += computeHeight(model()->index(i, 0, index));
- return s;
-}
-
-void DebuggerToolTipTreeView::reexpand(const QModelIndex &idx)
-{
- TreeItem *item = m_model.itemFromIndex(idx);
- QTC_ASSERT(item, return);
- QByteArray iname = item->data(0, LocalsINameRole).toByteArray();
- bool shouldExpand = m_model.m_expandedINames.contains(iname);
- if (shouldExpand) {
- if (!isExpanded(idx)) {
- expand(idx);
- for (int i = 0, n = model()->rowCount(idx); i != n; ++i) {
- QModelIndex idx1 = model()->index(i, 0, idx);
- reexpand(idx1);
- }
- }
- } else {
- if (isExpanded(idx))
- collapse(idx);
- }
-}
-
-void DebuggerToolTipTreeView::computeSize()
-{
- int columns = 30; // Decoration
- int rows = 0;
- bool rootDecorated = false;
-
- if (QAbstractItemModel *m = model()) {
- reexpand(m->index(0, 0));
- const int columnCount = m->columnCount();
- rootDecorated = m->rowCount() > 0;
- if (rootDecorated) {
- for (int i = 0; i < columnCount; ++i) {
- resizeColumnToContents(i);
- columns += sizeHintForColumn(i);
- }
- }
- if (columns < 100)
- columns = 100; // Prevent toolbar from shrinking when displaying 'Previous'
- rows += computeHeight(QModelIndex());
-
- // Fit tooltip to screen, showing/hiding scrollbars as needed.
- // Add a bit of space to account for tooltip border, and not
- // touch the border of the screen.
- QPoint pos(x(), y());
- QTC_ASSERT(QApplication::desktop(), return);
- QRect desktopRect = QApplication::desktop()->availableGeometry(pos);
- const int maxWidth = desktopRect.right() - pos.x() - 5 - 5;
- const int maxHeight = desktopRect.bottom() - pos.y() - 5 - 5;
-
- if (columns > maxWidth)
- rows += horizontalScrollBar()->height();
-
- if (rows > maxHeight) {
- setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
- rows = maxHeight;
- columns += verticalScrollBar()->width();
- } else {
- setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- }
-
- if (columns > maxWidth) {
- setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
- columns = maxWidth;
- } else {
- setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- }
- }
-
- m_size = QSize(columns + 5, rows + 5);
- setMinimumSize(m_size);
- setMaximumSize(m_size);
- setRootIsDecorated(rootDecorated);
-}
/////////////////////////////////////////////////////////////////////////
//
@@ -508,10 +409,7 @@ class DebuggerToolTipWidget : public QWidget
public:
DebuggerToolTipWidget();
- ~DebuggerToolTipWidget()
- {
- DEBUG("DESTROY DEBUGGERTOOLTIP WIDGET");
- }
+ ~DebuggerToolTipWidget() { DEBUG("DESTROY DEBUGGERTOOLTIP WIDGET"); }
void closeEvent(QCloseEvent *)
{
@@ -548,11 +446,54 @@ public:
titleLabel->active = true; // User can now drag
}
+ void computeSize();
+
+ void setContents(ToolTipWatchItem *item)
+ {
+ titleLabel->setText(item->expression);
+ //treeView->setEnabled(true);
+ model.m_enabled = true;
+ if (item) {
+ model.rootItem()->removeChildren();
+ model.rootItem()->appendChild(item);
+ }
+ reexpand(QModelIndex());
+ computeSize();
+ }
+
+ WatchHandler *watchHandler() const
+ {
+ return model.m_engine->watchHandler();
+ }
+
+ void setEngine(DebuggerEngine *engine) { model.m_engine = engine; }
+
+ void reexpand(const QModelIndex &idx)
+ {
+ TreeItem *item = model.itemFromIndex(idx);
+ QTC_ASSERT(item, return);
+ QByteArray iname = item->data(0, LocalsINameRole).toByteArray();
+ bool shouldExpand = model.m_expandedINames.contains(iname);
+ if (shouldExpand) {
+ if (!treeView->isExpanded(idx)) {
+ treeView->expand(idx);
+ for (int i = 0, n = model.rowCount(idx); i != n; ++i) {
+ QModelIndex idx1 = model.index(i, 0, idx);
+ reexpand(idx1);
+ }
+ }
+ } else {
+ if (treeView->isExpanded(idx))
+ treeView->collapse(idx);
+ }
+ }
+
public:
bool isPinned;
QToolButton *pinButton;
DraggableLabel *titleLabel;
DebuggerToolTipTreeView *treeView;
+ ToolTipModel model;
};
DebuggerToolTipWidget::DebuggerToolTipWidget()
@@ -584,6 +525,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
treeView = new DebuggerToolTipTreeView(this);
treeView->setFocusPolicy(Qt::NoFocus);
+ treeView->setModel(&model);
auto mainLayout = new QVBoxLayout(this);
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
@@ -594,7 +536,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
connect(copyButton, &QAbstractButton::clicked, [this] {
QString text;
QTextStream str(&text);
- treeView->m_model.rootItem()->walkTree([&str](TreeItem *item) {
+ model.rootItem()->walkTree([&str](TreeItem *item) {
auto titem = static_cast<ToolTipWatchItem *>(item);
str << QString(item->level(), QLatin1Char('\t'))
<< titem->name << '\t' << titem->value << '\t' << titem->type << '\n';
@@ -603,9 +545,69 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
clipboard->setText(text, QClipboard::Selection);
clipboard->setText(text, QClipboard::Clipboard);
});
+
+ connect(treeView, &QTreeView::expanded, &model, &ToolTipModel::expandNode);
+ connect(treeView, &QTreeView::collapsed, &model, &ToolTipModel::collapseNode);
+
+ connect(treeView, &QTreeView::collapsed, this, &DebuggerToolTipWidget::computeSize,
+ Qt::QueuedConnection);
+ connect(treeView, &QTreeView::expanded, this, &DebuggerToolTipWidget::computeSize,
+ Qt::QueuedConnection);
DEBUG("CREATE DEBUGGERTOOLTIP WIDGET");
}
+void DebuggerToolTipWidget::computeSize()
+{
+ int columns = 30; // Decoration
+ int rows = 0;
+ bool rootDecorated = false;
+
+ reexpand(model.index(0, 0, QModelIndex()));
+ const int columnCount = model.columnCount(QModelIndex());
+ rootDecorated = model.rowCount() > 0;
+ if (rootDecorated) {
+ for (int i = 0; i < columnCount; ++i) {
+ treeView->resizeColumnToContents(i);
+ columns += treeView->sizeHintForColumn(i);
+ }
+ }
+ if (columns < 100)
+ columns = 100; // Prevent toolbar from shrinking when displaying 'Previous'
+ rows += treeView->computeHeight(QModelIndex());
+
+ // Fit tooltip to screen, showing/hiding scrollbars as needed.
+ // Add a bit of space to account for tooltip border, and not
+ // touch the border of the screen.
+ QPoint pos(x(), y());
+ QTC_ASSERT(QApplication::desktop(), return);
+ QRect desktopRect = QApplication::desktop()->availableGeometry(pos);
+ const int maxWidth = desktopRect.right() - pos.x() - 5 - 5;
+ const int maxHeight = desktopRect.bottom() - pos.y() - 5 - 5;
+
+ if (columns > maxWidth)
+ rows += treeView->horizontalScrollBar()->height();
+
+ if (rows > maxHeight) {
+ treeView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ rows = maxHeight;
+ columns += treeView->verticalScrollBar()->width();
+ } else {
+ treeView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ }
+
+ if (columns > maxWidth) {
+ treeView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ columns = maxWidth;
+ } else {
+ treeView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ }
+
+ treeView->m_size = QSize(columns + 5, rows + 5);
+ treeView->setMinimumSize(treeView->m_size);
+ treeView->setMaximumSize(treeView->m_size);
+ treeView->setRootIsDecorated(rootDecorated);
+}
+
/////////////////////////////////////////////////////////////////////////
//
@@ -645,7 +647,6 @@ public:
QPointer<DebuggerToolTipWidget> widget;
QDate creationDate;
DebuggerToolTipContext context;
-
DebuggerTooltipState state;
};
@@ -788,7 +789,7 @@ DebuggerToolTipHolder::~DebuggerToolTipHolder()
void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine)
{
- widget->treeView->setEngine(engine);
+ widget->setEngine(engine);
if (!engine) {
setState(Released);
@@ -796,6 +797,7 @@ void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine)
}
StackFrame frame = engine->stackHandler()->currentFrame();
+ WatchItem *item = engine->watchHandler()->findItem(context.iname);
// FIXME: The engine should decide on whether it likes
// the context.
@@ -806,14 +808,15 @@ void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine)
<< "SHOW NEEDED: " << widget->isPinned
<< "SAME FRAME: " << sameFrame);
-
if (state == PendingUnshown) {
ToolTip::show(context.mousePosition, widget, Internal::mainWindow());
setState(PendingShown);
}
- if (sameFrame) {
- acquireEngine(engine);
+ if (item && sameFrame) {
+ setState(Acquired);
+ DEBUG("ACQUIRE ENGINE: STATE " << state);
+ widget->setContents(new ToolTipWatchItem(item));
} else {
releaseEngine();
}
@@ -848,26 +851,6 @@ void DebuggerToolTipHolder::destroy()
}
}
-void DebuggerToolTipHolder::acquireEngine(DebuggerEngine *engine)
-{
- DEBUG("ACQUIRE ENGINE: STATE " << state);
- setState(Acquired);
-
- QTC_ASSERT(widget, return);
- widget->titleLabel->setText(context.expression);
- //widget->treeView->setEnabled(true);
- widget->treeView->m_model.m_enabled = true;
-
- WatchItem *item = engine->watchHandler()->findItem(context.iname);
- if (item) {
- auto clone = new ToolTipWatchItem(item);
- widget->treeView->m_model.rootItem()->removeChildren();
- widget->treeView->m_model.rootItem()->appendChild(clone);
- }
- WatchTreeView::reexpand(widget->treeView, QModelIndex());
- widget->treeView->computeSize();
-}
-
void DebuggerToolTipHolder::releaseEngine()
{
if (state == Released)
@@ -876,8 +859,8 @@ void DebuggerToolTipHolder::releaseEngine()
setState(Released);
QTC_ASSERT(widget, return);
- widget->treeView->m_model.m_enabled = false;
- widget->treeView->m_model.layoutChanged();
+ widget->model.m_enabled = false;
+ widget->model.layoutChanged();
widget->titleLabel->setText(DebuggerToolTipManager::tr("%1 (Previous)").arg(context.expression));
// widget->treeView->setEnabled(false);
}
@@ -963,7 +946,7 @@ void DebuggerToolTipHolder::saveSessionData(QXmlStreamWriter &w) const
w.writeAttributes(attributes);
w.writeStartElement(QLatin1String(treeElementC));
- widget->treeView->m_model.rootItem()->walkTree([&w](TreeItem *item) {
+ widget->model.rootItem()->walkTree([&w](TreeItem *item) {
const QString modelItemElement = QLatin1String(modelItemElementC);
for (int i = 0; i < 3; ++i) {
const QString value = item->data(i, Qt::DisplayRole).toString();
@@ -1126,7 +1109,7 @@ void DebuggerToolTipManager::loadSessionData()
if (readTree) {
DebuggerToolTipHolder *tw = findOrCreateTooltip(context);
- tw->widget->treeView->m_model.restoreTreeModel(r);
+ tw->widget->model.restoreTreeModel(r);
tw->widget->pin();
tw->widget->titleLabel->setText(DebuggerToolTipManager::tr("%1 (Restored)").arg(context.expression));
tw->widget->treeView->expandAll();
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 38d800b48a..c61ca86c34 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1464,6 +1464,9 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
// This is gdb 7+'s initial *stopped in response to attach that
// appears before the ^done is seen.
notifyEngineRunAndInferiorStopOk();
+ const DebuggerStartParameters &sp = startParameters();
+ if (sp.useTerminal)
+ continueInferiorInternal();
return;
} else {
QTC_CHECK(false);
@@ -3643,6 +3646,8 @@ void GdbEngine::handleRegisterListValues(const DebuggerResponse &response)
QByteArray data = item["value"].data();
if (data.startsWith("0x")) {
reg.value = data;
+ } else if (data == "<error reading variable>") {
+ // Nothing. See QTCREATORBUG-14029.
} else {
// This is what GDB considers machine readable output:
// value="{v4_float = {0x00000000, 0x00000000, 0x00000000, 0x00000000},
@@ -4361,33 +4366,12 @@ void GdbEngine::handleGdbError(QProcess::ProcessError error)
}
}
-void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type)
+void GdbEngine::handleGdbFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
if (m_commandTimer.isActive())
m_commandTimer.stop();
- showMessage(_("GDB PROCESS FINISHED, status %1, code %2").arg(type).arg(code));
-
- switch (state()) {
- case EngineShutdownRequested:
- notifyEngineShutdownOk();
- break;
- case InferiorRunOk:
- // This could either be a real gdb crash or a quickly exited inferior
- // in the terminal adapter. In this case the stub proc will die soon,
- // too, so there's no need to act here.
- showMessage(_("The gdb process exited somewhat unexpectedly."));
- notifyEngineSpontaneousShutdown();
- break;
- default: {
- notifyEngineIll(); // Initiate shutdown sequence
- const QString msg = type == QProcess::CrashExit ?
- tr("The gdb process terminated.") :
- tr("The gdb process terminated unexpectedly (code %1)").arg(code);
- AsynchronousMessageBox::critical(tr("Unexpected GDB Exit"), msg);
- break;
- }
- }
+ notifyDebuggerProcessFinished(exitCode, exitStatus, QLatin1String("GDB"));
}
void GdbEngine::abortDebugger()
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index b76bac82a1..a5bc93e88b 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -72,6 +72,7 @@ public:
~GdbEngine();
private: ////////// General Interface //////////
+ virtual DebuggerEngine *cppEngine() { return this; }
virtual void setupEngine() = 0;
virtual void handleGdbStartFailed();
@@ -131,7 +132,7 @@ protected: ////////// Gdb Process Management //////////
private slots:
friend class GdbPlainEngine;
void handleInterruptDeviceInferior(const QString &error);
- void handleGdbFinished(int, QProcess::ExitStatus status);
+ void handleGdbFinished(int exitCode, QProcess::ExitStatus exitStatus);
void handleGdbError(QProcess::ProcessError error);
void readDebugeeOutput(const QByteArray &data);
void readGdbStandardOutput();
diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.h b/src/plugins/debugger/gdb/remotegdbserveradapter.h
index 2b0c732d81..1292cc5e37 100644
--- a/src/plugins/debugger/gdb/remotegdbserveradapter.h
+++ b/src/plugins/debugger/gdb/remotegdbserveradapter.h
@@ -36,12 +36,6 @@
namespace Debugger {
namespace Internal {
-///////////////////////////////////////////////////////////////////////
-//
-// RemoteGdbAdapter
-//
-///////////////////////////////////////////////////////////////////////
-
class GdbRemoteServerEngine : public GdbEngine
{
Q_OBJECT
@@ -56,23 +50,11 @@ private:
void interruptInferior2();
void shutdownEngine();
-signals:
- /*
- * For "external" clients of a debugger run control that need to do
- * further setup before the debugger is started (e.g. RemoteLinux).
- * Afterwards, handleSetupDone() or handleSetupFailed() must be called
- * to continue or abort debugging, respectively.
- * This signal is only emitted if the start parameters indicate that
- * a server start script should be used, but none is given.
- */
- void requestSetup();
-
-private:
- Q_SLOT void readUploadStandardOutput();
- Q_SLOT void readUploadStandardError();
- Q_SLOT void uploadProcError(QProcess::ProcessError error);
- Q_SLOT void uploadProcFinished();
- Q_SLOT void callTargetRemote();
+ void readUploadStandardOutput();
+ void readUploadStandardError();
+ void uploadProcError(QProcess::ProcessError error);
+ void uploadProcFinished();
+ void callTargetRemote();
void notifyEngineRemoteServerRunning(const QByteArray &serverChannel, int inferiorPid);
void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result);
diff --git a/src/plugins/debugger/gdb/termgdbadapter.cpp b/src/plugins/debugger/gdb/termgdbadapter.cpp
index 27d5f6bafe..a41bf43228 100644
--- a/src/plugins/debugger/gdb/termgdbadapter.cpp
+++ b/src/plugins/debugger/gdb/termgdbadapter.cpp
@@ -147,9 +147,8 @@ void GdbTermEngine::handleStubAttached(const DebuggerResponse &response)
switch (response.resultClass) {
case ResultDone:
- if (startParameters().toolChainAbi.os() != ProjectExplorer::Abi::WindowsOS) {
- showMessage(_("INFERIOR ATTACHED"));
- } else {
+ case ResultRunning:
+ if (startParameters().toolChainAbi.os() == ProjectExplorer::Abi::WindowsOS) {
QString errorMessage;
// Resume thread that was suspended by console stub process (see stub code).
const qint64 mainThreadId = m_stubProc.applicationMainThreadID();
@@ -161,21 +160,14 @@ void GdbTermEngine::handleStubAttached(const DebuggerResponse &response)
arg(mainThreadId).arg(errorMessage),
LogWarning);
}
- }
- if (state() == EngineRunRequested) {
- // We will get a '*stopped' later that we'll interpret as 'spontaneous'
- // So acknowledge the current state and put a delayed 'continue' in the pipe.
- notifyEngineRunAndInferiorRunOk();
- } else {
- //postCommand("print 43", NoFlags, [this](const DebuggerResponse &) { continueInferiorInternal(); });
+ notifyEngineRunAndInferiorStopOk();
continueInferiorInternal();
+ } else {
+ showMessage(_("INFERIOR ATTACHED AND RUNNING"));
+ //notifyEngineRunAndInferiorRunOk();
+ // Wait for the upcoming *stopped and handle it there.
}
break;
- case ResultRunning:
- // Has anyone seen such a result lately?
- showMessage(_("INFERIOR ATTACHED AND RUNNING"));
- notifyEngineRunAndInferiorRunOk();
- break;
case ResultError:
if (response.data["msg"].data() == "ptrace: Operation not permitted.") {
showMessage(msgPtraceError(startParameters().startMode));
diff --git a/src/plugins/debugger/imageviewer.cpp b/src/plugins/debugger/imageviewer.cpp
index 26015f9fc6..898ef7069a 100644
--- a/src/plugins/debugger/imageviewer.cpp
+++ b/src/plugins/debugger/imageviewer.cpp
@@ -33,8 +33,11 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
+#include <coreplugin/idocument.h>
+#include <QAction>
#include <QLabel>
+#include <QMenu>
#include <QImage>
#include <QVBoxLayout>
#include <QMouseEvent>
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp
index ae33c3af0d..8370ea6730 100644
--- a/src/plugins/debugger/lldb/lldbengine.cpp
+++ b/src/plugins/debugger/lldb/lldbengine.cpp
@@ -116,6 +116,7 @@ LldbEngine::LldbEngine(const DebuggerStartParameters &startParameters)
LldbEngine::~LldbEngine()
{
m_stubProc.disconnect(); // Avoid spurious state transitions from late exiting stub
+ m_lldbProc.disconnect();
}
void LldbEngine::executeDebuggerCommand(const QString &command, DebuggerLanguages)
@@ -434,10 +435,6 @@ void LldbEngine::handleResponse(const QByteArray &response)
watchHandler()->addDumpers(item);
else if (name == "stack")
refreshStack(item);
- else if (name == "stack-position")
- refreshStackPosition(item);
- else if (name == "stack-top")
- refreshStackTop(item);
else if (name == "registers")
refreshRegisters(item);
else if (name == "threads")
@@ -526,11 +523,12 @@ void LldbEngine::executeJumpToLine(const ContextData &data)
void LldbEngine::activateFrame(int frameIndex)
{
- resetLocation();
if (state() != InferiorStopOk && state() != InferiorUnrunnable)
return;
- const int n = stackHandler()->stackSize();
+ StackHandler *handler = stackHandler();
+
+ const int n = handler->stackSize();
if (frameIndex == n) {
DebuggerCommand cmd("reportStack");
cmd.arg("nativeMixed", isNativeMixedActive());
@@ -539,6 +537,10 @@ void LldbEngine::activateFrame(int frameIndex)
return;
}
+ QTC_ASSERT(frameIndex < handler->stackSize(), return);
+ handler->setCurrentIndex(frameIndex);
+ gotoLocation(handler->currentFrame());
+
DebuggerCommand cmd("activateFrame");
cmd.arg("index", frameIndex);
cmd.arg("thread", threadsHandler()->currentThread().raw());
@@ -786,11 +788,6 @@ void LldbEngine::refreshSymbols(const GdbMi &symbols)
//
//////////////////////////////////////////////////////////////////////
-void LldbEngine::resetLocation()
-{
- DebuggerEngine::resetLocation();
-}
-
bool LldbEngine::setToolTipExpression(TextEditor::TextEditorWidget *editorWidget, const DebuggerToolTipContext &context)
{
if (state() != InferiorStopOk || !isCppEditor(editorWidget)) {
@@ -906,8 +903,7 @@ void LldbEngine::doUpdateLocals(UpdateParameters params)
void LldbEngine::handleLldbError(QProcess::ProcessError error)
{
- qDebug() << "HANDLE LLDB ERROR";
- showMessage(_("HANDLE LLDB ERROR"));
+ showMessage(_("LLDB PROCESS ERROR: %1").arg(error));
switch (error) {
case QProcess::Crashed:
break; // will get a processExited() as well
@@ -950,11 +946,9 @@ QString LldbEngine::errorMessage(QProcess::ProcessError error) const
}
}
-void LldbEngine::handleLldbFinished(int code, QProcess::ExitStatus type)
+void LldbEngine::handleLldbFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
- qDebug() << "LLDB FINISHED";
- showMessage(_("LLDB PROCESS FINISHED, status %1, code %2").arg(type).arg(code));
- notifyEngineSpontaneousShutdown();
+ notifyDebuggerProcessFinished(exitCode, exitStatus, QLatin1String("LLDB"));
}
void LldbEngine::readLldbStandardError()
@@ -967,7 +961,7 @@ void LldbEngine::readLldbStandardError()
void LldbEngine::readLldbStandardOutput()
{
QByteArray out = m_lldbProc.readAllStandardOutput();
- showMessage(_("Lldb stdout: " + out));
+ showMessage(_(out));
m_inbuffer.append(out);
while (true) {
int pos = m_inbuffer.indexOf("@\n");
@@ -1030,25 +1024,6 @@ void LldbEngine::refreshStack(const GdbMi &stack)
handler->setFrames(frames, canExpand);
}
-void LldbEngine::refreshStackPosition(const GdbMi &position)
-{
- setStackPosition(position["id"].toInt());
-}
-
-void LldbEngine::refreshStackTop(const GdbMi &)
-{
- setStackPosition(stackHandler()->firstUsableIndex());
-}
-
-void LldbEngine::setStackPosition(int index)
-{
- StackHandler *handler = stackHandler();
- handler->setFrames(handler->frames());
- handler->setCurrentIndex(index);
- if (index >= 0 && index < handler->stackSize())
- gotoLocation(handler->frameAt(index));
-}
-
void LldbEngine::refreshRegisters(const GdbMi &registers)
{
RegisterHandler *handler = registerHandler();
diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h
index 695c2e417f..87bdff27d9 100644
--- a/src/plugins/debugger/lldb/lldbengine.h
+++ b/src/plugins/debugger/lldb/lldbengine.h
@@ -68,6 +68,8 @@ public:
private:
// DebuggerEngine implementation
+ DebuggerEngine *cppEngine() { return this; }
+
void executeStep();
void executeStepOut();
void executeNext();
@@ -81,7 +83,6 @@ private:
void shutdownInferior();
void shutdownEngine();
void abortDebugger();
- void resetLocation();
bool setToolTipExpression(TextEditor::TextEditorWidget *editorWidget,
const DebuggerToolTipContext &);
@@ -133,7 +134,7 @@ private:
QString errorMessage(QProcess::ProcessError error) const;
bool hasCapability(unsigned cap) const;
- void handleLldbFinished(int, QProcess::ExitStatus status);
+ void handleLldbFinished(int exitCode, QProcess::ExitStatus exitStatus);
void handleLldbError(QProcess::ProcessError error);
void readLldbStandardOutput();
void readLldbStandardError();
@@ -147,9 +148,6 @@ private:
void refreshAll(const GdbMi &all);
void refreshThreads(const GdbMi &threads);
void refreshStack(const GdbMi &stack);
- void refreshStackPosition(const GdbMi &position);
- void refreshStackTop(const GdbMi &position);
- void setStackPosition(int index);
void refreshRegisters(const GdbMi &registers);
void refreshLocals(const GdbMi &vars);
void refreshTypeInfo(const GdbMi &typeInfo);
diff --git a/src/plugins/debugger/memoryagent.cpp b/src/plugins/debugger/memoryagent.cpp
index 18835e2363..5dbef0020f 100644
--- a/src/plugins/debugger/memoryagent.cpp
+++ b/src/plugins/debugger/memoryagent.cpp
@@ -40,6 +40,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/messagebox.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp
index 08bfb8cf0d..5fec4144dc 100644
--- a/src/plugins/debugger/qml/qmlcppengine.cpp
+++ b/src/plugins/debugger/qml/qmlcppengine.cpp
@@ -52,6 +52,15 @@ enum { debug = 0 };
#define EDEBUG(s) do { if (debug) qDebug() << s; } while (0)
+#define CHECK_STATE(s) \
+ do { \
+ if (state() != s) { \
+ showMessage(QString::fromLatin1("UNEXPECTED STATE: %1 WANTED: %2 IN %3:%4") \
+ .arg(state()).arg(s).arg(QLatin1String(__FILE__)).arg(__LINE__), LogError); \
+ QTC_ASSERT(false, qDebug() << state() << s); \
+ } \
+ } while (0)
+
DebuggerEngine *createQmlCppEngine(const DebuggerStartParameters &sp,
QString *errorMessage)
{
@@ -74,7 +83,7 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp, QString *errorMess
{
setObjectName(QLatin1String("QmlCppEngine"));
m_qmlEngine = new QmlEngine(sp, this);
- m_cppEngine = DebuggerRunControlFactory::createEngine(sp.firstSlaveEngineType, sp, errorMessage);
+ m_cppEngine = DebuggerRunControlFactory::createEngine(sp.cppEngineType, sp, errorMessage);
if (!m_cppEngine) {
*errorMessage = tr("The slave debugging engine required for combined QML/C++-Debugging could not be created: %1").arg(*errorMessage);
return;
@@ -497,8 +506,8 @@ void QmlCppEngine::slaveEngineStateChanged
break;
}
case EngineSetupRequested: {
- // set by queueSetupEngine()
- QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
+ // Set by queueSetupEngine()
+ CHECK_STATE(EngineSetupRequested);
break;
}
case EngineSetupFailed: {
@@ -511,8 +520,8 @@ void QmlCppEngine::slaveEngineStateChanged
break;
}
case InferiorSetupRequested: {
- // set by queueSetupInferior()
- QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
+ // Set by queueSetupInferior()
+ CHECK_STATE(InferiorSetupRequested);
break;
}
case InferiorSetupFailed: {
@@ -539,20 +548,20 @@ void QmlCppEngine::slaveEngineStateChanged
break;
}
case InferiorRunRequested: {
- // might be set already by notifyInferiorRunRequested()
- QTC_ASSERT(state() == InferiorRunRequested
- || state() == InferiorStopOk, qDebug() << state());
- if (state() != InferiorRunRequested)
+ // Might be set already by notifyInferiorRunRequested()
+ if (state() != InferiorRunRequested) {
+ CHECK_STATE(InferiorStopOk);
notifyInferiorRunRequested();
+ }
break;
}
case InferiorRunOk: {
- QTC_ASSERT(state() == EngineRunRequested
- || state() == InferiorRunRequested, qDebug() << state());
if (state() == EngineRunRequested)
notifyEngineRunAndInferiorRunOk();
else if (state() == InferiorRunRequested)
notifyInferiorRunOk();
+ else
+ QTC_ASSERT(false, qDebug() << state());
if (qmlEngine()->state() == InferiorStopOk) {
// track qml engine again
@@ -569,17 +578,14 @@ void QmlCppEngine::slaveEngineStateChanged
}
case InferiorStopRequested: {
if (m_activeEngine == cppEngine()) {
- // might be set by doInterruptInferior()
- QTC_ASSERT(state() == InferiorStopRequested
- || state() == InferiorRunOk, qDebug() << state());
- if (state() == InferiorRunOk)
+ if (state() == InferiorRunOk) {
setState(InferiorStopRequested);
+ } else {
+ // Might be set by doInterruptInferior()
+ CHECK_STATE(InferiorStopRequested);
+ }
} else {
- // we're debugging qml, but got an interrupt, or abort
- QTC_ASSERT(state() == InferiorRunOk
- || state() == InferiorStopOk
- || state() == InferiorRunRequested, qDebug() << state());
-
+ // We're debugging qml, but got an interrupt, or abort
if (state() == InferiorRunOk) {
setState(InferiorStopRequested);
} else if (state() == InferiorStopOk) {
@@ -589,6 +595,8 @@ void QmlCppEngine::slaveEngineStateChanged
} else if (state() == InferiorRunRequested) {
notifyInferiorRunOk();
setState(InferiorStopRequested);
+ } else {
+ QTC_ASSERT(false, qDebug() << state());
}
// now track cpp engine
setActiveEngine(m_cppEngine);
@@ -613,12 +621,6 @@ void QmlCppEngine::slaveEngineStateChanged
showStatusMessage(tr("C++ debugger activated"));
setActiveEngine(m_cppEngine);
}
-
- QTC_ASSERT(state() == InferiorStopRequested
- || state() == InferiorRunRequested
- || state() == EngineRunRequested
- || state() == InferiorRunOk
- || state() == InferiorStopOk, qDebug() << state());
switch (state()) {
case InferiorStopRequested:
EDEBUG("... CPP ENGINE STOPPED EXPECTEDLY");
@@ -636,13 +638,14 @@ void QmlCppEngine::slaveEngineStateChanged
// can happen if qml engine was active
notifyInferiorRunFailed();
default:
+ CHECK_STATE(InferiorStopOk);
break;
}
}
break;
}
case InferiorStopFailed: {
- QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state());
+ CHECK_STATE(InferiorStopRequested);
notifyInferiorStopFailed();
break;
}
@@ -653,16 +656,17 @@ void QmlCppEngine::slaveEngineStateChanged
break;
}
case InferiorShutdownRequested: {
- // might be set by queueShutdownInferior() already
- QTC_ASSERT(state() == InferiorShutdownRequested
- || state() == InferiorStopOk, qDebug() << state());
- if (state() == InferiorStopOk)
+ if (state() == InferiorStopOk) {
setState(InferiorShutdownRequested);
+ } else {
+ // might be set by queueShutdownInferior() already
+ CHECK_STATE(InferiorShutdownRequested);
+ }
qmlEngine()->quitDebugger();
break;
}
case InferiorShutdownFailed: {
- QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << state());
+ CHECK_STATE(InferiorShutdownRequested);
notifyInferiorShutdownFailed();
break;
}
@@ -677,22 +681,22 @@ void QmlCppEngine::slaveEngineStateChanged
}
case EngineShutdownRequested: {
// set by queueShutdownEngine()
- QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
+ CHECK_STATE(EngineShutdownRequested);
break;
}
case EngineShutdownFailed: {
- QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
+ CHECK_STATE(EngineShutdownRequested);
notifyEngineShutdownFailed();
break;
}
case EngineShutdownOk: {
- QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
+ CHECK_STATE(EngineShutdownRequested);
notifyEngineShutdownOk();
break;
}
case DebuggerFinished: {
// set by queueFinishDebugger()
- QTC_ASSERT(state() == DebuggerFinished, qDebug() << state());
+ CHECK_STATE(DebuggerFinished);
break;
}
}
@@ -714,19 +718,17 @@ void QmlCppEngine::slaveEngineStateChanged
setActiveEngine(m_qmlEngine);
}
- QTC_ASSERT(state() == InferiorRunOk
- || state() == InferiorStopRequested
- || state() == InferiorShutdownRequested, qDebug() << state());
-
if (state() == InferiorRunOk)
notifyInferiorSpontaneousStop();
else if (state() == InferiorStopRequested)
notifyInferiorStopOk();
+ else
+ CHECK_STATE(InferiorShutdownRequested);
}
} else if (newState == InferiorRunOk) {
if (m_activeEngine == qmlEngine()) {
- QTC_ASSERT(state() == InferiorRunRequested, qDebug() << state());
+ CHECK_STATE(InferiorRunRequested);
notifyInferiorRunOk();
}
}
@@ -773,11 +775,6 @@ void QmlCppEngine::debugLastCommand()
m_cppEngine->debugLastCommand();
}
-DebuggerEngine *QmlCppEngine::cppEngine() const
-{
- return m_cppEngine;
-}
-
DebuggerEngine *QmlCppEngine::qmlEngine() const
{
return m_qmlEngine;
diff --git a/src/plugins/debugger/qml/qmlcppengine.h b/src/plugins/debugger/qml/qmlcppengine.h
index 898803ee69..4546f177ee 100644
--- a/src/plugins/debugger/qml/qmlcppengine.h
+++ b/src/plugins/debugger/qml/qmlcppengine.h
@@ -84,7 +84,7 @@ public:
void assignValueInDebugger(const WatchData *data,
const QString &expr, const QVariant &value);
- DebuggerEngine *cppEngine() const;
+ DebuggerEngine *cppEngine() { return m_cppEngine; }
DebuggerEngine *qmlEngine() const;
void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result);
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 7a5910bcf3..322c7b7c78 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -621,7 +621,9 @@ bool WatchItem::canFetchMore() const
void WatchItem::fetchMore()
{
- QTC_ASSERT(!fetchTriggered, return);
+ if (fetchTriggered)
+ return;
+
watchModel()->m_expandedINames.insert(d.iname);
fetchTriggered = true;
if (children().isEmpty()) {
@@ -1246,9 +1248,15 @@ void WatchModel::insertItem(WatchItem *item)
void WatchModel::reexpandItems()
{
foreach (const QByteArray &iname, m_expandedINames) {
- WatchItem *item = findItem(iname);
- emit itemIsExpanded(indexFromItem(item));
- emit inameIsExpanded(iname);
+ if (WatchItem *item = findItem(iname)) {
+ emit itemIsExpanded(indexFromItem(item));
+ emit inameIsExpanded(iname);
+ } else {
+ // Can happen. We might have stepped into another frame
+ // not containing that iname, but we still like to
+ // remember the expanded state of iname in case we step
+ // out of the frame again.
+ }
}
}
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index 2ea8632e58..33cc5be3af 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -744,9 +744,12 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
actSelectWidgetToWatch.setEnabled(canHandleWatches && canInsertWatches
&& engine->hasCapability(WatchWidgetsCapability));
+ bool canAddWatches = canHandleWatches && !exp.isEmpty();
+ // Suppress for top-level watchers.
+ if (m_type == WatchersType && mi0.parent().isValid() && !mi0.parent().parent().isValid())
+ canAddWatches = false;
QAction actWatchExpression(addWatchActionText(exp), 0);
- actWatchExpression.setEnabled(
- canHandleWatches && !exp.isEmpty() && m_type == LocalsType);
+ actWatchExpression.setEnabled(canAddWatches);
// Can remove watch if engine can handle it or session engine.
QModelIndex p = mi0;
diff --git a/src/plugins/designer/README.txt b/src/plugins/designer/README.txt
index bc6108425b..51a274bfbf 100644
--- a/src/plugins/designer/README.txt
+++ b/src/plugins/designer/README.txt
@@ -45,11 +45,3 @@ designer's internal file watcher updates the changes to qrc files silently.
A call to setResourceEditingEnabled(false) removes the edit resources action
form resource browser in designer
-
-Building
---------
-
-The plugin accesses some private headers of Qt Designer 4.5.
-Copies of them are located in qt_private to achieve a clean build
-from a standard Qt distribution. The script syncqtheader.sh
-can be used to update them.
diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp
index 36322b33f6..daeff86169 100644
--- a/src/plugins/designer/formeditorplugin.cpp
+++ b/src/plugins/designer/formeditorplugin.cpp
@@ -43,18 +43,22 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/designmode.h>
#include <cpptools/cpptoolsconstants.h>
#include <projectexplorer/jsonwizard/jsonwizardfactory.h>
#include <utils/mimetypes/mimedatabase.h>
-#
+
+#include <QAction>
#include <QApplication>
#include <QDebug>
#include <QFileInfo>
#include <QLibraryInfo>
+#include <QMenu>
#include <QTranslator>
#include <QtPlugin>
diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp
index 5231896b32..c46de4b52f 100644
--- a/src/plugins/designer/formeditorw.cpp
+++ b/src/plugins/designer/formeditorw.cpp
@@ -42,6 +42,7 @@
#include <coreplugin/editortoolbar.h>
#include <coreplugin/designmode.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
#include <coreplugin/helpmanager.h>
@@ -67,6 +68,7 @@
#include <QApplication>
#include <QCursor>
#include <QDockWidget>
+#include <QMenu>
#include <QMessageBox>
#include <QKeySequence>
#include <QPrintDialog>
diff --git a/src/plugins/designer/formeditorw.h b/src/plugins/designer/formeditorw.h
index 00fd5494b4..42dcefe82b 100644
--- a/src/plugins/designer/formeditorw.h
+++ b/src/plugins/designer/formeditorw.h
@@ -33,14 +33,17 @@
#include "designerconstants.h"
-#include <coreplugin/icontext.h>
-#include <coreplugin/dialogs/ioptionspage.h>
+#include <QObject>
QT_BEGIN_NAMESPACE
class QDesignerFormEditorInterface;
QT_END_NAMESPACE
-namespace Core { class IEditor; }
+namespace Core {
+class IEditor;
+class IOptionsPage;
+}
+
namespace SharedTools { class WidgetHost; }
namespace Designer {
diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp
index 7dfdaa4396..4bf4ddea84 100644
--- a/src/plugins/designer/formwindoweditor.cpp
+++ b/src/plugins/designer/formwindoweditor.cpp
@@ -36,6 +36,7 @@
#include <coreplugin/coreconstants.h>
#include <texteditor/textdocument.h>
+#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <QBuffer>
diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h
index 7b8c143930..2e5251c128 100644
--- a/src/plugins/designer/formwindoweditor.h
+++ b/src/plugins/designer/formwindoweditor.h
@@ -32,7 +32,6 @@
#define FORMWINDOWEDITOR_H
#include "designer_export.h"
-#include <coreplugin/editormanager/ieditor.h>
#include <texteditor/texteditor.h>
namespace Designer {
diff --git a/src/plugins/designer/formwindowfile.cpp b/src/plugins/designer/formwindowfile.cpp
index 082c3f6462..cb6d053774 100644
--- a/src/plugins/designer/formwindowfile.cpp
+++ b/src/plugins/designer/formwindowfile.cpp
@@ -32,6 +32,7 @@
#include "designerconstants.h"
#include "resourcehandler.h"
+#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <QApplication>
diff --git a/src/plugins/designer/qt_private/abstractnewformwidget_p.h b/src/plugins/designer/qt_private/abstractnewformwidget_p.h
deleted file mode 100644
index 256257e368..0000000000
--- a/src/plugins/designer/qt_private/abstractnewformwidget_p.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef ABSTRACTNEWFORMWIDGET_H
-#define ABSTRACTNEWFORMWIDGET_H
-
-#include <sdk_global.h>
-
-#include <QWidget>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QDesignerFormEditorInterface;
-
-class QDESIGNER_SDK_EXPORT QDesignerNewFormWidgetInterface : public QWidget
-{
- Q_DISABLE_COPY(QDesignerNewFormWidgetInterface)
- Q_OBJECT
-public:
- explicit QDesignerNewFormWidgetInterface(QWidget *parent = 0);
- virtual ~QDesignerNewFormWidgetInterface();
-
- virtual bool hasCurrentTemplate() const = 0;
- virtual QString currentTemplate(QString *errorMessage = 0) = 0;
-
- static QDesignerNewFormWidgetInterface *createNewFormWidget(QDesignerFormEditorInterface *core, QWidget *parent = 0);
-
-Q_SIGNALS:
- void templateActivated();
- void currentTemplateChanged(bool templateSelected);
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // ABSTRACTNEWFORMWIDGET_H
diff --git a/src/plugins/designer/qt_private/abstractoptionspage_p.h b/src/plugins/designer/qt_private/abstractoptionspage_p.h
deleted file mode 100644
index 570422c4dc..0000000000
--- a/src/plugins/designer/qt_private/abstractoptionspage_p.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef ABSTRACTOPTIONSPAGE_P_H
-#define ABSTRACTOPTIONSPAGE_P_H
-
-#include <sdk_global.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QString;
-class QWidget;
-
-class QDESIGNER_SDK_EXPORT QDesignerOptionsPageInterface
-{
-public:
- virtual ~QDesignerOptionsPageInterface() {}
- virtual QString name() const = 0;
- virtual QWidget *createPage(QWidget *parent) = 0;
- virtual void apply() = 0;
- virtual void finish() = 0;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // ABSTRACTOPTIONSPAGE_P_H
diff --git a/src/plugins/designer/qt_private/abstractsettings_p.h b/src/plugins/designer/qt_private/abstractsettings_p.h
deleted file mode 100644
index 0e147225d1..0000000000
--- a/src/plugins/designer/qt_private/abstractsettings_p.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef ABSTRACTSETTINGS_P_H
-#define ABSTRACTSETTINGS_P_H
-
-#include <sdk_global.h>
-
-#include <QVariant>
-
-QT_BEGIN_NAMESPACE
-
-class QString;
-
-/*!
- To be implemented by IDEs that want to control the way designer retrieves/stores its settings.
- */
-class QDESIGNER_SDK_EXPORT QDesignerSettingsInterface
-{
-public:
- virtual ~QDesignerSettingsInterface() {}
-
- virtual void beginGroup(const QString &prefix) = 0;
- virtual void endGroup() = 0;
-
- virtual bool contains(const QString &key) const = 0;
- virtual void setValue(const QString &key, const QVariant &value) = 0;
- virtual QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const = 0;
- virtual void remove(const QString &key) = 0;
-};
-
-QT_END_NAMESPACE
-
-#endif // ABSTRACTSETTINGS_P_H
diff --git a/src/plugins/designer/qt_private/formwindowbase_p.h b/src/plugins/designer/qt_private/formwindowbase_p.h
deleted file mode 100644
index 0924cda63f..0000000000
--- a/src/plugins/designer/qt_private/formwindowbase_p.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef FORMWINDOWBASE_H
-#define FORMWINDOWBASE_H
-
-#include "shared_global_p.h"
-
-#include <QDesignerFormWindowInterface>
-
-#include <QVariantMap>
-#include <QList>
-
-QT_BEGIN_NAMESPACE
-
-class QDesignerDnDItemInterface;
-class QMenu;
-class QtResourceSet;
-class QDesignerPropertySheet;
-
-namespace qdesigner_internal {
-
-class QEditorFormBuilder;
-class DeviceProfile;
-class Grid;
-
-class DesignerPixmapCache;
-class DesignerIconCache;
-class FormWindowBasePrivate;
-
-class QDESIGNER_SHARED_EXPORT FormWindowBase: public QDesignerFormWindowInterface
-{
- Q_OBJECT
-public:
- enum HighlightMode { Restore, Highlight };
- enum SaveResourcesBehaviour { SaveAll, SaveOnlyUsedQrcFiles, DontSaveQrcFiles };
-
- explicit FormWindowBase(QDesignerFormEditorInterface *core, QWidget *parent = 0, Qt::WindowFlags flags = 0);
- virtual ~FormWindowBase();
-
- QVariantMap formData();
- void setFormData(const QVariantMap &vm);
-
- // Return contents without warnings. Should be 'contents(bool quiet)'
- QString fileContents() const;
-
- // Return the widget containing the form. This is used to
- // apply embedded design settings to that are inherited (for example font).
- // These are meant to be applied to the form only and not to the other editors
- // in the widget stack.
- virtual QWidget *formContainer() const = 0;
-
- // Deprecated
- virtual QPoint grid() const;
-
- // Deprecated
- virtual void setGrid(const QPoint &grid);
-
- virtual bool hasFeature(Feature f) const;
- virtual Feature features() const;
- virtual void setFeatures(Feature f);
-
- const Grid &designerGrid() const;
- void setDesignerGrid(const Grid& grid);
-
- bool hasFormGrid() const;
- void setHasFormGrid(bool b);
-
- bool gridVisible() const;
-
- SaveResourcesBehaviour saveResourcesBehaviour() const;
- void setSaveResourcesBehaviour(SaveResourcesBehaviour behaviour);
-
- static const Grid &defaultDesignerGrid();
- static void setDefaultDesignerGrid(const Grid& grid);
-
- // Overwrite to initialize and return a full popup menu for a managed widget
- virtual QMenu *initializePopupMenu(QWidget *managedWidget);
- // Helper to create a basic popup menu from task menu extensions (internal/public)
- static QMenu *createExtensionTaskMenu(QDesignerFormWindowInterface *fw, QObject *o, bool trailingSeparator = true);
-
- virtual bool dropWidgets(const QList<QDesignerDnDItemInterface*> &item_list, QWidget *target,
- const QPoint &global_mouse_pos) = 0;
-
- // Helper to find the widget at the mouse position with some flags.
- enum WidgetUnderMouseMode { FindSingleSelectionDropTarget, FindMultiSelectionDropTarget };
- QWidget *widgetUnderMouse(const QPoint &formPos, WidgetUnderMouseMode m);
-
- virtual QWidget *widgetAt(const QPoint &pos) = 0;
- virtual QWidget *findContainer(QWidget *w, bool excludeLayout) const = 0;
-
- void deleteWidgetList(const QWidgetList &widget_list);
-
- virtual void highlightWidget(QWidget *w, const QPoint &pos, HighlightMode mode = Highlight) = 0;
-
- enum PasteMode { PasteAll, PasteActionsOnly };
- virtual void paste(PasteMode pasteMode) = 0;
-
- // Factory method to create a form builder
- virtual QEditorFormBuilder *createFormBuilder() = 0;
-
- virtual bool blockSelectionChanged(bool blocked) = 0;
- virtual void emitSelectionChanged() = 0;
-
- DesignerPixmapCache *pixmapCache() const;
- DesignerIconCache *iconCache() const;
- QtResourceSet *resourceSet() const;
- void setResourceSet(QtResourceSet *resourceSet);
- void addReloadableProperty(QDesignerPropertySheet *sheet, int index);
- void removeReloadableProperty(QDesignerPropertySheet *sheet, int index);
- void addReloadablePropertySheet(QDesignerPropertySheet *sheet, QObject *object);
- void removeReloadablePropertySheet(QDesignerPropertySheet *sheet);
- void reloadProperties();
-
- void emitWidgetRemoved(QWidget *w);
- void emitObjectRemoved(QObject *o);
-
- DeviceProfile deviceProfile() const;
- QString styleName() const;
- QString deviceProfileName() const;
-
- enum LineTerminatorMode {
- LFLineTerminator,
- CRLFLineTerminator,
- NativeLineTerminator =
-#if defined (Q_OS_WIN)
- CRLFLineTerminator
-#else
- LFLineTerminator
-#endif
- };
-
- void setLineTerminatorMode(LineTerminatorMode mode);
- LineTerminatorMode lineTerminatorMode() const;
-
- // Connect the 'activated' (doubleclicked) signal of the form window to a
- // slot triggering the default action (of the task menu)
- static void setupDefaultAction(QDesignerFormWindowInterface *fw);
-
-public slots:
- void resourceSetActivated(QtResourceSet *resourceSet, bool resourceSetChanged);
-
-private slots:
- void triggerDefaultAction(QWidget *w);
-
-private:
- void syncGridFeature();
-
- FormWindowBasePrivate *m_d;
-};
-
-} // namespace qdesigner_internal
-
-QT_END_NAMESPACE
-
-#endif // FORMWINDOWBASE_H
diff --git a/src/plugins/designer/qt_private/iconloader_p.h b/src/plugins/designer/qt_private/iconloader_p.h
deleted file mode 100644
index 777aa3dd45..0000000000
--- a/src/plugins/designer/qt_private/iconloader_p.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef ICONLOADER_H
-#define ICONLOADER_H
-
-#include "shared_global_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QString;
-class QIcon;
-
-namespace qdesigner_internal {
-
-QDESIGNER_SHARED_EXPORT QIcon createIconSet(const QString &name);
-QDESIGNER_SHARED_EXPORT QIcon emptyIcon();
-
-} // namespace qdesigner_internal
-
-QT_END_NAMESPACE
-
-#endif // ICONLOADER_H
diff --git a/src/plugins/designer/qt_private/pluginmanager_p.h b/src/plugins/designer/qt_private/pluginmanager_p.h
deleted file mode 100644
index 80f45d4de0..0000000000
--- a/src/plugins/designer/qt_private/pluginmanager_p.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef PLUGINMANAGER_H
-#define PLUGINMANAGER_H
-
-#include "shared_global_p.h"
-#include "shared_enums_p.h"
-
-#include <QSharedDataPointer>
-#include <QMap>
-#include <QPair>
-#include <QStringList>
-
-QT_BEGIN_NAMESPACE
-
-class QDesignerFormEditorInterface;
-class QDesignerCustomWidgetInterface;
-class QDesignerPluginManagerPrivate;
-
-class QDesignerCustomWidgetSharedData;
-
-/* Information contained in the Dom XML of a custom widget. */
-class QDESIGNER_SHARED_EXPORT QDesignerCustomWidgetData {
-public:
- // StringPropertyType: validation mode and translatable flag.
- typedef QPair<qdesigner_internal::TextPropertyValidationMode, bool> StringPropertyType;
-
- explicit QDesignerCustomWidgetData(const QString &pluginPath = QString());
-
- enum ParseResult { ParseOk, ParseWarning, ParseError };
- ParseResult parseXml(const QString &xml, const QString &name, QString *errorMessage);
-
- QDesignerCustomWidgetData(const QDesignerCustomWidgetData&);
- QDesignerCustomWidgetData& operator=(const QDesignerCustomWidgetData&);
- ~QDesignerCustomWidgetData();
-
- bool isNull() const;
-
- QString pluginPath() const;
-
- // Data as parsed from the widget's domXML().
- QString xmlClassName() const;
- // Optional. The language the plugin is supposed to be used with.
- QString xmlLanguage() const;
- // Optional. method used to add pages to a container with a container extension
- QString xmlAddPageMethod() const;
- // Optional. Base class
- QString xmlExtends() const;
- // Optional. The name to be used in the widget box.
- QString xmlDisplayName() const;
- // Type of a string property
- bool xmlStringPropertyType(const QString &name, StringPropertyType *type) const;
-
-private:
- QSharedDataPointer<QDesignerCustomWidgetSharedData> m_d;
-};
-
-class QDESIGNER_SHARED_EXPORT QDesignerPluginManager: public QObject
-{
- Q_OBJECT
-public:
- typedef QList<QDesignerCustomWidgetInterface*> CustomWidgetList;
-
- explicit QDesignerPluginManager(QDesignerFormEditorInterface *core);
- virtual ~QDesignerPluginManager();
-
- QDesignerFormEditorInterface *core() const;
-
- QObject *instance(const QString &plugin) const;
-
- QStringList registeredPlugins() const;
-
- QStringList findPlugins(const QString &path);
-
- QStringList pluginPaths() const;
- void setPluginPaths(const QStringList &plugin_paths);
-
- QStringList disabledPlugins() const;
- void setDisabledPlugins(const QStringList &disabled_plugins);
-
- QStringList failedPlugins() const;
- QString failureReason(const QString &pluginName) const;
-
- QObjectList instances() const;
-
- CustomWidgetList registeredCustomWidgets() const;
- QDesignerCustomWidgetData customWidgetData(QDesignerCustomWidgetInterface *w) const;
- QDesignerCustomWidgetData customWidgetData(const QString &className) const;
-
- bool registerNewPlugins();
-
-public slots:
- bool syncSettings();
- void ensureInitialized();
-
-private:
- void updateRegisteredPlugins();
- void registerPath(const QString &path);
- void registerPlugin(const QString &plugin);
-
-private:
- static QStringList defaultPluginPaths();
-
- QDesignerPluginManagerPrivate *m_d;
-};
-
-QT_END_NAMESPACE
-
-#endif // PLUGINMANAGER_H
diff --git a/src/plugins/designer/qt_private/qdesigner_formwindowmanager_p.h b/src/plugins/designer/qt_private/qdesigner_formwindowmanager_p.h
deleted file mode 100644
index 3f4bf92519..0000000000
--- a/src/plugins/designer/qt_private/qdesigner_formwindowmanager_p.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef QDESIGNER_FORMWINDOWMANAGER_H
-#define QDESIGNER_FORMWINDOWMANAGER_H
-
-#include "shared_global_p.h"
-#include <QDesignerFormWindowManagerInterface>
-
-QT_BEGIN_NAMESPACE
-
-namespace qdesigner_internal {
-
-class PreviewManager;
-
-//
-// Convenience functions to manage form previews (ultimately forwarded to PreviewManager).
-//
-class QDESIGNER_SHARED_EXPORT QDesignerFormWindowManager
- : public QDesignerFormWindowManagerInterface
-{
- Q_OBJECT
-public:
- explicit QDesignerFormWindowManager(QObject *parent = 0);
- virtual ~QDesignerFormWindowManager();
-
- virtual QAction *actionDefaultPreview() const;
- virtual QActionGroup *actionGroupPreviewInStyle() const;
- virtual QAction *actionShowFormWindowSettingsDialog() const;
-
- virtual QPixmap createPreviewPixmap(QString *errorMessage) = 0;
-
- virtual PreviewManager *previewManager() const = 0;
-
-Q_SIGNALS:
- void formWindowSettingsChanged(QDesignerFormWindowInterface *fw);
-
-public Q_SLOTS:
- virtual void closeAllPreviews() = 0;
- void aboutPlugins();
-
-private:
- void *m_unused;
-};
-
-} // namespace qdesigner_internal
-
-QT_END_NAMESPACE
-
-#endif // QDESIGNER_FORMWINDOWMANAGER_H
diff --git a/src/plugins/designer/qt_private/qdesigner_integration_p.h b/src/plugins/designer/qt_private/qdesigner_integration_p.h
deleted file mode 100644
index 714a6f2654..0000000000
--- a/src/plugins/designer/qt_private/qdesigner_integration_p.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef QDESIGNER_INTEGRATION_H
-#define QDESIGNER_INTEGRATION_H
-
-#include "shared_global_p.h"
-#include <QDesignerIntegrationInterface>
-
-#include <QObject>
-
-QT_BEGIN_NAMESPACE
-
-class QDesignerFormEditorInterface;
-class QDesignerFormWindowInterface;
-class QDesignerResourceBrowserInterface;
-
-class QVariant;
-class QWidget;
-
-namespace qdesigner_internal {
-
-struct Selection;
-class QDesignerIntegrationPrivate;
-
-class QDESIGNER_SHARED_EXPORT QDesignerIntegration: public QDesignerIntegrationInterface
-{
- Q_OBJECT
-public:
- explicit QDesignerIntegration(QDesignerFormEditorInterface *core, QObject *parent = 0);
- virtual ~QDesignerIntegration();
-
- static void requestHelp(const QDesignerFormEditorInterface *core, const QString &manual, const QString &document);
-
- virtual QWidget *containerWindow(QWidget *widget) const;
-
- // Load plugins into widget database and factory.
- static void initializePlugins(QDesignerFormEditorInterface *formEditor);
- void emitObjectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object,
- const QString &newName, const QString &oldName);
- void emitNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList &parameterNames);
- void emitNavigateToSlot(const QString &slotSignature);
-
- // Create a resource browser specific to integration. Language integration takes precedence
- virtual QDesignerResourceBrowserInterface *createResourceBrowser(QWidget *parent = 0);
-
- enum ResourceFileWatcherBehaviour {
- NoWatcher,
- ReloadSilently,
- PromptAndReload
- };
-
- ResourceFileWatcherBehaviour resourceFileWatcherBehaviour() const;
- bool isResourceEditingEnabled() const;
- bool isSlotNavigationEnabled() const;
-
- QString contextHelpId() const;
-
-protected:
-
- void setResourceFileWatcherBehaviour(ResourceFileWatcherBehaviour behaviour); // PromptAndReload by default
- void setResourceEditingEnabled(bool enable); // true by default
- void setSlotNavigationEnabled(bool enable); // false by default
-
-signals:
- void propertyChanged(QDesignerFormWindowInterface *formWindow, const QString &name, const QVariant &value);
- void objectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object, const QString &newName, const QString &oldName);
- void helpRequested(const QString &manual, const QString &document);
-
- void navigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList &parameterNames);
- void navigateToSlot(const QString &slotSignature);
-
-public slots:
- virtual void updateProperty(const QString &name, const QVariant &value, bool enableSubPropertyHandling);
- // Additional signals of designer property editor
- virtual void resetProperty(const QString &name);
- virtual void addDynamicProperty(const QString &name, const QVariant &value);
- virtual void removeDynamicProperty(const QString &name);
-
- virtual void updateActiveFormWindow(QDesignerFormWindowInterface *formWindow);
- virtual void setupFormWindow(QDesignerFormWindowInterface *formWindow);
- virtual void updateSelection();
- virtual void updateGeometry();
- virtual void activateWidget(QWidget *widget);
-
- void updateCustomWidgetPlugins();
-
-private slots:
- void updatePropertyPrivate(const QString &name, const QVariant &value);
-
-private:
- void initialize();
- void getSelection(Selection &s);
- QObject *propertyEditorObject();
-
- QDesignerIntegrationPrivate *m_d;
-};
-
-} // namespace qdesigner_internal
-
-QT_END_NAMESPACE
-
-#endif // QDESIGNER_INTEGRATION_H
diff --git a/src/plugins/designer/qt_private/qsimpleresource_p.h b/src/plugins/designer/qt_private/qsimpleresource_p.h
deleted file mode 100644
index e0a7fcb25e..0000000000
--- a/src/plugins/designer/qt_private/qsimpleresource_p.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef QSIMPLERESOURCE_H
-#define QSIMPLERESOURCE_H
-
-#include "shared_global_p.h"
-#include "abstractformbuilder.h"
-#include <QStringList>
-
-QT_BEGIN_NAMESPACE
-
-class DomScript;
-class DomCustomWidgets;
-class DomCustomWidget;
-class DomSlots;
-
-class QDesignerFormEditorInterface;
-
-namespace qdesigner_internal {
-
-class WidgetDataBaseItem;
-
-class QDESIGNER_SHARED_EXPORT QSimpleResource : public QAbstractFormBuilder
-{
-public:
- explicit QSimpleResource(QDesignerFormEditorInterface *core);
- virtual ~QSimpleResource();
-
- QBrush setupBrush(DomBrush *brush);
- DomBrush *saveBrush(const QBrush &brush);
-
- inline QDesignerFormEditorInterface *core() const
- { return m_core; }
-
- // Query extensions for additional data
- static void addExtensionDataToDOM(QAbstractFormBuilder *afb,
- QDesignerFormEditorInterface *core,
- DomWidget *ui_widget, QWidget *widget);
- static void applyExtensionDataFromDOM(QAbstractFormBuilder *afb,
- QDesignerFormEditorInterface *core,
- DomWidget *ui_widget, QWidget *widget,
- bool applyState);
- // Enable warnings while saving. Turn off for backups.
- static bool setWarningsEnabled(bool warningsEnabled);
- static bool warningsEnabled();
- // Return the script returned by the CustomWidget codeTemplate API
- static QString customWidgetScript(QDesignerFormEditorInterface *core, QObject *object);
- static QString customWidgetScript(QDesignerFormEditorInterface *core, const QString &className);
- static bool hasCustomWidgetScript(QDesignerFormEditorInterface *core, QObject *object);
-
- // Implementation for FormBuilder::createDomCustomWidgets() that adds
- // the custom widgets to the widget database
- static void handleDomCustomWidgets(const QDesignerFormEditorInterface *core,
- const DomCustomWidgets *dom_custom_widgets);
-
-protected:
- virtual QIcon nameToIcon(const QString &filePath, const QString &qrcPath);
- virtual QString iconToFilePath(const QIcon &pm) const;
- virtual QString iconToQrcPath(const QIcon &pm) const;
- virtual QPixmap nameToPixmap(const QString &filePath, const QString &qrcPath);
- virtual QString pixmapToFilePath(const QPixmap &pm) const;
- virtual QString pixmapToQrcPath(const QPixmap &pm) const;
-
- enum ScriptSource { ScriptDesigner, ScriptExtension, ScriptCustomWidgetPlugin };
- static DomScript*createScript(const QString &script, ScriptSource source);
- typedef QList<DomScript*> DomScripts;
- static void addScript(const QString &script, ScriptSource source, DomScripts &domScripts);
-
- static bool addFakeMethods(const DomSlots *domSlots, QStringList &fakeSlots, QStringList &fakeSignals);
-
-private:
- static void addCustomWidgetsToWidgetDatabase(const QDesignerFormEditorInterface *core,
- QList<DomCustomWidget*>& custom_widget_list);
- static void addFakeMethodsToWidgetDataBase(const DomCustomWidget *domCustomWidget, WidgetDataBaseItem *item);
-
- static bool m_warningsEnabled;
- QDesignerFormEditorInterface *m_core;
-};
-
-// Contents of clipboard for formbuilder copy and paste operations
-// (Actions and widgets)
-struct QDESIGNER_SHARED_EXPORT FormBuilderClipboard {
- typedef QList<QAction*> ActionList;
-
- FormBuilderClipboard() {}
- FormBuilderClipboard(QWidget *w);
-
- bool empty() const;
-
- QWidgetList m_widgets;
- ActionList m_actions;
-};
-
-// Base class for a form builder used in the editor that
-// provides copy and paste.(move into base interface)
-class QDESIGNER_SHARED_EXPORT QEditorFormBuilder : public QSimpleResource
-{
-public:
- explicit QEditorFormBuilder(QDesignerFormEditorInterface *core) : QSimpleResource(core) {}
-
- virtual bool copy(QIODevice *dev, const FormBuilderClipboard &selection) = 0;
- virtual DomUI *copy(const FormBuilderClipboard &selection) = 0;
-
- // A widget parent needs to be specified, otherwise, the widget factory cannot locate the form window via parent
- // and thus is not able to construct special widgets (QLayoutWidget).
- virtual FormBuilderClipboard paste(DomUI *ui, QWidget *widgetParent, QObject *actionParent = 0) = 0;
- virtual FormBuilderClipboard paste(QIODevice *dev, QWidget *widgetParent, QObject *actionParent = 0) = 0;
-};
-
-} // namespace qdesigner_internal
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/designer/qt_private/qtresourcemodel_p.h b/src/plugins/designer/qt_private/qtresourcemodel_p.h
deleted file mode 100644
index 3a40d36445..0000000000
--- a/src/plugins/designer/qt_private/qtresourcemodel_p.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef QTRESOURCEMODEL_H
-#define QTRESOURCEMODEL_H
-
-#include "shared_global_p.h"
-#include <QMap>
-#include <QObject>
-#include <QScopedPointer>
-
-QT_BEGIN_NAMESPACE
-
-class QtResourceModel;
-
-class QDESIGNER_SHARED_EXPORT QtResourceSet // one instance per one form
-{
-public:
- QStringList activeQrcPaths() const;
-
- // activateQrcPaths(): if this QtResourceSet is active it emits resourceSetActivated();
- // otherwise only in case if active QtResource set contains one of
- // paths which was marked as modified by this resource set, the signal
- // is emitted (with reload = true);
- // If new path appears on the list it is automatically added to
- // loaded list of QtResourceModel. In addition it is marked as modified in case
- // QtResourceModel didn't contain the path.
- // If some path is removed from that list (and is not used in any other
- // resource set) it is automatically unloaded. The removed file can also be
- // marked as modified (later when another resource set which contains
- // removed path is activated will be reloaded)
- void activateQrcPaths(const QStringList &paths, int *errorCount = 0, QString *errorMessages = 0);
-
- bool isModified(const QString &path) const; // for all paths in resource model (redundant here, maybe it should be removed from here)
- void setModified(const QString &path); // for all paths in resource model (redundant here, maybe it should be removed from here)
-private:
- QtResourceSet();
- QtResourceSet(QtResourceModel *model);
- ~QtResourceSet();
- friend class QtResourceModel;
-
- QScopedPointer<class QtResourceSetPrivate> d_ptr;
- Q_DECLARE_PRIVATE(QtResourceSet)
- Q_DISABLE_COPY(QtResourceSet)
-};
-
-class QDESIGNER_SHARED_EXPORT QtResourceModel : public QObject // one instance per whole designer
-{
- Q_OBJECT
-public:
- QtResourceModel(QObject *parent = 0);
- ~QtResourceModel();
-
- QStringList loadedQrcFiles() const;
- bool isModified(const QString &path) const; // only for paths which are on loadedQrcFiles() list
- void setModified(const QString &path); // only for paths which are on loadedQrcPaths() list
-
- QList<QtResourceSet *> resourceSets() const;
-
- QtResourceSet *currentResourceSet() const;
- void setCurrentResourceSet(QtResourceSet *resourceSet, int *errorCount = 0, QString *errorMessages = 0);
-
- QtResourceSet *addResourceSet(const QStringList &paths);
- void removeResourceSet(QtResourceSet *resourceSet);
-
- void reload(const QString &path, int *errorCount = 0, QString *errorMessages = 0);
- void reload(int *errorCount = 0, QString *errorMessages = 0);
-
- // Contents of the current resource set (content file to qrc path)
- QMap<QString, QString> contents() const;
- // Find the qrc file belonging to the contained file (from current resource set)
- QString qrcPath(const QString &file) const;
-
- void setWatcherEnabled(bool enable);
- bool isWatcherEnabled() const;
-
- void setWatcherEnabled(const QString &path, bool enable);
- bool isWatcherEnabled(const QString &path);
-
-signals:
- void resourceSetActivated(QtResourceSet *resourceSet, bool resourceSetChanged); // resourceSetChanged since last time it was activated!
- void qrcFileModifiedExternally(const QString &path);
-
-private:
- friend class QtResourceSet;
-
- QScopedPointer<class QtResourceModelPrivate> d_ptr;
- Q_DECLARE_PRIVATE(QtResourceModel)
- Q_DISABLE_COPY(QtResourceModel)
-
- Q_PRIVATE_SLOT(d_func(), void slotFileChanged(const QString &))
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/designer/qt_private/shared_enums_p.h b/src/plugins/designer/qt_private/shared_enums_p.h
deleted file mode 100644
index ea58500bd0..0000000000
--- a/src/plugins/designer/qt_private/shared_enums_p.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef SHAREDENUMS_H
-#define SHAREDENUMS_H
-
-#include "shared_global_p.h"
-
-QT_BEGIN_NAMESPACE
-
-namespace qdesigner_internal {
-
- // Validation mode of text property line edits
- enum TextPropertyValidationMode {
- // Allow for multiline editing using literal "\n".
- ValidationMultiLine,
- // Allow for HTML rich text including multiline editing using literal "\n".
- ValidationRichText,
- // Validate a stylesheet
- ValidationStyleSheet,
- // Single line mode, suppresses newlines
- ValidationSingleLine,
- // Allow only for identifier characters
- ValidationObjectName,
- // Allow only for identifier characters and colons
- ValidationObjectNameScope,
- // URL
- ValidationURL
- };
-
- // Container types
- enum ContainerType {
- // A container with pages, at least one of which one must always be present (for example, QTabWidget)
- PageContainer,
- // Mdi type container. All pages may be deleted, no concept of page order
- MdiContainer,
- // Wizard container
- WizardContainer
- };
-
- enum AuxiliaryItemDataRoles {
- // item->flags while being edited
- ItemFlagsShadowRole = 0x13370551
- };
-
-}
-
-QT_END_NAMESPACE
-
-#endif // SHAREDENUMS_H
diff --git a/src/plugins/designer/qt_private/shared_global_p.h b/src/plugins/designer/qt_private/shared_global_p.h
deleted file mode 100644
index 089f6740fd..0000000000
--- a/src/plugins/designer/qt_private/shared_global_p.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists for the convenience
-// of Qt Designer. This header
-// file may change from version to version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#ifndef SHARED_GLOBAL_H
-#define SHARED_GLOBAL_H
-
-#include <qglobal.h>
-
-#ifdef QT_DESIGNER_STATIC
-#define QDESIGNER_SHARED_EXTERN
-#define QDESIGNER_SHARED_IMPORT
-#else
-#define QDESIGNER_SHARED_EXTERN Q_DECL_EXPORT
-#define QDESIGNER_SHARED_IMPORT Q_DECL_IMPORT
-#endif
-
-#ifndef QT_NO_SHARED_EXPORT
-# ifdef QDESIGNER_SHARED_LIBRARY
-# define QDESIGNER_SHARED_EXPORT QDESIGNER_SHARED_EXTERN
-# else
-# define QDESIGNER_SHARED_EXPORT QDESIGNER_SHARED_IMPORT
-# endif
-#else
-# define QDESIGNER_SHARED_EXPORT
-#endif
-
-#endif // SHARED_GLOBAL_H
diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp
index 79d2a6e800..c62f50d8d0 100644
--- a/src/plugins/designer/qtcreatorintegration.cpp
+++ b/src/plugins/designer/qtcreatorintegration.cpp
@@ -40,6 +40,7 @@
#include <cpptools/cppworkingcopy.h>
#include <cpptools/insertionpointlocator.h>
#include <cpptools/symbolfinder.h>
+#include <cplusplus/LookupContext.h>
#include <cplusplus/Overview.h>
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
diff --git a/src/plugins/designer/settingspage.cpp b/src/plugins/designer/settingspage.cpp
index f88aabd1eb..d1c597904f 100644
--- a/src/plugins/designer/settingspage.cpp
+++ b/src/plugins/designer/settingspage.cpp
@@ -31,6 +31,8 @@
#include "settingspage.h"
#include "formeditorw.h"
+#include <coreplugin/icontext.h>
+
#include <QDesignerOptionsPageInterface>
#include <QCoreApplication>
diff --git a/src/plugins/designer/syncqtheader.sh b/src/plugins/designer/syncqtheader.sh
deleted file mode 100755
index 1e0a56248b..0000000000
--- a/src/plugins/designer/syncqtheader.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-
-#############################################################################
-#
-# Copyright (C) 2015 The Qt Company Ltd.
-# Contact: http://www.qt.io/licensing
-#
-# This file is part of Qt Creator.
-#
-# Commercial License Usage
-# Licensees holding valid commercial Qt licenses may use this file in
-# accordance with the commercial license agreement provided with the
-# Software or, alternatively, in accordance with the terms contained in
-# a written agreement between you and The Qt Company. For licensing terms and
-# conditions see http://www.qt.io/terms-conditions. For further information
-# use the contact form at http://www.qt.io/contact-us.
-#
-# GNU Lesser General Public License Usage
-# Alternatively, this file may be used under the terms of the GNU Lesser
-# General Public License version 2.1 or version 3 as published by the Free Software
-# Foundation and appearing in the file LICENSE.LGPLv21 and LICENSE.LGPLv3 included in the
-# packaging of this file. Please review the following information to
-# ensure the GNU Lesser General Public License requirements
-# will be met: https://www.gnu.org/licenses/lgpl.html and http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-#
-# In addition, as a special exception, The Qt Company gives you certain additional
-# rights. These rights are described in The Qt Company LGPL Exception
-# version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-#
-#############################################################################
-
-# Internal utility script that synchronizes the Qt Designer private headers
-# used by the Qt Designer plugin (located in the qt_private) directory
-# with the Qt source tree pointed to by the environment variable QTDIR.
-
-REQUIRED_HEADERS="pluginmanager_p.h iconloader_p.h qdesigner_formwindowmanager_p.h formwindowbase_p.h
-abstractnewformwidget_p.h qtresourcemodel_p.h abstractoptionspage_p.h
-shared_global_p.h abstractsettings_p.h qdesigner_integration_p.h qsimpleresource_p.h shared_enums_p.h"
-
-echo Using $QTDIR
-
-syncHeader()
-{
- HDR=$1
- # Locate the Designer header: look in lib/shared or SDK
- QTHDR=$QTDIR/tools/designer/src/lib/shared/$HDR
- if [ ! -f $QTHDR ]
- then
- QTHDR=$QTDIR/tools/designer/src/lib/sdk/$HDR
- fi
- echo Syncing $QTHDR
-
- [ -f $QTHDR ] || { echo "$HDR does not exist" ; exit 1 ; }
-
- TARGET=qt_private/$HDR
-
- # Exchange license header
- head -n 28 formwindowfile.h > $TARGET || exit 1
- tail -n +41 $QTHDR >> $TARGET || exit 1
-}
-
-for H in $REQUIRED_HEADERS
-do
- syncHeader $H
-done
diff --git a/src/plugins/diffeditor/diffeditor.cpp b/src/plugins/diffeditor/diffeditor.cpp
index 6058e119f9..1b63b8f5a6 100644
--- a/src/plugins/diffeditor/diffeditor.cpp
+++ b/src/plugins/diffeditor/diffeditor.cpp
@@ -47,6 +47,7 @@
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
+#include <QAction>
#include <QStackedWidget>
#include <QToolButton>
#include <QSpinBox>
diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp
index 984931dea0..4a980d9921 100644
--- a/src/plugins/diffeditor/diffeditorplugin.cpp
+++ b/src/plugins/diffeditor/diffeditorplugin.cpp
@@ -37,6 +37,7 @@
#include "diffeditorreloader.h"
#include "differ.h"
+#include <QAction>
#include <QFileDialog>
#include <QTextCodec>
#include <QtPlugin>
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index ff23c96717..c482f0605e 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -1197,7 +1197,7 @@ bool FakeVimPluginPrivate::initialize()
Command *cmd = 0;
cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim),
INSTALL_HANDLER, globalcontext, true);
- cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? Tr::tr("Meta+V,Meta+V") : Tr::tr("Alt+V,Alt+V")));
+ cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V")));
ActionContainer *advancedMenu =
ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);
@@ -1208,7 +1208,7 @@ bool FakeVimPluginPrivate::initialize()
auto act = new QAction(this);
act->setText(Tr::tr("Execute User Action #%1").arg(i));
cmd = ActionManager::registerAction(act, base.withSuffix(i));
- cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? Tr::tr("Meta+V,%1") : Tr::tr("Alt+V,%1")).arg(i)));
+ cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i)));
connect(act, &QAction::triggered, this, [this, i] { userActionTriggered(i); });
}
diff --git a/src/plugins/genericprojectmanager/genericprojectplugin.cpp b/src/plugins/genericprojectmanager/genericprojectplugin.cpp
index 79aa8abcd2..2b784b2434 100644
--- a/src/plugins/genericprojectmanager/genericprojectplugin.cpp
+++ b/src/plugins/genericprojectmanager/genericprojectplugin.cpp
@@ -41,6 +41,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projecttree.h>
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index 7e73de3a67..42767f0d25 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -75,6 +75,8 @@
#include <QSignalMapper>
#include <QTemporaryFile>
+#include <QAction>
+#include <QMenu>
#include <QMessageBox>
#include <QPushButton>
#include <QToolButton>
@@ -672,10 +674,6 @@ GitClient::GitClient(GitSettings *settings) :
.arg(QCoreApplication::applicationPid());
}
-GitClient::~GitClient()
-{
-}
-
QString GitClient::findRepositoryForDirectory(const QString &dir) const
{
if (dir.isEmpty() || dir.endsWith(QLatin1String("/.git"))
diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h
index 6fdbe1d937..6cb337fe61 100644
--- a/src/plugins/git/gitclient.h
+++ b/src/plugins/git/gitclient.h
@@ -136,7 +136,6 @@ public:
static const char *stashNamePrefix;
explicit GitClient(GitSettings *settings);
- ~GitClient();
Utils::FileName gitExecutable(bool *ok = 0, QString *errorMessage = 0) const;
unsigned gitVersion(QString *errorMessage = 0) const;
diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp
index 794f59d799..024ecb4d94 100644
--- a/src/plugins/git/giteditor.cpp
+++ b/src/plugins/git/giteditor.cpp
@@ -242,22 +242,6 @@ void GitEditorWidget::revertChange()
sourceWorkingDirectory(), m_currentChange);
}
-void GitEditorWidget::stageDiffChunk()
-{
- const QAction *a = qobject_cast<QAction *>(sender());
- QTC_ASSERT(a, return);
- const DiffChunk chunk = qvariant_cast<DiffChunk>(a->data());
- return applyDiffChunk(chunk, false);
-}
-
-void GitEditorWidget::unstageDiffChunk()
-{
- const QAction *a = qobject_cast<QAction *>(sender());
- QTC_ASSERT(a, return);
- const DiffChunk chunk = qvariant_cast<DiffChunk>(a->data());
- return applyDiffChunk(chunk, true);
-}
-
void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, bool revert)
{
QTemporaryFile patchFile;
@@ -303,12 +287,14 @@ void GitEditorWidget::addDiffActions(QMenu *menu, const DiffChunk &chunk)
menu->addSeparator();
QAction *stageAction = menu->addAction(tr("Stage Chunk..."));
- stageAction->setData(qVariantFromValue(chunk));
- connect(stageAction, &QAction::triggered, this, &GitEditorWidget::stageDiffChunk);
+ connect(stageAction, &QAction::triggered, this, [this, chunk] {
+ applyDiffChunk(chunk, false);
+ });
QAction *unstageAction = menu->addAction(tr("Unstage Chunk..."));
- unstageAction->setData(qVariantFromValue(chunk));
- connect(unstageAction, &QAction::triggered, this, &GitEditorWidget::unstageDiffChunk);
+ connect(unstageAction, &QAction::triggered, this, [this, chunk] {
+ applyDiffChunk(chunk, true);
+ });
}
bool GitEditorWidget::open(QString *errorString, const QString &fileName, const QString &realFileName)
diff --git a/src/plugins/git/giteditor.h b/src/plugins/git/giteditor.h
index 2e385d78c3..8de4d4ebf1 100644
--- a/src/plugins/git/giteditor.h
+++ b/src/plugins/git/giteditor.h
@@ -59,8 +59,6 @@ private slots:
void resetChange();
void cherryPickChange();
void revertChange();
- void stageDiffChunk();
- void unstageDiffChunk();
void applyDiffChunk(const VcsBase::DiffChunk& chunk, bool revert);
private:
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 4c9f1b9dbd..f49ef9b6a9 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -55,6 +55,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/id.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/infobar.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
@@ -82,6 +83,7 @@
#include <QAction>
#include <QFileDialog>
+#include <QMenu>
#include <QScopedPointer>
#ifdef WITH_TESTS
diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp
index ed4a566e8e..98ca352d44 100644
--- a/src/plugins/help/helpwidget.cpp
+++ b/src/plugins/help/helpwidget.cpp
@@ -43,6 +43,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/findplaceholder.h>
diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp
index 2520d59e11..fd03c866a2 100644
--- a/src/plugins/imageviewer/imageviewer.cpp
+++ b/src/plugins/imageviewer/imageviewer.cpp
@@ -39,6 +39,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
+#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <QMap>
diff --git a/src/plugins/imageviewer/imageviewerfile.cpp b/src/plugins/imageviewer/imageviewerfile.cpp
index 3216178bf9..5e55f1b440 100644
--- a/src/plugins/imageviewer/imageviewerfile.cpp
+++ b/src/plugins/imageviewer/imageviewerfile.cpp
@@ -33,6 +33,8 @@
#include "imageviewer.h"
#include "imageviewerconstants.h"
+#include <utils/fileutils.h>
+
#include <QFileInfo>
namespace ImageViewer {
diff --git a/src/plugins/macros/texteditormacrohandler.cpp b/src/plugins/macros/texteditormacrohandler.cpp
index a05ff0a00d..6b42e0f777 100644
--- a/src/plugins/macros/texteditormacrohandler.cpp
+++ b/src/plugins/macros/texteditormacrohandler.cpp
@@ -42,6 +42,7 @@
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/id.h>
+#include <QAction>
#include <QKeyEvent>
#include <QApplication>
diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp
index 13ada03c79..1c077cde2b 100644
--- a/src/plugins/mercurial/mercurialplugin.cpp
+++ b/src/plugins/mercurial/mercurialplugin.cpp
@@ -47,6 +47,7 @@
#include <coreplugin/vcsmanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/editormanager.h>
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index aa2877116a..a269723f36 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -36,6 +36,7 @@
#include "windebuginterface.h"
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/outputwindow.h>
#include <coreplugin/find/basetextfind.h>
@@ -543,7 +544,7 @@ void AppOutputPane::enableButtons()
void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning /* = false */)
{
if (rc) {
- m_reRunButton->setEnabled(!isRunning);
+ m_reRunButton->setEnabled(!isRunning && rc->supportsReRunning());
m_reRunButton->setIcon(QIcon(rc->icon()));
m_stopAction->setEnabled(isRunning);
if (isRunning && debuggerPlugin() && rc->applicationProcessHandle().isValid()) {
diff --git a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
index fbb01fb4c1..52abe8be2c 100644
--- a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
+++ b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
@@ -139,7 +139,8 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
processFilterLineEdit = new FancyLineEdit(q);
processFilterLineEdit->setPlaceholderText(DeviceProcessesDialog::tr("Filter"));
processFilterLineEdit->setFocus(Qt::TabFocusReason);
- processFilterLineEdit->setHistoryCompleter(QLatin1String("DeviceProcessDialogFilter"));
+ processFilterLineEdit->setHistoryCompleter(QLatin1String("DeviceProcessDialogFilter"),
+ true /*restoreLastItemFromHistory*/);
processFilterLineEdit->setFiltering(true);
kitChooser->populate();
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp
index d6f3a39ad6..6a51aa6538 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.cpp
+++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp
@@ -35,6 +35,7 @@
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/editormanager.h>
diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp
index c5eb12025c..61dadc7833 100644
--- a/src/plugins/projectexplorer/gccparser.cpp
+++ b/src/plugins/projectexplorer/gccparser.cpp
@@ -88,7 +88,6 @@ void GccParser::stdError(const QString &line)
}
QRegularExpressionMatch match = m_regExpGccNames.match(lne);
-
if (match.hasMatch()) {
QString description = lne.mid(match.capturedLength());
Task::TaskType type = Task::Error;
@@ -458,12 +457,6 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString() << QString::fromLatin1("rm: cannot remove `release/moc_mainwindow.cpp': No such file or directory\n")
<< QList<Task>()
<< QString();
- QTest::newRow("ranlib false positive")
- << QString::fromLatin1("ranlib: file: libSupport.a(HashTable.o) has no symbols")
- << OutputParserTester::STDERR
- << QString() << QString::fromLatin1("ranlib: file: libSupport.a(HashTable.o) has no symbols\n")
- << QList<Task>()
- << QString();
QTest::newRow("ld: missing library")
<< QString::fromLatin1("/usr/bin/ld: cannot find -ldoesnotexist")
<< OutputParserTester::STDERR
@@ -866,6 +859,29 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
categoryCompile)
)
<< QString();
+
+ QTest::newRow("Mac: ranlib warning")
+ << QString::fromLatin1("ranlib: file: lib/libtest.a(Test0.cpp.o) has no symbols")
+ << OutputParserTester::STDERR
+ << QString() << QString()
+ << (QList<Task>()
+ << Task(Task::Warning,
+ QLatin1String("file: lib/libtest.a(Test0.cpp.o) has no symbols"),
+ Utils::FileName(), -1,
+ categoryCompile)
+ )
+ << QString();
+ QTest::newRow("Mac: ranlib warning2")
+ << QString::fromLatin1("/path/to/XCode/and/ranlib: file: lib/libtest.a(Test0.cpp.o) has no symbols")
+ << OutputParserTester::STDERR
+ << QString() << QString()
+ << (QList<Task>()
+ << Task(Task::Warning,
+ QLatin1String("file: lib/libtest.a(Test0.cpp.o) has no symbols"),
+ Utils::FileName(), -1,
+ categoryCompile)
+ )
+ << QString();
}
void ProjectExplorerPlugin::testGccOutputParsers()
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp
index 19297939e8..bca42a7f52 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardpagefactory_p.cpp
@@ -181,7 +181,7 @@ Utils::WizardPage *ProjectPageFactory::create(JsonWizard *wizard, Core::Id typeI
JsonProjectPage *page = new JsonProjectPage;
- QVariantMap tmp = data.toMap();
+ QVariantMap tmp = data.isNull() ? QVariantMap() : data.toMap();
QString description = tmp.value(QLatin1String("trDescription")).toString();
page->setDescription(description);
@@ -193,12 +193,11 @@ bool ProjectPageFactory::validateData(Core::Id typeId, const QVariant &data, QSt
Q_UNUSED(errorMessage);
QTC_ASSERT(canCreate(typeId), return false);
- if (data.isNull() || data.type() != QVariant::Map) {
+ if (!data.isNull() && data.type() != QVariant::Map) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard",
- "\"data\" must be a JSON object for \"Project\" pages.");
+ "\"data\" must be empty or a JSON object for \"Project\" pages.");
return false;
}
-
return true;
}
diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
index 06f33d3f5b..56476a4543 100644
--- a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
+++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
@@ -219,12 +219,15 @@ void KitManagerConfigWidget::addConfigWidget(KitConfigWidget *widget)
QAction *action = new QAction(tr("Mark as Mutable"), 0);
action->setCheckable(true);
- action->setData(QVariant::fromValue(qobject_cast<QObject *>(widget)));
action->setChecked(widget->isMutable());
action->setEnabled(!widget->isSticky());
widget->mainWidget()->addAction(action);
widget->mainWidget()->setContextMenuPolicy(Qt::ActionsContextMenu);
- connect(action, &QAction::toggled, this, &KitManagerConfigWidget::updateMutableState);
+ connect(action, &QAction::toggled, this, [this, widget, action] {
+ widget->setMutable(action->isChecked());
+ emit dirty();
+ });
+
m_actions << action;
int row = m_layout->rowCount();
@@ -363,18 +366,6 @@ void KitManagerConfigWidget::kitWasUpdated(Kit *k)
updateVisibility();
}
-void KitManagerConfigWidget::updateMutableState()
-{
- QAction *action = qobject_cast<QAction *>(sender());
- if (!action)
- return;
- KitConfigWidget *widget = qobject_cast<KitConfigWidget *>(action->data().value<QObject *>());
- if (!widget)
- return;
- widget->setMutable(action->isChecked());
- emit dirty();
-}
-
QLabel *KitManagerConfigWidget::createLabel(const QString &name, const QString &toolTip)
{
QLabel *label = new QLabel(name);
diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.h b/src/plugins/projectexplorer/kitmanagerconfigwidget.h
index 750ed14eab..2d00ef0c6b 100644
--- a/src/plugins/projectexplorer/kitmanagerconfigwidget.h
+++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.h
@@ -85,7 +85,6 @@ private slots:
void setFileSystemFriendlyName();
void workingCopyWasUpdated(ProjectExplorer::Kit *k);
void kitWasUpdated(ProjectExplorer::Kit *k);
- void updateMutableState();
private:
enum LayoutColumns {
diff --git a/src/plugins/projectexplorer/kitmodel.cpp b/src/plugins/projectexplorer/kitmodel.cpp
index 1e094d914a..489da8c6ea 100644
--- a/src/plugins/projectexplorer/kitmodel.cpp
+++ b/src/plugins/projectexplorer/kitmodel.cpp
@@ -150,7 +150,7 @@ KitNode *KitModel::kitNode(const QModelIndex &index)
QModelIndex KitModel::indexOf(Kit *k) const
{
KitNode *n = findWorkingCopy(k);
- return indexFromItem(n);
+ return n ? indexFromItem(n) : QModelIndex();
}
void KitModel::setDefaultKit(const QModelIndex &index)
@@ -246,6 +246,9 @@ void KitModel::markForRemoval(Kit *k)
setDefaultNode(static_cast<KitNode *>(newDefault));
}
+ if (node == m_defaultNode)
+ setDefaultNode(findItemAtLevel<KitNode *>(2, [node](KitNode *kn) { return kn != node; }));
+
removeItem(node);
if (node->widget->configures(0))
delete node;
@@ -353,8 +356,9 @@ void KitModel::removeKit(Kit *k)
}
}
- if (m_defaultNode == node)
- m_defaultNode = 0;
+ if (node == m_defaultNode)
+ setDefaultNode(findItemAtLevel<KitNode *>(2, [node](KitNode *kn) { return kn != node; }));
+
removeItem(node);
delete node;
diff --git a/src/plugins/projectexplorer/ldparser.cpp b/src/plugins/projectexplorer/ldparser.cpp
index 2786f86642..696583c47e 100644
--- a/src/plugins/projectexplorer/ldparser.cpp
+++ b/src/plugins/projectexplorer/ldparser.cpp
@@ -42,11 +42,14 @@ namespace {
// line no. or elf segment + offset (1 bracket)
const char * const POSITION_PATTERN = "(\\d+|\\(\\..+?[+-]0x[a-fA-F0-9]+\\)):";
const char * const COMMAND_PATTERN = "^(.*[\\\\/])?([a-z0-9]+-[a-z0-9]+-[a-z0-9]+-)?(ld|gold)(-[0-9\\.]+)?(\\.exe)?: ";
+ const char *const RANLIB_PATTERN = "ranlib(.exe)?: (file: (.*) has no symbols)$";
}
LdParser::LdParser()
{
setObjectName(QLatin1String("LdParser"));
+ m_ranlib.setPattern(QLatin1String(RANLIB_PATTERN));
+ QTC_CHECK(m_ranlib.isValid());
m_regExpLinker.setPattern(QLatin1Char('^') +
QString::fromLatin1(FILE_PATTERN) + QLatin1Char('(') +
QString::fromLatin1(FILE_PATTERN) + QLatin1String(")?(") +
@@ -76,7 +79,17 @@ void LdParser::stdError(const QString &line)
return;
}
- QRegularExpressionMatch match = m_regExpGccNames.match(lne);
+ QRegularExpressionMatch match = m_ranlib.match(lne);
+ if (match.hasMatch()) {
+ QString description = match.captured(2);
+ Task task(Task::Warning, description,
+ Utils::FileName(), -1,
+ Constants::TASK_CATEGORY_COMPILE);
+ emit addTask(task);
+ return;
+ }
+
+ match = m_regExpGccNames.match(lne);
if (match.hasMatch()) {
QString description = lne.mid(match.capturedLength());
Task::TaskType type = Task::Error;
diff --git a/src/plugins/projectexplorer/ldparser.h b/src/plugins/projectexplorer/ldparser.h
index 4c9b66f7cf..04471a2872 100644
--- a/src/plugins/projectexplorer/ldparser.h
+++ b/src/plugins/projectexplorer/ldparser.h
@@ -46,6 +46,7 @@ public:
void stdError(const QString &line);
private:
+ QRegularExpression m_ranlib;
QRegularExpression m_regExpLinker;
QRegularExpression m_regExpGccNames;
};
diff --git a/src/plugins/projectexplorer/nodesvisitor.cpp b/src/plugins/projectexplorer/nodesvisitor.cpp
index 72855b8ecf..a950eebddd 100644
--- a/src/plugins/projectexplorer/nodesvisitor.cpp
+++ b/src/plugins/projectexplorer/nodesvisitor.cpp
@@ -76,7 +76,7 @@ using namespace ProjectExplorer;
Searches the first node that has the given file as its path.
*/
-FindNodesForFileVisitor::FindNodesForFileVisitor(const QString &fileToSearch)
+FindNodesForFileVisitor::FindNodesForFileVisitor(const Utils::FileName &fileToSearch)
: m_path(fileToSearch)
{
}
@@ -93,10 +93,10 @@ void FindNodesForFileVisitor::visitProjectNode(ProjectNode *node)
void FindNodesForFileVisitor::visitFolderNode(FolderNode *node)
{
- if (node->path().toString() == m_path)
+ if (node->path() == m_path)
m_nodes << node;
foreach (FileNode *fileNode, node->fileNodes()) {
- if (fileNode->path().toString() == m_path)
+ if (fileNode->path() == m_path)
m_nodes << fileNode;
}
}
@@ -112,7 +112,7 @@ void FindNodesForFileVisitor::visitSessionNode(SessionNode *node)
Collects file information from all sub file nodes.
*/
-QStringList FindAllFilesVisitor::filePaths() const
+Utils::FileNameList FindAllFilesVisitor::filePaths() const
{
return m_filePaths;
}
@@ -124,7 +124,7 @@ void FindAllFilesVisitor::visitProjectNode(ProjectNode *projectNode)
void FindAllFilesVisitor::visitFolderNode(FolderNode *folderNode)
{
- m_filePaths.append(folderNode->path().toString());
+ m_filePaths.append(folderNode->path());
foreach (const FileNode *fileNode, folderNode->fileNodes())
- m_filePaths.append(fileNode->path().toString());
+ m_filePaths.append(fileNode->path());
}
diff --git a/src/plugins/projectexplorer/nodesvisitor.h b/src/plugins/projectexplorer/nodesvisitor.h
index 565683ee4a..570b3b4d5a 100644
--- a/src/plugins/projectexplorer/nodesvisitor.h
+++ b/src/plugins/projectexplorer/nodesvisitor.h
@@ -33,6 +33,8 @@
#include "projectexplorer_export.h"
+#include <utils/fileutils.h>
+
#include <QStringList>
namespace ProjectExplorer {
@@ -58,7 +60,7 @@ protected:
class PROJECTEXPLORER_EXPORT FindNodesForFileVisitor : public NodesVisitor {
public:
- FindNodesForFileVisitor(const QString &fileToSearch);
+ FindNodesForFileVisitor(const Utils::FileName &fileToSearch);
QList<Node*> nodes() const;
@@ -66,18 +68,18 @@ public:
void visitFolderNode(FolderNode *node);
void visitSessionNode(SessionNode *node);
private:
- QString m_path;
+ Utils::FileName m_path;
QList<Node*> m_nodes;
};
class PROJECTEXPLORER_EXPORT FindAllFilesVisitor : public NodesVisitor {
public:
- QStringList filePaths() const;
+ Utils::FileNameList filePaths() const;
void visitProjectNode(ProjectNode *projectNode);
void visitFolderNode(FolderNode *folderNode);
private:
- QStringList m_filePaths;
+ Utils::FileNameList m_filePaths;
};
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index faef1ed2cf..78ccc8d269 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -108,12 +108,14 @@
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/id.h>
#include <coreplugin/idocumentfactory.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/imode.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/infobar.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/findplaceholder.h>
@@ -266,7 +268,7 @@ public:
void updateRecentProjectMenu();
void clearRecentProjects();
- void openRecentProject();
+ void openRecentProject(const QString &fileName);
void updateUnloadProjectMenu();
void openTerminalHere();
@@ -2830,12 +2832,13 @@ void ProjectExplorerPluginPrivate::updateRecentProjectMenu()
//projects (ignore sessions, they used to be in this list)
const StringPairListConstIterator end = dd->m_recentProjects.constEnd();
for (StringPairListConstIterator it = dd->m_recentProjects.constBegin(); it != end; ++it) {
- const QPair<QString, QString> &s = *it;
- if (s.first.endsWith(QLatin1String(".qws")))
+ const QString fileName = it->first;
+ if (fileName.endsWith(QLatin1String(".qws")))
continue;
- QAction *action = menu->addAction(Utils::withTildeHomePath(s.first));
- action->setData(s.first);
- connect(action, &QAction::triggered, this, &ProjectExplorerPluginPrivate::openRecentProject);
+ QAction *action = menu->addAction(Utils::withTildeHomePath(fileName));
+ connect(action, &QAction::triggered, this, [this, fileName] {
+ openRecentProject(fileName);
+ });
hasRecentProjects = true;
}
menu->setEnabled(hasRecentProjects);
@@ -2856,15 +2859,11 @@ void ProjectExplorerPluginPrivate::clearRecentProjects()
updateWelcomePage();
}
-void ProjectExplorerPluginPrivate::openRecentProject()
+void ProjectExplorerPluginPrivate::openRecentProject(const QString &fileName)
{
if (debug)
qDebug() << "ProjectExplorerPlugin::openRecentProject()";
- QAction *a = qobject_cast<QAction*>(sender());
- if (!a)
- return;
- QString fileName = a->data().toString();
if (!fileName.isEmpty()) {
QString errorMessage;
ProjectExplorerPlugin::openProject(fileName, &errorMessage);
diff --git a/src/plugins/projectexplorer/projecttree.cpp b/src/plugins/projectexplorer/projecttree.cpp
index 3f7e0a1e6f..66173a4856 100644
--- a/src/plugins/projectexplorer/projecttree.cpp
+++ b/src/plugins/projectexplorer/projecttree.cpp
@@ -39,6 +39,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/infobar.h>
#include <coreplugin/vcsmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
@@ -46,6 +47,7 @@
#include <coreplugin/documentmanager.h>
#include <QApplication>
+#include <QMenu>
#include <QTimer>
namespace {
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp
index 29113512ce..aba3e4c32a 100644
--- a/src/plugins/projectexplorer/projecttreewidget.cpp
+++ b/src/plugins/projectexplorer/projecttreewidget.cpp
@@ -41,6 +41,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/find/itemviewfind.h>
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index 67bcae6156..4d54fd4077 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -287,6 +287,7 @@ public:
virtual StopResult stop() = 0;
virtual bool isRunning() const = 0;
virtual QString displayName() const;
+ virtual bool supportsReRunning() const { return true; }
void setIcon(const QString &icon) { m_icon = icon; }
QString icon() const { return m_icon; }
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index 0d4b91048a..716e03bddd 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -37,6 +37,7 @@
#include "projectnodes.h"
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/imode.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/coreconstants.h>
@@ -540,7 +541,7 @@ QList<Project *> SessionManager::projectOrder(Project *project)
QList<Node *> SessionManager::nodesForFile(const Utils::FileName &fileName)
{
- FindNodesForFileVisitor findNodes(fileName.toString());
+ FindNodesForFileVisitor findNodes(fileName);
sessionNode()->accept(&findNodes);
return findNodes.nodes();
}
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp
index 173a51bf18..07489dc7b2 100644
--- a/src/plugins/projectexplorer/taskwindow.cpp
+++ b/src/plugins/projectexplorer/taskwindow.cpp
@@ -37,6 +37,7 @@
#include "taskmodel.h"
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
index fa265471b2..4444fc98cb 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
@@ -163,10 +163,6 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx
qtEnv.architecture.append(QLatin1String("_64"));
}
qtEnv.binaryPath = qt->binPath().toString();
- if (qt->hasDebugBuild())
- qtEnv.buildVariant << QLatin1String("debug");
- if (qt->hasReleaseBuild())
- qtEnv.buildVariant << QLatin1String("release");
qtEnv.documentationPath = qt->docsPath().toString();
qtEnv.includePath = qt->headerPath().toString();
qtEnv.libraryPath = qt->libraryPath().toString();
@@ -183,6 +179,11 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx
qtEnv.frameworkBuild = qt->isFrameworkBuild();
qtEnv.configItems = qt->configValues();
qtEnv.qtConfigItems = qt->qtConfigValues();
+ foreach (const QString &buildVariant,
+ QStringList() << QLatin1String("debug") << QLatin1String("release")) {
+ if (qtEnv.qtConfigItems.contains(buildVariant))
+ qtEnv.buildVariant << buildVariant;
+ }
const qbs::ErrorInfo errorInfo = qbs::setupQtProfile(profileName, settings(), qtEnv);
if (errorInfo.hasError()) {
Core::MessageManager::write(tr("Failed to set up kit for Qbs: %1")
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp
index b9a2f234d0..8c68d5114a 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp
@@ -49,6 +49,7 @@
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/featureprovider.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/fileiconprovider.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/project.h>
diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp
index 874f3b9bcc..673a27ebe3 100644
--- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp
@@ -995,11 +995,11 @@ bool QmakePriFileNode::addSubProjects(const QStringList &proFilePaths)
{
FindAllFilesVisitor visitor;
accept(&visitor);
- const QStringList &allFiles = visitor.filePaths();
+ const FileNameList &allFiles = visitor.filePaths();
QStringList uniqueProFilePaths;
foreach (const QString &proFile, proFilePaths)
- if (!allFiles.contains(proFile))
+ if (!allFiles.contains(FileName::fromString(proFile)))
uniqueProFilePaths.append(simplifyProFilePath(proFile));
QStringList failedFiles;
@@ -1030,7 +1030,7 @@ bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAd
FindAllFilesVisitor visitor;
accept(&visitor);
- const QStringList &allFiles = visitor.filePaths();
+ const FileNameList &allFiles = visitor.filePaths();
typedef QMap<QString, QStringList> TypeFileMap;
// Split into lists by file type and bulk-add them.
@@ -1056,13 +1056,13 @@ bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAd
QStringList uniqueQrcFiles;
foreach (const QString &file, qrcFiles) {
- if (!allFiles.contains(file))
+ if (!allFiles.contains(FileName::fromString(file)))
uniqueQrcFiles.append(file);
}
QStringList uniqueFilePaths;
foreach (const QString &file, typeFiles) {
- if (!allFiles.contains(file))
+ if (!allFiles.contains(FileName::fromString(file)))
uniqueFilePaths.append(file);
}
diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp
index de5d916813..8a495d4acc 100644
--- a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp
@@ -58,6 +58,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <texteditor/texteditoractionhandler.h>
diff --git a/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp b/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp
index d4fcfedb99..c66dbd8853 100644
--- a/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp
@@ -35,6 +35,7 @@
#include <nodeabstractproperty.h>
#include <coreplugin/documentmanager.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/imode.h>
#include <coreplugin/editormanager/editormanager.h>
diff --git a/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp b/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp
index 653ad1e98d..69c0f18ac7 100644
--- a/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp
+++ b/src/plugins/qmldesigner/designercore/filemanager/firstdefinitionfinder.cpp
@@ -31,6 +31,7 @@
#include "firstdefinitionfinder.h"
#include <qmljs/parser/qmljsast_p.h>
+#include <qmljs/parser/qmljsengine_p.h>
#include <QDebug>
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
index 8a2ec11d04..bc92db2ab4 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
@@ -42,6 +42,7 @@
#include <qmljs/qmljsscopechain.h>
#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
+#include <qmljs/qmljsvalueowner.h>
#include <languageutils/fakemetaobject.h>
namespace QmlDesigner {
diff --git a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
index 244c2080b9..d6d95409b7 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
@@ -45,6 +45,7 @@
#include <qmljs/qmljslink.h>
#include <qmljs/parser/qmljsast_p.h>
+#include <qmljs/parser/qmljsengine_p.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
enum { debug = false };
diff --git a/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp b/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp
index 2966cc94ad..1774d7b43b 100644
--- a/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp
@@ -36,6 +36,7 @@
#include <nodelistproperty.h>
#include <nodeproperty.h>
+#include <qmljs/parser/qmljsengine_p.h>
#include <utils/algorithm.h>
#include <QDebug>
diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
index b693440e39..81f08d6231 100644
--- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
+++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
@@ -44,6 +44,7 @@
#include "signalhandlerproperty.h"
+#include <qmljs/parser/qmljsengine_p.h>
using namespace QmlDesigner::Internal;
diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
index a35a4b6d11..fda7c9bb93 100644
--- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
@@ -51,6 +51,7 @@
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <qmljs/qmljsqrcparser.h>
#include <qmljs/qmljsinterpreter.h>
+#include <qmljs/qmljsvalueowner.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp
index 3efb840e71..5638c6d19a 100644
--- a/src/plugins/qmldesigner/designmodewidget.cpp
+++ b/src/plugins/qmldesigner/designmodewidget.cpp
@@ -45,6 +45,7 @@
#include <coreplugin/sidebar.h>
#include <coreplugin/editortoolbar.h>
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/inavigationwidgetfactory.h>
#include <extensionsystem/pluginmanager.h>
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp
index 85c355fc03..11e67f24eb 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.cpp
+++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp
@@ -40,6 +40,7 @@
#include <qmljstools/qmljstoolsconstants.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/designmode.h>
#include <coreplugin/icore.h>
diff --git a/src/plugins/qmldesigner/shortcutmanager.cpp b/src/plugins/qmldesigner/shortcutmanager.cpp
index 5f8ccfcf8f..dc65e45900 100644
--- a/src/plugins/qmldesigner/shortcutmanager.cpp
+++ b/src/plugins/qmldesigner/shortcutmanager.cpp
@@ -32,7 +32,9 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/coreconstants.h>
diff --git a/src/plugins/qmljseditor/qmljseditordocument.h b/src/plugins/qmljseditor/qmljseditordocument.h
index 2d1b385d46..76e1a066e5 100644
--- a/src/plugins/qmljseditor/qmljseditordocument.h
+++ b/src/plugins/qmljseditor/qmljseditordocument.h
@@ -33,7 +33,6 @@
#include "qmljseditor_global.h"
-#include <qmljs/qmljsdocument.h>
#include <qmljstools/qmljssemanticinfo.h>
#include <texteditor/textdocument.h>
diff --git a/src/plugins/qmljseditor/qmljsfindreferences.h b/src/plugins/qmljseditor/qmljsfindreferences.h
index 1435c40395..995e4c2fdb 100644
--- a/src/plugins/qmljseditor/qmljsfindreferences.h
+++ b/src/plugins/qmljseditor/qmljsfindreferences.h
@@ -38,8 +38,6 @@
#include <QFuture>
#include <QFutureWatcher>
#include <QPointer>
-#include <utils/filesearch.h>
-#include <qmljs/qmljsdocument.h>
QT_FORWARD_DECLARE_CLASS(QTimer)
diff --git a/src/plugins/qmljseditor/qmljshoverhandler.cpp b/src/plugins/qmljseditor/qmljshoverhandler.cpp
index 4084d7a4f8..7cefaa5a1a 100644
--- a/src/plugins/qmljseditor/qmljshoverhandler.cpp
+++ b/src/plugins/qmljseditor/qmljshoverhandler.cpp
@@ -42,6 +42,7 @@
#include <qmljs/qmljscontext.h>
#include <qmljs/qmljsscopechain.h>
#include <qmljs/qmljsinterpreter.h>
+#include <qmljs/qmljsvalueowner.h>
#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/parser/qmljsastfwd_p.h>
#include <qmljs/qmljsutils.h>
diff --git a/src/plugins/qmljseditor/qmljswrapinloader.cpp b/src/plugins/qmljseditor/qmljswrapinloader.cpp
index 8c1b1fb52d..333421d201 100644
--- a/src/plugins/qmljseditor/qmljswrapinloader.cpp
+++ b/src/plugins/qmljseditor/qmljswrapinloader.cpp
@@ -35,6 +35,7 @@
#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/qmljsdocument.h>
+#include <qmljs/qmljsscopechain.h>
#include <qmljs/qmljsutils.h>
#include <qmljs/qmljsbind.h>
#include <qmljstools/qmljsrefactoringchanges.h>
diff --git a/src/plugins/qmljseditor/qmloutlinemodel.cpp b/src/plugins/qmljseditor/qmloutlinemodel.cpp
index 8fbc0845f8..7231abb171 100644
--- a/src/plugins/qmljseditor/qmloutlinemodel.cpp
+++ b/src/plugins/qmljseditor/qmloutlinemodel.cpp
@@ -36,6 +36,7 @@
#include <qmljs/qmljsscopechain.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <qmljs/qmljsrewriter.h>
+#include <qmljs/qmljsvalueowner.h>
#include <qmljstools/qmljsrefactoringchanges.h>
#include <utils/fileutils.h>
diff --git a/src/plugins/qmljstools/qmlconsoleview.cpp b/src/plugins/qmljstools/qmlconsoleview.cpp
index 0d97940ed3..ee374f0f00 100644
--- a/src/plugins/qmljstools/qmlconsoleview.cpp
+++ b/src/plugins/qmljstools/qmlconsoleview.cpp
@@ -36,6 +36,8 @@
#include <coreplugin/manhattanstyle.h>
#include <utils/hostosinfo.h>
+#include <QAction>
+#include <QMenu>
#include <QMouseEvent>
#include <QPainter>
#include <QApplication>
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp
index b4ef92c6be..c02cb6e094 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.cpp
+++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp
@@ -35,6 +35,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/documentmodel.h>
+#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <cpptools/cppmodelmanager.h>
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.h b/src/plugins/qmljstools/qmljsmodelmanager.h
index 3cef07c227..03c4d568fe 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.h
+++ b/src/plugins/qmljstools/qmljsmodelmanager.h
@@ -34,10 +34,6 @@
#include "qmljstools_global.h"
#include <qmljs/qmljsmodelmanagerinterface.h>
-#include <qmljs/qmljsqrcparser.h>
-#include <qmljs/qmljsconstants.h>
-
-#include <cplusplus/CppDocument.h>
#include <QFuture>
#include <QFutureSynchronizer>
diff --git a/src/plugins/qmljstools/qmljssemanticinfo.cpp b/src/plugins/qmljstools/qmljssemanticinfo.cpp
index b56a962ed8..5cdb249174 100644
--- a/src/plugins/qmljstools/qmljssemanticinfo.cpp
+++ b/src/plugins/qmljstools/qmljssemanticinfo.cpp
@@ -30,7 +30,10 @@
#include "qmljssemanticinfo.h"
+#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/qmljsscopebuilder.h>
+#include <qmljs/qmljsscopechain.h>
+#include <qmljs/parser/qmljsengine_p.h>
using namespace QmlJS;
using namespace QmlJS::AST;
diff --git a/src/plugins/qmljstools/qmljssemanticinfo.h b/src/plugins/qmljstools/qmljssemanticinfo.h
index cb1a5d8e4e..314e0c672c 100644
--- a/src/plugins/qmljstools/qmljssemanticinfo.h
+++ b/src/plugins/qmljstools/qmljssemanticinfo.h
@@ -33,12 +33,18 @@
#include "qmljstools_global.h"
-#include <qmljs/parser/qmljsast_p.h>
-#include <qmljs/qmljsscopechain.h>
+#include <qmljs/qmljsdocument.h>
+#include <qmljs/qmljscontext.h>
#include <qmljs/qmljsstaticanalysismessage.h>
+#include <qmljs/parser/qmljsengine_p.h>
#include <QTextCursor>
+namespace QmlJS {
+class ScopeChain;
+namespace AST { class Node; }
+}
+
namespace QmlJSTools {
class QMLJSTOOLS_EXPORT Range
diff --git a/src/plugins/qmljstools/qmljstools_test.cpp b/src/plugins/qmljstools/qmljstools_test.cpp
index 6c2c539c2b..90b153c510 100644
--- a/src/plugins/qmljstools/qmljstools_test.cpp
+++ b/src/plugins/qmljstools/qmljstools_test.cpp
@@ -34,6 +34,7 @@
#include <coreplugin/icore.h>
#include <qmljs/qmljslink.h>
+#include <qmljs/qmljsvalueowner.h>
#include <qmljstools/qmljsmodelmanager.h>
#include <QtTest>
diff --git a/src/plugins/qmljstools/qmljstoolsplugin.cpp b/src/plugins/qmljstools/qmljstoolsplugin.cpp
index 43bdbca48d..8c2f637fed 100644
--- a/src/plugins/qmljstools/qmljstoolsplugin.cpp
+++ b/src/plugins/qmljstools/qmljstoolsplugin.cpp
@@ -38,6 +38,7 @@
#include "qmlconsolemanager.h"
#include "qmljsbundleprovider.h"
+#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/actionmanager/actionmanager.h>
diff --git a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp
index c24bcd1b93..234e81e97f 100644
--- a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp
@@ -137,6 +137,7 @@ void QmlProfilerViewManager::createViews()
mw->splitDockWidget(mw->toolBarDockWidget(), timelineDock, Qt::Vertical);
mw->tabifyDockWidget(timelineDock, eventsDock);
mw->tabifyDockWidget(eventsDock, v8profilerDock);
+ timelineDock->raise();
new QmlProfilerStateWidget(d->profilerState, d->profilerModelManager, d->eventsView);
new QmlProfilerStateWidget(d->profilerState, d->profilerModelManager, d->traceView);
diff --git a/src/plugins/qmlprojectmanager/qmlapp.cpp b/src/plugins/qmlprojectmanager/qmlapp.cpp
index 574677a30f..32015d4a89 100644
--- a/src/plugins/qmlprojectmanager/qmlapp.cpp
+++ b/src/plugins/qmlprojectmanager/qmlapp.cpp
@@ -35,6 +35,7 @@
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
+#include <QDebug>
#include <QDir>
#include <QTextStream>
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 3da719d53b..a5357373b2 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -36,6 +36,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icore.h>
+#include <coreplugin/idocument.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtoutputformatter.h>
diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp
index 191137d0c9..1ef762d3c9 100644
--- a/src/plugins/qnx/blackberryruncontrolfactory.cpp
+++ b/src/plugins/qnx/blackberryruncontrolfactory.cpp
@@ -188,7 +188,7 @@ RunControl *BlackBerryRunControlFactory::create(RunConfiguration *runConfigurati
if (qtVer && qtVer->qtVersion() <= QtSupport::QtVersionNumber(4, 8, 6))
Core::MessageManager::write(tr("Target Qt version (%1) might not support QML profiling. "
"Cascades applications are not affected and should work as expected. "
- "For more info see http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10")
+ "For more info see http://wiki.qt.io/Qt_Creator_with_BlackBerry_10")
.arg(qtVer->qtVersionString()), Core::MessageManager::Flash
);
diff --git a/src/plugins/qnx/qnxbaseconfiguration.cpp b/src/plugins/qnx/qnxbaseconfiguration.cpp
index b0509b7351..f98a7eb5b7 100644
--- a/src/plugins/qnx/qnxbaseconfiguration.cpp
+++ b/src/plugins/qnx/qnxbaseconfiguration.cpp
@@ -183,7 +183,7 @@ QVariant QnxBaseConfiguration::createDebuggerItem(QnxArchitecture arch,
debugger.setAbi(Abi(arch == Qnx::ArmLeV7 ? Abi::ArmArchitecture : Abi::X86Architecture,
Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32));
debugger.setAutoDetected(true);
- debugger.setDisplayName(displayName);
+ debugger.setUnexpandedDisplayName(displayName);
return Debugger::DebuggerItemManager::registerDebugger(debugger);
}
diff --git a/src/plugins/qnx/qnxconstants.h b/src/plugins/qnx/qnxconstants.h
index 742091f9c7..d448808be3 100644
--- a/src/plugins/qnx/qnxconstants.h
+++ b/src/plugins/qnx/qnxconstants.h
@@ -128,7 +128,7 @@ const char QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH[] = "/accounts/devuser/";
const char QNX_OK_ICON[] = ":/qnx/images/ok.png";
-const char QNX_BLACKBERRY_SETUP_URL[] = "http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10";
+const char QNX_BLACKBERRY_SETUP_URL[] = "http://wiki.qt.io/Qt_Creator_with_BlackBerry_10";
const char QNX_LEGACY_KEYS_URL[] = "https://developer.blackberry.com/native/documentation/core"
"/com.qnx.doc.ide.userguide/topic/signing_and_publishing.html";
const char QNX_REGISTER_KEYS_URL[] = "https://www.blackberry.com/SignedKeys/codesigning.html";
diff --git a/src/plugins/qnx/qnxplugin.cpp b/src/plugins/qnx/qnxplugin.cpp
index 8bf083d2ec..8d499e7f55 100644
--- a/src/plugins/qnx/qnxplugin.cpp
+++ b/src/plugins/qnx/qnxplugin.cpp
@@ -66,6 +66,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
diff --git a/src/plugins/qtsupport/QtSupport.mimetypes.xml b/src/plugins/qtsupport/QtSupport.mimetypes.xml
new file mode 100644
index 0000000000..21c20bebfc
--- /dev/null
+++ b/src/plugins/qtsupport/QtSupport.mimetypes.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/x-linguist-translation">
+ <comment>Linguist translated messages (machine-readable)</comment>
+ <glob pattern="*.qm"/>
+ </mime-type>
+ <mime-type type="application/x-linguist">
+ <comment>Linguist message catalog</comment>
+ <magic>
+ <match value="&lt;TS" type="string" offset="0:256"/>
+ </magic>
+ <glob pattern="*.ts" weight="70"/>
+ </mime-type>
+</mime-info>
diff --git a/src/plugins/qtsupport/debugginghelperbuildtask.cpp b/src/plugins/qtsupport/debugginghelperbuildtask.cpp
index 6a9e469675..19cc1cc42f 100644
--- a/src/plugins/qtsupport/debugginghelperbuildtask.cpp
+++ b/src/plugins/qtsupport/debugginghelperbuildtask.cpp
@@ -32,6 +32,7 @@
#include "qmldumptool.h"
#include "baseqtversion.h"
#include "qtversionmanager.h"
+#include <projectexplorer/toolchain.h>
#include <utils/qtcassert.h>
#include <QCoreApplication>
diff --git a/src/plugins/qtsupport/debugginghelperbuildtask.h b/src/plugins/qtsupport/debugginghelperbuildtask.h
index 19e97f801d..4f61b09328 100644
--- a/src/plugins/qtsupport/debugginghelperbuildtask.h
+++ b/src/plugins/qtsupport/debugginghelperbuildtask.h
@@ -35,12 +35,13 @@
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <coreplugin/messagemanager.h>
-#include <projectexplorer/toolchain.h>
#include <QObject>
#include <QFutureInterface>
#include <QMetaType>
+namespace ProjectExplorer { class ToolChain; }
+
namespace QtSupport {
class BaseQtVersion;
diff --git a/src/plugins/qtsupport/qtkitinformation.h b/src/plugins/qtsupport/qtkitinformation.h
index 79dd6f7626..8c5f314c6b 100644
--- a/src/plugins/qtsupport/qtkitinformation.h
+++ b/src/plugins/qtsupport/qtkitinformation.h
@@ -35,7 +35,6 @@
#include "baseqtversion.h"
-#include <coreplugin/featureprovider.h>
#include <projectexplorer/kitinformation.h>
namespace Utils { class MacroExpander; }
diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp
index ea6b136a1d..3dbfc0ffb9 100644
--- a/src/plugins/qtsupport/qtoptionspage.cpp
+++ b/src/plugins/qtsupport/qtoptionspage.cpp
@@ -42,6 +42,7 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/variablechooser.h>
+#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/hostosinfo.h>
diff --git a/src/plugins/qtsupport/qtsupport.qrc b/src/plugins/qtsupport/qtsupport.qrc
index 02b4ae2851..e97078e35b 100644
--- a/src/plugins/qtsupport/qtsupport.qrc
+++ b/src/plugins/qtsupport/qtsupport.qrc
@@ -8,5 +8,6 @@
<file>images/dark_qml.png</file>
<file>images/dark_qt_project.png</file>
<file>images/dark_qt_qrc.png</file>
+ <file>QtSupport.mimetypes.xml</file>
</qresource>
</RCC>
diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp
index 7fdcea8b4d..8de3090dec 100644
--- a/src/plugins/qtsupport/qtsupportplugin.cpp
+++ b/src/plugins/qtsupport/qtsupportplugin.cpp
@@ -50,7 +50,9 @@
#include <projectexplorer/project.h>
#include <projectexplorer/projecttree.h>
#include <projectexplorer/target.h>
+
#include <utils/macroexpander.h>
+#include <utils/mimetypes/mimedatabase.h>
#include <QtPlugin>
@@ -69,6 +71,8 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
ProFileEvaluator::initialize();
new ProFileCacheManager(this);
+ Utils::MimeDatabase::addMimeTypes(QLatin1String(":qtsupport/QtSupport.mimetypes.xml"));
+
JsExpander::registerQObjectForJs(QLatin1String("QtSupport"), new CodeGenerator);
addAutoReleasedObject(new QtVersionManager);
diff --git a/src/plugins/qtsupport/uicodemodelsupport.cpp b/src/plugins/qtsupport/uicodemodelsupport.cpp
index 445dc1048d..0fb3f4154b 100644
--- a/src/plugins/qtsupport/uicodemodelsupport.cpp
+++ b/src/plugins/qtsupport/uicodemodelsupport.cpp
@@ -34,6 +34,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
+#include <coreplugin/idocument.h>
#include <cpptools/cppmodelmanager.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildmanager.h>
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
index a6a63f27d7..66cd812653 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
+++ b/src/plugins/remotelinux/remotelinuxenvironmentaspect.cpp
@@ -30,6 +30,7 @@
#include "remotelinuxenvironmentaspect.h"
+#include "abstractremotelinuxrunconfiguration.h"
#include "remotelinuxenvironmentaspectwidget.h"
namespace RemoteLinux {
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspect.h b/src/plugins/remotelinux/remotelinuxenvironmentaspect.h
index f818cd7c6d..a920dce1a9 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentaspect.h
+++ b/src/plugins/remotelinux/remotelinuxenvironmentaspect.h
@@ -31,8 +31,6 @@
#ifndef REMOTELINUXENVIRONMENTASPECT_H
#define REMOTELINUXENVIRONMENTASPECT_H
-#include "abstractremotelinuxrunconfiguration.h"
-
#include "remotelinux_export.h"
#include <projectexplorer/environmentaspect.h>
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp b/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp
index bb1b21cad4..2da43252ba 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp
+++ b/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.cpp
@@ -30,6 +30,7 @@
#include "remotelinuxenvironmentaspectwidget.h"
+#include "remotelinuxrunconfiguration.h"
#include "remotelinuxenvironmentreader.h"
#include <QCoreApplication>
diff --git a/src/plugins/remotelinux/remotelinuxsignaloperation.h b/src/plugins/remotelinux/remotelinuxsignaloperation.h
index c387ba6ab9..342ebe8ba6 100644
--- a/src/plugins/remotelinux/remotelinuxsignaloperation.h
+++ b/src/plugins/remotelinux/remotelinuxsignaloperation.h
@@ -37,7 +37,6 @@
#include <ssh/sshconnection.h>
namespace QSsh {
-class SshConnectionParameters;
class SshRemoteProcessRunner;
}
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp
index df4d22a295..bf2d9f3d40 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.cpp
+++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp
@@ -41,6 +41,7 @@
#include <coreplugin/id.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/editormanager/editormanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
@@ -58,6 +59,7 @@
#include <QAction>
#include <QDebug>
#include <QInputDialog>
+#include <QMenu>
#include <QMessageBox>
#include <QFormLayout>
#include <QDialogButtonBox>
diff --git a/src/plugins/tasklist/taskfile.cpp b/src/plugins/tasklist/taskfile.cpp
index 1c3c889dba..5e1fcf60fd 100644
--- a/src/plugins/tasklist/taskfile.cpp
+++ b/src/plugins/tasklist/taskfile.cpp
@@ -32,6 +32,8 @@
#include "tasklistplugin.h"
+#include <utils/fileutils.h>
+
using namespace TaskList;
using namespace TaskList::Internal;
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 342eceb8ed..d52105f69b 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -71,6 +71,7 @@
#include <aggregation/aggregate.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/infobar.h>
diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp
index 06fa947cec..ae481a8b17 100644
--- a/src/plugins/texteditor/texteditoractionhandler.cpp
+++ b/src/plugins/texteditor/texteditoractionhandler.cpp
@@ -42,6 +42,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/command.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp
index 88ac6b4469..1333f77016 100644
--- a/src/plugins/texteditor/texteditorplugin.cpp
+++ b/src/plugins/texteditor/texteditorplugin.cpp
@@ -46,6 +46,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/actionmanager/command.h>
#include <coreplugin/externaltoolmanager.h>
#include <extensionsystem/pluginmanager.h>
diff --git a/src/plugins/todo/qmljstodoitemsscanner.cpp b/src/plugins/todo/qmljstodoitemsscanner.cpp
index 7c508cdd08..1d35b6af7c 100644
--- a/src/plugins/todo/qmljstodoitemsscanner.cpp
+++ b/src/plugins/todo/qmljstodoitemsscanner.cpp
@@ -33,6 +33,8 @@
#include <projectexplorer/project.h>
+#include <qmljs/parser/qmljsengine_p.h>
+
namespace Todo {
namespace Internal {
diff --git a/src/plugins/todo/todoitemsprovider.cpp b/src/plugins/todo/todoitemsprovider.cpp
index a4d531c185..ccad022cfd 100644
--- a/src/plugins/todo/todoitemsprovider.cpp
+++ b/src/plugins/todo/todoitemsprovider.cpp
@@ -38,6 +38,7 @@
#include <projectexplorer/projectexplorer.h>
#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/idocument.h>
#include <projectexplorer/session.h>
#include <QTimer>
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp
index c658815aaa..dcd2a1396b 100644
--- a/src/plugins/valgrind/callgrindtool.cpp
+++ b/src/plugins/valgrind/callgrindtool.cpp
@@ -88,7 +88,6 @@
#include <QHBoxLayout>
#include <QLineEdit>
#include <QMenu>
-#include <QMessageBox>
#include <QSortFilterProxyModel>
#include <QToolBar>
#include <QToolButton>
@@ -933,8 +932,8 @@ void CallgrindToolPrivate::loadExternalLogFile()
QFile logFile(filePath);
if (!logFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
- QMessageBox::critical(AnalyzerManager::mainWindow(), tr("Internal Error"),
- tr("Failed to open file for reading: %1").arg(filePath));
+ AnalyzerUtils::logToIssuesPane(Task::Error,
+ tr("Callgrind: Failed to open file for reading: %1").arg(filePath));
return;
}
diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp
index 4365c077df..ebee6c1c3b 100644
--- a/src/plugins/valgrind/memchecktool.cpp
+++ b/src/plugins/valgrind/memchecktool.cpp
@@ -36,6 +36,7 @@
#include "valgrindplugin.h"
#include <analyzerbase/analyzermanager.h>
+#include <analyzerbase/analyzerutils.h>
#include <analyzerbase/analyzerconstants.h>
#include <valgrind/valgrindsettings.h>
@@ -83,7 +84,6 @@
#include <QSpinBox>
#include <QAction>
#include <QMenu>
-#include <QMessageBox>
#include <QToolButton>
#include <QCheckBox>
#include <utils/stylehelper.h>
@@ -493,8 +493,8 @@ void MemcheckTool::loadExternalXmlLogFile()
QFile *logFile = new QFile(filePath);
if (!logFile->open(QIODevice::ReadOnly | QIODevice::Text)) {
delete logFile;
- QMessageBox::critical(m_errorView, tr("Internal Error"),
- tr("Failed to open file for reading: %1").arg(filePath));
+ AnalyzerUtils::logToIssuesPane(Task::Error,
+ tr("Memcheck: Failed to open file for reading: %1").arg(filePath));
return;
}
@@ -524,8 +524,8 @@ void MemcheckTool::parserError(const Error &error)
void MemcheckTool::internalParserError(const QString &errorString)
{
- QMessageBox::critical(m_errorView, tr("Internal Error"),
- tr("Error occurred parsing Valgrind output: %1").arg(errorString));
+ AnalyzerUtils::logToIssuesPane(Task::Error,
+ tr("Memcheck: Error occurred parsing Valgrind output: %1").arg(errorString));
}
void MemcheckTool::clearErrorView()
diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp
index ce0bc1bc1b..366f76d51f 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.cpp
+++ b/src/plugins/vcsbase/vcsbaseplugin.cpp
@@ -39,6 +39,7 @@
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/id.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/iversioncontrol.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/vcsmanager.h>
diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri
index b88d940314..a478f498aa 100644
--- a/src/qtcreatorplugin.pri
+++ b/src/qtcreatorplugin.pri
@@ -14,33 +14,27 @@ plugin_recmds = $$QTC_PLUGIN_RECOMMENDS
include(../qtcreator.pri)
-# for substitution in the .json
-dependencyList =
-for(dep, plugin_deps) {
+defineReplace(dependencyName) {
dependencies_file =
for(dir, QTC_PLUGIN_DIRS) {
- exists($$dir/$$dep/$${dep}_dependencies.pri) {
- dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
+ exists($$dir/$$1/$${1}_dependencies.pri) {
+ dependencies_file = $$dir/$$1/$${1}_dependencies.pri
break()
}
}
isEmpty(dependencies_file): \
error("Plugin dependency $$dep not found")
include($$dependencies_file)
- dependencyList += " { \"Name\" : \"$$QTC_PLUGIN_NAME\", \"Version\" : \"$$QTCREATOR_VERSION\" }"
+ return($$QTC_PLUGIN_NAME)
+}
+
+# for substitution in the .json
+dependencyList =
+for(dep, plugin_deps) {
+ dependencyList += " { \"Name\" : \"$$dependencyName($$dep)\", \"Version\" : \"$$QTCREATOR_VERSION\" }"
}
for(dep, plugin_recmds) {
- dependencies_file =
- for(dir, QTC_PLUGIN_DIRS) {
- exists($$dir/$$dep/$${dep}_dependencies.pri) {
- dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
- break()
- }
- }
- isEmpty(dependencies_file): \
- error("Plugin dependency $$dep not found")
- include($$dependencies_file)
- dependencyList += " { \"Name\" : \"$$QTC_PLUGIN_NAME\", \"Version\" : \"$$QTCREATOR_VERSION\", \"Type\" : \"optional\" }"
+ dependencyList += " { \"Name\" : \"$$dependencyName($$dep)\", \"Version\" : \"$$QTCREATOR_VERSION\", \"Type\" : \"optional\" }"
}
dependencyList = $$join(dependencyList, ",$$escape_expand(\\n)")
@@ -74,10 +68,6 @@ isEmpty(TARGET) {
error("qtcreatorplugin.pri: You must provide a TARGET")
}
-defineReplace(stripOutDir) {
- return($$relative_path($$1, $$OUT_PWD))
-}
-
PLUGINJSON = $$_PRO_FILE_PWD_/$${TARGET}.json
PLUGINJSON_IN = $${PLUGINJSON}.in
exists($$PLUGINJSON_IN) {
diff --git a/tests/auto/qml/codemodel/check/tst_check.cpp b/tests/auto/qml/codemodel/check/tst_check.cpp
index 84b669577b..4cc48d4d70 100644
--- a/tests/auto/qml/codemodel/check/tst_check.cpp
+++ b/tests/auto/qml/codemodel/check/tst_check.cpp
@@ -43,6 +43,7 @@
#include <qmljs/qmljscheck.h>
#include <qmljs/qmljscontext.h>
#include <qmljs/parser/qmljsast_p.h>
+#include <qmljs/parser/qmljsengine_p.h>
#include <QtTest>
#include <algorithm>
diff --git a/tests/auto/qml/reformatter/tst_reformatter.cpp b/tests/auto/qml/reformatter/tst_reformatter.cpp
index b69665a29d..e7c0c52e8d 100644
--- a/tests/auto/qml/reformatter/tst_reformatter.cpp
+++ b/tests/auto/qml/reformatter/tst_reformatter.cpp
@@ -40,6 +40,7 @@
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <qmljs/qmljsreformatter.h>
#include <qmljs/parser/qmljsast_p.h>
+#include <qmljs/parser/qmljsengine_p.h>
#include <QtTest>
#include <algorithm>
diff --git a/tests/auto/valgrind/memcheck/memcheck.pro b/tests/auto/valgrind/memcheck/memcheck.pro
index eed8482d76..977beb7937 100644
--- a/tests/auto/valgrind/memcheck/memcheck.pro
+++ b/tests/auto/valgrind/memcheck/memcheck.pro
@@ -1,3 +1,14 @@
TEMPLATE = subdirs
-CONFIG += ordered
-SUBDIRS += parsertests.pro modeldemo.pro testapps testrunner.pro
+
+parsertests.file = parsertests.pro
+
+modeldemo.file = modeldemo.pro
+
+testapps.depends = modeldemo parsertests
+
+testrunner.file = testrunner.pro
+testrunner.depends = testapps
+
+SUBDIRS += parsertests modeldemo testapps testrunner
+
+
diff --git a/tests/auto/valgrind/memcheck/testrunner.cpp b/tests/auto/valgrind/memcheck/testrunner.cpp
index b0a3c3a2d6..7ce005166c 100644
--- a/tests/auto/valgrind/memcheck/testrunner.cpp
+++ b/tests/auto/valgrind/memcheck/testrunner.cpp
@@ -559,7 +559,7 @@ void TestRunner::syscall()
const Frame frame = stack.frames().first();
QCOMPARE(frame.functionName(), QLatin1String("main"));
- QCOMPARE(frame.line(), 4 + HEADER_LENGTH);
+ QCOMPARE(frame.line(), 2 + HEADER_LENGTH);
QCOMPARE(frame.object(), binary);
QCOMPARE(frame.file(), QLatin1String("main.cpp"));
diff --git a/tests/manual/shootout/tst_codesize.cpp b/tests/manual/shootout/tst_codesize.cpp
index ee1048d307..f4d224dcc3 100644
--- a/tests/manual/shootout/tst_codesize.cpp
+++ b/tests/manual/shootout/tst_codesize.cpp
@@ -62,6 +62,8 @@ struct Suite
{
Suite() : flags(0) {}
+ void clear() { cases.clear(); }
+
QByteArray title;
int flags;
QByteArray cmd;
@@ -99,6 +101,7 @@ public:
private slots:
void initTestCase();
+
void codesize();
void codesize_data();
void init();
@@ -205,7 +208,7 @@ void tst_CodeSize::codesize()
QProcess qmake;
qmake.setWorkingDirectory(t->buildPath);
QString cmd = QString::fromLatin1(m_qmakeBinary + " -r doit.pro");
- //qDebug() << "Starting qmake: " << cmd;
+ qDebug() << "Starting qmake: " << cmd;
qmake.start(cmd);
// QVERIFY(qmake.waitForFinished());
qmake.waitForFinished();
@@ -272,8 +275,10 @@ void tst_CodeSize::codesize_data()
{
QTest::addColumn<Suite>("suite");
+ Case c;
Suite s;
s.flags = Optimize;
+
// FIXME: Cannot be hardcoded. Assume matching qmake for now.
#ifdef Q_CC_MSVC
s.cmd = "dumpbin /DISASM /SECTION:.text$mn";
@@ -282,7 +287,6 @@ void tst_CodeSize::codesize_data()
#endif
s.title = "This 'test' compares different approaches to return something \n"
"like an immutable string from a function.";
- Case c;
c.file = "latin1string";
c.gist = "QString f1() { return QLatin1String(\"foo\"); }\n";
c.code = "#include <QString>\n" + c.gist;
@@ -309,7 +313,29 @@ void tst_CodeSize::codesize_data()
c.code = c.gist;
s.cases.append(c);
- QTest::newRow("return string (no stack protector)") << s;
+ QTest::newRow("return_string") << s;
+ s.clear();
+
+
+ c.file = "one";
+ c.gist = "one";
+ c.code = "#include <functional>\n"
+ "int x(int a) { return a * a; }\n"
+ "void bar(std::function<int()>);\n"
+ "void foo() { bar([] { return x(1); }); }\n";
+ s.cases.append(c);
+
+ c.file = "two";
+ c.gist = "two";
+ c.code = "#include <functional>\n"
+ "int x(int a) { return a * a; }\n"
+ "void bar(std::function<int()>);\n"
+ "void foo1() { int a = 1; bar([a] { return x(a); }); }\n"
+ "void foo2() { int a = 2; bar([a] { return x(a); }); }\n";
+ s.cases.append(c);
+
+ QTest::newRow("lambdas") << s;
+ s.clear();
}
int main(int argc, char *argv[])
diff --git a/tests/system/suite_general/tst_rename_file/test.py b/tests/system/suite_general/tst_rename_file/test.py
index 34309bbda2..25fa7c48fd 100644
--- a/tests/system/suite_general/tst_rename_file/test.py
+++ b/tests/system/suite_general/tst_rename_file/test.py
@@ -55,15 +55,13 @@ def main():
previous = filenames[-1]
for filename in filenames:
tempFiletype = filetype
- if filetype == "QML" and previous[-4:] != ".qml":
+ if previous in ("test", "TEST"):
+ if tempFiletype in ("Headers", "Sources", "QML"):
+ tempFiletype = "Sources"
+ else: # then it must be Resources
+ tempFiletype = "Other files"
+ elif filetype == "QML" and previous[-4:] != ".qml":
tempFiletype = "Other files"
- # following is necessary due to QTCREATORBUG-10179
- # will be fixed when Qt5's MIME type database can be used
- if ((filenames[-1] in ("main.cpp", "utility.cpp") and previous[-4:] != ".cpp")
- or (filenames[-1] == "utility.h" and previous[-2:].lower() != ".h")
- or (filetype == "Resources" and previous[-4:] != ".qrc")):
- tempFiletype = "Other files"
- # end of handling QTCREATORBUG-10179
renameFile(templateDir, usedProFile, projectName + "." + tempFiletype,
previous, filename)
# QTCREATORBUG-13176 does update the navigator async
@@ -99,7 +97,7 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
if platform.system() == 'Darwin':
waitFor("macHackActivateContextMenuItem('Rename...')", 5000)
else:
- if oldname.endswith(".qrc"):
+ if oldname.lower().endswith(".qrc"):
menu = ":Qt Creator.Project.Menu.Folder_QMenu"
else:
menu = ":Qt Creator.Project.Menu.File_QMenu"
diff --git a/tests/tools/qml-ast2dot/main.cpp b/tests/tools/qml-ast2dot/main.cpp
index da5eef842d..6e369c16e8 100644
--- a/tests/tools/qml-ast2dot/main.cpp
+++ b/tests/tools/qml-ast2dot/main.cpp
@@ -30,6 +30,7 @@
#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/parser/qmljsastvisitor_p.h>
+#include <qmljs/parser/qmljsengine_p.h>
#include <qmljs/qmljsdocument.h>
#include <qmljs/qmljsmodelmanagerinterface.h>