diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-10-30 13:34:46 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-10-30 13:34:46 +0100 |
commit | 0ddb6cac29628425b7c2490a20df944f062ce50c (patch) | |
tree | 8527a12fbc6eb6d3fc7a8e4a30044f549bc2fd92 /src/plugins | |
parent | bcd704d7bf5a1daa3d0ad9574386c11981c409a2 (diff) | |
parent | 88c647ce6868cd7ab03ec96062d2a77813b6e906 (diff) | |
download | qt-creator-0ddb6cac29628425b7c2490a20df944f062ce50c.tar.gz |
Merge remote-tracking branch 'origin/3.0'
Conflicts:
src/plugins/qmakeprojectmanager/qmakeproject.cpp
Change-Id: Id6ac9051d2564788bb180e5a99243d588312ae99
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/android/android.qbs | 2 | ||||
-rw-r--r-- | src/plugins/android/android_dependencies.pri | 2 | ||||
-rw-r--r-- | src/plugins/android/androiddebugsupport.cpp | 18 | ||||
-rw-r--r-- | src/plugins/android/androiddeployconfiguration.cpp | 4 | ||||
-rw-r--r-- | src/plugins/android/androiddeployqtstep.cpp | 16 | ||||
-rw-r--r-- | src/plugins/android/androiddeployqtwidget.cpp | 26 | ||||
-rw-r--r-- | src/plugins/android/androiddeployqtwidget.h | 4 | ||||
-rw-r--r-- | src/plugins/android/androiddeploystep.cpp | 12 | ||||
-rw-r--r-- | src/plugins/android/androidextralibrarylistmodel.cpp | 18 | ||||
-rw-r--r-- | src/plugins/android/androidextralibrarylistmodel.h | 6 | ||||
-rw-r--r-- | src/plugins/android/androidmanager.cpp | 48 | ||||
-rw-r--r-- | src/plugins/android/androidmanifesteditorwidget.cpp | 2 | ||||
-rw-r--r-- | src/plugins/android/androidpackagecreationstep.cpp | 16 | ||||
-rw-r--r-- | src/plugins/android/androidpackagecreationwidget.cpp | 12 | ||||
-rw-r--r-- | src/plugins/android/androidpackagecreationwidget.h | 4 | ||||
-rw-r--r-- | src/plugins/android/androidpackageinstallationstep.cpp | 2 | ||||
-rw-r--r-- | src/plugins/android/androidqtversion.cpp | 10 | ||||
-rw-r--r-- | src/plugins/android/androidrunconfiguration.cpp | 20 | ||||
-rw-r--r-- | src/plugins/android/androidrunconfiguration.h | 4 | ||||
-rw-r--r-- | src/plugins/android/androidrunfactories.cpp | 8 | ||||
-rw-r--r-- | src/plugins/android/androidrunfactories.h | 2 | ||||
-rw-r--r-- | src/plugins/android/createandroidmanifestwizard.cpp | 22 | ||||
-rw-r--r-- | src/plugins/android/createandroidmanifestwizard.h | 10 | ||||
-rw-r--r-- | src/plugins/cpptools/cpppreprocessor.cpp | 5 | ||||
-rw-r--r-- | src/plugins/debugger/debuggeritem.cpp | 19 | ||||
-rw-r--r-- | src/plugins/debugger/debuggeritemmanager.cpp | 11 | ||||
-rw-r--r-- | src/plugins/debugger/debuggeritemmanager.h | 1 | ||||
-rw-r--r-- | src/plugins/debugger/debuggeroptionspage.cpp | 4 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 39 | ||||
-rw-r--r-- | src/plugins/debugger/lldb/lldbengine.cpp | 55 | ||||
-rw-r--r-- | src/plugins/debugger/lldb/lldbengine.h | 4 | ||||
-rw-r--r-- | src/plugins/ios/ios.qbs | 2 | ||||
-rw-r--r-- | src/plugins/ios/ios_dependencies.pri | 2 | ||||
-rw-r--r-- | src/plugins/ios/iosbuildstep.cpp | 10 | ||||
-rw-r--r-- | src/plugins/ios/iosconfigurations.cpp | 19 | ||||
-rw-r--r-- | src/plugins/ios/iosconfigurations.h | 2 | ||||
-rw-r--r-- | src/plugins/ios/iosdebugsupport.cpp | 94 | ||||
-rw-r--r-- | src/plugins/ios/iosdebugsupport.h | 5 | ||||
-rw-r--r-- | src/plugins/ios/iosdeployconfiguration.cpp | 4 | ||||
-rw-r--r-- | src/plugins/ios/iosdeploystep.cpp | 6 | ||||
-rw-r--r-- | src/plugins/ios/iosmanager.cpp | 14 | ||||
-rw-r--r-- | src/plugins/ios/iosprobe.cpp | 2 | ||||
-rw-r--r-- | src/plugins/ios/iosqtversion.cpp | 4 | ||||
-rw-r--r-- | src/plugins/ios/iosrunconfiguration.cpp | 14 | ||||
-rw-r--r-- | src/plugins/ios/iosrunfactories.cpp | 8 | ||||
-rw-r--r-- | src/plugins/ios/iosrunfactories.h | 2 | ||||
-rw-r--r-- | src/plugins/ios/iostoolhandler.cpp | 32 | ||||
-rw-r--r-- | src/plugins/plugins.pro | 2 | ||||
-rw-r--r-- | src/plugins/plugins.qbs | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/gcctoolchain.cpp | 182 | ||||
-rw-r--r-- | src/plugins/projectexplorer/gcctoolchain.h | 12 | ||||
-rw-r--r-- | src/plugins/projectexplorer/gcctoolchainfactories.h | 1 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectnodes.cpp | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/settingsaccessor.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/QmakeProjectManager.mimetypes.xml (renamed from src/plugins/qt4projectmanager/Qt4ProjectManager.mimetypes.xml) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in (renamed from src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec.in) | 4 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/addlibrarywizard.cpp (renamed from src/plugins/qt4projectmanager/addlibrarywizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/addlibrarywizard.h (renamed from src/plugins/qt4projectmanager/addlibrarywizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/applicationlauncher.h (renamed from src/plugins/qt4projectmanager/applicationlauncher.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp (renamed from src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.ui (renamed from src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.cpp (renamed from src/plugins/qt4projectmanager/customwidgetwizard/classlist.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/classlist.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.ui (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.ui (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.ui) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.cpp (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.pri (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.pri) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.cpp (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/filenamingparameters.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/filenamingparameters.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.cpp (renamed from src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/customwidgetwizard/pluginoptions.h (renamed from src/plugins/qt4projectmanager/customwidgetwizard/pluginoptions.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp (renamed from src/plugins/qt4projectmanager/qmakerunconfiguration.cpp) | 310 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h (renamed from src/plugins/qt4projectmanager/qmakerunconfiguration.h) | 46 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/externaleditors.cpp (renamed from src/plugins/qt4projectmanager/externaleditors.cpp) | 8 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/externaleditors.h (renamed from src/plugins/qt4projectmanager/externaleditors.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/findqmakeprofiles.cpp (renamed from src/plugins/qt4projectmanager/findqmakeprofiles.cpp) | 6 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/findqmakeprofiles.h (renamed from src/plugins/qt4projectmanager/findqmakeprofiles.h) | 16 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/images/headers.png (renamed from src/plugins/qt4projectmanager/images/headers.png) | bin | 210 -> 210 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/images/run_qmake.png (renamed from src/plugins/qt4projectmanager/images/run_qmake.png) | bin | 1903 -> 1903 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/images/run_qmake_small.png (renamed from src/plugins/qt4projectmanager/images/run_qmake_small.png) | bin | 804 -> 804 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/images/sources.png (renamed from src/plugins/qt4projectmanager/images/sources.png) | bin | 343 -> 343 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/images/unknown.png (renamed from src/plugins/qt4projectmanager/images/unknown.png) | bin | 407 -> 407 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp (renamed from src/plugins/qt4projectmanager/librarydetailscontroller.cpp) | 20 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/librarydetailscontroller.h (renamed from src/plugins/qt4projectmanager/librarydetailscontroller.h) | 4 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/librarydetailswidget.ui (renamed from src/plugins/qt4projectmanager/librarydetailswidget.ui) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/makestep.cpp (renamed from src/plugins/qt4projectmanager/makestep.cpp) | 24 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/makestep.h (renamed from src/plugins/qt4projectmanager/makestep.h) | 10 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/makestep.ui (renamed from src/plugins/qt4projectmanager/makestep.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profilecompletionassist.cpp (renamed from src/plugins/qt4projectmanager/profilecompletionassist.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profilecompletionassist.h (renamed from src/plugins/qt4projectmanager/profilecompletionassist.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profileeditor.cpp (renamed from src/plugins/qt4projectmanager/profileeditor.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profileeditor.h (renamed from src/plugins/qt4projectmanager/profileeditor.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profileeditorfactory.cpp (renamed from src/plugins/qt4projectmanager/profileeditorfactory.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profileeditorfactory.h (renamed from src/plugins/qt4projectmanager/profileeditorfactory.h) | 8 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profilehighlighter.cpp (renamed from src/plugins/qt4projectmanager/profilehighlighter.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profilehighlighter.h (renamed from src/plugins/qt4projectmanager/profilehighlighter.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profilehighlighterfactory.cpp (renamed from src/plugins/qt4projectmanager/profilehighlighterfactory.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profilehighlighterfactory.h (renamed from src/plugins/qt4projectmanager/profilehighlighterfactory.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profilehoverhandler.cpp (renamed from src/plugins/qt4projectmanager/profilehoverhandler.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/profilehoverhandler.h (renamed from src/plugins/qt4projectmanager/profilehoverhandler.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp (renamed from src/plugins/qt4projectmanager/qmakebuildconfiguration.cpp) | 142 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h (renamed from src/plugins/qt4projectmanager/qmakebuildconfiguration.h) | 38 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakebuildinfo.h (renamed from src/plugins/qt4projectmanager/qmakebuildinfo.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakekitconfigwidget.cpp (renamed from src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakekitconfigwidget.h (renamed from src/plugins/qt4projectmanager/qmakekitconfigwidget.h) | 6 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakekitinformation.cpp (renamed from src/plugins/qt4projectmanager/qmakekitinformation.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakekitinformation.h (renamed from src/plugins/qt4projectmanager/qmakekitinformation.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakenodes.cpp (renamed from src/plugins/qt4projectmanager/qmakenodes.cpp) | 386 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakenodes.h (renamed from src/plugins/qt4projectmanager/qmakenodes.h) | 102 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeparser.cpp (renamed from src/plugins/qt4projectmanager/qmakeparser.cpp) | 4 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeparser.h (renamed from src/plugins/qt4projectmanager/qmakeparser.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeproject.cpp (renamed from src/plugins/qt4projectmanager/qmakeproject.cpp) | 328 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeproject.h (renamed from src/plugins/qt4projectmanager/qmakeproject.h) | 77 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp (renamed from src/plugins/qt4projectmanager/qmakeprojectconfigwidget.cpp) | 38 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.h (renamed from src/plugins/qt4projectmanager/qmakeprojectconfigwidget.h) | 22 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.ui (renamed from src/plugins/qt4projectmanager/qmakeprojectconfigwidget.ui) | 4 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp (renamed from src/plugins/qt4projectmanager/qmakeprojectimporter.cpp) | 8 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectimporter.h (renamed from src/plugins/qt4projectmanager/qmakeprojectimporter.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanager.cpp (renamed from src/plugins/qt4projectmanager/qmakeprojectmanager.cpp) | 107 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanager.h (renamed from src/plugins/qt4projectmanager/qmakeprojectmanager.h) | 21 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanager.pro (renamed from src/plugins/qt4projectmanager/qt4projectmanager.pro) | 6 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanager.qbs (renamed from src/plugins/qt4projectmanager/qt4projectmanager.qbs) | 4 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanager.qrc (renamed from src/plugins/qt4projectmanager/qmakeprojectmanager.qrc) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanager_dependencies.pri (renamed from src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanager_global.h (renamed from src/plugins/qt4projectmanager/qmakeprojectmanager_global.h) | 12 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanagerconstants.h (renamed from src/plugins/qt4projectmanager/qmakeprojectmanagerconstants.h) | 9 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp (renamed from src/plugins/qt4projectmanager/qmakeprojectmanagerplugin.cpp) | 102 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.h (renamed from src/plugins/qt4projectmanager/qmakeprojectmanagerplugin.h) | 22 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakerunconfigurationfactory.cpp (renamed from src/plugins/qt4projectmanager/qmakerunconfigurationfactory.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakerunconfigurationfactory.h (renamed from src/plugins/qt4projectmanager/qmakerunconfigurationfactory.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakestep.cpp (renamed from src/plugins/qt4projectmanager/qmakestep.cpp) | 36 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakestep.h (renamed from src/plugins/qt4projectmanager/qmakestep.h) | 8 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakestep.ui (renamed from src/plugins/qt4projectmanager/qmakestep.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qtmodulesinfo.cpp (renamed from src/plugins/qt4projectmanager/qtmodulesinfo.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qtmodulesinfo.h (renamed from src/plugins/qt4projectmanager/qtmodulesinfo.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/abstractmobileapp.cpp (renamed from src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/abstractmobileapp.h (renamed from src/plugins/qt4projectmanager/wizards/abstractmobileapp.h) | 4 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/abstractmobileappwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp) | 10 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/abstractmobileappwizard.h (renamed from src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h) | 6 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/consoleappwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/consoleappwizard.h (renamed from src/plugins/qt4projectmanager/wizards/consoleappwizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/consoleappwizarddialog.cpp (renamed from src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/consoleappwizarddialog.h (renamed from src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/emptyprojectwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/emptyprojectwizard.h (renamed from src/plugins/qt4projectmanager/wizards/emptyprojectwizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/emptyprojectwizarddialog.cpp (renamed from src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/emptyprojectwizarddialog.h (renamed from src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/filespage.cpp (renamed from src/plugins/qt4projectmanager/wizards/filespage.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/filespage.h (renamed from src/plugins/qt4projectmanager/wizards/filespage.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/guiappwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/guiappwizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/guiappwizard.h (renamed from src/plugins/qt4projectmanager/wizards/guiappwizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/guiappwizarddialog.cpp (renamed from src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/guiappwizarddialog.h (renamed from src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/html5app.cpp (renamed from src/plugins/qt4projectmanager/wizards/html5app.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/html5app.h (renamed from src/plugins/qt4projectmanager/wizards/html5app.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/html5appwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/html5appwizard.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/html5appwizard.h (renamed from src/plugins/qt4projectmanager/wizards/html5appwizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/html5appwizardpages.cpp (renamed from src/plugins/qt4projectmanager/wizards/html5appwizardpages.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/html5appwizardpages.h (renamed from src/plugins/qt4projectmanager/wizards/html5appwizardpages.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/html5appwizardsourcespage.ui (renamed from src/plugins/qt4projectmanager/wizards/html5appwizardsourcespage.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/images/console.png (renamed from src/plugins/qt4projectmanager/wizards/images/console.png) | bin | 567 -> 567 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/images/gui.png (renamed from src/plugins/qt4projectmanager/wizards/images/gui.png) | bin | 831 -> 831 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/images/html5app.png (renamed from src/plugins/qt4projectmanager/wizards/images/html5app.png) | bin | 664 -> 664 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/images/lib.png (renamed from src/plugins/qt4projectmanager/wizards/images/lib.png) | bin | 1245 -> 1245 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/images/qtquickapp.png (renamed from src/plugins/qt4projectmanager/wizards/images/qtquickapp.png) | bin | 586 -> 586 bytes | |||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/libraryparameters.cpp (renamed from src/plugins/qt4projectmanager/wizards/libraryparameters.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/libraryparameters.h (renamed from src/plugins/qt4projectmanager/wizards/libraryparameters.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/librarywizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/librarywizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/librarywizard.h (renamed from src/plugins/qt4projectmanager/wizards/librarywizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/librarywizarddialog.cpp (renamed from src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp) | 8 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/librarywizarddialog.h (renamed from src/plugins/qt4projectmanager/wizards/librarywizarddialog.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobileapp.cpp (renamed from src/plugins/qt4projectmanager/wizards/mobileapp.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobileapp.h (renamed from src/plugins/qt4projectmanager/wizards/mobileapp.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobileappwizardgenericoptionspage.ui (renamed from src/plugins/qt4projectmanager/wizards/mobileappwizardgenericoptionspage.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobileappwizardpages.cpp (renamed from src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobileappwizardpages.h (renamed from src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobilelibraryparameters.cpp (renamed from src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobilelibraryparameters.h (renamed from src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.cpp (renamed from src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.h (renamed from src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.ui (renamed from src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/modulespage.cpp (renamed from src/plugins/qt4projectmanager/wizards/modulespage.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/modulespage.h (renamed from src/plugins/qt4projectmanager/wizards/modulespage.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtprojectparameters.cpp (renamed from src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtprojectparameters.h (renamed from src/plugins/qt4projectmanager/wizards/qtprojectparameters.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtquickapp.cpp (renamed from src/plugins/qt4projectmanager/wizards/qtquickapp.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtquickapp.h (renamed from src/plugins/qt4projectmanager/wizards/qtquickapp.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtquickappwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtquickappwizard.h (renamed from src/plugins/qt4projectmanager/wizards/qtquickappwizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtquickappwizardpages.cpp (renamed from src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtquickappwizardpages.h (renamed from src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtquickcomponentsetoptionspage.ui (renamed from src/plugins/qt4projectmanager/wizards/qtquickcomponentsetoptionspage.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/qtwizard.cpp) | 60 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/qtwizard.h (renamed from src/plugins/qt4projectmanager/wizards/qtwizard.h) | 19 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.h (renamed from src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.cpp (renamed from src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.h (renamed from src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/testwizard.cpp (renamed from src/plugins/qt4projectmanager/wizards/testwizard.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/testwizard.h (renamed from src/plugins/qt4projectmanager/wizards/testwizard.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/testwizarddialog.cpp (renamed from src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/testwizarddialog.h (renamed from src/plugins/qt4projectmanager/wizards/testwizarddialog.h) | 2 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/testwizardpage.cpp (renamed from src/plugins/qt4projectmanager/wizards/testwizardpage.cpp) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/testwizardpage.h (renamed from src/plugins/qt4projectmanager/wizards/testwizardpage.h) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/testwizardpage.ui (renamed from src/plugins/qt4projectmanager/wizards/testwizardpage.ui) | 0 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/wizards/wizards.qrc (renamed from src/plugins/qt4projectmanager/wizards/wizards.qrc) | 0 | ||||
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp | 3 | ||||
-rw-r--r-- | src/plugins/qmldesigner/qmldesigner.qbs | 2 | ||||
-rw-r--r-- | src/plugins/qmljstools/qmlconsoleview.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofiler.qbs | 2 | ||||
-rw-r--r-- | src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qnx/Qnx.pluginspec.in | 8 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryapplicationrunner.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryconfiguration.cpp | 126 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryconfiguration.h | 18 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryconfigurationmanager.cpp | 20 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryconfigurationmanager.h | 1 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrycreatepackagestep.cpp | 6 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrydeployconfiguration.cpp | 12 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrydeployconfigurationfactory.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrydeployinformation.cpp | 20 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrydeployinformation.h | 8 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrydeploystep.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryrunconfiguration.h | 6 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryrunconfigurationfactory.cpp | 8 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryruncontrol.h | 2 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryruncontrolfactory.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qnx/qnx.pro | 2 | ||||
-rw-r--r-- | src/plugins/qnx/qnx.qbs | 4 | ||||
-rw-r--r-- | src/plugins/qnx/qnx_dependencies.pri | 2 | ||||
-rw-r--r-- | src/plugins/qnx/qnxconstants.h | 2 | ||||
-rw-r--r-- | src/plugins/qnx/qnxplugin.cpp | 5 | ||||
-rw-r--r-- | src/plugins/qnx/qnxrunconfigurationfactory.cpp | 6 | ||||
-rw-r--r-- | src/plugins/qnx/qnxtoolchain.cpp | 269 | ||||
-rw-r--r-- | src/plugins/qnx/qnxtoolchain.h | 113 | ||||
-rw-r--r-- | src/plugins/qtsupport/qtsupportconstants.h | 2 | ||||
-rw-r--r-- | src/plugins/texteditor/basetexteditor.cpp | 1 | ||||
-rw-r--r-- | src/plugins/texteditor/basetexteditor.h | 1 | ||||
-rw-r--r-- | src/plugins/texteditor/findinfiles.cpp | 16 | ||||
-rw-r--r-- | src/plugins/texteditor/findinfiles.h | 2 | ||||
-rw-r--r-- | src/plugins/texteditor/texteditoractionhandler.cpp | 1 |
249 files changed, 2129 insertions, 1481 deletions
diff --git a/src/plugins/android/android.qbs b/src/plugins/android/android.qbs index 5a6a3e5980..ef1ffa7ea6 100644 --- a/src/plugins/android/android.qbs +++ b/src/plugins/android/android.qbs @@ -7,7 +7,7 @@ QtcPlugin { Depends { name: "Core" } Depends { name: "ProjectExplorer" } - Depends { name: "Qt4ProjectManager" } + Depends { name: "QmakeProjectManager" } Depends { name: "Debugger" } Depends { name: "QmlDebug" } Depends { name: "QtSupport" } diff --git a/src/plugins/android/android_dependencies.pri b/src/plugins/android/android_dependencies.pri index 18c797bc2a..70e5329f20 100644 --- a/src/plugins/android/android_dependencies.pri +++ b/src/plugins/android/android_dependencies.pri @@ -3,7 +3,7 @@ QTC_PLUGIN_DEPENDS += \ coreplugin \ debugger \ projectexplorer \ - qt4projectmanager \ + qmakeprojectmanager \ qtsupport \ texteditor \ analyzerbase diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp index f623b7e1b6..b17e0cc22b 100644 --- a/src/plugins/android/androiddebugsupport.cpp +++ b/src/plugins/android/androiddebugsupport.cpp @@ -43,9 +43,9 @@ #include <projectexplorer/target.h> #include <projectexplorer/toolchain.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakenodes.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> #include <qtsupport/qtkitinformation.h> #include <QDir> @@ -86,7 +86,7 @@ static QStringList qtSoPaths(QtSupport::BaseQtVersion *qtVersion) RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *runConfig, QString *errorMessage) { Target *target = runConfig->target(); - Qt4Project *project = static_cast<Qt4Project *>(target->project()); + QmakeProject *project = static_cast<QmakeProject *>(target->project()); DebuggerStartParameters params; params.startMode = AttachToRemoteServer; @@ -102,11 +102,11 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration * params.debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString(); if (ToolChain *tc = ToolChainKitInformation::toolChain(kit)) params.toolChainAbi = tc->targetAbi(); - params.executable = project->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process"); + params.executable = project->rootQmakeProjectNode()->buildDir() + QLatin1String("/app_process"); params.remoteChannel = runConfig->remoteChannel(); params.solibSearchPath.clear(); - QList<Qt4ProFileNode *> nodes = project->allProFiles(); - foreach (Qt4ProFileNode *node, nodes) + QList<QmakeProFileNode *> nodes = project->allProFiles(); + foreach (QmakeProFileNode *node, nodes) if (node->projectType() == ApplicationTemplate) params.solibSearchPath.append(node->targetInformation().buildDir); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit); @@ -121,8 +121,8 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration * params.remoteSetupNeeded = true; //TODO: Not sure if these are the right paths. params.projectSourceDirectory = project->projectDirectory(); - params.projectSourceFiles = project->files(Qt4Project::ExcludeGeneratedFiles); - params.projectBuildDirectory = project->rootQt4ProjectNode()->buildDir(); + params.projectSourceFiles = project->files(QmakeProject::ExcludeGeneratedFiles); + params.projectBuildDirectory = project->rootQmakeProjectNode()->buildDir(); } DebuggerRunControl * const debuggerRunControl diff --git a/src/plugins/android/androiddeployconfiguration.cpp b/src/plugins/android/androiddeployconfiguration.cpp index 1dfac6e0d8..d7043e8cbd 100644 --- a/src/plugins/android/androiddeployconfiguration.cpp +++ b/src/plugins/android/androiddeployconfiguration.cpp @@ -39,7 +39,7 @@ #include <projectexplorer/target.h> #include <projectexplorer/toolchain.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeproject.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> @@ -124,7 +124,7 @@ DeployConfiguration *AndroidDeployConfigurationFactory::clone(Target *parent, De QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(Target *parent) const { QList<Core::Id> ids; - if (!qobject_cast<QmakeProjectManager::Qt4Project *>(parent->project())) + if (!qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project())) return ids; if (!parent->project()->supportsKit(parent->kit())) diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index 75e39a6f9e..4e9498ecdb 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -45,9 +45,9 @@ #include <projectexplorer/target.h> #include <projectexplorer/project.h> #include <qtsupport/qtkitinformation.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <QInputDialog> #include <QMessageBox> @@ -188,8 +188,8 @@ bool AndroidDeployQtStep::init() m_serialNumber = info.serialNumber; } - QmakeProjectManager::Qt4BuildConfiguration *bc - = static_cast<QmakeProjectManager::Qt4BuildConfiguration *>(target()->activeBuildConfiguration()); + QmakeProjectManager::QmakeBuildConfiguration *bc + = static_cast<QmakeProjectManager::QmakeBuildConfiguration *>(target()->activeBuildConfiguration()); if (m_signPackage) { // check keystore and certificate passwords @@ -345,11 +345,11 @@ void AndroidDeployQtStep::runCommand(const QString &program, const QStringList & void AndroidDeployQtStep::updateInputFile() { - QmakeProjectManager::Qt4Project *pro = static_cast<QmakeProjectManager::Qt4Project *>(project()); - QList<QmakeProjectManager::Qt4ProFileNode *> nodes = pro->applicationProFiles(); + QmakeProjectManager::QmakeProject *pro = static_cast<QmakeProjectManager::QmakeProject *>(project()); + QList<QmakeProjectManager::QmakeProFileNode *> nodes = pro->applicationProFiles(); QStringList inputFiles; - foreach (QmakeProjectManager::Qt4ProFileNode *node, nodes) + foreach (QmakeProjectManager::QmakeProFileNode *node, nodes) inputFiles << node->singleVariableValue(QmakeProjectManager::AndroidDeploySettingsFile); if (!inputFiles.contains(m_inputFile)) diff --git a/src/plugins/android/androiddeployqtwidget.cpp b/src/plugins/android/androiddeployqtwidget.cpp index d7c4c3885b..a1dee1ddba 100644 --- a/src/plugins/android/androiddeployqtwidget.cpp +++ b/src/plugins/android/androiddeployqtwidget.cpp @@ -38,9 +38,9 @@ #include "androidextralibrarylistmodel.h" #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <QFileDialog> @@ -135,7 +135,7 @@ AndroidDeployQtWidget::AndroidDeployQtWidget(AndroidDeployQtStep *step) connect(m_ui->createAndroidManifestButton, SIGNAL(clicked()), this, SLOT(createManifestButton())); - m_extraLibraryListModel = new AndroidExtraLibraryListModel(static_cast<QmakeProjectManager::Qt4Project *>(m_step->project()), + m_extraLibraryListModel = new AndroidExtraLibraryListModel(static_cast<QmakeProjectManager::QmakeProject *>(m_step->project()), this); m_ui->androidExtraLibsListView->setModel(m_extraLibraryListModel); @@ -156,8 +156,8 @@ AndroidDeployQtWidget::~AndroidDeployQtWidget() void AndroidDeployQtWidget::checkProjectTemplate() { - QmakeProjectManager::Qt4Project *project = static_cast<QmakeProjectManager::Qt4Project *>(m_step->project()); - if (project->rootQt4ProjectNode()->projectType() == QmakeProjectManager::ApplicationTemplate) + QmakeProjectManager::QmakeProject *project = static_cast<QmakeProjectManager::QmakeProject *>(m_step->project()); + if (project->rootQmakeProjectNode()->projectType() == QmakeProjectManager::ApplicationTemplate) m_ui->additionalLibrariesGroupBox->setEnabled(true); else m_ui->additionalLibrariesGroupBox->setEnabled(false); @@ -171,9 +171,9 @@ void AndroidDeployQtWidget::createManifestButton() void AndroidDeployQtWidget::updateInputFileUi() { - QmakeProjectManager::Qt4Project *project - = static_cast<QmakeProjectManager::Qt4Project *>(m_step->project()); - QList<QmakeProjectManager::Qt4ProFileNode *> nodes = project->applicationProFiles(); + QmakeProjectManager::QmakeProject *project + = static_cast<QmakeProjectManager::QmakeProject *>(m_step->project()); + QList<QmakeProjectManager::QmakeProFileNode *> nodes = project->applicationProFiles(); int size = nodes.size(); if (size == 0 || size == 1) { // there's nothing to select, e.g. before parsing @@ -185,7 +185,7 @@ void AndroidDeployQtWidget::updateInputFileUi() m_ui->inputFileComboBox->setVisible(true); m_ui->inputFileComboBox->clear(); - foreach (QmakeProjectManager::Qt4ProFileNode *node, nodes) { + foreach (QmakeProjectManager::QmakeProFileNode *node, nodes) { QString file = node->singleVariableValue(QmakeProjectManager::AndroidDeploySettingsFile); m_ui->inputFileComboBox->addItem(node->displayName(), file); } @@ -325,8 +325,8 @@ void AndroidDeployQtWidget::activeBuildConfigurationChanged() disconnect(m_currentBuildConfiguration, SIGNAL(qmakeBuildConfigurationChanged()), this, SLOT(updateSigningWarning())); updateSigningWarning(); - QmakeProjectManager::Qt4BuildConfiguration *bc - = qobject_cast<QmakeProjectManager::Qt4BuildConfiguration *>(m_step->target()->activeBuildConfiguration()); + QmakeProjectManager::QmakeBuildConfiguration *bc + = qobject_cast<QmakeProjectManager::QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration()); m_currentBuildConfiguration = bc; if (bc) connect(bc, SIGNAL(qmakeBuildConfigurationChanged()), this, SLOT(updateSigningWarning())); @@ -335,7 +335,7 @@ void AndroidDeployQtWidget::activeBuildConfigurationChanged() void AndroidDeployQtWidget::updateSigningWarning() { - QmakeProjectManager::Qt4BuildConfiguration *bc = qobject_cast<QmakeProjectManager::Qt4BuildConfiguration *>(m_step->target()->activeBuildConfiguration()); + QmakeProjectManager::QmakeBuildConfiguration *bc = qobject_cast<QmakeProjectManager::QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration()); bool debug = bc && (bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild); if (m_step->signPackage() && debug) { m_ui->signingDebugWarningIcon->setVisible(true); diff --git a/src/plugins/android/androiddeployqtwidget.h b/src/plugins/android/androiddeployqtwidget.h index 003ed3f1fc..fc65466eb5 100644 --- a/src/plugins/android/androiddeployqtwidget.h +++ b/src/plugins/android/androiddeployqtwidget.h @@ -38,7 +38,7 @@ QT_BEGIN_NAMESPACE namespace Ui { class AndroidDeployQtWidget; } QT_END_NAMESPACE -namespace QmakeProjectManager { class Qt4BuildConfiguration; } +namespace QmakeProjectManager { class QmakeBuildConfiguration; } namespace Android { namespace Internal { @@ -85,7 +85,7 @@ private: Ui::AndroidDeployQtWidget *m_ui; AndroidDeployQtStep *m_step; AndroidExtraLibraryListModel *m_extraLibraryListModel; - QmakeProjectManager::Qt4BuildConfiguration *m_currentBuildConfiguration; + QmakeProjectManager::QmakeBuildConfiguration *m_currentBuildConfiguration; bool m_ignoreChange; }; diff --git a/src/plugins/android/androiddeploystep.cpp b/src/plugins/android/androiddeploystep.cpp index dcdb8968ff..d971eb6e71 100644 --- a/src/plugins/android/androiddeploystep.cpp +++ b/src/plugins/android/androiddeploystep.cpp @@ -44,9 +44,9 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/buildsteplist.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <qtsupport/qtkitinformation.h> @@ -117,7 +117,7 @@ bool AndroidDeployStep::init() if (!version) return false; - const Qt4BuildConfiguration *bc = static_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration()); + const QmakeBuildConfiguration *bc = static_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration()); if (!bc) return false; @@ -134,7 +134,7 @@ bool AndroidDeployStep::init() m_androidDirPath = AndroidManager::dirPath(target()); m_apkPathDebug = AndroidManager::apkPath(target(), AndroidManager::DebugBuild).toString(); m_apkPathRelease = AndroidManager::apkPath(target(), AndroidManager::ReleaseBuildSigned).toString(); - m_buildDirectory = static_cast<Qt4Project *>(target()->project())->rootQt4ProjectNode()->buildDir(); + m_buildDirectory = static_cast<QmakeProject *>(target()->project())->rootQmakeProjectNode()->buildDir(); m_runDeployAction = m_deployAction; ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit()); if (!tc || tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) { @@ -143,7 +143,7 @@ bool AndroidDeployStep::init() } m_ndkToolChainVersion = static_cast<AndroidToolChain *>(tc)->ndkToolChainVersion(); - QString arch = static_cast<Qt4Project *>(project())->rootQt4ProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); + QString arch = static_cast<QmakeProject *>(project())->rootQmakeProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); if (!arch.isEmpty()) m_libgnustl = AndroidManager::libGnuStl(arch, m_ndkToolChainVersion); return true; diff --git a/src/plugins/android/androidextralibrarylistmodel.cpp b/src/plugins/android/androidextralibrarylistmodel.cpp index 8d51017866..5715117cb8 100644 --- a/src/plugins/android/androidextralibrarylistmodel.cpp +++ b/src/plugins/android/androidextralibrarylistmodel.cpp @@ -29,13 +29,13 @@ ****************************************************************************/ #include "androidextralibrarylistmodel.h" -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> using namespace Android; using namespace Internal; -AndroidExtraLibraryListModel::AndroidExtraLibraryListModel(QmakeProjectManager::Qt4Project *project, +AndroidExtraLibraryListModel::AndroidExtraLibraryListModel(QmakeProjectManager::QmakeProject *project, QObject *parent) : QAbstractItemModel(parent) , m_project(project) @@ -77,18 +77,18 @@ QVariant AndroidExtraLibraryListModel::data(const QModelIndex &index, int role) void AndroidExtraLibraryListModel::reset() { - if (m_project->rootQt4ProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) + if (m_project->rootQmakeProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) return; beginResetModel(); - QmakeProjectManager::Qt4ProFileNode *node = m_project->rootQt4ProjectNode(); + QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode(); m_entries = node->variableValue(QmakeProjectManager::AndroidExtraLibs); endResetModel(); } void AndroidExtraLibraryListModel::addEntries(const QStringList &list) { - if (m_project->rootQt4ProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) + if (m_project->rootQmakeProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) return; beginInsertRows(QModelIndex(), m_entries.size(), m_entries.size() + list.size()); @@ -96,7 +96,7 @@ void AndroidExtraLibraryListModel::addEntries(const QStringList &list) foreach (QString path, list) m_entries += QDir(m_project->projectDirectory()).relativeFilePath(path); - QmakeProjectManager::Qt4ProFileNode *node = m_project->rootQt4ProjectNode(); + QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode(); node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries.join(QLatin1String(" "))); endInsertRows(); @@ -109,7 +109,7 @@ bool greaterModelIndexByRow(const QModelIndex &a, const QModelIndex &b) void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list) { - if (list.isEmpty() || m_project->rootQt4ProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) + if (list.isEmpty() || m_project->rootQmakeProjectNode()->projectType() != QmakeProjectManager::ApplicationTemplate) return; std::sort(list.begin(), list.end(), greaterModelIndexByRow); @@ -128,6 +128,6 @@ void AndroidExtraLibraryListModel::removeEntries(QModelIndexList list) endRemoveRows(); } - QmakeProjectManager::Qt4ProFileNode *node = m_project->rootQt4ProjectNode(); + QmakeProjectManager::QmakeProFileNode *node = m_project->rootQmakeProjectNode(); node->setProVariable(QLatin1String("ANDROID_EXTRA_LIBS"), m_entries.join(QLatin1String(" "))); } diff --git a/src/plugins/android/androidextralibrarylistmodel.h b/src/plugins/android/androidextralibrarylistmodel.h index d343acbaf4..c768b7de65 100644 --- a/src/plugins/android/androidextralibrarylistmodel.h +++ b/src/plugins/android/androidextralibrarylistmodel.h @@ -34,7 +34,7 @@ #include <QAbstractItemModel> #include <QStringList> -namespace QmakeProjectManager { class Qt4Project; } +namespace QmakeProjectManager { class QmakeProject; } namespace Android { namespace Internal { @@ -42,7 +42,7 @@ class AndroidExtraLibraryListModel : public QAbstractItemModel { Q_OBJECT public: - explicit AndroidExtraLibraryListModel(QmakeProjectManager::Qt4Project *project, + explicit AndroidExtraLibraryListModel(QmakeProjectManager::QmakeProject *project, QObject *parent = 0); QModelIndex index(int row, int column, const QModelIndex &parent) const; @@ -58,7 +58,7 @@ private slots: void reset(); private: - QmakeProjectManager::Qt4Project *m_project; + QmakeProjectManager::QmakeProject *m_project; QStringList m_entries; }; diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index 1b0a1d503f..78e15b11a8 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -42,10 +42,10 @@ #include <projectexplorer/projectexplorer.h> #include <projectexplorer/session.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakenodes.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakeprojectmanagerconstants.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> #include <qtsupport/customexecutablerunconfiguration.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> @@ -127,7 +127,7 @@ namespace Internal { bool AndroidManager::supportsAndroid(ProjectExplorer::Target *target) { - if (!qobject_cast<QmakeProjectManager::Qt4Project *>(target->project())) + if (!qobject_cast<QmakeProjectManager::QmakeProject *>(target->project())) return false; QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit()); return version && version->platformName() == QLatin1String(QtSupport::Constants::ANDROID_PLATFORM); @@ -259,10 +259,10 @@ bool AndroidManager::setBuildTargetSDK(ProjectExplorer::Target *target, const QS QString AndroidManager::targetArch(ProjectExplorer::Target *target) { - QmakeProjectManager::Qt4Project *pro = qobject_cast<QmakeProjectManager::Qt4Project *>(target->project()); + QmakeProjectManager::QmakeProject *pro = qobject_cast<QmakeProjectManager::QmakeProject *>(target->project()); if (!pro) return QString(); - QmakeProjectManager::Qt4ProFileNode *node = pro->rootQt4ProjectNode(); + QmakeProjectManager::QmakeProFileNode *node = pro->rootQmakeProjectNode(); if (!node) return QString(); return node->singleVariableValue(QmakeProjectManager::AndroidArchVar); @@ -330,10 +330,10 @@ Utils::FileName AndroidManager::apkPath(ProjectExplorer::Target *target, BuildTy QStringList AndroidManager::availableTargetApplications(ProjectExplorer::Target *target) { QStringList apps; - QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(target->project()); - if (!qt4Project) + QmakeProjectManager::QmakeProject *qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject *>(target->project()); + if (!qmakeProject) return apps; - foreach (QmakeProjectManager::Qt4ProFileNode *proFile, qt4Project->applicationProFiles()) { + foreach (QmakeProjectManager::QmakeProFileNode *proFile, qmakeProject->applicationProFiles()) { if (proFile->projectType() == QmakeProjectManager::ApplicationTemplate) { if (proFile->targetInformation().target.startsWith(QLatin1String("lib")) && proFile->targetInformation().target.endsWith(QLatin1String(".so"))) @@ -509,8 +509,8 @@ QString AndroidManager::targetApplicationPath(ProjectExplorer::Target *target) QString selectedApp = targetApplication(target); if (selectedApp.isEmpty()) return QString(); - QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(target->project()); - foreach (QmakeProjectManager::Qt4ProFileNode *proFile, qt4Project->applicationProFiles()) { + QmakeProjectManager::QmakeProject *qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject *>(target->project()); + foreach (QmakeProjectManager::QmakeProFileNode *proFile, qmakeProject->applicationProFiles()) { if (proFile->projectType() == QmakeProjectManager::ApplicationTemplate) { if (proFile->targetInformation().target.startsWith(QLatin1String("lib")) && proFile->targetInformation().target.endsWith(QLatin1String(".so"))) { @@ -529,8 +529,8 @@ QString AndroidManager::targetApplicationPath(ProjectExplorer::Target *target) bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target *target) { QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit()); - QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project*>(target->project()); - if (!qt4Project || !qt4Project->rootProjectNode() || !version) + QmakeProjectManager::QmakeProject *qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject*>(target->project()); + if (!qmakeProject || !qmakeProject->rootProjectNode() || !version) return false; // TODO we should create the AndroidManifest.xml file for that version @@ -540,7 +540,7 @@ bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target * Utils::FileName javaSrcPath = Utils::FileName::fromString(version->qmakeProperty("QT_INSTALL_PREFIX")) .appendPath(QLatin1String("src/android/java")); - QDir projectDir(qt4Project->projectDirectory()); + QDir projectDir(qmakeProject->projectDirectory()); Utils::FileName androidPath = dirPath(target); QStringList m_ignoreFiles; @@ -607,7 +607,7 @@ bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target * } } if (!androidFiles.isEmpty()) - qt4Project->rootProjectNode()->addFiles(androidFiles); + qmakeProject->rootProjectNode()->addFiles(androidFiles); int minApiLevel = 4; if (QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target->kit())) @@ -804,17 +804,17 @@ QVector<AndroidManager::Library> AndroidManager::availableQtLibsWithDependencies if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) return QVector<AndroidManager::Library>(); - QmakeProjectManager::Qt4Project *project = static_cast<QmakeProjectManager::Qt4Project *>(target->project()); - QString arch = project->rootQt4ProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); + QmakeProjectManager::QmakeProject *project = static_cast<QmakeProjectManager::QmakeProject *>(target->project()); + QString arch = project->rootQmakeProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc); QString libgnustl = libGnuStl(arch, atc->ndkToolChainVersion()); Utils::FileName readelfPath = AndroidConfigurations::instance().readelfPath(target->activeRunConfiguration()->abi().architecture(), atc->ndkToolChainVersion()); - const QmakeProjectManager::Qt4Project *const qt4Project - = qobject_cast<const QmakeProjectManager::Qt4Project *>(target->project()); - if (!qt4Project || !version) + const QmakeProjectManager::QmakeProject *const qmakeProject + = qobject_cast<const QmakeProjectManager::QmakeProject *>(target->project()); + if (!qmakeProject || !version) return QVector<AndroidManager::Library>(); QString qtLibsPath = version->qmakeProperty("QT_INSTALL_LIBS"); if (!readelfPath.toFileInfo().exists()) { @@ -904,11 +904,11 @@ bool AndroidManager::setBundledInLib(ProjectExplorer::Target *target, const QStr QStringList AndroidManager::availablePrebundledLibs(ProjectExplorer::Target *target) { QStringList libs; - QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(target->project()); - if (!qt4Project) + QmakeProjectManager::QmakeProject *qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject *>(target->project()); + if (!qmakeProject) return libs; - foreach (QmakeProjectManager::Qt4ProFileNode *node, qt4Project->allProFiles()) + foreach (QmakeProjectManager::QmakeProFileNode *node, qmakeProject->allProFiles()) if (node->projectType() == QmakeProjectManager::LibraryTemplate) libs << node->targetInformation().target; return libs; diff --git a/src/plugins/android/androidmanifesteditorwidget.cpp b/src/plugins/android/androidmanifesteditorwidget.cpp index 35cfc45153..b247e43903 100644 --- a/src/plugins/android/androidmanifesteditorwidget.cpp +++ b/src/plugins/android/androidmanifesteditorwidget.cpp @@ -44,7 +44,7 @@ #include <projectexplorer/projectexplorer.h> #include <projectexplorer/kitinformation.h> #include <texteditor/texteditoractionhandler.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeproject.h> #include <QLineEdit> #include <QFileInfo> diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp index a72b9ac695..d036cf5aec 100644 --- a/src/plugins/android/androidpackagecreationstep.cpp +++ b/src/plugins/android/androidpackagecreationstep.cpp @@ -42,9 +42,9 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/runconfiguration.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <qtsupport/qtkitinformation.h> #include <coreplugin/icore.h> @@ -98,18 +98,18 @@ void AndroidPackageCreationStep::ctor() bool AndroidPackageCreationStep::init() { - const Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration()); + const QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration()); if (!bc) { raiseError(tr("Cannot create Android package: current build configuration is not Qt 4.")); return false; } - Qt4Project *project = static_cast<Qt4Project *>(target()->project()); + QmakeProject *project = static_cast<QmakeProject *>(target()->project()); m_outputParser.setProjectFileList(project->files(Project::AllFiles)); // Copying m_androidDir = AndroidManager::dirPath(target()); Utils::FileName path = m_androidDir; - QString androidTargetArch = project->rootQt4ProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); + QString androidTargetArch = project->rootQmakeProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); if (androidTargetArch.isEmpty()) { raiseError(tr("Cannot create Android package: No ANDROID_TARGET_ARCH set in make spec.")); return false; @@ -434,8 +434,8 @@ void AndroidPackageCreationStep::collectFiles(QList<DeployItem> *deployList, if (!version) return; - Qt4Project *project = static_cast<Qt4Project *>(target()->project()); - QString androidTargetArch = project->rootQt4ProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); + QmakeProject *project = static_cast<QmakeProject *>(target()->project()); + QString androidTargetArch = project->rootQmakeProjectNode()->singleVariableValue(QmakeProjectManager::AndroidArchVar); QString androidAssetsPath = m_androidDir.toString() + QLatin1String("/assets/"); QString androidJarPath = m_androidDir.toString() + QLatin1String("/libs/"); diff --git a/src/plugins/android/androidpackagecreationwidget.cpp b/src/plugins/android/androidpackagecreationwidget.cpp index 57f885e8c5..d6ebf62a2f 100644 --- a/src/plugins/android/androidpackagecreationwidget.cpp +++ b/src/plugins/android/androidpackagecreationwidget.cpp @@ -41,8 +41,8 @@ #include <projectexplorer/projectexplorer.h> #include <projectexplorer/buildmanager.h> #include <projectexplorer/projectexplorerconstants.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakestep.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakestep.h> #include <QTimer> @@ -182,7 +182,7 @@ void AndroidPackageCreationWidget::initGui() // Make the buildconfiguration emit a evironmentChanged() signal // TODO find a better way - Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(m_step->target()->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration()); if (!bc) return; bool use = bc->useSystemEnvironment(); @@ -196,7 +196,7 @@ void AndroidPackageCreationWidget::initGui() void AndroidPackageCreationWidget::updateSigningWarning() { - Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(m_step->target()->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration()); bool debug = bc && (bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild); if (m_step->signPackage() && debug) { m_ui->signingDebugWarningIcon->setVisible(true); @@ -213,7 +213,7 @@ void AndroidPackageCreationWidget::activeBuildConfigurationChanged() disconnect(m_currentBuildConfiguration, SIGNAL(qmakeBuildConfigurationChanged()), this, SLOT(updateSigningWarning())); updateSigningWarning(); - Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(m_step->target()->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration()); m_currentBuildConfiguration = bc; if (bc) connect(bc, SIGNAL(qmakeBuildConfigurationChanged()), this, SLOT(updateSigningWarning())); @@ -243,7 +243,7 @@ void AndroidPackageCreationWidget::updateAndroidProjectInfo() void AndroidPackageCreationWidget::setTargetSDK(const QString &sdk) { AndroidManager::setBuildTargetSDK(m_step->target(), sdk); - Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(m_step->target()->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration()); if (!bc) return; QMakeStep *qs = bc->qmakeStep(); diff --git a/src/plugins/android/androidpackagecreationwidget.h b/src/plugins/android/androidpackagecreationwidget.h index 91d2313da4..81f85f93c8 100644 --- a/src/plugins/android/androidpackagecreationwidget.h +++ b/src/plugins/android/androidpackagecreationwidget.h @@ -41,7 +41,7 @@ class QFileSystemWatcher; namespace Ui { class AndroidPackageCreationWidget; } QT_END_NAMESPACE -namespace QmakeProjectManager { class Qt4BuildConfiguration; } +namespace QmakeProjectManager { class QmakeBuildConfiguration; } namespace Android { namespace Internal { @@ -112,7 +112,7 @@ private: CheckModel *m_qtLibsModel; CheckModel *m_prebundledLibs; QFileSystemWatcher *m_fileSystemWatcher; - QmakeProjectManager::Qt4BuildConfiguration *m_currentBuildConfiguration; + QmakeProjectManager::QmakeBuildConfiguration *m_currentBuildConfiguration; }; } // namespace Internal diff --git a/src/plugins/android/androidpackageinstallationstep.cpp b/src/plugins/android/androidpackageinstallationstep.cpp index c94cfdfe53..f74cac0726 100644 --- a/src/plugins/android/androidpackageinstallationstep.cpp +++ b/src/plugins/android/androidpackageinstallationstep.cpp @@ -37,7 +37,7 @@ #include <projectexplorer/kitinformation.h> #include <projectexplorer/gnumakeparser.h> #include <utils/hostosinfo.h> -#include <qt4projectmanager/qmakeparser.h> +#include <qmakeprojectmanager/qmakeparser.h> #include <QDir> diff --git a/src/plugins/android/androidqtversion.cpp b/src/plugins/android/androidqtversion.cpp index 6298812797..360349eaf4 100644 --- a/src/plugins/android/androidqtversion.cpp +++ b/src/plugins/android/androidqtversion.cpp @@ -35,8 +35,8 @@ #include <utils/environment.h> #include <utils/hostosinfo.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakeprojectmanagerconstants.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> @@ -109,12 +109,12 @@ void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::En env.set(QLatin1String("ANDROID_NDK_HOST"), AndroidConfigurations::instance().config().toolchainHost); env.set(QLatin1String("ANDROID_NDK_ROOT"), AndroidConfigurations::instance().config().ndkLocation.toUserOutput()); - Qt4Project *qt4pro = qobject_cast<QmakeProjectManager::Qt4Project *>(ProjectExplorerPlugin::instance()->currentProject()); - if (!qt4pro || !qt4pro->activeTarget() + QmakeProject *qmakeProject = qobject_cast<QmakeProjectManager::QmakeProject *>(ProjectExplorerPlugin::instance()->currentProject()); + if (!qmakeProject || !qmakeProject->activeTarget() || QtSupport::QtKitInformation::qtVersion(k)->type() != QLatin1String(Constants::ANDROIDQT)) return; - Target *target = qt4pro->activeTarget(); + Target *target = qmakeProject->activeTarget(); if (DeviceTypeKitInformation::deviceTypeId(target->kit()) != Constants::ANDROID_DEVICE_TYPE) return; if (AndroidConfigurations::instance().config().ndkLocation.isEmpty() diff --git a/src/plugins/android/androidrunconfiguration.cpp b/src/plugins/android/androidrunconfiguration.cpp index 5625358d84..742bf77617 100644 --- a/src/plugins/android/androidrunconfiguration.cpp +++ b/src/plugins/android/androidrunconfiguration.cpp @@ -37,8 +37,8 @@ #include <projectexplorer/target.h> #include <qtsupport/qtoutputformatter.h> #include <qtsupport/qtkitinformation.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <utils/qtcassert.h> @@ -47,7 +47,7 @@ const char PRO_FILE_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.ProFile"; } using namespace ProjectExplorer; -using QmakeProjectManager::Qt4Project; +using QmakeProjectManager::QmakeProject; namespace Android { namespace Internal { @@ -56,7 +56,7 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id, co : RunConfiguration(parent, id) , m_proFilePath(path) { - Qt4Project *project = static_cast<Qt4Project *>(parent->project()); + QmakeProject *project = static_cast<QmakeProject *>(parent->project()); m_parseSuccess = project->validParse(m_proFilePath); m_parseInProgress = project->parseInProgress(m_proFilePath); init(); @@ -74,16 +74,16 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, AndroidRunConfi void AndroidRunConfiguration::init() { setDefaultDisplayName(defaultDisplayName()); - connect(target()->project(), SIGNAL(proFileUpdated(QmakeProjectManager::Qt4ProFileNode*,bool,bool)), - this, SLOT(proFileUpdated(QmakeProjectManager::Qt4ProFileNode*,bool,bool))); + connect(target()->project(), SIGNAL(proFileUpdated(QmakeProjectManager::QmakeProFileNode*,bool,bool)), + this, SLOT(proFileUpdated(QmakeProjectManager::QmakeProFileNode*,bool,bool))); } bool AndroidRunConfiguration::fromMap(const QVariantMap &map) { const QDir projectDir = QDir(target()->project()->projectDirectory()); m_proFilePath = QDir::cleanPath(projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString())); - m_parseSuccess = static_cast<Qt4Project *>(target()->project())->validParse(m_proFilePath); - m_parseInProgress = static_cast<Qt4Project *>(target()->project())->parseInProgress(m_proFilePath); + m_parseSuccess = static_cast<QmakeProject *>(target()->project())->validParse(m_proFilePath); + m_parseInProgress = static_cast<QmakeProject *>(target()->project())->parseInProgress(m_proFilePath); return RunConfiguration::fromMap(map); } @@ -108,11 +108,11 @@ QString AndroidRunConfiguration::disabledReason() const .arg(QFileInfo(m_proFilePath).fileName()); if (!m_parseSuccess) - return static_cast<Qt4Project *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath); + return static_cast<QmakeProject *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath); return QString(); } -void AndroidRunConfiguration::proFileUpdated(QmakeProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress) +void AndroidRunConfiguration::proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress) { if (m_proFilePath != pro->path()) return; diff --git a/src/plugins/android/androidrunconfiguration.h b/src/plugins/android/androidrunconfiguration.h index 523e4936e8..a8bbb65e43 100644 --- a/src/plugins/android/androidrunconfiguration.h +++ b/src/plugins/android/androidrunconfiguration.h @@ -35,7 +35,7 @@ #include <projectexplorer/runconfiguration.h> -namespace QmakeProjectManager { class Qt4ProFileNode; } +namespace QmakeProjectManager { class QmakeProFileNode; } namespace Android { namespace Internal { @@ -70,7 +70,7 @@ protected: bool fromMap(const QVariantMap &map); QVariantMap toMap() const; private slots: - void proFileUpdated(QmakeProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress); + void proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress); private: void init(); diff --git a/src/plugins/android/androidrunfactories.cpp b/src/plugins/android/androidrunfactories.cpp index 170b860318..95ddaef15a 100644 --- a/src/plugins/android/androidrunfactories.cpp +++ b/src/plugins/android/androidrunfactories.cpp @@ -40,8 +40,8 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/target.h> #include <debugger/debuggerconstants.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <qtsupport/customexecutablerunconfiguration.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> @@ -90,9 +90,9 @@ QList<Core::Id> AndroidRunConfigurationFactory::availableCreationIds(Target *par QList<Core::Id> ids; if (!AndroidManager::supportsAndroid(parent)) return ids; - QList<Qt4ProFileNode *> nodes = static_cast<Qt4Project *>(parent->project())->allProFiles(); + QList<QmakeProFileNode *> nodes = static_cast<QmakeProject *>(parent->project())->allProFiles(); const Core::Id base = Core::Id(ANDROID_RC_ID_PREFIX); - foreach (Qt4ProFileNode *node, nodes) + foreach (QmakeProFileNode *node, nodes) if (node->projectType() == ApplicationTemplate || node->projectType() == LibraryTemplate) ids << base.withSuffix(node->path()); return ids; diff --git a/src/plugins/android/androidrunfactories.h b/src/plugins/android/androidrunfactories.h index eb9105bfab..f4cc867eb2 100644 --- a/src/plugins/android/androidrunfactories.h +++ b/src/plugins/android/androidrunfactories.h @@ -31,7 +31,7 @@ #define ANDROIDRUNFACTORIES_H #include <projectexplorer/runconfiguration.h> -#include <qt4projectmanager/qmakerunconfigurationfactory.h> +#include <qmakeprojectmanager/qmakerunconfigurationfactory.h> namespace ProjectExplorer { class RunControl; diff --git a/src/plugins/android/createandroidmanifestwizard.cpp b/src/plugins/android/createandroidmanifestwizard.cpp index 6a7912b6db..84def92065 100644 --- a/src/plugins/android/createandroidmanifestwizard.cpp +++ b/src/plugins/android/createandroidmanifestwizard.cpp @@ -30,8 +30,8 @@ #include "createandroidmanifestwizard.h" #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <proparser/prowriter.h> #include <QComboBox> #include <QFormLayout> @@ -43,8 +43,8 @@ using namespace Android; using namespace Android::Internal; -using QmakeProjectManager::Qt4Project; -using QmakeProjectManager::Qt4ProFileNode; +using QmakeProjectManager::QmakeProject; +using QmakeProjectManager::QmakeProFileNode; // // NoApplicationProFilePage @@ -63,7 +63,7 @@ NoApplicationProFilePage::NoApplicationProFilePage(CreateAndroidManifestWizard * // // ChooseProFilePage // -ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard, const QList<Qt4ProFileNode *> &nodes) +ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard, const QList<QmakeProFileNode *> &nodes) : m_wizard(wizard) { QFormLayout *fl = new QFormLayout(this); @@ -73,7 +73,7 @@ ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard, const fl->addRow(label); m_comboBox = new QComboBox(this); - foreach (Qt4ProFileNode *node, nodes) + foreach (QmakeProFileNode *node, nodes) m_comboBox->addItem(node->displayName(), QVariant::fromValue(static_cast<void *>(node))); // TODO something more? connect(m_comboBox, SIGNAL(currentIndexChanged(int)), @@ -86,7 +86,7 @@ ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard, const void ChooseProFilePage::nodeSelected(int index) { Q_UNUSED(index) - m_wizard->setNode(static_cast<Qt4ProFileNode *>(m_comboBox->itemData(m_comboBox->currentIndex()).value<void *>())); + m_wizard->setNode(static_cast<QmakeProFileNode *>(m_comboBox->itemData(m_comboBox->currentIndex()).value<void *>())); } @@ -133,8 +133,8 @@ CreateAndroidManifestWizard::CreateAndroidManifestWizard(ProjectExplorer::Target { setWindowTitle(tr("Create Android Manifest Wizard")); - Qt4Project *project = static_cast<Qt4Project *>(target->project()); - QList<Qt4ProFileNode *> nodes = project->applicationProFiles(); + QmakeProject *project = static_cast<QmakeProject *>(target->project()); + QList<QmakeProFileNode *> nodes = project->applicationProFiles(); if (nodes.isEmpty()) { // oh uhm can't create anything addPage(new NoApplicationProFilePage(this)); @@ -147,12 +147,12 @@ CreateAndroidManifestWizard::CreateAndroidManifestWizard(ProjectExplorer::Target } } -QmakeProjectManager::Qt4ProFileNode *CreateAndroidManifestWizard::node() const +QmakeProjectManager::QmakeProFileNode *CreateAndroidManifestWizard::node() const { return m_node; } -void CreateAndroidManifestWizard::setNode(QmakeProjectManager::Qt4ProFileNode *node) +void CreateAndroidManifestWizard::setNode(QmakeProjectManager::QmakeProFileNode *node) { m_node = node; } diff --git a/src/plugins/android/createandroidmanifestwizard.h b/src/plugins/android/createandroidmanifestwizard.h index 348090333c..e32445ee0f 100644 --- a/src/plugins/android/createandroidmanifestwizard.h +++ b/src/plugins/android/createandroidmanifestwizard.h @@ -37,7 +37,7 @@ class QComboBox; QT_END_NAMESPACE namespace ProjectExplorer { class Target; } -namespace QmakeProjectManager { class Qt4ProFileNode; } +namespace QmakeProjectManager { class QmakeProFileNode; } namespace Android { namespace Internal { @@ -57,7 +57,7 @@ class ChooseProFilePage : public QWizardPage { Q_OBJECT public: - ChooseProFilePage(CreateAndroidManifestWizard *wizard, const QList<QmakeProjectManager::Qt4ProFileNode *> &nodes); + ChooseProFilePage(CreateAndroidManifestWizard *wizard, const QList<QmakeProjectManager::QmakeProFileNode *> &nodes); private slots: void nodeSelected(int index); private: @@ -81,8 +81,8 @@ class CreateAndroidManifestWizard : public Utils::Wizard public: CreateAndroidManifestWizard(ProjectExplorer::Target *target); - QmakeProjectManager::Qt4ProFileNode *node() const; - void setNode(QmakeProjectManager::Qt4ProFileNode *node); + QmakeProjectManager::QmakeProFileNode *node() const; + void setNode(QmakeProjectManager::QmakeProFileNode *node); QString sourceFileName() const; @@ -93,7 +93,7 @@ public slots: private: void createAndroidManifestFile(); ProjectExplorer::Target *m_target; - QmakeProjectManager::Qt4ProFileNode *m_node; + QmakeProjectManager::QmakeProFileNode *m_node; QString m_directory; }; } diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp index 63e64c61a1..56668fe644 100644 --- a/src/plugins/cpptools/cpppreprocessor.cpp +++ b/src/plugins/cpptools/cpppreprocessor.cpp @@ -223,11 +223,6 @@ QString CppPreprocessor::cleanPath(const QString &path) return result; } -static inline bool isInjectedFile(const QString &fileName) -{ - return fileName.startsWith(QLatin1Char('<')) && fileName.endsWith(QLatin1Char('>')); -} - QString CppPreprocessor::resolveFile_helper(const QString &fileName, IncludeType type) { const QFileInfo fileInfo(fileName); diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 0768d2ecdd..2c9ae64f37 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -88,8 +88,10 @@ void DebuggerItem::reinitializeFromFile() { QProcess proc; proc.start(m_command.toString(), QStringList() << QLatin1String("--version")); - proc.waitForStarted(); - proc.waitForFinished(); + if (!proc.waitForStarted() || !proc.waitForFinished()) { + m_engineType = NoEngineType; + return; + } QByteArray ba = proc.readAll(); if (ba.contains("gdb")) { m_engineType = GdbEngineType; @@ -120,6 +122,19 @@ void DebuggerItem::reinitializeFromFile() m_engineType = PdbEngineType; return; } + if (ba.isEmpty()) { + proc.start(m_command.toString(), QStringList() << QLatin1String("-version")); + if (!proc.waitForStarted() || !proc.waitForFinished()) { + m_engineType = NoEngineType; + return; + } + ba = proc.readAll(); + if (ba.startsWith("cdb")) { + m_engineType = CdbEngineType; + m_abis = Abi::abisOfBinary(m_command); + return; + } + } m_engineType = NoEngineType; } diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index fcca5d8eac..dc04a11450 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -243,11 +243,16 @@ void DebuggerItemManager::autoDetectGdbOrLldbDebuggers() void DebuggerItemManager::readLegacyDebuggers() { - QFileInfo settingsLocation(Core::ICore::settings()->fileName()); - FileName legacyKits = FileName::fromString(settingsLocation.absolutePath() + QLatin1String(DEBUGGER_LEGACY_FILENAME)); + QFileInfo systemLocation(Core::ICore::settings(QSettings::SystemScope)->fileName()); + readLegacyDebuggers(FileName::fromString(systemLocation.absolutePath() + QLatin1String(DEBUGGER_LEGACY_FILENAME))); + QFileInfo userLocation(Core::ICore::settings()->fileName()); + readLegacyDebuggers(FileName::fromString(userLocation.absolutePath() + QLatin1String(DEBUGGER_LEGACY_FILENAME))); +} +void DebuggerItemManager::readLegacyDebuggers(const FileName &file) +{ PersistentSettingsReader reader; - if (!reader.load(legacyKits)) + if (!reader.load(file)) return; foreach (const QVariant &v, reader.restoreValues()) { diff --git a/src/plugins/debugger/debuggeritemmanager.h b/src/plugins/debugger/debuggeritemmanager.h index 27ad45614b..da3ca0ce31 100644 --- a/src/plugins/debugger/debuggeritemmanager.h +++ b/src/plugins/debugger/debuggeritemmanager.h @@ -83,6 +83,7 @@ private: static void autoDetectGdbOrLldbDebuggers(); static void autoDetectCdbDebuggers(); static void readLegacyDebuggers(); + static void readLegacyDebuggers(const Utils::FileName &file); static Utils::PersistentSettingsWriter *m_writer; static QList<DebuggerItem> m_debuggers; diff --git a/src/plugins/debugger/debuggeroptionspage.cpp b/src/plugins/debugger/debuggeroptionspage.cpp index 884edf439f..2f49a56707 100644 --- a/src/plugins/debugger/debuggeroptionspage.cpp +++ b/src/plugins/debugger/debuggeroptionspage.cpp @@ -37,6 +37,7 @@ #include <utils/detailswidget.h> #include <utils/pathchooser.h> #include <utils/qtcassert.h> +#include <utils/winutils.h> #include <QFormLayout> #include <QHeaderView> @@ -140,7 +141,8 @@ void DebuggerItemConfigWidget::setItem(const DebuggerItem &item) void DebuggerItemConfigWidget::apply() { DebuggerItem item = m_model->currentDebugger(); - QTC_ASSERT(item.isValid(), return); + if (!item.isValid()) + return; // Nothing was selected here. item.setDisplayName(m_displayNameLineEdit->text()); item.setCommand(m_binaryChooser->fileName()); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 9341d1d74e..a8dc104cb4 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -79,12 +79,6 @@ #include <QMessageBox> #include <QPushButton> -#ifdef Q_OS_UNIX -#include <unistd.h> -#include <dlfcn.h> -#endif -#include <ctype.h> - using namespace ProjectExplorer; using namespace Utils; @@ -1332,39 +1326,6 @@ static bool isExitedReason(const QByteArray &reason) || reason == "exited"; // inferior exited } -#if 0 -void GdbEngine::handleAqcuiredInferior() -{ - // Reverse debugging. FIXME: Should only be used when available. - //if (debuggerCore()->boolSetting(EnableReverseDebugging)) - // postCommand("target response"); - - tryLoadDebuggingHelpers(); - -# ifndef Q_OS_MAC - // intentionally after tryLoadDebuggingHelpers(), - // otherwise we'd interrupt solib loading. - if (debuggerCore()->boolSetting(AllPluginBreakpoints)) { - postCommand("set auto-solib-add on"); - postCommand("set stop-on-solib-events 0"); - postCommand("sharedlibrary .*"); - } else if (debuggerCore()->boolSetting(SelectedPluginBreakpoints)) { - postCommand("set auto-solib-add on"); - postCommand("set stop-on-solib-events 1"); - postCommand("sharedlibrary " - + theDebuggerStringSetting(SelectedPluginBreakpointsPattern)); - } else if (debuggerCore()->boolSetting(NoPluginBreakpoints)) { - // should be like that already - postCommand("set auto-solib-add off"); - postCommand("set stop-on-solib-events 0"); - } -# endif - - // It's nicer to see a bit of the world we live in. - reloadModulesInternal(); -} -#endif - void GdbEngine::handleStopResponse(const GdbMi &data) { // Ignore trap on Windows terminals, which results in diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 46dfd62aef..92474bbfa8 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -32,6 +32,7 @@ #include <debugger/debuggeractions.h> #include <debugger/debuggercore.h> #include <debugger/debuggerdialogs.h> +#include <debugger/debuggerinternalconstants.h> #include <debugger/debuggerplugin.h> #include <debugger/debuggerprotocol.h> #include <debugger/debuggerstartparameters.h> @@ -66,9 +67,6 @@ #include <QMessageBox> #include <QToolTip> -#include <stdio.h> - - namespace Debugger { namespace Internal { @@ -131,9 +129,16 @@ void LldbEngine::shutdownEngine() void LldbEngine::setupEngine() { QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); + if (startParameters().remoteSetupNeeded) { + notifyEngineRequestRemoteSetup(); + } else { + startLldb(); + } +} +void LldbEngine::startLldb() +{ m_lldbCmd = startParameters().debuggerCommand; - connect(&m_lldbProc, SIGNAL(error(QProcess::ProcessError)), SLOT(handleLldbError(QProcess::ProcessError))); connect(&m_lldbProc, SIGNAL(finished(int,QProcess::ExitStatus)), @@ -170,9 +175,14 @@ void LldbEngine::setupInferior() const DebuggerStartParameters &sp = startParameters(); Command cmd("setupInferior"); cmd.arg("executable", QFileInfo(sp.executable).absoluteFilePath()); - cmd.arg("startMode", sp.startMode); + cmd.arg("startMode", sp.startMode); // directly relying on this is brittle wrt. insertions, so check it here cmd.arg("processArgs", sp.processArgs); - cmd.arg("attachPid", sp.attachPID); + cmd.arg("attachPid", ((sp.startMode == AttachCrashedExternal || sp.startMode == AttachExternal) + ? sp.attachPID : 0)); + cmd.arg("sysRoot", sp.sysRoot); + cmd.arg("remoteChannel", ((sp.startMode == AttachToRemoteProcess || sp.startMode == AttachToRemoteServer) + ? sp.remoteChannel : QString())); + runCommand(cmd); requestUpdateWatchers(); } @@ -1107,6 +1117,39 @@ DebuggerEngine *createLldbEngine(const DebuggerStartParameters &startParameters) return new LldbEngine(startParameters); } +void LldbEngine::notifyEngineRemoteSetupDone(int portOrPid, int qmlPort) +{ + QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); + DebuggerEngine::notifyEngineRemoteSetupDone(portOrPid, qmlPort); + + if (qmlPort != -1) + startParameters().qmlServerPort = qmlPort; + if (portOrPid != -1) { + if (startParameters().startMode == AttachExternal) { + startParameters().attachPID = portOrPid; + } else { + QString &rc = startParameters().remoteChannel; + const int sepIndex = rc.lastIndexOf(QLatin1Char(':')); + if (sepIndex != -1) { + rc.replace(sepIndex + 1, rc.count() - sepIndex - 1, + QString::number(portOrPid)); + } + } + } + startLldb(); +} + +void LldbEngine::notifyEngineRemoteSetupFailed(const QString &reason) +{ + QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); + DebuggerEngine::notifyEngineRemoteSetupFailed(reason); + showMessage(_("ADAPTER START FAILED")); + if (!reason.isEmpty()) { + const QString title = tr("Adapter start failed"); + Core::ICore::showWarningWithOptions(title, reason); + } + notifyEngineSetupFailed(); +} /////////////////////////////////////////////////////////////////////// // diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h index aa8d445074..c034037c1f 100644 --- a/src/plugins/debugger/lldb/lldbengine.h +++ b/src/plugins/debugger/lldb/lldbengine.h @@ -95,6 +95,7 @@ private: void executeNextI(); void setupEngine(); + void startLldb(); void setupInferior(); void runEngine(); void shutdownInferior(); @@ -181,6 +182,9 @@ private: void handleUpdateStack(const QByteArray &response); void handleUpdateThreads(const QByteArray &response); + void notifyEngineRemoteSetupDone(int portOrPid, int qmlPort); + void notifyEngineRemoteSetupFailed(const QString &reason); + void handleChildren(const WatchData &data0, const GdbMi &item, QList<WatchData> *list); diff --git a/src/plugins/ios/ios.qbs b/src/plugins/ios/ios.qbs index 4a2019a386..9dab73cc78 100644 --- a/src/plugins/ios/ios.qbs +++ b/src/plugins/ios/ios.qbs @@ -8,7 +8,7 @@ QtcPlugin { Depends { name: "Core" } Depends { name: "ProjectExplorer" } - Depends { name: "Qt4ProjectManager" } + Depends { name: "QmakeProjectManager" } Depends { name: "Debugger" } Depends { name: "QtSupport" } Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] } diff --git a/src/plugins/ios/ios_dependencies.pri b/src/plugins/ios/ios_dependencies.pri index 020498834b..106d8ccbea 100644 --- a/src/plugins/ios/ios_dependencies.pri +++ b/src/plugins/ios/ios_dependencies.pri @@ -5,4 +5,4 @@ QTC_PLUGIN_DEPENDS += \ coreplugin \ debugger \ projectexplorer \ - qt4projectmanager + qmakeprojectmanager diff --git a/src/plugins/ios/iosbuildstep.cpp b/src/plugins/ios/iosbuildstep.cpp index c20006a0ad..adf82b84db 100644 --- a/src/plugins/ios/iosbuildstep.cpp +++ b/src/plugins/ios/iosbuildstep.cpp @@ -43,11 +43,11 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/toolchain.h> #include <projectexplorer/gcctoolchain.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakeprojectmanagerconstants.h> -#include <qt4projectmanager/qmakeprojectmanager.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> +#include <qmakeprojectmanager/qmakeprojectmanager.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtparser.h> #include <coreplugin/variablemanager.h> diff --git a/src/plugins/ios/iosconfigurations.cpp b/src/plugins/ios/iosconfigurations.cpp index 1eaa690bc9..746fea4415 100644 --- a/src/plugins/ios/iosconfigurations.cpp +++ b/src/plugins/ios/iosconfigurations.cpp @@ -312,7 +312,7 @@ void IosConfigurations::updateAutomaticKitList() //DeviceKitInformation::setDevice(newKit, device); Debugger::DebuggerItem debugger; - debugger.setCommand(pToolchain->suggestedDebugger()); + debugger.setCommand(pToolchain->suggestedDebugger()); // use lldbPath() instead? debugger.setEngineType(Debugger::LldbEngineType); debugger.setDisplayName(tr("IOS Debugger")); debugger.setAutoDetected(true); @@ -371,6 +371,11 @@ FileName IosConfigurations::developerPath() return m_instance->m_developerPath; } +FileName IosConfigurations::lldbPath() +{ + return m_instance->m_lldbPath; +} + void IosConfigurations::save() { QSettings *settings = Core::ICore::settings(); @@ -432,6 +437,18 @@ void IosConfigurations::setDeveloperPath(const FileName &devPath) m_instance->m_developerPath = devPath; m_instance->save(); updateAutomaticKitList(); + QProcess lldbInfo; + lldbInfo.start(QLatin1String("xcrun"), QStringList() << QLatin1String("--find") + << QLatin1String("lldb")); + if (!lldbInfo.waitForFinished(2000)) { + lldbInfo.kill(); + } else { + QByteArray lPath=lldbInfo.readAll(); + lPath.chop(1); + Utils::FileName lldbPath = Utils::FileName::fromString(QString::fromLocal8Bit(lPath.data(), lPath.size())); + if (lldbPath.toFileInfo().exists()) + m_instance->m_lldbPath = lldbPath; + } emit m_instance->updated(); } } diff --git a/src/plugins/ios/iosconfigurations.h b/src/plugins/ios/iosconfigurations.h index b491f8b0c0..631dc937eb 100644 --- a/src/plugins/ios/iosconfigurations.h +++ b/src/plugins/ios/iosconfigurations.h @@ -53,6 +53,7 @@ public: static bool ignoreAllDevices(); static void setIgnoreAllDevices(bool ignoreDevices); static Utils::FileName developerPath(); + static Utils::FileName lldbPath(); signals: void updated(); @@ -68,6 +69,7 @@ private: static void setDeveloperPath(const Utils::FileName &devPath); Utils::FileName m_developerPath; + Utils::FileName m_lldbPath; bool m_ignoreAllDevices; }; diff --git a/src/plugins/ios/iosdebugsupport.cpp b/src/plugins/ios/iosdebugsupport.cpp index a2890c84ef..f4d6befda8 100644 --- a/src/plugins/ios/iosdebugsupport.cpp +++ b/src/plugins/ios/iosdebugsupport.cpp @@ -37,14 +37,24 @@ #include <debugger/debuggerkitinformation.h> #include <debugger/debuggerrunner.h> #include <debugger/debuggerstartparameters.h> - +#include <debugger/debuggerrunconfigurationaspect.h> +#include <projectexplorer/toolchain.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakenodes.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> #include <qtsupport/qtkitinformation.h> #include <QDir> +#include <QTcpServer> + +#include <stdio.h> +#include <fcntl.h> +#ifdef Q_OS_UNIX +#include <unistd.h> +#else +#include <io.h> +#endif using namespace Debugger; using namespace ProjectExplorer; @@ -56,14 +66,46 @@ namespace Internal { RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfig, QString *errorMessage) { - //Target *target = runConfig->target(); - //Qt4Project *project = static_cast<Qt4Project *>(target->project()); + Target *target = runConfig->target(); + if (!target) + return 0; + ProjectExplorer::IDevice::ConstPtr device = DeviceKitInformation::device(target->kit()); + if (device.isNull()) + return 0; + QmakeProject *project = static_cast<QmakeProject *>(target->project()); DebuggerStartParameters params; - params.startMode = AttachToRemoteServer; - //params.displayName = IosManager::packageName(target); + if (device->type() == Core::Id(Ios::Constants::IOS_DEVICE_TYPE)) + params.startMode = AttachToRemoteProcess; + else + params.startMode = AttachExternal; + params.displayName = runConfig->appName(); params.remoteSetupNeeded = true; + Debugger::DebuggerRunConfigurationAspect *aspect + = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>(); + if (aspect->useCppDebugger()) { + params.languages |= CppLanguage; + Kit *kit = target->kit(); + params.sysRoot = SysRootKitInformation::sysRoot(kit).toString(); + params.debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString(); + if (ToolChain *tc = ToolChainKitInformation::toolChain(kit)) + params.toolChainAbi = tc->targetAbi(); + params.executable = runConfig->exePath().toString(); + } + if (aspect->useQmlDebugger()) { + params.languages |= QmlLanguage; + QTcpServer server; + QTC_ASSERT(server.listen(QHostAddress::LocalHost) + || server.listen(QHostAddress::LocalHostIPv6), return 0); + params.qmlServerAddress = server.serverAddress().toString(); + params.remoteSetupNeeded = true; + //TODO: Not sure if these are the right paths. + params.projectSourceDirectory = project->projectDirectory(); + params.projectSourceFiles = project->files(QmakeProject::ExcludeGeneratedFiles); + params.projectBuildDirectory = project->rootQmakeProjectNode()->buildDir(); + } + DebuggerRunControl * const debuggerRunControl = DebuggerPlugin::createDebugger(params, runConfig, errorMessage); new IosDebugSupport(runConfig, debuggerRunControl); @@ -74,7 +116,7 @@ IosDebugSupport::IosDebugSupport(IosRunConfiguration *runConfig, DebuggerRunControl *runControl) : QObject(runControl), m_runControl(runControl), m_runner(new IosRunner(this, runConfig, true)), - m_gdbServerPort(0), m_qmlPort(0) + m_gdbServerFd(0), m_qmlPort(0) { connect(m_runControl->engine(), SIGNAL(requestRemoteSetup()), @@ -84,6 +126,8 @@ IosDebugSupport::IosDebugSupport(IosRunConfiguration *runConfig, connect(m_runner, SIGNAL(gotGdbSocket(int)), SLOT(handleGdbServerFd(int))); + connect(m_runner, SIGNAL(gotInferiorPid(Q_PID)), + SLOT(handleGotInferiorPid(Q_PID))); connect(m_runner, SIGNAL(finished(bool)), SLOT(handleRemoteProcessFinished(bool))); @@ -93,17 +137,43 @@ IosDebugSupport::IosDebugSupport(IosRunConfiguration *runConfig, SLOT(handleRemoteOutput(QString))); } +IosDebugSupport::~IosDebugSupport() +{ + if (m_gdbServerFd > 0) + close(m_gdbServerFd); +} + void IosDebugSupport::handleGdbServerFd(int gdbServerFd) { - Q_UNUSED(gdbServerFd); - QTC_CHECK(false); // to do transfer fd to debugger - //m_runControl->engine()->notifyEngineRemoteSetupDone(gdbServerPort, qmlPort); + if (m_gdbServerFd > 0) { + close(m_gdbServerFd); + m_gdbServerFd = 0; + } + if (gdbServerFd > 0) { + m_runControl->engine()->notifyEngineRemoteSetupDone(m_gdbServerFd, m_qmlPort); + } else { + m_runControl->engine()->notifyEngineRemoteSetupFailed( + tr("Could not get debug server file descriptor.")); + } +} + +void IosDebugSupport::handleGotInferiorPid(Q_PID pid) +{ + if (pid > 0) { + //m_runControl->engine()->notifyInferiorPid(pid); + m_runControl->engine()->notifyEngineRemoteSetupDone(int(pid), m_qmlPort); + } else { + m_runControl->engine()->notifyEngineRemoteSetupFailed( + tr("Got an invalid process id.")); + } } void IosDebugSupport::handleRemoteProcessFinished(bool cleanEnd) { if (!cleanEnd && m_runControl) m_runControl->showMessage(tr("Run failed unexpectedly."), AppStuff); + //m_runControl->engine()->notifyInferiorIll(); + m_runControl->engine()->abortDebugger(); } void IosDebugSupport::handleRemoteOutput(const QString &output) diff --git a/src/plugins/ios/iosdebugsupport.h b/src/plugins/ios/iosdebugsupport.h index 7d2047bfc5..59b223fd5e 100644 --- a/src/plugins/ios/iosdebugsupport.h +++ b/src/plugins/ios/iosdebugsupport.h @@ -30,6 +30,7 @@ #define IOSDEBUGSUPPORT_H #include "iosrunconfiguration.h" +#include <QProcess> namespace Debugger { class DebuggerRunControl; } namespace ProjectExplorer { class RunControl; } @@ -50,9 +51,11 @@ public: IosDebugSupport(IosRunConfiguration *runConfig, Debugger::DebuggerRunControl *runControl); + ~IosDebugSupport(); private slots: void handleGdbServerFd(int gdbServerFd); + void handleGotInferiorPid(Q_PID); void handleRemoteProcessFinished(bool cleanEnd); void handleRemoteOutput(const QString &output); @@ -63,7 +66,7 @@ private: IosRunner * const m_runner; const QString m_dumperLib; - int m_gdbServerPort; + int m_gdbServerFd; int m_qmlPort; }; diff --git a/src/plugins/ios/iosdeployconfiguration.cpp b/src/plugins/ios/iosdeployconfiguration.cpp index ef54b45ac4..df108bc735 100644 --- a/src/plugins/ios/iosdeployconfiguration.cpp +++ b/src/plugins/ios/iosdeployconfiguration.cpp @@ -35,7 +35,7 @@ #include <projectexplorer/buildsteplist.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeproject.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> @@ -112,7 +112,7 @@ DeployConfiguration *IosDeployConfigurationFactory::clone(Target *parent, Deploy QList<Core::Id> IosDeployConfigurationFactory::availableCreationIds(Target *parent) const { QList<Core::Id> ids; - if (!qobject_cast<QmakeProjectManager::Qt4Project *>(parent->project())) + if (!qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project())) return ids; if (!parent->project()->supportsKit(parent->kit())) return ids; diff --git a/src/plugins/ios/iosdeploystep.cpp b/src/plugins/ios/iosdeploystep.cpp index 7c6e201f9f..3d545b82be 100644 --- a/src/plugins/ios/iosdeploystep.cpp +++ b/src/plugins/ios/iosdeploystep.cpp @@ -39,9 +39,9 @@ #include <projectexplorer/buildconfiguration.h> #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <qtsupport/qtkitinformation.h> diff --git a/src/plugins/ios/iosmanager.cpp b/src/plugins/ios/iosmanager.cpp index 263aa13798..d70dad64f6 100644 --- a/src/plugins/ios/iosmanager.cpp +++ b/src/plugins/ios/iosmanager.cpp @@ -35,10 +35,10 @@ #include <projectexplorer/session.h> #include <projectexplorer/target.h> #include <projectexplorer/toolchain.h> -#include <qt4projectmanager/qmakenodes.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakeprojectmanagerconstants.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> #include <qtsupport/customexecutablerunconfiguration.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> @@ -58,7 +58,7 @@ namespace Internal { bool IosManager::supportsIos(ProjectExplorer::Target *target) { - if (!qobject_cast<QmakeProjectManager::Qt4Project *>(target->project())) + if (!qobject_cast<QmakeProjectManager::QmakeProject *>(target->project())) return false; QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit()); return version && version->type() == QLatin1String(Ios::Constants::IOSQT); @@ -66,8 +66,8 @@ bool IosManager::supportsIos(ProjectExplorer::Target *target) QString IosManager::resDirForTarget(Target *target) { - Qt4BuildConfiguration *bc = - qobject_cast<Qt4BuildConfiguration *>(target->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = + qobject_cast<QmakeBuildConfiguration *>(target->activeBuildConfiguration()); return bc->buildDirectory().toString(); } diff --git a/src/plugins/ios/iosprobe.cpp b/src/plugins/ios/iosprobe.cpp index 228daffe30..aa0ab8b989 100644 --- a/src/plugins/ios/iosprobe.cpp +++ b/src/plugins/ios/iosprobe.cpp @@ -214,6 +214,7 @@ void IosProbe::setupDefaultToolchains(const QString &devPath, const QString &xco } if (hasClang) { Platform clangProfile; + clangProfile.developerPath = Utils::FileName::fromString(devPath); clangProfile.platformKind = 0; clangProfile.name = clangFullName; clangProfile.platformPath = Utils::FileName(fInfo); @@ -231,6 +232,7 @@ void IosProbe::setupDefaultToolchains(const QString &devPath, const QString &xco } if (hasGcc) { Platform gccProfile; + gccProfile.developerPath = Utils::FileName::fromString(devPath); gccProfile.name = gccFullName; gccProfile.platformKind = 0; // use the arm-apple-darwin10-llvm-* variant and avoid the extraFlags if available??? diff --git a/src/plugins/ios/iosqtversion.cpp b/src/plugins/ios/iosqtversion.cpp index 352a7c8b69..dbd50afa06 100644 --- a/src/plugins/ios/iosqtversion.cpp +++ b/src/plugins/ios/iosqtversion.cpp @@ -35,8 +35,8 @@ #include <utils/environment.h> #include <utils/hostosinfo.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakeprojectmanagerconstants.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp index 5c07d65594..12af0a40dc 100644 --- a/src/plugins/ios/iosrunconfiguration.cpp +++ b/src/plugins/ios/iosrunconfiguration.cpp @@ -36,9 +36,9 @@ #include <projectexplorer/deployconfiguration.h> #include <projectexplorer/buildstep.h> #include <projectexplorer/buildsteplist.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <qtsupport/qtoutputformatter.h> #include <qtsupport/qtkitinformation.h> #include "ui_iosrunconfiguration.h" @@ -144,9 +144,9 @@ QString IosRunConfiguration::profilePath() const QString IosRunConfiguration::appName() const { - Qt4Project *pro = qobject_cast<Qt4Project *>(target()->project()); + QmakeProject *pro = qobject_cast<QmakeProject *>(target()->project()); if (pro) { - const Qt4ProFileNode *node = pro->rootQt4ProjectNode()->findProFileFor(profilePath()); + const QmakeProFileNode *node = pro->rootQmakeProjectNode()->findProFileFor(profilePath()); if (node) { TargetInformation ti = node->targetInformation(); if (ti.valid) { @@ -167,8 +167,8 @@ Utils::FileName IosRunConfiguration::bundleDir() const qDebug() << "unexpected device type in bundleDirForTarget: " << devType.toString(); return res; } - Qt4BuildConfiguration *bc = - qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = + qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration()); if (bc) { res = bc->buildDirectory(); switch (bc->buildType()) { diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp index 5f9acfb5e3..e9c8219784 100644 --- a/src/plugins/ios/iosrunfactories.cpp +++ b/src/plugins/ios/iosrunfactories.cpp @@ -39,8 +39,8 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/target.h> #include <debugger/debuggerconstants.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <qtsupport/customexecutablerunconfiguration.h> #include <qtsupport/qtkitinformation.h> #include <qtsupport/qtsupportconstants.h> @@ -97,8 +97,8 @@ QList<Core::Id> IosRunConfigurationFactory::availableCreationIds(Target *parent) if (!IosManager::supportsIos(parent)) return ids; Core::Id baseId(IOS_RC_ID_PREFIX); - QList<Qt4ProFileNode *> nodes = static_cast<Qt4Project *>(parent->project())->allProFiles(); - foreach (Qt4ProFileNode *node, nodes) + QList<QmakeProFileNode *> nodes = static_cast<QmakeProject *>(parent->project())->allProFiles(); + foreach (QmakeProFileNode *node, nodes) if (node->projectType() == ApplicationTemplate || node->projectType() == LibraryTemplate || node->projectType() == AuxTemplate) ids << baseId.withSuffix(node->path()); diff --git a/src/plugins/ios/iosrunfactories.h b/src/plugins/ios/iosrunfactories.h index 60ada9a867..8f4641c331 100644 --- a/src/plugins/ios/iosrunfactories.h +++ b/src/plugins/ios/iosrunfactories.h @@ -30,7 +30,7 @@ #define IOSRUNFACTORIES_H #include <projectexplorer/runconfiguration.h> -#include <qt4projectmanager/qmakerunconfigurationfactory.h> +#include <qmakeprojectmanager/qmakerunconfigurationfactory.h> #include <utils/qtcoverride.h> namespace ProjectExplorer { diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index d6e455b9fc..c5d15c62e1 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -41,6 +41,7 @@ #include <QCoreApplication> #include <QList> #include <QScopedArrayPointer> +#include <QProcessEnvironment> #if defined(Q_OS_UNIX) #include <sys/types.h> @@ -65,6 +66,7 @@ class MyProcess: public QProcess Q_OBJECT public: explicit MyProcess(QObject *parent = 0); + ~MyProcess(); int processOutputSocket(); QSocketNotifier *notifier(); protected: @@ -224,10 +226,15 @@ MyProcess::MyProcess(QObject *parent) : QProcess(parent) if (socketpair(PF_UNIX, SOCK_STREAM, 0, &m_sockets[0]) == -1) { qDebug() << "IosToolHandler socketpair failed "; } - shutdown(m_sockets[0], SHUT_WR); m_notifier = new QSocketNotifier(m_sockets[0], QSocketNotifier::Read, this); } +MyProcess::~MyProcess() +{ + ::close(m_sockets[0]); + ::close(m_sockets[1]); +} + int MyProcess::processOutputSocket() { return m_sockets[0]; @@ -245,13 +252,16 @@ void MyProcess::setupChildProcess() emit finished(-1, QProcess::CrashExit); exit(-1); } - shutdown(1, SHUT_RD); // leave open for handshake when transferring fd? } #else MyProcess::MyProcess(QObject *parent) : QProcess(parent) { } +MyProcess::~MyProcess() +{ +} + int MyProcess::processOutputSocket() { return 0; @@ -272,6 +282,11 @@ IosToolHandlerPrivate::IosToolHandlerPrivate(IosToolHandler::DeviceType devType, q(q), state(NonStarted), devType(devType), buffer(4*lookaheadSize, 0), iBegin(0), iEnd(0), gdbSocket(-1) { + QProcessEnvironment env(QProcessEnvironment::systemEnvironment()); + foreach (const QString &k, env.keys()) + if (k.startsWith(QLatin1String("DYLD_"))) + env.remove(k); + process.setProcessEnvironment(env); QObject::connect(process.notifier(), SIGNAL(activated(int)), q, SLOT(subprocessHasData(int))); QObject::connect(&process, SIGNAL(finished(int,QProcess::ExitStatus)), q, SLOT(subprocessFinished(int,QProcess::ExitStatus))); @@ -498,6 +513,8 @@ int recv_fd(int socket) if ( (control_message->cmsg_level == SOL_SOCKET) && (control_message->cmsg_type == SCM_RIGHTS) ) { sent_fd = *((int *) CMSG_DATA(control_message)); + // aknowledge fd + send(socket, "x", 1, 0); return sent_fd; } } @@ -777,7 +794,7 @@ void IosToolHandlerPrivate::subprocessHasData(int socket) currentData = buffer.mid(0, lastXmlSize); // remove this?? } qptrdiff toRead = lookaheadSize - (iEnd - spacerStart); - qptrdiff reallyRead = recv(socket, buffer.data() + iBegin, toRead, 0); + qptrdiff reallyRead = recv(socket, buffer.data() + iEnd, toRead, 0); if (reallyRead == 0) { // eof stop(); return; @@ -799,14 +816,19 @@ void IosToolHandlerPrivate::subprocessHasData(int socket) iEnd += reallyRead; if (reallyRead != toRead) continue; - if (spacerStart < iEnd && buffer.at(spacerStart) != 'n') { + if (spacerStart < iEnd && buffer.at(spacerStart) != 'N') { ++spacerStart; - while (spacerStart < iEnd && buffer.at(spacerStart) != 'n') + while (spacerStart < iEnd && buffer.at(spacerStart) != 'N') ++spacerStart; continue; } } + if (buffer.at(iEnd-1) != 'd') { + qDebug() << "IosToolHandler: bad alignment of spacer: " << buffer.mid(iBegin, iEnd - iBegin); + return; + } gdbSocket = recv_fd(socket); + qDebug() << "IosToolHandler: receivedSocket"; gotGdbserverSocket(bundlePath, deviceId, gdbSocket); stop(); return; diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 47654779f0..31ea3da18a 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -19,7 +19,7 @@ SUBDIRS = \ cvs \ cpptools \ qtsupport \ - qt4projectmanager \ + qmakeprojectmanager \ locator \ debugger \ help \ diff --git a/src/plugins/plugins.qbs b/src/plugins/plugins.qbs index 1aac37aa89..cf301e0ade 100644 --- a/src/plugins/plugins.qbs +++ b/src/plugins/plugins.qbs @@ -47,7 +47,7 @@ Project { "qmlprofiler/qmlprofiler.qbs", "qmlprojectmanager/qmlprojectmanager.qbs", "qnx/qnx.qbs", - "qt4projectmanager/qt4projectmanager.qbs", + "qmakeprojectmanager/qmakeprojectmanager.qbs", "qtsupport/qtsupport.qbs", "remotelinux/remotelinux.qbs", "resourceeditor/resourceeditor.qbs", diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 936505369d..b12a3d401b 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -111,47 +111,19 @@ static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, cons return data; } -static QByteArray gccPredefinedMacros(const FileName &gcc, const QStringList &args, const QStringList &env) +static const QStringList gccPredefinedMacrosOptions() { - QStringList arguments; - arguments << QLatin1String("-xc++") - << QLatin1String("-E") - << QLatin1String("-dM"); - foreach (const QString &a, args) { - if (a == QLatin1String("-m128bit-long-double") || a == QLatin1String("-m32") - || a == QLatin1String("-m3dnow") || a == QLatin1String("-m3dnowa") - || a == QLatin1String("-m64") || a == QLatin1String("-m96bit-long-double") - || a == QLatin1String("-mabm") || a == QLatin1String("-maes") - || a.startsWith(QLatin1String("-march=")) || a == QLatin1String("-mavx") - || a.startsWith(QLatin1String("-masm=")) || a == QLatin1String("-mcx16") - || a == QLatin1String("-mfma") || a == QLatin1String("-mfma4") - || a == QLatin1String("-mlwp") || a == QLatin1String("-mpclmul") - || a == QLatin1String("-mpopcnt") || a == QLatin1String("-msse") - || a == QLatin1String("-msse2") || a == QLatin1String("-msse2avx") - || a == QLatin1String("-msse3") || a == QLatin1String("-msse4") - || a == QLatin1String("-msse4.1") || a == QLatin1String("-msse4.2") - || a == QLatin1String("-msse4a") || a == QLatin1String("-mssse3") - || a.startsWith(QLatin1String("-mtune=")) || a == QLatin1String("-mxop") - || a == QLatin1String("-Os") || a == QLatin1String("-O0") || a == QLatin1String("-O1") - || a == QLatin1String("-O2") || a == QLatin1String("-O3") - || a == QLatin1String("-ffinite-math-only") || a == QLatin1String("-fshort-double") - || a == QLatin1String("-fshort-wchar") || a == QLatin1String("-fsignaling-nans") - || a == QLatin1String("-fno-inline") || a == QLatin1String("-fno-exceptions") - || a == QLatin1String("-fstack-protector") || a == QLatin1String("-fstack-protector-all") - || a == QLatin1String("-fsanitize=address") || a == QLatin1String("-fno-rtti") - || a.startsWith(QLatin1String("-std=")) || a.startsWith(QLatin1String("-stdlib=")) - || a.startsWith(QLatin1String("-specs=")) - || a == QLatin1String("-ansi") || a == QLatin1String("-undef") - || a.startsWith(QLatin1String("-D")) || a.startsWith(QLatin1String("-U")) - || a == QLatin1String("-fopenmp") || a == QLatin1String("-Wno-deprecated")) - arguments << a; - } + return QStringList() << QLatin1String("-xc++") << QLatin1String("-E") << QLatin1String("-dM"); +} +static QByteArray gccPredefinedMacros(const FileName &gcc, const QStringList &args, const QStringList &env) +{ + QStringList arguments = args; arguments << QLatin1String("-"); QByteArray predefinedMacros = runGcc(gcc, arguments, env); // Sanity check in case we get an error message instead of real output: - QTC_CHECK(predefinedMacros.startsWith("#define ")); + QTC_CHECK(predefinedMacros.isNull() || predefinedMacros.startsWith("#define ")); if (Utils::HostOsInfo::isMacHost()) { // Turn off flag indicating Apple's blocks support const QByteArray blocksDefine("#define __BLOCKS__ 1"); @@ -169,23 +141,10 @@ static QByteArray gccPredefinedMacros(const FileName &gcc, const QStringList &ar const int GccToolChain::PREDEFINED_MACROS_CACHE_SIZE = 16; -QList<HeaderPath> GccToolChain::gccHeaderPaths(const FileName &gcc, const QStringList &args, - const QStringList &env, const FileName &sysrootPath) +QList<HeaderPath> GccToolChain::gccHeaderPaths(const FileName &gcc, const QStringList &arguments, + const QStringList &env) { QList<HeaderPath> systemHeaderPaths; - QStringList arguments; - if (!sysrootPath.isEmpty()) - arguments.append(QString::fromLatin1("--sysroot=%1").arg(sysrootPath.toString())); - foreach (const QString &a, args) { - if (a.startsWith(QLatin1String("-stdlib="))) - arguments << a; - } - - arguments << QLatin1String("-xc++") - << QLatin1String("-E") - << QLatin1String("-v") - << QLatin1String("-"); - QByteArray line; QByteArray data = runGcc(gcc, arguments, env); QBuffer cpp(&data); @@ -255,6 +214,7 @@ static QList<Abi> guessGccAbi(const QString &m, const QByteArray ¯os) } static QList<Abi> guessGccAbi(const FileName &path, const QStringList &env, + const QByteArray ¯os, const QStringList &extraArgs = QStringList()) { if (path.isEmpty()) @@ -265,7 +225,6 @@ static QList<Abi> guessGccAbi(const FileName &path, const QStringList &env, QString machine = QString::fromLocal8Bit(runGcc(path, arguments, env)).trimmed(); if (machine.isEmpty()) return QList<Abi>(); // no need to continue if running failed once... - QByteArray macros = gccPredefinedMacros(path, QStringList(), env); return guessGccAbi(machine, macros); } @@ -297,6 +256,38 @@ GccToolChain::GccToolChain(const GccToolChain &tc) : m_version(tc.m_version) { } +void GccToolChain::setMacroCache(const QStringList &allCxxflags, const QByteArray ¯os) const +{ + if (macros.isNull()) + return; + + CacheItem runResults; + QByteArray data = macros; + runResults.first = allCxxflags; + if (macros.isNull()) + data = QByteArray(""); + runResults.second = data; + + m_predefinedMacros.push_back(runResults); + if (m_predefinedMacros.size() > PREDEFINED_MACROS_CACHE_SIZE) + m_predefinedMacros.pop_front(); +} + +QByteArray GccToolChain::macroCache(const QStringList &allCxxflags) const +{ + for (GccCache::iterator it = m_predefinedMacros.begin(); it != m_predefinedMacros.end(); ++it) { + if (it->first == allCxxflags) { + // Increase cached item priority + CacheItem pair = *it; + m_predefinedMacros.erase(it); + m_predefinedMacros.push_back(pair); + + return pair.second; + } + } + return QByteArray(); +} + QString GccToolChain::defaultDisplayName() const { if (!m_targetAbi.isValid()) @@ -370,31 +361,49 @@ bool GccToolChain::isValid() const QByteArray GccToolChain::predefinedMacros(const QStringList &cxxflags) const { QStringList allCxxflags = m_platformCodeGenFlags + cxxflags; // add only cxxflags is empty? - typedef QPair<QStringList, QByteArray> CacheItem; - - for (GccCache::iterator it = m_predefinedMacros.begin(); it != m_predefinedMacros.end(); ++it) - if (it->first == allCxxflags) { - // Increase cached item priority - CacheItem pair = *it; - m_predefinedMacros.erase(it); - m_predefinedMacros.push_back(pair); - - return pair.second; - } - CacheItem runResults; - runResults.first = allCxxflags; + QByteArray macros = macroCache(allCxxflags); + if (!macros.isNull()) + return macros; // Using a clean environment breaks ccache/distcc/etc. Environment env = Environment::systemEnvironment(); addToEnvironment(env); - runResults.second = gccPredefinedMacros(m_compilerCommand, allCxxflags, env.toStringList()); - - m_predefinedMacros.push_back(runResults); - if (m_predefinedMacros.size() > PREDEFINED_MACROS_CACHE_SIZE) - m_predefinedMacros.pop_front(); + QStringList arguments = gccPredefinedMacrosOptions(); + foreach (const QString &a, allCxxflags) { + if (a == QLatin1String("-m128bit-long-double") || a == QLatin1String("-m32") + || a == QLatin1String("-m3dnow") || a == QLatin1String("-m3dnowa") + || a == QLatin1String("-m64") || a == QLatin1String("-m96bit-long-double") + || a == QLatin1String("-mabm") || a == QLatin1String("-maes") + || a.startsWith(QLatin1String("-march=")) || a == QLatin1String("-mavx") + || a.startsWith(QLatin1String("-masm=")) || a == QLatin1String("-mcx16") + || a == QLatin1String("-mfma") || a == QLatin1String("-mfma4") + || a == QLatin1String("-mlwp") || a == QLatin1String("-mpclmul") + || a == QLatin1String("-mpopcnt") || a == QLatin1String("-msse") + || a == QLatin1String("-msse2") || a == QLatin1String("-msse2avx") + || a == QLatin1String("-msse3") || a == QLatin1String("-msse4") + || a == QLatin1String("-msse4.1") || a == QLatin1String("-msse4.2") + || a == QLatin1String("-msse4a") || a == QLatin1String("-mssse3") + || a.startsWith(QLatin1String("-mtune=")) || a == QLatin1String("-mxop") + || a == QLatin1String("-Os") || a == QLatin1String("-O0") || a == QLatin1String("-O1") + || a == QLatin1String("-O2") || a == QLatin1String("-O3") + || a == QLatin1String("-ffinite-math-only") || a == QLatin1String("-fshort-double") + || a == QLatin1String("-fshort-wchar") || a == QLatin1String("-fsignaling-nans") + || a == QLatin1String("-fno-inline") || a == QLatin1String("-fno-exceptions") + || a == QLatin1String("-fstack-protector") || a == QLatin1String("-fstack-protector-all") + || a == QLatin1String("-fsanitize=address") || a == QLatin1String("-fno-rtti") + || a.startsWith(QLatin1String("-std=")) || a.startsWith(QLatin1String("-stdlib=")) + || a.startsWith(QLatin1String("-specs=")) + || a == QLatin1String("-ansi") || a == QLatin1String("-undef") + || a.startsWith(QLatin1String("-D")) || a.startsWith(QLatin1String("-U")) + || a == QLatin1String("-fopenmp") || a == QLatin1String("-Wno-deprecated")) + arguments << a; + } + macros = gccPredefinedMacros(m_compilerCommand, reinterpretOptions(arguments), + env.toStringList()); - return runResults.second; + setMacroCache(allCxxflags, macros); + return macros; } /** @@ -501,8 +510,24 @@ QList<HeaderPath> GccToolChain::systemHeaderPaths(const QStringList &cxxflags, c // Using a clean environment breaks ccache/distcc/etc. Environment env = Environment::systemEnvironment(); addToEnvironment(env); - m_headerPaths = gccHeaderPaths(m_compilerCommand, m_platformCodeGenFlags + cxxflags , // add only cxxflags is empty? - env.toStringList(), sysRoot); + // Prepare arguments + QStringList arguments; + if (!sysRoot.isEmpty()) + arguments.append(QString::fromLatin1("--sysroot=%1").arg(sysRoot.toString())); + + QStringList flags; + flags << m_platformCodeGenFlags << cxxflags; + foreach (const QString &a, flags) { + if (a.startsWith(QLatin1String("-stdlib="))) + arguments << a; + } + + arguments << QLatin1String("-xc++") + << QLatin1String("-E") + << QLatin1String("-v") + << QLatin1String("-"); + + m_headerPaths = gccHeaderPaths(m_compilerCommand, reinterpretOptions(arguments), env.toStringList()); } return m_headerPaths; } @@ -699,7 +724,8 @@ QList<Abi> GccToolChain::detectSupportedAbis() const { Environment env = Environment::systemEnvironment(); addToEnvironment(env); - return guessGccAbi(m_compilerCommand, env.toStringList(), platformCodeGenFlags()); + QByteArray macros = predefinedMacros(QStringList()); + return guessGccAbi(m_compilerCommand, env.toStringList(), macros, platformCodeGenFlags()); } QString GccToolChain::detectVersion() const @@ -778,7 +804,9 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(const QString &comp return result; GccToolChain::addCommandPathToEnvironment(compilerPath, systemEnvironment); - QList<Abi> abiList = guessGccAbi(compilerPath, systemEnvironment.toStringList()); + QByteArray macros + = gccPredefinedMacros(compilerPath, gccPredefinedMacrosOptions(), systemEnvironment.toStringList()); + QList<Abi> abiList = guessGccAbi(compilerPath, systemEnvironment.toStringList(), macros); if (!abiList.contains(requiredAbi)) { if (requiredAbi.wordWidth() != 64 || !abiList.contains(Abi(requiredAbi.architecture(), requiredAbi.os(), requiredAbi.osFlavor(), @@ -788,6 +816,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(const QString &comp foreach (const Abi &abi, abiList) { QScopedPointer<GccToolChain> tc(createToolChain(true)); + tc->setMacroCache(QStringList(), macros); if (tc.isNull()) return result; @@ -850,6 +879,7 @@ void GccToolChainConfigWidget::applyImpl() tc->setDisplayName(displayName); // reset display name tc->setPlatformCodeGenFlags(splitString(m_platformCodeGenFlagsLineEdit->text())); tc->setPlatformLinkerFlags(splitString(m_platformLinkerFlagsLineEdit->text())); + tc->setMacroCache(tc->platformCodeGenFlags(), m_macros); } void GccToolChainConfigWidget::setFromToolchain() @@ -912,7 +942,9 @@ void GccToolChainConfigWidget::handleCompilerCommandChange() if (haveCompiler) { Environment env = Environment::systemEnvironment(); GccToolChain::addCommandPathToEnvironment(path, env); - abiList = guessGccAbi(path, env.toStringList(), + QStringList args = gccPredefinedMacrosOptions() + splitString(m_platformCodeGenFlagsLineEdit->text()); + m_macros = gccPredefinedMacros(path, args, env.toStringList()); + abiList = guessGccAbi(path, env.toStringList(), m_macros, splitString(m_platformCodeGenFlagsLineEdit->text())); } m_abiWidget->setEnabled(haveCompiler); diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h index 1361f4b433..7b377da76f 100644 --- a/src/plugins/projectexplorer/gcctoolchain.h +++ b/src/plugins/projectexplorer/gcctoolchain.h @@ -43,6 +43,7 @@ namespace ProjectExplorer { namespace Internal { class ClangToolChainFactory; +class GccToolChainConfigWidget; class GccToolChainFactory; class MingwToolChainFactory; class LinuxIccToolChainFactory; @@ -98,13 +99,21 @@ protected: GccToolChain(const GccToolChain &); + typedef QPair<QStringList, QByteArray> CacheItem; + + void setMacroCache(const QStringList &allCxxflags, const QByteArray ¯oCache) const; + QByteArray macroCache(const QStringList &allCxxflags) const; + virtual QString defaultDisplayName() const; virtual CompilerFlags defaultCompilerFlags() const; virtual QList<Abi> detectSupportedAbis() const; virtual QString detectVersion() const; - static QList<HeaderPath> gccHeaderPaths(const Utils::FileName &gcc, const QStringList &args, const QStringList &env, const Utils::FileName &sysrootPath); + // Reinterpret options for compiler drivers inheriting from GccToolChain (e.g qcc) to apply -Wp option + // that passes the initial options directly down to the gcc compiler + virtual QStringList reinterpretOptions(const QStringList &argument) const { return argument; } + static QList<HeaderPath> gccHeaderPaths(const Utils::FileName &gcc, const QStringList &args, const QStringList &env); static const int PREDEFINED_MACROS_CACHE_SIZE; mutable GccCache m_predefinedMacros; @@ -137,6 +146,7 @@ private: mutable QList<HeaderPath> m_headerPaths; mutable QString m_version; + friend class Internal::GccToolChainConfigWidget; friend class Internal::GccToolChainFactory; friend class ToolChainFactory; }; diff --git a/src/plugins/projectexplorer/gcctoolchainfactories.h b/src/plugins/projectexplorer/gcctoolchainfactories.h index 7a2ef000de..b1186ecc9d 100644 --- a/src/plugins/projectexplorer/gcctoolchainfactories.h +++ b/src/plugins/projectexplorer/gcctoolchainfactories.h @@ -102,6 +102,7 @@ private: QList<Abi> m_abiList; bool m_isReadOnly; + QByteArray m_macros; }; // -------------------------------------------------------------------------- diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp index 06f4e78ee1..53cad44764 100644 --- a/src/plugins/projectexplorer/projectnodes.cpp +++ b/src/plugins/projectexplorer/projectnodes.cpp @@ -312,7 +312,7 @@ FolderNode *FolderNode::findSubFolder(const QString &path) In-memory presentation of a virtual folder. Note that the node itself + all children (files and folders) are "managed" by the owning project. A virtual folder does not correspond to a actual folder on the file system. See for example the - sources, headers and forms folder the qt4projectmanager creates + sources, headers and forms folder the QmakeProjectManager creates VirtualFolderNodes are always sorted before FolderNodes and are sorted according to their priority. \sa ProjectExplorer::FileNode, ProjectExplorer::ProjectNode diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp index 1796bc1004..64f73942e8 100644 --- a/src/plugins/projectexplorer/settingsaccessor.cpp +++ b/src/plugins/projectexplorer/settingsaccessor.cpp @@ -1076,7 +1076,7 @@ QVariantMap Version0Handler::convertBuildConfigurations(Project *project, const if (id == QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration") || id.startsWith(QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration."))) { - // Qt4BuildConfiguration: + // QmakeBuildConfiguration: if (i.key() == QLatin1String("QtVersionId")) { result.insert(QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId"), i.value().toInt()); @@ -1099,7 +1099,7 @@ QVariantMap Version0Handler::convertBuildConfigurations(Project *project, const result.insert(QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory"), i.value()); } else { - qWarning() << "Unknown Qt4BuildConfiguration Key found:" << i.key() << i.value(); + qWarning() << "Unknown QmakeBuildConfiguration Key found:" << i.key() << i.value(); } continue; } else if (id == QLatin1String("CMakeProjectManager.CMakeBuildConfiguration")) { diff --git a/src/plugins/qt4projectmanager/Qt4ProjectManager.mimetypes.xml b/src/plugins/qmakeprojectmanager/QmakeProjectManager.mimetypes.xml index b9d06e6aea..b9d06e6aea 100644 --- a/src/plugins/qt4projectmanager/Qt4ProjectManager.mimetypes.xml +++ b/src/plugins/qmakeprojectmanager/QmakeProjectManager.mimetypes.xml diff --git a/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec.in b/src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in index 71aea43b2b..2a4f3745dc 100644 --- a/src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec.in +++ b/src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in @@ -1,4 +1,4 @@ -<plugin name=\"Qt4ProjectManager\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_COMPAT_VERSION\"> +<plugin name=\"QmakeProjectManager\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_COMPAT_VERSION\"> <vendor>Digia Plc</vendor> <copyright>(C) 2013 Digia Plc</copyright> <license> @@ -11,7 +11,7 @@ GNU Lesser General Public License Usage Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. </license> <category>Build Systems</category> - <description>Provides project type for Qt 4 pro files and tools.</description> + <description>Provides project type for Qt/QMake .pro files and tools.</description> <url>http://www.qt-project.org</url> $$dependencyList </plugin> diff --git a/src/plugins/qt4projectmanager/addlibrarywizard.cpp b/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp index 554081081e..554081081e 100644 --- a/src/plugins/qt4projectmanager/addlibrarywizard.cpp +++ b/src/plugins/qmakeprojectmanager/addlibrarywizard.cpp diff --git a/src/plugins/qt4projectmanager/addlibrarywizard.h b/src/plugins/qmakeprojectmanager/addlibrarywizard.h index be9b99b2ce..be9b99b2ce 100644 --- a/src/plugins/qt4projectmanager/addlibrarywizard.h +++ b/src/plugins/qmakeprojectmanager/addlibrarywizard.h diff --git a/src/plugins/qt4projectmanager/applicationlauncher.h b/src/plugins/qmakeprojectmanager/applicationlauncher.h index b51ab06b38..b51ab06b38 100644 --- a/src/plugins/qt4projectmanager/applicationlauncher.h +++ b/src/plugins/qmakeprojectmanager/applicationlauncher.h diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp index 2e950d0a14..2e950d0a14 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.cpp diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.h index fa8d4676f0..fa8d4676f0 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.h diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.ui b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.ui index ac89b0c6d9..ac89b0c6d9 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.ui +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/classdefinition.ui diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/classlist.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.cpp index 22297ae81c..22297ae81c 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/classlist.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.cpp diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/classlist.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.h index b745dd5f1a..b745dd5f1a 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/classlist.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/classlist.h diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp index 9536f67302..9536f67302 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.h index fcb4792b65..fcb4792b65 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.h diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.ui b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.ui index 2f70b02a43..2f70b02a43 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.ui +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.ui diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp index 89bd627073..89bd627073 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.h index 74b4ed9ca2..74b4ed9ca2 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.h diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.ui b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.ui index 747738b0fe..3b08551f1e 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwidgetswizardpage.ui +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.ui @@ -94,7 +94,7 @@ <customwidget> <class>QmakeProjectManager::Internal::ClassList</class> <extends>QListWidget</extends> - <header location="global">qt4projectmanager/customwidgetwizard/classlist.h</header> + <header location="global">qmakeprojectmanager/customwidgetwizard/classlist.h</header> </customwidget> </customwidgets> <tabstops> diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.cpp index eb94d6a6b9..eb94d6a6b9 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.cpp diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.h index 2dd4b5d65b..2dd4b5d65b 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.h diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.pri b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.pri index 0a48d5b4bd..0a48d5b4bd 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.pri +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizard.pri diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.cpp index 3a27e79cf4..8ee0ab7300 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.cpp @@ -62,7 +62,7 @@ CustomWidgetWizardDialog::CustomWidgetWizardDialog(const QString &templateName, const QIcon &icon, QWidget *parent, const Core::WizardDialogParameters ¶meters) : - BaseQt4ProjectWizardDialog(false, parent, parameters), + BaseQmakeProjectWizardDialog(false, parent, parameters), m_widgetsPage(new CustomWidgetWidgetsWizardPage), m_pluginPage(new CustomWidgetPluginWizardPage), m_widgetPageId(-1), m_pluginPageId(-1) diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.h index faa11b96d7..daf1ab8240 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwizarddialog.h @@ -42,7 +42,7 @@ class CustomWidgetPluginWizardPage; struct PluginOptions; struct FileNamingParameters; -class CustomWidgetWizardDialog : public BaseQt4ProjectWizardDialog +class CustomWidgetWizardDialog : public BaseQmakeProjectWizardDialog { Q_OBJECT public: diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/filenamingparameters.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/filenamingparameters.h index 996d7eee28..996d7eee28 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/filenamingparameters.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/filenamingparameters.h diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.cpp index db85709cc6..db85709cc6 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.cpp diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.h index 27bd3c996b..27bd3c996b 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/plugingenerator.h diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/pluginoptions.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/pluginoptions.h index 483a49a708..483a49a708 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/pluginoptions.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/pluginoptions.h diff --git a/src/plugins/qt4projectmanager/qmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp index dc66e8e056..9df0e595cf 100644 --- a/src/plugins/qt4projectmanager/qmakerunconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp @@ -27,7 +27,7 @@ ** ****************************************************************************/ -#include "qmakerunconfiguration.h" +#include "desktopqmakerunconfiguration.h" #include "qmakenodes.h" #include "qmakeproject.h" @@ -36,65 +36,61 @@ #include <coreplugin/coreconstants.h> #include <projectexplorer/localenvironmentaspect.h> #include <projectexplorer/target.h> -#include <utils/qtcprocess.h> -#include <utils/pathchooser.h> -#include <utils/detailswidget.h> -#include <utils/stringutils.h> -#include <utils/persistentsettings.h> +#include <qtsupport/qtkitinformation.h> #include <qtsupport/qtoutputformatter.h> #include <qtsupport/qtsupportconstants.h> -#include <qtsupport/qtkitinformation.h> +#include <utils/detailswidget.h> #include <utils/hostosinfo.h> +#include <utils/pathchooser.h> +#include <utils/persistentsettings.h> +#include <utils/qtcprocess.h> +#include <utils/stringutils.h> +#include <QCheckBox> +#include <QComboBox> +#include <QDir> +#include <QFileInfo> #include <QFormLayout> #include <QLabel> #include <QLineEdit> -#include <QCheckBox> #include <QToolButton> -#include <QComboBox> -#include <QFileInfo> -#include <QDir> -using namespace QmakeProjectManager::Internal; -using namespace QmakeProjectManager; -using ProjectExplorer::LocalApplicationRunConfiguration; -using Utils::PersistentSettingsReader; -using Utils::PersistentSettingsWriter; +using namespace ProjectExplorer; +using namespace Utils; -namespace { +namespace QmakeProjectManager { +namespace Internal { -const char QT4_RC_PREFIX[] = "Qt4ProjectManager.Qt4RunConfiguration:"; +const char QMAKE_RC_PREFIX[] = "Qt4ProjectManager.Qt4RunConfiguration:"; const char COMMAND_LINE_ARGUMENTS_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"; const char PRO_FILE_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.ProFile"; const char USE_TERMINAL_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.UseTerminal"; const char USE_DYLD_IMAGE_SUFFIX_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix"; const char USER_WORKING_DIRECTORY_KEY[] = "Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"; -QString pathFromId(Core::Id id) +static QString pathFromId(Core::Id id) { - return id.suffixAfter(QT4_RC_PREFIX); + return id.suffixAfter(QMAKE_RC_PREFIX); } -} // namespace - // -// Qt4RunConfiguration +// QmakeRunConfiguration // -Qt4RunConfiguration::Qt4RunConfiguration(ProjectExplorer::Target *parent, Core::Id id) : +DesktopQmakeRunConfiguration::DesktopQmakeRunConfiguration(Target *parent, Core::Id id) : LocalApplicationRunConfiguration(parent, id), m_proFilePath(pathFromId(id)), m_runMode(Gui), m_isUsingDyldImageSuffix(false) { - Qt4Project *project = static_cast<Qt4Project *>(parent->project()); + QmakeProject *project = static_cast<QmakeProject *>(parent->project()); m_parseSuccess = project->validParse(m_proFilePath); m_parseInProgress = project->parseInProgress(m_proFilePath); ctor(); } -Qt4RunConfiguration::Qt4RunConfiguration(ProjectExplorer::Target *parent, Qt4RunConfiguration *source) : +DesktopQmakeRunConfiguration::DesktopQmakeRunConfiguration(Target *parent, DesktopQmakeRunConfiguration *source) : LocalApplicationRunConfiguration(parent, source), m_commandLineArguments(source->m_commandLineArguments), m_proFilePath(source->m_proFilePath), @@ -107,30 +103,29 @@ Qt4RunConfiguration::Qt4RunConfiguration(ProjectExplorer::Target *parent, Qt4Run ctor(); } -Qt4RunConfiguration::~Qt4RunConfiguration() +DesktopQmakeRunConfiguration::~DesktopQmakeRunConfiguration() { } -bool Qt4RunConfiguration::isEnabled() const +bool DesktopQmakeRunConfiguration::isEnabled() const { return m_parseSuccess && !m_parseInProgress; } -QString Qt4RunConfiguration::disabledReason() const +QString DesktopQmakeRunConfiguration::disabledReason() const { if (m_parseInProgress) return tr("The .pro file '%1' is currently being parsed.") .arg(QFileInfo(m_proFilePath).fileName()); if (!m_parseSuccess) - return static_cast<Qt4Project *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath); + return static_cast<QmakeProject *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath); return QString(); } -void Qt4RunConfiguration::proFileUpdated(QmakeProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress) +void DesktopQmakeRunConfiguration::proFileUpdated(QmakeProFileNode *pro, bool success, bool parseInProgress) { - ProjectExplorer::LocalEnvironmentAspect *aspect - = extraAspect<ProjectExplorer::LocalEnvironmentAspect>(); + LocalEnvironmentAspect *aspect = extraAspect<LocalEnvironmentAspect>(); QTC_ASSERT(aspect, return); if (m_proFilePath != pro->path()) { @@ -155,20 +150,20 @@ void Qt4RunConfiguration::proFileUpdated(QmakeProjectManager::Qt4ProFileNode *pr } } -void Qt4RunConfiguration::ctor() +void DesktopQmakeRunConfiguration::ctor() { setDefaultDisplayName(defaultDisplayName()); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit()); m_forcedGuiMode = (version && version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT)); - connect(target()->project(), SIGNAL(proFileUpdated(QmakeProjectManager::Qt4ProFileNode*,bool,bool)), - this, SLOT(proFileUpdated(QmakeProjectManager::Qt4ProFileNode*,bool,bool))); + connect(target()->project(), SIGNAL(proFileUpdated(QmakeProjectManager::QmakeProFileNode*,bool,bool)), + this, SLOT(proFileUpdated(QmakeProjectManager::QmakeProFileNode*,bool,bool))); connect(target(), SIGNAL(kitChanged()), this, SLOT(kitChanged())); } -void Qt4RunConfiguration::kitChanged() +void DesktopQmakeRunConfiguration::kitChanged() { QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit()); m_forcedGuiMode = (version && version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT)); @@ -176,12 +171,12 @@ void Qt4RunConfiguration::kitChanged() } ////// -/// Qt4RunConfigurationWidget +/// DesktopQmakeRunConfigurationWidget ///// -Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4RunConfiguration, QWidget *parent) +DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQmakeRunConfiguration *qmakeRunConfiguration, QWidget *parent) : QWidget(parent), - m_qt4RunConfiguration(qt4RunConfiguration), + m_qmakeRunConfiguration(qmakeRunConfiguration), m_ignoreChange(false), m_usingDyldImageSuffix(0), m_isShown(false) @@ -200,8 +195,8 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run hl->addStretch(); vboxTopLayout->addLayout(hl); - m_detailsContainer = new Utils::DetailsWidget(this); - m_detailsContainer->setState(Utils::DetailsWidget::NoSummary); + m_detailsContainer = new DetailsWidget(this); + m_detailsContainer->setState(DetailsWidget::NoSummary); vboxTopLayout->addWidget(m_detailsContainer); QWidget *detailsWidget = new QWidget(m_detailsContainer); m_detailsContainer->setWidget(detailsWidget); @@ -209,21 +204,20 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run toplayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); toplayout->setMargin(0); - m_executableLineEdit = new QLineEdit(m_qt4RunConfiguration->executable(), this); + m_executableLineEdit = new QLineEdit(m_qmakeRunConfiguration->executable(), this); m_executableLineEdit->setEnabled(false); toplayout->addRow(tr("Executable:"), m_executableLineEdit); QLabel *argumentsLabel = new QLabel(tr("Arguments:"), this); - m_argumentsLineEdit = new QLineEdit(qt4RunConfiguration->rawCommandLineArguments(), this); + m_argumentsLineEdit = new QLineEdit(qmakeRunConfiguration->rawCommandLineArguments(), this); argumentsLabel->setBuddy(m_argumentsLineEdit); toplayout->addRow(argumentsLabel, m_argumentsLineEdit); - m_workingDirectoryEdit = new Utils::PathChooser(this); - m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory); - m_workingDirectoryEdit->setPath(m_qt4RunConfiguration->baseWorkingDirectory()); - m_workingDirectoryEdit->setBaseDirectory(m_qt4RunConfiguration->target()->project()->projectDirectory()); - ProjectExplorer::EnvironmentAspect *aspect - = qt4RunConfiguration->extraAspect<ProjectExplorer::EnvironmentAspect>(); + m_workingDirectoryEdit = new PathChooser(this); + m_workingDirectoryEdit->setExpectedKind(PathChooser::Directory); + m_workingDirectoryEdit->setPath(m_qmakeRunConfiguration->baseWorkingDirectory()); + m_workingDirectoryEdit->setBaseDirectory(m_qmakeRunConfiguration->target()->project()->projectDirectory()); + EnvironmentAspect *aspect = qmakeRunConfiguration->extraAspect<EnvironmentAspect>(); if (aspect) { connect(aspect, SIGNAL(environmentChanged()), this, SLOT(environmentWasChanged())); environmentWasChanged(); @@ -242,21 +236,21 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run QHBoxLayout *innerBox = new QHBoxLayout(); m_useTerminalCheck = new QCheckBox(tr("Run in terminal"), this); - m_useTerminalCheck->setChecked(m_qt4RunConfiguration->runMode() == ProjectExplorer::LocalApplicationRunConfiguration::Console); - m_useTerminalCheck->setVisible(!m_qt4RunConfiguration->forcedGuiMode()); + m_useTerminalCheck->setChecked(m_qmakeRunConfiguration->runMode() == LocalApplicationRunConfiguration::Console); + m_useTerminalCheck->setVisible(!m_qmakeRunConfiguration->forcedGuiMode()); innerBox->addWidget(m_useTerminalCheck); m_useQvfbCheck = new QCheckBox(tr("Run on QVFb"), this); m_useQvfbCheck->setToolTip(tr("Check this option to run the application on a Qt Virtual Framebuffer.")); - m_useQvfbCheck->setChecked(m_qt4RunConfiguration->runMode() == ProjectExplorer::LocalApplicationRunConfiguration::Console); + m_useQvfbCheck->setChecked(m_qmakeRunConfiguration->runMode() == LocalApplicationRunConfiguration::Console); m_useQvfbCheck->setVisible(false); innerBox->addWidget(m_useQvfbCheck); innerBox->addStretch(); toplayout->addRow(QString(), innerBox); - if (Utils::HostOsInfo::isMacHost()) { + if (HostOsInfo::isMacHost()) { m_usingDyldImageSuffix = new QCheckBox(tr("Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug)"), this); - m_usingDyldImageSuffix->setChecked(m_qt4RunConfiguration->isUsingDyldImageSuffix()); + m_usingDyldImageSuffix->setChecked(m_qmakeRunConfiguration->isUsingDyldImageSuffix()); toplayout->addRow(QString(), m_usingDyldImageSuffix); connect(m_usingDyldImageSuffix, SIGNAL(toggled(bool)), this, SLOT(usingDyldImageSuffixToggled(bool))); @@ -277,143 +271,142 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run connect(m_useQvfbCheck, SIGNAL(toggled(bool)), this, SLOT(qvfbToggled(bool))); - connect(qt4RunConfiguration, SIGNAL(baseWorkingDirectoryChanged(QString)), + connect(qmakeRunConfiguration, SIGNAL(baseWorkingDirectoryChanged(QString)), this, SLOT(workingDirectoryChanged(QString))); - connect(qt4RunConfiguration, SIGNAL(commandLineArgumentsChanged(QString)), + connect(qmakeRunConfiguration, SIGNAL(commandLineArgumentsChanged(QString)), this, SLOT(commandLineArgumentsChanged(QString))); - connect(qt4RunConfiguration, SIGNAL(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode)), + connect(qmakeRunConfiguration, SIGNAL(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode)), this, SLOT(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode))); - connect(qt4RunConfiguration, SIGNAL(usingDyldImageSuffixChanged(bool)), + connect(qmakeRunConfiguration, SIGNAL(usingDyldImageSuffixChanged(bool)), this, SLOT(usingDyldImageSuffixChanged(bool))); - connect(qt4RunConfiguration, SIGNAL(effectiveTargetInformationChanged()), + connect(qmakeRunConfiguration, SIGNAL(effectiveTargetInformationChanged()), this, SLOT(effectiveTargetInformationChanged()), Qt::QueuedConnection); - connect(qt4RunConfiguration, SIGNAL(enabledChanged()), + connect(qmakeRunConfiguration, SIGNAL(enabledChanged()), this, SLOT(runConfigurationEnabledChange())); } -Qt4RunConfigurationWidget::~Qt4RunConfigurationWidget() +DesktopQmakeRunConfigurationWidget::~DesktopQmakeRunConfigurationWidget() { } -void Qt4RunConfigurationWidget::environmentWasChanged() +void DesktopQmakeRunConfigurationWidget::environmentWasChanged() { - ProjectExplorer::EnvironmentAspect *aspect - = m_qt4RunConfiguration->extraAspect<ProjectExplorer::EnvironmentAspect>(); + EnvironmentAspect *aspect = m_qmakeRunConfiguration->extraAspect<EnvironmentAspect>(); QTC_ASSERT(aspect, return); m_workingDirectoryEdit->setEnvironment(aspect->environment()); } -void Qt4RunConfigurationWidget::runConfigurationEnabledChange() +void DesktopQmakeRunConfigurationWidget::runConfigurationEnabledChange() { - bool enabled = m_qt4RunConfiguration->isEnabled(); + bool enabled = m_qmakeRunConfiguration->isEnabled(); m_disabledIcon->setVisible(!enabled); m_disabledReason->setVisible(!enabled); - m_disabledReason->setText(m_qt4RunConfiguration->disabledReason()); + m_disabledReason->setText(m_qmakeRunConfiguration->disabledReason()); } -void Qt4RunConfigurationWidget::workDirectoryEdited() +void DesktopQmakeRunConfigurationWidget::workDirectoryEdited() { if (m_ignoreChange) return; m_ignoreChange = true; - m_qt4RunConfiguration->setBaseWorkingDirectory(m_workingDirectoryEdit->rawPath()); + m_qmakeRunConfiguration->setBaseWorkingDirectory(m_workingDirectoryEdit->rawPath()); m_ignoreChange = false; } -void Qt4RunConfigurationWidget::workingDirectoryReseted() +void DesktopQmakeRunConfigurationWidget::workingDirectoryReseted() { // This emits a signal connected to workingDirectoryChanged() // that sets the m_workingDirectoryEdit - m_qt4RunConfiguration->setBaseWorkingDirectory(QString()); + m_qmakeRunConfiguration->setBaseWorkingDirectory(QString()); } -void Qt4RunConfigurationWidget::argumentsEdited(const QString &args) +void DesktopQmakeRunConfigurationWidget::argumentsEdited(const QString &args) { m_ignoreChange = true; - m_qt4RunConfiguration->setCommandLineArguments(args); + m_qmakeRunConfiguration->setCommandLineArguments(args); m_ignoreChange = false; } -void Qt4RunConfigurationWidget::termToggled(bool on) +void DesktopQmakeRunConfigurationWidget::termToggled(bool on) { m_ignoreChange = true; - m_qt4RunConfiguration->setRunMode(on ? LocalApplicationRunConfiguration::Console + m_qmakeRunConfiguration->setRunMode(on ? LocalApplicationRunConfiguration::Console : LocalApplicationRunConfiguration::Gui); m_ignoreChange = false; } -void Qt4RunConfigurationWidget::qvfbToggled(bool on) +void DesktopQmakeRunConfigurationWidget::qvfbToggled(bool on) { Q_UNUSED(on); m_ignoreChange = true; m_ignoreChange = false; } -void Qt4RunConfigurationWidget::usingDyldImageSuffixToggled(bool state) +void DesktopQmakeRunConfigurationWidget::usingDyldImageSuffixToggled(bool state) { m_ignoreChange = true; - m_qt4RunConfiguration->setUsingDyldImageSuffix(state); + m_qmakeRunConfiguration->setUsingDyldImageSuffix(state); m_ignoreChange = false; } -void Qt4RunConfigurationWidget::workingDirectoryChanged(const QString &workingDirectory) +void DesktopQmakeRunConfigurationWidget::workingDirectoryChanged(const QString &workingDirectory) { if (!m_ignoreChange) m_workingDirectoryEdit->setPath(workingDirectory); } -void Qt4RunConfigurationWidget::commandLineArgumentsChanged(const QString &args) +void DesktopQmakeRunConfigurationWidget::commandLineArgumentsChanged(const QString &args) { if (m_ignoreChange) return; m_argumentsLineEdit->setText(args); } -void Qt4RunConfigurationWidget::runModeChanged(LocalApplicationRunConfiguration::RunMode runMode) +void DesktopQmakeRunConfigurationWidget::runModeChanged(LocalApplicationRunConfiguration::RunMode runMode) { if (!m_ignoreChange) { - m_useTerminalCheck->setVisible(!m_qt4RunConfiguration->forcedGuiMode()); + m_useTerminalCheck->setVisible(!m_qmakeRunConfiguration->forcedGuiMode()); m_useTerminalCheck->setChecked(runMode == LocalApplicationRunConfiguration::Console); } } -void Qt4RunConfigurationWidget::usingDyldImageSuffixChanged(bool state) +void DesktopQmakeRunConfigurationWidget::usingDyldImageSuffixChanged(bool state) { if (!m_ignoreChange && m_usingDyldImageSuffix) m_usingDyldImageSuffix->setChecked(state); } -void Qt4RunConfigurationWidget::effectiveTargetInformationChanged() +void DesktopQmakeRunConfigurationWidget::effectiveTargetInformationChanged() { if (m_isShown) { - m_executableLineEdit->setText(QDir::toNativeSeparators(m_qt4RunConfiguration->executable())); + m_executableLineEdit->setText(QDir::toNativeSeparators(m_qmakeRunConfiguration->executable())); m_ignoreChange = true; - m_workingDirectoryEdit->setPath(QDir::toNativeSeparators(m_qt4RunConfiguration->baseWorkingDirectory())); + m_workingDirectoryEdit->setPath(QDir::toNativeSeparators(m_qmakeRunConfiguration->baseWorkingDirectory())); m_ignoreChange = false; } } -void Qt4RunConfigurationWidget::showEvent(QShowEvent *event) +void DesktopQmakeRunConfigurationWidget::showEvent(QShowEvent *event) { m_isShown = true; effectiveTargetInformationChanged(); QWidget::showEvent(event); } -void Qt4RunConfigurationWidget::hideEvent(QHideEvent *event) +void DesktopQmakeRunConfigurationWidget::hideEvent(QHideEvent *event) { m_isShown = false; QWidget::hideEvent(event); } -QWidget *Qt4RunConfiguration::createConfigurationWidget() +QWidget *DesktopQmakeRunConfiguration::createConfigurationWidget() { - return new Qt4RunConfigurationWidget(this, 0); + return new DesktopQmakeRunConfigurationWidget(this, 0); } -QVariantMap Qt4RunConfiguration::toMap() const +QVariantMap DesktopQmakeRunConfiguration::toMap() const { const QDir projectDir = QDir(target()->project()->projectDirectory()); QVariantMap map(LocalApplicationRunConfiguration::toMap()); @@ -425,7 +418,7 @@ QVariantMap Qt4RunConfiguration::toMap() const return map; } -bool Qt4RunConfiguration::fromMap(const QVariantMap &map) +bool DesktopQmakeRunConfiguration::fromMap(const QVariantMap &map) { const QDir projectDir = QDir(target()->project()->projectDirectory()); m_commandLineArguments = map.value(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY)).toString(); @@ -435,74 +428,73 @@ bool Qt4RunConfiguration::fromMap(const QVariantMap &map) m_userWorkingDirectory = map.value(QLatin1String(USER_WORKING_DIRECTORY_KEY)).toString(); - m_parseSuccess = static_cast<Qt4Project *>(target()->project())->validParse(m_proFilePath); - m_parseInProgress = static_cast<Qt4Project *>(target()->project())->parseInProgress(m_proFilePath); + m_parseSuccess = static_cast<QmakeProject *>(target()->project())->validParse(m_proFilePath); + m_parseInProgress = static_cast<QmakeProject *>(target()->project())->parseInProgress(m_proFilePath); return LocalApplicationRunConfiguration::fromMap(map); } -QString Qt4RunConfiguration::executable() const +QString DesktopQmakeRunConfiguration::executable() const { - Qt4Project *pro = static_cast<Qt4Project *>(target()->project()); - const Qt4ProFileNode *node = pro->rootQt4ProjectNode()->findProFileFor(m_proFilePath); + QmakeProject *pro = static_cast<QmakeProject *>(target()->project()); + const QmakeProFileNode *node = pro->rootQmakeProjectNode()->findProFileFor(m_proFilePath); return extractWorkingDirAndExecutable(node).second; } -LocalApplicationRunConfiguration::RunMode Qt4RunConfiguration::runMode() const +LocalApplicationRunConfiguration::RunMode DesktopQmakeRunConfiguration::runMode() const { if (m_forcedGuiMode) return LocalApplicationRunConfiguration::Gui; return m_runMode; } -bool Qt4RunConfiguration::forcedGuiMode() const +bool DesktopQmakeRunConfiguration::forcedGuiMode() const { return m_forcedGuiMode; } -bool Qt4RunConfiguration::isUsingDyldImageSuffix() const +bool DesktopQmakeRunConfiguration::isUsingDyldImageSuffix() const { return m_isUsingDyldImageSuffix; } -void Qt4RunConfiguration::setUsingDyldImageSuffix(bool state) +void DesktopQmakeRunConfiguration::setUsingDyldImageSuffix(bool state) { m_isUsingDyldImageSuffix = state; emit usingDyldImageSuffixChanged(state); } -QString Qt4RunConfiguration::workingDirectory() const +QString DesktopQmakeRunConfiguration::workingDirectory() const { - ProjectExplorer::EnvironmentAspect *aspect - = extraAspect<ProjectExplorer::EnvironmentAspect>(); + EnvironmentAspect *aspect = extraAspect<EnvironmentAspect>(); QTC_ASSERT(aspect, baseWorkingDirectory()); return QDir::cleanPath(aspect->environment().expandVariables( Utils::expandMacros(baseWorkingDirectory(), macroExpander()))); } -QString Qt4RunConfiguration::baseWorkingDirectory() const +QString DesktopQmakeRunConfiguration::baseWorkingDirectory() const { // if the user overrode us, then return his working directory if (!m_userWorkingDirectory.isEmpty()) return m_userWorkingDirectory; // else what the pro file reader tells us - Qt4Project *pro = static_cast<Qt4Project *>(target()->project()); - const Qt4ProFileNode *node = pro->rootQt4ProjectNode()->findProFileFor(m_proFilePath); + QmakeProject *pro = static_cast<QmakeProject *>(target()->project()); + const QmakeProFileNode *node = pro->rootQmakeProjectNode()->findProFileFor(m_proFilePath); return extractWorkingDirAndExecutable(node).first; } -QString Qt4RunConfiguration::commandLineArguments() const +QString DesktopQmakeRunConfiguration::commandLineArguments() const { - return Utils::QtcProcess::expandMacros(m_commandLineArguments, macroExpander()); + return QtcProcess::expandMacros(m_commandLineArguments, macroExpander()); } -QString Qt4RunConfiguration::rawCommandLineArguments() const +QString DesktopQmakeRunConfiguration::rawCommandLineArguments() const { return m_commandLineArguments; } -void Qt4RunConfiguration::setBaseWorkingDirectory(const QString &wd) +void DesktopQmakeRunConfiguration::setBaseWorkingDirectory(const QString &wd) { const QString &oldWorkingDirectory = workingDirectory(); @@ -513,19 +505,19 @@ void Qt4RunConfiguration::setBaseWorkingDirectory(const QString &wd) emit baseWorkingDirectoryChanged(newWorkingDirectory); } -void Qt4RunConfiguration::setCommandLineArguments(const QString &argumentsString) +void DesktopQmakeRunConfiguration::setCommandLineArguments(const QString &argumentsString) { m_commandLineArguments = argumentsString; emit commandLineArgumentsChanged(argumentsString); } -void Qt4RunConfiguration::setRunMode(RunMode runMode) +void DesktopQmakeRunConfiguration::setRunMode(RunMode runMode) { m_runMode = runMode; emit runModeChanged(runMode); } -void Qt4RunConfiguration::addToBaseEnvironment(Utils::Environment &env) const +void DesktopQmakeRunConfiguration::addToBaseEnvironment(Environment &env) const { if (m_isUsingDyldImageSuffix) env.set(QLatin1String("DYLD_IMAGE_SUFFIX"), QLatin1String("_debug")); @@ -533,7 +525,7 @@ void Qt4RunConfiguration::addToBaseEnvironment(Utils::Environment &env) const // The user could be linking to a library found via a -L/some/dir switch // to find those libraries while actually running we explicitly prepend those // dirs to the library search path - const Qt4ProFileNode *node = static_cast<Qt4Project *>(target()->project())->rootQt4ProjectNode()->findProFileFor(m_proFilePath); + const QmakeProFileNode *node = static_cast<QmakeProject *>(target()->project())->rootQmakeProjectNode()->findProFileFor(m_proFilePath); if (node) { const QStringList libDirectories = node->variableValue(LibDirectoriesVar); if (!libDirectories.isEmpty()) { @@ -553,22 +545,22 @@ void Qt4RunConfiguration::addToBaseEnvironment(Utils::Environment &env) const env.prependOrSetLibrarySearchPath(qtVersion->qmakeProperty("QT_INSTALL_LIBS")); } -QString Qt4RunConfiguration::proFilePath() const +QString DesktopQmakeRunConfiguration::proFilePath() const { return m_proFilePath; } -QString Qt4RunConfiguration::dumperLibrary() const +QString DesktopQmakeRunConfiguration::dumperLibrary() const { return QtSupport::QtKitInformation::dumperLibrary(target()->kit()); } -QStringList Qt4RunConfiguration::dumperLibraryLocations() const +QStringList DesktopQmakeRunConfiguration::dumperLibraryLocations() const { return QtSupport::QtKitInformation::dumperLibraryLocations(target()->kit()); } -QString Qt4RunConfiguration::defaultDisplayName() +QString DesktopQmakeRunConfiguration::defaultDisplayName() { QString defaultName; if (!m_proFilePath.isEmpty()) @@ -578,12 +570,12 @@ QString Qt4RunConfiguration::defaultDisplayName() return defaultName; } -Utils::OutputFormatter *Qt4RunConfiguration::createOutputFormatter() const +OutputFormatter *DesktopQmakeRunConfiguration::createOutputFormatter() const { return new QtSupport::QtOutputFormatter(target()->project()); } -QPair<QString, QString> Qt4RunConfiguration::extractWorkingDirAndExecutable(const Qt4ProFileNode *node) const +QPair<QString, QString> DesktopQmakeRunConfiguration::extractWorkingDirAndExecutable(const QmakeProFileNode *node) const { if (!node) return qMakePair(QString(), QString()); @@ -612,8 +604,7 @@ QPair<QString, QString> Qt4RunConfiguration::extractWorkingDirAndExecutable(cons workingDir = ti.buildDir; } - if (Utils::HostOsInfo::isMacHost() - && config.contains(QLatin1String("app_bundle"))) { + if (HostOsInfo::isMacHost() && config.contains(QLatin1String("app_bundle"))) { const QString infix = QLatin1Char('/') + ti.target + QLatin1String(".app/Contents/MacOS"); workingDir += infix; @@ -621,104 +612,105 @@ QPair<QString, QString> Qt4RunConfiguration::extractWorkingDirAndExecutable(cons } QString executable = QDir::cleanPath(destDir + QLatin1Char('/') + ti.target); - executable = Utils::HostOsInfo::withExecutableSuffix(executable); - //qDebug() << "##### Qt4RunConfiguration::extractWorkingDirAndExecutable:" workingDir << executable; + executable = HostOsInfo::withExecutableSuffix(executable); + //qDebug() << "##### QmakeRunConfiguration::extractWorkingDirAndExecutable:" workingDir << executable; return qMakePair(workingDir, executable); } /// -/// Qt4RunConfigurationFactory +/// DesktopQmakeRunConfigurationFactory /// This class is used to restore run settings (saved in .user files) /// -Qt4RunConfigurationFactory::Qt4RunConfigurationFactory(QObject *parent) : +DesktopQmakeRunConfigurationFactory::DesktopQmakeRunConfigurationFactory(QObject *parent) : QmakeRunConfigurationFactory(parent) -{ setObjectName(QLatin1String("Qt4RunConfigurationFactory")); } +{ setObjectName(QLatin1String("DesktopQmakeRunConfigurationFactory")); } -Qt4RunConfigurationFactory::~Qt4RunConfigurationFactory() +DesktopQmakeRunConfigurationFactory::~DesktopQmakeRunConfigurationFactory() { } -bool Qt4RunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const +bool DesktopQmakeRunConfigurationFactory::canCreate(Target *parent, const Core::Id id) const { if (!canHandle(parent)) return false; - Qt4Project *project = static_cast<Qt4Project *>(parent->project()); + QmakeProject *project = static_cast<QmakeProject *>(parent->project()); return project->hasApplicationProFile(pathFromId(id)); } -ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::doCreate(ProjectExplorer::Target *parent, const Core::Id id) +RunConfiguration *DesktopQmakeRunConfigurationFactory::doCreate(Target *parent, const Core::Id id) { - Qt4RunConfiguration *rc = new Qt4RunConfiguration(parent, id); - const Qt4ProFileNode *node = static_cast<Qt4Project *>(parent->project())->rootQt4ProjectNode()->findProFileFor(rc->proFilePath()); + DesktopQmakeRunConfiguration *rc = new DesktopQmakeRunConfiguration(parent, id); + const QmakeProFileNode *node = static_cast<QmakeProject *>(parent->project())->rootQmakeProjectNode()->findProFileFor(rc->proFilePath()); if (node) // should always be found rc->setRunMode(node->variableValue(ConfigVar).contains(QLatin1String("console")) && !node->variableValue(QtVar).contains(QLatin1String("testlib")) - ? ProjectExplorer::LocalApplicationRunConfiguration::Console - : ProjectExplorer::LocalApplicationRunConfiguration::Gui); + ? LocalApplicationRunConfiguration::Console + : LocalApplicationRunConfiguration::Gui); return rc; } -bool Qt4RunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const +bool DesktopQmakeRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const { if (!canHandle(parent)) return false; - return ProjectExplorer::idFromMap(map).toString().startsWith(QLatin1String(QT4_RC_PREFIX)); + return idFromMap(map).toString().startsWith(QLatin1String(QMAKE_RC_PREFIX)); } -ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::doRestore(ProjectExplorer::Target *parent, - const QVariantMap &map) +RunConfiguration *DesktopQmakeRunConfigurationFactory::doRestore(Target *parent, const QVariantMap &map) { - return new Qt4RunConfiguration(parent, ProjectExplorer::idFromMap(map)); + return new DesktopQmakeRunConfiguration(parent, idFromMap(map)); } -bool Qt4RunConfigurationFactory::canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const +bool DesktopQmakeRunConfigurationFactory::canClone(Target *parent, RunConfiguration *source) const { return canCreate(parent, source->id()); } -ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) +RunConfiguration *DesktopQmakeRunConfigurationFactory::clone(Target *parent, RunConfiguration *source) { if (!canClone(parent, source)) return 0; - Qt4RunConfiguration *old = static_cast<Qt4RunConfiguration *>(source); - return new Qt4RunConfiguration(parent, old); + DesktopQmakeRunConfiguration *old = static_cast<DesktopQmakeRunConfiguration *>(source); + return new DesktopQmakeRunConfiguration(parent, old); } -QList<Core::Id> Qt4RunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const +QList<Core::Id> DesktopQmakeRunConfigurationFactory::availableCreationIds(Target *parent) const { QList<Core::Id> result; if (!canHandle(parent)) return result; - Qt4Project *project = static_cast<Qt4Project *>(parent->project()); - QStringList proFiles = project->applicationProFilePathes(QLatin1String(QT4_RC_PREFIX)); + QmakeProject *project = static_cast<QmakeProject *>(parent->project()); + QStringList proFiles = project->applicationProFilePathes(QLatin1String(QMAKE_RC_PREFIX)); foreach (const QString &pf, proFiles) result << Core::Id::fromString(pf); return result; } -QString Qt4RunConfigurationFactory::displayNameForId(const Core::Id id) const +QString DesktopQmakeRunConfigurationFactory::displayNameForId(const Core::Id id) const { return QFileInfo(pathFromId(id)).completeBaseName(); } -bool Qt4RunConfigurationFactory::canHandle(ProjectExplorer::Target *t) const +bool DesktopQmakeRunConfigurationFactory::canHandle(Target *t) const { if (!t->project()->supportsKit(t->kit())) return false; - if (!qobject_cast<Qt4Project *>(t->project())) + if (!qobject_cast<QmakeProject *>(t->project())) return false; - Core::Id devType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit()); - return devType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; + Core::Id devType = DeviceTypeKitInformation::deviceTypeId(t->kit()); + return devType == Constants::DESKTOP_DEVICE_TYPE; } -QList<ProjectExplorer::RunConfiguration *> Qt4RunConfigurationFactory::runConfigurationsForNode(ProjectExplorer::Target *t, ProjectExplorer::Node *n) +QList<RunConfiguration *> DesktopQmakeRunConfigurationFactory::runConfigurationsForNode(Target *t, ProjectExplorer::Node *n) { - QList<ProjectExplorer::RunConfiguration *> result; - foreach (ProjectExplorer::RunConfiguration *rc, t->runConfigurations()) - if (Qt4RunConfiguration *qt4c = qobject_cast<Qt4RunConfiguration *>(rc)) + QList<RunConfiguration *> result; + foreach (RunConfiguration *rc, t->runConfigurations()) + if (DesktopQmakeRunConfiguration *qt4c = qobject_cast<DesktopQmakeRunConfiguration *>(rc)) if (qt4c->proFilePath() == n->path()) result << rc; return result; - } + +} // namespace Internal +} // namespace QmakeProjectManager diff --git a/src/plugins/qt4projectmanager/qmakerunconfiguration.h b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h index 6208cfc704..3b17953aac 100644 --- a/src/plugins/qt4projectmanager/qmakerunconfiguration.h +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h @@ -27,10 +27,10 @@ ** ****************************************************************************/ -#ifndef QT4RUNCONFIGURATION_H -#define QT4RUNCONFIGURATION_H +#ifndef DESKTOPQMAKERUNCONFIGURATION_H +#define DESKTOPQMAKERUNCONFIGURATION_H -#include <qt4projectmanager/qmakerunconfigurationfactory.h> +#include <qmakeprojectmanager/qmakerunconfigurationfactory.h> #include <projectexplorer/localapplicationrunconfiguration.h> @@ -53,24 +53,24 @@ class DetailsWidget; namespace QmakeProjectManager { -class Qt4Project; -class Qt4ProFileNode; -class Qt4PriFileNode; +class QmakeProject; +class QmakeProFileNode; +class QmakePriFileNode; class TargetInformation; namespace Internal { -class Qt4RunConfigurationFactory; +class DesktopQmakeRunConfigurationFactory; -class Qt4RunConfiguration : public ProjectExplorer::LocalApplicationRunConfiguration +class DesktopQmakeRunConfiguration : public ProjectExplorer::LocalApplicationRunConfiguration { Q_OBJECT // to change the display name and arguments and set the userenvironmentchanges - friend class Qt4RunConfigurationWidget; - friend class Qt4RunConfigurationFactory; + friend class DesktopQmakeRunConfigurationWidget; + friend class DesktopQmakeRunConfigurationFactory; public: - Qt4RunConfiguration(ProjectExplorer::Target *parent, Core::Id id); - virtual ~Qt4RunConfiguration(); + DesktopQmakeRunConfiguration(ProjectExplorer::Target *parent, Core::Id id); + virtual ~DesktopQmakeRunConfiguration(); virtual bool isEnabled() const; virtual QString disabledReason() const; @@ -108,14 +108,14 @@ signals: private slots: void kitChanged(); - void proFileUpdated(QmakeProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress); + void proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success, bool parseInProgress); protected: - Qt4RunConfiguration(ProjectExplorer::Target *parent, Qt4RunConfiguration *source); + DesktopQmakeRunConfiguration(ProjectExplorer::Target *parent, DesktopQmakeRunConfiguration *source); virtual bool fromMap(const QVariantMap &map); private: - QPair<QString, QString> extractWorkingDirAndExecutable(const Qt4ProFileNode *node) const; + QPair<QString, QString> extractWorkingDirAndExecutable(const QmakeProFileNode *node) const; void setBaseWorkingDirectory(const QString &workingDirectory); QString baseWorkingDirectory() const; void setCommandLineArguments(const QString &argumentsString); @@ -138,13 +138,13 @@ private: bool m_parseInProgress; }; -class Qt4RunConfigurationWidget : public QWidget +class DesktopQmakeRunConfigurationWidget : public QWidget { Q_OBJECT public: - Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4runconfigration, QWidget *parent); - ~Qt4RunConfigurationWidget(); + DesktopQmakeRunConfigurationWidget(DesktopQmakeRunConfiguration *qmakeRunConfiguration, QWidget *parent); + ~DesktopQmakeRunConfigurationWidget(); protected: void showEvent(QShowEvent *event); @@ -168,7 +168,7 @@ private slots: void usingDyldImageSuffixChanged(bool); private: - Qt4RunConfiguration *m_qt4RunConfiguration; + DesktopQmakeRunConfiguration *m_qmakeRunConfiguration; bool m_ignoreChange; QLabel *m_disabledIcon; QLabel *m_disabledReason; @@ -183,13 +183,13 @@ private: bool m_isShown; }; -class Qt4RunConfigurationFactory : public QmakeRunConfigurationFactory +class DesktopQmakeRunConfigurationFactory : public QmakeRunConfigurationFactory { Q_OBJECT public: - explicit Qt4RunConfigurationFactory(QObject *parent = 0); - ~Qt4RunConfigurationFactory(); + explicit DesktopQmakeRunConfigurationFactory(QObject *parent = 0); + ~DesktopQmakeRunConfigurationFactory(); bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const; bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const; @@ -213,4 +213,4 @@ private: } // namespace Internal } // namespace QmakeProjectManager -#endif // QT4RUNCONFIGURATION_H +#endif // DESKTOPQMAKERUNCONFIGURATION_H diff --git a/src/plugins/qt4projectmanager/externaleditors.cpp b/src/plugins/qmakeprojectmanager/externaleditors.cpp index 0915056bd6..2db1e4ad7c 100644 --- a/src/plugins/qt4projectmanager/externaleditors.cpp +++ b/src/plugins/qmakeprojectmanager/externaleditors.cpp @@ -51,11 +51,11 @@ enum { debug = 0 }; namespace QmakeProjectManager { namespace Internal { -// Figure out the Qt4 project used by the file if any -static Qt4Project *qt4ProjectFor(const QString &fileName) +// Figure out the qmake project used by the file if any +static QmakeProject *qmakeProjectFor(const QString &fileName) { if (ProjectExplorer::Project *baseProject = ProjectExplorer::SessionManager::projectForFile(fileName)) - if (Qt4Project *project = qobject_cast<Qt4Project*>(baseProject)) + if (QmakeProject *project = qobject_cast<QmakeProject*>(baseProject)) return project; return 0; } @@ -138,7 +138,7 @@ bool ExternalQtEditor::getEditorLaunchData(const QString &fileName, QString *errorMessage) const { // Get the binary either from the current Qt version of the project or Path - if (const Qt4Project *project = qt4ProjectFor(fileName)) { + if (const QmakeProject *project = qmakeProjectFor(fileName)) { if (const ProjectExplorer::Target *target = project->activeTarget()) { if (const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target->kit())) { data->binary = (qtVersion->*commandAccessor)(); diff --git a/src/plugins/qt4projectmanager/externaleditors.h b/src/plugins/qmakeprojectmanager/externaleditors.h index fc642a181e..fc642a181e 100644 --- a/src/plugins/qt4projectmanager/externaleditors.h +++ b/src/plugins/qmakeprojectmanager/externaleditors.h diff --git a/src/plugins/qt4projectmanager/findqmakeprofiles.cpp b/src/plugins/qmakeprojectmanager/findqmakeprofiles.cpp index 286c1030b1..2dfc208d3b 100644 --- a/src/plugins/qt4projectmanager/findqmakeprofiles.cpp +++ b/src/plugins/qmakeprojectmanager/findqmakeprofiles.cpp @@ -33,15 +33,15 @@ using namespace QmakeProjectManager; using namespace QmakeProjectManager::Internal; -QList<Qt4ProFileNode *> FindQt4ProFiles::operator()(ProjectExplorer::ProjectNode *root) +QList<QmakeProFileNode *> FindQmakeProFiles::operator()(ProjectExplorer::ProjectNode *root) { m_proFiles.clear(); root->accept(this); return m_proFiles; } -void FindQt4ProFiles::visitProjectNode(ProjectExplorer::ProjectNode *projectNode) +void FindQmakeProFiles::visitProjectNode(ProjectExplorer::ProjectNode *projectNode) { - if (Qt4ProFileNode *pro = qobject_cast<Qt4ProFileNode *>(projectNode)) + if (QmakeProFileNode *pro = qobject_cast<QmakeProFileNode *>(projectNode)) m_proFiles.append(pro); } diff --git a/src/plugins/qt4projectmanager/findqmakeprofiles.h b/src/plugins/qmakeprojectmanager/findqmakeprofiles.h index a9defa62f1..ed4e908296 100644 --- a/src/plugins/qt4projectmanager/findqmakeprofiles.h +++ b/src/plugins/qmakeprojectmanager/findqmakeprofiles.h @@ -27,27 +27,27 @@ ** ****************************************************************************/ -#ifndef FINDQT4PROFILES_H -#define FINDQT4PROFILES_H +#ifndef FINDQMAKEPROFILES_H +#define FINDQMAKEPROFILES_H #include <projectexplorer/nodesvisitor.h> namespace QmakeProjectManager { -class Qt4ProFileNode; +class QmakeProFileNode; namespace Internal { -class FindQt4ProFiles: protected ProjectExplorer::NodesVisitor { - +class FindQmakeProFiles: protected ProjectExplorer::NodesVisitor +{ public: - QList<Qt4ProFileNode *> operator()(ProjectExplorer::ProjectNode *root); + QList<QmakeProFileNode *> operator()(ProjectExplorer::ProjectNode *root); protected: virtual void visitProjectNode(ProjectExplorer::ProjectNode *projectNode); private: - QList<Qt4ProFileNode *> m_proFiles; + QList<QmakeProFileNode *> m_proFiles; }; } // namespace Internal } // namespace QmakeProjectManager -#endif // FINDQT4PROFILES_H +#endif // FINDQMAKEPROFILES_H diff --git a/src/plugins/qt4projectmanager/images/headers.png b/src/plugins/qmakeprojectmanager/images/headers.png Binary files differindex c26269004f..c26269004f 100644 --- a/src/plugins/qt4projectmanager/images/headers.png +++ b/src/plugins/qmakeprojectmanager/images/headers.png diff --git a/src/plugins/qt4projectmanager/images/run_qmake.png b/src/plugins/qmakeprojectmanager/images/run_qmake.png Binary files differindex b5aa4345c3..b5aa4345c3 100644 --- a/src/plugins/qt4projectmanager/images/run_qmake.png +++ b/src/plugins/qmakeprojectmanager/images/run_qmake.png diff --git a/src/plugins/qt4projectmanager/images/run_qmake_small.png b/src/plugins/qmakeprojectmanager/images/run_qmake_small.png Binary files differindex 3d732520b1..3d732520b1 100644 --- a/src/plugins/qt4projectmanager/images/run_qmake_small.png +++ b/src/plugins/qmakeprojectmanager/images/run_qmake_small.png diff --git a/src/plugins/qt4projectmanager/images/sources.png b/src/plugins/qmakeprojectmanager/images/sources.png Binary files differindex c03a8c45f4..c03a8c45f4 100644 --- a/src/plugins/qt4projectmanager/images/sources.png +++ b/src/plugins/qmakeprojectmanager/images/sources.png diff --git a/src/plugins/qt4projectmanager/images/unknown.png b/src/plugins/qmakeprojectmanager/images/unknown.png Binary files differindex 37ebc59f8c..37ebc59f8c 100644 --- a/src/plugins/qt4projectmanager/images/unknown.png +++ b/src/plugins/qmakeprojectmanager/images/unknown.png diff --git a/src/plugins/qt4projectmanager/librarydetailscontroller.cpp b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp index 3f79461f3c..8a144ef622 100644 --- a/src/plugins/qt4projectmanager/librarydetailscontroller.cpp +++ b/src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp @@ -884,11 +884,11 @@ bool PackageLibraryDetailsController::isLinkPackageGenerated() const if (!project) return false; - const Qt4ProFileNode *rootProject = qobject_cast<const Qt4ProFileNode *>(project->rootProjectNode()); + const QmakeProFileNode *rootProject = qobject_cast<const QmakeProFileNode *>(project->rootProjectNode()); if (!rootProject) return false; - const Qt4ProFileNode *currentProject = rootProject->findProFileFor(proFile()); + const QmakeProFileNode *currentProject = rootProject->findProFileFor(proFile()); if (!currentProject) return false; @@ -980,7 +980,7 @@ AddLibraryWizard::LinkageType InternalLibraryDetailsController::suggestedLinkage const int currentIndex = libraryDetailsWidget()->libraryComboBox->currentIndex(); AddLibraryWizard::LinkageType type = AddLibraryWizard::NoLinkage; if (currentIndex >= 0) { - Qt4ProFileNode *proFileNode = m_proFileNodes.at(currentIndex); + QmakeProFileNode *proFileNode = m_proFileNodes.at(currentIndex); const QStringList configVar = proFileNode->variableValue(ConfigVar); if (configVar.contains(QLatin1String("staticlib")) || configVar.contains(QLatin1String("static"))) @@ -996,7 +996,7 @@ AddLibraryWizard::MacLibraryType InternalLibraryDetailsController::suggestedMacL const int currentIndex = libraryDetailsWidget()->libraryComboBox->currentIndex(); AddLibraryWizard::MacLibraryType type = AddLibraryWizard::NoLibraryType; if (currentIndex >= 0) { - Qt4ProFileNode *proFileNode = m_proFileNodes.at(currentIndex); + QmakeProFileNode *proFileNode = m_proFileNodes.at(currentIndex); const QStringList configVar = proFileNode->variableValue(ConfigVar); if (configVar.contains(QLatin1String("lib_bundle"))) type = AddLibraryWizard::FrameworkType; @@ -1011,7 +1011,7 @@ QString InternalLibraryDetailsController::suggestedIncludePath() const const int currentIndex = libraryDetailsWidget()->libraryComboBox->currentIndex(); QString includePath; if (currentIndex >= 0) { - Qt4ProFileNode *proFileNode = m_proFileNodes.at(currentIndex); + QmakeProFileNode *proFileNode = m_proFileNodes.at(currentIndex); QFileInfo fi(proFileNode->path()); includePath = fi.absolutePath(); } @@ -1042,9 +1042,9 @@ void InternalLibraryDetailsController::updateProFile() QFileInfo fi(rootProject->path()); m_rootProjectPath = fi.absolutePath(); QDir rootDir(m_rootProjectPath); - FindQt4ProFiles findQt4ProFiles; - QList<Qt4ProFileNode *> proFiles = findQt4ProFiles(rootProject); - foreach (Qt4ProFileNode *proFileNode, proFiles) { + FindQmakeProFiles findQt4ProFiles; + QList<QmakeProFileNode *> proFiles = findQt4ProFiles(rootProject); + foreach (QmakeProFileNode *proFileNode, proFiles) { const QString proFilePath = proFileNode->path(); if (proFileNode->projectType() == LibraryTemplate) { const QStringList configVar = proFileNode->variableValue(ConfigVar); @@ -1071,7 +1071,7 @@ void InternalLibraryDetailsController::slotCurrentLibraryChanged() libraryDetailsWidget()->libraryComboBox->setToolTip( libraryDetailsWidget()->libraryComboBox->itemData( currentIndex, Qt::ToolTipRole).toString()); - Qt4ProFileNode *proFileNode = m_proFileNodes.at(currentIndex); + QmakeProFileNode *proFileNode = m_proFileNodes.at(currentIndex); const QStringList configVar = proFileNode->variableValue(ConfigVar); if (creatorPlatform() == CreatorWindows) { bool useSubfolders = false; @@ -1133,7 +1133,7 @@ QString InternalLibraryDetailsController::snippet() const QDir projectSrcDir(fi.absolutePath()); // project node which we want to link against - Qt4ProFileNode *proFileNode = m_proFileNodes.at(currentIndex); + QmakeProFileNode *proFileNode = m_proFileNodes.at(currentIndex); TargetInformation targetInfo = proFileNode->targetInformation(); const QString targetRelativePath = appendSeparator(projectBuildDir.relativeFilePath(targetInfo.buildDir)); diff --git a/src/plugins/qt4projectmanager/librarydetailscontroller.h b/src/plugins/qmakeprojectmanager/librarydetailscontroller.h index b23bf4acb2..504e51c7ca 100644 --- a/src/plugins/qt4projectmanager/librarydetailscontroller.h +++ b/src/plugins/qmakeprojectmanager/librarydetailscontroller.h @@ -33,7 +33,7 @@ #include "addlibrarywizard.h" namespace QmakeProjectManager { -class Qt4ProFileNode; +class QmakeProFileNode; namespace Internal { namespace Ui { @@ -196,7 +196,7 @@ private slots: void updateProFile(); private: QString m_rootProjectPath; - QVector<Qt4ProFileNode *> m_proFileNodes; + QVector<QmakeProFileNode *> m_proFileNodes; }; } // namespace Internal diff --git a/src/plugins/qt4projectmanager/librarydetailswidget.ui b/src/plugins/qmakeprojectmanager/librarydetailswidget.ui index 6f984a2506..ebcb80396b 100644 --- a/src/plugins/qt4projectmanager/librarydetailswidget.ui +++ b/src/plugins/qmakeprojectmanager/librarydetailswidget.ui @@ -244,7 +244,7 @@ <customwidget> <class>QmakeProjectManager::Internal::LibraryPathChooser</class> <extends>QWidget</extends> - <header location="global">qt4projectmanager/addlibrarywizard.h</header> + <header location="global">qmakeprojectmanager/addlibrarywizard.h</header> <container>1</container> </customwidget> </customwidgets> diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qmakeprojectmanager/makestep.cpp index edc86073f5..73d9e3a739 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qmakeprojectmanager/makestep.cpp @@ -97,9 +97,9 @@ MakeStep::~MakeStep() { } -Qt4BuildConfiguration *MakeStep::qt4BuildConfiguration() const +QmakeBuildConfiguration *MakeStep::qmakeBuildConfiguration() const { - return static_cast<Qt4BuildConfiguration *>(buildConfiguration()); + return static_cast<QmakeBuildConfiguration *>(buildConfiguration()); } void MakeStep::setClean(bool clean) @@ -153,9 +153,9 @@ bool MakeStep::fromMap(const QVariantMap &map) bool MakeStep::init() { - Qt4BuildConfiguration *bc = qt4BuildConfiguration(); + QmakeBuildConfiguration *bc = qmakeBuildConfiguration(); if (!bc) - bc = qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration()); + bc = qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration()); m_tasks.clear(); ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit()); @@ -188,7 +188,7 @@ bool MakeStep::init() QString args; - QmakeProjectManager::Qt4ProFileNode *subNode = bc->subNodeBuild(); + QmakeProjectManager::QmakeProFileNode *subNode = bc->subNodeBuild(); if (subNode) { QString makefile = subNode->makefile(); if (makefile.isEmpty()) @@ -197,7 +197,7 @@ bool MakeStep::init() // for file builds, since the rules for that are // only in those files. if (subNode->isDebugAndRelease() && bc->fileNodeBuild()) { - if (bc->buildType() == Qt4BuildConfiguration::Debug) + if (bc->buildType() == QmakeBuildConfiguration::Debug) makefile += QLatin1String(".Debug"); else makefile += QLatin1String(".Release"); @@ -223,7 +223,7 @@ bool MakeStep::init() if (objectsDir.isEmpty()) { objectsDir = subNode->buildDir(bc); if (subNode->isDebugAndRelease()) { - if (bc->buildType() == Qt4BuildConfiguration::Debug) + if (bc->buildType() == QmakeBuildConfiguration::Debug) objectsDir += QLatin1String("/debug"); else objectsDir += QLatin1String("/release"); @@ -262,7 +262,7 @@ bool MakeStep::init() appendOutputParser(new QMakeParser); // make may cause qmake to be run, add last to make sure // it has a low priority. - m_scriptTarget = (static_cast<Qt4Project *>(bc->target()->project())->rootQt4ProjectNode()->projectType() == ScriptTemplate); + m_scriptTarget = (static_cast<QmakeProject *>(bc->target()->project())->rootQmakeProjectNode()->projectType() == ScriptTemplate); return AbstractProcessStep::init(); } @@ -395,9 +395,9 @@ void MakeStepConfigWidget::updateDetails() { ToolChain *tc = ToolChainKitInformation::toolChain(m_makeStep->target()->kit()); - Qt4BuildConfiguration *bc = m_makeStep->qt4BuildConfiguration(); + QmakeBuildConfiguration *bc = m_makeStep->qmakeBuildConfiguration(); if (!bc) - bc = qobject_cast<Qt4BuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration()); + bc = qobject_cast<QmakeBuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration()); if (tc && bc) m_ui->makeLabel->setText(tr("Override %1:").arg(QDir::toNativeSeparators(tc->makeCommand(bc->environment())))); @@ -492,7 +492,7 @@ MakeStepFactory::~MakeStepFactory() bool MakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const { - if (parent->target()->project()->id() == Constants::QT4PROJECT_ID) + if (parent->target()->project()->id() == Constants::QMAKEPROJECT_ID) return id == MAKESTEP_BS_ID; return false; } @@ -539,7 +539,7 @@ BuildStep *MakeStepFactory::restore(BuildStepList *parent, const QVariantMap &ma QList<Core::Id> MakeStepFactory::availableCreationIds(BuildStepList *parent) const { - if (parent->target()->project()->id() == Constants::QT4PROJECT_ID) + if (parent->target()->project()->id() == Constants::QMAKEPROJECT_ID) return QList<Core::Id>() << Core::Id(MAKESTEP_BS_ID); return QList<Core::Id>(); } diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qmakeprojectmanager/makestep.h index e0b5e657b3..0a54088809 100644 --- a/src/plugins/qt4projectmanager/makestep.h +++ b/src/plugins/qmakeprojectmanager/makestep.h @@ -42,7 +42,7 @@ class Task; namespace QmakeProjectManager { -class Qt4BuildConfiguration; +class QmakeBuildConfiguration; class MakeStepConfigWidget; namespace Internal { @@ -69,9 +69,9 @@ public: }; } //namespace Internal -class Qt4Project; +class QmakeProject; -class QT4PROJECTMANAGER_EXPORT MakeStep : public ProjectExplorer::AbstractProcessStep +class QMAKEPROJECTMANAGER_EXPORT MakeStep : public ProjectExplorer::AbstractProcessStep { Q_OBJECT friend class Internal::MakeStepFactory; @@ -81,7 +81,7 @@ public: explicit MakeStep(ProjectExplorer::BuildStepList *bsl); virtual ~MakeStep(); - Qt4BuildConfiguration *qt4BuildConfiguration() const; + QmakeBuildConfiguration *qmakeBuildConfiguration() const; virtual bool init(); virtual void run(QFutureInterface<bool> &); @@ -143,6 +143,6 @@ private: bool m_ignoreChange; }; -} // Qt4ProjectManager +} // QmakeProjectManager #endif // MAKESTEP_H diff --git a/src/plugins/qt4projectmanager/makestep.ui b/src/plugins/qmakeprojectmanager/makestep.ui index 9856fd7d2c..9856fd7d2c 100644 --- a/src/plugins/qt4projectmanager/makestep.ui +++ b/src/plugins/qmakeprojectmanager/makestep.ui diff --git a/src/plugins/qt4projectmanager/profilecompletionassist.cpp b/src/plugins/qmakeprojectmanager/profilecompletionassist.cpp index 1c822c239e..1c822c239e 100644 --- a/src/plugins/qt4projectmanager/profilecompletionassist.cpp +++ b/src/plugins/qmakeprojectmanager/profilecompletionassist.cpp diff --git a/src/plugins/qt4projectmanager/profilecompletionassist.h b/src/plugins/qmakeprojectmanager/profilecompletionassist.h index dad0f76176..dad0f76176 100644 --- a/src/plugins/qt4projectmanager/profilecompletionassist.h +++ b/src/plugins/qmakeprojectmanager/profilecompletionassist.h diff --git a/src/plugins/qt4projectmanager/profileeditor.cpp b/src/plugins/qmakeprojectmanager/profileeditor.cpp index 230cff4440..230cff4440 100644 --- a/src/plugins/qt4projectmanager/profileeditor.cpp +++ b/src/plugins/qmakeprojectmanager/profileeditor.cpp diff --git a/src/plugins/qt4projectmanager/profileeditor.h b/src/plugins/qmakeprojectmanager/profileeditor.h index 4976ebd081..4976ebd081 100644 --- a/src/plugins/qt4projectmanager/profileeditor.h +++ b/src/plugins/qmakeprojectmanager/profileeditor.h diff --git a/src/plugins/qt4projectmanager/profileeditorfactory.cpp b/src/plugins/qmakeprojectmanager/profileeditorfactory.cpp index fa6d37c264..3f75d5809d 100644 --- a/src/plugins/qt4projectmanager/profileeditorfactory.cpp +++ b/src/plugins/qmakeprojectmanager/profileeditorfactory.cpp @@ -42,7 +42,7 @@ using namespace QmakeProjectManager; using namespace QmakeProjectManager::Internal; -ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::TextEditorActionHandler *handler) : +ProFileEditorFactory::ProFileEditorFactory(QmakeManager *manager, TextEditor::TextEditorActionHandler *handler) : m_manager(manager), m_actionHandler(handler) { diff --git a/src/plugins/qt4projectmanager/profileeditorfactory.h b/src/plugins/qmakeprojectmanager/profileeditorfactory.h index 1d50c8193a..07a2e5e21c 100644 --- a/src/plugins/qt4projectmanager/profileeditorfactory.h +++ b/src/plugins/qmakeprojectmanager/profileeditorfactory.h @@ -36,7 +36,7 @@ namespace TextEditor { class TextEditorActionHandler; } namespace QmakeProjectManager { -class Qt4Manager; +class QmakeManager; namespace Internal { @@ -45,14 +45,14 @@ class ProFileEditorFactory : public Core::IEditorFactory Q_OBJECT public: - ProFileEditorFactory(Qt4Manager *parent, TextEditor::TextEditorActionHandler *handler); + ProFileEditorFactory(QmakeManager *parent, TextEditor::TextEditorActionHandler *handler); Core::IEditor *createEditor(QWidget *parent); - Qt4Manager *qt4ProjectManager() const { return m_manager; } + QmakeManager *qmakeProjectManager() const { return m_manager; } private: - Qt4Manager *m_manager; + QmakeManager *m_manager; TextEditor::TextEditorActionHandler *m_actionHandler; }; diff --git a/src/plugins/qt4projectmanager/profilehighlighter.cpp b/src/plugins/qmakeprojectmanager/profilehighlighter.cpp index 9552f50ecb..9552f50ecb 100644 --- a/src/plugins/qt4projectmanager/profilehighlighter.cpp +++ b/src/plugins/qmakeprojectmanager/profilehighlighter.cpp diff --git a/src/plugins/qt4projectmanager/profilehighlighter.h b/src/plugins/qmakeprojectmanager/profilehighlighter.h index efe1876304..efe1876304 100644 --- a/src/plugins/qt4projectmanager/profilehighlighter.h +++ b/src/plugins/qmakeprojectmanager/profilehighlighter.h diff --git a/src/plugins/qt4projectmanager/profilehighlighterfactory.cpp b/src/plugins/qmakeprojectmanager/profilehighlighterfactory.cpp index 04544b5592..04544b5592 100644 --- a/src/plugins/qt4projectmanager/profilehighlighterfactory.cpp +++ b/src/plugins/qmakeprojectmanager/profilehighlighterfactory.cpp diff --git a/src/plugins/qt4projectmanager/profilehighlighterfactory.h b/src/plugins/qmakeprojectmanager/profilehighlighterfactory.h index 3e3ecf6a7d..3e3ecf6a7d 100644 --- a/src/plugins/qt4projectmanager/profilehighlighterfactory.h +++ b/src/plugins/qmakeprojectmanager/profilehighlighterfactory.h diff --git a/src/plugins/qt4projectmanager/profilehoverhandler.cpp b/src/plugins/qmakeprojectmanager/profilehoverhandler.cpp index 824929ae97..824929ae97 100644 --- a/src/plugins/qt4projectmanager/profilehoverhandler.cpp +++ b/src/plugins/qmakeprojectmanager/profilehoverhandler.cpp diff --git a/src/plugins/qt4projectmanager/profilehoverhandler.h b/src/plugins/qmakeprojectmanager/profilehoverhandler.h index e53566a5b6..e53566a5b6 100644 --- a/src/plugins/qt4projectmanager/profilehoverhandler.h +++ b/src/plugins/qmakeprojectmanager/profilehoverhandler.h diff --git a/src/plugins/qt4projectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index fd4304005a..295d7b53a6 100644 --- a/src/plugins/qt4projectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -67,7 +67,7 @@ static Utils::FileName defaultBuildDirectory(bool supportsShadowBuild, const QString &suffix) { if (supportsShadowBuild) - return Utils::FileName::fromString(Qt4Project::shadowBuildDirectory(projectPath, k, suffix)); + return Utils::FileName::fromString(QmakeProject::shadowBuildDirectory(projectPath, k, suffix)); return Utils::FileName::fromString(ProjectExplorer::Project::projectDirectory(projectPath)); } @@ -76,14 +76,14 @@ using namespace ProjectExplorer; using namespace QtSupport; using namespace Utils; -const char QT4_BC_ID[] = "Qt4ProjectManager.Qt4BuildConfiguration"; +const char QMAKE_BC_ID[] = "Qt4ProjectManager.Qt4BuildConfiguration"; const char USE_SHADOW_BUILD_KEY[] = "Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild"; const char BUILD_CONFIGURATION_KEY[] = "Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration"; enum { debug = 0 }; -Qt4BuildConfiguration::Qt4BuildConfiguration(Target *target) : - BuildConfiguration(target, Core::Id(QT4_BC_ID)), +QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target) : + BuildConfiguration(target, Core::Id(QMAKE_BC_ID)), m_shadowBuild(true), m_isEnabled(false), m_qmakeBuildConfiguration(0), @@ -93,7 +93,7 @@ Qt4BuildConfiguration::Qt4BuildConfiguration(Target *target) : ctor(); } -Qt4BuildConfiguration::Qt4BuildConfiguration(Target *target, const Core::Id id) : +QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target, const Core::Id id) : BuildConfiguration(target, id), m_shadowBuild(true), m_isEnabled(false), @@ -104,7 +104,7 @@ Qt4BuildConfiguration::Qt4BuildConfiguration(Target *target, const Core::Id id) ctor(); } -Qt4BuildConfiguration::Qt4BuildConfiguration(Target *target, Qt4BuildConfiguration *source) : +QmakeBuildConfiguration::QmakeBuildConfiguration(Target *target, QmakeBuildConfiguration *source) : BuildConfiguration(target, source), m_shadowBuild(source->m_shadowBuild), m_isEnabled(false), @@ -116,11 +116,11 @@ Qt4BuildConfiguration::Qt4BuildConfiguration(Target *target, Qt4BuildConfigurati ctor(); } -Qt4BuildConfiguration::~Qt4BuildConfiguration() +QmakeBuildConfiguration::~QmakeBuildConfiguration() { } -QVariantMap Qt4BuildConfiguration::toMap() const +QVariantMap QmakeBuildConfiguration::toMap() const { QVariantMap map(BuildConfiguration::toMap()); map.insert(QLatin1String(USE_SHADOW_BUILD_KEY), m_shadowBuild); @@ -128,7 +128,7 @@ QVariantMap Qt4BuildConfiguration::toMap() const return map; } -bool Qt4BuildConfiguration::fromMap(const QVariantMap &map) +bool QmakeBuildConfiguration::fromMap(const QVariantMap &map) { if (!BuildConfiguration::fromMap(map)) return false; @@ -147,7 +147,7 @@ bool Qt4BuildConfiguration::fromMap(const QVariantMap &map) return true; } -void Qt4BuildConfiguration::ctor() +void QmakeBuildConfiguration::ctor() { connect(this, SIGNAL(environmentChanged()), this, SLOT(emitProFileEvaluateNeeded())); @@ -155,12 +155,12 @@ void Qt4BuildConfiguration::ctor() this, SLOT(kitChanged())); } -void Qt4BuildConfiguration::kitChanged() +void QmakeBuildConfiguration::kitChanged() { LastKitState newState = LastKitState(target()->kit()); if (newState != m_lastKitState) { // This only checks if the ids have changed! - // For that reason the Qt4BuildConfiguration is also connected + // For that reason the QmakeBuildConfiguration is also connected // to the toolchain and qtversion managers emitProFileEvaluateNeeded(); updateShadowBuild(); @@ -168,19 +168,19 @@ void Qt4BuildConfiguration::kitChanged() } } -void Qt4BuildConfiguration::toolChainUpdated(ProjectExplorer::ToolChain *tc) +void QmakeBuildConfiguration::toolChainUpdated(ProjectExplorer::ToolChain *tc) { if (ToolChainKitInformation::toolChain(target()->kit()) == tc) emitProFileEvaluateNeeded(); } -void Qt4BuildConfiguration::qtVersionsChanged(const QList<int> &,const QList<int> &, const QList<int> &changed) +void QmakeBuildConfiguration::qtVersionsChanged(const QList<int> &,const QList<int> &, const QList<int> &changed) { if (changed.contains(QtKitInformation::qtVersionId(target()->kit()))) emitProFileEvaluateNeeded(); } -void Qt4BuildConfiguration::updateShadowBuild() +void QmakeBuildConfiguration::updateShadowBuild() { // We also emit buildDirectoryChanged if the the Qt version's supportShadowBuild changed bool currentShadowBuild = supportsShadowBuilds(); @@ -191,19 +191,19 @@ void Qt4BuildConfiguration::updateShadowBuild() } } -NamedWidget *Qt4BuildConfiguration::createConfigWidget() +NamedWidget *QmakeBuildConfiguration::createConfigWidget() { - return new Qt4ProjectConfigWidget(this); + return new QmakeProjectConfigWidget(this); } -QString Qt4BuildConfiguration::defaultShadowBuildDirectory() const +QString QmakeBuildConfiguration::defaultShadowBuildDirectory() const { // todo displayName isn't ideal - return Qt4Project::shadowBuildDirectory(target()->project()->projectFilePath(), + return QmakeProject::shadowBuildDirectory(target()->project()->projectFilePath(), target()->kit(), displayName()); } -bool Qt4BuildConfiguration::supportsShadowBuilds() +bool QmakeBuildConfiguration::supportsShadowBuilds() { BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit()); return !version || version->supportsShadowBuilds(); @@ -211,8 +211,8 @@ bool Qt4BuildConfiguration::supportsShadowBuilds() /// If only a sub tree should be build this function returns which sub node /// should be build -/// \see Qt4BuildConfiguration::setSubNodeBuild -Qt4ProFileNode *Qt4BuildConfiguration::subNodeBuild() const +/// \see QMakeBuildConfiguration::setSubNodeBuild +QmakeProFileNode *QmakeBuildConfiguration::subNodeBuild() const { return m_subNodeBuild; } @@ -223,17 +223,17 @@ Qt4ProFileNode *Qt4BuildConfiguration::subNodeBuild() const /// calling BuildManager::buildProject( BuildConfiguration * ) /// and reset immediately afterwards /// That is m_subNodesBuild is set only temporarly -void Qt4BuildConfiguration::setSubNodeBuild(Qt4ProFileNode *node) +void QmakeBuildConfiguration::setSubNodeBuild(QmakeProFileNode *node) { m_subNodeBuild = node; } -FileNode *Qt4BuildConfiguration::fileNodeBuild() const +FileNode *QmakeBuildConfiguration::fileNodeBuild() const { return m_fileNodeBuild; } -void Qt4BuildConfiguration::setFileNodeBuild(FileNode *node) +void QmakeBuildConfiguration::setFileNodeBuild(FileNode *node) { m_fileNodeBuild = node; } @@ -242,12 +242,12 @@ void Qt4BuildConfiguration::setFileNodeBuild(FileNode *node) /// note, even if shadowBuild() returns true, it might be using the /// source directory as the shadow build directory, thus it /// still is a in-source build -bool Qt4BuildConfiguration::isShadowBuild() const +bool QmakeBuildConfiguration::isShadowBuild() const { return buildDirectory().toString() != target()->project()->projectDirectory(); } -void Qt4BuildConfiguration::setBuildDirectory(const FileName &directory) +void QmakeBuildConfiguration::setBuildDirectory(const FileName &directory) { if (directory == buildDirectory()) return; @@ -258,17 +258,17 @@ void Qt4BuildConfiguration::setBuildDirectory(const FileName &directory) emitProFileEvaluateNeeded(); } -QString Qt4BuildConfiguration::makefile() const +QString QmakeBuildConfiguration::makefile() const { - return static_cast<Qt4Project *>(target()->project())->rootQt4ProjectNode()->makefile(); + return static_cast<QmakeProject *>(target()->project())->rootQmakeProjectNode()->makefile(); } -BaseQtVersion::QmakeBuildConfigs Qt4BuildConfiguration::qmakeBuildConfiguration() const +BaseQtVersion::QmakeBuildConfigs QmakeBuildConfiguration::qmakeBuildConfiguration() const { return m_qmakeBuildConfiguration; } -void Qt4BuildConfiguration::setQMakeBuildConfiguration(BaseQtVersion::QmakeBuildConfigs config) +void QmakeBuildConfiguration::setQMakeBuildConfiguration(BaseQtVersion::QmakeBuildConfigs config) { if (m_qmakeBuildConfiguration == config) return; @@ -278,20 +278,20 @@ void Qt4BuildConfiguration::setQMakeBuildConfiguration(BaseQtVersion::QmakeBuild emitProFileEvaluateNeeded(); } -void Qt4BuildConfiguration::emitProFileEvaluateNeeded() +void QmakeBuildConfiguration::emitProFileEvaluateNeeded() { Target *t = target(); Project *p = t->project(); if (t->activeBuildConfiguration() == this && p->activeTarget() == t) - static_cast<Qt4Project *>(p)->scheduleAsyncUpdate(); + static_cast<QmakeProject *>(p)->scheduleAsyncUpdate(); } -void Qt4BuildConfiguration::emitQMakeBuildConfigurationChanged() +void QmakeBuildConfiguration::emitQMakeBuildConfigurationChanged() { emit qmakeBuildConfigurationChanged(); } -QStringList Qt4BuildConfiguration::configCommandLineArguments() const +QStringList QmakeBuildConfiguration::configCommandLineArguments() const { QStringList result; BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit()); @@ -310,7 +310,7 @@ QStringList Qt4BuildConfiguration::configCommandLineArguments() const return result; } -QMakeStep *Qt4BuildConfiguration::qmakeStep() const +QMakeStep *QmakeBuildConfiguration::qmakeStep() const { QMakeStep *qs = 0; BuildStepList *bsl = stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)); @@ -321,7 +321,7 @@ QMakeStep *Qt4BuildConfiguration::qmakeStep() const return 0; } -MakeStep *Qt4BuildConfiguration::makeStep() const +MakeStep *QmakeBuildConfiguration::makeStep() const { MakeStep *ms = 0; BuildStepList *bsl = stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)); @@ -333,7 +333,7 @@ MakeStep *Qt4BuildConfiguration::makeStep() const } // Returns true if both are equal. -Qt4BuildConfiguration::MakefileState Qt4BuildConfiguration::compareToImportFrom(const QString &makefile) +QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportFrom(const QString &makefile) { QMakeStep *qs = qmakeStep(); if (QFileInfo(makefile).exists() && qs) { @@ -413,7 +413,7 @@ Qt4BuildConfiguration::MakefileState Qt4BuildConfiguration::compareToImportFrom( return MakefileMissing; } -bool Qt4BuildConfiguration::removeQMLInspectorFromArguments(QString *args) +bool QmakeBuildConfiguration::removeQMLInspectorFromArguments(QString *args) { bool removedArgument = false; for (QtcProcess::ArgIterator ait(args); ait.next(); ) { @@ -428,7 +428,7 @@ bool Qt4BuildConfiguration::removeQMLInspectorFromArguments(QString *args) return removedArgument; } -FileName Qt4BuildConfiguration::extractSpecFromArguments(QString *args, +FileName QmakeBuildConfiguration::extractSpecFromArguments(QString *args, const QString &directory, const BaseQtVersion *version, QStringList *outArgs) { @@ -497,19 +497,19 @@ FileName Qt4BuildConfiguration::extractSpecFromArguments(QString *args, return parsedSpec; } -bool Qt4BuildConfiguration::isEnabled() const +bool QmakeBuildConfiguration::isEnabled() const { return m_isEnabled; } -QString Qt4BuildConfiguration::disabledReason() const +QString QmakeBuildConfiguration::disabledReason() const { if (!m_isEnabled) return tr("Parsing the .pro file"); return QString(); } -void Qt4BuildConfiguration::setEnabled(bool enabled) +void QmakeBuildConfiguration::setEnabled(bool enabled) { if (m_isEnabled == enabled) return; @@ -518,10 +518,10 @@ void Qt4BuildConfiguration::setEnabled(bool enabled) } /*! - \class Qt4BuildConfigurationFactory + \class QmakeBuildConfigurationFactory */ -Qt4BuildConfigurationFactory::Qt4BuildConfigurationFactory(QObject *parent) : +QmakeBuildConfigurationFactory::QmakeBuildConfigurationFactory(QObject *parent) : IBuildConfigurationFactory(parent) { update(); @@ -531,23 +531,23 @@ Qt4BuildConfigurationFactory::Qt4BuildConfigurationFactory(QObject *parent) : this, SLOT(update())); } -Qt4BuildConfigurationFactory::~Qt4BuildConfigurationFactory() +QmakeBuildConfigurationFactory::~QmakeBuildConfigurationFactory() { } -void Qt4BuildConfigurationFactory::update() +void QmakeBuildConfigurationFactory::update() { emit availableCreationIdsChanged(); } -bool Qt4BuildConfigurationFactory::canHandle(const Target *t) const +bool QmakeBuildConfigurationFactory::canHandle(const Target *t) const { if (!t->project()->supportsKit(t->kit())) return false; - return qobject_cast<Qt4Project *>(t->project()); + return qobject_cast<QmakeProject *>(t->project()); } -QmakeBuildInfo *Qt4BuildConfigurationFactory::createBuildInfo(const Kit *k, +QmakeBuildInfo *QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k, const QString &projectPath, BuildConfiguration::BuildType type) const { @@ -569,12 +569,12 @@ QmakeBuildInfo *Qt4BuildConfigurationFactory::createBuildInfo(const Kit *k, return info; } -int Qt4BuildConfigurationFactory::priority(const Target *parent) const +int QmakeBuildConfigurationFactory::priority(const Target *parent) const { return canHandle(parent) ? 0 : -1; } -QList<BuildInfo *> Qt4BuildConfigurationFactory::availableBuilds(const Target *parent) const +QList<BuildInfo *> QmakeBuildConfigurationFactory::availableBuilds(const Target *parent) const { QList<ProjectExplorer::BuildInfo *> result; QmakeBuildInfo *info = createBuildInfo(parent->kit(), parent->project()->projectFilePath(), @@ -586,13 +586,13 @@ QList<BuildInfo *> Qt4BuildConfigurationFactory::availableBuilds(const Target *p return result; } -int Qt4BuildConfigurationFactory::priority(const Kit *k, const QString &projectPath) const +int QmakeBuildConfigurationFactory::priority(const Kit *k, const QString &projectPath) const { return (k && Core::MimeDatabase::findByFile(QFileInfo(projectPath)) .matchesType(QLatin1String(Constants::PROFILE_MIMETYPE))) ? 0 : -1; } -QList<BuildInfo *> Qt4BuildConfigurationFactory::availableSetups(const Kit *k, const QString &projectPath) const +QList<BuildInfo *> QmakeBuildConfigurationFactory::availableSetups(const Kit *k, const QString &projectPath) const { QList<ProjectExplorer::BuildInfo *> result; result << createBuildInfo(k, projectPath, ProjectExplorer::BuildConfiguration::Debug); @@ -601,7 +601,7 @@ QList<BuildInfo *> Qt4BuildConfigurationFactory::availableSetups(const Kit *k, c return result; } -BuildConfiguration *Qt4BuildConfigurationFactory::create(Target *parent, const BuildInfo *info) const +BuildConfiguration *QmakeBuildConfigurationFactory::create(Target *parent, const BuildInfo *info) const { QTC_ASSERT(info->factory() == this, return 0); QTC_ASSERT(info->kitId == parent->kit()->id(), return 0); @@ -618,7 +618,7 @@ BuildConfiguration *Qt4BuildConfigurationFactory::create(Target *parent, const B else config |= QtSupport::BaseQtVersion::DebugBuild; - Qt4BuildConfiguration *bc = new Qt4BuildConfiguration(parent); + QmakeBuildConfiguration *bc = new QmakeBuildConfiguration(parent); bc->setDefaultDisplayName(info->displayName); bc->setDisplayName(info->displayName); @@ -641,7 +641,7 @@ BuildConfiguration *Qt4BuildConfigurationFactory::create(Target *parent, const B QString additionalArguments = qmakeInfo->additionalArguments; bool enableQmlDebugger - = Qt4BuildConfiguration::removeQMLInspectorFromArguments(&additionalArguments); + = QmakeBuildConfiguration::removeQMLInspectorFromArguments(&additionalArguments); if (!additionalArguments.isEmpty()) qmakeStep->setUserArguments(additionalArguments); qmakeStep->setLinkQmlDebuggingLibrary(enableQmlDebugger); @@ -659,38 +659,38 @@ BuildConfiguration *Qt4BuildConfigurationFactory::create(Target *parent, const B return bc; } -bool Qt4BuildConfigurationFactory::canClone(const Target *parent, BuildConfiguration *source) const +bool QmakeBuildConfigurationFactory::canClone(const Target *parent, BuildConfiguration *source) const { - return canHandle(parent) && qobject_cast<Qt4BuildConfiguration *>(source); + return canHandle(parent) && qobject_cast<QmakeBuildConfiguration *>(source); } -BuildConfiguration *Qt4BuildConfigurationFactory::clone(Target *parent, BuildConfiguration *source) +BuildConfiguration *QmakeBuildConfigurationFactory::clone(Target *parent, BuildConfiguration *source) { if (!canClone(parent, source)) return 0; - Qt4BuildConfiguration *oldbc(static_cast<Qt4BuildConfiguration *>(source)); - return new Qt4BuildConfiguration(parent, oldbc); + QmakeBuildConfiguration *oldbc(static_cast<QmakeBuildConfiguration *>(source)); + return new QmakeBuildConfiguration(parent, oldbc); } -bool Qt4BuildConfigurationFactory::canRestore(const Target *parent, const QVariantMap &map) const +bool QmakeBuildConfigurationFactory::canRestore(const Target *parent, const QVariantMap &map) const { if (!canHandle(parent)) return false; - return ProjectExplorer::idFromMap(map) == QT4_BC_ID; + return ProjectExplorer::idFromMap(map) == QMAKE_BC_ID; } -BuildConfiguration *Qt4BuildConfigurationFactory::restore(Target *parent, const QVariantMap &map) +BuildConfiguration *QmakeBuildConfigurationFactory::restore(Target *parent, const QVariantMap &map) { if (!canRestore(parent, map)) return 0; - Qt4BuildConfiguration *bc = new Qt4BuildConfiguration(parent); + QmakeBuildConfiguration *bc = new QmakeBuildConfiguration(parent); if (bc->fromMap(map)) return bc; delete bc; return 0; } -BuildConfiguration::BuildType Qt4BuildConfiguration::buildType() const +BuildConfiguration::BuildType QmakeBuildConfiguration::buildType() const { if (qmakeBuildConfiguration() & BaseQtVersion::DebugBuild) return Debug; @@ -698,12 +698,12 @@ BuildConfiguration::BuildType Qt4BuildConfiguration::buildType() const return Release; } -Qt4BuildConfiguration::LastKitState::LastKitState() +QmakeBuildConfiguration::LastKitState::LastKitState() { } -Qt4BuildConfiguration::LastKitState::LastKitState(Kit *k) +QmakeBuildConfiguration::LastKitState::LastKitState(Kit *k) : m_qtVersion(QtKitInformation::qtVersionId(k)), m_sysroot(SysRootKitInformation::sysRoot(k).toString()), m_mkspec(QmakeKitInformation::mkspec(k).toString()) @@ -712,7 +712,7 @@ Qt4BuildConfiguration::LastKitState::LastKitState(Kit *k) m_toolchain = tc ? tc->id() : QString(); } -bool Qt4BuildConfiguration::LastKitState::operator ==(const LastKitState &other) const +bool QmakeBuildConfiguration::LastKitState::operator ==(const LastKitState &other) const { return m_qtVersion == other.m_qtVersion && m_toolchain == other.m_toolchain @@ -720,7 +720,7 @@ bool Qt4BuildConfiguration::LastKitState::operator ==(const LastKitState &other) && m_mkspec == other.m_mkspec; } -bool Qt4BuildConfiguration::LastKitState::operator !=(const LastKitState &other) const +bool QmakeBuildConfiguration::LastKitState::operator !=(const LastKitState &other) const { return !operator ==(other); } diff --git a/src/plugins/qt4projectmanager/qmakebuildconfiguration.h b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h index 1a7bcd5e1c..28e53975b7 100644 --- a/src/plugins/qt4projectmanager/qmakebuildconfiguration.h +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h @@ -42,24 +42,24 @@ namespace QmakeProjectManager { class QmakeBuildInfo; class QMakeStep; class MakeStep; -class Qt4BuildConfigurationFactory; -class Qt4ProFileNode; +class QmakeBuildConfigurationFactory; +class QmakeProFileNode; -namespace Internal { class Qt4ProjectConfigWidget; } +namespace Internal { class QmakeProjectConfigWidget; } -class QT4PROJECTMANAGER_EXPORT Qt4BuildConfiguration : public ProjectExplorer::BuildConfiguration +class QMAKEPROJECTMANAGER_EXPORT QmakeBuildConfiguration : public ProjectExplorer::BuildConfiguration { Q_OBJECT public: - explicit Qt4BuildConfiguration(ProjectExplorer::Target *target); - ~Qt4BuildConfiguration(); + explicit QmakeBuildConfiguration(ProjectExplorer::Target *target); + ~QmakeBuildConfiguration(); ProjectExplorer::NamedWidget *createConfigWidget(); bool isShadowBuild() const; - void setSubNodeBuild(QmakeProjectManager::Qt4ProFileNode *node); - QmakeProjectManager::Qt4ProFileNode *subNodeBuild() const; + void setSubNodeBuild(QmakeProjectManager::QmakeProFileNode *node); + QmakeProjectManager::QmakeProFileNode *subNodeBuild() const; ProjectExplorer::FileNode *fileNodeBuild() const; void setFileNodeBuild(ProjectExplorer::FileNode *node); @@ -78,8 +78,8 @@ public: // Those functions are used in a few places. // The drawback is that we shouldn't actually depend on them being always there // That is generally the stuff that is asked should normally be transferred to - // Qt4Project * - // So that we can later enable people to build qt4projects the way they would like + // QmakeProject * + // So that we can later enable people to build qmake the way they would like QMakeStep *qmakeStep() const; MakeStep *makeStep() const; @@ -96,7 +96,7 @@ public: virtual bool isEnabled() const; virtual QString disabledReason() const; - /// \internal For Qt4Project, since that manages the parsing information + /// \internal For QmakeProject, since that manages the parsing information void setEnabled(bool enabled); BuildType buildType() const; @@ -119,8 +119,8 @@ private slots: void qtVersionsChanged(const QList<int> &, const QList<int> &, const QList<int> &changed); protected: - Qt4BuildConfiguration(ProjectExplorer::Target *target, Qt4BuildConfiguration *source); - Qt4BuildConfiguration(ProjectExplorer::Target *target, const Core::Id id); + QmakeBuildConfiguration(ProjectExplorer::Target *target, QmakeBuildConfiguration *source); + QmakeBuildConfiguration(ProjectExplorer::Target *target, const Core::Id id); virtual bool fromMap(const QVariantMap &map); private: @@ -148,20 +148,20 @@ private: bool m_isEnabled; bool m_qtVersionSupportsShadowBuilds; QtSupport::BaseQtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration; - QmakeProjectManager::Qt4ProFileNode *m_subNodeBuild; + QmakeProjectManager::QmakeProFileNode *m_subNodeBuild; ProjectExplorer::FileNode *m_fileNodeBuild; - friend class Internal::Qt4ProjectConfigWidget; - friend class Qt4BuildConfigurationFactory; + friend class Internal::QmakeProjectConfigWidget; + friend class QmakeBuildConfigurationFactory; }; -class QT4PROJECTMANAGER_EXPORT Qt4BuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory +class QMAKEPROJECTMANAGER_EXPORT QmakeBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory { Q_OBJECT public: - explicit Qt4BuildConfigurationFactory(QObject *parent = 0); - ~Qt4BuildConfigurationFactory(); + explicit QmakeBuildConfigurationFactory(QObject *parent = 0); + ~QmakeBuildConfigurationFactory(); int priority(const ProjectExplorer::Target *parent) const; QList<ProjectExplorer::BuildInfo *> availableBuilds(const ProjectExplorer::Target *parent) const; diff --git a/src/plugins/qt4projectmanager/qmakebuildinfo.h b/src/plugins/qmakeprojectmanager/qmakebuildinfo.h index 9dab7ab528..41d2922e6e 100644 --- a/src/plugins/qt4projectmanager/qmakebuildinfo.h +++ b/src/plugins/qmakeprojectmanager/qmakebuildinfo.h @@ -42,7 +42,7 @@ namespace QmakeProjectManager { class QmakeBuildInfo : public ProjectExplorer::BuildInfo { public: - QmakeBuildInfo(const Qt4BuildConfigurationFactory *f) : ProjectExplorer::BuildInfo(f) { } + QmakeBuildInfo(const QmakeBuildConfigurationFactory *f) : ProjectExplorer::BuildInfo(f) { } ProjectExplorer::BuildConfiguration::BuildType type; QString additionalArguments; diff --git a/src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp b/src/plugins/qmakeprojectmanager/qmakekitconfigwidget.cpp index fc9dd5142c..fc9dd5142c 100644 --- a/src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp +++ b/src/plugins/qmakeprojectmanager/qmakekitconfigwidget.cpp diff --git a/src/plugins/qt4projectmanager/qmakekitconfigwidget.h b/src/plugins/qmakeprojectmanager/qmakekitconfigwidget.h index 592653d746..ccf6c47976 100644 --- a/src/plugins/qt4projectmanager/qmakekitconfigwidget.h +++ b/src/plugins/qmakeprojectmanager/qmakekitconfigwidget.h @@ -27,8 +27,8 @@ ** ****************************************************************************/ -#ifndef QT4PM_QMAKEKITCONFIGWIDGET_H -#define QT4PM_QMAKEKITCONFIGWIDGET_H +#ifndef QMAKEKITCONFIGWIDGET_H +#define QMAKEKITCONFIGWIDGET_H #include <projectexplorer/kitconfigwidget.h> @@ -67,4 +67,4 @@ private: } // namespace Internal } // namespace QmakeProjectManager -#endif // QT4PM_QMAKEKITCONFIGWIDGET_H +#endif // QMAKEKITCONFIGWIDGET_H diff --git a/src/plugins/qt4projectmanager/qmakekitinformation.cpp b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp index c942e4974f..c942e4974f 100644 --- a/src/plugins/qt4projectmanager/qmakekitinformation.cpp +++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp diff --git a/src/plugins/qt4projectmanager/qmakekitinformation.h b/src/plugins/qmakeprojectmanager/qmakekitinformation.h index 25d91bc4f7..ae69866af9 100644 --- a/src/plugins/qt4projectmanager/qmakekitinformation.h +++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.h @@ -36,7 +36,7 @@ namespace QmakeProjectManager { -class QT4PROJECTMANAGER_EXPORT QmakeKitInformation : public ProjectExplorer::KitInformation +class QMAKEPROJECTMANAGER_EXPORT QmakeKitInformation : public ProjectExplorer::KitInformation { Q_OBJECT diff --git a/src/plugins/qt4projectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 95ed6dca2b..51d945d7e7 100644 --- a/src/plugins/qt4projectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -69,7 +69,7 @@ #include <QMessageBox> #include <utils/QtConcurrentTools> -// Static cached data in struct Qt4NodeStaticData providing information and icons +// Static cached data in struct QmakeNodeStaticData providing information and icons // for file types and the project. Do some magic via qAddPostRoutine() // to make sure the icons do not outlive QApplication, triggering warnings on X11. @@ -81,22 +81,22 @@ struct FileTypeDataStorage { static const FileTypeDataStorage fileTypeDataStorage[] = { { ProjectExplorer::HeaderType, - QT_TRANSLATE_NOOP("QmakeProjectManager::Qt4PriFileNode", "Headers"), + QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "Headers"), ":/qmakeprojectmanager/images/headers.png" }, { ProjectExplorer::SourceType, - QT_TRANSLATE_NOOP("QmakeProjectManager::Qt4PriFileNode", "Sources"), + QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "Sources"), ":/qmakeprojectmanager/images/sources.png" }, { ProjectExplorer::FormType, - QT_TRANSLATE_NOOP("QmakeProjectManager::Qt4PriFileNode", "Forms"), + QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "Forms"), ":/qtsupport/images/forms.png" }, { ProjectExplorer::ResourceType, - QT_TRANSLATE_NOOP("QmakeProjectManager::Qt4PriFileNode", "Resources"), + QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "Resources"), ":/qtsupport/images/qt_qrc.png" }, { ProjectExplorer::QMLType, - QT_TRANSLATE_NOOP("QmakeProjectManager::Qt4PriFileNode", "QML"), + QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "QML"), ":/qtsupport/images/qml.png" }, { ProjectExplorer::UnknownFileType, - QT_TRANSLATE_NOOP("QmakeProjectManager::Qt4PriFileNode", "Other files"), + QT_TRANSLATE_NOOP("QmakeProjectManager::QmakePriFileNode", "Other files"), ":/qmakeprojectmanager/images/unknown.png" } }; @@ -105,7 +105,7 @@ bool sortNodesByPath(ProjectExplorer::Node *a, ProjectExplorer::Node *b) return a->path() < b->path(); } -class Qt4NodeStaticData { +class QmakeNodeStaticData { public: class FileTypeData { public: @@ -119,15 +119,15 @@ public: QIcon icon; }; - Qt4NodeStaticData(); + QmakeNodeStaticData(); QVector<FileTypeData> fileTypeData; QIcon projectIcon; }; -static void clearQt4NodeStaticData(); +static void clearQmakeNodeStaticData(); -Qt4NodeStaticData::Qt4NodeStaticData() +QmakeNodeStaticData::QmakeNodeStaticData() { // File type data const unsigned count = sizeof(fileTypeDataStorage)/sizeof(FileTypeDataStorage); @@ -143,8 +143,8 @@ Qt4NodeStaticData::Qt4NodeStaticData() overlayIcon, desiredSize); QIcon folderIcon; folderIcon.addPixmap(folderPixmap); - const QString desc = QmakeProjectManager::Qt4PriFileNode::tr(fileTypeDataStorage[i].typeName); - fileTypeData.push_back(Qt4NodeStaticData::FileTypeData(fileTypeDataStorage[i].type, + const QString desc = QmakeProjectManager::QmakePriFileNode::tr(fileTypeDataStorage[i].typeName); + fileTypeData.push_back(QmakeNodeStaticData::FileTypeData(fileTypeDataStorage[i].type, desc, folderIcon)); } // Project icon @@ -154,15 +154,15 @@ Qt4NodeStaticData::Qt4NodeStaticData() desiredSize); projectIcon.addPixmap(projectPixmap); - qAddPostRoutine(clearQt4NodeStaticData); + qAddPostRoutine(clearQmakeNodeStaticData); } -Q_GLOBAL_STATIC(Qt4NodeStaticData, qt4NodeStaticData) +Q_GLOBAL_STATIC(QmakeNodeStaticData, qmakeNodeStaticData) -static void clearQt4NodeStaticData() +static void clearQmakeNodeStaticData() { - qt4NodeStaticData()->fileTypeData.clear(); - qt4NodeStaticData()->projectIcon = QIcon(); + qmakeNodeStaticData()->fileTypeData.clear(); + qmakeNodeStaticData()->projectIcon = QIcon(); } enum { debug = 0 }; @@ -170,13 +170,13 @@ enum { debug = 0 }; using namespace QmakeProjectManager; using namespace QmakeProjectManager::Internal; -Qt4PriFile::Qt4PriFile(QmakeProjectManager::Qt4PriFileNode *qt4PriFile) - : IDocument(qt4PriFile), m_priFile(qt4PriFile) +QmakePriFile::QmakePriFile(QmakeProjectManager::QmakePriFileNode *qmakePriFile) + : IDocument(qmakePriFile), m_priFile(qmakePriFile) { setFilePath(m_priFile->path()); } -bool Qt4PriFile::save(QString *errorString, const QString &fileName, bool autoSave) +bool QmakePriFile::save(QString *errorString, const QString &fileName, bool autoSave) { Q_UNUSED(errorString); Q_UNUSED(fileName); @@ -184,39 +184,39 @@ bool Qt4PriFile::save(QString *errorString, const QString &fileName, bool autoSa return false; } -QString Qt4PriFile::defaultPath() const +QString QmakePriFile::defaultPath() const { return QString(); } -QString Qt4PriFile::suggestedFileName() const +QString QmakePriFile::suggestedFileName() const { return QString(); } -QString Qt4PriFile::mimeType() const +QString QmakePriFile::mimeType() const { return QLatin1String(QmakeProjectManager::Constants::PROFILE_MIMETYPE); } -bool Qt4PriFile::isModified() const +bool QmakePriFile::isModified() const { return false; } -bool Qt4PriFile::isSaveAsAllowed() const +bool QmakePriFile::isSaveAsAllowed() const { return false; } -Core::IDocument::ReloadBehavior Qt4PriFile::reloadBehavior(ChangeTrigger state, ChangeType type) const +Core::IDocument::ReloadBehavior QmakePriFile::reloadBehavior(ChangeTrigger state, ChangeType type) const { Q_UNUSED(state) Q_UNUSED(type) return BehaviorSilent; } -bool Qt4PriFile::reload(QString *errorString, ReloadFlag flag, ChangeType type) +bool QmakePriFile::reload(QString *errorString, ReloadFlag flag, ChangeType type) { Q_UNUSED(errorString) Q_UNUSED(flag) @@ -227,38 +227,37 @@ bool Qt4PriFile::reload(QString *errorString, ReloadFlag flag, ChangeType type) } /*! - \class Qt4PriFileNode + \class QmakePriFileNode Implements abstract ProjectNode class */ namespace QmakeProjectManager { -Qt4PriFileNode::Qt4PriFileNode(Qt4Project *project, Qt4ProFileNode* qt4ProFileNode, const QString &filePath) +QmakePriFileNode::QmakePriFileNode(QmakeProject *project, QmakeProFileNode *qmakeProFileNode, const QString &filePath) : ProjectNode(filePath), m_project(project), - m_qt4ProFileNode(qt4ProFileNode), + m_qmakeProFileNode(qmakeProFileNode), m_projectFilePath(QDir::fromNativeSeparators(filePath)), m_projectDir(QFileInfo(filePath).absolutePath()), m_includedInExactParse(true) { Q_ASSERT(project); - m_qt4PriFile = new Qt4PriFile(this); - Core::DocumentManager::addDocument(m_qt4PriFile); + m_qmakePriFile = new QmakePriFile(this); + Core::DocumentManager::addDocument(m_qmakePriFile); setDisplayName(QFileInfo(filePath).completeBaseName()); - - setIcon(qt4NodeStaticData()->projectIcon); + setIcon(qmakeNodeStaticData()->projectIcon); } -Qt4PriFileNode::~Qt4PriFileNode() +QmakePriFileNode::~QmakePriFileNode() { watchFolders(QSet<QString>()); } -void Qt4PriFileNode::scheduleUpdate() +void QmakePriFileNode::scheduleUpdate() { QtSupport::ProFileCacheManager::instance()->discardFile(m_projectFilePath); - m_qt4ProFileNode->scheduleUpdate(); + m_qmakeProFileNode->scheduleUpdate(); } namespace Internal { @@ -385,7 +384,7 @@ struct InternalNode } // Makes the projectNode's subtree below the given folder match this internal node's subtree - void updateSubFolders(QmakeProjectManager::Qt4PriFileNode *projectNode, ProjectExplorer::FolderNode *folder) + void updateSubFolders(QmakeProjectManager::QmakePriFileNode *projectNode, ProjectExplorer::FolderNode *folder) { updateFiles(projectNode, folder, type); @@ -476,7 +475,7 @@ struct InternalNode } // Makes the folder's files match this internal node's file list - void updateFiles(QmakeProjectManager::Qt4PriFileNode *projectNode, FolderNode *folder, FileType type) + void updateFiles(QmakeProjectManager::QmakePriFileNode *projectNode, FolderNode *folder, FileType type) { QList<FileNode*> existingFileNodes; foreach (FileNode *fileNode, folder->fileNodes()) { @@ -522,7 +521,7 @@ struct InternalNode }; } -QStringList Qt4PriFileNode::baseVPaths(QtSupport::ProFileReader *reader, const QString &projectDir, const QString &buildDir) const +QStringList QmakePriFileNode::baseVPaths(QtSupport::ProFileReader *reader, const QString &projectDir, const QString &buildDir) const { QStringList result; if (!reader) @@ -534,7 +533,7 @@ QStringList Qt4PriFileNode::baseVPaths(QtSupport::ProFileReader *reader, const Q return result; } -QStringList Qt4PriFileNode::fullVPaths(const QStringList &baseVPaths, QtSupport::ProFileReader *reader, +QStringList QmakePriFileNode::fullVPaths(const QStringList &baseVPaths, QtSupport::ProFileReader *reader, const QString &qmakeVariable, const QString &projectDir) const { QStringList vPaths; @@ -546,7 +545,7 @@ QStringList Qt4PriFileNode::fullVPaths(const QStringList &baseVPaths, QtSupport: return vPaths; } -QSet<Utils::FileName> Qt4PriFileNode::recursiveEnumerate(const QString &folder) +QSet<Utils::FileName> QmakePriFileNode::recursiveEnumerate(const QString &folder) { QSet<Utils::FileName> result; QFileInfo fi(folder); @@ -566,13 +565,13 @@ QSet<Utils::FileName> Qt4PriFileNode::recursiveEnumerate(const QString &folder) return result; } -void Qt4PriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReader *readerExact, ProFile *includeFileCumlative, QtSupport::ProFileReader *readerCumulative) +void QmakePriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReader *readerExact, ProFile *includeFileCumlative, QtSupport::ProFileReader *readerCumulative) { // add project file node if (m_fileNodes.isEmpty()) addFileNodes(QList<FileNode*>() << new ProjectExplorer::FileNode(m_projectFilePath, ProjectExplorer::ProjectFileType, false), this); - const QString &projectDir = m_qt4ProFileNode->m_projectDir; + const QString &projectDir = m_qmakeProFileNode->m_projectDir; InternalNode contents; @@ -630,12 +629,12 @@ void Qt4PriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReader QStringList baseVPathsExact; if (includeFileExact) - baseVPathsExact = baseVPaths(readerExact, projectDir, m_qt4ProFileNode->buildDir()); + baseVPathsExact = baseVPaths(readerExact, projectDir, m_qmakeProFileNode->buildDir()); QStringList baseVPathsCumulative; if (includeFileCumlative) - baseVPathsCumulative = baseVPaths(readerCumulative, projectDir, m_qt4ProFileNode->buildDir()); + baseVPathsCumulative = baseVPaths(readerCumulative, projectDir, m_qmakeProFileNode->buildDir()); - const QVector<Qt4NodeStaticData::FileTypeData> &fileTypes = qt4NodeStaticData()->fileTypeData; + const QVector<QmakeNodeStaticData::FileTypeData> &fileTypes = qmakeNodeStaticData()->fileTypeData; // update files QFileInfo tmpFi; @@ -699,7 +698,7 @@ void Qt4PriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReader contents.updateSubFolders(this, this); } -void Qt4PriFileNode::watchFolders(const QSet<QString> &folders) +void QmakePriFileNode::watchFolders(const QSet<QString> &folders) { QSet<QString> toUnwatch = m_watchedFolders; toUnwatch.subtract(folders); @@ -715,9 +714,9 @@ void Qt4PriFileNode::watchFolders(const QSet<QString> &folders) m_watchedFolders = folders; } -bool Qt4PriFileNode::folderChanged(const QString &changedFolder, const QSet<Utils::FileName> &newFiles) +bool QmakePriFileNode::folderChanged(const QString &changedFolder, const QSet<Utils::FileName> &newFiles) { - //qDebug()<<"########## Qt4PriFileNode::folderChanged"; + //qDebug()<<"########## QmakePriFileNode::folderChanged"; // So, we need to figure out which files changed. QSet<Utils::FileName> addedFiles = newFiles; @@ -738,7 +737,7 @@ bool Qt4PriFileNode::folderChanged(const QString &changedFolder, const QSet<Util // Apply the differences // per file type - const QVector<Qt4NodeStaticData::FileTypeData> &fileTypes = qt4NodeStaticData()->fileTypeData; + const QVector<QmakeNodeStaticData::FileTypeData> &fileTypes = qmakeNodeStaticData()->fileTypeData; for (int i = 0; i < fileTypes.size(); ++i) { FileType type = fileTypes.at(i).type; QSet<Utils::FileName> add = filterFilesRecursiveEnumerata(type, addedFiles); @@ -777,7 +776,7 @@ bool Qt4PriFileNode::folderChanged(const QString &changedFolder, const QSet<Util return true; } -bool Qt4PriFileNode::deploysFolder(const QString &folder) const +bool QmakePriFileNode::deploysFolder(const QString &folder) const { QString f = folder; const QChar slash = QLatin1Char('/'); @@ -792,7 +791,7 @@ bool Qt4PriFileNode::deploysFolder(const QString &folder) const return false; } -QList<ProjectExplorer::RunConfiguration *> Qt4PriFileNode::runConfigurationsFor(Node *node) +QList<ProjectExplorer::RunConfiguration *> QmakePriFileNode::runConfigurationsFor(Node *node) { QmakeRunConfigurationFactory *factory = QmakeRunConfigurationFactory::find(m_project->activeTarget()); if (factory) @@ -800,34 +799,39 @@ QList<ProjectExplorer::RunConfiguration *> Qt4PriFileNode::runConfigurationsFor( return QList<ProjectExplorer::RunConfiguration *>(); } -QList<Qt4PriFileNode *> Qt4PriFileNode::subProjectNodesExact() const +QList<QmakePriFileNode *> QmakePriFileNode::subProjectNodesExact() const { - QList<Qt4PriFileNode *> nodes; + QList<QmakePriFileNode *> nodes; foreach (ProjectNode *node, subProjectNodes()) { - Qt4PriFileNode *n = qobject_cast<Qt4PriFileNode *>(node); + QmakePriFileNode *n = qobject_cast<QmakePriFileNode *>(node); if (n && n->includedInExactParse()) nodes << n; } return nodes; } -bool Qt4PriFileNode::includedInExactParse() const +QmakeProFileNode *QmakePriFileNode::proFileNode() const +{ + return m_qmakeProFileNode; +} + +bool QmakePriFileNode::includedInExactParse() const { return m_includedInExactParse; } -void Qt4PriFileNode::setIncludedInExactParse(bool b) +void QmakePriFileNode::setIncludedInExactParse(bool b) { m_includedInExactParse = b; } -QList<ProjectNode::ProjectAction> Qt4PriFileNode::supportedActions(Node *node) const +QList<ProjectNode::ProjectAction> QmakePriFileNode::supportedActions(Node *node) const { QList<ProjectAction> actions; const FolderNode *folderNode = this; - const Qt4ProFileNode *proFileNode; - while (!(proFileNode = qobject_cast<const Qt4ProFileNode*>(folderNode))) + const QmakeProFileNode *proFileNode; + while (!(proFileNode = qobject_cast<const QmakeProFileNode*>(folderNode))) folderNode = folderNode->parentFolderNode(); Q_ASSERT(proFileNode); @@ -885,7 +889,7 @@ QList<ProjectNode::ProjectAction> Qt4PriFileNode::supportedActions(Node *node) c return actions; } -bool Qt4PriFileNode::canAddSubProject(const QString &proFilePath) const +bool QmakePriFileNode::canAddSubProject(const QString &proFilePath) const { QFileInfo fi(proFilePath); if (fi.suffix() == QLatin1String("pro") @@ -906,7 +910,7 @@ static QString simplifyProFilePath(const QString &proFilePath) return proFilePath; } -bool Qt4PriFileNode::addSubProjects(const QStringList &proFilePaths) +bool QmakePriFileNode::addSubProjects(const QStringList &proFilePaths) { ProjectExplorer::FindAllFilesVisitor visitor; accept(&visitor); @@ -923,7 +927,7 @@ bool Qt4PriFileNode::addSubProjects(const QStringList &proFilePaths) return failedFiles.isEmpty(); } -bool Qt4PriFileNode::removeSubProjects(const QStringList &proFilePaths) +bool QmakePriFileNode::removeSubProjects(const QStringList &proFilePaths) { QStringList failedOriginalFiles; changeFiles(QLatin1String(Constants::PROFILE_MIMETYPE), proFilePaths, &failedOriginalFiles, RemoveFromProFile); @@ -938,7 +942,7 @@ bool Qt4PriFileNode::removeSubProjects(const QStringList &proFilePaths) return failedSimplifiedFiles.isEmpty(); } -bool Qt4PriFileNode::addFiles(const QStringList &filePaths, QStringList *notAdded) +bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAdded) { // If a file is already referenced in the .pro file then we don't add them. // That ignores scopes and which variable was used to reference the file @@ -992,7 +996,7 @@ bool Qt4PriFileNode::addFiles(const QStringList &filePaths, QStringList *notAdde return failedFiles.isEmpty(); } -bool Qt4PriFileNode::removeFiles(const QStringList &filePaths, +bool QmakePriFileNode::removeFiles(const QStringList &filePaths, QStringList *notRemoved) { QStringList failedFiles; @@ -1012,7 +1016,7 @@ bool Qt4PriFileNode::removeFiles(const QStringList &filePaths, return failedFiles.isEmpty(); } -bool Qt4PriFileNode::deleteFiles(const QStringList &filePaths) +bool QmakePriFileNode::deleteFiles(const QStringList &filePaths) { QStringList failedFiles; typedef QMap<QString, QStringList> TypeFileMap; @@ -1029,7 +1033,7 @@ bool Qt4PriFileNode::deleteFiles(const QStringList &filePaths) return true; } -bool Qt4PriFileNode::renameFile(const QString &filePath, const QString &newFilePath) +bool QmakePriFileNode::renameFile(const QString &filePath, const QString &newFilePath) { if (newFilePath.isEmpty()) return false; @@ -1047,14 +1051,14 @@ bool Qt4PriFileNode::renameFile(const QString &filePath, const QString &newFileP return true; } -bool Qt4PriFileNode::priFileWritable(const QString &path) +bool QmakePriFileNode::priFileWritable(const QString &path) { Core::Internal::ReadOnlyFilesDialog roDialog(path, Core::ICore::mainWindow()); roDialog.setShowFailWarning(true); return roDialog.exec() != Core::Internal::ReadOnlyFilesDialog::RO_Cancel; } -bool Qt4PriFileNode::saveModifiedEditors() +bool QmakePriFileNode::saveModifiedEditors() { Core::IDocument *document = Core::EditorManager::documentModel()->documentForFilePath(m_projectFilePath); @@ -1068,11 +1072,11 @@ bool Qt4PriFileNode::saveModifiedEditors() return false; // force instant reload of ourselves QtSupport::ProFileCacheManager::instance()->discardFile(m_projectFilePath); - m_project->qt4ProjectManager()->notifyChanged(m_projectFilePath); + m_project->qmakeProjectManager()->notifyChanged(m_projectFilePath); return true; } -QStringList Qt4PriFileNode::formResources(const QString &formFile) const +QStringList QmakePriFileNode::formResources(const QString &formFile) const { QStringList resourceFiles; QFile file(formFile); @@ -1107,7 +1111,7 @@ QStringList Qt4PriFileNode::formResources(const QString &formFile) const return resourceFiles; } -bool Qt4PriFileNode::ensureWriteableProFile(const QString &file) +bool QmakePriFileNode::ensureWriteableProFile(const QString &file) { // Ensure that the file is not read only QFileInfo fi(file); @@ -1127,7 +1131,7 @@ bool Qt4PriFileNode::ensureWriteableProFile(const QString &file) return true; } -QPair<ProFile *, QStringList> Qt4PriFileNode::readProFile(const QString &file) +QPair<ProFile *, QStringList> QmakePriFileNode::readProFile(const QString &file) { QStringList lines; ProFile *includeFile = 0; @@ -1136,7 +1140,7 @@ QPair<ProFile *, QStringList> Qt4PriFileNode::readProFile(const QString &file) { Utils::FileReader reader; if (!reader.fetch(file, QIODevice::Text)) { - Qt4Project::proFileParseError(reader.errorString()); + QmakeProject::proFileParseError(reader.errorString()); return qMakePair(includeFile, lines); } contents = QString::fromLocal8Bit(reader.data()); @@ -1151,7 +1155,7 @@ QPair<ProFile *, QStringList> Qt4PriFileNode::readProFile(const QString &file) return qMakePair(includeFile, lines); } -void Qt4PriFileNode::changeFiles(const QString &mimeType, +void QmakePriFileNode::changeFiles(const QString &mimeType, const QStringList &filePaths, QStringList *notChanged, ChangeType change) @@ -1174,7 +1178,7 @@ void Qt4PriFileNode::changeFiles(const QString &mimeType, if (!includeFile) return; - QDir priFileDir = QDir(m_qt4ProFileNode->m_projectDir); + QDir priFileDir = QDir(m_qmakeProFileNode->m_projectDir); if (change == AddToProFile) { // Use the first variable for adding. @@ -1189,7 +1193,7 @@ void Qt4PriFileNode::changeFiles(const QString &mimeType, includeFile->deref(); } -bool Qt4PriFileNode::setProVariable(const QString &var, const QString &value) +bool QmakePriFileNode::setProVariable(const QString &var, const QString &value) { if (!ensureWriteableProFile(m_projectFilePath)) return false; @@ -1208,14 +1212,14 @@ bool Qt4PriFileNode::setProVariable(const QString &var, const QString &value) return true; } -void Qt4PriFileNode::save(const QStringList &lines) +void QmakePriFileNode::save(const QStringList &lines) { Core::DocumentManager::expectFileChange(m_projectFilePath); Utils::FileSaver saver(m_projectFilePath, QIODevice::Text); saver.write(lines.join(QLatin1String("\n")).toLocal8Bit()); saver.finalize(Core::ICore::mainWindow()); - m_project->qt4ProjectManager()->notifyChanged(m_projectFilePath); + m_project->qmakeProjectManager()->notifyChanged(m_projectFilePath); Core::DocumentManager::unexpectFileChange(m_projectFilePath); // This is a hack. // We are saving twice in a very short timeframe, once the editor and once the ProFile. @@ -1234,7 +1238,7 @@ void Qt4PriFileNode::save(const QStringList &lines) errorStrings.join(QLatin1String("\n"))); } -QStringList Qt4PriFileNode::varNames(ProjectExplorer::FileType type) +QStringList QmakePriFileNode::varNames(ProjectExplorer::FileType type) { QStringList vars; switch (type) { @@ -1269,12 +1273,12 @@ QStringList Qt4PriFileNode::varNames(ProjectExplorer::FileType type) } //! -//! \brief Qt4PriFileNode::varNames +//! \brief QmakePriFileNode::varNames //! \param mimeType //! \return the qmake variable name for the mime type //! Note: Only used for adding. //! -QString Qt4PriFileNode::varNameForAdding(const QString &mimeType) +QString QmakePriFileNode::varNameForAdding(const QString &mimeType) { if (mimeType == QLatin1String(ProjectExplorer::Constants::CPP_HEADER_MIMETYPE) || mimeType == QLatin1String(ProjectExplorer::Constants::C_HEADER_MIMETYPE)) { @@ -1305,11 +1309,11 @@ QString Qt4PriFileNode::varNameForAdding(const QString &mimeType) } //! -//! \brief Qt4PriFileNode::varNamesForRemoving +//! \brief QmakePriFileNode::varNamesForRemoving //! \return all qmake variables which are displayed in the project tree //! Note: Only used for removing. //! -QStringList Qt4PriFileNode::varNamesForRemoving() +QStringList QmakePriFileNode::varNamesForRemoving() { QStringList vars; vars << QLatin1String("HEADERS"); @@ -1325,7 +1329,7 @@ QStringList Qt4PriFileNode::varNamesForRemoving() return vars; } -QStringList Qt4PriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, +QStringList QmakePriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, QtSupport::BaseQtVersion *qtVersion) { QStringList result; @@ -1360,7 +1364,7 @@ QStringList Qt4PriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExac return result; } -QSet<Utils::FileName> Qt4PriFileNode::filterFilesProVariables(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files) +QSet<Utils::FileName> QmakePriFileNode::filterFilesProVariables(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files) { if (fileType != ProjectExplorer::QMLType && fileType != ProjectExplorer::UnknownFileType) return files; @@ -1377,7 +1381,7 @@ QSet<Utils::FileName> Qt4PriFileNode::filterFilesProVariables(ProjectExplorer::F return result; } -QSet<Utils::FileName> Qt4PriFileNode::filterFilesRecursiveEnumerata(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files) +QSet<Utils::FileName> QmakePriFileNode::filterFilesRecursiveEnumerata(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files) { QSet<Utils::FileName> result; if (fileType != ProjectExplorer::QMLType && fileType != ProjectExplorer::UnknownFileType) @@ -1396,7 +1400,7 @@ QSet<Utils::FileName> Qt4PriFileNode::filterFilesRecursiveEnumerata(ProjectExplo } // namespace QmakeProjectManager -static Qt4ProjectType proFileTemplateTypeToProjectType(ProFileEvaluator::TemplateType type) +static QmakeProjectType proFileTemplateTypeToProjectType(ProFileEvaluator::TemplateType type) { switch (type) { case ProFileEvaluator::TT_Unknown: @@ -1434,40 +1438,40 @@ namespace { }; } -Qt4NodesWatcher::Qt4NodesWatcher(QObject *parent) +QmakeNodesWatcher::QmakeNodesWatcher(QObject *parent) : NodesWatcher(parent) { } -const Qt4ProFileNode *Qt4ProFileNode::findProFileFor(const QString &fileName) const +const QmakeProFileNode *QmakeProFileNode::findProFileFor(const QString &fileName) const { if (fileName == path()) return this; foreach (ProjectNode *pn, subProjectNodes()) - if (Qt4ProFileNode *qt4ProFileNode = qobject_cast<Qt4ProFileNode *>(pn)) - if (const Qt4ProFileNode *result = qt4ProFileNode->findProFileFor(fileName)) + if (QmakeProFileNode *qmakeProFileNode = qobject_cast<QmakeProFileNode *>(pn)) + if (const QmakeProFileNode *result = qmakeProFileNode->findProFileFor(fileName)) return result; return 0; } -QString Qt4ProFileNode::makefile() const +QString QmakeProFileNode::makefile() const { return singleVariableValue(Makefile); } -QString Qt4ProFileNode::objectExtension() const +QString QmakeProFileNode::objectExtension() const { if (m_varValues[ObjectExt].isEmpty()) return Utils::HostOsInfo::isWindowsHost() ? QLatin1String(".obj") : QLatin1String(".o"); return m_varValues[ObjectExt].first(); } -QString Qt4ProFileNode::objectsDirectory() const +QString QmakeProFileNode::objectsDirectory() const { return singleVariableValue(ObjectsDir); } -QByteArray Qt4ProFileNode::cxxDefines() const +QByteArray QmakeProFileNode::cxxDefines() const { QByteArray result; foreach (const QString &def, variableValue(DefinesVar)) { @@ -1488,19 +1492,19 @@ QByteArray Qt4ProFileNode::cxxDefines() const return result; } -bool Qt4ProFileNode::isDeployable() const +bool QmakeProFileNode::isDeployable() const { return m_isDeployable; } /*! - \class Qt4ProFileNode + \class QmakeProFileNode Implements abstract ProjectNode class */ -Qt4ProFileNode::Qt4ProFileNode(Qt4Project *project, +QmakeProFileNode::QmakeProFileNode(QmakeProject *project, const QString &filePath, QObject *parent) - : Qt4PriFileNode(project, this, filePath), + : QmakePriFileNode(project, this, filePath), m_validParse(false), m_parseInProgress(true), m_projectType(InvalidProject), @@ -1514,7 +1518,7 @@ Qt4ProFileNode::Qt4ProFileNode(Qt4Project *project, this, SLOT(applyAsyncEvaluate())); } -Qt4ProFileNode::~Qt4ProFileNode() +QmakeProFileNode::~QmakeProFileNode() { m_parseFutureWatcher.waitForFinished(); if (m_readerExact) { @@ -1524,127 +1528,127 @@ Qt4ProFileNode::~Qt4ProFileNode() } } -bool Qt4ProFileNode::isParent(Qt4ProFileNode *node) +bool QmakeProFileNode::isParent(QmakeProFileNode *node) { - while ((node = qobject_cast<Qt4ProFileNode *>(node->parentFolderNode()))) { + while ((node = qobject_cast<QmakeProFileNode *>(node->parentFolderNode()))) { if (node == this) return true; } return false; } -bool Qt4ProFileNode::hasBuildTargets() const +bool QmakeProFileNode::hasBuildTargets() const { return hasBuildTargets(projectType()); } -bool Qt4ProFileNode::hasBuildTargets(Qt4ProjectType projectType) const +bool QmakeProFileNode::hasBuildTargets(QmakeProjectType projectType) const { return (projectType == ApplicationTemplate || projectType == LibraryTemplate); } -bool Qt4ProFileNode::isDebugAndRelease() const +bool QmakeProFileNode::isDebugAndRelease() const { const QStringList configValues = m_varValues.value(ConfigVar); return configValues.contains(QLatin1String("debug_and_release")); } -Qt4ProjectType Qt4ProFileNode::projectType() const +QmakeProjectType QmakeProFileNode::projectType() const { return m_projectType; } -QStringList Qt4ProFileNode::variableValue(const Qt4Variable var) const +QStringList QmakeProFileNode::variableValue(const QmakeVariable var) const { return m_varValues.value(var); } -QString Qt4ProFileNode::singleVariableValue(const Qt4Variable var) const +QString QmakeProFileNode::singleVariableValue(const QmakeVariable var) const { const QStringList &values = variableValue(var); return values.isEmpty() ? QString() : values.first(); } -QHash<QString, QString> Qt4ProFileNode::uiFiles() const +QHash<QString, QString> QmakeProFileNode::uiFiles() const { return m_uiFiles; } -void Qt4ProFileNode::emitProFileUpdatedRecursive() +void QmakeProFileNode::emitProFileUpdatedRecursive() { foreach (ProjectExplorer::NodesWatcher *watcher, watchers()) - if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher)) - emit qt4Watcher->proFileUpdated(this, m_validParse, m_parseInProgress); + if (Internal::QmakeNodesWatcher *qmakeWatcher = qobject_cast<Internal::QmakeNodesWatcher*>(watcher)) + emit qmakeWatcher->proFileUpdated(this, m_validParse, m_parseInProgress); foreach (ProjectNode *subNode, subProjectNodes()) { - if (Qt4ProFileNode *node = qobject_cast<Qt4ProFileNode *>(subNode)) + if (QmakeProFileNode *node = qobject_cast<QmakeProFileNode *>(subNode)) node->emitProFileUpdatedRecursive(); } } -void Qt4ProFileNode::setParseInProgressRecursive(bool b) +void QmakeProFileNode::setParseInProgressRecursive(bool b) { setParseInProgress(b); foreach (ProjectNode *subNode, subProjectNodes()) { - if (Qt4ProFileNode *node = qobject_cast<Qt4ProFileNode *>(subNode)) + if (QmakeProFileNode *node = qobject_cast<QmakeProFileNode *>(subNode)) node->setParseInProgressRecursive(b); } } -void Qt4ProFileNode::setParseInProgress(bool b) +void QmakeProFileNode::setParseInProgress(bool b) { if (m_parseInProgress == b) return; m_parseInProgress = b; foreach (ProjectExplorer::NodesWatcher *watcher, watchers()) - if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher)) - emit qt4Watcher->proFileUpdated(this, m_validParse, m_parseInProgress); + if (Internal::QmakeNodesWatcher *qmakeWatcher = qobject_cast<Internal::QmakeNodesWatcher*>(watcher)) + emit qmakeWatcher->proFileUpdated(this, m_validParse, m_parseInProgress); } -void Qt4ProFileNode::setValidParseRecursive(bool b) +void QmakeProFileNode::setValidParseRecursive(bool b) { setValidParse(b); foreach (ProjectNode *subNode, subProjectNodes()) { - if (Qt4ProFileNode *node = qobject_cast<Qt4ProFileNode *>(subNode)) + if (QmakeProFileNode *node = qobject_cast<QmakeProFileNode *>(subNode)) node->setValidParseRecursive(b); } } // Do note the absence of signal emission, always set validParse // before setParseInProgress, as that will emit the signals -void Qt4ProFileNode::setValidParse(bool b) +void QmakeProFileNode::setValidParse(bool b) { if (m_validParse == b) return; m_validParse = b; } -bool Qt4ProFileNode::validParse() const +bool QmakeProFileNode::validParse() const { return m_validParse; } -bool Qt4ProFileNode::parseInProgress() const +bool QmakeProFileNode::parseInProgress() const { return m_parseInProgress; } -void Qt4ProFileNode::scheduleUpdate() +void QmakeProFileNode::scheduleUpdate() { setParseInProgressRecursive(true); m_project->scheduleAsyncUpdate(this); } -void Qt4ProFileNode::asyncUpdate() +void QmakeProFileNode::asyncUpdate() { m_project->incrementPendingEvaluateFutures(); setupReader(); m_parseFutureWatcher.waitForFinished(); - QFuture<EvalResult> future = QtConcurrent::run(&Qt4ProFileNode::asyncEvaluate, this); + QFuture<EvalResult> future = QtConcurrent::run(&QmakeProFileNode::asyncEvaluate, this); m_parseFutureWatcher.setFuture(future); } -void Qt4ProFileNode::update() +void QmakeProFileNode::update() { setParseInProgressRecursive(true); setupReader(); @@ -1652,7 +1656,7 @@ void Qt4ProFileNode::update() applyEvaluate(evalResult, false); } -void Qt4ProFileNode::setupReader() +void QmakeProFileNode::setupReader() { Q_ASSERT(!m_readerExact); Q_ASSERT(!m_readerCumulative); @@ -1663,7 +1667,7 @@ void Qt4ProFileNode::setupReader() m_readerCumulative->setCumulative(true); } -Qt4ProFileNode::EvalResult Qt4ProFileNode::evaluate() +QmakeProFileNode::EvalResult QmakeProFileNode::evaluate() { EvalResult evalResult = EvalOk; if (ProFile *pro = m_readerExact->parsedProFile(m_projectFilePath)) { @@ -1678,13 +1682,13 @@ Qt4ProFileNode::EvalResult Qt4ProFileNode::evaluate() return evalResult; } -void Qt4ProFileNode::asyncEvaluate(QFutureInterface<EvalResult> &fi) +void QmakeProFileNode::asyncEvaluate(QFutureInterface<EvalResult> &fi) { EvalResult evalResult = evaluate(); fi.reportResult(evalResult); } -void Qt4ProFileNode::applyAsyncEvaluate() +void QmakeProFileNode::applyAsyncEvaluate() { applyEvaluate(m_parseFutureWatcher.result(), true); m_project->decrementPendingEvaluateFutures(); @@ -1695,7 +1699,7 @@ bool sortByNodes(Node *a, Node *b) return a->path() < b->path(); } -void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) +void QmakeProFileNode::applyEvaluate(EvalResult evalResult, bool async) { if (!m_readerExact) return; @@ -1708,7 +1712,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) setParseInProgressRecursive(false); if (evalResult == EvalFail) { - Qt4Project::proFileParseError(tr("Error while parsing file %1. Giving up.").arg(m_projectFilePath)); + QmakeProject::proFileParseError(tr("Error while parsing file %1. Giving up.").arg(m_projectFilePath)); if (m_projectType == InvalidProject) return; @@ -1718,29 +1722,29 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) removeFolderNodes(subFolderNodes(), this); // change project type - Qt4ProjectType oldType = m_projectType; + QmakeProjectType oldType = m_projectType; m_projectType = InvalidProject; foreach (ProjectExplorer::NodesWatcher *watcher, watchers()) - if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher)) - emit qt4Watcher->projectTypeChanged(this, oldType, InvalidProject); + if (Internal::QmakeNodesWatcher *qmakeWatcher = qobject_cast<Internal::QmakeNodesWatcher*>(watcher)) + emit qmakeWatcher->projectTypeChanged(this, oldType, InvalidProject); } return; } if (debug) - qDebug() << "Qt4ProFileNode - updating files for file " << m_projectFilePath; + qDebug() << "QmakeProFileNode - updating files for file " << m_projectFilePath; - Qt4ProjectType projectType = proFileTemplateTypeToProjectType( + QmakeProjectType projectType = proFileTemplateTypeToProjectType( (evalResult == EvalOk ? m_readerExact : m_readerCumulative)->templateType()); if (projectType != m_projectType) { - Qt4ProjectType oldType = m_projectType; + QmakeProjectType oldType = m_projectType; // probably all subfiles/projects have changed anyway // delete files && folders && projects foreach (ProjectNode *projectNode, subProjectNodes()) { - if (Qt4ProFileNode *qt4ProFileNode = qobject_cast<Qt4ProFileNode *>(projectNode)) { - qt4ProFileNode->setValidParseRecursive(false); - qt4ProFileNode->setParseInProgressRecursive(false); + if (QmakeProFileNode *qmakeProFileNode = qobject_cast<QmakeProFileNode *>(projectNode)) { + qmakeProFileNode->setValidParseRecursive(false); + qmakeProFileNode->setParseInProgressRecursive(false); } } @@ -1761,8 +1765,8 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) // really emit here? or at the end? Nobody is connected to this signal at the moment // so we kind of can ignore that question for now foreach (ProjectExplorer::NodesWatcher *watcher, watchers()) - if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher)) - emit qt4Watcher->projectTypeChanged(this, oldType, projectType); + if (Internal::QmakeNodesWatcher *qmakeWatcher = qobject_cast<Internal::QmakeNodesWatcher*>(watcher)) + emit qmakeWatcher->projectTypeChanged(this, oldType, projectType); } // @@ -1877,14 +1881,14 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) ProFile *fileExact = includeFilesExact.value((*existingIt)->path()); ProFile *fileCumlative = includeFilesCumlative.value((*existingIt)->path()); if (fileExact || fileCumlative) { - Qt4PriFileNode *priFileNode = static_cast<Qt4PriFileNode *>(*existingIt); + QmakePriFileNode *priFileNode = static_cast<QmakePriFileNode *>(*existingIt); priFileNode->update(fileExact, m_readerExact, fileCumlative, m_readerCumulative); priFileNode->setIncludedInExactParse(fileExact != 0 && includedInExactParse()); } else { // We always parse exactly, because we later when async parsing don't know whether // the .pro file is included in this .pro file // So to compare that later parse with the sync one - Qt4ProFileNode *proFileNode = static_cast<Qt4ProFileNode *>(*existingIt); + QmakeProFileNode *proFileNode = static_cast<QmakeProFileNode *>(*existingIt); proFileNode->setIncludedInExactParse(exactSubdirs.contains(proFileNode->path()) && includedInExactParse()); if (async) proFileNode->asyncUpdate(); @@ -1904,7 +1908,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) bool loop = false; ProjectExplorer::Node *n = this; while ((n = n->parentFolderNode())) { - if (qobject_cast<Qt4PriFileNode *>(n) && n->path() == nodeToAdd) { + if (qobject_cast<QmakePriFileNode *>(n) && n->path() == nodeToAdd) { loop = true; break; } @@ -1913,28 +1917,28 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) if (loop) { // Do nothing } else if (fileExact || fileCumlative) { - Qt4PriFileNode *qt4PriFileNode = new Qt4PriFileNode(m_project, this, nodeToAdd); - qt4PriFileNode->setParentFolderNode(this); // Needed for loop detection - qt4PriFileNode->setIncludedInExactParse(fileExact != 0 && includedInExactParse()); - qt4PriFileNode->update(fileExact, m_readerExact, fileCumlative, m_readerCumulative); - toAdd << qt4PriFileNode; + QmakePriFileNode *qmakePriFileNode = new QmakePriFileNode(m_project, this, nodeToAdd); + qmakePriFileNode->setParentFolderNode(this); // Needed for loop detection + qmakePriFileNode->setIncludedInExactParse(fileExact != 0 && includedInExactParse()); + qmakePriFileNode->update(fileExact, m_readerExact, fileCumlative, m_readerCumulative); + toAdd << qmakePriFileNode; } else { - Qt4ProFileNode *qt4ProFileNode = new Qt4ProFileNode(m_project, nodeToAdd); - qt4ProFileNode->setParentFolderNode(this); // Needed for loop detection - qt4ProFileNode->setIncludedInExactParse(exactSubdirs.contains(qt4ProFileNode->path()) && includedInExactParse()); + QmakeProFileNode *qmakeProFileNode = new QmakeProFileNode(m_project, nodeToAdd); + qmakeProFileNode->setParentFolderNode(this); // Needed for loop detection + qmakeProFileNode->setIncludedInExactParse(exactSubdirs.contains(qmakeProFileNode->path()) && includedInExactParse()); if (async) - qt4ProFileNode->asyncUpdate(); + qmakeProFileNode->asyncUpdate(); else - qt4ProFileNode->update(); - toAdd << qt4ProFileNode; + qmakeProFileNode->update(); + toAdd << qmakeProFileNode; } } } // for foreach (ProjectNode *node, toRemove) { - if (Qt4ProFileNode *qt4ProFileNode = qobject_cast<Qt4ProFileNode *>(node)) { - qt4ProFileNode->setValidParseRecursive(false); - qt4ProFileNode->setParseInProgressRecursive(false); + if (QmakeProFileNode *qmakeProFileNode = qobject_cast<QmakeProFileNode *>(node)) { + qmakeProFileNode->setValidParseRecursive(false); + qmakeProFileNode->setParseInProgressRecursive(false); } } @@ -1943,13 +1947,13 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) if (!toAdd.isEmpty()) addProjectNodes(toAdd); - Qt4PriFileNode::update(fileForCurrentProjectExact, m_readerExact, fileForCurrentProjectCumlative, m_readerCumulative); + QmakePriFileNode::update(fileForCurrentProjectExact, m_readerExact, fileForCurrentProjectCumlative, m_readerCumulative); m_validParse = (evalResult == EvalOk); if (m_validParse) { // update TargetInformation - m_qt4targetInformation = targetInformation(m_readerExact); + m_qmakeTargetInformation = targetInformation(m_readerExact); m_resolvedMkspecPath = m_readerExact->resolvedMkSpec(); m_subProjectsNotToDeploy = subProjectsNotToDeploy; @@ -1957,7 +1961,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) QString buildDirectory = buildDir(); // update other variables - QHash<Qt4Variable, QStringList> newVarValues; + QHash<QmakeVariable, QStringList> newVarValues; newVarValues[DefinesVar] = m_readerExact->values(QLatin1String("DEFINES")); newVarValues[IncludePathVar] = includePaths(m_readerExact); @@ -2014,12 +2018,12 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) } if (m_varValues != newVarValues) { - Qt4VariablesHash oldValues = m_varValues; + QmakeVariablesHash oldValues = m_varValues; m_varValues = newVarValues; foreach (ProjectExplorer::NodesWatcher *watcher, watchers()) - if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher)) - emit qt4Watcher->variablesChanged(this, oldValues, m_varValues); + if (Internal::QmakeNodesWatcher *qmakeWatcher = qobject_cast<Internal::QmakeNodesWatcher*>(watcher)) + emit qmakeWatcher->variablesChanged(this, oldValues, m_varValues); } } // evalResult == EvalOk @@ -2034,7 +2038,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) m_readerCumulative = 0; } -QStringList Qt4ProFileNode::fileListForVar(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, +QStringList QmakeProFileNode::fileListForVar(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, const QString &varName, const QString &projectDir, const QString &buildDir) const { QStringList baseVPathsExact = baseVPaths(readerExact, projectDir, buildDir); @@ -2057,7 +2061,7 @@ QStringList Qt4ProFileNode::fileListForVar(QtSupport::ProFileReader *readerExact return result; } -QString Qt4ProFileNode::uiDirPath(QtSupport::ProFileReader *reader) const +QString QmakeProFileNode::uiDirPath(QtSupport::ProFileReader *reader) const { QString path = reader->value(QLatin1String("UI_DIR")); if (QFileInfo(path).isRelative()) @@ -2065,7 +2069,7 @@ QString Qt4ProFileNode::uiDirPath(QtSupport::ProFileReader *reader) const return path; } -QString Qt4ProFileNode::mocDirPath(QtSupport::ProFileReader *reader) const +QString QmakeProFileNode::mocDirPath(QtSupport::ProFileReader *reader) const { QString path = reader->value(QLatin1String("MOC_DIR")); if (QFileInfo(path).isRelative()) @@ -2073,7 +2077,7 @@ QString Qt4ProFileNode::mocDirPath(QtSupport::ProFileReader *reader) const return path; } -QStringList Qt4ProFileNode::includePaths(QtSupport::ProFileReader *reader) const +QStringList QmakeProFileNode::includePaths(QtSupport::ProFileReader *reader) const { QStringList paths; foreach (const QString &cxxflags, m_readerExact->values(QLatin1String("QMAKE_CXXFLAGS"))) { @@ -2093,7 +2097,7 @@ QStringList Qt4ProFileNode::includePaths(QtSupport::ProFileReader *reader) const return paths; } -QStringList Qt4ProFileNode::libDirectories(QtSupport::ProFileReader *reader) const +QStringList QmakeProFileNode::libDirectories(QtSupport::ProFileReader *reader) const { QStringList result; foreach (const QString &str, reader->values(QLatin1String("LIBS"))) { @@ -2103,7 +2107,7 @@ QStringList Qt4ProFileNode::libDirectories(QtSupport::ProFileReader *reader) con return result; } -QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy, +QStringList QmakeProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy, bool silent) const { QStringList subProjectPaths; @@ -2148,7 +2152,7 @@ QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStri } } else { if (!silent) - Qt4Project::proFileParseError(tr("Could not find .pro file for sub dir '%1' in '%2'") + QmakeProject::proFileParseError(tr("Could not find .pro file for sub dir '%1' in '%2'") .arg(subDirVar).arg(realDir)); } } @@ -2157,7 +2161,7 @@ QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStri return subProjectPaths; } -TargetInformation Qt4ProFileNode::targetInformation(QtSupport::ProFileReader *reader) const +TargetInformation QmakeProFileNode::targetInformation(QtSupport::ProFileReader *reader) const { TargetInformation result; if (!reader) @@ -2215,17 +2219,17 @@ TargetInformation Qt4ProFileNode::targetInformation(QtSupport::ProFileReader *re return result; } -TargetInformation Qt4ProFileNode::targetInformation() const +TargetInformation QmakeProFileNode::targetInformation() const { - return m_qt4targetInformation; + return m_qmakeTargetInformation; } -QString Qt4ProFileNode::resolvedMkspecPath() const +QString QmakeProFileNode::resolvedMkspecPath() const { return m_resolvedMkspecPath; } -void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader) +void QmakeProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader) { m_installsList.clear(); if (!reader) @@ -2268,36 +2272,36 @@ void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader) } } -InstallsList Qt4ProFileNode::installsList() const +InstallsList QmakeProFileNode::installsList() const { return m_installsList; } -QString Qt4ProFileNode::sourceDir() const +QString QmakeProFileNode::sourceDir() const { return m_projectDir; } -QString Qt4ProFileNode::buildDir(Qt4BuildConfiguration *bc) const +QString QmakeProFileNode::buildDir(QmakeBuildConfiguration *bc) const { - const QDir srcDirRoot = m_project->rootQt4ProjectNode()->sourceDir(); + const QDir srcDirRoot = m_project->rootQmakeProjectNode()->sourceDir(); const QString relativeDir = srcDirRoot.relativeFilePath(m_projectDir); if (!bc && m_project->activeTarget()) - bc = static_cast<Qt4BuildConfiguration *>(m_project->activeTarget()->activeBuildConfiguration()); + bc = static_cast<QmakeBuildConfiguration *>(m_project->activeTarget()->activeBuildConfiguration()); if (!bc) return QString(); return QDir::cleanPath(QDir(bc->buildDirectory().toString()).absoluteFilePath(relativeDir)); } -QString Qt4ProFileNode::uiDirectory() const +QString QmakeProFileNode::uiDirectory() const { - const Qt4VariablesHash::const_iterator it = m_varValues.constFind(UiDirVar); + const QmakeVariablesHash::const_iterator it = m_varValues.constFind(UiDirVar); if (it != m_varValues.constEnd() && !it.value().isEmpty()) return it.value().front(); return buildDir(); } -QString Qt4ProFileNode::uiHeaderFile(const QString &uiDir, const QString &formFile) +QString QmakeProFileNode::uiHeaderFile(const QString &uiDir, const QString &formFile) { QString uiHeaderFilePath = uiDir; uiHeaderFilePath += QLatin1String("/ui_"); @@ -2306,7 +2310,7 @@ QString Qt4ProFileNode::uiHeaderFile(const QString &uiDir, const QString &formFi return QDir::cleanPath(uiHeaderFilePath); } -void Qt4ProFileNode::updateUiFiles() +void QmakeProFileNode::updateUiFiles() { m_uiFiles.clear(); diff --git a/src/plugins/qt4projectmanager/qmakenodes.h b/src/plugins/qmakeprojectmanager/qmakenodes.h index 3f83c72712..ba536363ae 100644 --- a/src/plugins/qt4projectmanager/qmakenodes.h +++ b/src/plugins/qmakeprojectmanager/qmakenodes.h @@ -64,12 +64,12 @@ class Project; } namespace QmakeProjectManager { -class Qt4BuildConfiguration; -class Qt4ProFileNode; -class Qt4Project; +class QmakeBuildConfiguration; +class QmakeProFileNode; +class QmakeProject; // Type of projects -enum Qt4ProjectType { +enum QmakeProjectType { InvalidProject = 0, ApplicationTemplate, LibraryTemplate, @@ -79,7 +79,7 @@ enum Qt4ProjectType { }; // Other variables of interest -enum Qt4Variable { +enum QmakeVariable { DefinesVar = 1, IncludePathVar, CppFlagsVar, @@ -130,18 +130,18 @@ using ProjectExplorer::ProjectFileType; using ProjectExplorer::FileType; namespace Internal { -class Qt4PriFile; +class QmakePriFile; struct InternalNode; } -// Implements ProjectNode for qt4 pro files -class QT4PROJECTMANAGER_EXPORT Qt4PriFileNode : public ProjectExplorer::ProjectNode +// Implements ProjectNode for qmake .pri files +class QMAKEPROJECTMANAGER_EXPORT QmakePriFileNode : public ProjectExplorer::ProjectNode { Q_OBJECT public: - Qt4PriFileNode(Qt4Project *project, Qt4ProFileNode* qt4ProFileNode, const QString &filePath); - ~Qt4PriFileNode(); + QmakePriFileNode(QmakeProject *project, QmakeProFileNode *qmakeProFileNode, const QString &filePath); + ~QmakePriFileNode(); void update(ProFile *includeFileExact, QtSupport::ProFileReader *readerExact, ProFile *includeFileCumlative, QtSupport::ProFileReader *readerCumalative); @@ -168,7 +168,8 @@ public: bool deploysFolder(const QString &folder) const; QList<ProjectExplorer::RunConfiguration *> runConfigurationsFor(Node *node); - QList<Qt4PriFileNode*> subProjectNodesExact() const; + QmakeProFileNode *proFileNode() const; + QList<QmakePriFileNode*> subProjectNodesExact() const; // Set by parent bool includedInExactParse() const; @@ -207,13 +208,13 @@ private: QStringList fullVPaths(const QStringList &baseVPaths, QtSupport::ProFileReader *reader, const QString &qmakeVariable, const QString &projectDir) const; void watchFolders(const QSet<QString> &folders); - Qt4Project *m_project; - Qt4ProFileNode *m_qt4ProFileNode; + QmakeProject *m_project; + QmakeProFileNode *m_qmakeProFileNode; QString m_projectFilePath; QString m_projectDir; QMap<QString, QtSupport::UiCodeModelSupport *> m_uiCodeModelSupport; - Internal::Qt4PriFile *m_qt4PriFile; + Internal::QmakePriFile *m_qmakePriFile; // Memory is cheap... QMap<ProjectExplorer::FileType, QSet<Utils::FileName> > m_files; @@ -221,19 +222,19 @@ private: QSet<QString> m_watchedFolders; bool m_includedInExactParse; - // managed by Qt4ProFileNode - friend class QmakeProjectManager::Qt4ProFileNode; - friend class Internal::Qt4PriFile; // for scheduling updates on modified + // managed by QmakeProFileNode + friend class QmakeProjectManager::QmakeProFileNode; + friend class Internal::QmakePriFile; // for scheduling updates on modified // internal temporary subtree representation friend struct Internal::InternalNode; }; namespace Internal { -class Qt4PriFile : public Core::IDocument +class QmakePriFile : public Core::IDocument { Q_OBJECT public: - Qt4PriFile(Qt4PriFileNode *qt4PriFile); + QmakePriFile(QmakePriFileNode *qmakePriFile); virtual bool save(QString *errorString, const QString &fileName, bool autoSave); virtual QString defaultPath() const; @@ -247,31 +248,31 @@ public: bool reload(QString *errorString, ReloadFlag flag, ChangeType type); private: - Qt4PriFileNode *m_priFile; + QmakePriFileNode *m_priFile; }; -class Qt4NodesWatcher : public ProjectExplorer::NodesWatcher +class QmakeNodesWatcher : public ProjectExplorer::NodesWatcher { Q_OBJECT public: - Qt4NodesWatcher(QObject *parent = 0); + QmakeNodesWatcher(QObject *parent = 0); signals: - void projectTypeChanged(QmakeProjectManager::Qt4ProFileNode *projectNode, - const QmakeProjectManager::Qt4ProjectType oldType, - const QmakeProjectManager::Qt4ProjectType newType); + void projectTypeChanged(QmakeProjectManager::QmakeProFileNode *projectNode, + const QmakeProjectManager::QmakeProjectType oldType, + const QmakeProjectManager::QmakeProjectType newType); - void variablesChanged(Qt4ProFileNode *projectNode, - const QHash<Qt4Variable, QStringList> &oldValues, - const QHash<Qt4Variable, QStringList> &newValues); + void variablesChanged(QmakeProFileNode *projectNode, + const QHash<QmakeVariable, QStringList> &oldValues, + const QHash<QmakeVariable, QStringList> &newValues); - void proFileUpdated(QmakeProjectManager::Qt4ProFileNode *projectNode, bool success, bool parseInProgress); + void proFileUpdated(QmakeProjectManager::QmakeProFileNode *projectNode, bool success, bool parseInProgress); private: // let them emit signals - friend class QmakeProjectManager::Qt4ProFileNode; - friend class Qt4PriFileNode; + friend class QmakeProjectManager::QmakeProFileNode; + friend class QmakePriFileNode; }; class ProVirtualFolderNode : public ProjectExplorer::VirtualFolderNode @@ -299,7 +300,7 @@ private: } // namespace Internal -class QT4PROJECTMANAGER_EXPORT TargetInformation +class QMAKEPROJECTMANAGER_EXPORT TargetInformation { public: bool valid; @@ -335,56 +336,56 @@ public: }; -struct QT4PROJECTMANAGER_EXPORT InstallsItem { +struct QMAKEPROJECTMANAGER_EXPORT InstallsItem { InstallsItem(QString p, QStringList f) : path(p), files(f) {} QString path; QStringList files; }; -struct QT4PROJECTMANAGER_EXPORT InstallsList { +struct QMAKEPROJECTMANAGER_EXPORT InstallsList { void clear() { targetPath.clear(); items.clear(); } QString targetPath; QList<InstallsItem> items; }; -struct QT4PROJECTMANAGER_EXPORT ProjectVersion { +struct QMAKEPROJECTMANAGER_EXPORT ProjectVersion { int major; int minor; int patch; }; -// Implements ProjectNode for qt4 pro files -class QT4PROJECTMANAGER_EXPORT Qt4ProFileNode : public Qt4PriFileNode +// Implements ProjectNode for qmake .pro files +class QMAKEPROJECTMANAGER_EXPORT QmakeProFileNode : public QmakePriFileNode { Q_OBJECT public: - Qt4ProFileNode(Qt4Project *project, + QmakeProFileNode(QmakeProject *project, const QString &filePath, QObject *parent = 0); - ~Qt4ProFileNode(); + ~QmakeProFileNode(); - bool isParent(Qt4ProFileNode *node); + bool isParent(QmakeProFileNode *node); bool hasBuildTargets() const; - Qt4ProjectType projectType() const; + QmakeProjectType projectType() const; - QStringList variableValue(const Qt4Variable var) const; - QString singleVariableValue(const Qt4Variable var) const; + QStringList variableValue(const QmakeVariable var) const; + QString singleVariableValue(const QmakeVariable var) const; bool isSubProjectDeployable(const QString &filePath) const { return !m_subProjectsNotToDeploy.contains(filePath); } QString sourceDir() const; - QString buildDir(Qt4BuildConfiguration *bc = 0) const; + QString buildDir(QmakeBuildConfiguration *bc = 0) const; QString uiDirectory() const; static QString uiHeaderFile(const QString &uiDir, const QString &formFile); QHash<QString, QString> uiFiles() const; - const Qt4ProFileNode *findProFileFor(const QString &string) const; + const QmakeProFileNode *findProFileFor(const QString &string) const; TargetInformation targetInformation() const; InstallsList installsList() const; @@ -402,7 +403,7 @@ public: bool validParse() const; bool parseInProgress() const; - bool hasBuildTargets(Qt4ProjectType projectType) const; + bool hasBuildTargets(QmakeProjectType projectType) const; bool isDebugAndRelease() const; void setParseInProgress(bool b); @@ -424,7 +425,7 @@ private: void asyncEvaluate(QFutureInterface<EvalResult> &fi); - typedef QHash<Qt4Variable, QStringList> Qt4VariablesHash; + typedef QHash<QmakeVariable, QStringList> QmakeVariablesHash; void updateUiFiles(); @@ -444,15 +445,14 @@ private: bool m_validParse; bool m_parseInProgress; - Qt4ProjectType m_projectType; - Qt4VariablesHash m_varValues; + QmakeProjectType m_projectType; + QmakeVariablesHash m_varValues; QMap<QString, QDateTime> m_uitimestamps; - TargetInformation m_qt4targetInformation; + TargetInformation m_qmakeTargetInformation; QString m_resolvedMkspecPath; QStringList m_subProjectsNotToDeploy; InstallsList m_installsList; - friend class Qt4NodeHierarchy; QHash<QString, QString> m_uiFiles; // ui-file path, ui header path diff --git a/src/plugins/qt4projectmanager/qmakeparser.cpp b/src/plugins/qmakeprojectmanager/qmakeparser.cpp index 7c10fb60e1..a64c4c9f61 100644 --- a/src/plugins/qt4projectmanager/qmakeparser.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparser.cpp @@ -94,7 +94,7 @@ void QMakeParser::stdError(const QString &line) using namespace QmakeProjectManager::Internal; using namespace ProjectExplorer; -void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data() +void QmakeProjectManagerPlugin::testQmakeOutputParsers_data() { const Core::Id categoryBuildSystem = Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM); QTest::addColumn<QString>("input"); @@ -162,7 +162,7 @@ void Qt4ProjectManagerPlugin::testQmakeOutputParsers_data() << QString(); } -void Qt4ProjectManagerPlugin::testQmakeOutputParsers() +void QmakeProjectManagerPlugin::testQmakeOutputParsers() { OutputParserTester testbench; testbench.appendOutputParser(new QMakeParser); diff --git a/src/plugins/qt4projectmanager/qmakeparser.h b/src/plugins/qmakeprojectmanager/qmakeparser.h index 90a09db4a4..e37ee76791 100644 --- a/src/plugins/qt4projectmanager/qmakeparser.h +++ b/src/plugins/qmakeprojectmanager/qmakeparser.h @@ -38,7 +38,7 @@ namespace QmakeProjectManager { -class QT4PROJECTMANAGER_EXPORT QMakeParser : public ProjectExplorer::IOutputParser +class QMAKEPROJECTMANAGER_EXPORT QMakeParser : public ProjectExplorer::IOutputParser { Q_OBJECT diff --git a/src/plugins/qt4projectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 2dabee6107..75419b2af6 100644 --- a/src/plugins/qt4projectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -76,11 +76,11 @@ enum { debug = 0 }; namespace { -Qt4BuildConfiguration *enableActiveQt4BuildConfiguration(ProjectExplorer::Target *t, bool enabled) +QmakeBuildConfiguration *enableActiveQmakeBuildConfiguration(ProjectExplorer::Target *t, bool enabled) { if (!t) return 0; - Qt4BuildConfiguration *bc = static_cast<Qt4BuildConfiguration *>(t->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = static_cast<QmakeBuildConfiguration *>(t->activeBuildConfiguration()); if (!bc) return 0; bc->setEnabled(enabled); @@ -92,12 +92,12 @@ void updateBoilerPlateCodeFiles(const AbstractMobileApp *app, const QString &pro const QList<AbstractGeneratedFileInfo> updates = app->fileUpdates(proFile); if (!updates.empty()) { - const QString title = Qt4Manager::tr("Update of Generated Files"); + const QString title = QmakeManager::tr("Update of Generated Files"); QStringList fileNames; foreach (const AbstractGeneratedFileInfo &info, updates) fileNames.append(QDir::toNativeSeparators(info.fileInfo.fileName())); const QString message = - Qt4Manager::tr("In project<br><br>%1<br><br>The following files are either " + QmakeManager::tr("In project<br><br>%1<br><br>The following files are either " "outdated or have been modified:<br><br>%2<br><br>Do you want " "Qt Creator to update the files? Any changes will be lost.") .arg(proFile, fileNames.join(QLatin1String(", "))); @@ -114,12 +114,12 @@ void updateBoilerPlateCodeFiles(const AbstractMobileApp *app, const QString &pro namespace QmakeProjectManager { namespace Internal { -class Qt4ProjectFile : public Core::IDocument +class QmakeProjectFile : public Core::IDocument { Q_OBJECT public: - Qt4ProjectFile(const QString &filePath, QObject *parent = 0); + QmakeProjectFile(const QString &filePath, QObject *parent = 0); bool save(QString *errorString, const QString &fileName, bool autoSave); @@ -137,7 +137,7 @@ private: const QString m_mimeType; }; -/// Watches folders for Qt4PriFile nodes +/// Watches folders for QmakePriFile nodes /// use one file system watcher to watch all folders /// such minimizing system ressouce usage @@ -145,10 +145,10 @@ class CentralizedFolderWatcher : public QObject { Q_OBJECT public: - CentralizedFolderWatcher(Qt4Project *parent); + CentralizedFolderWatcher(QmakeProject *parent); ~CentralizedFolderWatcher(); - void watchFolders(const QList<QString> &folders, QmakeProjectManager::Qt4PriFileNode *node); - void unwatchFolders(const QList<QString> &folders, QmakeProjectManager::Qt4PriFileNode *node); + void watchFolders(const QList<QString> &folders, QmakeProjectManager::QmakePriFileNode *node); + void unwatchFolders(const QList<QString> &folders, QmakeProjectManager::QmakePriFileNode *node); private slots: void folderChanged(const QString &folder); @@ -156,28 +156,28 @@ private slots: void delayedFolderChanged(const QString &folder); private: - Qt4Project *m_project; + QmakeProject *m_project; QSet<QString> recursiveDirs(const QString &folder); QFileSystemWatcher m_watcher; - QMultiMap<QString, QmakeProjectManager::Qt4PriFileNode *> m_map; + QMultiMap<QString, QmakeProjectManager::QmakePriFileNode *> m_map; QSet<QString> m_recursiveWatchedFolders; QTimer m_compressTimer; QSet<QString> m_changedFolders; }; -// Qt4ProjectFiles: Struct for (Cached) lists of files in a project -class Qt4ProjectFiles { +// QmakeProjectFiles: Struct for (Cached) lists of files in a project +class QmakeProjectFiles { public: void clear(); - bool equals(const Qt4ProjectFiles &f) const; + bool equals(const QmakeProjectFiles &f) const; QStringList files[ProjectExplorer::FileTypeSize]; QStringList generatedFiles[ProjectExplorer::FileTypeSize]; QStringList proFiles; }; -void Qt4ProjectFiles::clear() +void QmakeProjectFiles::clear() { for (int i = 0; i < FileTypeSize; ++i) { files[i].clear(); @@ -186,7 +186,7 @@ void Qt4ProjectFiles::clear() proFiles.clear(); } -bool Qt4ProjectFiles::equals(const Qt4ProjectFiles &f) const +bool QmakeProjectFiles::equals(const QmakeProjectFiles &f) const { for (int i = 0; i < FileTypeSize; ++i) if (files[i] != f.files[i] || generatedFiles[i] != f.generatedFiles[i]) @@ -196,43 +196,43 @@ bool Qt4ProjectFiles::equals(const Qt4ProjectFiles &f) const return true; } -inline bool operator==(const Qt4ProjectFiles &f1, const Qt4ProjectFiles &f2) +inline bool operator==(const QmakeProjectFiles &f1, const QmakeProjectFiles &f2) { return f1.equals(f2); } -inline bool operator!=(const Qt4ProjectFiles &f1, const Qt4ProjectFiles &f2) +inline bool operator!=(const QmakeProjectFiles &f1, const QmakeProjectFiles &f2) { return !f1.equals(f2); } -QDebug operator<<(QDebug d, const Qt4ProjectFiles &f) +QDebug operator<<(QDebug d, const QmakeProjectFiles &f) { QDebug nsp = d.nospace(); - nsp << "Qt4ProjectFiles: proFiles=" << f.proFiles << '\n'; + nsp << "QmakeProjectFiles: proFiles=" << f.proFiles << '\n'; for (int i = 0; i < FileTypeSize; ++i) nsp << "Type " << i << " files=" << f.files[i] << " generated=" << f.generatedFiles[i] << '\n'; return d; } -// A visitor to collect all files of a project in a Qt4ProjectFiles struct +// A visitor to collect all files of a project in a QmakeProjectFiles struct class ProjectFilesVisitor : public ProjectExplorer::NodesVisitor { - ProjectFilesVisitor(Qt4ProjectFiles *files); + ProjectFilesVisitor(QmakeProjectFiles *files); public: - static void findProjectFiles(Qt4ProFileNode *rootNode, Qt4ProjectFiles *files); + static void findProjectFiles(QmakeProFileNode *rootNode, QmakeProjectFiles *files); void visitProjectNode(ProjectNode *projectNode); void visitFolderNode(FolderNode *folderNode); private: - Qt4ProjectFiles *m_files; + QmakeProjectFiles *m_files; }; -ProjectFilesVisitor::ProjectFilesVisitor(Qt4ProjectFiles *files) : +ProjectFilesVisitor::ProjectFilesVisitor(QmakeProjectFiles *files) : m_files(files) { } -void ProjectFilesVisitor::findProjectFiles(Qt4ProFileNode *rootNode, Qt4ProjectFiles *files) +void ProjectFilesVisitor::findProjectFiles(QmakeProFileNode *rootNode, QmakeProjectFiles *files) { files->clear(); ProjectFilesVisitor visitor(files); @@ -265,54 +265,54 @@ void ProjectFilesVisitor::visitFolderNode(FolderNode *folderNode) } -// ----------- Qt4ProjectFile +// ----------- QmakeProjectFile namespace Internal { -Qt4ProjectFile::Qt4ProjectFile(const QString &filePath, QObject *parent) +QmakeProjectFile::QmakeProjectFile(const QString &filePath, QObject *parent) : Core::IDocument(parent), m_mimeType(QLatin1String(QmakeProjectManager::Constants::PROFILE_MIMETYPE)) { setFilePath(filePath); } -bool Qt4ProjectFile::save(QString *, const QString &, bool) +bool QmakeProjectFile::save(QString *, const QString &, bool) { // This is never used return false; } -QString Qt4ProjectFile::defaultPath() const +QString QmakeProjectFile::defaultPath() const { return QString(); } -QString Qt4ProjectFile::suggestedFileName() const +QString QmakeProjectFile::suggestedFileName() const { return QString(); } -QString Qt4ProjectFile::mimeType() const +QString QmakeProjectFile::mimeType() const { return m_mimeType; } -bool Qt4ProjectFile::isModified() const +bool QmakeProjectFile::isModified() const { return false; // we save after changing anyway } -bool Qt4ProjectFile::isSaveAsAllowed() const +bool QmakeProjectFile::isSaveAsAllowed() const { return false; } -Core::IDocument::ReloadBehavior Qt4ProjectFile::reloadBehavior(ChangeTrigger state, ChangeType type) const +Core::IDocument::ReloadBehavior QmakeProjectFile::reloadBehavior(ChangeTrigger state, ChangeType type) const { Q_UNUSED(state) Q_UNUSED(type) return BehaviorSilent; } -bool Qt4ProjectFile::reload(QString *errorString, ReloadFlag flag, ChangeType type) +bool QmakeProjectFile::reload(QString *errorString, ReloadFlag flag, ChangeType type) { Q_UNUSED(errorString) Q_UNUSED(flag) @@ -323,17 +323,17 @@ bool Qt4ProjectFile::reload(QString *errorString, ReloadFlag flag, ChangeType ty } // namespace Internal /*! - \class Qt4Project + \class QmakeProject - Qt4Project manages information about an individual Qt 4 (.pro) project file. + QmakeProject manages information about an individual Qt 4 (.pro) project file. */ -Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) : +QmakeProject::QmakeProject(QmakeManager *manager, const QString &fileName) : m_manager(manager), m_rootProjectNode(0), - m_nodesWatcher(new Internal::Qt4NodesWatcher(this)), - m_fileInfo(new Qt4ProjectFile(fileName, this)), - m_projectFiles(new Qt4ProjectFiles), + m_nodesWatcher(new Internal::QmakeNodesWatcher(this)), + m_fileInfo(new QmakeProjectFile(fileName, this)), + m_projectFiles(new QmakeProjectFiles), m_qmakeVfs(new QMakeVfs), m_qmakeGlobals(0), m_asyncUpdateFutureInterface(0), @@ -343,7 +343,7 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) : m_centralizedFolderWatcher(0), m_activeTarget(0) { - setId(Constants::QT4PROJECT_ID); + setId(Constants::QMAKEPROJECT_ID); setProjectContext(Core::Context(QmakeProjectManager::Constants::PROJECT_ID)); setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX)); @@ -355,7 +355,7 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) : SLOT(buildFinished(bool))); } -Qt4Project::~Qt4Project() +QmakeProject::~QmakeProject() { m_codeModelFuture.cancel(); m_asyncUpdateState = ShuttingDown; @@ -365,14 +365,14 @@ Qt4Project::~Qt4Project() m_cancelEvaluate = true; // Deleting the root node triggers a few things, make sure rootProjectNode // returns 0 already - Qt4ProFileNode *root = m_rootProjectNode; + QmakeProFileNode *root = m_rootProjectNode; m_rootProjectNode = 0; delete root; } -void Qt4Project::updateFileList() +void QmakeProject::updateFileList() { - Qt4ProjectFiles newFiles; + QmakeProjectFiles newFiles; ProjectFilesVisitor::findProjectFiles(m_rootProjectNode, &newFiles); if (newFiles != *m_projectFiles) { *m_projectFiles = newFiles; @@ -382,7 +382,7 @@ void Qt4Project::updateFileList() } } -bool Qt4Project::fromMap(const QVariantMap &map) +bool QmakeProject::fromMap(const QVariantMap &map) { if (!Project::fromMap(map)) return false; @@ -399,7 +399,7 @@ bool Qt4Project::fromMap(const QVariantMap &map) m_manager->registerProject(this); - m_rootProjectNode = new Qt4ProFileNode(this, m_fileInfo->filePath(), this); + m_rootProjectNode = new QmakeProFileNode(this, m_fileInfo->filePath(), this); m_rootProjectNode->registerWatcher(m_nodesWatcher); update(); @@ -408,8 +408,8 @@ bool Qt4Project::fromMap(const QVariantMap &map) updateCodeModels(); // We have the profile nodes now, so we know the runconfigs! - connect(m_nodesWatcher, SIGNAL(proFileUpdated(QmakeProjectManager::Qt4ProFileNode*,bool,bool)), - this, SIGNAL(proFileUpdated(QmakeProjectManager::Qt4ProFileNode*,bool,bool))); + connect(m_nodesWatcher, SIGNAL(proFileUpdated(QmakeProjectManager::QmakeProFileNode*,bool,bool)), + this, SIGNAL(proFileUpdated(QmakeProjectManager::QmakeProFileNode*,bool,bool))); // Now we emit update once :) m_rootProjectNode->emitProFileUpdatedRecursive(); @@ -427,7 +427,7 @@ bool Qt4Project::fromMap(const QVariantMap &map) QtQuickApp qtQuickApp; const Html5App html5App; - foreach (Qt4ProFileNode *node, applicationProFiles(Qt4Project::ExactAndCumulativeParse)) { + foreach (QmakeProFileNode *node, applicationProFiles(QmakeProject::ExactAndCumulativeParse)) { const QString path = node->path(); qtQuickApp.setComponentSet(QtQuickApp::QtQuick10Components); @@ -442,7 +442,7 @@ bool Qt4Project::fromMap(const QVariantMap &map) /// equalFileList compares two file lists ignoring /// <configuration> without generating temporary lists -bool Qt4Project::equalFileList(const QStringList &a, const QStringList &b) +bool QmakeProject::equalFileList(const QStringList &a, const QStringList &b) { if (abs(a.length() - b.length()) > 1) return false; @@ -464,10 +464,10 @@ bool Qt4Project::equalFileList(const QStringList &a, const QStringList &b) return (ait == aend && bit == bend); } -void Qt4Project::updateCodeModels() +void QmakeProject::updateCodeModels() { if (debug) - qDebug()<<"Qt4Project::updateCodeModel()"; + qDebug() << "QmakeProject::updateCodeModel()"; if (activeTarget() && !activeTarget()->activeBuildConfiguration()) return; @@ -476,7 +476,7 @@ void Qt4Project::updateCodeModels() updateQmlJSCodeModel(); } -void Qt4Project::updateCppCodeModel() +void QmakeProject::updateCppCodeModel() { typedef CppTools::ProjectPart ProjectPart; typedef CppTools::ProjectFile ProjectFile; @@ -495,8 +495,8 @@ void Qt4Project::updateCppCodeModel() if (!modelmanager) return; - FindQt4ProFiles findQt4ProFiles; - QList<Qt4ProFileNode *> proFiles = findQt4ProFiles(rootProjectNode()); + FindQmakeProFiles findQmakeProFiles; + QList<QmakeProFileNode *> proFiles = findQmakeProFiles(rootProjectNode()); CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this); pinfo.clearProjectParts(); @@ -510,7 +510,7 @@ void Qt4Project::updateCppCodeModel() QHash<QString, QString> uiCodeModelData; QStringList allFiles; - foreach (Qt4ProFileNode *pro, proFiles) { + foreach (QmakeProFileNode *pro, proFiles) { ProjectPart::Ptr part(new ProjectPart); part->project = this; part->displayName = pro->displayName(); @@ -544,7 +544,7 @@ void Qt4Project::updateCppCodeModel() part->frameworkPaths.append(qtVersion->frameworkInstallPath()); } - if (Qt4ProFileNode *node = rootQt4ProjectNode()) + if (QmakeProFileNode *node = rootQmakeProjectNode()) part->includePaths.append(node->resolvedMkspecPath()); // part->precompiledHeaders @@ -592,7 +592,7 @@ void Qt4Project::updateCppCodeModel() m_codeModelFuture = modelmanager->updateProjectInfo(pinfo); } -void Qt4Project::updateQmlJSCodeModel() +void QmakeProject::updateQmlJSCodeModel() { QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance(); if (!modelManager) @@ -601,13 +601,13 @@ void Qt4Project::updateQmlJSCodeModel() QmlJS::ModelManagerInterface::ProjectInfo projectInfo = QmlJSTools::defaultProjectInfoForProject(this); - FindQt4ProFiles findQt4ProFiles; - QList<Qt4ProFileNode *> proFiles = findQt4ProFiles(rootProjectNode()); + FindQmakeProFiles findQt4ProFiles; + QList<QmakeProFileNode *> proFiles = findQt4ProFiles(rootProjectNode()); projectInfo.importPaths.clear(); bool hasQmlLib = false; - foreach (Qt4ProFileNode *node, proFiles) { + foreach (QmakeProFileNode *node, proFiles) { projectInfo.importPaths.append(node->variableValue(QmlImportPathVar)); projectInfo.activeResourceFiles.append(node->variableValue(ExactResourceVar)); projectInfo.allResourceFiles.append(node->variableValue(ResourceVar)); @@ -640,7 +640,7 @@ void Qt4Project::updateQmlJSCodeModel() ///*! // Updates complete project // */ -void Qt4Project::update() +void QmakeProject::update() { if (debug) qDebug()<<"Doing sync update"; @@ -649,19 +649,19 @@ void Qt4Project::update() if (debug) qDebug()<<"State is now Base"; m_asyncUpdateState = Base; - enableActiveQt4BuildConfiguration(activeTarget(), true); + enableActiveQmakeBuildConfiguration(activeTarget(), true); updateBuildSystemData(); updateRunConfigurations(); emit proFilesEvaluated(); } -void Qt4Project::updateRunConfigurations() +void QmakeProject::updateRunConfigurations() { if (activeTarget()) activeTarget()->updateDefaultRunConfigurations(); } -void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node) +void QmakeProject::scheduleAsyncUpdate(QmakeProFileNode *node) { if (m_asyncUpdateState == ShuttingDown) return; @@ -679,7 +679,7 @@ void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node) return; } - enableActiveQt4BuildConfiguration(activeTarget(), false); + enableActiveQmakeBuildConfiguration(activeTarget(), false); if (m_asyncUpdateState == AsyncFullUpdatePending) { // Just postpone @@ -693,7 +693,7 @@ void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node) // Add the node m_asyncUpdateState = AsyncPartialUpdatePending; - QList<Qt4ProFileNode *>::iterator it; + QList<QmakeProFileNode *>::iterator it; bool add = true; if (debug) qDebug()<<"scheduleAsyncUpdate();"<<m_partialEvaluate.size()<<"nodes"; @@ -733,7 +733,7 @@ void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node) } } -void Qt4Project::scheduleAsyncUpdate() +void QmakeProject::scheduleAsyncUpdate() { if (debug) qDebug()<<"scheduleAsyncUpdate"; @@ -752,7 +752,7 @@ void Qt4Project::scheduleAsyncUpdate() qDebug()<<" update in progress, canceling and setting state to full update pending"; m_cancelEvaluate = true; m_asyncUpdateState = AsyncFullUpdatePending; - enableActiveQt4BuildConfiguration(activeTarget(), false); + enableActiveQmakeBuildConfiguration(activeTarget(), false); m_rootProjectNode->setParseInProgressRecursive(true); return; } @@ -760,7 +760,7 @@ void Qt4Project::scheduleAsyncUpdate() if (debug) qDebug()<<" starting timer for full update, setting state to full update pending"; m_partialEvaluate.clear(); - enableActiveQt4BuildConfiguration(activeTarget(), false); + enableActiveQmakeBuildConfiguration(activeTarget(), false); m_rootProjectNode->setParseInProgressRecursive(true); m_asyncUpdateState = AsyncFullUpdatePending; m_asyncUpdateTimer.start(); @@ -770,7 +770,7 @@ void Qt4Project::scheduleAsyncUpdate() } -void Qt4Project::incrementPendingEvaluateFutures() +void QmakeProject::incrementPendingEvaluateFutures() { ++m_pendingEvaluateFuturesCount; if (debug) @@ -780,7 +780,7 @@ void Qt4Project::incrementPendingEvaluateFutures() m_asyncUpdateFutureInterface->progressMaximum() + 1); } -void Qt4Project::decrementPendingEvaluateFutures() +void QmakeProject::decrementPendingEvaluateFutures() { --m_pendingEvaluateFuturesCount; @@ -808,7 +808,7 @@ void Qt4Project::decrementPendingEvaluateFutures() } else if (m_asyncUpdateState != ShuttingDown){ // After being done, we need to call: m_asyncUpdateState = Base; - enableActiveQt4BuildConfiguration(activeTarget(), true); + enableActiveQmakeBuildConfiguration(activeTarget(), true); updateFileList(); updateCodeModels(); updateBuildSystemData(); @@ -820,12 +820,12 @@ void Qt4Project::decrementPendingEvaluateFutures() } } -bool Qt4Project::wasEvaluateCanceled() +bool QmakeProject::wasEvaluateCanceled() { return m_cancelEvaluate; } -void Qt4Project::asyncUpdate() +void QmakeProject::asyncUpdate() { if (debug) qDebug()<<"async update, timer expired, doing now"; @@ -850,7 +850,7 @@ void Qt4Project::asyncUpdate() } else { if (debug) qDebug()<<" partial update,"<<m_partialEvaluate.size()<<"nodes to update"; - foreach (Qt4ProFileNode *node, m_partialEvaluate) + foreach (QmakeProFileNode *node, m_partialEvaluate) node->asyncUpdate(); } @@ -860,23 +860,23 @@ void Qt4Project::asyncUpdate() m_asyncUpdateState = AsyncUpdateInProgress; } -void Qt4Project::buildFinished(bool success) +void QmakeProject::buildFinished(bool success) { if (success) m_qmakeVfs->invalidateContents(); } -ProjectExplorer::IProjectManager *Qt4Project::projectManager() const +ProjectExplorer::IProjectManager *QmakeProject::projectManager() const { return m_manager; } -Qt4Manager *Qt4Project::qt4ProjectManager() const +QmakeManager *QmakeProject::qmakeProjectManager() const { return m_manager; } -bool Qt4Project::supportsKit(Kit *k, QString *errorMessage) const +bool QmakeProject::supportsKit(Kit *k, QString *errorMessage) const { QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k); if (!version && errorMessage) @@ -884,17 +884,17 @@ bool Qt4Project::supportsKit(Kit *k, QString *errorMessage) const return version; } -QString Qt4Project::displayName() const +QString QmakeProject::displayName() const { return QFileInfo(projectFilePath()).completeBaseName(); } -Core::IDocument *Qt4Project::document() const +Core::IDocument *QmakeProject::document() const { return m_fileInfo; } -QStringList Qt4Project::files(FilesMode fileMode) const +QStringList QmakeProject::files(FilesMode fileMode) const { QStringList files; for (int i = 0; i < FileTypeSize; ++i) { @@ -917,32 +917,32 @@ static FolderNode *folderOf(FolderNode *in, FileType fileType, const QString &fi return 0; } -// Find the Qt4ProFileNode that contains a file of a certain type. +// Find the QmakeProFileNode that contains a file of a certain type. // First recurse down to folder, then find the pro-file. -static Qt4ProFileNode *proFileNodeOf(Qt4ProFileNode *in, FileType fileType, const QString &fileName) +static QmakeProFileNode *proFileNodeOf(QmakeProFileNode *in, FileType fileType, const QString &fileName) { for (FolderNode *folder = folderOf(in, fileType, fileName); folder; folder = folder->parentFolderNode()) - if (Qt4ProFileNode *proFile = qobject_cast<Qt4ProFileNode *>(folder)) + if (QmakeProFileNode *proFile = qobject_cast<QmakeProFileNode *>(folder)) return proFile; return 0; } -QString Qt4Project::generatedUiHeader(const QString &formFile) const +QString QmakeProject::generatedUiHeader(const QString &formFile) const { // Look in sub-profiles as SessionManager::projectForFile returns // the top-level project only. if (m_rootProjectNode) - if (const Qt4ProFileNode *pro = proFileNodeOf(m_rootProjectNode, FormType, formFile)) - return Qt4ProFileNode::uiHeaderFile(pro->uiDirectory(), formFile); + if (const QmakeProFileNode *pro = proFileNodeOf(m_rootProjectNode, FormType, formFile)) + return QmakeProFileNode::uiHeaderFile(pro->uiDirectory(), formFile); return QString(); } -void Qt4Project::proFileParseError(const QString &errorMessage) +void QmakeProject::proFileParseError(const QString &errorMessage) { Core::MessageManager::write(errorMessage); } -QtSupport::ProFileReader *Qt4Project::createProFileReader(const Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc) +QtSupport::ProFileReader *QmakeProject::createProFileReader(const QmakeProFileNode *qmakeProFileNode, QmakeBuildConfiguration *bc) { if (!m_qmakeGlobals) { m_qmakeGlobals = new ProFileGlobals; @@ -952,7 +952,7 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(const Qt4ProFileNode * Utils::Environment env = Utils::Environment::systemEnvironment(); QStringList qmakeArgs; if (!bc) - bc = activeTarget() ? static_cast<Qt4BuildConfiguration *>(activeTarget()->activeBuildConfiguration()) : 0; + bc = activeTarget() ? static_cast<QmakeBuildConfiguration *>(activeTarget()->activeBuildConfiguration()) : 0; if (bc) { k = bc->target()->kit(); @@ -988,17 +988,17 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(const Qt4ProFileNode * QtSupport::ProFileReader *reader = new QtSupport::ProFileReader(m_qmakeGlobals, m_qmakeVfs); - reader->setOutputDir(qt4ProFileNode->buildDir()); + reader->setOutputDir(qmakeProFileNode->buildDir()); return reader; } -ProFileGlobals *Qt4Project::qmakeGlobals() +ProFileGlobals *QmakeProject::qmakeGlobals() { return m_qmakeGlobals; } -void Qt4Project::destroyProFileReader(QtSupport::ProFileReader *reader) +void QmakeProject::destroyProFileReader(QtSupport::ProFileReader *reader) { delete reader; if (!--m_qmakeGlobalsRefCnt) { @@ -1013,44 +1013,44 @@ void Qt4Project::destroyProFileReader(QtSupport::ProFileReader *reader) } } -ProjectExplorer::ProjectNode *Qt4Project::rootProjectNode() const +ProjectExplorer::ProjectNode *QmakeProject::rootProjectNode() const { return m_rootProjectNode; } -Qt4ProFileNode *Qt4Project::rootQt4ProjectNode() const +QmakeProFileNode *QmakeProject::rootQmakeProjectNode() const { return m_rootProjectNode; } -bool Qt4Project::validParse(const QString &proFilePath) const +bool QmakeProject::validParse(const QString &proFilePath) const { if (!m_rootProjectNode) return false; - const Qt4ProFileNode *node = m_rootProjectNode->findProFileFor(proFilePath); + const QmakeProFileNode *node = m_rootProjectNode->findProFileFor(proFilePath); return node && node->validParse(); } -bool Qt4Project::parseInProgress(const QString &proFilePath) const +bool QmakeProject::parseInProgress(const QString &proFilePath) const { if (!m_rootProjectNode) return false; - const Qt4ProFileNode *node = m_rootProjectNode->findProFileFor(proFilePath); + const QmakeProFileNode *node = m_rootProjectNode->findProFileFor(proFilePath); return node && node->parseInProgress(); } -void Qt4Project::collectAllfProFiles(QList<Qt4ProFileNode *> &list, Qt4ProFileNode *node, Parsing parse) +void QmakeProject::collectAllfProFiles(QList<QmakeProFileNode *> &list, QmakeProFileNode *node, Parsing parse) { if (parse == ExactAndCumulativeParse || node->includedInExactParse()) list.append(node); foreach (ProjectNode *n, node->subProjectNodes()) { - Qt4ProFileNode *qt4ProFileNode = qobject_cast<Qt4ProFileNode *>(n); - if (qt4ProFileNode) - collectAllfProFiles(list, qt4ProFileNode, parse); + QmakeProFileNode *qmakeProFileNode = qobject_cast<QmakeProFileNode *>(n); + if (qmakeProFileNode) + collectAllfProFiles(list, qmakeProFileNode, parse); } } -void Qt4Project::collectApplicationProFiles(QList<Qt4ProFileNode *> &list, Qt4ProFileNode *node, Parsing parse) +void QmakeProject::collectApplicationProFiles(QList<QmakeProFileNode *> &list, QmakeProFileNode *node, Parsing parse) { if (node->projectType() == ApplicationTemplate || node->projectType() == ScriptTemplate) { @@ -1058,51 +1058,51 @@ void Qt4Project::collectApplicationProFiles(QList<Qt4ProFileNode *> &list, Qt4Pr list.append(node); } foreach (ProjectNode *n, node->subProjectNodes()) { - Qt4ProFileNode *qt4ProFileNode = qobject_cast<Qt4ProFileNode *>(n); - if (qt4ProFileNode) - collectApplicationProFiles(list, qt4ProFileNode, parse); + QmakeProFileNode *qmakeProFileNode = qobject_cast<QmakeProFileNode *>(n); + if (qmakeProFileNode) + collectApplicationProFiles(list, qmakeProFileNode, parse); } } -QList<Qt4ProFileNode *> Qt4Project::allProFiles(Parsing parse) const +QList<QmakeProFileNode *> QmakeProject::allProFiles(Parsing parse) const { - QList<Qt4ProFileNode *> list; + QList<QmakeProFileNode *> list; if (!rootProjectNode()) return list; - collectAllfProFiles(list, rootQt4ProjectNode(), parse); + collectAllfProFiles(list, rootQmakeProjectNode(), parse); return list; } -QList<Qt4ProFileNode *> Qt4Project::applicationProFiles(Parsing parse) const +QList<QmakeProFileNode *> QmakeProject::applicationProFiles(Parsing parse) const { - QList<Qt4ProFileNode *> list; + QList<QmakeProFileNode *> list; if (!rootProjectNode()) return list; - collectApplicationProFiles(list, rootQt4ProjectNode(), parse); + collectApplicationProFiles(list, rootQmakeProjectNode(), parse); return list; } -bool Qt4Project::hasApplicationProFile(const QString &path) const +bool QmakeProject::hasApplicationProFile(const QString &path) const { if (path.isEmpty()) return false; - QList<Qt4ProFileNode *> list = applicationProFiles(); - foreach (Qt4ProFileNode * node, list) + QList<QmakeProFileNode *> list = applicationProFiles(); + foreach (QmakeProFileNode * node, list) if (node->path() == path) return true; return false; } -QStringList Qt4Project::applicationProFilePathes(const QString &prepend, Parsing parse) const +QStringList QmakeProject::applicationProFilePathes(const QString &prepend, Parsing parse) const { QStringList proFiles; - foreach (Qt4ProFileNode *node, applicationProFiles(parse)) + foreach (QmakeProFileNode *node, applicationProFiles(parse)) proFiles.append(prepend + node->path()); return proFiles; } -void Qt4Project::activeTargetWasChanged() +void QmakeProject::activeTargetWasChanged() { if (m_activeTarget) { disconnect(m_activeTarget, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)), @@ -1120,14 +1120,14 @@ void Qt4Project::activeTargetWasChanged() scheduleAsyncUpdate(); } -bool Qt4Project::hasSubNode(Qt4PriFileNode *root, const QString &path) +bool QmakeProject::hasSubNode(QmakePriFileNode *root, const QString &path) { if (root->path() == path) return true; foreach (FolderNode *fn, root->subFolderNodes()) { - if (qobject_cast<Qt4ProFileNode *>(fn)) { + if (qobject_cast<QmakeProFileNode *>(fn)) { // we aren't interested in pro file nodes - } else if (Qt4PriFileNode *qt4prifilenode = qobject_cast<Qt4PriFileNode *>(fn)) { + } else if (QmakePriFileNode *qt4prifilenode = qobject_cast<QmakePriFileNode *>(fn)) { if (hasSubNode(qt4prifilenode, path)) return true; } @@ -1135,22 +1135,22 @@ bool Qt4Project::hasSubNode(Qt4PriFileNode *root, const QString &path) return false; } -void Qt4Project::findProFile(const QString& fileName, Qt4ProFileNode *root, QList<Qt4ProFileNode *> &list) +void QmakeProject::findProFile(const QString& fileName, QmakeProFileNode *root, QList<QmakeProFileNode *> &list) { if (hasSubNode(root, fileName)) list.append(root); foreach (FolderNode *fn, root->subFolderNodes()) - if (Qt4ProFileNode *qt4proFileNode = qobject_cast<Qt4ProFileNode *>(fn)) + if (QmakeProFileNode *qt4proFileNode = qobject_cast<QmakeProFileNode *>(fn)) findProFile(fileName, qt4proFileNode, list); } -void Qt4Project::notifyChanged(const QString &name) +void QmakeProject::notifyChanged(const QString &name) { - if (files(Qt4Project::ExcludeGeneratedFiles).contains(name)) { - QList<Qt4ProFileNode *> list; - findProFile(name, rootQt4ProjectNode(), list); - foreach (Qt4ProFileNode *node, list) { + if (files(QmakeProject::ExcludeGeneratedFiles).contains(name)) { + QList<QmakeProFileNode *> list; + findProFile(name, rootQmakeProjectNode(), list); + foreach (QmakeProFileNode *node, list) { QtSupport::ProFileCacheManager::instance()->discardFile(name); node->update(); } @@ -1158,7 +1158,7 @@ void Qt4Project::notifyChanged(const QString &name) } } -void Qt4Project::watchFolders(const QStringList &l, Qt4PriFileNode *node) +void QmakeProject::watchFolders(const QStringList &l, QmakePriFileNode *node) { if (l.isEmpty()) return; @@ -1167,7 +1167,7 @@ void Qt4Project::watchFolders(const QStringList &l, Qt4PriFileNode *node) m_centralizedFolderWatcher->watchFolders(l, node); } -void Qt4Project::unwatchFolders(const QStringList &l, Qt4PriFileNode *node) +void QmakeProject::unwatchFolders(const QStringList &l, QmakePriFileNode *node) { if (m_centralizedFolderWatcher && !l.isEmpty()) m_centralizedFolderWatcher->unwatchFolders(l, node); @@ -1183,7 +1183,7 @@ namespace { bool debugCFW = false; } -CentralizedFolderWatcher::CentralizedFolderWatcher(Qt4Project *parent) +CentralizedFolderWatcher::CentralizedFolderWatcher(QmakeProject *parent) : QObject(parent), m_project(parent) { m_compressTimer.setSingleShot(true); @@ -1212,7 +1212,7 @@ QSet<QString> CentralizedFolderWatcher::recursiveDirs(const QString &folder) return result; } -void CentralizedFolderWatcher::watchFolders(const QList<QString> &folders, QmakeProjectManager::Qt4PriFileNode *node) +void CentralizedFolderWatcher::watchFolders(const QList<QString> &folders, QmakeProjectManager::QmakePriFileNode *node) { if (debugCFW) qDebug()<<"CFW::watchFolders()"<<folders<<"for node"<<node->path(); @@ -1237,7 +1237,7 @@ void CentralizedFolderWatcher::watchFolders(const QList<QString> &folders, Qmake } } -void CentralizedFolderWatcher::unwatchFolders(const QList<QString> &folders, QmakeProjectManager::Qt4PriFileNode *node) +void CentralizedFolderWatcher::unwatchFolders(const QList<QString> &folders, QmakeProjectManager::QmakePriFileNode *node) { if (debugCFW) qDebug()<<"CFW::unwatchFolders()"<<folders<<"for node"<<node->path(); @@ -1261,7 +1261,7 @@ void CentralizedFolderWatcher::unwatchFolders(const QList<QString> &folders, Qma // So the rwf is a subdirectory of a folder we aren't watching // but maybe someone else wants us to watch bool needToWatch = false; - QMultiMap<QString, QmakeProjectManager::Qt4PriFileNode *>::const_iterator it, end; + QMultiMap<QString, QmakeProjectManager::QmakePriFileNode *>::const_iterator it, end; end = m_map.constEnd(); for (it = m_map.constEnd(); it != end; ++it) { if (rwf.startsWith(it.key())) { @@ -1310,12 +1310,12 @@ void CentralizedFolderWatcher::delayedFolderChanged(const QString &folder) while (true) { if (!dir.endsWith(slash)) dir.append(slash); - QList<QmakeProjectManager::Qt4PriFileNode *> nodes = m_map.values(dir); + QList<QmakeProjectManager::QmakePriFileNode *> nodes = m_map.values(dir); if (!nodes.isEmpty()) { // Collect all the files QSet<Utils::FileName> newFiles; - newFiles += Qt4PriFileNode::recursiveEnumerate(folder); - foreach (QmakeProjectManager::Qt4PriFileNode *node, nodes) { + newFiles += QmakePriFileNode::recursiveEnumerate(folder); + foreach (QmakeProjectManager::QmakePriFileNode *node, nodes) { newOrRemovedFiles = newOrRemovedFiles || node->folderChanged(folder, newFiles); } @@ -1356,12 +1356,12 @@ void CentralizedFolderWatcher::delayedFolderChanged(const QString &folder) } } -bool Qt4Project::needsConfiguration() const +bool QmakeProject::needsConfiguration() const { return targets().isEmpty(); } -void Qt4Project::configureAsExampleProject(const QStringList &platforms) +void QmakeProject::configureAsExampleProject(const QStringList &platforms) { QList<const BuildInfo *> infoList; QList<Kit *> kits = ProjectExplorer::KitManager::kits(); @@ -1383,15 +1383,15 @@ void Qt4Project::configureAsExampleProject(const QStringList &platforms) ProjectExplorer::ProjectExplorerPlugin::instance()->requestProjectModeUpdate(this); } -bool Qt4Project::supportsNoTargetPanel() const +bool QmakeProject::supportsNoTargetPanel() const { return true; } -// All the Qt4 run configurations should share code. +// All the Qmake run configurations should share code. // This is a rather suboptimal way to do that for disabledReason() // but more pratical then duplicated the code everywhere -QString Qt4Project::disabledReasonForRunConfiguration(const QString &proFilePath) +QString QmakeProject::disabledReasonForRunConfiguration(const QString &proFilePath) { if (!QFileInfo(proFilePath).exists()) return tr("The .pro file '%1' does not exist.") @@ -1408,7 +1408,7 @@ QString Qt4Project::disabledReasonForRunConfiguration(const QString &proFilePath .arg(QFileInfo(proFilePath).fileName()); } -QString Qt4Project::shadowBuildDirectory(const QString &proFilePath, const Kit *k, const QString &suffix) +QString QmakeProject::shadowBuildDirectory(const QString &proFilePath, const Kit *k, const QString &suffix) { if (proFilePath.isEmpty()) return QString(); @@ -1425,7 +1425,7 @@ QString Qt4Project::shadowBuildDirectory(const QString &proFilePath, const Kit * return QDir::cleanPath(projectDir.absoluteFilePath(buildPath)); } -QString Qt4Project::buildNameFor(const Kit *k) +QString QmakeProject::buildNameFor(const Kit *k) { if (!k) return QLatin1String("unknown"); @@ -1433,12 +1433,12 @@ QString Qt4Project::buildNameFor(const Kit *k) return k->fileSystemFriendlyName(); } -void Qt4Project::updateBuildSystemData() +void QmakeProject::updateBuildSystemData() { Target * const target = activeTarget(); if (!target) return; - const Qt4ProFileNode * const rootNode = rootQt4ProjectNode(); + const QmakeProFileNode * const rootNode = rootQmakeProjectNode(); if (!rootNode || rootNode->parseInProgress()) return; @@ -1447,12 +1447,12 @@ void Qt4Project::updateBuildSystemData() target->setDeploymentData(deploymentData); BuildTargetInfoList appTargetList; - foreach (const Qt4ProFileNode * const node, applicationProFiles()) + foreach (const QmakeProFileNode * const node, applicationProFiles()) appTargetList.list << BuildTargetInfo(executableFor(node), node->path()); target->setApplicationTargets(appTargetList); } -void Qt4Project::collectData(const Qt4ProFileNode *node, DeploymentData &deploymentData) +void QmakeProject::collectData(const QmakeProFileNode *node, DeploymentData &deploymentData) { if (!node->isSubProjectDeployable(node->path())) return; @@ -1473,8 +1473,8 @@ void Qt4Project::collectData(const Qt4ProFileNode *node, DeploymentData &deploym break; case SubDirsTemplate: foreach (const ProjectNode * const subProject, node->subProjectNodesExact()) { - const Qt4ProFileNode * const qt4SubProject - = qobject_cast<const Qt4ProFileNode *>(subProject); + const QmakeProFileNode * const qt4SubProject + = qobject_cast<const QmakeProFileNode *>(subProject); if (!qt4SubProject) continue; collectData(qt4SubProject, deploymentData); @@ -1485,7 +1485,7 @@ void Qt4Project::collectData(const Qt4ProFileNode *node, DeploymentData &deploym } } -void Qt4Project::collectApplicationData(const Qt4ProFileNode *node, DeploymentData &deploymentData) +void QmakeProject::collectApplicationData(const QmakeProFileNode *node, DeploymentData &deploymentData) { QString executable = executableFor(node); if (!executable.isEmpty()) @@ -1493,7 +1493,7 @@ void Qt4Project::collectApplicationData(const Qt4ProFileNode *node, DeploymentDa DeployableFile::TypeExecutable); } -void Qt4Project::collectLibraryData(const Qt4ProFileNode *node, DeploymentData &deploymentData) +void QmakeProject::collectLibraryData(const QmakeProFileNode *node, DeploymentData &deploymentData) { const QString targetPath = node->installsList().targetPath; if (targetPath.isEmpty()) @@ -1578,7 +1578,7 @@ void Qt4Project::collectLibraryData(const Qt4ProFileNode *node, DeploymentData & } } -QString Qt4Project::destDirFor(const TargetInformation &ti) +QString QmakeProject::destDirFor(const TargetInformation &ti) { if (ti.destDir.isEmpty()) return ti.buildDir; @@ -1587,7 +1587,7 @@ QString Qt4Project::destDirFor(const TargetInformation &ti) return ti.destDir; } -QString Qt4Project::executableFor(const Qt4ProFileNode *node) +QString QmakeProject::executableFor(const QmakeProFileNode *node) { const ProjectExplorer::Kit * const kit = activeTarget()->kit(); const ProjectExplorer::ToolChain * const toolchain @@ -1616,17 +1616,17 @@ QString Qt4Project::executableFor(const Qt4ProFileNode *node) } } -void Qt4Project::emitBuildDirectoryInitialized() +void QmakeProject::emitBuildDirectoryInitialized() { emit buildDirectoryInitialized(); } -ProjectImporter *Qt4Project::createProjectImporter() const +ProjectImporter *QmakeProject::createProjectImporter() const { return new QmakeProjectImporter(projectFilePath()); } -KitMatcher *Qt4Project::createRequiredKitMatcher() const +KitMatcher *QmakeProject::createRequiredKitMatcher() const { return new QtSupport::QtVersionKitMatcher; } diff --git a/src/plugins/qt4projectmanager/qmakeproject.h b/src/plugins/qmakeprojectmanager/qmakeproject.h index de3efcf666..74d9bb9fc9 100644 --- a/src/plugins/qt4projectmanager/qmakeproject.h +++ b/src/plugins/qmakeprojectmanager/qmakeproject.h @@ -51,40 +51,39 @@ namespace QtSupport { class ProFileReader; } namespace QmakeProjectManager { class MakeStep; class QMakeStep; -class Qt4BuildConfiguration; -class Qt4Manager; -class Qt4PriFileNode; -class Qt4ProFileNode; -class Qt4RunStep; +class QmakeBuildConfiguration; +class QmakeManager; +class QmakePriFileNode; +class QmakeProFileNode; class TargetInformation; namespace Internal { class CentralizedFolderWatcher; class FileItem; class GCCPreprocessor; -class Qt4ProjectFiles; -class Qt4ProjectConfigWidget; -class Qt4ProjectFile; -class Qt4NodesWatcher; +class QmakeProjectFiles; +class QmakeProjectConfigWidget; +class QmakeProjectFile; +class QmakeNodesWatcher; } -class QT4PROJECTMANAGER_EXPORT Qt4Project : public ProjectExplorer::Project +class QMAKEPROJECTMANAGER_EXPORT QmakeProject : public ProjectExplorer::Project { Q_OBJECT public: - Qt4Project(Qt4Manager *manager, const QString &proFile); - virtual ~Qt4Project(); + QmakeProject(QmakeManager *manager, const QString &proFile); + virtual ~QmakeProject(); QString displayName() const; Core::IDocument *document() const; ProjectExplorer::IProjectManager *projectManager() const; - Qt4Manager *qt4ProjectManager() const; + QmakeManager *qmakeProjectManager() const; bool supportsKit(ProjectExplorer::Kit *k, QString *errorMesage) const; ProjectExplorer::ProjectNode *rootProjectNode() const; - Qt4ProFileNode *rootQt4ProjectNode() const; + QmakeProFileNode *rootQmakeProjectNode() const; bool validParse(const QString &proFilePath) const; bool parseInProgress(const QString &proFilePath) const; @@ -92,22 +91,22 @@ public: virtual QString generatedUiHeader(const QString &formFile) const; enum Parsing {ExactParse, ExactAndCumulativeParse }; - QList<Qt4ProFileNode *> allProFiles(Parsing parse = ExactParse) const; - QList<Qt4ProFileNode *> applicationProFiles(Parsing parse = ExactParse) const; + QList<QmakeProFileNode *> allProFiles(Parsing parse = ExactParse) const; + QList<QmakeProFileNode *> applicationProFiles(Parsing parse = ExactParse) const; bool hasApplicationProFile(const QString &path) const; QStringList applicationProFilePathes(const QString &prepend = QString(), Parsing parse = ExactParse) const; void notifyChanged(const QString &name); /// \internal - QtSupport::ProFileReader *createProFileReader(const Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc = 0); + QtSupport::ProFileReader *createProFileReader(const QmakeProFileNode *qmakeProFileNode, QmakeBuildConfiguration *bc = 0); /// \internal ProFileGlobals *qmakeGlobals(); /// \internal void destroyProFileReader(QtSupport::ProFileReader *reader); /// \internal - void scheduleAsyncUpdate(QmakeProjectManager::Qt4ProFileNode *node); + void scheduleAsyncUpdate(QmakeProjectManager::QmakeProFileNode *node); /// \internal void incrementPendingEvaluateFutures(); /// \internal @@ -115,12 +114,12 @@ public: /// \internal bool wasEvaluateCanceled(); - // For Qt4ProFileNode after a on disk change + // For QmakeProFileNode after a on disk change void updateFileList(); void updateCodeModels(); - void watchFolders(const QStringList &l, Qt4PriFileNode *node); - void unwatchFolders(const QStringList &l, Qt4PriFileNode *node); + void watchFolders(const QStringList &l, QmakePriFileNode *node); + void unwatchFolders(const QStringList &l, QmakePriFileNode *node); bool needsConfiguration() const; @@ -144,7 +143,7 @@ public: ProjectExplorer::KitMatcher *createRequiredKitMatcher() const; signals: - void proFileUpdated(QmakeProjectManager::Qt4ProFileNode *node, bool, bool); + void proFileUpdated(QmakeProjectManager::QmakeProFileNode *node, bool, bool); void buildDirectoryInitialized(); void proFilesEvaluated(); @@ -162,39 +161,39 @@ private slots: void activeTargetWasChanged(); private: - QString executableFor(const Qt4ProFileNode *node); + QString executableFor(const QmakeProFileNode *node); void updateRunConfigurations(); void updateCppCodeModel(); void updateQmlJSCodeModel(); - static void collectAllfProFiles(QList<Qt4ProFileNode *> &list, Qt4ProFileNode *node, Parsing parse); - static void collectApplicationProFiles(QList<Qt4ProFileNode *> &list, Qt4ProFileNode *node, Parsing parse); - static void findProFile(const QString& fileName, Qt4ProFileNode *root, QList<Qt4ProFileNode *> &list); - static bool hasSubNode(Qt4PriFileNode *root, const QString &path); + static void collectAllfProFiles(QList<QmakeProFileNode *> &list, QmakeProFileNode *node, Parsing parse); + static void collectApplicationProFiles(QList<QmakeProFileNode *> &list, QmakeProFileNode *node, Parsing parse); + static void findProFile(const QString& fileName, QmakeProFileNode *root, QList<QmakeProFileNode *> &list); + static bool hasSubNode(QmakePriFileNode *root, const QString &path); static bool equalFileList(const QStringList &a, const QStringList &b); void updateBuildSystemData(); - void collectData(const Qt4ProFileNode *node, ProjectExplorer::DeploymentData &deploymentData); - void collectApplicationData(const Qt4ProFileNode *node, + void collectData(const QmakeProFileNode *node, ProjectExplorer::DeploymentData &deploymentData); + void collectApplicationData(const QmakeProFileNode *node, ProjectExplorer::DeploymentData &deploymentData); - void collectLibraryData(const Qt4ProFileNode *node, + void collectLibraryData(const QmakeProFileNode *node, ProjectExplorer::DeploymentData &deploymentData); QString destDirFor(const TargetInformation &ti); - Qt4Manager *m_manager; - Qt4ProFileNode *m_rootProjectNode; - Internal::Qt4NodesWatcher *m_nodesWatcher; + QmakeManager *m_manager; + QmakeProFileNode *m_rootProjectNode; + Internal::QmakeNodesWatcher *m_nodesWatcher; - Internal::Qt4ProjectFile *m_fileInfo; + Internal::QmakeProjectFile *m_fileInfo; // Current configuration QString m_oldQtIncludePath; QString m_oldQtLibsPath; // cached lists of all of files - Internal::Qt4ProjectFiles *m_projectFiles; + Internal::QmakeProjectFiles *m_projectFiles; QMakeVfs *m_qmakeVfs; @@ -208,7 +207,7 @@ private: enum AsyncUpdateState { NoState, Base, AsyncFullUpdatePending, AsyncPartialUpdatePending, AsyncUpdateInProgress, ShuttingDown }; AsyncUpdateState m_asyncUpdateState; bool m_cancelEvaluate; - QList<Qt4ProFileNode *> m_partialEvaluate; + QList<QmakeProFileNode *> m_partialEvaluate; QFuture<void> m_codeModelFuture; @@ -216,9 +215,9 @@ private: ProjectExplorer::Target *m_activeTarget; - friend class Internal::Qt4ProjectFile; - friend class Internal::Qt4ProjectConfigWidget; - friend class Qt4Manager; // to schedule a async update if the unconfigured settings change + friend class Internal::QmakeProjectFile; + friend class Internal::QmakeProjectConfigWidget; + friend class QmakeManager; // to schedule a async update if the unconfigured settings change }; } // namespace QmakeProjectManager diff --git a/src/plugins/qt4projectmanager/qmakeprojectconfigwidget.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp index 228ea13d2c..82292aea24 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectconfigwidget.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp @@ -43,13 +43,13 @@ using namespace QmakeProjectManager; using namespace QmakeProjectManager::Internal; using namespace ProjectExplorer; -Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4BuildConfiguration *bc) +QmakeProjectConfigWidget::QmakeProjectConfigWidget(QmakeBuildConfiguration *bc) : NamedWidget(), m_buildConfiguration(bc), m_ignoreChange(false) { m_defaultShadowBuildDir - = Qt4Project::shadowBuildDirectory(bc->target()->project()->projectFilePath(), + = QmakeProject::shadowBuildDirectory(bc->target()->project()->projectFilePath(), bc->target()->kit(), Utils::FileUtils::fileSystemFriendlyName(bc->displayName())); @@ -60,7 +60,7 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4BuildConfiguration *bc) vbox->addWidget(m_detailsContainer); QWidget *details = new QWidget(m_detailsContainer); m_detailsContainer->setWidget(details); - m_ui = new Ui::Qt4ProjectConfigWidget(); + m_ui = new Ui::QmakeProjectConfigWidget(); m_ui->setupUi(details); m_browseButton = m_ui->shadowBuildDirEdit->buttonAtIndex(0); @@ -92,7 +92,7 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4BuildConfiguration *bc) connect(m_ui->shadowBuildDirEdit, SIGNAL(changed(QString)), this, SLOT(shadowBuildEdited())); - Qt4Project *project = static_cast<Qt4Project *>(bc->target()->project()); + QmakeProject *project = static_cast<QmakeProject *>(bc->target()->project()); connect(project, SIGNAL(environmentChanged()), this, SLOT(environmentChanged())); connect(project, SIGNAL(buildDirectoryInitialized()), this, SLOT(updateProblemLabel())); connect(project, SIGNAL(proFilesEvaluated()), this, SLOT(updateProblemLabel())); @@ -110,31 +110,31 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4BuildConfiguration *bc) updateProblemLabel(); } -Qt4ProjectConfigWidget::~Qt4ProjectConfigWidget() +QmakeProjectConfigWidget::~QmakeProjectConfigWidget() { delete m_ui; } -void Qt4ProjectConfigWidget::updateDetails() +void QmakeProjectConfigWidget::updateDetails() { m_detailsContainer->setSummaryText( tr("building in <b>%1</b>") .arg(m_buildConfiguration->buildDirectory().toUserOutput())); } -void Qt4ProjectConfigWidget::setProblemLabel(const QString &text) +void QmakeProjectConfigWidget::setProblemLabel(const QString &text) { m_ui->warningLabel->setVisible(!text.isEmpty()); m_ui->problemLabel->setVisible(!text.isEmpty()); m_ui->problemLabel->setText(text); } -void Qt4ProjectConfigWidget::environmentChanged() +void QmakeProjectConfigWidget::environmentChanged() { m_ui->shadowBuildDirEdit->setEnvironment(m_buildConfiguration->environment()); } -void Qt4ProjectConfigWidget::buildDirectoryChanged() +void QmakeProjectConfigWidget::buildDirectoryChanged() { if (m_ignoreChange) return; @@ -152,14 +152,14 @@ void Qt4ProjectConfigWidget::buildDirectoryChanged() updateProblemLabel(); } -void Qt4ProjectConfigWidget::onBeforeBeforeShadowBuildDirBrowsed() +void QmakeProjectConfigWidget::onBeforeBeforeShadowBuildDirBrowsed() { QString initialDirectory = m_buildConfiguration->target()->project()->projectDirectory(); if (!initialDirectory.isEmpty()) m_ui->shadowBuildDirEdit->setInitialBrowsePathBackup(initialDirectory); } -void Qt4ProjectConfigWidget::shadowBuildClicked(bool checked) +void QmakeProjectConfigWidget::shadowBuildClicked(bool checked) { m_ui->shadowBuildDirEdit->setEnabled(checked); m_browseButton->setEnabled(checked); @@ -178,7 +178,7 @@ void Qt4ProjectConfigWidget::shadowBuildClicked(bool checked) updateProblemLabel(); } -void Qt4ProjectConfigWidget::shadowBuildEdited() +void QmakeProjectConfigWidget::shadowBuildEdited() { if (m_buildConfiguration->rawBuildDirectory().toString() == m_ui->shadowBuildDirEdit->rawPath()) return; @@ -188,7 +188,7 @@ void Qt4ProjectConfigWidget::shadowBuildEdited() m_ignoreChange = false; } -void Qt4ProjectConfigWidget::updateProblemLabel() +void QmakeProjectConfigWidget::updateProblemLabel() { m_ui->shadowBuildDirEdit->triggerChanged(); ProjectExplorer::Kit *k = m_buildConfiguration->target()->kit(); @@ -201,8 +201,8 @@ void Qt4ProjectConfigWidget::updateProblemLabel() return; } - Qt4Project *p = static_cast<Qt4Project *>(m_buildConfiguration->target()->project()); - if (p->rootQt4ProjectNode()->parseInProgress() || !p->rootQt4ProjectNode()->validParse()) { + QmakeProject *p = static_cast<QmakeProject *>(m_buildConfiguration->target()->project()); + if (p->rootQmakeProjectNode()->parseInProgress() || !p->rootQmakeProjectNode()->validParse()) { setProblemLabel(QString()); return; } @@ -219,16 +219,16 @@ void Qt4ProjectConfigWidget::updateProblemLabel() makefile.append(m_buildConfiguration->makefile()); switch (m_buildConfiguration->compareToImportFrom(makefile)) { - case Qt4BuildConfiguration::MakefileMatches: + case QmakeBuildConfiguration::MakefileMatches: allGood = true; break; - case Qt4BuildConfiguration::MakefileMissing: + case QmakeBuildConfiguration::MakefileMissing: allGood = true; break; - case Qt4BuildConfiguration::MakefileIncompatible: + case QmakeBuildConfiguration::MakefileIncompatible: incompatibleBuild = true; break; - case Qt4BuildConfiguration::MakefileForWrongProject: + case QmakeBuildConfiguration::MakefileForWrongProject: targetMismatch = true; break; } diff --git a/src/plugins/qt4projectmanager/qmakeprojectconfigwidget.h b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.h index 90040f68b7..2750f43d40 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectconfigwidget.h +++ b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.h @@ -27,8 +27,8 @@ ** ****************************************************************************/ -#ifndef QT4PROJECTCONFIGWIDGET_H -#define QT4PROJECTCONFIGWIDGET_H +#ifndef QMAKEPROJECTCONFIGWIDGET_H +#define QMAKEPROJECTCONFIGWIDGET_H #include <projectexplorer/namedwidget.h> @@ -41,20 +41,20 @@ namespace Utils { } namespace QmakeProjectManager { -class Qt4BuildConfiguration; -class Qt4ProFileNode; +class QmakeBuildConfiguration; +class QmakeProFileNode; namespace Internal { namespace Ui { -class Qt4ProjectConfigWidget; +class QmakeProjectConfigWidget; } -class Qt4ProjectConfigWidget : public ProjectExplorer::NamedWidget +class QmakeProjectConfigWidget : public ProjectExplorer::NamedWidget { Q_OBJECT public: - Qt4ProjectConfigWidget(Qt4BuildConfiguration *bc); - ~Qt4ProjectConfigWidget(); + QmakeProjectConfigWidget(QmakeBuildConfiguration *bc); + ~QmakeProjectConfigWidget(); private slots: // User changes in our widgets @@ -71,9 +71,9 @@ private: void updateDetails(); void setProblemLabel(const QString &text); - Ui::Qt4ProjectConfigWidget *m_ui; + Ui::QmakeProjectConfigWidget *m_ui; QAbstractButton *m_browseButton; - Qt4BuildConfiguration *m_buildConfiguration; + QmakeBuildConfiguration *m_buildConfiguration; Utils::DetailsWidget *m_detailsContainer; QString m_defaultShadowBuildDir; bool m_ignoreChange; @@ -82,4 +82,4 @@ private: } // namespace Internal } // namespace QmakeProjectManager -#endif // QT4PROJECTCONFIGWIDGET_H +#endif // QMAKEPROJECTCONFIGWIDGET_H diff --git a/src/plugins/qt4projectmanager/qmakeprojectconfigwidget.ui b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.ui index cef43d4129..c2383e587b 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectconfigwidget.ui +++ b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>QmakeProjectManager::Internal::Qt4ProjectConfigWidget</class> - <widget class="QWidget" name="QmakeProjectManager::Internal::Qt4ProjectConfigWidget"> + <class>QmakeProjectManager::Internal::QmakeProjectConfigWidget</class> + <widget class="QWidget" name="QmakeProjectManager::Internal::QmakeProjectConfigWidget"> <property name="geometry"> <rect> <x>0</x> diff --git a/src/plugins/qt4projectmanager/qmakeprojectimporter.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp index 5426fcde27..1a2395b5ef 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectimporter.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectimporter.cpp @@ -112,7 +112,7 @@ QList<ProjectExplorer::BuildInfo *> QmakeProjectImporter::import(const Utils::Fi QString additionalArguments = makefileBuildConfig.second; Utils::FileName parsedSpec = - Qt4BuildConfiguration::extractSpecFromArguments(&additionalArguments, importPath.toString(), version); + QmakeBuildConfiguration::extractSpecFromArguments(&additionalArguments, importPath.toString(), version); Utils::FileName versionSpec = version->mkspec(); if (parsedSpec.isEmpty() || parsedSpec == Utils::FileName::fromString(QLatin1String("default"))) parsedSpec = versionSpec; @@ -142,8 +142,8 @@ QList<ProjectExplorer::BuildInfo *> QmakeProjectImporter::import(const Utils::Fi foreach (ProjectExplorer::Kit *k, kitList) { addProject(k); - Qt4BuildConfigurationFactory *factory - = qobject_cast<Qt4BuildConfigurationFactory *>( + QmakeBuildConfigurationFactory *factory + = qobject_cast<QmakeBuildConfigurationFactory *>( ProjectExplorer::IBuildConfigurationFactory::find(k, projectFilePath())); if (!factory) @@ -186,7 +186,7 @@ QStringList QmakeProjectImporter::importCandidates(const Utils::FileName &projec QList<ProjectExplorer::Kit *> kitList = ProjectExplorer::KitManager::kits(); foreach (ProjectExplorer::Kit *k, kitList) { - QFileInfo fi(Qt4Project::shadowBuildDirectory(projectPath.toString(), k, QString())); + QFileInfo fi(QmakeProject::shadowBuildDirectory(projectPath.toString(), k, QString())); const QString baseDir = fi.absolutePath(); foreach (const QString &dir, QDir(baseDir).entryList()) { diff --git a/src/plugins/qt4projectmanager/qmakeprojectimporter.h b/src/plugins/qmakeprojectmanager/qmakeprojectimporter.h index 36078c6277..328b7175fe 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectimporter.h +++ b/src/plugins/qmakeprojectmanager/qmakeprojectimporter.h @@ -36,7 +36,7 @@ namespace QtSupport { class BaseQtVersion; } namespace QmakeProjectManager { -class Qt4Project; +class QmakeProject; namespace Internal { diff --git a/src/plugins/qt4projectmanager/qmakeprojectmanager.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.cpp index 54ffd30305..e1d49e8015 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectmanager.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.cpp @@ -56,14 +56,14 @@ using namespace QmakeProjectManager; using namespace QmakeProjectManager::Internal; // Known file types of a Qt 4 project -static const char *qt4FileTypes[] = { +static const char *qmakeFileTypes[] = { "CppHeaderFiles", "CppSourceFiles", "Qt4FormFiles", "Qt4ResourceFiles" }; -Qt4Manager::Qt4Manager(Qt4ProjectManagerPlugin *plugin) +QmakeManager::QmakeManager(QmakeProjectManagerPlugin *plugin) : m_plugin(plugin), m_contextNode(0), m_contextProject(0), @@ -71,32 +71,32 @@ Qt4Manager::Qt4Manager(Qt4ProjectManagerPlugin *plugin) { } -Qt4Manager::~Qt4Manager() +QmakeManager::~QmakeManager() { } -void Qt4Manager::registerProject(Qt4Project *project) +void QmakeManager::registerProject(QmakeProject *project) { m_projects.append(project); } -void Qt4Manager::unregisterProject(Qt4Project *project) +void QmakeManager::unregisterProject(QmakeProject *project) { m_projects.removeOne(project); } -void Qt4Manager::notifyChanged(const QString &name) +void QmakeManager::notifyChanged(const QString &name) { - foreach (Qt4Project *pro, m_projects) + foreach (QmakeProject *pro, m_projects) pro->notifyChanged(name); } -QString Qt4Manager::mimeType() const +QString QmakeManager::mimeType() const { return QLatin1String(QmakeProjectManager::Constants::PROFILE_MIMETYPE); } -ProjectExplorer::Project *Qt4Manager::openProject(const QString &fileName, QString *errorString) +ProjectExplorer::Project *QmakeManager::openProject(const QString &fileName, QString *errorString) { if (!QFileInfo(fileName).isFile()) { if (errorString) @@ -105,40 +105,40 @@ ProjectExplorer::Project *Qt4Manager::openProject(const QString &fileName, QStri return 0; } - return new Qt4Project(this, fileName); + return new QmakeProject(this, fileName); } -ProjectExplorer::Node *Qt4Manager::contextNode() const +ProjectExplorer::Node *QmakeManager::contextNode() const { return m_contextNode; } -void Qt4Manager::setContextNode(ProjectExplorer::Node *node) +void QmakeManager::setContextNode(ProjectExplorer::Node *node) { m_contextNode = node; } -ProjectExplorer::Project *Qt4Manager::contextProject() const +ProjectExplorer::Project *QmakeManager::contextProject() const { return m_contextProject; } -void Qt4Manager::setContextProject(ProjectExplorer::Project *project) +void QmakeManager::setContextProject(ProjectExplorer::Project *project) { m_contextProject = project; } -ProjectExplorer::FileNode *Qt4Manager::contextFile() const +ProjectExplorer::FileNode *QmakeManager::contextFile() const { return m_contextFile; } -void Qt4Manager::setContextFile(ProjectExplorer::FileNode *file) +void QmakeManager::setContextFile(ProjectExplorer::FileNode *file) { m_contextFile = file; } -void Qt4Manager::addLibrary() +void QmakeManager::addLibrary() { ProFileEditorWidget *editor = qobject_cast<ProFileEditorWidget*>(Core::EditorManager::currentEditor()->widget()); @@ -146,14 +146,14 @@ void Qt4Manager::addLibrary() addLibrary(editor->editorDocument()->filePath(), editor); } -void Qt4Manager::addLibraryContextMenu() +void QmakeManager::addLibraryContextMenu() { ProjectExplorer::Node *node = ProjectExplorer::ProjectExplorerPlugin::instance()->currentNode(); - if (qobject_cast<Qt4ProFileNode *>(node)) + if (qobject_cast<QmakeProFileNode *>(node)) addLibrary(node->path()); } -void Qt4Manager::addLibrary(const QString &fileName, ProFileEditorWidget *editor) +void QmakeManager::addLibrary(const QString &fileName, ProFileEditorWidget *editor) { AddLibraryWizard wizard(fileName, Core::EditorManager::instance()); if (wizard.exec() != QDialog::Accepted) @@ -184,28 +184,28 @@ void Qt4Manager::addLibrary(const QString &fileName, ProFileEditorWidget *editor } -void Qt4Manager::runQMake() +void QmakeManager::runQMake() { runQMake(SessionManager::startupProject(), 0); } -void Qt4Manager::runQMakeContextMenu() +void QmakeManager::runQMakeContextMenu() { runQMake(m_contextProject, m_contextNode); } -void Qt4Manager::runQMake(ProjectExplorer::Project *p, ProjectExplorer::Node *node) +void QmakeManager::runQMake(ProjectExplorer::Project *p, ProjectExplorer::Node *node) { if (!ProjectExplorer::ProjectExplorerPlugin::instance()->saveModifiedFiles()) return; - Qt4Project *qt4pro = qobject_cast<Qt4Project *>(p); - QTC_ASSERT(qt4pro, return); + QmakeProject *qmakeProject = qobject_cast<QmakeProject *>(p); + QTC_ASSERT(qmakeProject, return); - if (!qt4pro->activeTarget() || - !qt4pro->activeTarget()->activeBuildConfiguration()) + if (!qmakeProject->activeTarget() || + !qmakeProject->activeTarget()->activeBuildConfiguration()) return; - Qt4BuildConfiguration *bc = static_cast<Qt4BuildConfiguration *>(qt4pro->activeTarget()->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = static_cast<QmakeBuildConfiguration *>(qmakeProject->activeTarget()->activeBuildConfiguration()); QMakeStep *qs = bc->qmakeStep(); if (!qs) return; @@ -213,38 +213,38 @@ void Qt4Manager::runQMake(ProjectExplorer::Project *p, ProjectExplorer::Node *no //found qmakeStep, now use it qs->setForced(true); - if (node != 0 && node != qt4pro->rootProjectNode()) - if (Qt4ProFileNode *profile = qobject_cast<Qt4ProFileNode *>(node)) + if (node != 0 && node != qmakeProject->rootProjectNode()) + if (QmakeProFileNode *profile = qobject_cast<QmakeProFileNode *>(node)) bc->setSubNodeBuild(profile); BuildManager::appendStep(qs, tr("QMake")); bc->setSubNodeBuild(0); } -void Qt4Manager::buildSubDirContextMenu() +void QmakeManager::buildSubDirContextMenu() { handleSubDirContextMenu(BUILD, false); } -void Qt4Manager::cleanSubDirContextMenu() +void QmakeManager::cleanSubDirContextMenu() { handleSubDirContextMenu(CLEAN, false); } -void Qt4Manager::rebuildSubDirContextMenu() +void QmakeManager::rebuildSubDirContextMenu() { handleSubDirContextMenu(REBUILD, false); } -void Qt4Manager::buildFileContextMenu() +void QmakeManager::buildFileContextMenu() { handleSubDirContextMenu(BUILD, true); } -void Qt4Manager::buildFile() +void QmakeManager::buildFile() { if (Core::IDocument *currentDocument= Core::EditorManager::currentDocument()) { - QString file = currentDocument->filePath(); + const QString file = currentDocument->filePath(); FileNode *node = qobject_cast<FileNode *>(SessionManager::nodeForFile(file)); Project *project = SessionManager::projectForFile(file); @@ -253,32 +253,37 @@ void Qt4Manager::buildFile() } } -void Qt4Manager::handleSubDirContextMenu(Qt4Manager::Action action, bool isFileBuild) +void QmakeManager::handleSubDirContextMenu(QmakeManager::Action action, bool isFileBuild) { handleSubDirContextMenu(action, isFileBuild, m_contextProject, m_contextNode, m_contextFile); } -void Qt4Manager::handleSubDirContextMenu(Qt4Manager::Action action, bool isFileBuild, +void QmakeManager::handleSubDirContextMenu(QmakeManager::Action action, bool isFileBuild, ProjectExplorer::Project *contextProject, ProjectExplorer::Node *contextNode, ProjectExplorer::FileNode *contextFile) { - Qt4Project *qt4pro = qobject_cast<Qt4Project *>(contextProject); - QTC_ASSERT(qt4pro, return); + QmakeProject *qmakeProject = qobject_cast<QmakeProject *>(contextProject); + QTC_ASSERT(qmakeProject, return); - if (!qt4pro->activeTarget() || - !qt4pro->activeTarget()->activeBuildConfiguration()) + if (!qmakeProject->activeTarget() || + !qmakeProject->activeTarget()->activeBuildConfiguration()) return; if (!contextNode || !contextFile) isFileBuild = false; - Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(qt4pro->activeTarget()->activeBuildConfiguration()); + QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(qmakeProject->activeTarget()->activeBuildConfiguration()); if (!bc) return; - if (contextNode != 0 && (contextNode != qt4pro->rootProjectNode() || isFileBuild)) - if (Qt4ProFileNode *profile = qobject_cast<Qt4ProFileNode *>(contextNode)) - bc->setSubNodeBuild(profile); + if (contextNode) { + if (QmakePriFileNode *prifile = qobject_cast<QmakePriFileNode *>(contextNode)) { + if (QmakeProFileNode *profile = prifile->proFileNode()) { + if (profile != qmakeProject->rootProjectNode() || isFileBuild) + bc->setSubNodeBuild(profile); + } + } + } if (isFileBuild) bc->setFileNodeBuild(contextFile); @@ -306,17 +311,17 @@ void Qt4Manager::handleSubDirContextMenu(Qt4Manager::Action action, bool isFileB bc->setFileNodeBuild(0); } -QString Qt4Manager::fileTypeId(ProjectExplorer::FileType type) +QString QmakeManager::fileTypeId(ProjectExplorer::FileType type) { switch (type) { case HeaderType: - return QLatin1String(qt4FileTypes[0]); + return QLatin1String(qmakeFileTypes[0]); case SourceType: - return QLatin1String(qt4FileTypes[1]); + return QLatin1String(qmakeFileTypes[1]); case FormType: - return QLatin1String(qt4FileTypes[2]); + return QLatin1String(qmakeFileTypes[2]); case ResourceType: - return QLatin1String(qt4FileTypes[3]); + return QLatin1String(qmakeFileTypes[3]); case UnknownFileType: default: break; diff --git a/src/plugins/qt4projectmanager/qmakeprojectmanager.h b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.h index 4e76d347fd..c086a0b104 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectmanager.h +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.h @@ -47,23 +47,22 @@ class ToolChain; namespace QmakeProjectManager { namespace Internal { -class Qt4Builder; class ProFileEditorWidget; -class Qt4ProjectManagerPlugin; +class QmakeProjectManagerPlugin; } // namespace Internal -class Qt4Project; +class QmakeProject; -class QT4PROJECTMANAGER_EXPORT Qt4Manager : public ProjectExplorer::IProjectManager +class QMAKEPROJECTMANAGER_EXPORT QmakeManager : public ProjectExplorer::IProjectManager { Q_OBJECT public: - Qt4Manager(Internal::Qt4ProjectManagerPlugin *plugin); - ~Qt4Manager(); + QmakeManager(Internal::QmakeProjectManagerPlugin *plugin); + ~QmakeManager(); - void registerProject(Qt4Project *project); - void unregisterProject(Qt4Project *project); + void registerProject(QmakeProject *project); + void unregisterProject(QmakeProject *project); void notifyChanged(const QString &name); virtual QString mimeType() const; @@ -94,16 +93,16 @@ public slots: void buildFile(); private: - QList<Qt4Project *> m_projects; + QList<QmakeProject *> m_projects; void handleSubDirContextMenu(Action action, bool isFileBuild); - void handleSubDirContextMenu(Qt4Manager::Action action, bool isFileBuild, + void handleSubDirContextMenu(QmakeManager::Action action, bool isFileBuild, ProjectExplorer::Project *contextProject, ProjectExplorer::Node *contextNode, ProjectExplorer::FileNode *contextFile); void addLibrary(const QString &fileName, Internal::ProFileEditorWidget *editor = 0); void runQMake(ProjectExplorer::Project *p, ProjectExplorer::Node *node); - Internal::Qt4ProjectManagerPlugin *m_plugin; + Internal::QmakeProjectManagerPlugin *m_plugin; ProjectExplorer::Node *m_contextNode; ProjectExplorer::Project *m_contextProject; ProjectExplorer::FileNode *m_contextFile; diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.pro b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.pro index aa2c2241dc..8ef3eaa3dc 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.pro +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.pro @@ -2,7 +2,7 @@ QT += network include(../../qtcreatorplugin.pri) DEFINES += \ - QT4PROJECTMANAGER_LIBRARY + QMAKEPROJECTMANAGER_LIBRARY HEADERS += \ qmakebuildinfo.h \ @@ -61,7 +61,7 @@ HEADERS += \ librarydetailscontroller.h \ findqmakeprofiles.h \ qmakeprojectmanager_global.h \ - qmakerunconfiguration.h \ + desktopqmakerunconfiguration.h \ profilecompletionassist.h SOURCES += \ @@ -118,7 +118,7 @@ SOURCES += \ addlibrarywizard.cpp \ librarydetailscontroller.cpp \ findqmakeprofiles.cpp \ - qmakerunconfiguration.cpp \ + desktopqmakerunconfiguration.cpp \ profilecompletionassist.cpp FORMS += makestep.ui \ diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.qbs b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.qbs index 4d0f2f2fde..38cf2ab95f 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.qbs +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.qbs @@ -3,7 +3,7 @@ import qbs.base 1.0 import QtcPlugin QtcPlugin { - name: "Qt4ProjectManager" + name: "QmakeProjectManager" Depends { name: "Qt"; submodules: ["widgets", "network"] } Depends { name: "Core" } @@ -22,6 +22,7 @@ QtcPlugin { name: "General" files: [ "addlibrarywizard.cpp", "addlibrarywizard.h", + "desktopqmakerunconfiguration.cpp", "desktopqmakerunconfiguration.h", "externaleditors.cpp", "externaleditors.h", "findqmakeprofiles.cpp", "findqmakeprofiles.h", "librarydetailscontroller.cpp", "librarydetailscontroller.h", @@ -51,7 +52,6 @@ QtcPlugin { "qmakeprojectmanagerconstants.h", "qmakeprojectmanagerplugin.cpp", "qmakeprojectmanagerplugin.h", "qtmodulesinfo.cpp", "qtmodulesinfo.h", - "qmakerunconfiguration.cpp", "qmakerunconfiguration.h", ] } diff --git a/src/plugins/qt4projectmanager/qmakeprojectmanager.qrc b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.qrc index 1c1d74473e..6c6e8857d6 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectmanager.qrc +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager.qrc @@ -2,7 +2,7 @@ <qresource prefix="/qmakeprojectmanager"> <file>images/run_qmake.png</file> <file>images/run_qmake_small.png</file> - <file>Qt4ProjectManager.mimetypes.xml</file> + <file>QmakeProjectManager.mimetypes.xml</file> <file>images/headers.png</file> <file>images/sources.png</file> <file>images/unknown.png</file> diff --git a/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri b/src/plugins/qmakeprojectmanager/qmakeprojectmanager_dependencies.pri index 53dbae127b..b09b47ba20 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager_dependencies.pri @@ -1,4 +1,4 @@ -QTC_PLUGIN_NAME = Qt4ProjectManager +QTC_PLUGIN_NAME = QmakeProjectManager QTC_LIB_DEPENDS += \ qmljs QTC_PLUGIN_DEPENDS += \ diff --git a/src/plugins/qt4projectmanager/qmakeprojectmanager_global.h b/src/plugins/qmakeprojectmanager/qmakeprojectmanager_global.h index 8af5a6d3e8..efb1c81827 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectmanager_global.h +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanager_global.h @@ -27,15 +27,15 @@ ** ****************************************************************************/ -#ifndef QT4PROJECTMANAGER_GLOBAL_H -#define QT4PROJECTMANAGER_GLOBAL_H +#ifndef QMAKEPROJECTMANAGER_GLOBAL_H +#define QMAKEPROJECTMANAGER_GLOBAL_H #include <qglobal.h> -#if defined(QT4PROJECTMANAGER_LIBRARY) -# define QT4PROJECTMANAGER_EXPORT Q_DECL_EXPORT +#if defined(QMAKEPROJECTMANAGER_LIBRARY) +# define QMAKEPROJECTMANAGER_EXPORT Q_DECL_EXPORT #else -# define QT4PROJECTMANAGER_EXPORT Q_DECL_IMPORT +# define QMAKEPROJECTMANAGER_EXPORT Q_DECL_IMPORT #endif -#endif // QT4PROJECTMANAGER_GLOBAL_H +#endif // QMAKEPROJECTMANAGER_GLOBAL_H diff --git a/src/plugins/qt4projectmanager/qmakeprojectmanagerconstants.h b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerconstants.h index 09cbc7fc43..349ba53977 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectmanagerconstants.h +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerconstants.h @@ -27,8 +27,8 @@ ** ****************************************************************************/ -#ifndef QT4PROJECTMANAGERCONSTANTS_H -#define QT4PROJECTMANAGERCONSTANTS_H +#ifndef QMAKEPROJECTMANAGERCONSTANTS_H +#define QMAKEPROJECTMANAGERCONSTANTS_H #include <QtGlobal> @@ -70,7 +70,7 @@ const char ADDLIBRARY[] = "Qt4.AddLibrary"; const char PROFILE_EVALUATE[] = "Qt4ProjectManager.ProFileEvaluate"; // Project -const char QT4PROJECT_ID[] = "Qt4ProjectManager.Qt4Project"; +const char QMAKEPROJECT_ID[] = "Qt4ProjectManager.Qt4Project"; // ICONS const char ICON_QTQUICK_APP[] = ":/wizards/images/qtquickapp.png"; @@ -84,5 +84,4 @@ const char QMAKEVAR_QUICK2_DEBUG[] = "CONFIG+=qml_debug"; } // namespace Constants } // namespace QmakeProjectManager -#endif // QT4PROJECTMANAGERCONSTANTS_H - +#endif // QMAKEPROJECTMANAGERCONSTANTS_H diff --git a/src/plugins/qt4projectmanager/qmakeprojectmanagerplugin.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp index 87332dc965..32e3b3034a 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectmanagerplugin.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp @@ -34,7 +34,7 @@ #include "qmakestep.h" #include "makestep.h" #include "qmakebuildconfiguration.h" -#include "qmakerunconfiguration.h" +#include "desktopqmakerunconfiguration.h" #include "wizards/consoleappwizard.h" #include "wizards/guiappwizard.h" #include "wizards/librarywizard.h" @@ -79,44 +79,44 @@ using namespace QmakeProjectManager::Internal; using namespace QmakeProjectManager; using namespace ProjectExplorer; -Qt4ProjectManagerPlugin::Qt4ProjectManagerPlugin() +QmakeProjectManagerPlugin::QmakeProjectManagerPlugin() : m_previousStartupProject(0), m_previousTarget(0) { } -Qt4ProjectManagerPlugin::~Qt4ProjectManagerPlugin() +QmakeProjectManagerPlugin::~QmakeProjectManagerPlugin() { //removeObject(m_embeddedPropertiesPage); //delete m_embeddedPropertiesPage; removeObject(m_proFileEditorFactory); delete m_proFileEditorFactory; - removeObject(m_qt4ProjectManager); - delete m_qt4ProjectManager; + removeObject(m_qmakeProjectManager); + delete m_qmakeProjectManager; } -bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *errorMessage) +bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString *errorMessage) { Q_UNUSED(arguments) const Core::Context projectContext(QmakeProjectManager::Constants::PROJECT_ID); Core::Context projecTreeContext(ProjectExplorer::Constants::C_PROJECT_TREE); - if (!Core::MimeDatabase::addMimeTypes(QLatin1String(":qmakeprojectmanager/Qt4ProjectManager.mimetypes.xml"), errorMessage)) + if (!Core::MimeDatabase::addMimeTypes(QLatin1String(":qmakeprojectmanager/QmakeProjectManager.mimetypes.xml"), errorMessage)) return false; m_projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance(); //create and register objects - m_qt4ProjectManager = new Qt4Manager(this); - addObject(m_qt4ProjectManager); + m_qmakeProjectManager = new QmakeManager(this); + addObject(m_qmakeProjectManager); TextEditor::TextEditorActionHandler *editorHandler = new TextEditor::TextEditorActionHandler(Constants::C_PROFILEEDITOR, TextEditor::TextEditorActionHandler::UnCommentSelection | TextEditor::TextEditorActionHandler::JumpToFileUnderCursor); - m_proFileEditorFactory = new ProFileEditorFactory(m_qt4ProjectManager, editorHandler); + m_proFileEditorFactory = new ProFileEditorFactory(m_qmakeProjectManager, editorHandler); ProjectExplorer::KitManager::registerKitInformation(new QmakeKitInformation); @@ -132,13 +132,13 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * addAutoReleasedObject(new TestWizard); addAutoReleasedObject(new CustomWidgetWizard); - CustomQt4ProjectWizard::registerSelf(); + CustomQmakeProjectWizard::registerSelf(); addAutoReleasedObject(new QMakeStepFactory); addAutoReleasedObject(new MakeStepFactory); - addAutoReleasedObject(new Qt4BuildConfigurationFactory); - addAutoReleasedObject(new Qt4RunConfigurationFactory); + addAutoReleasedObject(new QmakeBuildConfigurationFactory); + addAutoReleasedObject(new DesktopQmakeRunConfigurationFactory); if (Utils::HostOsInfo::isMacHost()) addAutoReleasedObject(new MacDesignerExternalEditor); @@ -171,14 +171,14 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * command->setAttribute(Core::Command::CA_UpdateText); command->setDescription(m_buildSubProjectContextMenu->text()); msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); - connect(m_buildSubProjectContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(buildSubDirContextMenu())); + connect(m_buildSubProjectContextMenu, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(buildSubDirContextMenu())); m_runQMakeActionContextMenu = new QAction(tr("Run qmake"), this); command = Core::ActionManager::registerAction(m_runQMakeActionContextMenu, Constants::RUNQMAKECONTEXTMENU, projectContext); command->setAttribute(Core::Command::CA_Hide); mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); - connect(m_runQMakeActionContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(runQMakeContextMenu())); + connect(m_runQMakeActionContextMenu, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(runQMakeContextMenu())); command = msubproject->addSeparator(projectContext, ProjectExplorer::Constants::G_PROJECT_BUILD, &m_subProjectRebuildSeparator); @@ -189,20 +189,20 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * m_rebuildSubProjectContextMenu, Constants::REBUILDSUBDIRCONTEXTMENU, projectContext); command->setAttribute(Core::Command::CA_Hide); msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); - connect(m_rebuildSubProjectContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(rebuildSubDirContextMenu())); + connect(m_rebuildSubProjectContextMenu, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(rebuildSubDirContextMenu())); m_cleanSubProjectContextMenu = new QAction(tr("Clean"), this); command = Core::ActionManager::registerAction( m_cleanSubProjectContextMenu, Constants::CLEANSUBDIRCONTEXTMENU, projectContext); command->setAttribute(Core::Command::CA_Hide); msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); - connect(m_cleanSubProjectContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(cleanSubDirContextMenu())); + connect(m_cleanSubProjectContextMenu, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(cleanSubDirContextMenu())); m_buildFileContextMenu = new QAction(tr("Build"), this); command = Core::ActionManager::registerAction(m_buildFileContextMenu, Constants::BUILDFILECONTEXTMENU, projectContext); command->setAttribute(Core::Command::CA_Hide); mfile->addAction(command, ProjectExplorer::Constants::G_FILE_OTHER); - connect(m_buildFileContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(buildFileContextMenu())); + connect(m_buildFileContextMenu, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(buildFileContextMenu())); m_buildSubProjectAction = new Utils::ParameterAction(tr("Build Subproject"), tr("Build Subproject \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); @@ -211,13 +211,13 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * command->setAttribute(Core::Command::CA_UpdateText); command->setDescription(m_buildSubProjectAction->text()); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD); - connect(m_buildSubProjectAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(buildSubDirContextMenu())); + connect(m_buildSubProjectAction, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(buildSubDirContextMenu())); m_runQMakeAction = new QAction(tr("Run qmake"), this); command = Core::ActionManager::registerAction(m_runQMakeAction, Constants::RUNQMAKE, projectContext); command->setAttribute(Core::Command::CA_Hide); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD); - connect(m_runQMakeAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(runQMake())); + connect(m_runQMakeAction, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(runQMake())); m_rebuildSubProjectAction = new Utils::ParameterAction(tr("Rebuild Subproject"), tr("Rebuild Subproject \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); @@ -226,7 +226,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * command->setAttribute(Core::Command::CA_UpdateText); command->setDescription(m_rebuildSubProjectAction->text()); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_REBUILD); - connect(m_rebuildSubProjectAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(rebuildSubDirContextMenu())); + connect(m_rebuildSubProjectAction, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(rebuildSubDirContextMenu())); m_cleanSubProjectAction = new Utils::ParameterAction(tr("Clean Subproject"), tr("Clean Subproject \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); @@ -235,7 +235,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * command->setAttribute(Core::Command::CA_UpdateText); command->setDescription(m_cleanSubProjectAction->text()); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_CLEAN); - connect(m_cleanSubProjectAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(cleanSubDirContextMenu())); + connect(m_cleanSubProjectAction, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(cleanSubDirContextMenu())); const Core::Context globalcontext(Core::Constants::C_GLOBAL); m_buildFileAction = new Utils::ParameterAction(tr("Build File"), tr("Build File \"%1\""), @@ -246,7 +246,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * command->setDescription(m_buildFileAction->text()); command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+B"))); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD); - connect(m_buildFileAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(buildFile())); + connect(m_buildFileAction, SIGNAL(triggered()), m_qmakeProjectManager, SLOT(buildFile())); connect(BuildManager::instance(), SIGNAL(buildStateChanged(ProjectExplorer::Project*)), this, SLOT(buildStateChanged(ProjectExplorer::Project*))); @@ -266,14 +266,14 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * command = Core::ActionManager::registerAction(m_addLibraryAction, Constants::ADDLIBRARY, proFileEditorContext); connect(m_addLibraryAction, SIGNAL(triggered()), - m_qt4ProjectManager, SLOT(addLibrary())); + m_qmakeProjectManager, SLOT(addLibrary())); contextMenu->addAction(command); m_addLibraryActionContextMenu = new QAction(tr("Add Library..."), this); command = Core::ActionManager::registerAction(m_addLibraryActionContextMenu, Constants::ADDLIBRARY, projecTreeContext); connect(m_addLibraryActionContextMenu, SIGNAL(triggered()), - m_qt4ProjectManager, SLOT(addLibraryContextMenu())); + m_qmakeProjectManager, SLOT(addLibraryContextMenu())); mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_FILES); msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_FILES); @@ -288,16 +288,16 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * return true; } -void Qt4ProjectManagerPlugin::extensionsInitialized() +void QmakeProjectManagerPlugin::extensionsInitialized() { } -void Qt4ProjectManagerPlugin::startupProjectChanged() +void QmakeProjectManagerPlugin::startupProjectChanged() { if (m_previousStartupProject) disconnect(m_previousStartupProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), this, SLOT(activeTargetChanged())); - m_previousStartupProject = qobject_cast<Qt4Project *>(SessionManager::startupProject()); + m_previousStartupProject = qobject_cast<QmakeProject *>(SessionManager::startupProject()); if (m_previousStartupProject) connect(m_previousStartupProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), @@ -306,7 +306,7 @@ void Qt4ProjectManagerPlugin::startupProjectChanged() activeTargetChanged(); } -void Qt4ProjectManagerPlugin::activeTargetChanged() +void QmakeProjectManagerPlugin::activeTargetChanged() { if (m_previousTarget) disconnect(m_previousTarget, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)), @@ -321,12 +321,12 @@ void Qt4ProjectManagerPlugin::activeTargetChanged() updateRunQMakeAction(); } -void Qt4ProjectManagerPlugin::updateRunQMakeAction() +void QmakeProjectManagerPlugin::updateRunQMakeAction() { bool enable = true; if (BuildManager::isBuilding(m_projectExplorer->currentProject())) enable = false; - Qt4Project *pro = qobject_cast<Qt4Project *>(m_projectExplorer->currentProject()); + QmakeProject *pro = qobject_cast<QmakeProject *>(m_projectExplorer->currentProject()); if (!pro || !pro->activeTarget() || !pro->activeTarget()->activeBuildConfiguration()) @@ -335,22 +335,26 @@ void Qt4ProjectManagerPlugin::updateRunQMakeAction() m_runQMakeAction->setEnabled(enable); } -void Qt4ProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node, ProjectExplorer::Project *project) +void QmakeProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node, ProjectExplorer::Project *project) { - m_addLibraryActionContextMenu->setEnabled(qobject_cast<Qt4ProFileNode *>(node)); - - Qt4ProFileNode *proFileNode = qobject_cast<Qt4ProFileNode *>(node); - Qt4Project *qt4Project = qobject_cast<Qt4Project *>(project); - Qt4ProFileNode *subProjectNode = node ? qobject_cast<Qt4ProFileNode *>(node->projectNode()) : 0; + m_addLibraryActionContextMenu->setEnabled(qobject_cast<QmakeProFileNode *>(node)); + + QmakeProFileNode *proFileNode = qobject_cast<QmakeProFileNode *>(node); + QmakeProject *qmakeProject = qobject_cast<QmakeProject *>(project); + QmakeProFileNode *subProjectNode = 0; + if (node) { + if (QmakePriFileNode *subPriFileNode = qobject_cast<QmakePriFileNode *>(node->projectNode())) + subProjectNode = subPriFileNode->proFileNode(); + } ProjectExplorer::FileNode *fileNode = qobject_cast<ProjectExplorer::FileNode *>(node); bool buildFilePossible = subProjectNode && fileNode && (fileNode->fileType() == ProjectExplorer::SourceType); - m_qt4ProjectManager->setContextNode(subProjectNode); - m_qt4ProjectManager->setContextProject(qt4Project); - m_qt4ProjectManager->setContextFile(buildFilePossible ? fileNode : 0); + m_qmakeProjectManager->setContextNode(subProjectNode); + m_qmakeProjectManager->setContextProject(qmakeProject); + m_qmakeProjectManager->setContextFile(buildFilePossible ? fileNode : 0); - bool subProjectActionsVisible = qt4Project && subProjectNode && (subProjectNode != qt4Project->rootProjectNode()); + bool subProjectActionsVisible = qmakeProject && subProjectNode && (subProjectNode != qmakeProject->rootProjectNode()); QString subProjectName; if (subProjectActionsVisible) @@ -362,9 +366,9 @@ void Qt4ProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node, m_buildSubProjectContextMenu->setParameter(subProjectName); m_buildFileAction->setParameter(buildFilePossible ? QFileInfo(fileNode->path()).fileName() : QString()); - Qt4BuildConfiguration *buildConfiguration = (qt4Project && qt4Project->activeTarget()) ? - static_cast<Qt4BuildConfiguration *>(qt4Project->activeTarget()->activeBuildConfiguration()) : 0; - bool isProjectNode = qt4Project && proFileNode && buildConfiguration; + QmakeBuildConfiguration *buildConfiguration = (qmakeProject && qmakeProject->activeTarget()) ? + static_cast<QmakeBuildConfiguration *>(qmakeProject->activeTarget()->activeBuildConfiguration()) : 0; + bool isProjectNode = qmakeProject && proFileNode && buildConfiguration; bool isBuilding = BuildManager::isBuilding(project); bool enabled = subProjectActionsVisible && !isBuilding; @@ -391,7 +395,7 @@ void Qt4ProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node, m_buildFileContextMenu->setEnabled(buildFilePossible && !isBuilding); } -void Qt4ProjectManagerPlugin::buildStateChanged(ProjectExplorer::Project *pro) +void QmakeProjectManagerPlugin::buildStateChanged(ProjectExplorer::Project *pro) { ProjectExplorer::Project *currentProject = m_projectExplorer->currentProject(); if (pro == currentProject) { @@ -401,7 +405,7 @@ void Qt4ProjectManagerPlugin::buildStateChanged(ProjectExplorer::Project *pro) } } -void Qt4ProjectManagerPlugin::updateBuildFileAction() +void QmakeProjectManagerPlugin::updateBuildFileAction() { bool visible = false; bool enabled = false; @@ -411,9 +415,9 @@ void Qt4ProjectManagerPlugin::updateBuildFileAction() Node *node = SessionManager::nodeForFile(file); Project *project = SessionManager::projectForFile(file); m_buildFileAction->setParameter(QFileInfo(file).fileName()); - visible = qobject_cast<Qt4Project *>(project) + visible = qobject_cast<QmakeProject *>(project) && node - && qobject_cast<Qt4ProFileNode *>(node->projectNode()); + && qobject_cast<QmakePriFileNode *>(node->projectNode()); enabled = !BuildManager::isBuilding(project); } @@ -421,4 +425,4 @@ void Qt4ProjectManagerPlugin::updateBuildFileAction() m_buildFileAction->setEnabled(enabled); } -Q_EXPORT_PLUGIN(Qt4ProjectManagerPlugin) +Q_EXPORT_PLUGIN(QmakeProjectManagerPlugin) diff --git a/src/plugins/qt4projectmanager/qmakeprojectmanagerplugin.h b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.h index 935bd9be84..974458d33c 100644 --- a/src/plugins/qt4projectmanager/qmakeprojectmanagerplugin.h +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.h @@ -27,8 +27,8 @@ ** ****************************************************************************/ -#ifndef QT4PROJECTMANAGERPLUGIN_H -#define QT4PROJECTMANAGERPLUGIN_H +#ifndef QMAKEPROJECTMANAGERPLUGIN_H +#define QMAKEPROJECTMANAGERPLUGIN_H #include <extensionsystem/iplugin.h> #include <coreplugin/icontext.h> @@ -48,22 +48,22 @@ namespace Utils { class ParameterAction; } namespace QmakeProjectManager { -class Qt4Manager; +class QmakeManager; class QtVersionManager; -class Qt4Project; +class QmakeProject; namespace Internal { class ProFileEditorFactory; -class Qt4ProjectManagerPlugin : public ExtensionSystem::IPlugin +class QmakeProjectManagerPlugin : public ExtensionSystem::IPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Qt4ProjectManager.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmakeProjectManager.json") public: - Qt4ProjectManagerPlugin(); - ~Qt4ProjectManagerPlugin(); + QmakeProjectManagerPlugin(); + ~QmakeProjectManagerPlugin(); bool initialize(const QStringList &arguments, QString *errorMessage); void extensionsInitialized(); @@ -83,8 +83,8 @@ private slots: private: ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer; ProFileEditorFactory *m_proFileEditorFactory; - Qt4Manager *m_qt4ProjectManager; - Qt4Project *m_previousStartupProject; + QmakeManager *m_qmakeProjectManager; + QmakeProject *m_previousStartupProject; ProjectExplorer::Target *m_previousTarget; QAction *m_runQMakeAction; @@ -106,4 +106,4 @@ private: } // namespace Internal } // namespace QmakeProjectManager -#endif // QT4PROJECTMANAGERPLUGIN_H +#endif // QMAKEPROJECTMANAGERPLUGIN_H diff --git a/src/plugins/qt4projectmanager/qmakerunconfigurationfactory.cpp b/src/plugins/qmakeprojectmanager/qmakerunconfigurationfactory.cpp index cf716fce4b..cf716fce4b 100644 --- a/src/plugins/qt4projectmanager/qmakerunconfigurationfactory.cpp +++ b/src/plugins/qmakeprojectmanager/qmakerunconfigurationfactory.cpp diff --git a/src/plugins/qt4projectmanager/qmakerunconfigurationfactory.h b/src/plugins/qmakeprojectmanager/qmakerunconfigurationfactory.h index 6281cb8e07..677ad12e21 100644 --- a/src/plugins/qt4projectmanager/qmakerunconfigurationfactory.h +++ b/src/plugins/qmakeprojectmanager/qmakerunconfigurationfactory.h @@ -38,7 +38,7 @@ namespace ProjectExplorer { class Node; } namespace QmakeProjectManager { -class QT4PROJECTMANAGER_EXPORT QmakeRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory +class QMAKEPROJECTMANAGER_EXPORT QmakeRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory { Q_OBJECT diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index 0980c48982..397eef5a38 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -103,9 +103,9 @@ QMakeStep::~QMakeStep() { } -Qt4BuildConfiguration *QMakeStep::qt4BuildConfiguration() const +QmakeBuildConfiguration *QMakeStep::qmakeBuildConfiguration() const { - return static_cast<Qt4BuildConfiguration *>(buildConfiguration()); + return static_cast<QmakeBuildConfiguration *>(buildConfiguration()); } /// @@ -117,7 +117,7 @@ Qt4BuildConfiguration *QMakeStep::qt4BuildConfiguration() const /// user arguments QString QMakeStep::allArguments(bool shorted) { - Qt4BuildConfiguration *bc = qt4BuildConfiguration(); + QmakeBuildConfiguration *bc = qmakeBuildConfiguration(); QStringList arguments; if (bc->subNodeBuild()) arguments << QDir::toNativeSeparators(bc->subNodeBuild()->path()); @@ -231,7 +231,7 @@ QStringList QMakeStep::deducedArgumentsAfter() bool QMakeStep::init() { - Qt4BuildConfiguration *qt4bc = qt4BuildConfiguration(); + QmakeBuildConfiguration *qt4bc = qmakeBuildConfiguration(); const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target()->kit()); if (!qtVersion) @@ -262,7 +262,7 @@ bool QMakeStep::init() } // Check whether we need to run qmake - bool makefileOutDated = (qt4bc->compareToImportFrom(makefile) != Qt4BuildConfiguration::MakefileMatches); + bool makefileOutDated = (qt4bc->compareToImportFrom(makefile) != QmakeBuildConfiguration::MakefileMatches); if (m_forced || makefileOutDated) m_needToRunQMake = true; m_forced = false; @@ -277,7 +277,7 @@ bool QMakeStep::init() setOutputParser(new QMakeParser); - Qt4ProFileNode *node = static_cast<Qt4Project *>(qt4bc->target()->project())->rootQt4ProjectNode(); + QmakeProFileNode *node = static_cast<QmakeProject *>(qt4bc->target()->project())->rootQmakeProjectNode(); if (qt4bc->subNodeBuild()) node = qt4bc->subNodeBuild(); QString proFile = node->path(); @@ -353,7 +353,7 @@ bool QMakeStep::processSucceeded(int exitCode, QProcess::ExitStatus status) bool result = AbstractProcessStep::processSucceeded(exitCode, status); if (!result) m_needToRunQMake = true; - Qt4Project *project = static_cast<Qt4Project *>(qt4BuildConfiguration()->target()->project()); + QmakeProject *project = static_cast<QmakeProject *>(qmakeBuildConfiguration()->target()->project()); project->emitBuildDirectoryInitialized(); return result; } @@ -366,8 +366,8 @@ void QMakeStep::setUserArguments(const QString &arguments) emit userArgumentsChanged(); - qt4BuildConfiguration()->emitQMakeBuildConfigurationChanged(); - qt4BuildConfiguration()->emitProFileEvaluateNeeded(); + qmakeBuildConfiguration()->emitQMakeBuildConfigurationChanged(); + qmakeBuildConfiguration()->emitProFileEvaluateNeeded(); } bool QMakeStep::linkQmlDebuggingLibrary() const @@ -376,7 +376,7 @@ bool QMakeStep::linkQmlDebuggingLibrary() const return true; if (m_linkQmlDebuggingLibrary == DoNotLink) return false; - return (qt4BuildConfiguration()->buildType() & BuildConfiguration::Debug); + return (qmakeBuildConfiguration()->buildType() & BuildConfiguration::Debug); } void QMakeStep::setLinkQmlDebuggingLibrary(bool enable) @@ -388,8 +388,8 @@ void QMakeStep::setLinkQmlDebuggingLibrary(bool enable) emit linkQmlDebuggingLibraryChanged(); - qt4BuildConfiguration()->emitQMakeBuildConfigurationChanged(); - qt4BuildConfiguration()->emitProFileEvaluateNeeded(); + qmakeBuildConfiguration()->emitQMakeBuildConfigurationChanged(); + qmakeBuildConfiguration()->emitProFileEvaluateNeeded(); } QStringList QMakeStep::parserArguments() @@ -476,7 +476,7 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step) this, SLOT(userArgumentsChanged())); connect(step, SIGNAL(linkQmlDebuggingLibraryChanged()), this, SLOT(linkQmlDebuggingLibraryChanged())); - connect(step->qt4BuildConfiguration(), SIGNAL(qmakeBuildConfigurationChanged()), + connect(step->qmakeBuildConfiguration(), SIGNAL(qmakeBuildConfigurationChanged()), this, SLOT(qmakeBuildConfigChanged())); connect(step->target(), SIGNAL(kitChanged()), this, SLOT(qtVersionChanged())); connect(QtSupport::QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(Utils::FileName)), @@ -512,7 +512,7 @@ void QMakeStepConfigWidget::qtVersionChanged() void QMakeStepConfigWidget::qmakeBuildConfigChanged() { - Qt4BuildConfiguration *bc = m_step->qt4BuildConfiguration(); + QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration(); bool debug = bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild; m_ignoreChange = true; m_ui->buildConfigurationComboBox->setCurrentIndex(debug? 0 : 1); @@ -555,7 +555,7 @@ void QMakeStepConfigWidget::buildConfigurationSelected() { if (m_ignoreChange) return; - Qt4BuildConfiguration *bc = m_step->qt4BuildConfiguration(); + QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration(); QtSupport::BaseQtVersion::QmakeBuildConfigs buildConfiguration = bc->qmakeBuildConfiguration(); if (m_ui->buildConfigurationComboBox->currentIndex() == 0) { // debug buildConfiguration = buildConfiguration | QtSupport::BaseQtVersion::DebugBuild; @@ -639,7 +639,7 @@ void QMakeStepConfigWidget::updateEffectiveQMakeCall() void QMakeStepConfigWidget::recompileMessageBoxFinished(int button) { if (button == QMessageBox::Yes) { - Qt4BuildConfiguration *bc = m_step->qt4BuildConfiguration(); + QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration(); if (!bc) return; @@ -677,7 +677,7 @@ bool QMakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const { if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD) return false; - if (!qobject_cast<Qt4BuildConfiguration *>(parent->parent())) + if (!qobject_cast<QmakeBuildConfiguration *>(parent->parent())) return false; return id == QMAKE_BS_ID; } @@ -720,7 +720,7 @@ ProjectExplorer::BuildStep *QMakeStepFactory::restore(BuildStepList *parent, con QList<Core::Id> QMakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const { if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD) - if (Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(parent->parent())) + if (QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(parent->parent())) if (!bc->qmakeStep()) return QList<Core::Id>() << Core::Id(QMAKE_BS_ID); return QList<Core::Id>(); diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qmakeprojectmanager/qmakestep.h index e12a9cc7e7..1e1ab8fbc4 100644 --- a/src/plugins/qt4projectmanager/qmakestep.h +++ b/src/plugins/qmakeprojectmanager/qmakestep.h @@ -44,8 +44,8 @@ class Project; } namespace QmakeProjectManager { -class Qt4BuildConfiguration; -class Qt4Project; +class QmakeBuildConfiguration; +class QmakeProject; namespace Internal { @@ -71,7 +71,7 @@ public: } // namespace Internal -class QT4PROJECTMANAGER_EXPORT QMakeStep : public ProjectExplorer::AbstractProcessStep +class QMAKEPROJECTMANAGER_EXPORT QMakeStep : public ProjectExplorer::AbstractProcessStep { Q_OBJECT friend class Internal::QMakeStepFactory; @@ -86,7 +86,7 @@ public: explicit QMakeStep(ProjectExplorer::BuildStepList *parent); virtual ~QMakeStep(); - Qt4BuildConfiguration *qt4BuildConfiguration() const; + QmakeBuildConfiguration *qmakeBuildConfiguration() const; virtual bool init(); virtual void run(QFutureInterface<bool> &); virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget(); diff --git a/src/plugins/qt4projectmanager/qmakestep.ui b/src/plugins/qmakeprojectmanager/qmakestep.ui index 43c5828044..43c5828044 100644 --- a/src/plugins/qt4projectmanager/qmakestep.ui +++ b/src/plugins/qmakeprojectmanager/qmakestep.ui diff --git a/src/plugins/qt4projectmanager/qtmodulesinfo.cpp b/src/plugins/qmakeprojectmanager/qtmodulesinfo.cpp index 4c303d0d44..4c303d0d44 100644 --- a/src/plugins/qt4projectmanager/qtmodulesinfo.cpp +++ b/src/plugins/qmakeprojectmanager/qtmodulesinfo.cpp diff --git a/src/plugins/qt4projectmanager/qtmodulesinfo.h b/src/plugins/qmakeprojectmanager/qtmodulesinfo.h index ffb41b655f..ffb41b655f 100644 --- a/src/plugins/qt4projectmanager/qtmodulesinfo.h +++ b/src/plugins/qmakeprojectmanager/qtmodulesinfo.h diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp b/src/plugins/qmakeprojectmanager/wizards/abstractmobileapp.cpp index 8f61645ac5..8f61645ac5 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/abstractmobileapp.cpp diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.h b/src/plugins/qmakeprojectmanager/wizards/abstractmobileapp.h index e7e0dd1838..0ea6a52504 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.h +++ b/src/plugins/qmakeprojectmanager/wizards/abstractmobileapp.h @@ -45,7 +45,7 @@ namespace QmakeProjectManager { /// \internal struct #ifndef CREATORLESSTEST - QT4PROJECTMANAGER_EXPORT + QMAKEPROJECTMANAGER_EXPORT #endif // CREATORLESSTEST AbstractGeneratedFileInfo { @@ -73,7 +73,7 @@ typedef QPair<QString, QString> DeploymentFolder; // QPair<.source, .target> /// \internal class #ifndef CREATORLESSTEST - QT4PROJECTMANAGER_EXPORT + QMAKEPROJECTMANAGER_EXPORT #endif // CREATORLESSTEST AbstractMobileApp : public QObject { diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/abstractmobileappwizard.cpp index ffee57a04b..0bd6459c20 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/abstractmobileappwizard.cpp @@ -33,8 +33,8 @@ #include "../qmakeprojectimporter.h" #include <extensionsystem/pluginmanager.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakeprojectmanager.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeprojectmanager.h> #include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtkitinformation.h> #include <projectexplorer/projectexplorer.h> @@ -212,10 +212,10 @@ bool AbstractMobileAppWizard::postGenerateFiles(const QWizard *w, Q_UNUSED(w) Q_UNUSED(l) Q_UNUSED(errorMessage) - Qt4Manager * const manager - = ExtensionSystem::PluginManager::getObject<Qt4Manager>(); + QmakeManager * const manager + = ExtensionSystem::PluginManager::getObject<QmakeManager>(); Q_ASSERT(manager); - Qt4Project project(manager, app()->path(AbstractMobileApp::AppPro)); + QmakeProject project(manager, app()->path(AbstractMobileApp::AppPro)); bool success = true; if (wizardDialog()->m_targetsPage) { success = wizardDialog()->m_targetsPage->setupProject(&project); diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h b/src/plugins/qmakeprojectmanager/wizards/abstractmobileappwizard.h index dd0476770a..a7d1c6074d 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/abstractmobileappwizard.h @@ -30,7 +30,7 @@ #ifndef ABSTRACTMOBILEAPPWIZARD_H #define ABSTRACTMOBILEAPPWIZARD_H -#include <qt4projectmanager/qmakeprojectmanager_global.h> +#include <qmakeprojectmanager/qmakeprojectmanager_global.h> #include <projectexplorer/baseprojectwizarddialog.h> namespace ProjectExplorer { class TargetSetupPage; } @@ -47,7 +47,7 @@ class AbstractMobileApp; namespace Internal { class MobileAppWizardGenericOptionsPage; } /// \internal -class QT4PROJECTMANAGER_EXPORT AbstractMobileAppWizardDialog : public ProjectExplorer::BaseProjectWizardDialog +class QMAKEPROJECTMANAGER_EXPORT AbstractMobileAppWizardDialog : public ProjectExplorer::BaseProjectWizardDialog { Q_OBJECT @@ -88,7 +88,7 @@ private: }; /// \internal -class QT4PROJECTMANAGER_EXPORT AbstractMobileAppWizard : public Core::BaseFileWizard +class QMAKEPROJECTMANAGER_EXPORT AbstractMobileAppWizard : public Core::BaseFileWizard { Q_OBJECT protected: diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/consoleappwizard.cpp index b3dc87af80..b3dc87af80 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/consoleappwizard.cpp diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizard.h b/src/plugins/qmakeprojectmanager/wizards/consoleappwizard.h index 56301b0932..56301b0932 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/consoleappwizard.h diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp b/src/plugins/qmakeprojectmanager/wizards/consoleappwizarddialog.cpp index b3c5db9086..7b452b3d8b 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/consoleappwizarddialog.cpp @@ -39,7 +39,7 @@ ConsoleAppWizardDialog::ConsoleAppWizardDialog(const QString &templateName, const QIcon &icon, bool showModulesPage, QWidget *parent, const Core::WizardDialogParameters ¶meters) : - BaseQt4ProjectWizardDialog(showModulesPage, parent, parameters) + BaseQmakeProjectWizardDialog(showModulesPage, parent, parameters) { setWindowIcon(icon); setWindowTitle(templateName); diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h b/src/plugins/qmakeprojectmanager/wizards/consoleappwizarddialog.h index 8c3bf3e9ef..6e26095340 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h +++ b/src/plugins/qmakeprojectmanager/wizards/consoleappwizarddialog.h @@ -37,7 +37,7 @@ namespace Internal { struct QtProjectParameters; -class ConsoleAppWizardDialog : public BaseQt4ProjectWizardDialog +class ConsoleAppWizardDialog : public BaseQmakeProjectWizardDialog { Q_OBJECT public: diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/emptyprojectwizard.cpp index 514a9c67fe..514a9c67fe 100644 --- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/emptyprojectwizard.cpp diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.h b/src/plugins/qmakeprojectmanager/wizards/emptyprojectwizard.h index ec1684cbe8..ec1684cbe8 100644 --- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/emptyprojectwizard.h diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp b/src/plugins/qmakeprojectmanager/wizards/emptyprojectwizarddialog.cpp index 574bc2e053..35830c7e2d 100644 --- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/emptyprojectwizarddialog.cpp @@ -36,7 +36,7 @@ namespace Internal { EmptyProjectWizardDialog::EmptyProjectWizardDialog(const QString &templateName, const QIcon &icon, QWidget *parent, const Core::WizardDialogParameters ¶meters) : - BaseQt4ProjectWizardDialog(false, parent, parameters) + BaseQmakeProjectWizardDialog(false, parent, parameters) { setWindowIcon(icon); setWindowTitle(templateName); diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h b/src/plugins/qmakeprojectmanager/wizards/emptyprojectwizarddialog.h index 05bfa502a3..02fc69ca9d 100644 --- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h +++ b/src/plugins/qmakeprojectmanager/wizards/emptyprojectwizarddialog.h @@ -37,7 +37,7 @@ namespace Internal { struct QtProjectParameters; -class EmptyProjectWizardDialog : public BaseQt4ProjectWizardDialog +class EmptyProjectWizardDialog : public BaseQmakeProjectWizardDialog { Q_OBJECT public: diff --git a/src/plugins/qt4projectmanager/wizards/filespage.cpp b/src/plugins/qmakeprojectmanager/wizards/filespage.cpp index ff0127c863..ff0127c863 100644 --- a/src/plugins/qt4projectmanager/wizards/filespage.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/filespage.cpp diff --git a/src/plugins/qt4projectmanager/wizards/filespage.h b/src/plugins/qmakeprojectmanager/wizards/filespage.h index 6b63d94268..6b63d94268 100644 --- a/src/plugins/qt4projectmanager/wizards/filespage.h +++ b/src/plugins/qmakeprojectmanager/wizards/filespage.h diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/guiappwizard.cpp index 171277b616..171277b616 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/guiappwizard.cpp diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.h b/src/plugins/qmakeprojectmanager/wizards/guiappwizard.h index b52f74817c..b52f74817c 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/guiappwizard.h diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp b/src/plugins/qmakeprojectmanager/wizards/guiappwizarddialog.cpp index d6a1c534d5..bd201531c5 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/guiappwizarddialog.cpp @@ -50,7 +50,7 @@ GuiAppWizardDialog::GuiAppWizardDialog(const QString &templateName, bool isMobile, QWidget *parent, const Core::WizardDialogParameters ¶meters) : - BaseQt4ProjectWizardDialog(showModulesPage, parent, parameters), + BaseQmakeProjectWizardDialog(showModulesPage, parent, parameters), m_filesPage(new FilesPage) { setWindowIcon(icon); diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h b/src/plugins/qmakeprojectmanager/wizards/guiappwizarddialog.h index 42a46a9b88..180e523f55 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h +++ b/src/plugins/qmakeprojectmanager/wizards/guiappwizarddialog.h @@ -53,7 +53,7 @@ struct GuiAppParameters bool isMobileApplication; }; -class GuiAppWizardDialog : public BaseQt4ProjectWizardDialog +class GuiAppWizardDialog : public BaseQmakeProjectWizardDialog { Q_OBJECT diff --git a/src/plugins/qt4projectmanager/wizards/html5app.cpp b/src/plugins/qmakeprojectmanager/wizards/html5app.cpp index 53187641d1..53187641d1 100644 --- a/src/plugins/qt4projectmanager/wizards/html5app.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/html5app.cpp diff --git a/src/plugins/qt4projectmanager/wizards/html5app.h b/src/plugins/qmakeprojectmanager/wizards/html5app.h index e1ca179451..e1ca179451 100644 --- a/src/plugins/qt4projectmanager/wizards/html5app.h +++ b/src/plugins/qmakeprojectmanager/wizards/html5app.h diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/html5appwizard.cpp index 4b002c9464..5d73d446a6 100644 --- a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/html5appwizard.cpp @@ -31,7 +31,7 @@ #include "html5app.h" #include "html5appwizardpages.h" -#include <qt4projectmanager/qmakeprojectmanagerconstants.h> +#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> #include <qtsupport/baseqtversion.h> #include <projectexplorer/projectexplorerconstants.h> diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizard.h b/src/plugins/qmakeprojectmanager/wizards/html5appwizard.h index d82ce8f6a4..d82ce8f6a4 100644 --- a/src/plugins/qt4projectmanager/wizards/html5appwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/html5appwizard.h diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizardpages.cpp b/src/plugins/qmakeprojectmanager/wizards/html5appwizardpages.cpp index 45c7278efe..45c7278efe 100644 --- a/src/plugins/qt4projectmanager/wizards/html5appwizardpages.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/html5appwizardpages.cpp diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizardpages.h b/src/plugins/qmakeprojectmanager/wizards/html5appwizardpages.h index c90ecadb1c..c90ecadb1c 100644 --- a/src/plugins/qt4projectmanager/wizards/html5appwizardpages.h +++ b/src/plugins/qmakeprojectmanager/wizards/html5appwizardpages.h diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizardsourcespage.ui b/src/plugins/qmakeprojectmanager/wizards/html5appwizardsourcespage.ui index b2a10f3877..b2a10f3877 100644 --- a/src/plugins/qt4projectmanager/wizards/html5appwizardsourcespage.ui +++ b/src/plugins/qmakeprojectmanager/wizards/html5appwizardsourcespage.ui diff --git a/src/plugins/qt4projectmanager/wizards/images/console.png b/src/plugins/qmakeprojectmanager/wizards/images/console.png Binary files differindex 7569a988f4..7569a988f4 100644 --- a/src/plugins/qt4projectmanager/wizards/images/console.png +++ b/src/plugins/qmakeprojectmanager/wizards/images/console.png diff --git a/src/plugins/qt4projectmanager/wizards/images/gui.png b/src/plugins/qmakeprojectmanager/wizards/images/gui.png Binary files differindex c121959d9e..c121959d9e 100644 --- a/src/plugins/qt4projectmanager/wizards/images/gui.png +++ b/src/plugins/qmakeprojectmanager/wizards/images/gui.png diff --git a/src/plugins/qt4projectmanager/wizards/images/html5app.png b/src/plugins/qmakeprojectmanager/wizards/images/html5app.png Binary files differindex 199ec43511..199ec43511 100644 --- a/src/plugins/qt4projectmanager/wizards/images/html5app.png +++ b/src/plugins/qmakeprojectmanager/wizards/images/html5app.png diff --git a/src/plugins/qt4projectmanager/wizards/images/lib.png b/src/plugins/qmakeprojectmanager/wizards/images/lib.png Binary files differindex a4e818d986..a4e818d986 100644 --- a/src/plugins/qt4projectmanager/wizards/images/lib.png +++ b/src/plugins/qmakeprojectmanager/wizards/images/lib.png diff --git a/src/plugins/qt4projectmanager/wizards/images/qtquickapp.png b/src/plugins/qmakeprojectmanager/wizards/images/qtquickapp.png Binary files differindex 23c0236871..23c0236871 100644 --- a/src/plugins/qt4projectmanager/wizards/images/qtquickapp.png +++ b/src/plugins/qmakeprojectmanager/wizards/images/qtquickapp.png diff --git a/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp b/src/plugins/qmakeprojectmanager/wizards/libraryparameters.cpp index 17dddc6b62..17dddc6b62 100644 --- a/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/libraryparameters.cpp diff --git a/src/plugins/qt4projectmanager/wizards/libraryparameters.h b/src/plugins/qmakeprojectmanager/wizards/libraryparameters.h index 06ba9b5e76..06ba9b5e76 100644 --- a/src/plugins/qt4projectmanager/wizards/libraryparameters.h +++ b/src/plugins/qmakeprojectmanager/wizards/libraryparameters.h diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qmakeprojectmanager/wizards/librarywizard.cpp index b39f26c586..b39f26c586 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/librarywizard.cpp diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.h b/src/plugins/qmakeprojectmanager/wizards/librarywizard.h index 5ad87a7e5c..5ad87a7e5c 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/librarywizard.h diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp b/src/plugins/qmakeprojectmanager/wizards/librarywizarddialog.cpp index 1d978acdc9..95707ef85d 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/librarywizarddialog.cpp @@ -135,7 +135,7 @@ LibraryWizardDialog::LibraryWizardDialog(const QString &templateName, bool showModulesPage, QWidget *parent, const Core::WizardDialogParameters ¶meters) : - BaseQt4ProjectWizardDialog(showModulesPage, new LibraryIntroPage, -1, parent, parameters), + BaseQmakeProjectWizardDialog(showModulesPage, new LibraryIntroPage, -1, parent, parameters), m_filesPage(new FilesPage), m_mobilePage(new MobileLibraryWizardOptionPage), m_pluginBaseClassesInitialized(false), @@ -247,7 +247,7 @@ int LibraryWizardDialog::nextId() const return skipModulesPageIfNeeded(); } - return BaseQt4ProjectWizardDialog::nextId(); + return BaseQmakeProjectWizardDialog::nextId(); } void LibraryWizardDialog::initializePage(int id) @@ -262,7 +262,7 @@ void LibraryWizardDialog::initializePage(int id) mobileItem->setNextShownItem(modulesItem); } - BaseQt4ProjectWizardDialog::initializePage(id); + BaseQmakeProjectWizardDialog::initializePage(id); } void LibraryWizardDialog::cleanupPage(int id) @@ -271,7 +271,7 @@ void LibraryWizardDialog::cleanupPage(int id) Utils::WizardProgressItem *mobileItem = wizardProgress()->item(m_mobilePageId); mobileItem->setNextShownItem(0); } - BaseQt4ProjectWizardDialog::cleanupPage(id); + BaseQmakeProjectWizardDialog::cleanupPage(id); } QtProjectParameters LibraryWizardDialog::parameters() const diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h b/src/plugins/qmakeprojectmanager/wizards/librarywizarddialog.h index 3cab4b1b85..34b8817dc3 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h +++ b/src/plugins/qmakeprojectmanager/wizards/librarywizarddialog.h @@ -42,7 +42,7 @@ struct LibraryParameters; struct MobileLibraryParameters; // Library wizard dialog. -class LibraryWizardDialog : public BaseQt4ProjectWizardDialog +class LibraryWizardDialog : public BaseQmakeProjectWizardDialog { Q_OBJECT diff --git a/src/plugins/qt4projectmanager/wizards/mobileapp.cpp b/src/plugins/qmakeprojectmanager/wizards/mobileapp.cpp index 83bacdd630..83bacdd630 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileapp.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/mobileapp.cpp diff --git a/src/plugins/qt4projectmanager/wizards/mobileapp.h b/src/plugins/qmakeprojectmanager/wizards/mobileapp.h index 3b7f60f33e..3b7f60f33e 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileapp.h +++ b/src/plugins/qmakeprojectmanager/wizards/mobileapp.h diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizardgenericoptionspage.ui b/src/plugins/qmakeprojectmanager/wizards/mobileappwizardgenericoptionspage.ui index 14aa1d8d1b..14aa1d8d1b 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileappwizardgenericoptionspage.ui +++ b/src/plugins/qmakeprojectmanager/wizards/mobileappwizardgenericoptionspage.ui diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp b/src/plugins/qmakeprojectmanager/wizards/mobileappwizardpages.cpp index 0d3cc6a5af..0d3cc6a5af 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/mobileappwizardpages.cpp diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h b/src/plugins/qmakeprojectmanager/wizards/mobileappwizardpages.h index 2e09d750a7..2e09d750a7 100644 --- a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h +++ b/src/plugins/qmakeprojectmanager/wizards/mobileappwizardpages.h diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp b/src/plugins/qmakeprojectmanager/wizards/mobilelibraryparameters.cpp index adf066f57a..adf066f57a 100644 --- a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/mobilelibraryparameters.cpp diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.h b/src/plugins/qmakeprojectmanager/wizards/mobilelibraryparameters.h index 060fd577b1..060fd577b1 100644 --- a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.h +++ b/src/plugins/qmakeprojectmanager/wizards/mobilelibraryparameters.h diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.cpp b/src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.cpp index 32645adbab..32645adbab 100644 --- a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.cpp diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.h b/src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.h index 5dbf54b3cb..5dbf54b3cb 100644 --- a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.h +++ b/src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.h diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.ui b/src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.ui index 6659767512..6659767512 100644 --- a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.ui +++ b/src/plugins/qmakeprojectmanager/wizards/mobilelibrarywizardoptionpage.ui diff --git a/src/plugins/qt4projectmanager/wizards/modulespage.cpp b/src/plugins/qmakeprojectmanager/wizards/modulespage.cpp index 25dad27648..2dd62dd88d 100644 --- a/src/plugins/qt4projectmanager/wizards/modulespage.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/modulespage.cpp @@ -29,7 +29,7 @@ #include "modulespage.h" -#include <qt4projectmanager/qtmodulesinfo.h> +#include <qmakeprojectmanager/qtmodulesinfo.h> #include <QDebug> diff --git a/src/plugins/qt4projectmanager/wizards/modulespage.h b/src/plugins/qmakeprojectmanager/wizards/modulespage.h index 7bd00d0aa6..7bd00d0aa6 100644 --- a/src/plugins/qt4projectmanager/wizards/modulespage.h +++ b/src/plugins/qmakeprojectmanager/wizards/modulespage.h diff --git a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp b/src/plugins/qmakeprojectmanager/wizards/qtprojectparameters.cpp index d7e6f10008..d7e6f10008 100644 --- a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/qtprojectparameters.cpp diff --git a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h b/src/plugins/qmakeprojectmanager/wizards/qtprojectparameters.h index 2ded15d813..2ded15d813 100644 --- a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h +++ b/src/plugins/qmakeprojectmanager/wizards/qtprojectparameters.h diff --git a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp b/src/plugins/qmakeprojectmanager/wizards/qtquickapp.cpp index 5965088f25..5965088f25 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/qtquickapp.cpp diff --git a/src/plugins/qt4projectmanager/wizards/qtquickapp.h b/src/plugins/qmakeprojectmanager/wizards/qtquickapp.h index 7f08bbfca9..7f08bbfca9 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickapp.h +++ b/src/plugins/qmakeprojectmanager/wizards/qtquickapp.h diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/qtquickappwizard.cpp index 1a3ab05c44..1a3ab05c44 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/qtquickappwizard.cpp diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.h b/src/plugins/qmakeprojectmanager/wizards/qtquickappwizard.h index ef93c432fc..ef93c432fc 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/qtquickappwizard.h diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp b/src/plugins/qmakeprojectmanager/wizards/qtquickappwizardpages.cpp index 4e27920757..4e27920757 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/qtquickappwizardpages.cpp diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.h b/src/plugins/qmakeprojectmanager/wizards/qtquickappwizardpages.h index a62003143a..a62003143a 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.h +++ b/src/plugins/qmakeprojectmanager/wizards/qtquickappwizardpages.h diff --git a/src/plugins/qt4projectmanager/wizards/qtquickcomponentsetoptionspage.ui b/src/plugins/qmakeprojectmanager/wizards/qtquickcomponentsetoptionspage.ui index df791b10bc..df791b10bc 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickcomponentsetoptionspage.ui +++ b/src/plugins/qmakeprojectmanager/wizards/qtquickcomponentsetoptionspage.ui diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp index 8d10bf02c9..ccd2c08e06 100644 --- a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/qtwizard.cpp @@ -31,9 +31,9 @@ #include "modulespage.h" -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakeprojectmanager.h> -#include <qt4projectmanager/qmakeprojectmanagerconstants.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeprojectmanager.h> +#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> #include <coreplugin/icore.h> @@ -88,7 +88,7 @@ bool QtWizard::qt4ProjectPostGenerateFiles(const QWizard *w, const Core::GeneratedFiles &generatedFiles, QString *errorMessage) { - const BaseQt4ProjectWizardDialog *dialog = qobject_cast<const BaseQt4ProjectWizardDialog *>(w); + const BaseQmakeProjectWizardDialog *dialog = qobject_cast<const BaseQmakeProjectWizardDialog *>(w); // Generate user settings foreach (const Core::GeneratedFile &file, generatedFiles) @@ -127,15 +127,15 @@ bool QtWizard::showModulesPageForLibraries() return true; } -// ------------ CustomQt4ProjectWizard -CustomQt4ProjectWizard::CustomQt4ProjectWizard() +// ------------ CustomQmakeProjectWizard +CustomQmakeProjectWizard::CustomQmakeProjectWizard() { } -QWizard *CustomQt4ProjectWizard::createWizardDialog +QWizard *CustomQmakeProjectWizard::createWizardDialog (QWidget *parent, const Core::WizardDialogParameters &wizardDialogParameters) const { - BaseQt4ProjectWizardDialog *wizard = new BaseQt4ProjectWizardDialog(false, parent, wizardDialogParameters); + BaseQmakeProjectWizardDialog *wizard = new BaseQmakeProjectWizardDialog(false, parent, wizardDialogParameters); if (!wizardDialogParameters.extraValues().contains(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS))) wizard->addTargetSetupPage(false, targetPageId); @@ -145,18 +145,18 @@ QWizard *CustomQt4ProjectWizard::createWizardDialog return wizard; } -bool CustomQt4ProjectWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage) +bool CustomQmakeProjectWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage) { return QtWizard::qt4ProjectPostGenerateFiles(w, l, errorMessage); } -void CustomQt4ProjectWizard::registerSelf() +void CustomQmakeProjectWizard::registerSelf() { - ProjectExplorer::CustomWizard::registerFactory<CustomQt4ProjectWizard>(QLatin1String("qt4project")); + ProjectExplorer::CustomWizard::registerFactory<CustomQmakeProjectWizard>(QLatin1String("qt4project")); } -// ----------------- BaseQt4ProjectWizardDialog -BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage, QWidget *parent, +// ----------------- BaseQmakeProjectWizardDialog +BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(bool showModulesPage, QWidget *parent, const Core::WizardDialogParameters ¶meters) : ProjectExplorer::BaseProjectWizardDialog(parent, parameters), m_modulesPage(0), @@ -167,7 +167,7 @@ BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage, QWi init(showModulesPage); } -BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage, +BaseQmakeProjectWizardDialog::BaseQmakeProjectWizardDialog(bool showModulesPage, Utils::ProjectIntroPage *introPage, int introId, QWidget *parent, const Core::WizardDialogParameters ¶meters) : @@ -180,7 +180,7 @@ BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage, init(showModulesPage); } -BaseQt4ProjectWizardDialog::~BaseQt4ProjectWizardDialog() +BaseQmakeProjectWizardDialog::~BaseQmakeProjectWizardDialog() { if (m_targetSetupPage && !m_targetSetupPage->parent()) delete m_targetSetupPage; @@ -188,7 +188,7 @@ BaseQt4ProjectWizardDialog::~BaseQt4ProjectWizardDialog() delete m_modulesPage; } -void BaseQt4ProjectWizardDialog::init(bool showModulesPage) +void BaseQmakeProjectWizardDialog::init(bool showModulesPage) { if (showModulesPage) m_modulesPage = new ModulesPage; @@ -196,7 +196,7 @@ void BaseQt4ProjectWizardDialog::init(bool showModulesPage) this, SLOT(generateProfileName(QString,QString))); } -int BaseQt4ProjectWizardDialog::addModulesPage(int id) +int BaseQmakeProjectWizardDialog::addModulesPage(int id) { if (!m_modulesPage) return -1; @@ -210,7 +210,7 @@ int BaseQt4ProjectWizardDialog::addModulesPage(int id) return newId; } -int BaseQt4ProjectWizardDialog::addTargetSetupPage(bool mobile, int id) +int BaseQmakeProjectWizardDialog::addTargetSetupPage(bool mobile, int id) { m_targetSetupPage = new ProjectExplorer::TargetSetupPage; const QString platform = selectedPlatform(); @@ -233,12 +233,12 @@ int BaseQt4ProjectWizardDialog::addTargetSetupPage(bool mobile, int id) return id; } -QStringList BaseQt4ProjectWizardDialog::selectedModulesList() const +QStringList BaseQmakeProjectWizardDialog::selectedModulesList() const { return m_modulesPage ? m_modulesPage->selectedModulesList() : m_selectedModules; } -void BaseQt4ProjectWizardDialog::setSelectedModules(const QString &modules, bool lock) +void BaseQmakeProjectWizardDialog::setSelectedModules(const QString &modules, bool lock) { const QStringList modulesList = modules.split(QLatin1Char(' ')); if (m_modulesPage) { @@ -251,12 +251,12 @@ void BaseQt4ProjectWizardDialog::setSelectedModules(const QString &modules, bool } } -QStringList BaseQt4ProjectWizardDialog::deselectedModulesList() const +QStringList BaseQmakeProjectWizardDialog::deselectedModulesList() const { return m_modulesPage ? m_modulesPage->deselectedModulesList() : m_deselectedModules; } -void BaseQt4ProjectWizardDialog::setDeselectedModules(const QString &modules) +void BaseQmakeProjectWizardDialog::setDeselectedModules(const QString &modules) { const QStringList modulesList = modules.split(QLatin1Char(' ')); if (m_modulesPage) { @@ -267,15 +267,15 @@ void BaseQt4ProjectWizardDialog::setDeselectedModules(const QString &modules) } } -bool BaseQt4ProjectWizardDialog::writeUserFile(const QString &proFileName) const +bool BaseQmakeProjectWizardDialog::writeUserFile(const QString &proFileName) const { if (!m_targetSetupPage) return false; - Qt4Manager *manager = ExtensionSystem::PluginManager::getObject<Qt4Manager>(); + QmakeManager *manager = ExtensionSystem::PluginManager::getObject<QmakeManager>(); Q_ASSERT(manager); - Qt4Project *pro = new Qt4Project(manager, proFileName); + QmakeProject *pro = new QmakeProject(manager, proFileName); bool success = m_targetSetupPage->setupProject(pro); if (success) pro->saveSettings(); @@ -283,14 +283,14 @@ bool BaseQt4ProjectWizardDialog::writeUserFile(const QString &proFileName) const return success; } -bool BaseQt4ProjectWizardDialog::setupProject(Qt4Project *project) const +bool BaseQmakeProjectWizardDialog::setupProject(QmakeProject *project) const { if (!m_targetSetupPage) return true; return m_targetSetupPage->setupProject(project); } -bool BaseQt4ProjectWizardDialog::isQtPlatformSelected(const QString &platform) const +bool BaseQmakeProjectWizardDialog::isQtPlatformSelected(const QString &platform) const { QList<Core::Id> selectedKitList = selectedKits(); @@ -301,20 +301,20 @@ bool BaseQt4ProjectWizardDialog::isQtPlatformSelected(const QString &platform) c return false; } -QList<Core::Id> BaseQt4ProjectWizardDialog::selectedKits() const +QList<Core::Id> BaseQmakeProjectWizardDialog::selectedKits() const { if (!m_targetSetupPage) return m_profileIds; return m_targetSetupPage->selectedKits(); } -void BaseQt4ProjectWizardDialog::addExtensionPages(const QList<QWizardPage *> &wizardPageList) +void BaseQmakeProjectWizardDialog::addExtensionPages(const QList<QWizardPage *> &wizardPageList) { foreach (QWizardPage *p,wizardPageList) Core::BaseFileWizard::applyExtensionPageShortTitle(this, addPage(p)); } -void BaseQt4ProjectWizardDialog::generateProfileName(const QString &name, const QString &path) +void BaseQmakeProjectWizardDialog::generateProfileName(const QString &name, const QString &path) { if (!m_targetSetupPage) return; diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.h b/src/plugins/qmakeprojectmanager/wizards/qtwizard.h index de266f071e..3c12284ebf 100644 --- a/src/plugins/qt4projectmanager/wizards/qtwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/qtwizard.h @@ -41,7 +41,7 @@ class TargetSetupPage; namespace QmakeProjectManager { -class Qt4Project; +class QmakeProject; namespace Internal { @@ -84,12 +84,12 @@ private: }; // A custom wizard with an additional Qt 4 target page -class CustomQt4ProjectWizard : public ProjectExplorer::CustomProjectWizard +class CustomQmakeProjectWizard : public ProjectExplorer::CustomProjectWizard { Q_OBJECT public: - CustomQt4ProjectWizard(); + CustomQmakeProjectWizard(); static void registerSelf(); @@ -102,24 +102,25 @@ private: enum { targetPageId = 1 }; }; -/* BaseQt4ProjectWizardDialog: Additionally offers modules page +/* BaseQmakeProjectWizardDialog: Additionally offers modules page * and getter/setter for blank-delimited modules list, transparently * handling the visibility of the modules page list as well as a page * to select targets and Qt versions. */ -class BaseQt4ProjectWizardDialog : public ProjectExplorer::BaseProjectWizardDialog { +class BaseQmakeProjectWizardDialog : public ProjectExplorer::BaseProjectWizardDialog +{ Q_OBJECT protected: - explicit BaseQt4ProjectWizardDialog(bool showModulesPage, + explicit BaseQmakeProjectWizardDialog(bool showModulesPage, Utils::ProjectIntroPage *introPage, int introId, QWidget *parent, const Core::WizardDialogParameters ¶meters); public: - explicit BaseQt4ProjectWizardDialog(bool showModulesPage, QWidget *parent, + explicit BaseQmakeProjectWizardDialog(bool showModulesPage, QWidget *parent, const Core::WizardDialogParameters ¶meters); - virtual ~BaseQt4ProjectWizardDialog(); + virtual ~BaseQmakeProjectWizardDialog(); int addModulesPage(int id = -1); int addTargetSetupPage(bool mobile = false, int id = -1); @@ -131,7 +132,7 @@ public: void setDeselectedModules(const QString &); bool writeUserFile(const QString &proFileName) const; - bool setupProject(Qt4Project *project) const; + bool setupProject(QmakeProject *project) const; bool isQtPlatformSelected(const QString &platform) const; QList<Core::Id> selectedKits() const; diff --git a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp index 53b5f123a7..53b5f123a7 100644 --- a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.cpp diff --git a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.h b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.h index 889b5ed855..889b5ed855 100644 --- a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizard.h diff --git a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.cpp index df73cd8a29..bc8e73a093 100644 --- a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.cpp @@ -37,7 +37,7 @@ SubdirsProjectWizardDialog::SubdirsProjectWizardDialog(const QString &templateNa const QIcon &icon, QWidget *parent, const Core::WizardDialogParameters ¶meters) : - BaseQt4ProjectWizardDialog(false, parent, parameters) + BaseQmakeProjectWizardDialog(false, parent, parameters) { setWindowIcon(icon); setWindowTitle(templateName); diff --git a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.h b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.h index 69c493881d..7e0388cdbc 100644 --- a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.h +++ b/src/plugins/qmakeprojectmanager/wizards/subdirsprojectwizarddialog.h @@ -37,7 +37,7 @@ namespace Internal { struct QtProjectParameters; -class SubdirsProjectWizardDialog : public BaseQt4ProjectWizardDialog +class SubdirsProjectWizardDialog : public BaseQmakeProjectWizardDialog { Q_OBJECT public: diff --git a/src/plugins/qt4projectmanager/wizards/testwizard.cpp b/src/plugins/qmakeprojectmanager/wizards/testwizard.cpp index 49862379cf..49862379cf 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizard.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/testwizard.cpp diff --git a/src/plugins/qt4projectmanager/wizards/testwizard.h b/src/plugins/qmakeprojectmanager/wizards/testwizard.h index 5dbc77566e..5dbc77566e 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizard.h +++ b/src/plugins/qmakeprojectmanager/wizards/testwizard.h diff --git a/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp b/src/plugins/qmakeprojectmanager/wizards/testwizarddialog.cpp index 53e3847931..7f4e1e1f4b 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/testwizarddialog.cpp @@ -52,7 +52,7 @@ TestWizardDialog::TestWizardDialog(const QString &templateName, const QIcon &icon, QWidget *parent, const Core::WizardDialogParameters ¶meters) : - BaseQt4ProjectWizardDialog(true, parent, parameters), + BaseQmakeProjectWizardDialog(true, parent, parameters), m_testPage(new TestWizardPage), m_testPageId(-1), m_modulesPageId(-1) { diff --git a/src/plugins/qt4projectmanager/wizards/testwizarddialog.h b/src/plugins/qmakeprojectmanager/wizards/testwizarddialog.h index e2afee117c..75192c824b 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizarddialog.h +++ b/src/plugins/qmakeprojectmanager/wizards/testwizarddialog.h @@ -58,7 +58,7 @@ struct TestWizardParameters { QString fileName; }; -class TestWizardDialog : public BaseQt4ProjectWizardDialog +class TestWizardDialog : public BaseQmakeProjectWizardDialog { Q_OBJECT public: diff --git a/src/plugins/qt4projectmanager/wizards/testwizardpage.cpp b/src/plugins/qmakeprojectmanager/wizards/testwizardpage.cpp index b48f405064..b48f405064 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizardpage.cpp +++ b/src/plugins/qmakeprojectmanager/wizards/testwizardpage.cpp diff --git a/src/plugins/qt4projectmanager/wizards/testwizardpage.h b/src/plugins/qmakeprojectmanager/wizards/testwizardpage.h index 52e46b3690..52e46b3690 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizardpage.h +++ b/src/plugins/qmakeprojectmanager/wizards/testwizardpage.h diff --git a/src/plugins/qt4projectmanager/wizards/testwizardpage.ui b/src/plugins/qmakeprojectmanager/wizards/testwizardpage.ui index 6b964d8877..6b964d8877 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizardpage.ui +++ b/src/plugins/qmakeprojectmanager/wizards/testwizardpage.ui diff --git a/src/plugins/qt4projectmanager/wizards/wizards.qrc b/src/plugins/qmakeprojectmanager/wizards/wizards.qrc index 4294ca2028..4294ca2028 100644 --- a/src/plugins/qt4projectmanager/wizards/wizards.qrc +++ b/src/plugins/qmakeprojectmanager/wizards/wizards.qrc diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp index 195a24afb3..854abf7f9d 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp @@ -119,11 +119,12 @@ void PropertyEditorContextObject::setSpecificQmlData(const QString &newSpecificQ return; m_specificQmlData = newSpecificQmlData; - emit specificQmlDataChanged(); delete m_qmlComponent; m_qmlComponent = 0; + emit specificQmlComponentChanged(); + emit specificQmlDataChanged(); } void PropertyEditorContextObject::setStateName(const QString &newStateName) diff --git a/src/plugins/qmldesigner/qmldesigner.qbs b/src/plugins/qmldesigner/qmldesigner.qbs index a8f794fc00..092444fb79 100644 --- a/src/plugins/qmldesigner/qmldesigner.qbs +++ b/src/plugins/qmldesigner/qmldesigner.qbs @@ -13,7 +13,7 @@ QtcPlugin { Depends { name: "QmlEditorWidgets" } Depends { name: "TextEditor" } Depends { name: "QmlJSEditor" } - Depends { name: "Qt4ProjectManager" } + Depends { name: "QmakeProjectManager" } Depends { name: "QmlProjectManager" } Depends { name: "ProjectExplorer" } Depends { name: "LanguageUtils" } diff --git a/src/plugins/qmljstools/qmlconsoleview.cpp b/src/plugins/qmljstools/qmlconsoleview.cpp index f74e858cd9..64ba9d24e8 100644 --- a/src/plugins/qmljstools/qmlconsoleview.cpp +++ b/src/plugins/qmljstools/qmlconsoleview.cpp @@ -124,6 +124,8 @@ QmlConsoleView::QmlConsoleView(QWidget *parent) : setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); + horizontalScrollBar()->setSingleStep(20); + verticalScrollBar()->setSingleStep(20); connect(this, SIGNAL(activated(QModelIndex)), SLOT(onRowActivated(QModelIndex))); } diff --git a/src/plugins/qmlprofiler/qmlprofiler.qbs b/src/plugins/qmlprofiler/qmlprofiler.qbs index 27e16ed0cd..ab92e9d590 100644 --- a/src/plugins/qmlprofiler/qmlprofiler.qbs +++ b/src/plugins/qmlprofiler/qmlprofiler.qbs @@ -10,7 +10,7 @@ QtcPlugin { Depends { name: "Qt.quick"; condition: product.condition; } Depends { name: "Core" } Depends { name: "AnalyzerBase" } - Depends { name: "Qt4ProjectManager" } + Depends { name: "QmakeProjectManager" } Depends { name: "RemoteLinux" } Depends { name: "ProjectExplorer" } Depends { name: "QtSupport" } diff --git a/src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp b/src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp index da2ab6750e..6ae705ddb8 100644 --- a/src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp +++ b/src/plugins/qmlprojectmanager/qmlapplicationwizard.cpp @@ -35,8 +35,8 @@ #include <projectexplorer/customwizard/customwizard.h> #include <projectexplorer/kitmanager.h> #include <projectexplorer/projectexplorerconstants.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakeprojectmanagerconstants.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h> #include <qtsupport/qtkitinformation.h> #include "qmlprojectmanager.h" diff --git a/src/plugins/qnx/Qnx.pluginspec.in b/src/plugins/qnx/Qnx.pluginspec.in index 4ca4fedcd1..7ca1c618ab 100644 --- a/src/plugins/qnx/Qnx.pluginspec.in +++ b/src/plugins/qnx/Qnx.pluginspec.in @@ -1,6 +1,6 @@ <plugin name=\"Qnx\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_COMPAT_VERSION\"> - <vendor>Research In Motion</vendor> - <copyright>(C) 2013 Research In Motion</copyright> + <vendor>BlackBerry</vendor> + <copyright>(C) 2013 BlackBerry</copyright> <license> Commercial Usage @@ -10,8 +10,8 @@ GNU Lesser General Public License Usage Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. </license> - <description>Adds support for QNX to Qt Creator</description> + <description>Adds support for QNX and BlackBerry 10 to Qt Creator</description> <category>Device Support</category> - <url>http://www.rim.com</url> + <url>http://www.blackberry.com</url> $$dependencyList </plugin> diff --git a/src/plugins/qnx/blackberryapplicationrunner.cpp b/src/plugins/qnx/blackberryapplicationrunner.cpp index 8178f2b3af..5d82477009 100644 --- a/src/plugins/qnx/blackberryapplicationrunner.cpp +++ b/src/plugins/qnx/blackberryapplicationrunner.cpp @@ -38,7 +38,7 @@ #include "qnxconstants.h" #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> #include <ssh/sshremoteprocessrunner.h> #include <utils/qtcassert.h> diff --git a/src/plugins/qnx/blackberryconfiguration.cpp b/src/plugins/qnx/blackberryconfiguration.cpp index cc45468e53..0ab2360065 100644 --- a/src/plugins/qnx/blackberryconfiguration.cpp +++ b/src/plugins/qnx/blackberryconfiguration.cpp @@ -32,18 +32,20 @@ #include "blackberryconfiguration.h" #include "blackberryqtversion.h" +#include "qnxtoolchain.h" #include "qnxutils.h" #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/kitmanager.h> #include <projectexplorer/kitinformation.h> #include <projectexplorer/toolchainmanager.h> +#include <projectexplorer/gcctoolchain.h> #include <qtsupport/baseqtversion.h> #include <qtsupport/qtversionmanager.h> #include <qtsupport/qtkitinformation.h> -#include <qt4projectmanager/qmakekitinformation.h> +#include <qmakeprojectmanager/qmakekitinformation.h> #include <debugger/debuggeritemmanager.h> #include <debugger/debuggerkitinformation.h> @@ -180,48 +182,44 @@ QList<Utils::EnvironmentItem> BlackBerryConfiguration::qnxEnv() const return m_qnxEnv; } -void BlackBerryConfiguration::createConfigurationPerQtVersion( - const FileName &qmakePath, Qnx::QnxArchitecture arch) -{ - QnxAbstractQtVersion *version = createQtVersion(qmakePath, arch); - ToolChain *toolChain = createGccToolChain(version); - Kit *kit = createKit(version, toolChain); - - if (version && toolChain && kit) { - // register - QtVersionManager::addVersion(version); - ToolChainManager::registerToolChain(toolChain); - KitManager::registerKit(kit); - } -} - QnxAbstractQtVersion *BlackBerryConfiguration::createQtVersion( - const FileName &qmakePath, Qnx::QnxArchitecture arch) + const FileName &qmakePath, Qnx::QnxArchitecture arch, const QString &versionName) { QnxAbstractQtVersion *version = new BlackBerryQtVersion( arch, qmakePath, true, QString(), m_ndkEnvFile.toString()); - version->setDisplayName(tr("Qt %1 for %2 %3 - %4").arg( - version->qtVersionString(), version->platformDisplayName(), - version->archString(), m_targetName)); + version->setDisplayName(tr("Qt %1 for %2").arg(version->qtVersionString(), versionName)); + QtVersionManager::addVersion(version); return version; } -GccToolChain *BlackBerryConfiguration::createGccToolChain(QnxAbstractQtVersion *version) +QnxToolChain *BlackBerryConfiguration::createToolChain( + ProjectExplorer::Abi abi, const QString &versionName) { - GccToolChain* toolChain = new GccToolChain( - QLatin1String(ProjectExplorer::Constants::GCC_TOOLCHAIN_ID), ToolChain::AutoDetection); - //: QCC is the compiler for QNX. - toolChain->setDisplayName(tr("QCC for Qt %1 for %2 %3 - %4").arg( - version->qtVersionString(), version->platformDisplayName(), - version->archString(), m_targetName)); + QnxToolChain* toolChain = new QnxToolChain(ToolChain::AutoDetection); + toolChain->setDisplayName(tr("QCC for %1").arg(versionName)); toolChain->setCompilerCommand(m_gccCompiler); - QList<Abi> abis = version->qtAbis(); - if (!abis.isEmpty()) - toolChain->setTargetAbi(abis.first()); + toolChain->setNdkPath(ndkPath()); + if (abi.isValid()) + toolChain->setTargetAbi(abi); + ToolChainManager::registerToolChain(toolChain); return toolChain; } -Kit *BlackBerryConfiguration::createKit(QnxAbstractQtVersion *version, ToolChain *toolChain) +QVariant BlackBerryConfiguration::createDebuggerItem( + QList<ProjectExplorer::Abi> abis, Qnx::QnxArchitecture arch, const QString &versionName) +{ + Utils::FileName command = arch == X86 ? m_simulatorDebugger : m_deviceDebugger; + DebuggerItem debugger; + debugger.setCommand(command); + debugger.setEngineType(GdbEngineType); + debugger.setAutoDetected(true); + debugger.setAbis(abis); + debugger.setDisplayName(tr("Debugger for %1").arg(versionName)); + return DebuggerItemManager::registerDebugger(debugger); +} + +Kit *BlackBerryConfiguration::createKit( + QnxAbstractQtVersion *version, QnxToolChain *toolChain, const QVariant &debuggerItemId) { Kit *kit = new Kit; bool isSimulator = version->architecture() == X86; @@ -229,17 +227,8 @@ Kit *BlackBerryConfiguration::createKit(QnxAbstractQtVersion *version, ToolChain QtKitInformation::setQtVersion(kit, version); ToolChainKitInformation::setToolChain(kit, toolChain); - DebuggerItem debugger; - debugger.setCommand(isSimulator ? m_simulatorDebugger : m_deviceDebugger); - debugger.setEngineType(GdbEngineType); - debugger.setAutoDetected(true); - debugger.setAbi(toolChain->targetAbi()); - debugger.setDisplayName(tr("Debugger for Qt %1 for %2 %3 - %4").arg( - version->qtVersionString(), version->platformDisplayName(), - version->archString(), m_targetName)); - - QVariant id = DebuggerItemManager::registerDebugger(debugger); - DebuggerKitInformation::setDebugger(kit, id); + if (debuggerItemId.isValid()) + DebuggerKitInformation::setDebugger(kit, debuggerItemId); if (isSimulator) QmakeProjectManager::QmakeKitInformation::setMkspec( @@ -248,9 +237,7 @@ Kit *BlackBerryConfiguration::createKit(QnxAbstractQtVersion *version, ToolChain DeviceTypeKitInformation::setDeviceTypeId(kit, Constants::QNX_BB_OS_TYPE); SysRootKitInformation::setSysRoot(kit, m_sysRoot); - kit->setDisplayName(tr("%1 %2 - Qt %3 - %4").arg( - version->platformDisplayName(), isSimulator ? tr("Simulator") : tr("Device"), - version->qtVersionString(), m_targetName)); + kit->setDisplayName(version->displayName()); kit->setIconPath(FileName::fromString(QLatin1String(Constants::QNX_BB_CATEGORY_ICON))); kit->setAutoDetected(true); @@ -263,6 +250,7 @@ Kit *BlackBerryConfiguration::createKit(QnxAbstractQtVersion *version, ToolChain kit->setSticky(DebuggerKitInformation::id(), true); kit->setSticky(QmakeProjectManager::QmakeKitInformation::id(), true); + KitManager::registerKit(kit); return kit; } @@ -295,16 +283,54 @@ bool BlackBerryConfiguration::activate() deactivate(); // cleaning-up artifacts autodetected by old QtCreator versions + QString armVersionName = tr("BlackBerry Device - %1").arg(m_targetName); + QString x86VersionName = tr("BlackBerry Simulator - %1").arg(m_targetName); + + // create versions + QnxAbstractQtVersion *qt4ArmVersion = 0; + QnxAbstractQtVersion *qt4X86Version = 0; + QnxAbstractQtVersion *qt5ArmVersion = 0; + QnxAbstractQtVersion *qt5X86Version = 0; + QList<Abi> armAbis; + QList<Abi> x86Abis; + if (!m_qmake4BinaryFile.isEmpty()) { - createConfigurationPerQtVersion(m_qmake4BinaryFile, Qnx::ArmLeV7); - createConfigurationPerQtVersion(m_qmake4BinaryFile, Qnx::X86); + qt4ArmVersion = createQtVersion(m_qmake4BinaryFile, Qnx::ArmLeV7, armVersionName); + armAbis << qt4ArmVersion->qtAbis(); + qt4X86Version = createQtVersion(m_qmake4BinaryFile, Qnx::X86, x86VersionName); + x86Abis << qt4X86Version->qtAbis(); } - if (!m_qmake5BinaryFile.isEmpty()) { - createConfigurationPerQtVersion(m_qmake5BinaryFile, Qnx::ArmLeV7); - createConfigurationPerQtVersion(m_qmake5BinaryFile, Qnx::X86); + qt5ArmVersion = createQtVersion(m_qmake5BinaryFile, Qnx::ArmLeV7, armVersionName); + foreach (Abi abi, qt5ArmVersion->qtAbis()) + if (!armAbis.contains(abi)) + armAbis << abi; + qt5X86Version = createQtVersion(m_qmake5BinaryFile, Qnx::X86, x86VersionName); + foreach (Abi abi, qt5X86Version->qtAbis()) + if (!x86Abis.contains(abi)) + x86Abis << abi; } + // create toolchains + QnxToolChain *armToolChain = createToolChain( + !armAbis.isEmpty() ? armAbis.first() : Abi(), armVersionName); + QnxToolChain *x86ToolChain = createToolChain( + !x86Abis.isEmpty() ? x86Abis.first() : Abi(), x86VersionName); + + // create debuggers + QVariant armDebuggerItemId = createDebuggerItem(armAbis, Qnx::ArmLeV7, armVersionName); + QVariant x86DebuggerItemId = createDebuggerItem(x86Abis, Qnx::X86, x86VersionName); + + // create kits + if (qt4ArmVersion) + createKit(qt4ArmVersion, armToolChain, armDebuggerItemId); + if (qt4X86Version) + createKit(qt4X86Version, x86ToolChain, x86DebuggerItemId); + if (qt5ArmVersion) + createKit(qt5ArmVersion, armToolChain, armDebuggerItemId); + if (qt5X86Version) + createKit(qt5X86Version, x86ToolChain, x86DebuggerItemId); + return true; } diff --git a/src/plugins/qnx/blackberryconfiguration.h b/src/plugins/qnx/blackberryconfiguration.h index a2f8f31e82..51473a5b0a 100644 --- a/src/plugins/qnx/blackberryconfiguration.h +++ b/src/plugins/qnx/blackberryconfiguration.h @@ -37,8 +37,8 @@ #include <utils/environment.h> #include <utils/fileutils.h> +#include <projectexplorer/abi.h> #include <projectexplorer/kit.h> -#include <projectexplorer/gcctoolchain.h> #include <QObject> #include <QCoreApplication> @@ -46,11 +46,15 @@ namespace QtSupport { class BaseQtVersion; } +namespace Debugger { +class DebuggerItem; +} namespace Qnx { namespace Internal { class QnxAbstractQtVersion; +class QnxToolChain; class BlackBerryConfiguration { @@ -87,13 +91,15 @@ private: Utils::FileName m_sysRoot; QList<Utils::EnvironmentItem> m_qnxEnv; - void createConfigurationPerQtVersion( - const Utils::FileName &qmakePath, Qnx::QnxArchitecture arch); QnxAbstractQtVersion* createQtVersion( - const Utils::FileName &qmakePath, Qnx::QnxArchitecture arch); - ProjectExplorer::GccToolChain* createGccToolChain(QnxAbstractQtVersion *version); + const Utils::FileName &qmakePath, Qnx::QnxArchitecture arch, const QString &versionName); + QnxToolChain* createToolChain( + ProjectExplorer::Abi abi, const QString &versionName); + QVariant createDebuggerItem( + QList<ProjectExplorer::Abi> abis, Qnx::QnxArchitecture arch, const QString &versionName); ProjectExplorer::Kit* createKit( - QnxAbstractQtVersion* version, ProjectExplorer::ToolChain* toolChain); + QnxAbstractQtVersion* version, QnxToolChain* toolChain, + const QVariant &debuggerItemId); QList<QtSupport::BaseQtVersion *> findRegisteredQtVersions() const; }; diff --git a/src/plugins/qnx/blackberryconfigurationmanager.cpp b/src/plugins/qnx/blackberryconfigurationmanager.cpp index c5136172be..7af64cc3d0 100644 --- a/src/plugins/qnx/blackberryconfigurationmanager.cpp +++ b/src/plugins/qnx/blackberryconfigurationmanager.cpp @@ -33,6 +33,7 @@ #include "blackberrycertificate.h" #include "blackberryconfiguration.h" +#include "qnxtoolchain.h" #include "qnxutils.h" #include <coreplugin/icore.h> @@ -210,6 +211,24 @@ void BlackBerryConfigurationManager::clearInvalidConfigurations() } } +// Switch to QnxToolchain for exisintg configuration using GccToolChain +void BlackBerryConfigurationManager::checkToolChainConfiguration() +{ + foreach (BlackBerryConfiguration *config, m_configs) { + foreach (ToolChain *tc, ToolChainManager::toolChains()) { + if (tc->compilerCommand() == config->gccCompiler() + && !tc->id().startsWith(QLatin1String(Constants::QNX_TOOLCHAIN_ID))) { + if (config->isActive()) { + // reset + config->deactivate(); + config->activate(); + break; + } + } + } + } +} + bool BlackBerryConfigurationManager::addConfiguration(BlackBerryConfiguration *config) { foreach (BlackBerryConfiguration *c, m_configs) { @@ -298,6 +317,7 @@ void BlackBerryConfigurationManager::loadSettings() clearInvalidConfigurations(); loadAutoDetectedConfigurations(); loadManualConfigurations(); + checkToolChainConfiguration(); emit settingsLoaded(); } diff --git a/src/plugins/qnx/blackberryconfigurationmanager.h b/src/plugins/qnx/blackberryconfigurationmanager.h index 35e2325d18..97602e0633 100644 --- a/src/plugins/qnx/blackberryconfigurationmanager.h +++ b/src/plugins/qnx/blackberryconfigurationmanager.h @@ -70,6 +70,7 @@ public: public slots: void loadSettings(); void saveSettings(); + void checkToolChainConfiguration(); signals: void settingsLoaded(); diff --git a/src/plugins/qnx/blackberrycreatepackagestep.cpp b/src/plugins/qnx/blackberrycreatepackagestep.cpp index 09b5bd24d1..5932896d4c 100644 --- a/src/plugins/qnx/blackberrycreatepackagestep.cpp +++ b/src/plugins/qnx/blackberrycreatepackagestep.cpp @@ -44,9 +44,9 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/target.h> #include <projectexplorer/runconfiguration.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> -#include <qt4projectmanager/qmakenodes.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> #include <qtsupport/qtkitinformation.h> #include <utils/qtcassert.h> diff --git a/src/plugins/qnx/blackberrydeployconfiguration.cpp b/src/plugins/qnx/blackberrydeployconfiguration.cpp index 64f3f8ceaa..f204572f1c 100644 --- a/src/plugins/qnx/blackberrydeployconfiguration.cpp +++ b/src/plugins/qnx/blackberrydeployconfiguration.cpp @@ -38,9 +38,9 @@ #include <projectexplorer/kitinformation.h> #include <projectexplorer/target.h> #include <projectexplorer/projectexplorer.h> -#include <qt4projectmanager/qmakenodes.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> #include <qtsupport/qtkitinformation.h> #include <coreplugin/icore.h> #include <ssh/sshconnection.h> @@ -82,7 +82,7 @@ void BlackBerryDeployConfiguration::ctor() void BlackBerryDeployConfiguration::setupBarDescriptor() { - QmakeProjectManager::Qt4BuildConfiguration *bc = qobject_cast<QmakeProjectManager::Qt4BuildConfiguration *>(target()->activeBuildConfiguration()); + QmakeProjectManager::QmakeBuildConfiguration *bc = qobject_cast<QmakeProjectManager::QmakeBuildConfiguration *>(target()->activeBuildConfiguration()); if (!bc || !target()->kit()) return; @@ -90,8 +90,8 @@ void BlackBerryDeployConfiguration::setupBarDescriptor() QString projectName = target()->project()->displayName(); QString targetName; - QmakeProjectManager::Qt4Project *project = static_cast<QmakeProjectManager::Qt4Project *>(target()->project()); - foreach (QmakeProjectManager::Qt4ProFileNode *node, project->applicationProFiles()) { + QmakeProjectManager::QmakeProject *project = static_cast<QmakeProjectManager::QmakeProject *>(target()->project()); + foreach (QmakeProjectManager::QmakeProFileNode *node, project->applicationProFiles()) { QString target = node->targetInformation().target; if (!target.isEmpty()) { targetName = target; diff --git a/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp b/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp index 03e51a24d7..44228ec761 100644 --- a/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp +++ b/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp @@ -41,7 +41,7 @@ #include <projectexplorer/buildsteplist.h> #include <projectexplorer/kitinformation.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeproject.h> #include <remotelinux/genericdirectuploadstep.h> using namespace Qnx; @@ -60,7 +60,7 @@ QList<Core::Id> BlackBerryDeployConfigurationFactory::availableCreationIds(Proje { QList<Core::Id> result; - QmakeProjectManager::Qt4Project *project = qobject_cast<QmakeProjectManager::Qt4Project *>(parent->project()); + QmakeProjectManager::QmakeProject *project = qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project()); if (!project) return result; diff --git a/src/plugins/qnx/blackberrydeployinformation.cpp b/src/plugins/qnx/blackberrydeployinformation.cpp index b02a44fc1a..a7f2684e2b 100644 --- a/src/plugins/qnx/blackberrydeployinformation.cpp +++ b/src/plugins/qnx/blackberrydeployinformation.cpp @@ -34,8 +34,8 @@ #include <projectexplorer/buildconfiguration.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakeproject.h> -#include <qt4projectmanager/qmakenodes.h> +#include <qmakeprojectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakenodes.h> #include <qtsupport/baseqtversion.h> #include <qtsupport/qtkitinformation.h> @@ -241,8 +241,8 @@ void BlackBerryDeployInformation::updateModel() beginResetModel(); QList<BarPackageDeployInformation> keep; - QList<QmakeProjectManager::Qt4ProFileNode *> appNodes = project()->applicationProFiles(); - foreach (QmakeProjectManager::Qt4ProFileNode *node, appNodes) { + QList<QmakeProjectManager::QmakeProFileNode *> appNodes = project()->applicationProFiles(); + foreach (QmakeProjectManager::QmakeProFileNode *node, appNodes) { bool nodeFound = false; for (int i = 0; i < m_deployInformation.size(); ++i) { if (m_deployInformation[i].proFilePath == node->path() @@ -264,9 +264,9 @@ void BlackBerryDeployInformation::updateModel() endResetModel(); } -QmakeProjectManager::Qt4Project *BlackBerryDeployInformation::project() const +QmakeProjectManager::QmakeProject *BlackBerryDeployInformation::project() const { - return static_cast<QmakeProjectManager::Qt4Project *>(m_target->project()); + return static_cast<QmakeProjectManager::QmakeProject *>(m_target->project()); } void BlackBerryDeployInformation::initModel() @@ -282,7 +282,7 @@ void BlackBerryDeployInformation::initModel() return; } - const QmakeProjectManager::Qt4ProFileNode *const rootNode = project()->rootQt4ProjectNode(); + const QmakeProjectManager::QmakeProFileNode *const rootNode = project()->rootQmakeProjectNode(); if (!rootNode || rootNode->parseInProgress()) // Can be null right after project creation by wizard. return; @@ -291,15 +291,15 @@ void BlackBerryDeployInformation::initModel() beginResetModel(); m_deployInformation.clear(); - QList<QmakeProjectManager::Qt4ProFileNode *> appNodes = project()->applicationProFiles(); - foreach (QmakeProjectManager::Qt4ProFileNode *node, appNodes) + QList<QmakeProjectManager::QmakeProFileNode *> appNodes = project()->applicationProFiles(); + foreach (QmakeProjectManager::QmakeProFileNode *node, appNodes) m_deployInformation << deployInformationFromNode(node); endResetModel(); connect(project(), SIGNAL(proFilesEvaluated()), this, SLOT(updateModel())); } -BarPackageDeployInformation BlackBerryDeployInformation::deployInformationFromNode(QmakeProjectManager::Qt4ProFileNode *node) const +BarPackageDeployInformation BlackBerryDeployInformation::deployInformationFromNode(QmakeProjectManager::QmakeProFileNode *node) const { QmakeProjectManager::TargetInformation ti = node->targetInformation(); diff --git a/src/plugins/qnx/blackberrydeployinformation.h b/src/plugins/qnx/blackberrydeployinformation.h index 7edd37c7bb..1080496ba5 100644 --- a/src/plugins/qnx/blackberrydeployinformation.h +++ b/src/plugins/qnx/blackberrydeployinformation.h @@ -38,8 +38,8 @@ class Target; } namespace QmakeProjectManager { -class Qt4ProFileNode; -class Qt4Project; +class QmakeProFileNode; +class QmakeProject; } namespace Qnx { @@ -102,10 +102,10 @@ private: ColumnCount // Always have last }; - QmakeProjectManager::Qt4Project *project() const; + QmakeProjectManager::QmakeProject *project() const; void initModel(); - BarPackageDeployInformation deployInformationFromNode(QmakeProjectManager::Qt4ProFileNode *node) const; + BarPackageDeployInformation deployInformationFromNode(QmakeProjectManager::QmakeProFileNode *node) const; ProjectExplorer::Target *m_target; diff --git a/src/plugins/qnx/blackberrydeploystep.cpp b/src/plugins/qnx/blackberrydeploystep.cpp index 286fdd7c51..1f296da942 100644 --- a/src/plugins/qnx/blackberrydeploystep.cpp +++ b/src/plugins/qnx/blackberrydeploystep.cpp @@ -39,7 +39,7 @@ #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> #include <utils/qtcassert.h> #include <ssh/sshconnection.h> diff --git a/src/plugins/qnx/blackberryrunconfiguration.h b/src/plugins/qnx/blackberryrunconfiguration.h index 41ef58ac88..16b5d96ec1 100644 --- a/src/plugins/qnx/blackberryrunconfiguration.h +++ b/src/plugins/qnx/blackberryrunconfiguration.h @@ -39,8 +39,8 @@ class Target; } namespace QmakeProjectManager { -class Qt4BuildConfiguration; -class Qt4Project; +class QmakeBuildConfiguration; +class QmakeProject; } namespace Qnx { @@ -69,7 +69,7 @@ public: QVariantMap toMap() const; BlackBerryDeployConfiguration *deployConfiguration() const; - QmakeProjectManager::Qt4BuildConfiguration *activeQt4BuildConfiguration() const; + QmakeProjectManager::QmakeBuildConfiguration *activeQmakeBuildConfiguration() const; QString key() const; diff --git a/src/plugins/qnx/blackberryrunconfigurationfactory.cpp b/src/plugins/qnx/blackberryrunconfigurationfactory.cpp index 2f18cad99a..2e14d53c2b 100644 --- a/src/plugins/qnx/blackberryrunconfigurationfactory.cpp +++ b/src/plugins/qnx/blackberryrunconfigurationfactory.cpp @@ -36,7 +36,7 @@ #include <projectexplorer/kitinformation.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeproject.h> using namespace Qnx; using namespace Qnx::Internal; @@ -57,7 +57,7 @@ QList<Core::Id> BlackBerryRunConfigurationFactory::availableCreationIds(ProjectE if (!canHandle(parent)) return ids; - QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(parent->project()); + QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project()); if (!qt4Project) return ids; @@ -85,7 +85,7 @@ bool BlackBerryRunConfigurationFactory::canCreate(ProjectExplorer::Target *paren if (!canHandle(parent)) return false; - QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(parent->project()); + QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project()); if (!qt4Project) return false; @@ -140,7 +140,7 @@ bool BlackBerryRunConfigurationFactory::canHandle(ProjectExplorer::Target *t) co { if (!t->project()->supportsKit(t->kit())) return false; - if (!qobject_cast<QmakeProjectManager::Qt4Project *>(t->project())) + if (!qobject_cast<QmakeProjectManager::QmakeProject *>(t->project())) return false; Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit()); diff --git a/src/plugins/qnx/blackberryruncontrol.h b/src/plugins/qnx/blackberryruncontrol.h index ab061407d0..e1420fc221 100644 --- a/src/plugins/qnx/blackberryruncontrol.h +++ b/src/plugins/qnx/blackberryruncontrol.h @@ -35,7 +35,7 @@ #include <projectexplorer/runconfiguration.h> namespace QmakeProjectManager { -class Qt4BuildConfiguration; +class QmakeBuildConfiguration; } namespace Qnx { diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp index 9060d9ce33..0ee642a87c 100644 --- a/src/plugins/qnx/blackberryruncontrolfactory.cpp +++ b/src/plugins/qnx/blackberryruncontrolfactory.cpp @@ -46,7 +46,7 @@ #include <projectexplorer/project.h> #include <projectexplorer/target.h> #include <projectexplorer/toolchain.h> -#include <qt4projectmanager/qmakebuildconfiguration.h> +#include <qmakeprojectmanager/qmakebuildconfiguration.h> #include <qtsupport/qtkitinformation.h> using namespace Qnx; diff --git a/src/plugins/qnx/qnx.pro b/src/plugins/qnx/qnx.pro index 55e3620235..2f0b403b76 100644 --- a/src/plugins/qnx/qnx.pro +++ b/src/plugins/qnx/qnx.pro @@ -97,6 +97,7 @@ SOURCES += qnxplugin.cpp \ blackberryinstallwizard.cpp \ qnxdeviceprocesssignaloperation.cpp \ qnxdeviceprocesslist.cpp \ + qnxtoolchain.cpp \ slog2inforunner.cpp HEADERS += qnxplugin.h\ @@ -194,6 +195,7 @@ HEADERS += qnxplugin.h\ blackberryinstallwizard.h \ qnxdeviceprocesssignaloperation.h \ qnxdeviceprocesslist.h \ + qnxtoolchain.h \ slog2inforunner.h diff --git a/src/plugins/qnx/qnx.qbs b/src/plugins/qnx/qnx.qbs index cecd40ed1f..da95f3c55e 100644 --- a/src/plugins/qnx/qnx.qbs +++ b/src/plugins/qnx/qnx.qbs @@ -11,7 +11,7 @@ QtcPlugin { Depends { name: "ProjectExplorer" } Depends { name: "QmlDebug" } Depends { name: "QtSupport" } - Depends { name: "Qt4ProjectManager" } + Depends { name: "QmakeProjectManager" } Depends { name: "RemoteLinux" } Depends { name: "TextEditor" } Depends { name: "QmlDebug" } @@ -187,6 +187,8 @@ QtcPlugin { "blackberrysigningutils.h", "pathchooserdelegate.cpp", "pathchooserdelegate.h", + "qnxtoolchain.cpp", + "qnxtoolchain.h", "qnx.qrc", "qnxabstractqtversion.cpp", "qnxabstractqtversion.h", diff --git a/src/plugins/qnx/qnx_dependencies.pri b/src/plugins/qnx/qnx_dependencies.pri index ff6219cb39..808193060e 100644 --- a/src/plugins/qnx/qnx_dependencies.pri +++ b/src/plugins/qnx/qnx_dependencies.pri @@ -3,7 +3,7 @@ QTC_PLUGIN_DEPENDS += \ coreplugin \ debugger \ projectexplorer \ - qt4projectmanager \ + qmakeprojectmanager \ qtsupport \ remotelinux \ texteditor diff --git a/src/plugins/qnx/qnxconstants.h b/src/plugins/qnx/qnxconstants.h index c0d5d1762d..726657f748 100644 --- a/src/plugins/qnx/qnxconstants.h +++ b/src/plugins/qnx/qnxconstants.h @@ -90,6 +90,8 @@ const char QNX_BB_PLATFORM_NAME[] = "BlackBerry"; const char QNX_DEBUG_EXECUTABLE[] = "pdebug"; +const char QNX_TOOLCHAIN_ID[] = "Qnx.QccToolChain"; + // BlackBerry settings constants const char QNX_BB_CATEGORY[] = "XF.BlackBerry"; const char QNX_BB_CATEGORY_TR[] = QT_TRANSLATE_NOOP("BlackBerry", "BlackBerry"); diff --git a/src/plugins/qnx/qnxplugin.cpp b/src/plugins/qnx/qnxplugin.cpp index a348dd1afc..37c4216b2e 100644 --- a/src/plugins/qnx/qnxplugin.cpp +++ b/src/plugins/qnx/qnxplugin.cpp @@ -53,6 +53,8 @@ #include "blackberrydeviceconnectionmanager.h" #include "blackberryconfigurationmanager.h" #include "cascadesimport/cascadesimportwizard.h" +#include "qnxtoolchain.h" + #include <coreplugin/icore.h> #include <coreplugin/mimedatabase.h> @@ -101,6 +103,9 @@ bool QNXPlugin::initialize(const QStringList &arguments, QString *errorString) addAutoReleasedObject(new QnxDeployConfigurationFactory); addAutoReleasedObject(new QnxRunConfigurationFactory); + // Handle Qcc Compiler + addAutoReleasedObject(new QnxToolChainFactory); + // bar-descriptor.xml editor Core::MimeGlobPattern barDescriptorGlobPattern(QLatin1String("*.xml"), Core::MimeGlobPattern::MinWeight + 1); Core::MimeType barDescriptorMimeType; diff --git a/src/plugins/qnx/qnxrunconfigurationfactory.cpp b/src/plugins/qnx/qnxrunconfigurationfactory.cpp index ad85c5146d..d189f44306 100644 --- a/src/plugins/qnx/qnxrunconfigurationfactory.cpp +++ b/src/plugins/qnx/qnxrunconfigurationfactory.cpp @@ -37,7 +37,7 @@ #include <projectexplorer/kitinformation.h> #include <projectexplorer/target.h> -#include <qt4projectmanager/qmakeproject.h> +#include <qmakeprojectmanager/qmakeproject.h> using namespace Qnx; using namespace Qnx::Internal; @@ -58,7 +58,7 @@ QList<Core::Id> QnxRunConfigurationFactory::availableCreationIds(ProjectExplorer if (!canHandle(parent)) return ids; - QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(parent->project()); + QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project()); if (!qt4Project) return ids; @@ -85,7 +85,7 @@ bool QnxRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, cons if (!canHandle(parent) || !id.name().startsWith(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX)) return false; - QmakeProjectManager::Qt4Project *qt4Project = qobject_cast<QmakeProjectManager::Qt4Project *>(parent->project()); + QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project()); if (!qt4Project) return false; diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp new file mode 100644 index 0000000000..e321c3557b --- /dev/null +++ b/src/plugins/qnx/qnxtoolchain.cpp @@ -0,0 +1,269 @@ +/************************************************************************** +** +** Copyright (C) 2013 BlackBerry Limited. All rights reserved. +** +** Contact: BlackBerry (qt@blackberry.com) +** Contact: KDAB (info@kdab.com) +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "qnxtoolchain.h" +#include "qnxconstants.h" +#include "qnxutils.h" + +#include "blackberryconfigurationmanager.h" +#include "blackberryconfiguration.h" + +#include <utils/pathchooser.h> + +#include <QFormLayout> + +using namespace ProjectExplorer; +namespace Qnx { +namespace Internal { + +static const char CompilernNdkPath[] = "Qnx.QnxToolChain.NDKPath"; + +static const QList<Abi> qccSupportedAbis() +{ + QList<Abi> abis; + abis << Abi(Abi::ArmArchitecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32); + abis << Abi(Abi::X86Architecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32); + + return abis; +} + +static void setQnxEnvironment(Utils::Environment &env, const QList<Utils::EnvironmentItem> &qnxEnv) +{ + // We only need to set QNX_HOST and QNX_TARGET needed when running qcc + foreach (const Utils::EnvironmentItem &item, qnxEnv) { + if (item.name == QLatin1String("QNX_HOST") || + item.name == QLatin1String("QNX_TARGET") ) + env.set(item.name, item.value); + } +} + +QnxToolChain::QnxToolChain(ToolChain::Detection d) + : GccToolChain(QLatin1String(Constants::QNX_TOOLCHAIN_ID), d) +{ +} + +QString QnxToolChain::type() const +{ + return QLatin1String(Constants::QNX_TOOLCHAIN_ID); +} + +QString QnxToolChain::typeDisplayName() const +{ + return QnxToolChainFactory::tr("QCC"); +} + +ToolChainConfigWidget *QnxToolChain::configurationWidget() +{ + return new QnxToolChainConfigWidget(this); +} + +void QnxToolChain::addToEnvironment(Utils::Environment &env) const +{ + foreach (BlackBerryConfiguration* config, BlackBerryConfigurationManager::instance().configurations()) { + if (config->gccCompiler() == compilerCommand()) { + setQnxEnvironment(env, config->qnxEnv()); + break; + } + } + + if (env.value(QLatin1String("QNX_HOST")).isEmpty() + || env.value(QLatin1String("QNX_TARGET")).isEmpty()) + setQnxEnvironment(env, QnxUtils::qnxEnvironment(m_ndkPath)); + + GccToolChain::addToEnvironment(env); +} + +QList<Utils::FileName> QnxToolChain::suggestedMkspecList() const +{ + QList<Utils::FileName> mkspecList; + mkspecList << Utils::FileName::fromString(QLatin1String("qnx-armv7le-qcc")); + mkspecList << Utils::FileName::fromString(QLatin1String("qnx-x86-qcc")); + mkspecList << Utils::FileName::fromString(QLatin1String("blackberry-armv7le-qcc")); + mkspecList << Utils::FileName::fromString(QLatin1String("blackberry-x86-qcc")); + + return mkspecList; +} + +QVariantMap QnxToolChain::toMap() const +{ + QVariantMap data = GccToolChain::toMap(); + data.insert(QLatin1String(CompilernNdkPath), m_ndkPath); + return data; +} + +bool QnxToolChain::fromMap(const QVariantMap &data) +{ + if (!GccToolChain::fromMap(data)) + return false; + + m_ndkPath = data.value(QLatin1String(CompilernNdkPath)).toString(); + return true; +} + +QString QnxToolChain::ndkPath() const +{ + return m_ndkPath; +} + +void QnxToolChain::setNdkPath(const QString &ndkPath) +{ + m_ndkPath = ndkPath; +} + +// qcc doesn't support a "-dumpmachine" option to get supported abis +QList<Abi> QnxToolChain::detectSupportedAbis() const +{ + return qccSupportedAbis(); +} + +// Qcc is a multi-compiler driver, and most of the gcc options can be accomplished by using the -Wp, and -Wc +// options to pass the options directly down to the compiler +QStringList QnxToolChain::reinterpretOptions(const QStringList &args) const +{ + QStringList arguments; + foreach (const QString &str, args) { + if (str.startsWith(QLatin1String("--sysroot="))) + continue; + QString arg = str; + if (arg == QLatin1String("-v") + || arg == QLatin1String("-dM")) + arg.prepend(QLatin1String("-Wp,")); + arguments << arg; + } + + return arguments; +} + +// -------------------------------------------------------------------------- +// QnxToolChainFactory +// -------------------------------------------------------------------------- + +QnxToolChainFactory::QnxToolChainFactory() +{ + setId(Constants::QNX_TOOLCHAIN_ID); + setDisplayName(tr("QCC")); +} + +bool QnxToolChainFactory::canRestore(const QVariantMap &data) +{ + const QString id = idFromMap(data); + return id.startsWith(QLatin1String(Constants::QNX_TOOLCHAIN_ID) + QLatin1Char(':')); +} + +ToolChain *QnxToolChainFactory::restore(const QVariantMap &data) +{ + QnxToolChain *tc = new QnxToolChain(ToolChain::ManualDetection); + if (tc->fromMap(data)) + return tc; + + delete tc; + return 0; +} + +bool QnxToolChainFactory::canCreate() +{ + return true; +} + +ToolChain *QnxToolChainFactory::create() +{ + return new QnxToolChain(ToolChain::ManualDetection); +} + +//--------------------------------------------------------------------------------- +// QnxToolChainConfigWidget +//--------------------------------------------------------------------------------- + +QnxToolChainConfigWidget::QnxToolChainConfigWidget(QnxToolChain *tc) + : ToolChainConfigWidget(tc) + , m_compilerCommand(new Utils::PathChooser) + , m_ndkPath(new Utils::PathChooser) + , m_abiWidget(new AbiWidget) +{ + m_compilerCommand->setExpectedKind(Utils::PathChooser::ExistingCommand); + m_compilerCommand->setFileName(tc->compilerCommand()); + m_compilerCommand->setEnabled(!tc->isAutoDetected()); + + m_ndkPath->setExpectedKind(Utils::PathChooser::ExistingDirectory); + m_ndkPath->setPath(tc->ndkPath()); + m_ndkPath->setEnabled(!tc->isAutoDetected()); + + m_abiWidget->setAbis(qccSupportedAbis(), tc->targetAbi()); + m_abiWidget->setEnabled(!tc->isAutoDetected()); + + m_mainLayout->addRow(tr("&Compiler path:"), m_compilerCommand); + //: SDP refers to 'Software Development Platform'. + m_mainLayout->addRow(tr("NDK/SDP path:"), m_ndkPath); + m_mainLayout->addRow(tr("&ABI:"), m_abiWidget); + + connect(m_compilerCommand, SIGNAL(changed(QString)), this, SIGNAL(dirty())); + connect(m_ndkPath, SIGNAL(changed(QString)), this, SIGNAL(dirty())); + connect(m_abiWidget, SIGNAL(abiChanged()), this, SIGNAL(dirty())); +} + +void QnxToolChainConfigWidget::applyImpl() +{ + if (toolChain()->isAutoDetected()) + return; + + QnxToolChain *tc = static_cast<QnxToolChain *>(toolChain()); + Q_ASSERT(tc); + QString displayName = tc->displayName(); + tc->setCompilerCommand(m_compilerCommand->fileName()); + tc->setDisplayName(displayName); // reset display name + tc->setNdkPath(m_ndkPath->fileName().toString()); + tc->setTargetAbi(m_abiWidget->currentAbi()); +} + +void QnxToolChainConfigWidget::discardImpl() +{ + // subwidgets are not yet connected! + bool blocked = blockSignals(true); + QnxToolChain *tc = static_cast<QnxToolChain *>(toolChain()); + m_compilerCommand->setFileName(tc->compilerCommand()); + m_ndkPath->setPath(tc->ndkPath()); + m_abiWidget->setAbis(tc->supportedAbis(), tc->targetAbi()); + if (!m_compilerCommand->path().isEmpty()) + m_abiWidget->setEnabled(true); + blockSignals(blocked); +} + +bool QnxToolChainConfigWidget::isDirtyImpl() const +{ + QnxToolChain *tc = static_cast<QnxToolChain *>(toolChain()); + Q_ASSERT(tc); + return m_compilerCommand->fileName() != tc->compilerCommand() + || m_ndkPath->path() != tc->ndkPath() + || m_abiWidget->currentAbi() != tc->targetAbi(); +} + +} // namespace Internal +} // namespace Qnx diff --git a/src/plugins/qnx/qnxtoolchain.h b/src/plugins/qnx/qnxtoolchain.h new file mode 100644 index 0000000000..8abbda4f9f --- /dev/null +++ b/src/plugins/qnx/qnxtoolchain.h @@ -0,0 +1,113 @@ +/************************************************************************** +** +** Copyright (C) 2013 BlackBerry Limited. All rights reserved. +** +** Contact: BlackBerry (qt@blackberry.com) +** Contact: KDAB (info@kdab.com) +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QNXTOOLCHAIN_H +#define QNXTOOLCHAIN_H + +#include <projectexplorer/gcctoolchain.h> +#include <projectexplorer/gcctoolchainfactories.h> + +namespace Qnx { +namespace Internal { + +class QnxToolChain : public ProjectExplorer::GccToolChain +{ +public: + explicit QnxToolChain(Detection d); + + QString type() const; + QString typeDisplayName() const; + + ProjectExplorer::ToolChainConfigWidget *configurationWidget(); + + void addToEnvironment(Utils::Environment &env) const; + QList<Utils::FileName> suggestedMkspecList() const; + + QVariantMap toMap() const; + bool fromMap(const QVariantMap &data); + + QString ndkPath() const; + void setNdkPath(const QString &ndkPath); + +protected: + virtual QList<ProjectExplorer::Abi> detectSupportedAbis() const; + + QStringList reinterpretOptions(const QStringList &args) const; + +private: + QString m_ndkPath; +}; + +// -------------------------------------------------------------------------- +// QnxToolChainFactory +// -------------------------------------------------------------------------- + +class QnxToolChainFactory : public ProjectExplorer::ToolChainFactory +{ + Q_OBJECT + +public: + QnxToolChainFactory(); + + bool canRestore(const QVariantMap &data); + ProjectExplorer::ToolChain *restore(const QVariantMap &data); + + bool canCreate(); + ProjectExplorer::ToolChain *create(); +}; + +//---------------------------------------------------------------------------- +// QnxToolChainConfigWidget +//---------------------------------------------------------------------------- + +class QnxToolChainConfigWidget : public ProjectExplorer::ToolChainConfigWidget +{ + Q_OBJECT + +public: + QnxToolChainConfigWidget(QnxToolChain *tc); + +private: + void applyImpl(); + void discardImpl(); + bool isDirtyImpl() const; + void makeReadOnlyImpl() {} + + Utils::PathChooser *m_compilerCommand; + Utils::PathChooser *m_ndkPath; + ProjectExplorer::AbiWidget *m_abiWidget; + +}; + +} // namespace Internal +} // namespace Qnx + +#endif // QNXTOOLCHAIN_H diff --git a/src/plugins/qtsupport/qtsupportconstants.h b/src/plugins/qtsupport/qtsupportconstants.h index 95c6a62f4e..76b009a7ec 100644 --- a/src/plugins/qtsupport/qtsupportconstants.h +++ b/src/plugins/qtsupport/qtsupportconstants.h @@ -74,7 +74,7 @@ const char ANDROID_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Android"); const char IOS_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Ios"); // QML wizard icon -// both the qt4projectmanager and the qmlprojectmanager do have qt quick wizards +// both the qmakeprojectmanager and the qmlprojectmanager do have qt quick wizards // so we define the icon here const char QML_WIZARD_ICON[] = ":/qmlproject/images/qml_wizard.png"; diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index a05df114a2..7cee89f78c 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -5773,6 +5773,7 @@ void BaseTextEditorWidget::unfoldAll() void BaseTextEditorWidget::setReadOnly(bool b) { QPlainTextEdit::setReadOnly(b); + emit readOnlyChanged(); if (b) setTextInteractionFlags(textInteractionFlags() | Qt::TextSelectableByKeyboard); } diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index 06121362e9..6994a90e97 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -325,6 +325,7 @@ public slots: signals: void changed(); void assistFinished(); + void readOnlyChanged(); // ITextEditor void contentsChanged(); diff --git a/src/plugins/texteditor/findinfiles.cpp b/src/plugins/texteditor/findinfiles.cpp index e103ced903..81837ee283 100644 --- a/src/plugins/texteditor/findinfiles.cpp +++ b/src/plugins/texteditor/findinfiles.cpp @@ -32,6 +32,7 @@ #include <coreplugin/editormanager/editormanager.h> #include <find/findplugin.h> #include <utils/filesearch.h> +#include <utils/fileutils.h> #include <utils/qtcassert.h> #include <QDebug> @@ -87,14 +88,13 @@ Utils::FileIterator *FindInFiles::files(const QStringList &nameFilters, QVariant FindInFiles::additionalParameters() const { - return qVariantFromValue(QDir::fromNativeSeparators(m_directory->currentText())); + return qVariantFromValue(path()); } QString FindInFiles::label() const { const QChar slash = QLatin1Char('/'); - const QStringList &nonEmptyComponents = QDir::cleanPath( - QFileInfo(QDir::fromNativeSeparators(m_directory->currentText())).absoluteFilePath()) + const QStringList &nonEmptyComponents = QDir::cleanPath(QFileInfo(path()).absoluteFilePath()) .split(slash, QString::SkipEmptyParts); return tr("Directory '%1':").arg(nonEmptyComponents.isEmpty() ? QString(slash) : nonEmptyComponents.last()); } @@ -103,7 +103,7 @@ QString FindInFiles::toolTip() const { //: %3 is filled by BaseFileFind::runNewSearch return tr("Path: %1\nFilter: %2\n%3") - .arg(QDir::toNativeSeparators(QFileInfo(m_directory->currentText()).absoluteFilePath())) + .arg(QDir::toNativeSeparators(QFileInfo(path()).absoluteFilePath())) .arg(fileNameFilters().join(QLatin1String(","))); } @@ -149,7 +149,7 @@ void FindInFiles::openFileBrowser() { if (!m_directory) return; - QString oldDir = m_directory->currentText(); + QString oldDir = path(); if (!QDir(oldDir).exists()) oldDir.clear(); QString dir = QFileDialog::getExistingDirectory(m_configWidget, @@ -158,6 +158,12 @@ void FindInFiles::openFileBrowser() m_directory->setEditText(QDir::toNativeSeparators(dir)); } +QString FindInFiles::path() const +{ + return QDir::fromNativeSeparators(Utils::FileUtils::normalizePathName( + m_directory->currentText())); +} + void FindInFiles::writeSettings(QSettings *settings) { settings->beginGroup(QLatin1String("FindInFiles")); diff --git a/src/plugins/texteditor/findinfiles.h b/src/plugins/texteditor/findinfiles.h index e3c6f9ba63..ac95f4fb50 100644 --- a/src/plugins/texteditor/findinfiles.h +++ b/src/plugins/texteditor/findinfiles.h @@ -71,6 +71,8 @@ private slots: void openFileBrowser(); private: + QString path() const; + QStringListModel m_directoryStrings; QString m_directorySetting; QPointer<QWidget> m_configWidget; diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 15cd1c82c4..d9da8289b8 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -122,6 +122,7 @@ void TextEditorActionHandler::setupActions(BaseTextEditorWidget *editor) QObject::connect(editor, SIGNAL(undoAvailable(bool)), this, SLOT(updateUndoAction())); QObject::connect(editor, SIGNAL(redoAvailable(bool)), this, SLOT(updateRedoAction())); QObject::connect(editor, SIGNAL(copyAvailable(bool)), this, SLOT(updateCopyAction())); + QObject::connect(editor, SIGNAL(readOnlyChanged()), this, SLOT(updateActions())); } |