summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2010-01-07 18:17:24 +0100
committerTobias Hunger <tobias.hunger@nokia.com>2010-01-07 18:17:24 +0100
commita6ad773722a758df46813afd7af42625a0f3e276 (patch)
tree8a74e3bb0fe819603e3ce5ed867116e75acc8d64 /src
parent8bb87fcda497d09ac3ba39b38b9c229d02022b09 (diff)
downloadqt-creator-a6ad773722a758df46813afd7af42625a0f3e276.tar.gz
Make method naming more consistent.
* Use id() for methods returning a string used to represent some type of object. * Use displayName() for strings that are meant to be user visible. * Quieten some warnings while touching the files anyway. * Move Factories to their products in the plugins where that was not done before. Reviewed-by: dt
Diffstat (limited to 'src')
-rw-r--r--src/libs/utils/filewizarddialog.cpp8
-rw-r--r--src/libs/utils/filewizarddialog.h4
-rw-r--r--src/libs/utils/filewizardpage.cpp6
-rw-r--r--src/libs/utils/filewizardpage.h8
-rw-r--r--src/libs/utils/projectintropage.cpp4
-rw-r--r--src/libs/utils/projectintropage.h6
-rw-r--r--src/plugins/bineditor/bineditorconstants.h3
-rw-r--r--src/plugins/bineditor/bineditorplugin.cpp20
-rw-r--r--src/plugins/bineditor/bineditorplugin.h4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp87
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h18
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp83
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.h21
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectmanager.h4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp28
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.h10
-rw-r--r--src/plugins/cmakeprojectmanager/makestep.cpp16
-rw-r--r--src/plugins/cmakeprojectmanager/makestep.h8
-rw-r--r--src/plugins/coreplugin/basefilewizard.cpp44
-rw-r--r--src/plugins/coreplugin/basefilewizard.h18
-rw-r--r--src/plugins/coreplugin/basemode.cpp4
-rw-r--r--src/plugins/coreplugin/basemode.h12
-rw-r--r--src/plugins/coreplugin/coreconstants.h5
-rw-r--r--src/plugins/coreplugin/dialogs/ioptionspage.cpp4
-rw-r--r--src/plugins/coreplugin/dialogs/ioptionspage.h4
-rw-r--r--src/plugins/coreplugin/dialogs/iwizard.cpp2
-rw-r--r--src/plugins/coreplugin/dialogs/iwizard.h4
-rw-r--r--src/plugins/coreplugin/dialogs/newdialog.cpp4
-rw-r--r--src/plugins/coreplugin/dialogs/settingsdialog.cpp14
-rw-r--r--src/plugins/coreplugin/dialogs/shortcutsettings.cpp4
-rw-r--r--src/plugins/coreplugin/dialogs/shortcutsettings.h4
-rw-r--r--src/plugins/coreplugin/editmode.cpp6
-rw-r--r--src/plugins/coreplugin/editmode.h4
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp105
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.h20
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.cpp42
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.h24
-rw-r--r--src/plugins/coreplugin/editormanager/ieditor.h2
-rw-r--r--src/plugins/coreplugin/editormanager/iexternaleditor.h3
-rw-r--r--src/plugins/coreplugin/editormanager/openeditorsmodel.cpp14
-rw-r--r--src/plugins/coreplugin/editormanager/openeditorsmodel.h6
-rw-r--r--src/plugins/coreplugin/editormanager/openeditorswindow.cpp4
-rw-r--r--src/plugins/coreplugin/findplaceholder.h2
-rw-r--r--src/plugins/coreplugin/generalsettings.cpp4
-rw-r--r--src/plugins/coreplugin/generalsettings.h4
-rw-r--r--src/plugins/coreplugin/ifilefactory.h4
-rw-r--r--src/plugins/coreplugin/imode.h4
-rw-r--r--src/plugins/coreplugin/iversioncontrol.h2
-rw-r--r--src/plugins/coreplugin/mainwindow.cpp8
-rw-r--r--src/plugins/coreplugin/mainwindow.h1
-rw-r--r--src/plugins/coreplugin/modemanager.cpp10
-rw-r--r--src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp12
-rw-r--r--src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h8
-rw-r--r--src/plugins/coreplugin/vcsmanager.cpp4
-rw-r--r--src/plugins/cpaster/codepastersettings.cpp4
-rw-r--r--src/plugins/cpaster/codepastersettings.h4
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp2
-rw-r--r--src/plugins/cpaster/pastebindotcomsettings.cpp4
-rw-r--r--src/plugins/cpaster/pastebindotcomsettings.h4
-rw-r--r--src/plugins/cpaster/settingspage.cpp4
-rw-r--r--src/plugins/cpaster/settingspage.h4
-rw-r--r--src/plugins/cppeditor/cppclasswizard.cpp4
-rw-r--r--src/plugins/cppeditor/cppeditor.cpp10
-rw-r--r--src/plugins/cppeditor/cppeditor.h2
-rw-r--r--src/plugins/cppeditor/cppeditorconstants.h4
-rw-r--r--src/plugins/cppeditor/cppfilewizard.cpp2
-rw-r--r--src/plugins/cppeditor/cppplugin.cpp24
-rw-r--r--src/plugins/cppeditor/cppplugin.h4
-rw-r--r--src/plugins/cpptools/completionsettingspage.cpp4
-rw-r--r--src/plugins/cpptools/completionsettingspage.h4
-rw-r--r--src/plugins/cpptools/cppclassesfilter.h4
-rw-r--r--src/plugins/cpptools/cppcurrentdocumentfilter.h4
-rw-r--r--src/plugins/cpptools/cppfilesettingspage.cpp8
-rw-r--r--src/plugins/cpptools/cppfilesettingspage.h4
-rw-r--r--src/plugins/cpptools/cppfunctionsfilter.h4
-rw-r--r--src/plugins/cpptools/cpplocatorfilter.h4
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp2
-rw-r--r--src/plugins/cvs/checkoutwizard.cpp2
-rw-r--r--src/plugins/cvs/checkoutwizard.h2
-rw-r--r--src/plugins/cvs/cvscontrol.cpp2
-rw-r--r--src/plugins/cvs/cvscontrol.h2
-rw-r--r--src/plugins/cvs/cvsplugin.cpp6
-rw-r--r--src/plugins/cvs/settingspage.cpp4
-rw-r--r--src/plugins/cvs/settingspage.h4
-rw-r--r--src/plugins/debugger/cdb/cdboptionspage.cpp4
-rw-r--r--src/plugins/debugger/cdb/cdboptionspage.h4
-rw-r--r--src/plugins/debugger/debuggeragents.cpp4
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp16
-rw-r--r--src/plugins/debugger/gdb/gdboptionspage.cpp4
-rw-r--r--src/plugins/debugger/gdb/gdboptionspage.h4
-rw-r--r--src/plugins/debugger/gdb/trkoptionspage.cpp4
-rw-r--r--src/plugins/debugger/gdb/trkoptionspage.h4
-rw-r--r--src/plugins/designer/cpp/cppsettingspage.cpp4
-rw-r--r--src/plugins/designer/cpp/cppsettingspage.h4
-rw-r--r--src/plugins/designer/cpp/formclasswizard.cpp6
-rw-r--r--src/plugins/designer/designerconstants.h3
-rw-r--r--src/plugins/designer/formeditorfactory.cpp12
-rw-r--r--src/plugins/designer/formeditorfactory.h4
-rw-r--r--src/plugins/designer/formeditorplugin.cpp8
-rw-r--r--src/plugins/designer/formeditorw.cpp4
-rw-r--r--src/plugins/designer/formwindoweditor.cpp4
-rw-r--r--src/plugins/designer/formwindoweditor.h2
-rw-r--r--src/plugins/designer/formwizard.cpp4
-rw-r--r--src/plugins/designer/formwizarddialog.cpp6
-rw-r--r--src/plugins/designer/formwizarddialog.h2
-rw-r--r--src/plugins/designer/settingspage.cpp4
-rw-r--r--src/plugins/designer/settingspage.h4
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp4
-rw-r--r--src/plugins/genericprojectmanager/genericbuildconfiguration.cpp71
-rw-r--r--src/plugins/genericprojectmanager/genericbuildconfiguration.h23
-rw-r--r--src/plugins/genericprojectmanager/genericmakestep.cpp17
-rw-r--r--src/plugins/genericprojectmanager/genericmakestep.h8
-rw-r--r--src/plugins/genericprojectmanager/genericproject.cpp62
-rw-r--r--src/plugins/genericprojectmanager/genericproject.h22
-rw-r--r--src/plugins/genericprojectmanager/genericprojectconstants.h4
-rw-r--r--src/plugins/genericprojectmanager/genericprojectfileseditor.cpp15
-rw-r--r--src/plugins/genericprojectmanager/genericprojectfileseditor.h5
-rw-r--r--src/plugins/genericprojectmanager/genericprojectwizard.cpp8
-rw-r--r--src/plugins/git/clonewizard.cpp2
-rw-r--r--src/plugins/git/clonewizard.h2
-rw-r--r--src/plugins/git/giteditor.cpp2
-rw-r--r--src/plugins/git/gitorious/gitoriousclonewizard.cpp2
-rw-r--r--src/plugins/git/gitorious/gitoriousclonewizard.h2
-rw-r--r--src/plugins/git/gitversioncontrol.cpp2
-rw-r--r--src/plugins/git/gitversioncontrol.h2
-rw-r--r--src/plugins/git/settingspage.cpp4
-rw-r--r--src/plugins/git/settingspage.h4
-rw-r--r--src/plugins/helloworld/helloworldplugin.cpp2
-rw-r--r--src/plugins/help/docsettingspage.cpp4
-rw-r--r--src/plugins/help/docsettingspage.h4
-rw-r--r--src/plugins/help/filtersettingspage.cpp4
-rw-r--r--src/plugins/help/filtersettingspage.h4
-rw-r--r--src/plugins/help/generalsettingspage.cpp4
-rw-r--r--src/plugins/help/generalsettingspage.h4
-rw-r--r--src/plugins/help/helpindexfilter.cpp4
-rw-r--r--src/plugins/help/helpindexfilter.h4
-rw-r--r--src/plugins/help/helpmode.cpp4
-rw-r--r--src/plugins/locator/directoryfilter.h4
-rw-r--r--src/plugins/locator/filesystemfilter.h4
-rw-r--r--src/plugins/locator/ilocatorfilter.h4
-rw-r--r--src/plugins/locator/locatorfiltersfilter.cpp6
-rw-r--r--src/plugins/locator/locatorfiltersfilter.h4
-rw-r--r--src/plugins/locator/locatorplugin.cpp2
-rw-r--r--src/plugins/locator/locatorplugin.h4
-rw-r--r--src/plugins/locator/locatorwidget.cpp2
-rw-r--r--src/plugins/locator/opendocumentsfilter.h4
-rw-r--r--src/plugins/locator/settingspage.cpp8
-rw-r--r--src/plugins/locator/settingspage.h4
-rw-r--r--src/plugins/mercurial/clonewizard.cpp2
-rw-r--r--src/plugins/mercurial/clonewizard.h2
-rw-r--r--src/plugins/mercurial/mercurialcontrol.cpp2
-rw-r--r--src/plugins/mercurial/mercurialcontrol.h2
-rw-r--r--src/plugins/mercurial/optionspage.cpp4
-rw-r--r--src/plugins/mercurial/optionspage.h4
-rw-r--r--src/plugins/perforce/perforceconstants.h13
-rw-r--r--src/plugins/perforce/perforceeditor.cpp2
-rw-r--r--src/plugins/perforce/perforceplugin.cpp20
-rw-r--r--src/plugins/perforce/perforceversioncontrol.cpp2
-rw-r--r--src/plugins/perforce/perforceversioncontrol.h2
-rw-r--r--src/plugins/perforce/settingspage.cpp4
-rw-r--r--src/plugins/perforce/settingspage.h4
-rw-r--r--src/plugins/projectexplorer/abstractprocessstep.h2
-rw-r--r--src/plugins/projectexplorer/allprojectsfilter.h4
-rw-r--r--src/plugins/projectexplorer/applicationrunconfiguration.cpp2
-rw-r--r--src/plugins/projectexplorer/applicationrunconfiguration.h2
-rw-r--r--src/plugins/projectexplorer/baseprojectwizarddialog.cpp12
-rw-r--r--src/plugins/projectexplorer/baseprojectwizarddialog.h6
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp12
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.h10
-rw-r--r--src/plugins/projectexplorer/buildmanager.cpp6
-rw-r--r--src/plugins/projectexplorer/buildsettingspropertiespage.cpp10
-rw-r--r--src/plugins/projectexplorer/buildsettingspropertiespage.h2
-rw-r--r--src/plugins/projectexplorer/buildstep.h8
-rw-r--r--src/plugins/projectexplorer/buildstepspage.cpp6
-rw-r--r--src/plugins/projectexplorer/currentprojectfilter.h4
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.cpp26
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.h10
-rw-r--r--src/plugins/projectexplorer/dependenciespanel.cpp12
-rw-r--r--src/plugins/projectexplorer/dependenciespanel.h2
-rw-r--r--src/plugins/projectexplorer/editorsettingspropertiespage.cpp2
-rw-r--r--src/plugins/projectexplorer/editorsettingspropertiespage.h2
-rw-r--r--src/plugins/projectexplorer/iprojectproperties.h2
-rw-r--r--src/plugins/projectexplorer/pluginfilefactory.cpp10
-rw-r--r--src/plugins/projectexplorer/pluginfilefactory.h5
-rw-r--r--src/plugins/projectexplorer/processstep.cpp22
-rw-r--r--src/plugins/projectexplorer/processstep.h8
-rw-r--r--src/plugins/projectexplorer/project.cpp24
-rw-r--r--src/plugins/projectexplorer/project.h2
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp44
-rw-r--r--src/plugins/projectexplorer/projectexplorerconstants.h4
-rw-r--r--src/plugins/projectexplorer/projectexplorersettingspage.cpp4
-rw-r--r--src/plugins/projectexplorer/projectexplorersettingspage.h4
-rw-r--r--src/plugins/projectexplorer/projectfilewizardextension.cpp2
-rw-r--r--src/plugins/projectexplorer/projectmodels.cpp10
-rw-r--r--src/plugins/projectexplorer/projectnodes.cpp4
-rw-r--r--src/plugins/projectexplorer/projectnodes.h2
-rw-r--r--src/plugins/projectexplorer/projecttreewidget.cpp2
-rw-r--r--src/plugins/projectexplorer/projectwindow.cpp24
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp19
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h20
-rw-r--r--src/plugins/projectexplorer/runsettingspropertiespage.cpp46
-rw-r--r--src/plugins/projectexplorer/runsettingspropertiespage.h4
-rw-r--r--src/plugins/projectexplorer/session.cpp14
-rw-r--r--src/plugins/qmleditor/qmleditor.cpp8
-rw-r--r--src/plugins/qmleditor/qmleditor.h2
-rw-r--r--src/plugins/qmleditor/qmleditoractionhandler.cpp2
-rw-r--r--src/plugins/qmleditor/qmleditorconstants.h5
-rw-r--r--src/plugins/qmleditor/qmleditorfactory.cpp13
-rw-r--r--src/plugins/qmleditor/qmleditorfactory.h4
-rw-r--r--src/plugins/qmleditor/qmleditorplugin.cpp8
-rw-r--r--src/plugins/qmleditor/qmlfilewizard.cpp2
-rw-r--r--src/plugins/qmlinspector/qmlinspectormode.cpp4
-rw-r--r--src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp8
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.cpp22
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.h16
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectconstants.h3
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectfileseditor.cpp17
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectfileseditor.h5
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectwizard.cpp8
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp4
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.h2
-rw-r--r--src/plugins/qt4projectmanager/externaleditors.cpp49
-rw-r--r--src/plugins/qt4projectmanager/externaleditors.h9
-rw-r--r--src/plugins/qt4projectmanager/makestep.cpp14
-rw-r--r--src/plugins/qt4projectmanager/makestep.h8
-rw-r--r--src/plugins/qt4projectmanager/profileeditor.cpp4
-rw-r--r--src/plugins/qt4projectmanager/profileeditor.h2
-rw-r--r--src/plugins/qt4projectmanager/profileeditorfactory.cpp12
-rw-r--r--src/plugins/qt4projectmanager/profileeditorfactory.h4
-rw-r--r--src/plugins/qt4projectmanager/projectloadwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.cpp14
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.h8
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp37
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h23
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.cpp10
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp26
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h12
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h2
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp34
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.h14
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60manager.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.cpp92
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.h31
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt4project.cpp89
-rw-r--r--src/plugins/qt4projectmanager/qt4project.h36
-rw-r--r--src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanagerconstants.h5
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt4runconfiguration.cpp48
-rw-r--r--src/plugins/qt4projectmanager/qt4runconfiguration.h18
-rw-r--r--src/plugins/qt4projectmanager/qtoptionspage.cpp32
-rw-r--r--src/plugins/qt4projectmanager/qtoptionspage.h4
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.cpp24
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.h6
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizard.cpp14
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp4
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtprojectparameters.h2
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtwizard.cpp4
-rw-r--r--src/plugins/qt4projectmanager/wizards/testwizard.cpp6
-rw-r--r--src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp4
-rw-r--r--src/plugins/qtscripteditor/qtscripteditor.cpp4
-rw-r--r--src/plugins/qtscripteditor/qtscripteditor.h2
-rw-r--r--src/plugins/qtscripteditor/qtscripteditorconstants.h3
-rw-r--r--src/plugins/qtscripteditor/qtscripteditorfactory.cpp12
-rw-r--r--src/plugins/qtscripteditor/qtscripteditorfactory.h5
-rw-r--r--src/plugins/qtscripteditor/qtscripteditorplugin.cpp10
-rw-r--r--src/plugins/resourceeditor/resourceeditorconstants.h4
-rw-r--r--src/plugins/resourceeditor/resourceeditorfactory.cpp14
-rw-r--r--src/plugins/resourceeditor/resourceeditorfactory.h4
-rw-r--r--src/plugins/resourceeditor/resourceeditorplugin.cpp6
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.cpp4
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.h2
-rw-r--r--src/plugins/resourceeditor/resourcewizard.cpp2
-rw-r--r--src/plugins/subversion/checkoutwizard.cpp2
-rw-r--r--src/plugins/subversion/checkoutwizard.h2
-rw-r--r--src/plugins/subversion/settingspage.cpp4
-rw-r--r--src/plugins/subversion/settingspage.h4
-rw-r--r--src/plugins/subversion/subversioncontrol.cpp2
-rw-r--r--src/plugins/subversion/subversioncontrol.h2
-rw-r--r--src/plugins/subversion/subversionplugin.cpp6
-rw-r--r--src/plugins/texteditor/basetexteditor.h2
-rw-r--r--src/plugins/texteditor/behaviorsettingspage.cpp8
-rw-r--r--src/plugins/texteditor/behaviorsettingspage.h8
-rw-r--r--src/plugins/texteditor/colorscheme.cpp6
-rw-r--r--src/plugins/texteditor/colorscheme.h12
-rw-r--r--src/plugins/texteditor/colorschemeedit.cpp24
-rw-r--r--src/plugins/texteditor/displaysettingspage.cpp8
-rw-r--r--src/plugins/texteditor/displaysettingspage.h8
-rw-r--r--src/plugins/texteditor/fontsettings.cpp14
-rw-r--r--src/plugins/texteditor/fontsettingspage.cpp80
-rw-r--r--src/plugins/texteditor/fontsettingspage.h22
-rw-r--r--src/plugins/texteditor/linenumberfilter.h4
-rw-r--r--src/plugins/texteditor/plaintexteditor.cpp9
-rw-r--r--src/plugins/texteditor/plaintexteditor.h2
-rw-r--r--src/plugins/texteditor/plaintexteditorfactory.cpp14
-rw-r--r--src/plugins/texteditor/plaintexteditorfactory.h5
-rw-r--r--src/plugins/texteditor/texteditorplugin.cpp6
-rw-r--r--src/plugins/texteditor/texteditorsettings.cpp12
-rw-r--r--src/plugins/texteditor/textfilewizard.cpp6
-rw-r--r--src/plugins/texteditor/textfilewizard.h4
-rw-r--r--src/plugins/vcsbase/basecheckoutwizard.cpp4
-rw-r--r--src/plugins/vcsbase/basecheckoutwizard.h2
-rw-r--r--src/plugins/vcsbase/basevcseditorfactory.cpp15
-rw-r--r--src/plugins/vcsbase/basevcseditorfactory.h4
-rw-r--r--src/plugins/vcsbase/basevcssubmiteditorfactory.cpp18
-rw-r--r--src/plugins/vcsbase/basevcssubmiteditorfactory.h3
-rw-r--r--src/plugins/vcsbase/vcsbaseeditor.cpp10
-rw-r--r--src/plugins/vcsbase/vcsbaseeditor.h5
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.cpp20
-rw-r--r--src/plugins/vcsbase/vcsbaseplugin.h2
-rw-r--r--src/plugins/vcsbase/vcsbasesettingspage.cpp4
-rw-r--r--src/plugins/vcsbase/vcsbasesettingspage.h4
-rw-r--r--src/plugins/vcsbase/vcsbasesubmiteditor.cpp6
-rw-r--r--src/plugins/vcsbase/vcsbasesubmiteditor.h5
-rw-r--r--src/plugins/welcome/welcomemode.cpp6
-rw-r--r--src/plugins/welcome/welcomemode.h4
-rw-r--r--src/plugins/welcome/welcomeplugin.cpp2
332 files changed, 1666 insertions, 1543 deletions
diff --git a/src/libs/utils/filewizarddialog.cpp b/src/libs/utils/filewizarddialog.cpp
index d1190b0d38..6c3ee378b5 100644
--- a/src/libs/utils/filewizarddialog.cpp
+++ b/src/libs/utils/filewizarddialog.cpp
@@ -46,9 +46,9 @@ FileWizardDialog::FileWizardDialog(QWidget *parent) :
connect(m_filePage, SIGNAL(activated()), button(QWizard::FinishButton), SLOT(animateClick()));
}
-QString FileWizardDialog::name() const
+QString FileWizardDialog::fileName() const
{
- return m_filePage->name();
+ return m_filePage->fileName();
}
QString FileWizardDialog::path() const
@@ -62,9 +62,9 @@ void FileWizardDialog::setPath(const QString &path)
}
-void FileWizardDialog::setName(const QString &name)
+void FileWizardDialog::setFileName(const QString &name)
{
- m_filePage->setName(name);
+ m_filePage->setFileName(name);
}
} // namespace Utils
diff --git a/src/libs/utils/filewizarddialog.h b/src/libs/utils/filewizarddialog.h
index c408543bb4..4046a067c4 100644
--- a/src/libs/utils/filewizarddialog.h
+++ b/src/libs/utils/filewizarddialog.h
@@ -49,12 +49,12 @@ class QTCREATOR_UTILS_EXPORT FileWizardDialog : public QWizard {
public:
explicit FileWizardDialog(QWidget *parent = 0);
- QString name() const;
+ QString fileName() const;
QString path() const;
public slots:
void setPath(const QString &path);
- void setName(const QString &name);
+ void setFileName(const QString &name);
private:
FileWizardPage *m_filePage;
diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp
index 06db5d5c28..827c406bee 100644
--- a/src/libs/utils/filewizardpage.cpp
+++ b/src/libs/utils/filewizardpage.cpp
@@ -61,7 +61,7 @@ FileWizardPage::~FileWizardPage()
delete m_d;
}
-QString FileWizardPage::name() const
+QString FileWizardPage::fileName() const
{
return m_d->m_ui.nameLineEdit->text();
}
@@ -76,7 +76,7 @@ void FileWizardPage::setPath(const QString &path)
m_d->m_ui.pathChooser->setPath(path);
}
-void FileWizardPage::setName(const QString &name)
+void FileWizardPage::setFileName(const QString &name)
{
m_d->m_ui.nameLineEdit->setText(name);
}
@@ -98,7 +98,7 @@ bool FileWizardPage::isComplete() const
return m_d->m_complete;
}
-void FileWizardPage::setNameLabel(const QString &label)
+void FileWizardPage::setFileNameLabel(const QString &label)
{
m_d->m_ui.nameLabel->setText(label);
}
diff --git a/src/libs/utils/filewizardpage.h b/src/libs/utils/filewizardpage.h
index fd2ded147b..ef23c9c231 100644
--- a/src/libs/utils/filewizardpage.h
+++ b/src/libs/utils/filewizardpage.h
@@ -50,17 +50,17 @@ class QTCREATOR_UTILS_EXPORT FileWizardPage : public QWizardPage
Q_OBJECT
Q_DISABLE_COPY(FileWizardPage)
Q_PROPERTY(QString path READ path WRITE setPath DESIGNABLE true)
- Q_PROPERTY(QString name READ name WRITE setName DESIGNABLE true)
+ Q_PROPERTY(QString fileName READ fileName WRITE setFileName DESIGNABLE true)
public:
explicit FileWizardPage(QWidget *parent = 0);
virtual ~FileWizardPage();
- QString name() const;
+ QString fileName() const;
QString path() const;
virtual bool isComplete() const;
- void setNameLabel(const QString &label);
+ void setFileNameLabel(const QString &label);
void setPathLabel(const QString &label);
// Validate a base name entry field (potentially containing extension)
@@ -72,7 +72,7 @@ signals:
public slots:
void setPath(const QString &path);
- void setName(const QString &name);
+ void setFileName(const QString &name);
private slots:
void slotValidChanged();
diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp
index 3c77494b25..ef39fb84ec 100644
--- a/src/libs/utils/projectintropage.cpp
+++ b/src/libs/utils/projectintropage.cpp
@@ -80,7 +80,7 @@ ProjectIntroPage::~ProjectIntroPage()
delete m_d;
}
-QString ProjectIntroPage::name() const
+QString ProjectIntroPage::projectName() const
{
return m_d->m_ui.nameLineEdit->text();
}
@@ -95,7 +95,7 @@ void ProjectIntroPage::setPath(const QString &path)
m_d->m_ui.pathChooser->setPath(path);
}
-void ProjectIntroPage::setName(const QString &name)
+void ProjectIntroPage::setProjectName(const QString &name)
{
m_d->m_ui.nameLineEdit->setText(name);
m_d->m_ui.nameLineEdit->selectAll();
diff --git a/src/libs/utils/projectintropage.h b/src/libs/utils/projectintropage.h
index 6fb53ec66d..0ebd427239 100644
--- a/src/libs/utils/projectintropage.h
+++ b/src/libs/utils/projectintropage.h
@@ -57,13 +57,13 @@ class QTCREATOR_UTILS_EXPORT ProjectIntroPage : public QWizardPage
Q_DISABLE_COPY(ProjectIntroPage)
Q_PROPERTY(QString description READ description WRITE setPath DESIGNABLE true)
Q_PROPERTY(QString path READ path WRITE setPath DESIGNABLE true)
- Q_PROPERTY(QString name READ name WRITE setName DESIGNABLE true)
+ Q_PROPERTY(QString projectName READ projectName WRITE setProjectName DESIGNABLE true)
Q_PROPERTY(bool useAsDefaultPath READ useAsDefaultPath WRITE setUseAsDefaultPath DESIGNABLE true)
public:
explicit ProjectIntroPage(QWidget *parent = 0);
virtual ~ProjectIntroPage();
- QString name() const;
+ QString projectName() const;
QString path() const;
QString description() const;
bool useAsDefaultPath() const;
@@ -81,7 +81,7 @@ signals:
public slots:
void setPath(const QString &path);
- void setName(const QString &name);
+ void setProjectName(const QString &name);
void setDescription(const QString &description);
void setUseAsDefaultPath(bool u);
diff --git a/src/plugins/bineditor/bineditorconstants.h b/src/plugins/bineditor/bineditorconstants.h
index 15697d008e..b597211d70 100644
--- a/src/plugins/bineditor/bineditorconstants.h
+++ b/src/plugins/bineditor/bineditorconstants.h
@@ -33,7 +33,8 @@
namespace BINEditor {
namespace Constants {
-const char * const C_BINEDITOR = "Binary Editor";
+const char * const C_BINEDITOR_ID = "BinEditor.BinaryEditor";
+const char * const C_BINEDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", "Binary Editor");
const char * const C_BINEDITOR_MIMETYPE = "application/octet-stream";
} // namespace Constants
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp
index 04bf7642f9..decffc0c0e 100644
--- a/src/plugins/bineditor/bineditorplugin.cpp
+++ b/src/plugins/bineditor/bineditorplugin.cpp
@@ -303,8 +303,8 @@ public:
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_editor = parent;
m_file = new BinEditorFile(parent);
- m_context << uidm->uniqueIdentifier(Core::Constants::K_DEFAULT_BINARY_EDITOR);
- m_context << uidm->uniqueIdentifier(Constants::C_BINEDITOR);
+ m_context << uidm->uniqueIdentifier(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
+ m_context << uidm->uniqueIdentifier(Constants::C_BINEDITOR_ID);
m_cursorPositionLabel = new Utils::LineColumnLabel;
QHBoxLayout *l = new QHBoxLayout;
@@ -336,7 +336,7 @@ public:
return m_file->open(fileName);
}
Core::IFile *file() { return m_file; }
- const char *kind() const { return Core::Constants::K_DEFAULT_BINARY_EDITOR; }
+ QString id() const { return QLatin1String(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID); }
QString displayName() const { return m_displayName; }
void setDisplayName(const QString &title) { m_displayName = title; emit changed(); }
@@ -371,21 +371,25 @@ private:
///////////////////////////////// BinEditorFactory //////////////////////////////////
BinEditorFactory::BinEditorFactory(BinEditorPlugin *owner) :
- m_kind(QLatin1String(Core::Constants::K_DEFAULT_BINARY_EDITOR)),
m_mimeTypes(QLatin1String(BINEditor::Constants::C_BINEDITOR_MIMETYPE)),
m_owner(owner)
{
}
-QString BinEditorFactory::kind() const
+QString BinEditorFactory::id() const
{
- return m_kind;
+ return QLatin1String(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
+}
+
+QString BinEditorFactory::displayName() const
+{
+ return tr(Constants::C_BINEDITOR_DISPLAY_NAME);
}
Core::IFile *BinEditorFactory::open(const QString &fileName)
{
Core::EditorManager *em = Core::EditorManager::instance();
- Core::IEditor *iface = em->openEditor(fileName, kind());
+ Core::IEditor *iface = em->openEditor(fileName, id());
return iface ? iface->file() : 0;
}
@@ -439,7 +443,7 @@ void BinEditorPlugin::initializeEditor(BinEditor *editor)
editor->setEditorInterface(editorInterface);
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
- m_context << uidm->uniqueIdentifier(Constants::C_BINEDITOR);
+ m_context << uidm->uniqueIdentifier(Constants::C_BINEDITOR_ID);
if (!m_undoAction) {
m_undoAction = registerNewAction(QLatin1String(Core::Constants::UNDO),
this, SLOT(undoAction()),
diff --git a/src/plugins/bineditor/bineditorplugin.h b/src/plugins/bineditor/bineditorplugin.h
index 6001ff629b..329de5c2aa 100644
--- a/src/plugins/bineditor/bineditorplugin.h
+++ b/src/plugins/bineditor/bineditorplugin.h
@@ -95,11 +95,11 @@ public:
virtual QStringList mimeTypes() const;
Core::IEditor *createEditor(QWidget *parent);
- QString kind() const;
+ QString id() const;
+ QString displayName() const;
Core::IFile *open(const QString &fileName);
private:
- const QString m_kind;
const QStringList m_mimeTypes;
BinEditorPlugin *m_owner;
};
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
index 6a22d4b849..1224a8751e 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
@@ -28,8 +28,14 @@
**************************************************************************/
#include "cmakebuildconfiguration.h"
+
+#include "cmakeopenprojectwizard.h"
#include "cmakeproject.h"
+
#include <projectexplorer/projectexplorerconstants.h>
+#include <utils/qtcassert.h>
+
+#include <QtGui/QInputDialog>
using namespace CMakeProjectManager;
using namespace Internal;
@@ -202,3 +208,84 @@ void CMakeBuildConfiguration::setMsvcVersion(const QString &msvcVersion)
emit msvcVersionChanged();
}
+/*!
+ \class CMakeBuildConfigurationFactory
+*/
+
+CMakeBuildConfigurationFactory::CMakeBuildConfigurationFactory(CMakeProject *project)
+ : IBuildConfigurationFactory(project),
+ m_project(project)
+{
+}
+
+CMakeBuildConfigurationFactory::~CMakeBuildConfigurationFactory()
+{
+}
+
+QStringList CMakeBuildConfigurationFactory::availableCreationIds() const
+{
+ return QStringList() << "Create";
+}
+
+QString CMakeBuildConfigurationFactory::displayNameForId(const QString &id) const
+{
+ QTC_ASSERT(id == "Create", return QString());
+ return tr("Create");
+}
+
+ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::create(const QString &id) const
+{
+ QTC_ASSERT(id == "Create", return 0);
+
+ //TODO configuration name should be part of the cmakeopenprojectwizard
+ bool ok;
+ QString buildConfigurationName = QInputDialog::getText(0,
+ tr("New configuration"),
+ tr("New Configuration Name:"),
+ QLineEdit::Normal,
+ QString(),
+ &ok);
+ if (!ok || buildConfigurationName.isEmpty())
+ return false;
+ CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(m_project);
+ bc->setDisplayName(buildConfigurationName);
+
+ MakeStep *makeStep = new MakeStep(bc);
+ bc->insertBuildStep(0, makeStep);
+
+ MakeStep *cleanMakeStep = new MakeStep(bc);
+ bc->insertCleanStep(0, cleanMakeStep);
+ cleanMakeStep->setClean(true);
+
+ CMakeOpenProjectWizard copw(m_project->projectManager(),
+ m_project->sourceDirectory(),
+ bc->buildDirectory(),
+ bc->environment());
+ if (copw.exec() != QDialog::Accepted) {
+ delete bc;
+ return false;
+ }
+ m_project->addBuildConfiguration(bc); // this also makes the name unique
+
+ bc->setBuildDirectory(copw.buildDirectory());
+ bc->setMsvcVersion(copw.msvcVersion());
+ m_project->parseCMakeLists();
+
+ // Default to all
+ if (m_project->targets().contains("all"))
+ makeStep->setBuildTarget("all", true);
+ return bc;
+}
+
+ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::clone(ProjectExplorer::BuildConfiguration *source) const
+{
+ CMakeBuildConfiguration *old = static_cast<CMakeBuildConfiguration *>(source);
+ CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(old);
+ return bc;
+}
+
+ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::restore(const QVariantMap &map) const
+{
+ CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(m_project, map);
+ return bc;
+}
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
index 5e424334c4..7bf9fe9bd9 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
+++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
@@ -82,6 +82,24 @@ private:
QString m_msvcVersion;
};
+class CMakeBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
+{
+ Q_OBJECT
+
+public:
+ CMakeBuildConfigurationFactory(CMakeProject *project);
+ ~CMakeBuildConfigurationFactory();
+
+ QStringList availableCreationIds() const;
+ QString displayNameForId(const QString &id) const;
+
+ ProjectExplorer::BuildConfiguration *create(const QString &id) const;
+ ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::BuildConfiguration *source) const;
+ ProjectExplorer::BuildConfiguration *restore(const QVariantMap &map) const;
+
+private:
+ CMakeProject *m_project;
+};
} // namespace Internal
} // namespace CMakeProjectManager
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index b4ec10e62a..79a81eee8f 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -67,87 +67,6 @@ using ProjectExplorer::EnvironmentItem;
// Who sets up the environment for cl.exe ? INCLUDEPATH and so on
/*!
- \class CMakeBuildConfigurationFactory
-*/
-
-CMakeBuildConfigurationFactory::CMakeBuildConfigurationFactory(CMakeProject *project)
- : IBuildConfigurationFactory(project),
- m_project(project)
-{
-}
-
-CMakeBuildConfigurationFactory::~CMakeBuildConfigurationFactory()
-{
-}
-
-QStringList CMakeBuildConfigurationFactory::availableCreationTypes() const
-{
- return QStringList() << "Create";
-}
-
-QString CMakeBuildConfigurationFactory::displayNameForType(const QString & /* type */) const
-{
- return tr("Create");
-}
-
-BuildConfiguration *CMakeBuildConfigurationFactory::create(const QString &type) const
-{
- QTC_ASSERT(type == "Create", return false);
-
- //TODO configuration name should be part of the cmakeopenprojectwizard
- bool ok;
- QString buildConfigurationName = QInputDialog::getText(0,
- tr("New configuration"),
- tr("New Configuration Name:"),
- QLineEdit::Normal,
- QString(),
- &ok);
- if (!ok || buildConfigurationName.isEmpty())
- return false;
- CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(m_project);
- bc->setDisplayName(buildConfigurationName);
-
- MakeStep *makeStep = new MakeStep(bc);
- bc->insertBuildStep(0, makeStep);
-
- MakeStep *cleanMakeStep = new MakeStep(bc);
- bc->insertCleanStep(0, cleanMakeStep);
- cleanMakeStep->setClean(true);
-
- CMakeOpenProjectWizard copw(m_project->projectManager(),
- m_project->sourceDirectory(),
- bc->buildDirectory(),
- bc->environment());
- if (copw.exec() != QDialog::Accepted) {
- delete bc;
- return false;
- }
- m_project->addBuildConfiguration(bc); // this also makes the name unique
-
- bc->setBuildDirectory(copw.buildDirectory());
- bc->setMsvcVersion(copw.msvcVersion());
- m_project->parseCMakeLists();
-
- // Default to all
- if (m_project->targets().contains("all"))
- makeStep->setBuildTarget("all", true);
- return bc;
-}
-
-BuildConfiguration *CMakeBuildConfigurationFactory::clone(ProjectExplorer::BuildConfiguration *source) const
-{
- CMakeBuildConfiguration *old = static_cast<CMakeBuildConfiguration *>(source);
- CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(old);
- return bc;
-}
-
-BuildConfiguration *CMakeBuildConfigurationFactory::restore(const QMap<QString, QVariant> &map) const
-{
- CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(m_project, map);
- return bc;
-}
-
-/*!
\class CMakeProject
*/
CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
@@ -504,7 +423,7 @@ ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *
return parent;
}
-QString CMakeProject::name() const
+QString CMakeProject::displayName() const
{
return m_projectName;
}
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h
index 6fbf50ce06..81a9a010af 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.h
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.h
@@ -63,25 +63,6 @@ struct CMakeTarget
void clear();
};
-class CMakeBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
-{
- Q_OBJECT
-
-public:
- CMakeBuildConfigurationFactory(CMakeProject *project);
- ~CMakeBuildConfigurationFactory();
-
- QStringList availableCreationTypes() const;
- QString displayNameForType(const QString &type) const;
-
- ProjectExplorer::BuildConfiguration *create(const QString &type) const;
- ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::BuildConfiguration *source) const;
- ProjectExplorer::BuildConfiguration *restore(const QMap<QString, QVariant> &map) const;
-
-private:
- CMakeProject *m_project;
-};
-
class CMakeProject : public ProjectExplorer::Project
{
Q_OBJECT
@@ -93,7 +74,7 @@ public:
CMakeBuildConfiguration *activeCMakeBuildConfiguration() const;
- virtual QString name() const;
+ virtual QString displayName() const;
virtual Core::IFile *file() const;
virtual ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const;
virtual CMakeManager *projectManager() const;
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
index 65fd5920df..0dcce6ed26 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
@@ -244,7 +244,7 @@ QString CMakeSettingsPage::id() const
return QLatin1String("CMake");
}
-QString CMakeSettingsPage::trName() const
+QString CMakeSettingsPage::displayName() const
{
return tr("CMake");
}
@@ -254,7 +254,7 @@ QString CMakeSettingsPage::category() const
return QLatin1String("M.CMake");
}
-QString CMakeSettingsPage::trCategory() const
+QString CMakeSettingsPage::displayCategory() const
{
return tr("CMake");
}
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
index 2c8a3ee3fc..401cbe8b45 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
@@ -88,9 +88,9 @@ public:
CMakeSettingsPage();
virtual ~CMakeSettingsPage();
virtual QString id() const;
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index c68f6b3015..b9c317333e 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -54,7 +54,7 @@ CMakeRunConfiguration::CMakeRunConfiguration(CMakeProject *pro, const QString &t
, m_title(title)
, m_baseEnvironmentBase(CMakeRunConfiguration::BuildEnvironmentBase)
{
- setName(title);
+ setDisplayName(title);
connect(pro, SIGNAL(environmentChanged()),
this, SIGNAL(baseEnvironmentChanged()));
@@ -70,7 +70,7 @@ CMakeProject *CMakeRunConfiguration::cmakeProject() const
return static_cast<CMakeProject *>(project());
}
-QString CMakeRunConfiguration::type() const
+QString CMakeRunConfiguration::id() const
{
return Constants::CMAKERUNCONFIGURATION;
}
@@ -417,15 +417,15 @@ CMakeRunConfigurationFactory::~CMakeRunConfigurationFactory()
}
// used to recreate the runConfigurations when restoring settings
-bool CMakeRunConfigurationFactory::canRestore(const QString &type) const
+bool CMakeRunConfigurationFactory::canRestore(const QString &id) const
{
- if (type.startsWith(Constants::CMAKERUNCONFIGURATION))
+ if (id.startsWith(Constants::CMAKERUNCONFIGURATION))
return true;
return false;
}
-// used to show the list of possible additons to a project, returns a list of types
-QStringList CMakeRunConfigurationFactory::availableCreationTypes(ProjectExplorer::Project *project) const
+// used to show the list of possible additons to a project, returns a list of ids
+QStringList CMakeRunConfigurationFactory::availableCreationIds(ProjectExplorer::Project *project) const
{
CMakeProject *pro = qobject_cast<CMakeProject *>(project);
if (!pro)
@@ -437,28 +437,28 @@ QStringList CMakeRunConfigurationFactory::availableCreationTypes(ProjectExplorer
return allTargets;
}
-// used to translate the types to names to display to the user
-QString CMakeRunConfigurationFactory::displayNameForType(const QString &type) const
+// used to translate the ids to names to display to the user
+QString CMakeRunConfigurationFactory::displayNameForId(const QString &id) const
{
- Q_ASSERT(type.startsWith(Constants::CMAKERUNCONFIGURATION));
+ Q_ASSERT(id.startsWith(Constants::CMAKERUNCONFIGURATION));
- if (type == Constants::CMAKERUNCONFIGURATION)
+ if (id == Constants::CMAKERUNCONFIGURATION)
return "CMake"; // Doesn't happen
else
- return type.mid(QString(Constants::CMAKERUNCONFIGURATION).length());
+ return id.mid(QString(Constants::CMAKERUNCONFIGURATION).length());
}
-ProjectExplorer::RunConfiguration* CMakeRunConfigurationFactory::create(ProjectExplorer::Project *project, const QString &type)
+ProjectExplorer::RunConfiguration* CMakeRunConfigurationFactory::create(ProjectExplorer::Project *project, const QString &id)
{
CMakeProject *pro = qobject_cast<CMakeProject *>(project);
Q_ASSERT(pro);
- if (type == Constants::CMAKERUNCONFIGURATION) {
+ if (id == Constants::CMAKERUNCONFIGURATION) {
// Restoring, filename will be added by restoreSettings
ProjectExplorer::RunConfiguration* rc = new CMakeRunConfiguration(pro, QString::null, QString::null, QString::null);
return rc;
} else {
// Adding new
- const QString title = type.mid(QString(Constants::CMAKERUNCONFIGURATION).length());
+ const QString title = id.mid(QString(Constants::CMAKERUNCONFIGURATION).length());
const CMakeTarget &ct = pro->targetForTitle(title);
ProjectExplorer::RunConfiguration * rc = new CMakeRunConfiguration(pro, ct.executable, ct.workingDirectory, ct.title);
return rc;
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
index 3e646490ab..de700e06c4 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
@@ -55,7 +55,7 @@ public:
virtual ~CMakeRunConfiguration();
CMakeProject *cmakeProject() const;
- virtual QString type() const;
+ virtual QString id() const;
virtual QString executable() const;
virtual RunMode runMode() const;
virtual QString workingDirectory() const;
@@ -137,12 +137,12 @@ public:
CMakeRunConfigurationFactory();
virtual ~CMakeRunConfigurationFactory();
// used to recreate the runConfigurations when restoring settings
- virtual bool canRestore(const QString &type) const;
+ virtual bool canRestore(const QString &id) const;
// used to show the list of possible additons to a project, returns a list of types
- virtual QStringList availableCreationTypes(ProjectExplorer::Project *pro) const;
+ virtual QStringList availableCreationIds(ProjectExplorer::Project *pro) const;
// used to translate the types to names to display to the user
- virtual QString displayNameForType(const QString &type) const;
- virtual ProjectExplorer::RunConfiguration* create(ProjectExplorer::Project *project, const QString &type);
+ virtual QString displayNameForId(const QString &id) const;
+ virtual ProjectExplorer::RunConfiguration* create(ProjectExplorer::Project *project, const QString &id);
};
diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp
index 86a74073e5..cd37ee9745 100644
--- a/src/plugins/cmakeprojectmanager/makestep.cpp
+++ b/src/plugins/cmakeprojectmanager/makestep.cpp
@@ -132,7 +132,7 @@ void MakeStep::run(QFutureInterface<bool> &fi)
m_futureInterface = 0;
}
-QString MakeStep::name()
+QString MakeStep::id()
{
return Constants::MAKESTEP;
}
@@ -298,14 +298,14 @@ QString MakeStepConfigWidget::summaryText() const
// MakeStepFactory
//
-bool MakeStepFactory::canCreate(const QString &name) const
+bool MakeStepFactory::canCreate(const QString &id) const
{
- return (Constants::MAKESTEP == name);
+ return (Constants::MAKESTEP == id);
}
-BuildStep *MakeStepFactory::create(BuildConfiguration *bc, const QString &name) const
+BuildStep *MakeStepFactory::create(BuildConfiguration *bc, const QString &id) const
{
- Q_ASSERT(name == Constants::MAKESTEP);
+ Q_ASSERT(id == Constants::MAKESTEP);
return new MakeStep(bc);
}
@@ -314,13 +314,15 @@ BuildStep *MakeStepFactory::clone(BuildStep *bs, BuildConfiguration *bc) const
return new MakeStep(static_cast<MakeStep *>(bs), bc);
}
-QStringList MakeStepFactory::canCreateForBuildConfiguration(BuildConfiguration * /* pro */) const
+QStringList MakeStepFactory::canCreateForBuildConfiguration(BuildConfiguration *bc) const
{
+ Q_UNUSED(bc);
return QStringList();
}
-QString MakeStepFactory::displayNameForName(const QString & /* name */) const
+QString MakeStepFactory::displayNameForId(const QString &id) const
{
+ Q_UNUSED(id);
return "Make";
}
diff --git a/src/plugins/cmakeprojectmanager/makestep.h b/src/plugins/cmakeprojectmanager/makestep.h
index 6859915fd1..a2ab1888dc 100644
--- a/src/plugins/cmakeprojectmanager/makestep.h
+++ b/src/plugins/cmakeprojectmanager/makestep.h
@@ -59,7 +59,7 @@ public:
virtual void run(QFutureInterface<bool> &fi);
- virtual QString name();
+ virtual QString id();
virtual QString displayName();
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
virtual bool immutable() const;
@@ -108,11 +108,11 @@ private:
class MakeStepFactory : public ProjectExplorer::IBuildStepFactory
{
- virtual bool canCreate(const QString &name) const;
- virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *bc, const QString &name) const;
+ virtual bool canCreate(const QString &id) const;
+ virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *bc, const QString &id) const;
virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStep *bs, ProjectExplorer::BuildConfiguration *bc) const;
virtual QStringList canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration *bc) const;
- virtual QString displayNameForName(const QString &name) const;
+ virtual QString displayNameForId(const QString &id) const;
};
} // namespace Internal
diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp
index 191411e1b0..fafddca2df 100644
--- a/src/plugins/coreplugin/basefilewizard.cpp
+++ b/src/plugins/coreplugin/basefilewizard.cpp
@@ -63,7 +63,7 @@ public:
explicit GeneratedFilePrivate(const QString &p);
QString path;
QByteArray contents;
- QString editorKind;
+ QString editorId;
bool binary;
};
@@ -139,14 +139,14 @@ void GeneratedFile::setBinary(bool b)
m_d->binary = b;
}
-QString GeneratedFile::editorKind() const
+QString GeneratedFile::editorId() const
{
- return m_d->editorKind;
+ return m_d->editorId;
}
-void GeneratedFile::setEditorKind(const QString &k)
+void GeneratedFile::setEditorId(const QString &k)
{
- m_d->editorKind = k;
+ m_d->editorId = k;
}
bool GeneratedFile::write(QString *errorMessage) const
@@ -189,10 +189,10 @@ public:
IWizard::Kind kind;
QIcon icon;
QString description;
- QString name;
+ QString displayName;
QString id;
QString category;
- QString trCategory;
+ QString displayCategory;
};
BaseFileWizardParameterData::BaseFileWizardParameterData(IWizard::Kind k) :
@@ -251,14 +251,14 @@ void BaseFileWizardParameters::setDescription(const QString &v)
m_d->description = v;
}
-QString BaseFileWizardParameters::name() const
+QString BaseFileWizardParameters::displayName() const
{
- return m_d->name;
+ return m_d->displayName;
}
-void BaseFileWizardParameters::setName(const QString &v)
+void BaseFileWizardParameters::setDisplayName(const QString &v)
{
- m_d->name = v;
+ m_d->displayName = v;
}
QString BaseFileWizardParameters::id() const
@@ -281,14 +281,14 @@ void BaseFileWizardParameters::setCategory(const QString &v)
m_d->category = v;
}
-QString BaseFileWizardParameters::trCategory() const
+QString BaseFileWizardParameters::displayCategory() const
{
- return m_d->trCategory;
+ return m_d->displayCategory;
}
-void BaseFileWizardParameters::setTrCategory(const QString &v)
+void BaseFileWizardParameters::setDisplayCategory(const QString &v)
{
- m_d->trCategory = v;
+ m_d->displayCategory = v;
}
/* WizardEventLoop: Special event loop that runs a QWizard and terminates if the page changes.
@@ -416,9 +416,9 @@ QString BaseFileWizard::description() const
return m_d->m_parameters.description();
}
-QString BaseFileWizard::name() const
+QString BaseFileWizard::displayName() const
{
- return m_d->m_parameters.name();
+ return m_d->m_parameters.displayName();
}
QString BaseFileWizard::id() const
@@ -431,9 +431,9 @@ QString BaseFileWizard::category() const
return m_d->m_parameters.category();
}
-QString BaseFileWizard::trCategory() const
+QString BaseFileWizard::displayCategory() const
{
- return m_d->m_parameters.trCategory();
+ return m_d->m_parameters.displayCategory();
}
QStringList BaseFileWizard::runWizard(const QString &path, QWidget *parent)
@@ -553,7 +553,7 @@ bool BaseFileWizard::postGenerateFiles(const GeneratedFiles &l, QString *errorMe
const Core::GeneratedFiles::const_iterator cend = l.constEnd();
Core::EditorManager *em = Core::EditorManager::instance();
for (Core::GeneratedFiles::const_iterator it = l.constBegin(); it != cend; ++it) {
- if (!em->openEditor(it->path(), it->editorKind())) {
+ if (!em->openEditor(it->path(), it->editorId())) {
*errorMessage = tr("Failed to open an editor for '%1'.").arg(it->path());
return false;
}
@@ -665,7 +665,7 @@ QWizard *StandardFileWizard::createWizardDialog(QWidget *parent,
const WizardPageList &extensionPages) const
{
Utils::FileWizardDialog *standardWizardDialog = new Utils::FileWizardDialog(parent);
- standardWizardDialog->setWindowTitle(tr("New %1").arg(name()));
+ standardWizardDialog->setWindowTitle(tr("New %1").arg(displayName()));
setupWizard(standardWizardDialog);
standardWizardDialog->setPath(defaultPath);
foreach (QWizardPage *p, extensionPages)
@@ -678,7 +678,7 @@ GeneratedFiles StandardFileWizard::generateFiles(const QWizard *w,
{
const Utils::FileWizardDialog *standardWizardDialog = qobject_cast<const Utils::FileWizardDialog *>(w);
return generateFilesFromPath(standardWizardDialog->path(),
- standardWizardDialog->name(),
+ standardWizardDialog->fileName(),
errorMessage);
}
diff --git a/src/plugins/coreplugin/basefilewizard.h b/src/plugins/coreplugin/basefilewizard.h
index 7bd2aed658..d255847d6b 100644
--- a/src/plugins/coreplugin/basefilewizard.h
+++ b/src/plugins/coreplugin/basefilewizard.h
@@ -82,9 +82,9 @@ public:
bool isBinary() const;
void setBinary(bool b);
- // Kind of editor to open the file with
- QString editorKind() const;
- void setEditorKind(const QString &k);
+ // Id of editor to open the file with
+ QString editorId() const;
+ void setEditorId(const QString &k);
bool write(QString *errorMessage) const;
@@ -114,8 +114,8 @@ public:
QString description() const;
void setDescription(const QString &description);
- QString name() const;
- void setName(const QString &name);
+ QString displayName() const;
+ void setDisplayName(const QString &name);
QString id() const;
void setId(const QString &id);
@@ -123,8 +123,8 @@ public:
QString category() const;
void setCategory(const QString &category);
- QString trCategory() const;
- void setTrCategory(const QString &trCategory);
+ QString displayCategory() const;
+ void setDisplayCategory(const QString &trCategory);
private:
QSharedDataPointer<BaseFileWizardParameterData> m_d;
@@ -154,11 +154,11 @@ public:
virtual Kind kind() const;
virtual QIcon icon() const;
virtual QString description() const;
- virtual QString name() const;
+ virtual QString displayName() const;
virtual QString id() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QStringList runWizard(const QString &path, QWidget *parent);
diff --git a/src/plugins/coreplugin/basemode.cpp b/src/plugins/coreplugin/basemode.cpp
index 5aad657b02..02c831c73d 100644
--- a/src/plugins/coreplugin/basemode.cpp
+++ b/src/plugins/coreplugin/basemode.cpp
@@ -53,7 +53,7 @@ using namespace Core;
{
[...]
addObject(new Core::BaseMode("mymode",
- "MyPlugin.UniqueModeName",
+ "MyPlugin.Id",
icon,
50, // priority
new MyWidget));
@@ -65,7 +65,7 @@ using namespace Core;
/*!
\fn BaseMode::BaseMode(QObject *parent)
- Creates a mode with empty name, no icon, lowest priority and no widget. You should use the
+ Creates a mode with empty display name, no icon, lowest priority and no widget. You should use the
setter functions to give the mode a meaning.
\a parent
diff --git a/src/plugins/coreplugin/basemode.h b/src/plugins/coreplugin/basemode.h
index 9f701b7c33..c402f7c13d 100644
--- a/src/plugins/coreplugin/basemode.h
+++ b/src/plugins/coreplugin/basemode.h
@@ -49,26 +49,26 @@ public:
~BaseMode();
// IMode
- QString name() const { return m_name; }
+ QString displayName() const { return m_displayName; }
QIcon icon() const { return m_icon; }
int priority() const { return m_priority; }
QWidget *widget() { return m_widget; }
- const char *uniqueModeName() const { return m_uniqueModeName; }
+ QString id() const { return m_id; }
QList<int> context() const { return m_context; }
- void setName(const QString &name) { m_name = name; }
+ void setDisplayName(const QString &name) { m_displayName = name; }
void setIcon(const QIcon &icon) { m_icon = icon; }
void setPriority(int priority) { m_priority = priority; }
void setWidget(QWidget *widget) { m_widget = widget; }
- void setUniqueModeName(const char *uniqueModeName) { m_uniqueModeName = uniqueModeName; }
+ void setId(const QString &id) { m_id = id; }
void setContext(const QList<int> &context) { m_context = context; }
private:
- QString m_name;
+ QString m_displayName;
QIcon m_icon;
int m_priority;
QWidget *m_widget;
- const char * m_uniqueModeName;
+ QString m_id;
QList<int> m_context;
};
diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h
index dc8f70c91f..4ace5f3563 100644
--- a/src/plugins/coreplugin/coreconstants.h
+++ b/src/plugins/coreplugin/coreconstants.h
@@ -92,8 +92,9 @@ const char * const C_NAVIGATION_PANE = "Core.NavigationPane";
const char * const C_PROBLEM_PANE = "Core.ProblemPane";
//default editor kind
-const char * const K_DEFAULT_TEXT_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors", "Plain Text Editor");
-const char * const K_DEFAULT_BINARY_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors", "Binary Editor");
+const char * const K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", "Plain Text Editor");
+const char * const K_DEFAULT_TEXT_EDITOR_ID = "Core.PlainTextEditor";
+const char * const K_DEFAULT_BINARY_EDITOR_ID = "Core.BinaryEditor";
//actions
const char * const UNDO = "QtCreator.Undo";
diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.cpp b/src/plugins/coreplugin/dialogs/ioptionspage.cpp
index ade65ea368..59cfb9d2a6 100644
--- a/src/plugins/coreplugin/dialogs/ioptionspage.cpp
+++ b/src/plugins/coreplugin/dialogs/ioptionspage.cpp
@@ -37,9 +37,9 @@
Guidelines for implementing:
\list
\o id() is an id used for filtering when calling ICore:: showOptionsDialog()
- \o trName() is the (translated) name for display.
+ \o displayName() is the (translated) name for display.
\o category() is the category used for filtering when calling ICore:: showOptionsDialog()
- \o trCategory() is the translated category
+ \o displayCategory() is the translated category
\o apply() is called to store the settings. It should detect if any changes have been
made and store those.
\o matches() is used for the options dialog search filter.
diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.h b/src/plugins/coreplugin/dialogs/ioptionspage.h
index f7c0c10a95..67e1327cd0 100644
--- a/src/plugins/coreplugin/dialogs/ioptionspage.h
+++ b/src/plugins/coreplugin/dialogs/ioptionspage.h
@@ -48,9 +48,9 @@ public:
virtual ~IOptionsPage() {}
virtual QString id() const = 0;
- virtual QString trName() const = 0;
+ virtual QString displayName() const = 0;
virtual QString category() const = 0;
- virtual QString trCategory() const = 0;
+ virtual QString displayCategory() const = 0;
virtual bool matches(const QString & /* searchKeyWord*/) const { return false; }
virtual QWidget *createPage(QWidget *parent) = 0;
diff --git a/src/plugins/coreplugin/dialogs/iwizard.cpp b/src/plugins/coreplugin/dialogs/iwizard.cpp
index c8436680e5..01e4bfb8a3 100644
--- a/src/plugins/coreplugin/dialogs/iwizard.cpp
+++ b/src/plugins/coreplugin/dialogs/iwizard.cpp
@@ -118,7 +118,7 @@
*/
/*!
- \fn QString IWizard::trCategory() const
+ \fn QString IWizard::displayCategory() const
Returns the translated string of the category, how it should appear
in the dialog.
*/
diff --git a/src/plugins/coreplugin/dialogs/iwizard.h b/src/plugins/coreplugin/dialogs/iwizard.h
index 112380bf2e..bd526a90e6 100644
--- a/src/plugins/coreplugin/dialogs/iwizard.h
+++ b/src/plugins/coreplugin/dialogs/iwizard.h
@@ -56,11 +56,11 @@ public:
virtual Kind kind() const = 0;
virtual QIcon icon() const = 0;
virtual QString description() const = 0;
- virtual QString name() const = 0;
+ virtual QString displayName() const = 0;
virtual QString id() const = 0;
virtual QString category() const = 0;
- virtual QString trCategory() const = 0;
+ virtual QString displayCategory() const = 0;
virtual QStringList runWizard(const QString &path, QWidget *parent) = 0;
diff --git a/src/plugins/coreplugin/dialogs/newdialog.cpp b/src/plugins/coreplugin/dialogs/newdialog.cpp
index 8108efafdf..ca194d2d85 100644
--- a/src/plugins/coreplugin/dialogs/newdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/newdialog.cpp
@@ -96,13 +96,13 @@ void NewDialog::setWizards(QList<IWizard*> wizards)
if (cit == categories.end()) {
QTreeWidgetItem *categoryItem = new QTreeWidgetItem(m_ui->templatesTree);
categoryItem->setFlags(Qt::ItemIsEnabled);
- categoryItem->setText(0, wizard->trCategory());
+ categoryItem->setText(0, wizard->displayCategory());
qVariantSetValue<IWizard*>(wizardPtr, 0);
categoryItem->setData(0, Qt::UserRole, wizardPtr);
cit = categories.insert(categoryName, categoryItem);
}
// add item
- QTreeWidgetItem *wizardItem = new QTreeWidgetItem(cit.value(), QStringList(wizard->name()));
+ QTreeWidgetItem *wizardItem = new QTreeWidgetItem(cit.value(), QStringList(wizard->displayName()));
wizardItem->setIcon(0, wizard->icon());
qVariantSetValue<IWizard*>(wizardPtr, wizard);
wizardItem->setData(0, Qt::UserRole, wizardPtr);
diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp
index d4dd5aae7d..e82187ca01 100644
--- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp
@@ -132,7 +132,7 @@ bool PageFilterModel::filterAcceptsRow(int source_row, const QModelIndex &source
return true;
if (const IOptionsPage *page = pageOfItem(sourceModel(), source_parent.child(source_row, 0))) {
const QString pattern = filterRegExp().pattern();
- return page->trCategory().contains(pattern, Qt::CaseInsensitive) ||
+ return page->displayCategory().contains(pattern, Qt::CaseInsensitive) ||
page->matches(pattern);
}
return false;
@@ -151,9 +151,9 @@ static QStandardItemModel *pageModel(const QList<IOptionsPage*> &pages,
QMap<QString, QStandardItem *> categories;
foreach (IOptionsPage *page, pages) {
const QStringList categoriesId = page->category().split(hierarchySeparator);
- const QStringList trCategories = page->trCategory().split(hierarchySeparator);
+ const QStringList displayCategories = page->displayCategory().split(hierarchySeparator);
const int categoryDepth = categoriesId.size();
- if (categoryDepth != trCategories.size()) {
+ if (categoryDepth != displayCategories.size()) {
qWarning("Internal error: Hierarchy mismatch in settings page %s.", qPrintable(page->id()));
continue;
}
@@ -162,7 +162,7 @@ static QStandardItemModel *pageModel(const QList<IOptionsPage*> &pages,
QString currentCategory = categoriesId.at(0);
QStandardItem *treeItem = categories.value(currentCategory, 0);
if (!treeItem) {
- treeItem = createStandardItem(model, trCategories.at(0), CategoryItem);
+ treeItem = createStandardItem(model, displayCategories.at(0), CategoryItem);
categories.insert(currentCategory, treeItem);
}
@@ -172,7 +172,7 @@ static QStandardItemModel *pageModel(const QList<IOptionsPage*> &pages,
if (!treeItem) {
QStandardItem *parentItem = categories.value(currentCategory);
QTC_ASSERT(parentItem, return model)
- treeItem = createStandardItem(parentItem, trCategories.at(cat), CategoryItem);
+ treeItem = createStandardItem(parentItem, displayCategories.at(cat), CategoryItem);
categories.insert(fullCategory, treeItem);
}
currentCategory = fullCategory;
@@ -180,7 +180,7 @@ static QStandardItemModel *pageModel(const QList<IOptionsPage*> &pages,
// Append page item
QTC_ASSERT(treeItem, return model)
- QStandardItem *item = createStandardItem(treeItem, page->trName(), PageItem, index, page);
+ QStandardItem *item = createStandardItem(treeItem, page->displayName(), PageItem, index, page);
if (currentCategory == initialCategory && page->id() == initialPageId) {
*initialIndex = model->indexFromItem(item);
}
@@ -339,7 +339,7 @@ void SettingsDialog::showPage(const QStandardItem *item)
m_currentPage = page->id();
m_stackedLayout->setCurrentIndex(indexOfItem(item));
m_visitedPages.insert(page);
- m_headerLabel->setText(page->trName());
+ m_headerLabel->setText(page->displayName());
}
break;
case CategoryItem:
diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
index 1333c58127..0a76901f62 100644
--- a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
+++ b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
@@ -69,7 +69,7 @@ QString ShortcutSettings::id() const
return QLatin1String("D.Keyboard");
}
-QString ShortcutSettings::trName() const
+QString ShortcutSettings::displayName() const
{
return tr("Keyboard");
}
@@ -79,7 +79,7 @@ QString ShortcutSettings::category() const
return QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE);
}
-QString ShortcutSettings::trCategory() const
+QString ShortcutSettings::displayCategory() const
{
return QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE);
}
diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.h b/src/plugins/coreplugin/dialogs/shortcutsettings.h
index 6fff59a6b6..0a15b739bd 100644
--- a/src/plugins/coreplugin/dialogs/shortcutsettings.h
+++ b/src/plugins/coreplugin/dialogs/shortcutsettings.h
@@ -68,9 +68,9 @@ public:
// IOptionsPage
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/coreplugin/editmode.cpp b/src/plugins/coreplugin/editmode.cpp
index 8a6fef9569..6ff8aa8099 100644
--- a/src/plugins/coreplugin/editmode.cpp
+++ b/src/plugins/coreplugin/editmode.cpp
@@ -90,7 +90,7 @@ EditMode::~EditMode()
delete m_splitter;
}
-QString EditMode::name() const
+QString EditMode::displayName() const
{
return tr("Edit");
}
@@ -110,9 +110,9 @@ QWidget* EditMode::widget()
return m_splitter;
}
-const char* EditMode::uniqueModeName() const
+QString EditMode::id() const
{
- return Constants::MODE_EDIT;
+ return QLatin1String(Constants::MODE_EDIT);
}
QList<int> EditMode::context() const
diff --git a/src/plugins/coreplugin/editmode.h b/src/plugins/coreplugin/editmode.h
index 58ac43bc59..5b9f82618f 100644
--- a/src/plugins/coreplugin/editmode.h
+++ b/src/plugins/coreplugin/editmode.h
@@ -55,11 +55,11 @@ public:
~EditMode();
// IMode
- QString name() const;
+ QString displayName() const;
QIcon icon() const;
int priority() const;
QWidget* widget();
- const char* uniqueModeName() const;
+ QString id() const;
QList<int> context() const;
private slots:
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index ae9ab54780..264b9a836c 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -841,8 +841,8 @@ Core::IEditor *EditorManager::activateEditor(const QModelIndex &index, Internal:
}
QString fileName = index.data(Qt::UserRole + 1).toString();
- QByteArray kind = index.data(Qt::UserRole + 2).toByteArray();
- return openEditor(view, fileName, kind, flags);
+ QString id = index.data(Qt::UserRole + 2).toString();
+ return openEditor(view, fileName, id, flags);
}
Core::IEditor *EditorManager::placeEditor(Core::Internal::EditorView *view, Core::IEditor *editor)
@@ -970,45 +970,44 @@ EditorManager::ExternalEditorList
return rc;
}
-/* For something that has a 'QString kind' (IEditorFactory
- * or IExternalEditor), find the one matching a kind. */
+/* For something that has a 'QString id' (IEditorFactory
+ * or IExternalEditor), find the one matching a id. */
template <class EditorFactoryLike>
- inline EditorFactoryLike *findByKind(ExtensionSystem::PluginManager *pm,
- const QString &kind)
+ inline EditorFactoryLike *findById(ExtensionSystem::PluginManager *pm,
+ const QString &id)
{
const QList<EditorFactoryLike *> factories = pm->template getObjects<EditorFactoryLike>();
foreach(EditorFactoryLike *efl, factories)
- if (kind == efl->kind())
+ if (id == efl->id())
return efl;
return 0;
}
-IEditor *EditorManager::createEditor(const QString &editorKind,
+IEditor *EditorManager::createEditor(const QString &editorId,
const QString &fileName)
{
typedef QList<IEditorFactory*> FactoryList;
if (debugEditorManager)
- qDebug() << Q_FUNC_INFO << editorKind << fileName;
-
+ qDebug() << Q_FUNC_INFO << editorId << fileName;
EditorFactoryList factories;
- if (editorKind.isEmpty()) {
+ if (editorId.isEmpty()) {
// Find by mime type
MimeType mimeType = m_d->m_core->mimeDatabase()->findByFile(QFileInfo(fileName));
if (!mimeType) {
qWarning("%s unable to determine mime type of %s/%s. Falling back to text/plain",
- Q_FUNC_INFO, fileName.toUtf8().constData(), editorKind.toUtf8().constData());
+ Q_FUNC_INFO, fileName.toUtf8().constData(), editorId.toUtf8().constData());
mimeType = m_d->m_core->mimeDatabase()->findByType(QLatin1String("text/plain"));
}
factories = editorFactories(mimeType, true);
} else {
- // Find by editor kind
- if (IEditorFactory *factory = findByKind<IEditorFactory>(pluginManager(), editorKind))
+ // Find by editor id
+ if (IEditorFactory *factory = findById<IEditorFactory>(pluginManager(), editorId))
factories.push_back(factory);
}
if (factories.empty()) {
- qWarning("%s: unable to find an editor factory for the file '%s', editor kind '%s'.",
- Q_FUNC_INFO, fileName.toUtf8().constData(), editorKind.toUtf8().constData());
+ qWarning("%s: unable to find an editor factory for the file '%s', editor Id '%s'.",
+ Q_FUNC_INFO, fileName.toUtf8().constData(), editorId.toUtf8().constData());
return 0;
}
@@ -1036,42 +1035,42 @@ void EditorManager::addEditor(IEditor *editor, bool isDuplicate)
emit editorOpened(editor);
}
-// Run the OpenWithDialog and return the editor kind
+// Run the OpenWithDialog and return the editor id
// selected by the user.
-QString EditorManager::getOpenWithEditorKind(const QString &fileName,
- bool *isExternalEditor) const
+QString EditorManager::getOpenWithEditorId(const QString &fileName,
+ bool *isExternalEditor) const
{
// Collect editors that can open the file
const MimeType mt = m_d->m_core->mimeDatabase()->findByFile(fileName);
if (!mt)
return QString();
- QStringList allEditorKinds;
- QStringList externalEditorKinds;
+ QStringList allEditorIds;
+ QStringList externalEditorIds;
// Built-in
const EditorFactoryList editors = editorFactories(mt, false);
const int size = editors.size();
for (int i = 0; i < size; i++) {
- allEditorKinds.push_back(editors.at(i)->kind());
+ allEditorIds.push_back(editors.at(i)->id());
}
// External editors
const ExternalEditorList exEditors = externalEditors(mt, false);
const int esize = exEditors.size();
for (int i = 0; i < esize; i++) {
- externalEditorKinds.push_back(exEditors.at(i)->kind());
- allEditorKinds.push_back(exEditors.at(i)->kind());
+ externalEditorIds.push_back(exEditors.at(i)->id());
+ allEditorIds.push_back(exEditors.at(i)->id());
}
- if (allEditorKinds.empty())
+ if (allEditorIds.empty())
return QString();
// Run dialog.
OpenWithDialog dialog(fileName, m_d->m_core->mainWindow());
- dialog.setEditors(allEditorKinds);
+ dialog.setEditors(allEditorIds);
dialog.setCurrentEditor(0);
if (dialog.exec() != QDialog::Accepted)
return QString();
- const QString selectedKind = dialog.editor();
+ const QString selectedId = dialog.editor();
if (isExternalEditor)
- *isExternalEditor = externalEditorKinds.contains(selectedKind);
- return selectedKind;
+ *isExternalEditor = externalEditorIds.contains(selectedId);
+ return selectedId;
}
static QString formatFileFilters(const Core::ICore *core, QString *selectedFilter)
@@ -1111,17 +1110,17 @@ static QString formatFileFilters(const Core::ICore *core, QString *selectedFilte
return rc;
}
-IEditor *EditorManager::openEditor(const QString &fileName, const QString &editorKind,
+IEditor *EditorManager::openEditor(const QString &fileName, const QString &editorId,
EditorManager::OpenEditorFlags flags)
{
- return openEditor(0, fileName, editorKind, flags);
+ return openEditor(0, fileName, editorId, flags);
}
IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QString &fileName,
- const QString &editorKind, EditorManager::OpenEditorFlags flags)
+ const QString &editorId, EditorManager::OpenEditorFlags flags)
{
if (debugEditorManager)
- qDebug() << Q_FUNC_INFO << fileName << editorKind;
+ qDebug() << Q_FUNC_INFO << fileName << editorId;
if (fileName.isEmpty())
return 0;
@@ -1131,7 +1130,7 @@ IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QStri
return activateEditor(view, editors.first(), flags);
}
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
- IEditor *editor = createEditor(editorKind, fileName);
+ IEditor *editor = createEditor(editorId, fileName);
if (!editor || !editor->open(fileName)) {
QApplication::restoreOverrideCursor();
QMessageBox::critical(m_d->m_core->mainWindow(), tr("Opening File"), tr("Cannot open file %1!").arg(QDir::toNativeSeparators(fileName)));
@@ -1148,9 +1147,9 @@ IEditor *EditorManager::openEditor(Core::Internal::EditorView *view, const QStri
return result;
}
-bool EditorManager::openExternalEditor(const QString &fileName, const QString &editorKind)
+bool EditorManager::openExternalEditor(const QString &fileName, const QString &editorId)
{
- IExternalEditor *ee = findByKind<IExternalEditor>(pluginManager(), editorKind);
+ IExternalEditor *ee = findById<IExternalEditor>(pluginManager(), editorId);
if (!ee)
return false;
QString errorMessage;
@@ -1176,18 +1175,18 @@ void EditorManager::ensureEditorManagerVisible()
m_d->m_core->modeManager()->activateMode(Constants::MODE_EDIT);
}
-IEditor *EditorManager::openEditorWithContents(const QString &editorKind,
+IEditor *EditorManager::openEditorWithContents(const QString &editorId,
QString *titlePattern,
const QString &contents)
{
if (debugEditorManager)
- qDebug() << Q_FUNC_INFO << editorKind << titlePattern << contents;
+ qDebug() << Q_FUNC_INFO << editorId << titlePattern << contents;
- if (editorKind.isEmpty())
+ if (editorId.isEmpty())
return 0;
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
- IEditor *edt = createEditor(editorKind);
+ IEditor *edt = createEditor(editorId);
if (!edt) {
QApplication::restoreOverrideCursor();
return 0;
@@ -1311,7 +1310,7 @@ EditorManager::ReadOnlyAction
QPushButton *sccButton = 0;
if (versionControl && versionControl->supportsOperation(IVersionControl::OpenOperation))
- sccButton = msgBox.addButton(tr("Open with VCS (%1)").arg(versionControl->name()), QMessageBox::AcceptRole);
+ sccButton = msgBox.addButton(tr("Open with VCS (%1)").arg(versionControl->displayName()), QMessageBox::AcceptRole);
QPushButton *makeWritableButton = msgBox.addButton(tr("Make writable"), QMessageBox::AcceptRole);
@@ -1556,7 +1555,7 @@ QByteArray EditorManager::saveState() const
stream << entries.count();
foreach (OpenEditorsModel::Entry entry, entries) {
- stream << entry.fileName() << entry.displayName() << entry.kind();
+ stream << entry.fileName() << entry.displayName() << entry.id();
}
stream << m_d->m_splitter->saveState();
@@ -1595,11 +1594,11 @@ bool EditorManager::restoreState(const QByteArray &state)
stream >> fileName;
QString displayName;
stream >> displayName;
- QByteArray kind;
- stream >> kind;
+ QString id;
+ stream >> id;
if (!fileName.isEmpty() && !displayName.isEmpty()){
- m_d->m_editorModel->addRestoredEditor(fileName, displayName, kind);
+ m_d->m_editorModel->addRestoredEditor(fileName, displayName, id);
}
}
@@ -1685,35 +1684,35 @@ void EditorManager::revertToSaved()
currEditor->file()->modified(&temp);
}
-void EditorManager::showEditorInfoBar(const QString &kind,
+void EditorManager::showEditorInfoBar(const QString &id,
const QString &infoText,
const QString &buttonText,
QObject *object, const char *member)
{
- currentEditorView()->showEditorInfoBar(kind, infoText, buttonText, object, member);
+ currentEditorView()->showEditorInfoBar(id, infoText, buttonText, object, member);
}
-void EditorManager::hideEditorInfoBar(const QString &kind)
+void EditorManager::hideEditorInfoBar(const QString &id)
{
Core::Internal::EditorView *cev = currentEditorView();
if (cev)
- cev->hideEditorInfoBar(kind);
+ cev->hideEditorInfoBar(id);
}
-void EditorManager::showEditorStatusBar(const QString &kind,
+void EditorManager::showEditorStatusBar(const QString &id,
const QString &infoText,
const QString &buttonText,
QObject *object, const char *member)
{
- currentEditorView()->showEditorStatusBar(kind, infoText, buttonText, object, member);
+ currentEditorView()->showEditorStatusBar(id, infoText, buttonText, object, member);
}
-void EditorManager::hideEditorStatusBar(const QString &kind)
+void EditorManager::hideEditorStatusBar(const QString &id)
{
- currentEditorView()->hideEditorStatusBar(kind);
+ currentEditorView()->hideEditorStatusBar(id);
}
QString EditorManager::externalEditorHelpText() const
diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h
index 44febeba42..23607ed107 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.h
+++ b/src/plugins/coreplugin/editormanager/editormanager.h
@@ -113,16 +113,16 @@ public:
Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag)
IEditor *openEditor(const QString &fileName,
- const QString &editorKind = QString(),
+ const QString &editorId = QString(),
OpenEditorFlags flags = 0);
- IEditor *openEditorWithContents(const QString &editorKind,
+ IEditor *openEditorWithContents(const QString &editorId,
QString *titlePattern = 0,
const QString &contents = QString());
- bool openExternalEditor(const QString &fileName, const QString &editorKind);
+ bool openExternalEditor(const QString &fileName, const QString &editorId);
QStringList getOpenFileNames() const;
- QString getOpenWithEditorKind(const QString &fileName, bool *isExternalEditor = 0) const;
+ QString getOpenWithEditorId(const QString &fileName, bool *isExternalEditor = 0) const;
void ensureEditorManagerVisible();
bool hasEditor(const QString &fileName) const;
@@ -153,7 +153,7 @@ public:
QByteArray saveState() const;
bool restoreState(const QByteArray &state);
- IEditor *restoreEditor(QString fileName, QString editorKind, EditorGroup *group);
+ IEditor *restoreEditor(QString fileName, QString editorId, EditorGroup *group);
void saveSettings();
void readSettings();
@@ -161,19 +161,19 @@ public:
Internal::OpenEditorsWindow *windowPopup() const;
void showPopupOrSelectDocument() const;
- void showEditorInfoBar(const QString &kind,
+ void showEditorInfoBar(const QString &id,
const QString &infoText,
const QString &buttonText = QString(),
QObject *object = 0, const char *member = 0);
- void hideEditorInfoBar(const QString &kind);
+ void hideEditorInfoBar(const QString &id);
- void showEditorStatusBar(const QString &kind,
+ void showEditorStatusBar(const QString &id,
const QString &infoText,
const QString &buttonText = QString(),
QObject *object = 0, const char *member = 0);
- void hideEditorStatusBar(const QString &kind);
+ void hideEditorStatusBar(const QString &id);
EditorFactoryList editorFactories(const MimeType &mimeType, bool bestMatchOnly = true) const;
ExternalEditorList externalEditors(const MimeType &mimeType, bool bestMatchOnly = true) const;
@@ -244,7 +244,7 @@ private:
void setCurrentView(Core::Internal::SplitterOrView *view);
IEditor *activateEditor(Core::Internal::EditorView *view, Core::IEditor *editor, OpenEditorFlags flags = 0);
IEditor *openEditor(Core::Internal::EditorView *view, const QString &fileName,
- const QString &editorKind = QString(),
+ const QString &editorId = QString(),
OpenEditorFlags flags = 0);
Core::Internal::SplitterOrView *currentSplitterOrView() const;
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index 951484aa4c..f87c1c1e0b 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -224,12 +224,12 @@ EditorView::~EditorView()
{
}
-void EditorView::showEditorInfoBar(const QString &kind,
- const QString &infoText,
- const QString &buttonText,
- QObject *object, const char *member)
+void EditorView::showEditorInfoBar(const QString &id,
+ const QString &infoText,
+ const QString &buttonText,
+ QObject *object, const char *member)
{
- m_infoWidgetKind = kind;
+ m_infoWidgetId = id;
m_infoWidgetLabel->setText(infoText);
m_infoWidgetButton->setText(buttonText);
m_infoWidgetButton->disconnect();
@@ -239,18 +239,18 @@ void EditorView::showEditorInfoBar(const QString &kind,
m_editorForInfoWidget = currentEditor();
}
-void EditorView::hideEditorInfoBar(const QString &kind)
+void EditorView::hideEditorInfoBar(const QString &id)
{
- if (kind == m_infoWidgetKind)
+ if (id == m_infoWidgetId)
m_infoWidget->setVisible(false);
}
-void EditorView::showEditorStatusBar(const QString &kind,
+void EditorView::showEditorStatusBar(const QString &id,
const QString &infoText,
const QString &buttonText,
QObject *object, const char *member)
{
- m_statusWidgetKind = kind;
+ m_statusWidgetId = id;
m_statusWidgetLabel->setText(infoText);
m_statusWidgetButton->setText(buttonText);
m_statusWidgetButton->disconnect();
@@ -261,9 +261,9 @@ void EditorView::showEditorStatusBar(const QString &kind,
//m_editorForInfoWidget = currentEditor();
}
-void EditorView::hideEditorStatusBar(const QString &kind)
+void EditorView::hideEditorStatusBar(const QString &id)
{
- if (kind == m_statusWidgetKind) {
+ if (id == m_statusWidgetId) {
m_statusWidget->setVisible(false);
m_statusHLine->setVisible(false);
}
@@ -470,7 +470,7 @@ void EditorView::updateEditorHistory(IEditor *editor)
EditLocation location;
location.file = file;
location.fileName = file->fileName();
- location.kind = editor->kind();
+ location.id = editor->id();
location.state = QVariant(state);
for(int i = 0; i < m_editorHistory.size(); ++i) {
@@ -510,7 +510,7 @@ void EditorView::addCurrentPositionToNavigationHistory(IEditor *editor, const QB
EditLocation location;
location.file = file;
location.fileName = file->fileName();
- location.kind = editor->kind();
+ location.id = editor->id();
location.state = QVariant(state);
m_currentNavigationHistoryPosition = qMin(m_currentNavigationHistoryPosition, m_navigationHistory.size()); // paranoia
m_navigationHistory.insert(m_currentNavigationHistoryPosition, location);
@@ -567,7 +567,7 @@ void EditorView::updateCurrentPositionInNavigationHistory()
}
location->file = file;
location->fileName = file->fileName();
- location->kind = editor->kind();
+ location->id = editor->id();
location->state = QVariant(editor->saveState());
}
@@ -582,7 +582,7 @@ void EditorView::goBackInNavigationHistory()
if (location.file) {
editor = em->activateEditor(this, location.file, EditorManager::IgnoreNavigationHistory);
} else {
- editor = em->openEditor(this, location.fileName, location.kind, EditorManager::IgnoreNavigationHistory);
+ editor = em->openEditor(this, location.fileName, location.id, EditorManager::IgnoreNavigationHistory);
if (!editor) {
m_navigationHistory.removeAt(m_currentNavigationHistoryPosition);
continue;
@@ -606,7 +606,7 @@ void EditorView::goForwardInNavigationHistory()
if (location.file) {
editor = em->activateEditor(this, location.file, EditorManager::IgnoreNavigationHistory);
} else {
- editor = em->openEditor(this, location.fileName, location.kind, EditorManager::IgnoreNavigationHistory);
+ editor = em->openEditor(this, location.fileName, location.id, EditorManager::IgnoreNavigationHistory);
if (!editor) {
//TODO
qDebug() << Q_FUNC_INFO << "can't open file" << location.fileName;
@@ -963,10 +963,10 @@ QByteArray SplitterOrView::saveState() const
if (e && e == em->currentEditor()) {
stream << QByteArray("currenteditor")
- << e->file()->fileName() << e->kind() << e->saveState();
+ << e->file()->fileName() << e->id() << e->saveState();
} else if (e) {
stream << QByteArray("editor")
- << e->file()->fileName() << e->kind() << e->saveState();
+ << e->file()->fileName() << e->id() << e->saveState();
} else {
stream << QByteArray("empty");
}
@@ -990,10 +990,10 @@ void SplitterOrView::restoreState(const QByteArray &state)
} else if (mode == "editor" || mode == "currenteditor") {
EditorManager *em = CoreImpl::instance()->editorManager();
QString fileName;
- QByteArray kind;
+ QByteArray id;
QByteArray editorState;
- stream >> fileName >> kind >> editorState;
- IEditor *e = em->openEditor(view(), fileName, kind, Core::EditorManager::IgnoreNavigationHistory
+ stream >> fileName >> id >> editorState;
+ IEditor *e = em->openEditor(view(), fileName, id, Core::EditorManager::IgnoreNavigationHistory
| Core::EditorManager::NoActivate);
if (!e) {
diff --git a/src/plugins/coreplugin/editormanager/editorview.h b/src/plugins/coreplugin/editormanager/editorview.h
index 76d5233b1d..b309a70135 100644
--- a/src/plugins/coreplugin/editormanager/editorview.h
+++ b/src/plugins/coreplugin/editormanager/editorview.h
@@ -60,12 +60,12 @@ class OpenEditorsModel;
namespace Internal {
- struct EditLocation {
- QPointer<IFile> file;
- QString fileName;
- QString kind;
- QVariant state;
- };
+struct EditLocation {
+ QPointer<IFile> file;
+ QString fileName;
+ QString id;
+ QVariant state;
+};
class EditorView : public QWidget
{
@@ -84,17 +84,17 @@ public:
bool hasEditor(IEditor *editor) const;
QList<IEditor *> editors() const;
- void showEditorInfoBar(const QString &kind,
+ void showEditorInfoBar(const QString &id,
const QString &infoText,
const QString &buttonText,
QObject *object, const char *member);
- void hideEditorInfoBar(const QString &kind);
+ void hideEditorInfoBar(const QString &id);
- void showEditorStatusBar(const QString &kind,
+ void showEditorStatusBar(const QString &id,
const QString &infoText,
const QString &buttonText,
QObject *object, const char *member);
- void hideEditorStatusBar(const QString &kind);
+ void hideEditorStatusBar(const QString &id);
public slots:
void closeView();
@@ -118,12 +118,12 @@ private:
QToolButton *m_closeButton;
QToolButton *m_lockButton;
QWidget *m_defaultToolBar;
- QString m_infoWidgetKind;
+ QString m_infoWidgetId;
QFrame *m_infoWidget;
QLabel *m_infoWidgetLabel;
QToolButton *m_infoWidgetButton;
IEditor *m_editorForInfoWidget;
- QString m_statusWidgetKind;
+ QString m_statusWidgetId;
QFrame *m_statusHLine;
QFrame *m_statusWidget;
QLabel *m_statusWidgetLabel;
diff --git a/src/plugins/coreplugin/editormanager/ieditor.h b/src/plugins/coreplugin/editormanager/ieditor.h
index d4440f0077..2f60ea5ab6 100644
--- a/src/plugins/coreplugin/editormanager/ieditor.h
+++ b/src/plugins/coreplugin/editormanager/ieditor.h
@@ -48,7 +48,7 @@ public:
virtual bool createNew(const QString &contents = QString()) = 0;
virtual bool open(const QString &fileName = QString()) = 0;
virtual IFile *file() = 0;
- virtual const char *kind() const = 0;
+ virtual QString id() const = 0;
virtual QString displayName() const = 0;
virtual void setDisplayName(const QString &title) = 0;
diff --git a/src/plugins/coreplugin/editormanager/iexternaleditor.h b/src/plugins/coreplugin/editormanager/iexternaleditor.h
index 439101cf0e..ce37701f72 100644
--- a/src/plugins/coreplugin/editormanager/iexternaleditor.h
+++ b/src/plugins/coreplugin/editormanager/iexternaleditor.h
@@ -44,7 +44,8 @@ public:
virtual ~IExternalEditor() {}
virtual QStringList mimeTypes() const = 0;
- virtual QString kind() const = 0;
+ virtual QString id() const = 0;
+ virtual QString displayName() const = 0;
virtual bool startEditor(const QString &fileName, QString *errorMessage) = 0;
};
diff --git a/src/plugins/coreplugin/editormanager/openeditorsmodel.cpp b/src/plugins/coreplugin/editormanager/openeditorsmodel.cpp
index 70b631ab6f..3b0beefeda 100644
--- a/src/plugins/coreplugin/editormanager/openeditorsmodel.cpp
+++ b/src/plugins/coreplugin/editormanager/openeditorsmodel.cpp
@@ -41,12 +41,14 @@ namespace Core {
QString OpenEditorsModel::Entry::fileName() const {
return editor ? editor->file()->fileName() : m_fileName;
}
+
QString OpenEditorsModel::Entry::displayName() const {
return editor ? editor->displayName() : m_displayName;
}
-QByteArray OpenEditorsModel::Entry::kind() const
+
+QString OpenEditorsModel::Entry::id() const
{
- return editor ? QByteArray(editor->kind()) : m_kind;
+ return editor ? editor->id() : m_id;
}
int OpenEditorsModel::columnCount(const QModelIndex &parent) const
@@ -86,12 +88,12 @@ void OpenEditorsModel::addEditor(IEditor *editor, bool isDuplicate)
addEntry(entry);
}
-void OpenEditorsModel::addRestoredEditor(const QString &fileName, const QString &displayName, const QByteArray &kind)
+void OpenEditorsModel::addRestoredEditor(const QString &fileName, const QString &displayName, const QString &id)
{
Entry entry;
entry.m_fileName = fileName;
entry.m_displayName = displayName;
- entry.m_kind = kind;
+ entry.m_id = id;
addEntry(entry);
}
@@ -259,7 +261,7 @@ QVariant OpenEditorsModel::data(const QModelIndex &index, int role) const
switch (role) {
case Qt::DisplayRole:
return (e.editor && e.editor->file()->isModified())
- ? e.displayName() + QLatin1String("*")
+ ? e.displayName() + QLatin1Char('*')
: e.displayName();
case Qt::DecorationRole:
return (e.editor && e.editor->file()->isReadOnly())
@@ -274,7 +276,7 @@ QVariant OpenEditorsModel::data(const QModelIndex &index, int role) const
case Qt::UserRole + 1:
return e.fileName();
case Qt::UserRole + 2:
- return e.editor ? QByteArray(e.editor->kind()) : e.kind();
+ return e.editor ? e.editor->id() : e.id();
default:
return QVariant();
}
diff --git a/src/plugins/coreplugin/editormanager/openeditorsmodel.h b/src/plugins/coreplugin/editormanager/openeditorsmodel.h
index 394c73805a..fb1e1cdb85 100644
--- a/src/plugins/coreplugin/editormanager/openeditorsmodel.h
+++ b/src/plugins/coreplugin/editormanager/openeditorsmodel.h
@@ -51,7 +51,7 @@ public:
QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
void addEditor(IEditor *editor, bool isDuplicate = false);
- void addRestoredEditor(const QString &fileName, const QString &displayName, const QByteArray &kind);
+ void addRestoredEditor(const QString &fileName, const QString &displayName, const QString &id);
QModelIndex firstRestoredEditor() const;
struct Entry {
@@ -59,10 +59,10 @@ public:
IEditor *editor;
QString fileName() const;
QString displayName() const;
- QByteArray kind() const;
+ QString id() const;
QString m_fileName;
QString m_displayName;
- QByteArray m_kind;
+ QString m_id;
};
QList<Entry> entries() const { return m_editors; }
diff --git a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp
index 8a428d87bf..16b12d5044 100644
--- a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp
+++ b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp
@@ -231,7 +231,7 @@ void OpenEditorsWindow::setEditors(EditorView *mainView, EditorView *view, OpenE
item->setToolTip(0, hi.file->fileName());
item->setData(0, Qt::UserRole, QVariant::fromValue(hi.file.data()));
item->setData(0, Qt::UserRole+1, QVariant::fromValue(view));
- item->setData(0, Qt::UserRole+2, QVariant::fromValue(hi.kind));
+ item->setData(0, Qt::UserRole+2, QVariant::fromValue(hi.id));
item->setTextAlignment(0, Qt::AlignLeft);
m_editorList->addTopLevelItem(item);
@@ -252,7 +252,7 @@ void OpenEditorsWindow::setEditors(EditorView *mainView, EditorView *view, OpenE
item->setIcon(0, emptyIcon);
item->setText(0, title);
item->setToolTip(0, entry.fileName());
- item->setData(0, Qt::UserRole+2, QVariant::fromValue(entry.kind()));
+ item->setData(0, Qt::UserRole+2, QVariant::fromValue(entry.id()));
item->setTextAlignment(0, Qt::AlignLeft);
m_editorList->addTopLevelItem(item);
diff --git a/src/plugins/coreplugin/findplaceholder.h b/src/plugins/coreplugin/findplaceholder.h
index cde214da0a..1b9d745963 100644
--- a/src/plugins/coreplugin/findplaceholder.h
+++ b/src/plugins/coreplugin/findplaceholder.h
@@ -37,8 +37,6 @@
namespace Core {
-class IMode;
-
class CORE_EXPORT FindToolBarPlaceHolder : public QWidget
{
Q_OBJECT
diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp
index 0a7690a08b..319f4d225c 100644
--- a/src/plugins/coreplugin/generalsettings.cpp
+++ b/src/plugins/coreplugin/generalsettings.cpp
@@ -62,7 +62,7 @@ QString GeneralSettings::id() const
return QLatin1String("A.General");
}
-QString GeneralSettings::trName() const
+QString GeneralSettings::displayName() const
{
return tr("General");
}
@@ -72,7 +72,7 @@ QString GeneralSettings::category() const
return QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE);
}
-QString GeneralSettings::trCategory() const
+QString GeneralSettings::displayCategory() const
{
return QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE);
}
diff --git a/src/plugins/coreplugin/generalsettings.h b/src/plugins/coreplugin/generalsettings.h
index cef5ef543c..8581bbbfc3 100644
--- a/src/plugins/coreplugin/generalsettings.h
+++ b/src/plugins/coreplugin/generalsettings.h
@@ -49,9 +49,9 @@ public:
GeneralSettings();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget* createPage(QWidget *parent);
void apply();
void finish();
diff --git a/src/plugins/coreplugin/ifilefactory.h b/src/plugins/coreplugin/ifilefactory.h
index 2dce2ff240..2d57eabc07 100644
--- a/src/plugins/coreplugin/ifilefactory.h
+++ b/src/plugins/coreplugin/ifilefactory.h
@@ -51,7 +51,9 @@ public:
virtual QStringList mimeTypes() const = 0;
- virtual QString kind() const = 0;
+ virtual QString id() const = 0;
+ virtual QString displayName() const = 0;
+
virtual Core::IFile *open(const QString &fileName) = 0;
};
diff --git a/src/plugins/coreplugin/imode.h b/src/plugins/coreplugin/imode.h
index 441db8f520..a736131e8b 100644
--- a/src/plugins/coreplugin/imode.h
+++ b/src/plugins/coreplugin/imode.h
@@ -47,10 +47,10 @@ public:
IMode(QObject *parent = 0) : IContext(parent) {}
virtual ~IMode() {}
- virtual QString name() const = 0;
+ virtual QString displayName() const = 0;
virtual QIcon icon() const = 0;
virtual int priority() const = 0;
- virtual const char *uniqueModeName() const = 0;
+ virtual QString id() const = 0;
};
} // namespace Core
diff --git a/src/plugins/coreplugin/iversioncontrol.h b/src/plugins/coreplugin/iversioncontrol.h
index f30c348edc..ecb1f418c0 100644
--- a/src/plugins/coreplugin/iversioncontrol.h
+++ b/src/plugins/coreplugin/iversioncontrol.h
@@ -46,7 +46,7 @@ public:
IVersionControl(QObject *parent = 0) : QObject(parent) {}
virtual ~IVersionControl() {}
- virtual QString name() const = 0;
+ virtual QString displayName() const = 0;
/*!
* Returns whether files in this directory should be managed with this
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index cdc3898ee3..e982d703ff 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -910,13 +910,13 @@ void MainWindow::openFileWith()
QStringList fileNames = editorManager()->getOpenFileNames();
foreach (const QString &fileName, fileNames) {
bool isExternal;
- const QString editorKind = editorManager()->getOpenWithEditorKind(fileName, &isExternal);
- if (editorKind.isEmpty())
+ const QString editorId = editorManager()->getOpenWithEditorId(fileName, &isExternal);
+ if (editorId.isEmpty())
continue;
if (isExternal) {
- editorManager()->openExternalEditor(fileName, editorKind);
+ editorManager()->openExternalEditor(fileName, editorId);
} else {
- editorManager()->openEditor(fileName, editorKind);
+ editorManager()->openEditor(fileName, editorId);
}
}
}
diff --git a/src/plugins/coreplugin/mainwindow.h b/src/plugins/coreplugin/mainwindow.h
index b10504e8f8..decaabb32c 100644
--- a/src/plugins/coreplugin/mainwindow.h
+++ b/src/plugins/coreplugin/mainwindow.h
@@ -63,7 +63,6 @@ class SettingsDatabase;
class UniqueIDManager;
class VariableManager;
class VCSManager;
-class IMode;
namespace Internal {
diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp
index de18955280..df9d41d01c 100644
--- a/src/plugins/coreplugin/modemanager.cpp
+++ b/src/plugins/coreplugin/modemanager.cpp
@@ -102,7 +102,7 @@ IMode *ModeManager::currentMode() const
int ModeManager::indexOf(const QString &id) const
{
for (int i = 0; i < m_modes.count(); ++i) {
- if (m_modes.at(i)->uniqueModeName() == id)
+ if (m_modes.at(i)->id() == id)
return i;
}
qDebug() << "Warning, no such mode:" << id;
@@ -139,13 +139,13 @@ void ModeManager::objectAdded(QObject *obj)
++index;
m_modes.insert(index, mode);
- m_modeStack->insertTab(index, mode->widget(), mode->icon(), mode->name());
+ m_modeStack->insertTab(index, mode->widget(), mode->icon(), mode->displayName());
// Register mode shortcut
ActionManager *am = m_mainWindow->actionManager();
- const QString shortcutId = QLatin1String("QtCreator.Mode.") + mode->uniqueModeName();
+ const QString shortcutId = QLatin1String("QtCreator.Mode.") + mode->id();
QShortcut *shortcut = new QShortcut(m_mainWindow);
- shortcut->setWhatsThis(tr("Switch to %1 mode").arg(mode->name()));
+ shortcut->setWhatsThis(tr("Switch to %1 mode").arg(mode->displayName()));
Command *cmd = am->registerShortcut(shortcut, shortcutId, QList<int>() << Constants::C_GLOBAL_ID);
m_modeShortcuts.insert(index, cmd);
@@ -163,7 +163,7 @@ void ModeManager::objectAdded(QObject *obj)
currentCmd->setKeySequence(currentCmd->defaultKeySequence());
}
- m_signalMapper->setMapping(shortcut, mode->uniqueModeName());
+ m_signalMapper->setMapping(shortcut, mode->id());
connect(shortcut, SIGNAL(activated()), m_signalMapper, SLOT(map()));
}
diff --git a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
index 6bce06b142..1eaee5f2ce 100644
--- a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
+++ b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
@@ -266,14 +266,14 @@ bool EditorManagerPrototype::closeEditors(const QList<Core::IEditor*> editorsToC
return callee()->closeEditors(editorsToClose, askAboutModifiedEditors);
}
-Core::IEditor *EditorManagerPrototype::openEditor(const QString &fileName, const QString &editorKind)
+Core::IEditor *EditorManagerPrototype::openEditor(const QString &fileName, const QString &editorId)
{
- return callee()->openEditor(fileName, editorKind);
+ return callee()->openEditor(fileName, editorId);
}
-Core::IEditor *EditorManagerPrototype::newFile(const QString &editorKind, QString titlePattern, const QString &contents)
+Core::IEditor *EditorManagerPrototype::newFile(const QString &editorId, QString titlePattern, const QString &contents)
{
- return callee()->openEditorWithContents(editorKind, &titlePattern, contents);
+ return callee()->openEditorWithContents(editorId, &titlePattern, contents);
}
int EditorManagerPrototype::makeEditorWritable(Core::IEditor *editor)
@@ -310,9 +310,9 @@ void EditorPrototype::setDisplayName(const QString &title)
callee()->setDisplayName(title);
}
-QString EditorPrototype::kind() const
+QString EditorPrototype::id() const
{
- return QLatin1String(callee()->kind());
+ return callee()->id();
}
bool EditorPrototype::duplicateSupported() const
diff --git a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
index 36f84b7792..86f0859b1f 100644
--- a/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
+++ b/src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
@@ -178,8 +178,8 @@ public:
public slots:
QList<Core::IEditor*> editorsForFiles(QList<Core::IFile*> files) const;
bool closeEditors(const QList<Core::IEditor*> editorsToClose, bool askAboutModifiedEditors);
- Core::IEditor *openEditor(const QString &fileName, const QString &editorKind);
- Core::IEditor *newFile(const QString &editorKind, QString titlePattern, const QString &contents);
+ Core::IEditor *openEditor(const QString &fileName, const QString &editorId);
+ Core::IEditor *newFile(const QString &editorId, QString titlePattern, const QString &contents);
int makeEditorWritable(Core::IEditor *editor);
QString toString() const;
@@ -194,7 +194,7 @@ class EditorPrototype : public QObject, public QScriptable
{
Q_OBJECT
Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName DESIGNABLE false SCRIPTABLE true STORED false)
- Q_PROPERTY(QString kind READ kind DESIGNABLE false SCRIPTABLE true STORED false)
+ Q_PROPERTY(QString id READ id DESIGNABLE false SCRIPTABLE true STORED false)
Q_PROPERTY(bool duplicateSupported READ duplicateSupported DESIGNABLE false SCRIPTABLE true STORED false)
Q_PROPERTY(Core::IFile* file READ file DESIGNABLE false SCRIPTABLE true STORED false)
Q_PROPERTY(QWidget* toolBar READ toolBar DESIGNABLE false SCRIPTABLE true STORED false)
@@ -205,7 +205,7 @@ public:
QString displayName() const;
void setDisplayName(const QString &title);
- QString kind() const;
+ QString id() const;
bool duplicateSupported() const;
Core::IFile *file() const;
diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp
index 2238d94bf4..5bac775e39 100644
--- a/src/plugins/coreplugin/vcsmanager.cpp
+++ b/src/plugins/coreplugin/vcsmanager.cpp
@@ -141,7 +141,7 @@ bool VCSManager::showDeleteDialog(const QString &fileName)
const QString title = QCoreApplication::translate("VCSManager", "Version Control");
const QString msg = QCoreApplication::translate("VCSManager",
"Would you like to remove this file from the version control system (%1)?\n"
- "Note: This might remove the local file.").arg(vc->name());
+ "Note: This might remove the local file.").arg(vc->displayName());
const QMessageBox::StandardButton button =
QMessageBox::question(0, title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
if (button != QMessageBox::Yes)
@@ -154,7 +154,7 @@ CORE_EXPORT QDebug operator<<(QDebug in, const VCSManager &v)
QDebug nospace = in.nospace();
const VersionControlCache::const_iterator cend = v.m_d->m_cachedMatches.constEnd();
for (VersionControlCache::const_iterator it = v.m_d->m_cachedMatches.constBegin(); it != cend; ++it)
- nospace << "Directory: " << it.key() << ' ' << it.value()->name() << '\n';
+ nospace << "Directory: " << it.key() << ' ' << it.value()->displayName() << '\n';
nospace << '\n';
return in;
}
diff --git a/src/plugins/cpaster/codepastersettings.cpp b/src/plugins/cpaster/codepastersettings.cpp
index 070907aeda..1c42d59668 100644
--- a/src/plugins/cpaster/codepastersettings.cpp
+++ b/src/plugins/cpaster/codepastersettings.cpp
@@ -59,7 +59,7 @@ QString CodePasterSettingsPage::id() const
return QLatin1String("C.CodePaster");
}
-QString CodePasterSettingsPage::trName() const
+QString CodePasterSettingsPage::displayName() const
{
return tr("CodePaster");
}
@@ -69,7 +69,7 @@ QString CodePasterSettingsPage::category() const
return QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY);
}
-QString CodePasterSettingsPage::trCategory() const
+QString CodePasterSettingsPage::displayCategory() const
{
return QCoreApplication::translate("CodePaster", Constants::CPASTER_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/cpaster/codepastersettings.h b/src/plugins/cpaster/codepastersettings.h
index ddbe31a21d..bf5b1e9d1e 100644
--- a/src/plugins/cpaster/codepastersettings.h
+++ b/src/plugins/cpaster/codepastersettings.h
@@ -52,9 +52,9 @@ public:
CodePasterSettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index f9017c3752..69c5a05f92 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -260,7 +260,7 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
ICore::instance()->messageManager()->printToOutputPane(content, true);
} else {
EditorManager* manager = EditorManager::instance();
- IEditor* editor = manager->openEditorWithContents(Core::Constants::K_DEFAULT_TEXT_EDITOR, &title, content);
+ IEditor* editor = manager->openEditorWithContents(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID, &title, content);
manager->activateEditor(editor);
}
}
diff --git a/src/plugins/cpaster/pastebindotcomsettings.cpp b/src/plugins/cpaster/pastebindotcomsettings.cpp
index 2775e9892e..8e3769168c 100644
--- a/src/plugins/cpaster/pastebindotcomsettings.cpp
+++ b/src/plugins/cpaster/pastebindotcomsettings.cpp
@@ -50,7 +50,7 @@ QString PasteBinDotComSettings::id() const
return QLatin1String("B.Pastebin.com");
}
-QString PasteBinDotComSettings::trName() const
+QString PasteBinDotComSettings::displayName() const
{
return tr("Pastebin.com");
}
@@ -60,7 +60,7 @@ QString PasteBinDotComSettings::category() const
return QLatin1String(CodePaster::Constants::CPASTER_SETTINGS_CATEGORY);
}
-QString PasteBinDotComSettings::trCategory() const
+QString PasteBinDotComSettings::displayCategory() const
{
return QCoreApplication::translate("CodePaster", CodePaster::Constants::CPASTER_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/cpaster/pastebindotcomsettings.h b/src/plugins/cpaster/pastebindotcomsettings.h
index 8e87ad0dbd..af0a966f1f 100644
--- a/src/plugins/cpaster/pastebindotcomsettings.h
+++ b/src/plugins/cpaster/pastebindotcomsettings.h
@@ -48,9 +48,9 @@ public:
PasteBinDotComSettings();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/cpaster/settingspage.cpp b/src/plugins/cpaster/settingspage.cpp
index 32a3b75c3e..171f306437 100644
--- a/src/plugins/cpaster/settingspage.cpp
+++ b/src/plugins/cpaster/settingspage.cpp
@@ -66,7 +66,7 @@ QString SettingsPage::id() const
return QLatin1String("A.General");
}
-QString SettingsPage::trName() const
+QString SettingsPage::displayName() const
{
return tr("General");
}
@@ -76,7 +76,7 @@ QString SettingsPage::category() const
return QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY);
}
-QString SettingsPage::trCategory() const
+QString SettingsPage::displayCategory() const
{
return QCoreApplication::translate("CodePaster", Constants::CPASTER_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/cpaster/settingspage.h b/src/plugins/cpaster/settingspage.h
index 72d2cdf8aa..d7f3bbfed1 100644
--- a/src/plugins/cpaster/settingspage.h
+++ b/src/plugins/cpaster/settingspage.h
@@ -52,9 +52,9 @@ public:
SettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/cppeditor/cppclasswizard.cpp b/src/plugins/cppeditor/cppclasswizard.cpp
index d0b10a99a2..5f6266e64e 100644
--- a/src/plugins/cppeditor/cppclasswizard.cpp
+++ b/src/plugins/cppeditor/cppclasswizard.cpp
@@ -197,10 +197,10 @@ Core::GeneratedFiles CppClassWizard::generateFiles(const QWizard *w, QString *er
const QString headerFileName = Core::BaseFileWizard::buildFileName(params.path, params.headerFile, headerSuffix());
Core::GeneratedFile sourceFile(sourceFileName);
- sourceFile.setEditorKind(QLatin1String(Constants::CPPEDITOR_KIND));
+ sourceFile.setEditorId(QLatin1String(Constants::CPPEDITOR_ID));
Core::GeneratedFile headerFile(headerFileName);
- headerFile.setEditorKind(QLatin1String(Constants::CPPEDITOR_KIND));
+ headerFile.setEditorId(QLatin1String(Constants::CPPEDITOR_ID));
QString header, source;
if (!generateHeaderAndSource(params, &header, &source)) {
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp
index ba09cff487..1daf077adf 100644
--- a/src/plugins/cppeditor/cppeditor.cpp
+++ b/src/plugins/cppeditor/cppeditor.cpp
@@ -596,9 +596,11 @@ CPPEditorEditable::CPPEditorEditable(CPPEditor *editor)
: BaseTextEditorEditable(editor)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
- m_context << uidm->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR);
+ m_context << uidm->uniqueIdentifier(CppEditor::Constants::CPPEDITOR_ID);
m_context << uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
m_context << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
+
+ setDisplayName(tr(CppEditor::Constants::CPPEDITOR_DISPLAY_NAME));
}
CPPEditor::CPPEditor(QWidget *parent)
@@ -2007,9 +2009,9 @@ Core::IEditor *CPPEditorEditable::duplicate(QWidget *parent)
return newEditor->editableInterface();
}
-const char *CPPEditorEditable::kind() const
+QString CPPEditorEditable::id() const
{
- return CppEditor::Constants::CPPEDITOR_KIND;
+ return QLatin1String(CppEditor::Constants::CPPEDITOR_ID);
}
bool CPPEditorEditable::open(const QString & fileName)
@@ -2095,7 +2097,7 @@ bool CPPEditor::openCppEditorAt(const Link &link)
return TextEditor::BaseTextEditor::openEditorAt(link.fileName,
link.line,
link.column,
- Constants::C_CPPEDITOR);
+ Constants::CPPEDITOR_ID);
}
void CPPEditor::semanticRehighlight()
diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h
index 38f14c141a..c7c5378775 100644
--- a/src/plugins/cppeditor/cppeditor.h
+++ b/src/plugins/cppeditor/cppeditor.h
@@ -166,7 +166,7 @@ public:
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
- const char *kind() const;
+ QString id() const;
bool isTemporary() const { return false; }
virtual bool open(const QString & fileName);
diff --git a/src/plugins/cppeditor/cppeditorconstants.h b/src/plugins/cppeditor/cppeditorconstants.h
index d115bcf162..d79f2590dc 100644
--- a/src/plugins/cppeditor/cppeditorconstants.h
+++ b/src/plugins/cppeditor/cppeditorconstants.h
@@ -35,8 +35,8 @@ namespace Constants {
const char * const FORMATCODE = "CppEditor.FormatCode";
const char * const M_CONTEXT = "CppEditor.ContextMenu";
-const char * const C_CPPEDITOR = "C++ Editor";
-const char * const CPPEDITOR_KIND = QT_TRANSLATE_NOOP("OpenWith::Editors", "C++ Editor");
+const char * const CPPEDITOR_ID = "CppPlugin.C++Editor";
+const char * const CPPEDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", "C++ Editor");
const char * const SWITCH_DECLARATION_DEFINITION = "CppEditor.SwitchDeclarationDefinition";
const char * const RENAME_SYMBOL_UNDER_CURSOR = "CppEditor.RenameSymbolUnderCursor";
const char * const FIND_USAGES = "CppEditor.FindUsages";
diff --git a/src/plugins/cppeditor/cppfilewizard.cpp b/src/plugins/cppeditor/cppfilewizard.cpp
index 63140ef32b..4e42e9bff3 100644
--- a/src/plugins/cppeditor/cppfilewizard.cpp
+++ b/src/plugins/cppeditor/cppfilewizard.cpp
@@ -60,7 +60,7 @@ Core::GeneratedFiles CppFileWizard::generateFilesFromPath(const QString &path,
const QString fileName = Core::BaseFileWizard::buildFileName(path, name, preferredSuffix(mimeType));
Core::GeneratedFile file(fileName);
- file.setEditorKind(QLatin1String(Constants::C_CPPEDITOR));
+ file.setEditorId(QLatin1String(Constants::CPPEDITOR_ID));
file.setContents(fileContents(m_type, fileName));
return Core::GeneratedFiles() << file;
diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp
index c182665bf1..34ae851bf1 100644
--- a/src/plugins/cppeditor/cppplugin.cpp
+++ b/src/plugins/cppeditor/cppplugin.cpp
@@ -68,7 +68,6 @@ enum { QUICKFIX_INTERVAL = 20 };
//////////////////////////// CppEditorFactory /////////////////////////////
CppEditorFactory::CppEditorFactory(CppPlugin *owner) :
- m_kind(QLatin1String(CppEditor::Constants::CPPEDITOR_KIND)),
m_owner(owner)
{
m_mimeTypes << QLatin1String(CppEditor::Constants::C_SOURCE_MIMETYPE)
@@ -88,14 +87,19 @@ CppEditorFactory::CppEditorFactory(CppPlugin *owner) :
#endif
}
-QString CppEditorFactory::kind() const
+QString CppEditorFactory::id() const
{
- return m_kind;
+ return QLatin1String(QLatin1String(CppEditor::Constants::CPPEDITOR_ID));
+}
+
+QString CppEditorFactory::displayName() const
+{
+ return tr(CppEditor::Constants::CPPEDITOR_DISPLAY_NAME);
}
Core::IFile *CppEditorFactory::open(const QString &fileName)
{
- Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
+ Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
return iface ? iface->file() : 0;
}
@@ -204,8 +208,8 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
CppFileWizard::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setCategory(QLatin1String("C.C++"));
- wizardParameters.setTrCategory(tr("C++"));
- wizardParameters.setName(tr("C++ Class"));
+ wizardParameters.setDisplayCategory(tr("C++"));
+ wizardParameters.setDisplayName(tr("C++ Class"));
wizardParameters.setId(QLatin1String("A.Class"));
wizardParameters.setKind(Core::IWizard::ClassWizard);
wizardParameters.setDescription(tr("Creates a header and a source file for a new class."));
@@ -213,17 +217,17 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
wizardParameters.setKind(Core::IWizard::FileWizard);
wizardParameters.setDescription(tr("Creates a C++ source file."));
- wizardParameters.setName(tr("C++ Source File"));
+ wizardParameters.setDisplayName(tr("C++ Source File"));
wizardParameters.setId(QLatin1String("B.Source"));
addAutoReleasedObject(new CppFileWizard(wizardParameters, Source, core));
wizardParameters.setDescription(tr("Creates a C++ header file."));
- wizardParameters.setName(tr("C++ Header File"));
+ wizardParameters.setDisplayName(tr("C++ Header File"));
wizardParameters.setId(QLatin1String("C.Header"));
addAutoReleasedObject(new CppFileWizard(wizardParameters, Header, core));
QList<int> context;
- context << core->uniqueIDManager()->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR);
+ context << core->uniqueIDManager()->uniqueIdentifier(CppEditor::Constants::CPPEDITOR_ID);
Core::ActionManager *am = core->actionManager();
Core::ActionContainer *contextMenu= am->createMenu(CppEditor::Constants::M_CONTEXT);
@@ -274,7 +278,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles()));
cppToolsMenu->addAction(cmd);
- m_actionHandler = new TextEditor::TextEditorActionHandler(CppEditor::Constants::C_CPPEDITOR,
+ m_actionHandler = new TextEditor::TextEditorActionHandler(CppEditor::Constants::CPPEDITOR_ID,
TextEditor::TextEditorActionHandler::Format
| TextEditor::TextEditorActionHandler::UnCommentSelection
| TextEditor::TextEditorActionHandler::UnCollapseAll);
diff --git a/src/plugins/cppeditor/cppplugin.h b/src/plugins/cppeditor/cppplugin.h
index 305aaa8046..60be5d127c 100644
--- a/src/plugins/cppeditor/cppplugin.h
+++ b/src/plugins/cppeditor/cppplugin.h
@@ -115,11 +115,11 @@ public:
Core::IEditor *createEditor(QWidget *parent);
- virtual QString kind() const;
+ virtual QString id() const;
+ virtual QString displayName() const;
Core::IFile *open(const QString &fileName);
private:
- const QString m_kind;
CppPlugin *m_owner;
QStringList m_mimeTypes;
};
diff --git a/src/plugins/cpptools/completionsettingspage.cpp b/src/plugins/cpptools/completionsettingspage.cpp
index bb415f754d..bae359a33b 100644
--- a/src/plugins/cpptools/completionsettingspage.cpp
+++ b/src/plugins/cpptools/completionsettingspage.cpp
@@ -55,7 +55,7 @@ QString CompletionSettingsPage::id() const
return QLatin1String("P.Completion");
}
-QString CompletionSettingsPage::trName() const
+QString CompletionSettingsPage::displayName() const
{
return tr("Completion");
}
@@ -65,7 +65,7 @@ QString CompletionSettingsPage::category() const
return QLatin1String(TextEditor::Constants::TEXT_EDITOR_SETTINGS_CATEGORY);
}
-QString CompletionSettingsPage::trCategory() const
+QString CompletionSettingsPage::displayCategory() const
{
return QCoreApplication::translate("Text Editor", TextEditor::Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/cpptools/completionsettingspage.h b/src/plugins/cpptools/completionsettingspage.h
index fe210b1207..b7cacfe5d5 100644
--- a/src/plugins/cpptools/completionsettingspage.h
+++ b/src/plugins/cpptools/completionsettingspage.h
@@ -50,9 +50,9 @@ public:
~CompletionSettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/cpptools/cppclassesfilter.h b/src/plugins/cpptools/cppclassesfilter.h
index 6069eb70a5..f441803382 100644
--- a/src/plugins/cpptools/cppclassesfilter.h
+++ b/src/plugins/cpptools/cppclassesfilter.h
@@ -43,8 +43,8 @@ public:
CppClassesFilter(CppModelManager *manager, Core::EditorManager *editorManager);
~CppClassesFilter();
- QString trName() const { return tr("Classes"); }
- QString name() const { return QLatin1String("Classes"); }
+ QString displayName() const { return tr("Classes"); }
+ QString id() const { return QLatin1String("Classes"); }
Priority priority() const { return Medium; }
};
diff --git a/src/plugins/cpptools/cppcurrentdocumentfilter.h b/src/plugins/cpptools/cppcurrentdocumentfilter.h
index 905f1da4fb..2dd2820dbe 100644
--- a/src/plugins/cpptools/cppcurrentdocumentfilter.h
+++ b/src/plugins/cpptools/cppcurrentdocumentfilter.h
@@ -50,8 +50,8 @@ public:
CppCurrentDocumentFilter(CppModelManager *manager, Core::EditorManager *editorManager);
~CppCurrentDocumentFilter() {}
- QString trName() const { return tr("Methods in current Document"); }
- QString name() const { return QLatin1String("Methods in current Document"); }
+ QString displayName() const { return tr("Methods in current Document"); }
+ QString id() const { return QLatin1String("Methods in current Document"); }
Priority priority() const { return Medium; }
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
diff --git a/src/plugins/cpptools/cppfilesettingspage.cpp b/src/plugins/cpptools/cppfilesettingspage.cpp
index 017c35cdf0..c35c85d858 100644
--- a/src/plugins/cpptools/cppfilesettingspage.cpp
+++ b/src/plugins/cpptools/cppfilesettingspage.cpp
@@ -268,7 +268,7 @@ void CppFileSettingsWidget::slotEdit()
QString path = licenseTemplatePath();
// Edit existing file with C++
if (!path.isEmpty()) {
- Core::EditorManager::instance()->openEditor(path, QLatin1String(CppEditor::Constants::CPPEDITOR_KIND));
+ Core::EditorManager::instance()->openEditor(path, QLatin1String(CppEditor::Constants::CPPEDITOR_ID));
return;
}
// Pick a file name and write new template, edit with C++
@@ -284,7 +284,7 @@ void CppFileSettingsWidget::slotEdit()
file.write(tr(licenseTemplateTemplate).toUtf8());
file.close();
setLicenseTemplatePath(path);
- Core::EditorManager::instance()->openEditor(path, QLatin1String(CppEditor::Constants::CPPEDITOR_KIND));
+ Core::EditorManager::instance()->openEditor(path, QLatin1String(CppEditor::Constants::CPPEDITOR_ID));
}
// --------------- CppFileSettingsPage
@@ -304,7 +304,7 @@ QString CppFileSettingsPage::id() const
return QLatin1String(Constants::CPP_SETTINGS_ID);
}
-QString CppFileSettingsPage::trName() const
+QString CppFileSettingsPage::displayName() const
{
return QCoreApplication::translate("CppTools", Constants::CPP_SETTINGS_NAME);
}
@@ -314,7 +314,7 @@ QString CppFileSettingsPage::category() const
return QLatin1String(Constants::CPP_SETTINGS_CATEGORY);
}
-QString CppFileSettingsPage::trCategory() const
+QString CppFileSettingsPage::displayCategory() const
{
return QCoreApplication::translate("CppTools", Constants::CPP_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/cpptools/cppfilesettingspage.h b/src/plugins/cpptools/cppfilesettingspage.h
index aa431057d2..1c167ff35a 100644
--- a/src/plugins/cpptools/cppfilesettingspage.h
+++ b/src/plugins/cpptools/cppfilesettingspage.h
@@ -98,9 +98,9 @@ public:
virtual ~CppFileSettingsPage();
virtual QString id() const;
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/cpptools/cppfunctionsfilter.h b/src/plugins/cpptools/cppfunctionsfilter.h
index d28c4cc472..7b16d5cce9 100644
--- a/src/plugins/cpptools/cppfunctionsfilter.h
+++ b/src/plugins/cpptools/cppfunctionsfilter.h
@@ -43,8 +43,8 @@ public:
CppFunctionsFilter(CppModelManager *manager, Core::EditorManager *editorManager);
~CppFunctionsFilter();
- QString trName() const { return tr("Methods"); }
- QString name() const { return QLatin1String("Methods"); }
+ QString displayName() const { return tr("Methods"); }
+ QString id() const { return QLatin1String("Methods"); }
Priority priority() const { return Medium; }
};
diff --git a/src/plugins/cpptools/cpplocatorfilter.h b/src/plugins/cpptools/cpplocatorfilter.h
index c33fcf45ae..6c1cfc17cb 100644
--- a/src/plugins/cpptools/cpplocatorfilter.h
+++ b/src/plugins/cpptools/cpplocatorfilter.h
@@ -50,8 +50,8 @@ public:
CppLocatorFilter(CppModelManager *manager, Core::EditorManager *editorManager);
~CppLocatorFilter();
- QString trName() const { return tr("Classes and Methods"); }
- QString name() const { return QLatin1String("Classes and Methods"); }
+ QString displayName() const { return tr("Classes and Methods"); }
+ QString id() const { return QLatin1String("Classes and Methods"); }
Priority priority() const { return Medium; }
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index 7b758237c0..d921aa4bd2 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -128,7 +128,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
mtools->addMenu(mcpptools);
// Actions
- m_context = core->uniqueIDManager()->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR);
+ m_context = core->uniqueIDManager()->uniqueIdentifier(CppEditor::Constants::CPPEDITOR_ID);
QList<int> context = QList<int>() << m_context;
QAction *switchAction = new QAction(tr("Switch Header/Source"), this);
diff --git a/src/plugins/cvs/checkoutwizard.cpp b/src/plugins/cvs/checkoutwizard.cpp
index 09ab77febe..a08a315938 100644
--- a/src/plugins/cvs/checkoutwizard.cpp
+++ b/src/plugins/cvs/checkoutwizard.cpp
@@ -56,7 +56,7 @@ QString CheckoutWizard::description() const
return tr("Checks out a project from a CVS repository.");
}
-QString CheckoutWizard::name() const
+QString CheckoutWizard::displayName() const
{
return tr("CVS Checkout");
}
diff --git a/src/plugins/cvs/checkoutwizard.h b/src/plugins/cvs/checkoutwizard.h
index d0f98570ea..44c45a423e 100644
--- a/src/plugins/cvs/checkoutwizard.h
+++ b/src/plugins/cvs/checkoutwizard.h
@@ -44,7 +44,7 @@ public:
// IWizard
virtual QIcon icon() const;
virtual QString description() const;
- virtual QString name() const;
+ virtual QString displayName() const;
protected:
// BaseCheckoutWizard
diff --git a/src/plugins/cvs/cvscontrol.cpp b/src/plugins/cvs/cvscontrol.cpp
index d4c3c5b452..f633e4c7af 100644
--- a/src/plugins/cvs/cvscontrol.cpp
+++ b/src/plugins/cvs/cvscontrol.cpp
@@ -41,7 +41,7 @@ CVSControl::CVSControl(CVSPlugin *plugin) :
{
}
-QString CVSControl::name() const
+QString CVSControl::displayName() const
{
return QLatin1String("cvs");
}
diff --git a/src/plugins/cvs/cvscontrol.h b/src/plugins/cvs/cvscontrol.h
index 0234d16b95..e89a292408 100644
--- a/src/plugins/cvs/cvscontrol.h
+++ b/src/plugins/cvs/cvscontrol.h
@@ -43,7 +43,7 @@ class CVSControl : public Core::IVersionControl
Q_OBJECT
public:
explicit CVSControl(CVSPlugin *plugin);
- virtual QString name() const;
+ virtual QString displayName() const;
virtual bool managesDirectory(const QString &directory) const;
virtual QString findTopLevelForDirectory(const QString &directory) const;
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp
index 3f3ed34d59..4a1bd30d70 100644
--- a/src/plugins/cvs/cvsplugin.cpp
+++ b/src/plugins/cvs/cvsplugin.cpp
@@ -1022,11 +1022,11 @@ Core::IEditor * CVSPlugin::showOutputInEditor(const QString& title, const QStrin
{
const VCSBase::VCSBaseEditorParameters *params = findType(editorType);
QTC_ASSERT(params, return 0);
- const QString kind = QLatin1String(params->kind);
+ const QString id = params->id;
if (CVS::Constants::debug)
- qDebug() << "CVSPlugin::showOutputInEditor" << title << kind << "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
+ qDebug() << "CVSPlugin::showOutputInEditor" << title << id << "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
- Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(kind, &s, output.toLocal8Bit());
+ Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(id, &s, output.toLocal8Bit());
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,int)));
CVSEditor *e = qobject_cast<CVSEditor*>(editor->widget());
diff --git a/src/plugins/cvs/settingspage.cpp b/src/plugins/cvs/settingspage.cpp
index ba48750d8f..f0dd40ec23 100644
--- a/src/plugins/cvs/settingspage.cpp
+++ b/src/plugins/cvs/settingspage.cpp
@@ -93,7 +93,7 @@ QString SettingsPage::id() const
return QLatin1String(VCSBase::Constants::VCS_ID_CVS);
}
-QString SettingsPage::trName() const
+QString SettingsPage::displayName() const
{
return tr("CVS");
}
@@ -103,7 +103,7 @@ QString SettingsPage::category() const
return QLatin1String(VCSBase::Constants::VCS_SETTINGS_CATEGORY);
}
-QString SettingsPage::trCategory() const
+QString SettingsPage::displayCategory() const
{
return QCoreApplication::translate("VCSBase", VCSBase::Constants::VCS_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/cvs/settingspage.h b/src/plugins/cvs/settingspage.h
index cd80d85102..43053725e0 100644
--- a/src/plugins/cvs/settingspage.h
+++ b/src/plugins/cvs/settingspage.h
@@ -70,9 +70,9 @@ public:
SettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/debugger/cdb/cdboptionspage.cpp b/src/plugins/debugger/cdb/cdboptionspage.cpp
index 3344492627..f8a97f4e67 100644
--- a/src/plugins/debugger/cdb/cdboptionspage.cpp
+++ b/src/plugins/debugger/cdb/cdboptionspage.cpp
@@ -151,7 +151,7 @@ QString CdbOptionsPage::settingsId()
return QLatin1String("F.Cdb");
}
-QString CdbOptionsPage::trName() const
+QString CdbOptionsPage::displayName() const
{
return tr("Cdb");
}
@@ -161,7 +161,7 @@ QString CdbOptionsPage::category() const
return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
}
-QString CdbOptionsPage::trCategory() const
+QString CdbOptionsPage::displayCategory() const
{
return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/debugger/cdb/cdboptionspage.h b/src/plugins/debugger/cdb/cdboptionspage.h
index 0938e19885..87915464ca 100644
--- a/src/plugins/debugger/cdb/cdboptionspage.h
+++ b/src/plugins/debugger/cdb/cdboptionspage.h
@@ -73,9 +73,9 @@ public:
// IOptionsPage
virtual QString id() const { return settingsId(); }
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/debugger/debuggeragents.cpp b/src/plugins/debugger/debuggeragents.cpp
index a0db75102e..28fcd111d0 100644
--- a/src/plugins/debugger/debuggeragents.cpp
+++ b/src/plugins/debugger/debuggeragents.cpp
@@ -94,7 +94,7 @@ void MemoryViewAgent::init(quint64 addr)
Core::EditorManager *editorManager = Core::EditorManager::instance();
QString titlePattern = tr("Memory $");
m_editor = editorManager->openEditorWithContents(
- Core::Constants::K_DEFAULT_BINARY_EDITOR,
+ Core::Constants::K_DEFAULT_BINARY_EDITOR_ID,
&titlePattern);
if (m_editor) {
connect(m_editor->widget(), SIGNAL(lazyDataRequested(quint64,bool)),
@@ -261,7 +261,7 @@ void DisassemblerViewAgent::setContents(const QString &contents)
QString titlePattern = "Disassembler";
d->editor = qobject_cast<ITextEditor *>(
editorManager->openEditorWithContents(
- Core::Constants::K_DEFAULT_TEXT_EDITOR,
+ Core::Constants::K_DEFAULT_TEXT_EDITOR_ID,
&titlePattern));
QTC_ASSERT(d->editor, return);
if ((plainTextEdit = qobject_cast<QPlainTextEdit *>(d->editor->widget())))
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index e1b938815c..0f78d4ed29 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -195,8 +195,8 @@ public:
DebugMode::DebugMode(QObject *parent)
: BaseMode(parent)
{
- setName(tr("Debug"));
- setUniqueModeName(Constants::MODE_DEBUG);
+ setDisplayName(tr("Debug"));
+ setId(Constants::MODE_DEBUG);
setIcon(QIcon(":/fancyactionbar/images/mode_Debug.png"));
setPriority(Constants::P_MODE_DEBUG);
}
@@ -320,11 +320,11 @@ public:
// IOptionsPage
QString id() const
{ return QLatin1String(Debugger::Constants::DEBUGGER_COMMON_SETTINGS_ID); }
- QString trName() const
+ QString displayName() const
{ return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_COMMON_SETTINGS_NAME); }
QString category() const
{ return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY); }
- QString trCategory() const
+ QString displayCategory() const
{ return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY); }
QWidget *createPage(QWidget *parent);
@@ -421,9 +421,9 @@ public:
// IOptionsPage
QString id() const { return QLatin1String("B.DebuggingHelper"); }
- QString trName() const { return tr("Debugging Helper"); }
+ QString displayName() const { return tr("Debugging Helper"); }
QString category() const { return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY); }
- QString trCategory() const { return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY); }
+ QString displayCategory() const { return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY); }
QWidget *createPage(QWidget *parent);
void apply() { m_group.apply(settings()); }
@@ -678,7 +678,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
debuggercontext << uidm->uniqueIdentifier(C_GDBDEBUGGER);
QList<int> cppeditorcontext;
- cppeditorcontext << uidm->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR);
+ cppeditorcontext << uidm->uniqueIdentifier(CppEditor::Constants::CPPEDITOR_ID);
QList<int> texteditorcontext;
texteditorcontext << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
@@ -1057,7 +1057,7 @@ void DebuggerPlugin::activatePreviousMode()
void DebuggerPlugin::activateDebugMode()
{
ModeManager *modeManager = ModeManager::instance();
- m_previousMode = QLatin1String(modeManager->currentMode()->uniqueModeName());
+ m_previousMode = modeManager->currentMode()->id();
modeManager->activateMode(QLatin1String(MODE_DEBUG));
}
diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp
index 9b661d9c14..ebca806a12 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.cpp
+++ b/src/plugins/debugger/gdb/gdboptionspage.cpp
@@ -47,7 +47,7 @@ QString GdbOptionsPage::settingsId()
return QLatin1String("M.Gdb");
}
-QString GdbOptionsPage::trName() const
+QString GdbOptionsPage::displayName() const
{
return tr("Gdb");
}
@@ -57,7 +57,7 @@ QString GdbOptionsPage::category() const
return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
}
-QString GdbOptionsPage::trCategory() const
+QString GdbOptionsPage::displayCategory() const
{
return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/debugger/gdb/gdboptionspage.h b/src/plugins/debugger/gdb/gdboptionspage.h
index 7bbedd10b8..a710acb0ed 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.h
+++ b/src/plugins/debugger/gdb/gdboptionspage.h
@@ -45,9 +45,9 @@ public:
GdbOptionsPage();
virtual QString id() const { return settingsId(); }
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/debugger/gdb/trkoptionspage.cpp b/src/plugins/debugger/gdb/trkoptionspage.cpp
index 97d4ebe610..e9ac0a8bff 100644
--- a/src/plugins/debugger/gdb/trkoptionspage.cpp
+++ b/src/plugins/debugger/gdb/trkoptionspage.cpp
@@ -54,7 +54,7 @@ QString TrkOptionsPage::settingsId()
return QLatin1String("S.Trk");
}
-QString TrkOptionsPage::trName() const
+QString TrkOptionsPage::displayName() const
{
return tr("Symbian TRK");
}
@@ -64,7 +64,7 @@ QString TrkOptionsPage::category() const
return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
}
-QString TrkOptionsPage::trCategory() const
+QString TrkOptionsPage::displayCategory() const
{
return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/debugger/gdb/trkoptionspage.h b/src/plugins/debugger/gdb/trkoptionspage.h
index d9badcfa21..ebe044f586 100644
--- a/src/plugins/debugger/gdb/trkoptionspage.h
+++ b/src/plugins/debugger/gdb/trkoptionspage.h
@@ -53,9 +53,9 @@ public:
virtual ~TrkOptionsPage();
virtual QString id() const { return settingsId(); }
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/designer/cpp/cppsettingspage.cpp b/src/plugins/designer/cpp/cppsettingspage.cpp
index 1a7ad1db9b..301657df3b 100644
--- a/src/plugins/designer/cpp/cppsettingspage.cpp
+++ b/src/plugins/designer/cpp/cppsettingspage.cpp
@@ -108,7 +108,7 @@ QString CppSettingsPage::id() const
return QLatin1String(Designer::Constants::SETTINGS_CPP_SETTINGS_ID);
}
-QString CppSettingsPage::trName() const
+QString CppSettingsPage::displayName() const
{
return QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_CPP_SETTINGS_NAME);
}
@@ -118,7 +118,7 @@ QString CppSettingsPage::category() const
return QLatin1String(Designer::Constants::SETTINGS_CATEGORY);
}
-QString CppSettingsPage::trCategory() const
+QString CppSettingsPage::displayCategory() const
{
return QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/designer/cpp/cppsettingspage.h b/src/plugins/designer/cpp/cppsettingspage.h
index 57fc9f160b..49c393bbb1 100644
--- a/src/plugins/designer/cpp/cppsettingspage.h
+++ b/src/plugins/designer/cpp/cppsettingspage.h
@@ -64,9 +64,9 @@ public:
explicit CppSettingsPage(QObject *parent = 0);
virtual QString id() const;
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/designer/cpp/formclasswizard.cpp b/src/plugins/designer/cpp/formclasswizard.cpp
index 686f0dbc86..24af8e9bf1 100644
--- a/src/plugins/designer/cpp/formclasswizard.cpp
+++ b/src/plugins/designer/cpp/formclasswizard.cpp
@@ -87,16 +87,16 @@ Core::GeneratedFiles FormClassWizard::generateFiles(const QWizard *w, QString *e
const QString sourceFileName = buildFileName(params.path(), params.sourceFile(), sourceSuffix());
Core::GeneratedFile headerFile(headerFileName);
- headerFile.setEditorKind(QLatin1String(CppEditor::Constants::CPPEDITOR_KIND));
+ headerFile.setEditorId(QLatin1String(CppEditor::Constants::CPPEDITOR_ID));
// Source
Core::GeneratedFile sourceFile(sourceFileName);
- sourceFile.setEditorKind(QLatin1String(CppEditor::Constants::CPPEDITOR_KIND));
+ sourceFile.setEditorId(QLatin1String(CppEditor::Constants::CPPEDITOR_ID));
// UI
Core::GeneratedFile uiFile(formFileName);
uiFile.setContents(params.uiTemplate());
- uiFile.setEditorKind(QLatin1String(Constants::C_FORMEDITOR));
+ uiFile.setEditorId(QLatin1String(Constants::C_FORMEDITOR_ID));
QString source, header;
Designer::FormClassWizardGenerationParameters generationParameters;
diff --git a/src/plugins/designer/designerconstants.h b/src/plugins/designer/designerconstants.h
index e155f28cf5..8ca605bc82 100644
--- a/src/plugins/designer/designerconstants.h
+++ b/src/plugins/designer/designerconstants.h
@@ -41,7 +41,8 @@ const char * const SETTINGS_CPP_SETTINGS_ID = "Class Generation";
const char * const SETTINGS_CPP_SETTINGS_NAME = QT_TRANSLATE_NOOP("Designer", "Class Generation");
// context
-const char * const C_FORMEDITOR = "FormEditor";
+const char * const C_FORMEDITOR_ID = "FormEditor";
+const char * const C_FORMEDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("Designer", "Form Editor");
const char * const T_FORMEDITOR = "FormEditor.Toolbar";
const char * const M_FORMEDITOR = "FormEditor.Menu";
const char * const M_FORMEDITOR_VIEWS = "FormEditor.Menu.Views";
diff --git a/src/plugins/designer/formeditorfactory.cpp b/src/plugins/designer/formeditorfactory.cpp
index 1b3e257764..7176266c59 100644
--- a/src/plugins/designer/formeditorfactory.cpp
+++ b/src/plugins/designer/formeditorfactory.cpp
@@ -44,7 +44,6 @@ using namespace Designer::Constants;
FormEditorFactory::FormEditorFactory()
: Core::IEditorFactory(Core::ICore::instance()),
- m_kind(QLatin1String(C_FORMEDITOR)),
m_mimeTypes(QLatin1String(FORM_MIMETYPE))
{
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
@@ -52,14 +51,19 @@ FormEditorFactory::FormEditorFactory()
QLatin1String("ui"));
}
-QString FormEditorFactory::kind() const
+QString FormEditorFactory::id() const
{
- return C_FORMEDITOR;
+ return QLatin1String(C_FORMEDITOR_ID);
+}
+
+QString FormEditorFactory::displayName() const
+{
+ return tr(C_FORMEDITOR_DISPLAY_NAME);
}
Core::IFile *FormEditorFactory::open(const QString &fileName)
{
- Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
+ Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
return iface ? iface->file() : 0;
}
diff --git a/src/plugins/designer/formeditorfactory.h b/src/plugins/designer/formeditorfactory.h
index 5844ef1124..79dfec6912 100644
--- a/src/plugins/designer/formeditorfactory.h
+++ b/src/plugins/designer/formeditorfactory.h
@@ -52,12 +52,12 @@ public:
virtual QStringList mimeTypes() const;
// IEditorFactory
- virtual QString kind() const;
+ virtual QString id() const;
+ virtual QString displayName() const;
Core::IFile *open(const QString &fileName);
Core::IEditor *createEditor(QWidget *parent);
private:
- const QString m_kind;
const QStringList m_mimeTypes;
};
diff --git a/src/plugins/designer/formeditorplugin.cpp b/src/plugins/designer/formeditorplugin.cpp
index 498e8ff39e..d54d62f479 100644
--- a/src/plugins/designer/formeditorplugin.cpp
+++ b/src/plugins/designer/formeditorplugin.cpp
@@ -86,7 +86,7 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error)
initializeTemplates();
- const int uid = core->uniqueIDManager()->uniqueIdentifier(QLatin1String(C_FORMEDITOR));
+ const int uid = core->uniqueIDManager()->uniqueIdentifier(QLatin1String(C_FORMEDITOR_ID));
const QList<int> context = QList<int>() << uid;
addAutoReleasedObject(new FormEditorFactory);
@@ -135,16 +135,16 @@ void FormEditorPlugin::initializeTemplates()
{
FormWizard::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setCategory(QLatin1String(Core::Constants::WIZARD_CATEGORY_QT));
- wizardParameters.setTrCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
+ wizardParameters.setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
const QString formFileType = QLatin1String(Constants::FORM_FILE_TYPE);
- wizardParameters.setName(tr("Qt Designer Form"));
+ wizardParameters.setDisplayName(tr("Qt Designer Form"));
wizardParameters.setId(QLatin1String("D.Form"));
wizardParameters.setDescription(tr("Creates a Qt Designer form file (.ui)."));
addAutoReleasedObject(new FormWizard(wizardParameters, this));
#ifdef CPP_ENABLED
wizardParameters.setKind(Core::IWizard::ClassWizard);
- wizardParameters.setName(tr("Qt Designer Form Class"));
+ wizardParameters.setDisplayName(tr("Qt Designer Form Class"));
wizardParameters.setId(QLatin1String("C.FormClass"));
wizardParameters.setDescription(tr("Creates a Qt Designer form file (.ui) with a matching class."));
addAutoReleasedObject(new FormClassWizard(wizardParameters, this));
diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp
index c385def9bd..72b92d2ef6 100644
--- a/src/plugins/designer/formeditorw.cpp
+++ b/src/plugins/designer/formeditorw.cpp
@@ -256,7 +256,7 @@ FormEditorW::FormEditorW() :
m_fwm = qobject_cast<qdesigner_internal::QDesignerFormWindowManager*>(m_formeditor->formWindowManager());
QTC_ASSERT(m_fwm, return);
- const int uid = m_core->uniqueIDManager()->uniqueIdentifier(QLatin1String(C_FORMEDITOR));
+ const int uid = m_core->uniqueIDManager()->uniqueIdentifier(QLatin1String(C_FORMEDITOR_ID));
m_context << uid;
setupActions();
@@ -679,7 +679,7 @@ void FormEditorW::currentEditorChanged(Core::IEditor *editor)
qDebug() << Q_FUNC_INFO << editor << " of " << m_fwm->formWindowCount();
// Deactivate Designer if a non-form is being edited
- if (editor && !qstrcmp(editor->kind(), Constants::C_FORMEDITOR)) {
+ if (editor && editor->id() == QLatin1String(Constants::C_FORMEDITOR_ID)) {
FormWindowEditor *fw = qobject_cast<FormWindowEditor *>(editor);
QTC_ASSERT(fw, return);
fw->activate();
diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp
index 4ce40060dc..fc9a87613f 100644
--- a/src/plugins/designer/formwindoweditor.cpp
+++ b/src/plugins/designer/formwindoweditor.cpp
@@ -263,9 +263,9 @@ Core::IFile *FormWindowEditor::file()
return m_file;
}
-const char *FormWindowEditor::kind() const
+QString FormWindowEditor::id() const
{
- return C_FORMEDITOR;
+ return QLatin1String(C_FORMEDITOR_ID);
}
QString FormWindowEditor::displayName() const
diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h
index 3ca63df81a..fb964a5b2f 100644
--- a/src/plugins/designer/formwindoweditor.h
+++ b/src/plugins/designer/formwindoweditor.h
@@ -74,7 +74,7 @@ public:
bool duplicateSupported() const;
Core::IEditor *duplicate(QWidget *);
Core::IFile *file();
- const char *kind() const;
+ QString id() const;
QString displayName() const;
void setDisplayName(const QString &title);
QWidget *toolBar();
diff --git a/src/plugins/designer/formwizard.cpp b/src/plugins/designer/formwizard.cpp
index dccfe7fb25..a279fde8c9 100644
--- a/src/plugins/designer/formwizard.cpp
+++ b/src/plugins/designer/formwizard.cpp
@@ -55,7 +55,7 @@ Core::GeneratedFiles FormWizard::generateFiles(const QWizard *w,
QString *errorMessage) const
{
const FormFileWizardDialog *wizard = qobject_cast<const FormFileWizardDialog *>(w);
- const QString fileName = Core::BaseFileWizard::buildFileName(wizard->path(), wizard->name(),
+ const QString fileName = Core::BaseFileWizard::buildFileName(wizard->path(), wizard->fileName(),
preferredSuffix(QLatin1String(Constants::FORM_MIMETYPE)));
const QString formTemplate = wizard->templateContents();
@@ -66,6 +66,6 @@ Core::GeneratedFiles FormWizard::generateFiles(const QWizard *w,
Core::GeneratedFile file(fileName);
file.setContents(formTemplate);
- file.setEditorKind(QLatin1String(Constants::C_FORMEDITOR));
+ file.setEditorId(QLatin1String(Constants::C_FORMEDITOR_ID));
return Core::GeneratedFiles() << file;
}
diff --git a/src/plugins/designer/formwizarddialog.cpp b/src/plugins/designer/formwizarddialog.cpp
index ac04fd3db8..1907d4bf6e 100644
--- a/src/plugins/designer/formwizarddialog.cpp
+++ b/src/plugins/designer/formwizarddialog.cpp
@@ -98,9 +98,9 @@ void FormFileWizardDialog::setPath(const QString &path)
m_filePage->setPath(path);
}
-QString FormFileWizardDialog::name() const
+QString FormFileWizardDialog::fileName() const
{
- return m_filePage->name();
+ return m_filePage->fileName();
}
void FormFileWizardDialog::slotCurrentIdChanged(int id)
@@ -113,7 +113,7 @@ void FormFileWizardDialog::slotCurrentIdChanged(int id)
if (FormTemplateWizardPage::getUIXmlData(templateContents(), &formBaseClass, &uiClassName)) {
QString fileName = FormTemplateWizardPage::stripNamespaces(uiClassName).toLower();
fileName += QLatin1String(".ui");
- m_filePage->setName(fileName);
+ m_filePage->setFileName(fileName);
}
}
}
diff --git a/src/plugins/designer/formwizarddialog.h b/src/plugins/designer/formwizarddialog.h
index a31630515e..5158d9cc9d 100644
--- a/src/plugins/designer/formwizarddialog.h
+++ b/src/plugins/designer/formwizarddialog.h
@@ -77,7 +77,7 @@ public:
QWidget *parent = 0);
QString path() const;
- QString name() const;
+ QString fileName() const;
public slots:
void setPath(const QString &path);
diff --git a/src/plugins/designer/settingspage.cpp b/src/plugins/designer/settingspage.cpp
index c059989305..5a6b770f8d 100644
--- a/src/plugins/designer/settingspage.cpp
+++ b/src/plugins/designer/settingspage.cpp
@@ -50,7 +50,7 @@ QString SettingsPage::id() const
return m_designerPage->name();
}
-QString SettingsPage::trName() const
+QString SettingsPage::displayName() const
{
return m_designerPage->name();
}
@@ -60,7 +60,7 @@ QString SettingsPage::category() const
return QLatin1String(Designer::Constants::SETTINGS_CATEGORY);
}
-QString SettingsPage::trCategory() const
+QString SettingsPage::displayCategory() const
{
return QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/designer/settingspage.h b/src/plugins/designer/settingspage.h
index ee5152c2b7..df63a45071 100644
--- a/src/plugins/designer/settingspage.h
+++ b/src/plugins/designer/settingspage.h
@@ -50,9 +50,9 @@ public:
virtual ~SettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 1b63815b20..88d269f62b 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -114,9 +114,9 @@ public:
// IOptionsPage
QString id() const { return QLatin1String(Constants::SETTINGS_ID); }
- QString trName() const { return tr("General"); }
+ QString displayName() const { return tr("General"); }
QString category() const { return QLatin1String(Constants::SETTINGS_CATEGORY); }
- QString trCategory() const { return tr("FakeVim"); }
+ QString displayCategory() const { return tr("FakeVim"); }
QWidget *createPage(QWidget *parent);
void apply() { m_group.apply(ICore::instance()->settings()); }
diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
index 16dee5c417..4cfde7339b 100644
--- a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
+++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
@@ -28,8 +28,14 @@
**************************************************************************/
#include "genericbuildconfiguration.h"
+
+#include "genericmakestep.h"
#include "genericproject.h"
+#include <utils/qtcassert.h>
+
+#include <QtGui/QInputDialog>
+
using namespace GenericProjectManager;
using namespace GenericProjectManager::Internal;
using ProjectExplorer::BuildConfiguration;
@@ -40,7 +46,7 @@ GenericBuildConfiguration::GenericBuildConfiguration(GenericProject *pro)
}
-GenericBuildConfiguration::GenericBuildConfiguration(GenericProject *pro, const QMap<QString, QVariant> &map)
+GenericBuildConfiguration::GenericBuildConfiguration(GenericProject *pro, const QVariantMap &map)
: BuildConfiguration(pro, map)
{
m_buildDirectory = map.value("buildDirectory").toString();
@@ -53,7 +59,7 @@ GenericBuildConfiguration::GenericBuildConfiguration(GenericBuildConfiguration *
}
-void GenericBuildConfiguration::toMap(QMap<QString, QVariant> &map) const
+void GenericBuildConfiguration::toMap(QVariantMap &map) const
{
map.insert("buildDirectory", m_buildDirectory);
}
@@ -87,3 +93,64 @@ GenericProject *GenericBuildConfiguration::genericProject() const
return static_cast<GenericProject *>(project());
}
+
+/*!
+ \class GenericBuildConfigurationFactory
+*/
+
+GenericBuildConfigurationFactory::GenericBuildConfigurationFactory(GenericProject *project)
+ : IBuildConfigurationFactory(project),
+ m_project(project)
+{
+}
+
+GenericBuildConfigurationFactory::~GenericBuildConfigurationFactory()
+{
+}
+
+QStringList GenericBuildConfigurationFactory::availableCreationIds() const
+{
+ return QStringList() << "Create";
+}
+
+QString GenericBuildConfigurationFactory::displayNameForId(const QString &id) const
+{
+ QTC_ASSERT(id == "Create", return QString());
+ return tr("Create");
+}
+
+BuildConfiguration *GenericBuildConfigurationFactory::create(const QString &id) const
+{
+ QTC_ASSERT(id == "Create", return false);
+ //TODO asking for name is duplicated everywhere, but maybe more
+ // wizards will show up, that incorporate choosing the name
+ bool ok;
+ QString buildConfigurationName = QInputDialog::getText(0,
+ tr("New configuration"),
+ tr("New Configuration Name:"),
+ QLineEdit::Normal,
+ QString(),
+ &ok);
+ if (!ok || buildConfigurationName.isEmpty())
+ return false;
+ GenericBuildConfiguration *bc = new GenericBuildConfiguration(m_project);
+ bc->setDisplayName(buildConfigurationName);
+ m_project->addBuildConfiguration(bc); // also makes the name unique...
+
+ GenericMakeStep *makeStep = new GenericMakeStep(bc);
+ bc->insertBuildStep(0, makeStep);
+ makeStep->setBuildTarget("all", /* on = */ true);
+ return bc;
+}
+
+BuildConfiguration *GenericBuildConfigurationFactory::clone(BuildConfiguration *source) const
+{
+ GenericBuildConfiguration *bc = new GenericBuildConfiguration(static_cast<GenericBuildConfiguration *>(source));
+ return bc;
+}
+
+BuildConfiguration *GenericBuildConfigurationFactory::restore(const QVariantMap &map) const
+{
+ GenericBuildConfiguration *bc = new GenericBuildConfiguration(m_project, map);
+ return bc;
+}
diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.h b/src/plugins/genericprojectmanager/genericbuildconfiguration.h
index 7cd9058b84..0ad81ca735 100644
--- a/src/plugins/genericprojectmanager/genericbuildconfiguration.h
+++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.h
@@ -43,7 +43,7 @@ class GenericBuildConfiguration : public ProjectExplorer::BuildConfiguration
Q_OBJECT
public:
GenericBuildConfiguration(GenericProject *pro);
- GenericBuildConfiguration(GenericProject *pro, const QMap<QString, QVariant> &map);
+ GenericBuildConfiguration(GenericProject *pro, const QVariantMap &map);
GenericBuildConfiguration(GenericBuildConfiguration *source);
GenericProject *genericProject() const;
@@ -51,11 +51,30 @@ public:
virtual ProjectExplorer::Environment environment() const;
virtual QString buildDirectory() const;
void setBuildDirectory(const QString &buildDirectory);
- void toMap(QMap<QString, QVariant> &map) const;
+ void toMap(QVariantMap &map) const;
private:
QString m_buildDirectory;
};
+class GenericBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
+{
+ Q_OBJECT
+
+public:
+ GenericBuildConfigurationFactory(GenericProject *project);
+ ~GenericBuildConfigurationFactory();
+
+ QStringList availableCreationIds() const;
+ QString displayNameForId(const QString &id) const;
+
+ ProjectExplorer::BuildConfiguration *create(const QString &id) const;
+ ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::BuildConfiguration *source) const;
+ ProjectExplorer::BuildConfiguration *restore(const QVariantMap &map) const;
+
+private:
+ GenericProject *m_project;
+};
+
} // namespace GenericProjectManager
} // namespace Internal
#endif // GENERICBUILDCONFIGURATION_H
diff --git a/src/plugins/genericprojectmanager/genericmakestep.cpp b/src/plugins/genericprojectmanager/genericmakestep.cpp
index 3c75bde174..7360a95985 100644
--- a/src/plugins/genericprojectmanager/genericmakestep.cpp
+++ b/src/plugins/genericprojectmanager/genericmakestep.cpp
@@ -38,6 +38,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/gnumakeparser.h>
#include <coreplugin/variablemanager.h>
+#include <utils/qtcassert.h>
#include <QtGui/QFormLayout>
#include <QtGui/QGroupBox>
@@ -141,7 +142,7 @@ void GenericMakeStep::run(QFutureInterface<bool> &fi)
AbstractProcessStep::run(fi);
}
-QString GenericMakeStep::name()
+QString GenericMakeStep::id()
{
return Constants::MAKESTEP;
}
@@ -279,15 +280,15 @@ void GenericMakeStepConfigWidget::makeArgumentsLineEditTextEdited()
// GenericMakeStepFactory
//
-bool GenericMakeStepFactory::canCreate(const QString &name) const
+bool GenericMakeStepFactory::canCreate(const QString &id) const
{
- return (Constants::MAKESTEP == name);
+ return (Constants::MAKESTEP == id);
}
ProjectExplorer::BuildStep *GenericMakeStepFactory::create(ProjectExplorer::BuildConfiguration *bc,
- const QString &name) const
+ const QString &id) const
{
- Q_ASSERT(name == Constants::MAKESTEP);
+ Q_ASSERT(id == Constants::MAKESTEP);
return new GenericMakeStep(bc);
}
@@ -297,12 +298,14 @@ ProjectExplorer::BuildStep *GenericMakeStepFactory::clone(ProjectExplorer::Build
return new GenericMakeStep(static_cast<GenericMakeStep*>(bs), bc);
}
-QStringList GenericMakeStepFactory::canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration * /* pro */) const
+QStringList GenericMakeStepFactory::canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration *bc) const
{
+ Q_UNUSED(bc);
return QStringList();
}
-QString GenericMakeStepFactory::displayNameForName(const QString & /* name */) const
+QString GenericMakeStepFactory::displayNameForId(const QString &id) const
{
+ QTC_ASSERT(id == Constants::MAKESTEP, return QString());
return "Make";
}
diff --git a/src/plugins/genericprojectmanager/genericmakestep.h b/src/plugins/genericprojectmanager/genericmakestep.h
index 7d392b25ad..c578bfb3d2 100644
--- a/src/plugins/genericprojectmanager/genericmakestep.h
+++ b/src/plugins/genericprojectmanager/genericmakestep.h
@@ -65,7 +65,7 @@ public:
virtual void run(QFutureInterface<bool> &fi);
- virtual QString name();
+ virtual QString id();
virtual QString displayName();
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
virtual bool immutable() const;
@@ -104,13 +104,13 @@ private:
class GenericMakeStepFactory : public ProjectExplorer::IBuildStepFactory
{
- virtual bool canCreate(const QString &name) const;
+ virtual bool canCreate(const QString &id) const;
virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *bc,
- const QString &name) const;
+ const QString &id) const;
virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStep *bs,
ProjectExplorer::BuildConfiguration *bc) const;
virtual QStringList canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration *bc) const;
- virtual QString displayNameForName(const QString &name) const;
+ virtual QString displayNameForId(const QString &id) const;
};
} // namespace Internal
diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp
index d4197cc5c4..f1973e8143 100644
--- a/src/plugins/genericprojectmanager/genericproject.cpp
+++ b/src/plugins/genericprojectmanager/genericproject.cpp
@@ -108,66 +108,6 @@ public:
} // end of anonymous namespace
-/*!
- \class GenericBuildConfigurationFactory
-*/
-
-GenericBuildConfigurationFactory::GenericBuildConfigurationFactory(GenericProject *project)
- : IBuildConfigurationFactory(project),
- m_project(project)
-{
-}
-
-GenericBuildConfigurationFactory::~GenericBuildConfigurationFactory()
-{
-}
-
-QStringList GenericBuildConfigurationFactory::availableCreationTypes() const
-{
- return QStringList() << "Create";
-}
-
-QString GenericBuildConfigurationFactory::displayNameForType(const QString & /* type */) const
-{
- return tr("Create");
-}
-
-BuildConfiguration *GenericBuildConfigurationFactory::create(const QString &type) const
-{
- QTC_ASSERT(type == "Create", return false);
- //TODO asking for name is duplicated everywhere, but maybe more
- // wizards will show up, that incorporate choosing the name
- bool ok;
- QString buildConfigurationName = QInputDialog::getText(0,
- tr("New configuration"),
- tr("New Configuration Name:"),
- QLineEdit::Normal,
- QString(),
- &ok);
- if (!ok || buildConfigurationName.isEmpty())
- return false;
- GenericBuildConfiguration *bc = new GenericBuildConfiguration(m_project);
- bc->setDisplayName(buildConfigurationName);
- m_project->addBuildConfiguration(bc); // also makes the name unique...
-
- GenericMakeStep *makeStep = new GenericMakeStep(bc);
- bc->insertBuildStep(0, makeStep);
- makeStep->setBuildTarget("all", /* on = */ true);
- return bc;
-}
-
-BuildConfiguration *GenericBuildConfigurationFactory::clone(BuildConfiguration *source) const
-{
- GenericBuildConfiguration *bc = new GenericBuildConfiguration(static_cast<GenericBuildConfiguration *>(source));
- return bc;
-}
-
-BuildConfiguration *GenericBuildConfigurationFactory::restore(const QMap<QString, QVariant> &map) const
-{
- GenericBuildConfiguration *bc = new GenericBuildConfiguration(m_project, map);
- return bc;
-}
-
////////////////////////////////////////////////////////////////////////////////////
// GenericProject
////////////////////////////////////////////////////////////////////////////////////
@@ -432,7 +372,7 @@ ProjectExplorer::ToolChain *GenericProject::toolChain() const
ProjectExplorer::ToolChain::ToolChainType GenericProject::toolChainType() const
{ return m_toolChainType; }
-QString GenericProject::name() const
+QString GenericProject::displayName() const
{
return m_projectName;
}
diff --git a/src/plugins/genericprojectmanager/genericproject.h b/src/plugins/genericprojectmanager/genericproject.h
index 176927a82e..46798ea703 100644
--- a/src/plugins/genericprojectmanager/genericproject.h
+++ b/src/plugins/genericprojectmanager/genericproject.h
@@ -55,25 +55,7 @@ class GenericProject;
class GenericMakeStep;
class GenericProjectFile;
class GenericBuildConfiguration;
-
-class GenericBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
-{
- Q_OBJECT
-
-public:
- GenericBuildConfigurationFactory(GenericProject *project);
- ~GenericBuildConfigurationFactory();
-
- QStringList availableCreationTypes() const;
- QString displayNameForType(const QString &type) const;
-
- ProjectExplorer::BuildConfiguration *create(const QString &type) const;
- ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::BuildConfiguration *source) const;
- ProjectExplorer::BuildConfiguration *restore(const QMap<QString, QVariant> &map) const;
-
-private:
- GenericProject *m_project;
-};
+class GenericBuildConfigurationFactory;
class GenericProject : public ProjectExplorer::Project
{
@@ -87,7 +69,7 @@ public:
QString includesFileName() const;
QString configFileName() const;
- virtual QString name() const;
+ virtual QString displayName() const;
virtual Core::IFile *file() const;
virtual ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const;
virtual ProjectExplorer::IProjectManager *projectManager() const;
diff --git a/src/plugins/genericprojectmanager/genericprojectconstants.h b/src/plugins/genericprojectmanager/genericprojectconstants.h
index e980c25827..8c9c5825bb 100644
--- a/src/plugins/genericprojectmanager/genericprojectconstants.h
+++ b/src/plugins/genericprojectmanager/genericprojectconstants.h
@@ -43,7 +43,9 @@ const char *const C_FILESEDITOR = ".files Editor";
// kinds
const char *const PROJECT_KIND = "Generic";
-const char *const FILES_EDITOR = ".files Editor";
+const char *const FILES_EDITOR_ID = "QT4.FilesEditor";
+const char *const FILES_EDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", ".files Editor");
+
const char *const FILES_MIMETYPE = "application/vnd.nokia.qt.generic.files";
const char *const INCLUDES_EDITOR = ".includes Editor";
diff --git a/src/plugins/genericprojectmanager/genericprojectfileseditor.cpp b/src/plugins/genericprojectmanager/genericprojectfileseditor.cpp
index 16c7b4b240..7031e785ce 100644
--- a/src/plugins/genericprojectmanager/genericprojectfileseditor.cpp
+++ b/src/plugins/genericprojectmanager/genericprojectfileseditor.cpp
@@ -77,16 +77,21 @@ QStringList ProjectFilesFactory::mimeTypes() const
return m_mimeTypes;
}
-QString ProjectFilesFactory::kind() const
+QString ProjectFilesFactory::id() const
{
- return QLatin1String(Constants::FILES_EDITOR);
+ return QLatin1String(Constants::FILES_EDITOR_ID);
+}
+
+QString ProjectFilesFactory::displayName() const
+{
+ return tr(Constants::FILES_EDITOR_DISPLAY_NAME);
}
Core::IFile *ProjectFilesFactory::open(const QString &fileName)
{
Core::EditorManager *editorManager = Core::EditorManager::instance();
- if (Core::IEditor *editor = editorManager->openEditor(fileName, kind()))
+ if (Core::IEditor *editor = editorManager->openEditor(fileName, id()))
return editor->file();
return 0;
@@ -111,9 +116,9 @@ QList<int> ProjectFilesEditable::context() const
return m_context;
}
-const char *ProjectFilesEditable::kind() const
+QString ProjectFilesEditable::id() const
{
- return Constants::FILES_EDITOR;
+ return QLatin1String(Constants::FILES_EDITOR_ID);
}
bool ProjectFilesEditable::duplicateSupported() const
diff --git a/src/plugins/genericprojectmanager/genericprojectfileseditor.h b/src/plugins/genericprojectmanager/genericprojectfileseditor.h
index 35c04523ce..1a37d2750e 100644
--- a/src/plugins/genericprojectmanager/genericprojectfileseditor.h
+++ b/src/plugins/genericprojectmanager/genericprojectfileseditor.h
@@ -57,7 +57,8 @@ public:
virtual Core::IEditor *createEditor(QWidget *parent);
virtual QStringList mimeTypes() const;
- virtual QString kind() const;
+ virtual QString id() const;
+ virtual QString displayName() const;
virtual Core::IFile *open(const QString &fileName);
private:
@@ -75,7 +76,7 @@ public:
virtual ~ProjectFilesEditable();
virtual QList<int> context() const;
- virtual const char *kind() const;
+ virtual QString id() const;
virtual bool duplicateSupported() const;
virtual Core::IEditor *duplicate(QWidget *parent);
diff --git a/src/plugins/genericprojectmanager/genericprojectwizard.cpp b/src/plugins/genericprojectmanager/genericprojectwizard.cpp
index 1db66a48b9..10a18e14a3 100644
--- a/src/plugins/genericprojectmanager/genericprojectwizard.cpp
+++ b/src/plugins/genericprojectmanager/genericprojectwizard.cpp
@@ -56,7 +56,7 @@ GenericProjectWizardDialog::GenericProjectWizardDialog(QWidget *parent)
// first page
m_firstPage = new FileWizardPage;
m_firstPage->setTitle(tr("Generic Project"));
- m_firstPage->setNameLabel(tr("Project name:"));
+ m_firstPage->setFileNameLabel(tr("Project name:"));
m_firstPage->setPathLabel(tr("Location:"));
addPage(m_firstPage);
@@ -77,7 +77,7 @@ void GenericProjectWizardDialog::setPath(const QString &path)
QString GenericProjectWizardDialog::projectName() const
{
- return m_firstPage->name();
+ return m_firstPage->fileName();
}
GenericProjectWizard::GenericProjectWizard()
@@ -91,11 +91,11 @@ Core::BaseFileWizardParameters GenericProjectWizard::parameters()
{
static Core::BaseFileWizardParameters parameters(ProjectWizard);
parameters.setIcon(QIcon(":/wizards/images/console.png"));
- parameters.setName(tr("Import of Makefile-based Project"));
+ parameters.setDisplayName(tr("Import of Makefile-based Project"));
parameters.setId(QLatin1String("Z.Makefile"));
parameters.setDescription(tr("Creates a generic project, supporting any build system."));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY));
- parameters.setTrCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
+ parameters.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
return parameters;
}
diff --git a/src/plugins/git/clonewizard.cpp b/src/plugins/git/clonewizard.cpp
index 4bbd138632..18c03cf7e5 100644
--- a/src/plugins/git/clonewizard.cpp
+++ b/src/plugins/git/clonewizard.cpp
@@ -55,7 +55,7 @@ QString CloneWizard::description() const
return tr("Clones a project from a git repository.");
}
-QString CloneWizard::name() const
+QString CloneWizard::displayName() const
{
return tr("Git Repository Clone");
}
diff --git a/src/plugins/git/clonewizard.h b/src/plugins/git/clonewizard.h
index f8c1310c05..b2612549e0 100644
--- a/src/plugins/git/clonewizard.h
+++ b/src/plugins/git/clonewizard.h
@@ -44,7 +44,7 @@ public:
// IWizard
virtual QIcon icon() const;
virtual QString description() const;
- virtual QString name() const;
+ virtual QString displayName() const;
protected:
// BaseCheckoutWizard
diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp
index dd124773ae..db10366140 100644
--- a/src/plugins/git/giteditor.cpp
+++ b/src/plugins/git/giteditor.cpp
@@ -67,7 +67,7 @@ GitEditor::GitEditor(const VCSBase::VCSBaseEditorParameters *type,
QTC_ASSERT(m_changeNumberPattern40.isValid(), return);
setAnnotateRevisionTextFormat(tr("Blame %1"));
if (Git::Constants::debug)
- qDebug() << "GitEditor::GitEditor" << type->type << type->kind;
+ qDebug() << "GitEditor::GitEditor" << type->type << type->id;
}
QSet<QString> GitEditor::annotationChanges() const
diff --git a/src/plugins/git/gitorious/gitoriousclonewizard.cpp b/src/plugins/git/gitorious/gitoriousclonewizard.cpp
index 1437242121..5af7ef0ffb 100644
--- a/src/plugins/git/gitorious/gitoriousclonewizard.cpp
+++ b/src/plugins/git/gitorious/gitoriousclonewizard.cpp
@@ -83,7 +83,7 @@ QString GitoriousCloneWizard::description() const
return tr("Clones a project from a Gitorious repository.");
}
-QString GitoriousCloneWizard::name() const
+QString GitoriousCloneWizard::displayName() const
{
return tr("Gitorious Repository Clone");
}
diff --git a/src/plugins/git/gitorious/gitoriousclonewizard.h b/src/plugins/git/gitorious/gitoriousclonewizard.h
index 01eac8cd22..f673584711 100644
--- a/src/plugins/git/gitorious/gitoriousclonewizard.h
+++ b/src/plugins/git/gitorious/gitoriousclonewizard.h
@@ -46,7 +46,7 @@ public:
// IWizard
virtual QIcon icon() const;
virtual QString description() const;
- virtual QString name() const;
+ virtual QString displayName() const;
protected:
// BaseCheckoutWizard
diff --git a/src/plugins/git/gitversioncontrol.cpp b/src/plugins/git/gitversioncontrol.cpp
index e9e8ec9602..f241396e22 100644
--- a/src/plugins/git/gitversioncontrol.cpp
+++ b/src/plugins/git/gitversioncontrol.cpp
@@ -39,7 +39,7 @@ GitVersionControl::GitVersionControl(GitClient *client) :
{
}
-QString GitVersionControl::name() const
+QString GitVersionControl::displayName() const
{
return QLatin1String("git");
}
diff --git a/src/plugins/git/gitversioncontrol.h b/src/plugins/git/gitversioncontrol.h
index fc4c1f7a2f..e7dbf0dabe 100644
--- a/src/plugins/git/gitversioncontrol.h
+++ b/src/plugins/git/gitversioncontrol.h
@@ -44,7 +44,7 @@ class GitVersionControl : public Core::IVersionControl
public:
explicit GitVersionControl(GitClient *plugin);
- virtual QString name() const;
+ virtual QString displayName() const;
bool managesDirectory(const QString &directory) const;
virtual QString findTopLevelForDirectory(const QString &directory) const;
diff --git a/src/plugins/git/settingspage.cpp b/src/plugins/git/settingspage.cpp
index 5cddbeb22a..61abe4148e 100644
--- a/src/plugins/git/settingspage.cpp
+++ b/src/plugins/git/settingspage.cpp
@@ -102,7 +102,7 @@ QString SettingsPage::id() const
return QLatin1String(VCSBase::Constants::VCS_ID_GIT);
}
-QString SettingsPage::trName() const
+QString SettingsPage::displayName() const
{
return tr("Git");
}
@@ -112,7 +112,7 @@ QString SettingsPage::category() const
return QLatin1String(VCSBase::Constants::VCS_SETTINGS_CATEGORY);
}
-QString SettingsPage::trCategory() const
+QString SettingsPage::displayCategory() const
{
return QCoreApplication::translate("VCSBase", VCSBase::Constants::VCS_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/git/settingspage.h b/src/plugins/git/settingspage.h
index c559c982c0..dac646d379 100644
--- a/src/plugins/git/settingspage.h
+++ b/src/plugins/git/settingspage.h
@@ -71,9 +71,9 @@ public:
SettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/helloworld/helloworldplugin.cpp b/src/plugins/helloworld/helloworldplugin.cpp
index f898651c1b..bbd4f574a8 100644
--- a/src/plugins/helloworld/helloworldplugin.cpp
+++ b/src/plugins/helloworld/helloworldplugin.cpp
@@ -109,7 +109,7 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *error_m
// Add a mode with a push button based on BaseMode. Like the BaseView,
// it will unregister itself from the plugin manager when it is deleted.
Core::BaseMode *baseMode = new Core::BaseMode;
- baseMode->setUniqueModeName("HelloWorld.HelloWorldMode");
+ baseMode->setId(QLatin1String("HelloWorld.HelloWorldMode"));
baseMode->setName(tr("Hello world!"));
baseMode->setIcon(QIcon());
baseMode->setPriority(0);
diff --git a/src/plugins/help/docsettingspage.cpp b/src/plugins/help/docsettingspage.cpp
index b5d82de979..7a911e3e5d 100644
--- a/src/plugins/help/docsettingspage.cpp
+++ b/src/plugins/help/docsettingspage.cpp
@@ -48,7 +48,7 @@ QString DocSettingsPage::id() const
return QLatin1String("B.Documentation");
}
-QString DocSettingsPage::trName() const
+QString DocSettingsPage::displayName() const
{
return tr("Documentation");
}
@@ -58,7 +58,7 @@ QString DocSettingsPage::category() const
return QLatin1String(Help::Constants::HELP_CATEGORY);
}
-QString DocSettingsPage::trCategory() const
+QString DocSettingsPage::displayCategory() const
{
return QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY);
}
diff --git a/src/plugins/help/docsettingspage.h b/src/plugins/help/docsettingspage.h
index 1a620036fc..d744faf0c1 100644
--- a/src/plugins/help/docsettingspage.h
+++ b/src/plugins/help/docsettingspage.h
@@ -49,9 +49,9 @@ public:
DocSettingsPage(QHelpEngine *helpEngine);
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/help/filtersettingspage.cpp b/src/plugins/help/filtersettingspage.cpp
index fd69f92b8b..fef6ad7acd 100644
--- a/src/plugins/help/filtersettingspage.cpp
+++ b/src/plugins/help/filtersettingspage.cpp
@@ -49,7 +49,7 @@ QString FilterSettingsPage::id() const
return QLatin1String("D.Filters");
}
-QString FilterSettingsPage::trName() const
+QString FilterSettingsPage::displayName() const
{
return tr("Filters");
}
@@ -59,7 +59,7 @@ QString FilterSettingsPage::category() const
return QLatin1String(Help::Constants::HELP_CATEGORY);
}
-QString FilterSettingsPage::trCategory() const
+QString FilterSettingsPage::displayCategory() const
{
return QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY);
}
diff --git a/src/plugins/help/filtersettingspage.h b/src/plugins/help/filtersettingspage.h
index 9169c191c7..58421f47bc 100644
--- a/src/plugins/help/filtersettingspage.h
+++ b/src/plugins/help/filtersettingspage.h
@@ -48,9 +48,9 @@ public:
FilterSettingsPage(QHelpEngine *helpEngine);
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/help/generalsettingspage.cpp b/src/plugins/help/generalsettingspage.cpp
index 8702b563bd..805138143e 100644
--- a/src/plugins/help/generalsettingspage.cpp
+++ b/src/plugins/help/generalsettingspage.cpp
@@ -71,7 +71,7 @@ QString GeneralSettingsPage::id() const
return QLatin1String("A.General settings");
}
-QString GeneralSettingsPage::trName() const
+QString GeneralSettingsPage::displayName() const
{
return tr("General settings");
}
@@ -81,7 +81,7 @@ QString GeneralSettingsPage::category() const
return QLatin1String(Help::Constants::HELP_CATEGORY);
}
-QString GeneralSettingsPage::trCategory() const
+QString GeneralSettingsPage::displayCategory() const
{
return QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY);
}
diff --git a/src/plugins/help/generalsettingspage.h b/src/plugins/help/generalsettingspage.h
index 5ecfbaf2d7..9b63fd7dc3 100644
--- a/src/plugins/help/generalsettingspage.h
+++ b/src/plugins/help/generalsettingspage.h
@@ -56,9 +56,9 @@ public:
BookmarkManager *bookmarkManager);
QString id() const;
- virtual QString trName() const;
+ virtual QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/help/helpindexfilter.cpp b/src/plugins/help/helpindexfilter.cpp
index 162c3d57a6..9ea9ab3636 100644
--- a/src/plugins/help/helpindexfilter.cpp
+++ b/src/plugins/help/helpindexfilter.cpp
@@ -67,12 +67,12 @@ void HelpIndexFilter::updateIndices()
m_plugin->setIndexFilter(currentFilter);
}
-QString HelpIndexFilter::trName() const
+QString HelpIndexFilter::displayName() const
{
return tr("Help index");
}
-QString HelpIndexFilter::name() const
+QString HelpIndexFilter::id() const
{
return QLatin1String("HelpIndexFilter");
}
diff --git a/src/plugins/help/helpindexfilter.h b/src/plugins/help/helpindexfilter.h
index 7094e9adf2..e70343a552 100644
--- a/src/plugins/help/helpindexfilter.h
+++ b/src/plugins/help/helpindexfilter.h
@@ -52,8 +52,8 @@ public:
HelpIndexFilter(HelpPlugin *plugin, QHelpEngine *helpEngine);
// ILocatorFilter
- QString trName() const;
- QString name() const;
+ QString displayName() const;
+ QString id() const;
Priority priority() const;
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
diff --git a/src/plugins/help/helpmode.cpp b/src/plugins/help/helpmode.cpp
index 964b0eb17c..76cb522a74 100644
--- a/src/plugins/help/helpmode.cpp
+++ b/src/plugins/help/helpmode.cpp
@@ -43,8 +43,8 @@ using namespace Help::Internal;
HelpMode::HelpMode(QWidget *widget, QWidget *centralWidget, QObject *parent)
: BaseMode(parent), m_centralWidget(centralWidget)
{
- setName(tr("Help"));
- setUniqueModeName(Constants::ID_MODE_HELP);
+ setDisplayName(tr("Help"));
+ setId(QLatin1String(Constants::ID_MODE_HELP));
setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Reference.png")));
setPriority(Constants::P_MODE_HELP);
setWidget(widget);
diff --git a/src/plugins/locator/directoryfilter.h b/src/plugins/locator/directoryfilter.h
index 2140a18d1f..ff04b38427 100644
--- a/src/plugins/locator/directoryfilter.h
+++ b/src/plugins/locator/directoryfilter.h
@@ -50,8 +50,8 @@ class DirectoryFilter : public BaseFileFilter
public:
DirectoryFilter();
- QString trName() const { return m_name; }
- QString name() const { return m_name; }
+ QString displayName() const { return m_name; }
+ QString id() const { return m_name; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Medium; }
QByteArray saveState() const;
bool restoreState(const QByteArray &state);
diff --git a/src/plugins/locator/filesystemfilter.h b/src/plugins/locator/filesystemfilter.h
index 319637192a..a06394e29c 100644
--- a/src/plugins/locator/filesystemfilter.h
+++ b/src/plugins/locator/filesystemfilter.h
@@ -51,8 +51,8 @@ class FileSystemFilter : public Locator::ILocatorFilter
public:
FileSystemFilter(Core::EditorManager *editorManager, LocatorWidget *locatorWidget);
- QString trName() const { return tr("Files in file system"); }
- QString name() const { return "Files in file system"; }
+ QString displayName() const { return tr("Files in file system"); }
+ QString id() const { return "Files in file system"; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Medium; }
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
diff --git a/src/plugins/locator/ilocatorfilter.h b/src/plugins/locator/ilocatorfilter.h
index 4957eecd05..4345872d54 100644
--- a/src/plugins/locator/ilocatorfilter.h
+++ b/src/plugins/locator/ilocatorfilter.h
@@ -84,10 +84,10 @@ public:
virtual ~ILocatorFilter() {}
/* Visible name. */
- virtual QString trName() const = 0;
+ virtual QString displayName() const = 0;
/* Internal name. */
- virtual QString name() const = 0;
+ virtual QString id() const = 0;
/* Selection list order in case of multiple active filters (high goes on top). */
virtual Priority priority() const = 0;
diff --git a/src/plugins/locator/locatorfiltersfilter.cpp b/src/plugins/locator/locatorfiltersfilter.cpp
index 4b81b73e5d..7580d6539e 100644
--- a/src/plugins/locator/locatorfiltersfilter.cpp
+++ b/src/plugins/locator/locatorfiltersfilter.cpp
@@ -48,12 +48,12 @@ LocatorFiltersFilter::LocatorFiltersFilter(LocatorPlugin *plugin,
setHidden(true);
}
-QString LocatorFiltersFilter::trName() const
+QString LocatorFiltersFilter::displayName() const
{
return tr("Available filters");
}
-QString LocatorFiltersFilter::name() const
+QString LocatorFiltersFilter::id() const
{
return QLatin1String("FiltersFilter");
}
@@ -73,7 +73,7 @@ QList<FilterEntry> LocatorFiltersFilter::matchesFor(const QString &entry)
filter->shortcutString(),
QVariant::fromValue(filter),
m_icon);
- entry.extraInfo = filter->trName();
+ entry.extraInfo = filter->displayName();
entries.append(entry);
}
}
diff --git a/src/plugins/locator/locatorfiltersfilter.h b/src/plugins/locator/locatorfiltersfilter.h
index 622b653f1a..1a28c727e3 100644
--- a/src/plugins/locator/locatorfiltersfilter.h
+++ b/src/plugins/locator/locatorfiltersfilter.h
@@ -53,8 +53,8 @@ public:
LocatorWidget *locatorWidget);
// ILocatorFilter
- QString trName() const;
- QString name() const;
+ QString displayName() const;
+ QString id() const;
Priority priority() const;
QList<FilterEntry> matchesFor(const QString &entry);
void accept(FilterEntry selection) const;
diff --git a/src/plugins/locator/locatorplugin.cpp b/src/plugins/locator/locatorplugin.cpp
index ba0e507fdf..c7ec53d40b 100644
--- a/src/plugins/locator/locatorplugin.cpp
+++ b/src/plugins/locator/locatorplugin.cpp
@@ -176,7 +176,7 @@ void LocatorPlugin::saveSettings()
s->setValue("RefreshInterval", refreshInterval());
foreach (ILocatorFilter *filter, m_filters) {
if (!m_customFilters.contains(filter))
- s->setValue(filter->name(), filter->saveState());
+ s->setValue(filter->id(), filter->saveState());
}
s->beginGroup("CustomFilters");
int i = 0;
diff --git a/src/plugins/locator/locatorplugin.h b/src/plugins/locator/locatorplugin.h
index 525f291f4a..f3a682cfc1 100644
--- a/src/plugins/locator/locatorplugin.h
+++ b/src/plugins/locator/locatorplugin.h
@@ -100,8 +100,8 @@ void LocatorPlugin::loadSettingsHelper(S *settings)
m_refreshTimer.setInterval(settings->value("RefreshInterval", 60).toInt() * 60000);
foreach (ILocatorFilter *filter, m_filters) {
- if (settings->contains(filter->name())) {
- const QByteArray state = settings->value(filter->name()).toByteArray();
+ if (settings->contains(filter->id())) {
+ const QByteArray state = settings->value(filter->id()).toByteArray();
if (!state.isEmpty())
filter->restoreState(state);
}
diff --git a/src/plugins/locator/locatorwidget.cpp b/src/plugins/locator/locatorwidget.cpp
index da15cd1100..567658e112 100644
--- a/src/plugins/locator/locatorwidget.cpp
+++ b/src/plugins/locator/locatorwidget.cpp
@@ -311,7 +311,7 @@ void LocatorWidget::updateFilterList()
m_filterMenu->clear();
foreach (ILocatorFilter *filter, m_locatorPlugin->filters()) {
if (!filter->shortcutString().isEmpty() && !filter->isHidden()) {
- QAction *action = m_filterMenu->addAction(filter->trName(), this, SLOT(filterSelected()));
+ QAction *action = m_filterMenu->addAction(filter->displayName(), this, SLOT(filterSelected()));
action->setData(qVariantFromValue(filter));
}
}
diff --git a/src/plugins/locator/opendocumentsfilter.h b/src/plugins/locator/opendocumentsfilter.h
index fc040971f7..b2f078ae39 100644
--- a/src/plugins/locator/opendocumentsfilter.h
+++ b/src/plugins/locator/opendocumentsfilter.h
@@ -50,8 +50,8 @@ class OpenDocumentsFilter : public Locator::ILocatorFilter
public:
OpenDocumentsFilter(Core::EditorManager *editorManager);
- QString trName() const { return tr("Open documents"); }
- QString name() const { return "Open documents"; }
+ QString displayName() const { return tr("Open documents"); }
+ QString id() const { return "Open documents"; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Medium; }
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
diff --git a/src/plugins/locator/settingspage.cpp b/src/plugins/locator/settingspage.cpp
index c82065d3d8..24f3ac6bd5 100644
--- a/src/plugins/locator/settingspage.cpp
+++ b/src/plugins/locator/settingspage.cpp
@@ -54,7 +54,7 @@ QString SettingsPage::id() const
return QLatin1String(Constants::FILTER_OPTIONS_PAGE);
}
-QString SettingsPage::trName() const
+QString SettingsPage::displayName() const
{
return QCoreApplication::translate("Locator", Locator::Constants::FILTER_OPTIONS_PAGE);
}
@@ -64,7 +64,7 @@ QString SettingsPage::category() const
return QLatin1String(Constants::LOCATOR_CATEGORY);
}
-QString SettingsPage::trCategory() const
+QString SettingsPage::displayCategory() const
{
return QCoreApplication::translate("Locator", Locator::Constants::LOCATOR_TR_CATEGORY);
}
@@ -158,9 +158,9 @@ void SettingsPage::updateFilterList()
QString title;
if (filter->isIncludedByDefault())
- title = filter->trName();
+ title = filter->displayName();
else
- title = tr("%1 (Prefix: %2)").arg(filter->trName()).arg(filter->shortcutString());
+ title = tr("%1 (Prefix: %2)").arg(filter->displayName()).arg(filter->shortcutString());
QListWidgetItem *item = new QListWidgetItem(title);
item->setData(Qt::UserRole, qVariantFromValue(filter));
m_ui.filterList->addItem(item);
diff --git a/src/plugins/locator/settingspage.h b/src/plugins/locator/settingspage.h
index 414f4864ce..8e27ee590e 100644
--- a/src/plugins/locator/settingspage.h
+++ b/src/plugins/locator/settingspage.h
@@ -56,9 +56,9 @@ class SettingsPage : public Core::IOptionsPage
public:
explicit SettingsPage(LocatorPlugin *plugin);
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/mercurial/clonewizard.cpp b/src/plugins/mercurial/clonewizard.cpp
index d965ab3bcc..1753af17fd 100644
--- a/src/plugins/mercurial/clonewizard.cpp
+++ b/src/plugins/mercurial/clonewizard.cpp
@@ -56,7 +56,7 @@ QString CloneWizard::description() const
return tr("Clone a Mercurial repository");
}
-QString CloneWizard::name() const
+QString CloneWizard::displayName() const
{
return tr("Mercurial Clone");
}
diff --git a/src/plugins/mercurial/clonewizard.h b/src/plugins/mercurial/clonewizard.h
index 53f31db5e3..7b39a1c0f5 100644
--- a/src/plugins/mercurial/clonewizard.h
+++ b/src/plugins/mercurial/clonewizard.h
@@ -45,7 +45,7 @@ public:
QIcon icon() const;
QString description() const;
- QString name() const;
+ QString displayName() const;
protected:
QList<QWizardPage *> createParameterPages(const QString &path);
diff --git a/src/plugins/mercurial/mercurialcontrol.cpp b/src/plugins/mercurial/mercurialcontrol.cpp
index c118aa0d3f..2bfca86258 100644
--- a/src/plugins/mercurial/mercurialcontrol.cpp
+++ b/src/plugins/mercurial/mercurialcontrol.cpp
@@ -43,7 +43,7 @@ MercurialControl::MercurialControl(MercurialClient *client)
{
}
-QString MercurialControl::name() const
+QString MercurialControl::displayName() const
{
return tr("Mercurial");
}
diff --git a/src/plugins/mercurial/mercurialcontrol.h b/src/plugins/mercurial/mercurialcontrol.h
index 8e2c2fb153..2c11637aa5 100644
--- a/src/plugins/mercurial/mercurialcontrol.h
+++ b/src/plugins/mercurial/mercurialcontrol.h
@@ -49,7 +49,7 @@ class MercurialControl: public Core::IVersionControl
public:
explicit MercurialControl(MercurialClient *mercurialClient);
- QString name() const;
+ QString displayName() const;
bool managesDirectory(const QString &filename) const;
QString findTopLevelForDirectory(const QString &directory) const;
bool supportsOperation(Operation operation) const;
diff --git a/src/plugins/mercurial/optionspage.cpp b/src/plugins/mercurial/optionspage.cpp
index f541495810..118c7bb60f 100644
--- a/src/plugins/mercurial/optionspage.cpp
+++ b/src/plugins/mercurial/optionspage.cpp
@@ -92,7 +92,7 @@ QString OptionsPage::id() const
return QLatin1String(VCSBase::Constants::VCS_ID_MERCURIAL);
}
-QString OptionsPage::trName() const
+QString OptionsPage::displayName() const
{
return tr("Mercurial");
}
@@ -102,7 +102,7 @@ QString OptionsPage::category() const
return QLatin1String(VCSBase::Constants::VCS_SETTINGS_CATEGORY);
}
-QString OptionsPage::trCategory() const
+QString OptionsPage::displayCategory() const
{
return QCoreApplication::translate("VCSBase", VCSBase::Constants::VCS_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/mercurial/optionspage.h b/src/plugins/mercurial/optionspage.h
index 0143fea1e0..8f0fcd3b86 100644
--- a/src/plugins/mercurial/optionspage.h
+++ b/src/plugins/mercurial/optionspage.h
@@ -64,9 +64,9 @@ class OptionsPage : public Core::IOptionsPage
public:
OptionsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/perforce/perforceconstants.h b/src/plugins/perforce/perforceconstants.h
index 3402b49dc1..0da66fd2af 100644
--- a/src/plugins/perforce/perforceconstants.h
+++ b/src/plugins/perforce/perforceconstants.h
@@ -35,26 +35,27 @@ namespace Constants {
const char * const PERFORCEEDITOR_CONTEXT = "Perforce Editor";
-
-const char * const PERFORCE_SUBMIT_EDITOR_KIND = "Perforce Submit Editor";
+const char * const PERFORCE_SUBMIT_EDITOR_ID = "Perforce.SubmitEditor";
const char * const PERFORCESUBMITEDITOR_CONTEXT = "Perforce Submit Editor";
-const char * const PERFORCE_COMMANDLOG_EDITOR_KIND = "Perforce Command Log Editor";
+const char * const PERFORCE_COMMANDLOG_EDITOR_ID = "Perfoirce.CommandLogEditor";
const char * const PERFORCE_COMMANDLOG_EDITOR_CONTEXT = "Perforce Command Log Editor";
-const char * const PERFORCE_LOG_EDITOR_KIND = "Perforce Log Editor";
+const char * const PERFORCE_LOG_EDITOR_ID = "Perforce.LogEditor";
const char * const PERFORCE_LOG_EDITOR_CONTEXT = "Perforce Log Editor";
-const char * const PERFORCE_DIFF_EDITOR_KIND = "Perforce Diff Editor";
+const char * const PERFORCE_DIFF_EDITOR_ID = "Perforce.DiffEditor";
const char * const PERFORCE_DIFF_EDITOR_CONTEXT = "Perforce Diff Editor";
-const char * const PERFORCE_ANNOTATION_EDITOR_KIND = "Perforce Annotation Editor";
+const char * const PERFORCE_ANNOTATION_EDITOR_ID = "Perforce.AnnotationEditor";
const char * const PERFORCE_ANNOTATION_EDITOR_CONTEXT = "Perforce Annotation Editor";
const char * const SUBMIT_CURRENT = "Perforce.SubmitCurrentLog";
const char * const DIFF_SELECTED = "Perforce.DiffSelectedFilesInLog";
const char * const SUBMIT_MIMETYPE = "application/vnd.nokia.text.p4.submit";
+
enum { debug = 0 };
+
} // Internal
} // Perforce
diff --git a/src/plugins/perforce/perforceeditor.cpp b/src/plugins/perforce/perforceeditor.cpp
index d6e3f9e9a3..e16e24773a 100644
--- a/src/plugins/perforce/perforceeditor.cpp
+++ b/src/plugins/perforce/perforceeditor.cpp
@@ -64,7 +64,7 @@ PerforceEditor::PerforceEditor(const VCSBase::VCSBaseEditorParameters *type,
QTC_ASSERT(m_changeNumberPattern.isValid(), /**/);
setAnnotateRevisionTextFormat(tr("Annotate change list \"%1\""));
if (Perforce::Constants::debug)
- qDebug() << "PerforceEditor::PerforceEditor" << type->type << type->kind;
+ qDebug() << "PerforceEditor::PerforceEditor" << type->type << type->id;
}
QSet<QString> PerforceEditor::annotationChanges() const
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index 2320b57d51..e7f05c3c76 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -71,22 +71,22 @@
static const VCSBase::VCSBaseEditorParameters editorParameters[] = {
{
VCSBase::RegularCommandOutput,
- Perforce::Constants::PERFORCE_COMMANDLOG_EDITOR_KIND,
+ Perforce::Constants::PERFORCE_COMMANDLOG_EDITOR_ID,
Perforce::Constants::PERFORCE_COMMANDLOG_EDITOR_CONTEXT,
"application/vnd.nokia.text.scs_commandlog",
"scslog"},
{ VCSBase::LogOutput,
- Perforce::Constants::PERFORCE_LOG_EDITOR_KIND,
+ Perforce::Constants::PERFORCE_LOG_EDITOR_ID,
Perforce::Constants::PERFORCE_LOG_EDITOR_CONTEXT,
"application/vnd.nokia.text.scs_filelog",
"scsfilelog"},
{ VCSBase::AnnotateOutput,
- Perforce::Constants::PERFORCE_ANNOTATION_EDITOR_KIND,
+ Perforce::Constants::PERFORCE_ANNOTATION_EDITOR_ID,
Perforce::Constants::PERFORCE_ANNOTATION_EDITOR_CONTEXT,
"application/vnd.nokia.text.scs_annotation",
"scsannotate"},
{ VCSBase::DiffOutput,
- Perforce::Constants::PERFORCE_DIFF_EDITOR_KIND,
+ Perforce::Constants::PERFORCE_DIFF_EDITOR_ID,
Perforce::Constants::PERFORCE_DIFF_EDITOR_CONTEXT,
"text/x-patch","diff"}
};
@@ -172,7 +172,7 @@ PerforceResponse::PerforceResponse() :
PerforcePlugin *PerforcePlugin::m_perforcePluginInstance = NULL;
PerforcePlugin::PerforcePlugin() :
- VCSBase::VCSBasePlugin(QLatin1String(Constants::PERFORCE_SUBMIT_EDITOR_KIND)),
+ VCSBase::VCSBasePlugin(QLatin1String(Constants::PERFORCE_SUBMIT_EDITOR_ID)),
m_editAction(0),
m_addAction(0),
m_deleteAction(0),
@@ -204,7 +204,7 @@ PerforcePlugin::PerforcePlugin() :
static const VCSBase::VCSBaseSubmitEditorParameters submitParameters = {
Perforce::Constants::SUBMIT_MIMETYPE,
- Perforce::Constants::PERFORCE_SUBMIT_EDITOR_KIND,
+ Perforce::Constants::PERFORCE_SUBMIT_EDITOR_ID,
Perforce::Constants::PERFORCESUBMITEDITOR_CONTEXT
};
@@ -657,7 +657,7 @@ void PerforcePlugin::startSubmitProject()
Core::IEditor *PerforcePlugin::openPerforceSubmitEditor(const QString &fileName, const QStringList &depotFileNames)
{
Core::EditorManager *editorManager = Core::EditorManager::instance();
- Core::IEditor *editor = editorManager->openEditor(fileName, Constants::PERFORCE_SUBMIT_EDITOR_KIND);
+ Core::IEditor *editor = editorManager->openEditor(fileName, Constants::PERFORCE_SUBMIT_EDITOR_ID);
editorManager->ensureEditorManagerVisible();
PerforceSubmitEditor *submitEditor = static_cast<PerforceSubmitEditor*>(editor);
submitEditor->restrictToProjectFiles(depotFileNames);
@@ -1146,11 +1146,11 @@ Core::IEditor * PerforcePlugin::showOutputInEditor(const QString& title, const Q
{
const VCSBase::VCSBaseEditorParameters *params = findType(editorType);
QTC_ASSERT(params, return 0);
- const QString kind = QLatin1String(params->kind);
+ const QString id = params->id;
if (Perforce::Constants::debug)
- qDebug() << "PerforcePlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
+ qDebug() << "PerforcePlugin::showOutputInEditor" << title << id << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
- Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(kind, &s, output);
+ Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(id, &s, output);
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,int)));
PerforceEditor *e = qobject_cast<PerforceEditor*>(editor->widget());
diff --git a/src/plugins/perforce/perforceversioncontrol.cpp b/src/plugins/perforce/perforceversioncontrol.cpp
index 0fe7bb6a07..bfa9f8827a 100644
--- a/src/plugins/perforce/perforceversioncontrol.cpp
+++ b/src/plugins/perforce/perforceversioncontrol.cpp
@@ -43,7 +43,7 @@ PerforceVersionControl::PerforceVersionControl(PerforcePlugin *plugin) :
{
}
-QString PerforceVersionControl::name() const
+QString PerforceVersionControl::displayName() const
{
return QLatin1String("perforce");
}
diff --git a/src/plugins/perforce/perforceversioncontrol.h b/src/plugins/perforce/perforceversioncontrol.h
index c6f5e1a4d6..8d6660fc02 100644
--- a/src/plugins/perforce/perforceversioncontrol.h
+++ b/src/plugins/perforce/perforceversioncontrol.h
@@ -43,7 +43,7 @@ class PerforceVersionControl : public Core::IVersionControl
public:
explicit PerforceVersionControl(PerforcePlugin *plugin);
- virtual QString name() const;
+ virtual QString displayName() const;
bool managesDirectory(const QString &directory) const;
virtual QString findTopLevelForDirectory(const QString &directory) const;
diff --git a/src/plugins/perforce/settingspage.cpp b/src/plugins/perforce/settingspage.cpp
index 793697bc42..3981c621bf 100644
--- a/src/plugins/perforce/settingspage.cpp
+++ b/src/plugins/perforce/settingspage.cpp
@@ -131,7 +131,7 @@ QString SettingsPage::id() const
return QLatin1String(VCSBase::Constants::VCS_ID_PERFORCE);
}
-QString SettingsPage::trName() const
+QString SettingsPage::displayName() const
{
return tr("Perforce");
}
@@ -141,7 +141,7 @@ QString SettingsPage::category() const
return QLatin1String(VCSBase::Constants::VCS_SETTINGS_CATEGORY);
}
-QString SettingsPage::trCategory() const
+QString SettingsPage::displayCategory() const
{
return QCoreApplication::translate("VCSBase", VCSBase::Constants::VCS_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/perforce/settingspage.h b/src/plugins/perforce/settingspage.h
index a0c5db0408..5cec40026b 100644
--- a/src/plugins/perforce/settingspage.h
+++ b/src/plugins/perforce/settingspage.h
@@ -74,9 +74,9 @@ public:
SettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/projectexplorer/abstractprocessstep.h b/src/plugins/projectexplorer/abstractprocessstep.h
index df113303c8..1f197a9117 100644
--- a/src/plugins/projectexplorer/abstractprocessstep.h
+++ b/src/plugins/projectexplorer/abstractprocessstep.h
@@ -80,7 +80,7 @@ public:
virtual void run(QFutureInterface<bool> &);
// pure virtual functions inheritated from BuildStep
- virtual QString name() = 0;
+ virtual QString id() = 0;
virtual QString displayName() = 0;
virtual BuildStepConfigWidget *createConfigWidget() = 0;
virtual bool immutable() const = 0;
diff --git a/src/plugins/projectexplorer/allprojectsfilter.h b/src/plugins/projectexplorer/allprojectsfilter.h
index 9d2455e560..46c8913faf 100644
--- a/src/plugins/projectexplorer/allprojectsfilter.h
+++ b/src/plugins/projectexplorer/allprojectsfilter.h
@@ -48,8 +48,8 @@ class AllProjectsFilter : public Locator::BaseFileFilter
public:
explicit AllProjectsFilter(ProjectExplorerPlugin *pe);
- QString trName() const { return tr("Files in any project"); }
- QString name() const { return "Files in any project"; }
+ QString displayName() const { return tr("Files in any project"); }
+ QString id() const { return "Files in any project"; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Low; }
void refresh(QFutureInterface<void> &future);
diff --git a/src/plugins/projectexplorer/applicationrunconfiguration.cpp b/src/plugins/projectexplorer/applicationrunconfiguration.cpp
index de3707ac80..a134387c58 100644
--- a/src/plugins/projectexplorer/applicationrunconfiguration.cpp
+++ b/src/plugins/projectexplorer/applicationrunconfiguration.cpp
@@ -53,7 +53,7 @@ LocalApplicationRunConfiguration::~LocalApplicationRunConfiguration()
{
}
-QString LocalApplicationRunConfiguration::type() const
+QString LocalApplicationRunConfiguration::id() const
{
return "ProjectExplorer.LocalApplicationRunConfiguration";
}
diff --git a/src/plugins/projectexplorer/applicationrunconfiguration.h b/src/plugins/projectexplorer/applicationrunconfiguration.h
index bc667007ac..e59be18b0a 100644
--- a/src/plugins/projectexplorer/applicationrunconfiguration.h
+++ b/src/plugins/projectexplorer/applicationrunconfiguration.h
@@ -50,7 +50,7 @@ public:
LocalApplicationRunConfiguration(Project *pro);
virtual ~LocalApplicationRunConfiguration();
- virtual QString type() const;
+ virtual QString id() const;
virtual QString executable() const = 0;
virtual RunMode runMode() const = 0;
virtual QString workingDirectory() const = 0;
diff --git a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
index c648cfe2a8..27014eb14d 100644
--- a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
+++ b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
@@ -42,7 +42,7 @@ struct BaseProjectWizardDialogPrivate {
explicit BaseProjectWizardDialogPrivate(Utils::ProjectIntroPage *page, int id = -1);
const int introId;
- Utils::ProjectIntroPage *introPage;
+ Utils::ProjectIntroPage *introPage;
};
BaseProjectWizardDialogPrivate::BaseProjectWizardDialogPrivate(Utils::ProjectIntroPage *page, int id) :
@@ -79,9 +79,9 @@ BaseProjectWizardDialog::~BaseProjectWizardDialog()
delete d;
}
-QString BaseProjectWizardDialog::name() const
+QString BaseProjectWizardDialog::projectName() const
{
- return d->introPage->name();
+ return d->introPage->projectName();
}
QString BaseProjectWizardDialog::path() const
@@ -99,9 +99,9 @@ void BaseProjectWizardDialog::setPath(const QString &path)
d->introPage->setPath(path);
}
-void BaseProjectWizardDialog::setName(const QString &name)
+void BaseProjectWizardDialog::setProjectName(const QString &name)
{
- d->introPage->setName(name);
+ d->introPage->setProjectName(name);
}
void BaseProjectWizardDialog::slotAccepted()
@@ -118,7 +118,7 @@ Utils::ProjectIntroPage *BaseProjectWizardDialog::introPage() const
return d->introPage;
}
-QString BaseProjectWizardDialog::projectName(const QString &path)
+QString BaseProjectWizardDialog::uniqueProjectName(const QString &path)
{
const QDir pathDir(path);
const QString prefix = tr("untitled");
diff --git a/src/plugins/projectexplorer/baseprojectwizarddialog.h b/src/plugins/projectexplorer/baseprojectwizarddialog.h
index 9f0eb94b17..fd84401d1d 100644
--- a/src/plugins/projectexplorer/baseprojectwizarddialog.h
+++ b/src/plugins/projectexplorer/baseprojectwizarddialog.h
@@ -59,16 +59,16 @@ protected:
public:
virtual ~BaseProjectWizardDialog();
- QString name() const;
+ QString projectName() const;
QString path() const;
// Generate a new project name (untitled<n>) in path.
- static QString projectName(const QString &path);
+ static QString uniqueProjectName(const QString &path);
public slots:
void setIntroDescription(const QString &d);
void setPath(const QString &path);
- void setName(const QString &name);
+ void setProjectName(const QString &name);
protected:
Utils::ProjectIntroPage *introPage() const;
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index 4fdd0be89b..c62d7a9ab7 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -35,11 +35,11 @@
using namespace ProjectExplorer;
-IBuildStepFactory *findFactory(const QString &name)
+IBuildStepFactory *findFactory(const QString &id)
{
QList<IBuildStepFactory *> factories = ExtensionSystem::PluginManager::instance()->getObjects<IBuildStepFactory>();
foreach(IBuildStepFactory *factory, factories)
- if (factory->canCreate(name))
+ if (factory->canCreate(id))
return factory;
return 0;
}
@@ -50,7 +50,7 @@ BuildConfiguration::BuildConfiguration(Project *pro)
}
-BuildConfiguration::BuildConfiguration(Project *pro, const QMap<QString, QVariant> &map)
+BuildConfiguration::BuildConfiguration(Project *pro, const QVariantMap &map)
: m_project(pro)
{
m_displayName = map.value("ProjectExplorer.BuildConfiguration.DisplayName").toString();
@@ -61,12 +61,12 @@ BuildConfiguration::BuildConfiguration(BuildConfiguration *source)
m_project(source->m_project)
{
foreach(BuildStep *originalbs, source->buildSteps()) {
- IBuildStepFactory *factory = findFactory(originalbs->name());
+ IBuildStepFactory *factory = findFactory(originalbs->id());
BuildStep *clonebs = factory->clone(originalbs, this);
m_buildSteps.append(clonebs);
}
foreach(BuildStep *originalcs, source->cleanSteps()) {
- IBuildStepFactory *factory = findFactory(originalcs->name());
+ IBuildStepFactory *factory = findFactory(originalcs->id());
BuildStep *clonecs = factory->clone(originalcs, this);
m_cleanSteps.append(clonecs);
}
@@ -91,7 +91,7 @@ void BuildConfiguration::setDisplayName(const QString &name)
emit displayNameChanged();
}
-void BuildConfiguration::toMap(QMap<QString, QVariant> &map) const
+void BuildConfiguration::toMap(QVariantMap &map) const
{
map.insert("ProjectExplorer.BuildConfiguration.DisplayName", m_displayName);
}
diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h
index 543a8580dc..8116927462 100644
--- a/src/plugins/projectexplorer/buildconfiguration.h
+++ b/src/plugins/projectexplorer/buildconfiguration.h
@@ -100,23 +100,23 @@ public:
virtual ~IBuildConfigurationFactory();
// used to show the list of possible additons to a project, returns a list of types
- virtual QStringList availableCreationTypes() const = 0;
+ virtual QStringList availableCreationIds() const = 0;
// used to translate the types to names to display to the user
- virtual QString displayNameForType(const QString &type) const = 0;
+ virtual QString displayNameForId(const QString &id) const = 0;
// creates build configuration(s) for given type and adds them to project
// if successfull returns the BuildConfiguration that should be shown in the
// project mode for editing
- virtual BuildConfiguration *create(const QString &type) const = 0;
+ virtual BuildConfiguration *create(const QString &id) const = 0;
// clones a given BuildConfiguration, should not add it to the project
virtual BuildConfiguration *clone(BuildConfiguration *source) const = 0;
// restores a BuildConfiguration with the name and adds it to the project
- virtual BuildConfiguration *restore(const QMap<QString, QVariant> &values) const = 0;
+ virtual BuildConfiguration *restore(const QVariantMap &values) const = 0;
signals:
- void availableCreationTypesChanged();
+ void availableCreationIdsChanged();
};
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp
index 560061eee4..b121d4ae51 100644
--- a/src/plugins/projectexplorer/buildmanager.cpp
+++ b/src/plugins/projectexplorer/buildmanager.cpp
@@ -280,7 +280,7 @@ void BuildManager::nextBuildQueue()
bool result = m_watcher.result();
if (!result) {
// Build Failure
- const QString projectName = m_currentBuildStep->buildConfiguration()->project()->name();
+ const QString projectName = m_currentBuildStep->buildConfiguration()->project()->displayName();
addToOutputWindow(tr("<font color=\"#ff0000\">Error while building project %1</font>").arg(projectName));
addToOutputWindow(tr("<font color=\"#ff0000\">When executing build step '%1'</font>").arg(m_currentBuildStep->displayName()));
// NBS TODO fix in qtconcurrent
@@ -318,7 +318,7 @@ void BuildManager::nextStep()
bool init = m_currentBuildStep->init();
if (!init) {
- const QString projectName = m_currentBuildStep->buildConfiguration()->project()->name();
+ const QString projectName = m_currentBuildStep->buildConfiguration()->project()->displayName();
addToOutputWindow(tr("<font color=\"#ff0000\">Error while building project %1</font>").arg(projectName));
addToOutputWindow(tr("<font color=\"#ff0000\">When executing build step '%1'</font>").arg(m_currentBuildStep->displayName()));
cancel();
@@ -326,7 +326,7 @@ void BuildManager::nextStep()
}
if (m_currentBuildStep->buildConfiguration()->project() != m_previousBuildStepProject) {
- const QString projectName = m_currentBuildStep->buildConfiguration()->project()->name();
+ const QString projectName = m_currentBuildStep->buildConfiguration()->project()->displayName();
addToOutputWindow(tr("<b>Running build steps for project %2...</b>")
.arg(projectName));
m_previousBuildStepProject = m_currentBuildStep->buildConfiguration()->project();
diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
index 02e7198287..ac03deb646 100644
--- a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
@@ -79,7 +79,7 @@ BuildSettingsPanel::~BuildSettingsPanel()
delete m_widget;
}
-QString BuildSettingsPanel::name() const
+QString BuildSettingsPanel::displayName() const
{
return QApplication::tr("Build Settings");
}
@@ -169,7 +169,7 @@ void BuildSettingsWidget::setupUi()
this, SLOT(checkMakeActiveLabel()));
if (m_project->buildConfigurationFactory())
- connect(m_project->buildConfigurationFactory(), SIGNAL(availableCreationTypesChanged()), SLOT(updateAddButtonMenu()));
+ connect(m_project->buildConfigurationFactory(), SIGNAL(availableCreationIdsChanged()), SLOT(updateAddButtonMenu()));
updateAddButtonMenu();
updateBuildSettings();
@@ -221,9 +221,9 @@ void BuildSettingsWidget::updateAddButtonMenu()
this, SLOT(cloneConfiguration()));
IBuildConfigurationFactory *factory = m_project->buildConfigurationFactory();
if (factory) {
- foreach (const QString &type, factory->availableCreationTypes()) {
- QAction *action = m_addButtonMenu->addAction(factory->displayNameForType(type), this, SLOT(createConfiguration()));
- action->setData(type);
+ foreach (const QString &id, factory->availableCreationIds()) {
+ QAction *action = m_addButtonMenu->addAction(factory->displayNameForId(id), this, SLOT(createConfiguration()));
+ action->setData(id);
}
}
}
diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.h b/src/plugins/projectexplorer/buildsettingspropertiespage.h
index 3635dfa432..5a805f3e77 100644
--- a/src/plugins/projectexplorer/buildsettingspropertiespage.h
+++ b/src/plugins/projectexplorer/buildsettingspropertiespage.h
@@ -62,7 +62,7 @@ class BuildSettingsPanel : public IPropertiesPanel
public:
BuildSettingsPanel(Project *project);
~BuildSettingsPanel();
- QString name() const;
+ QString displayName() const;
QWidget *widget() const;
QIcon icon() const;
diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h
index 29e77448c2..7f8ce3a1c7 100644
--- a/src/plugins/projectexplorer/buildstep.h
+++ b/src/plugins/projectexplorer/buildstep.h
@@ -88,7 +88,7 @@ public:
virtual void run(QFutureInterface<bool> &fi) = 0;
// The internal name
- virtual QString name() = 0;
+ virtual QString id() = 0;
// The name shown to the user
virtual QString displayName() = 0;
@@ -130,9 +130,9 @@ public:
IBuildStepFactory();
virtual ~IBuildStepFactory();
/// Called to check wheter this factory can restore the named BuildStep
- virtual bool canCreate(const QString &name) const = 0;
+ virtual bool canCreate(const QString &id) const = 0;
/// Called to restore a buildstep
- virtual BuildStep *create(BuildConfiguration *bc, const QString &name) const = 0;
+ virtual BuildStep *create(BuildConfiguration *bc, const QString &id) const = 0;
/// Called by the add BuildStep action to check which BuildSteps could be added
/// to the project by this factory, should return a list of names
virtual QStringList canCreateForBuildConfiguration(BuildConfiguration *bc) const = 0;
@@ -140,7 +140,7 @@ public:
/// Called to clone a BuildStep
virtual BuildStep *clone(BuildStep *bs, BuildConfiguration *bc) const = 0;
- virtual QString displayNameForName(const QString &name) const = 0;
+ virtual QString displayNameForId(const QString &id) const = 0;
};
class PROJECTEXPLORER_EXPORT BuildConfigWidget
diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp
index 47d75543a0..cc9798bc99 100644
--- a/src/plugins/projectexplorer/buildstepspage.cpp
+++ b/src/plugins/projectexplorer/buildstepspage.cpp
@@ -119,9 +119,9 @@ void BuildStepsPage::updateAddBuildStepMenu()
//Build up a list of possible steps and save map the display names to the (internal) name and factories.
QList<IBuildStepFactory *> factories = ExtensionSystem::PluginManager::instance()->getObjects<IBuildStepFactory>();
foreach (IBuildStepFactory *factory, factories) {
- QStringList names = factory->canCreateForBuildConfiguration(m_configuration);
- foreach (const QString &name, names) {
- map.insert(factory->displayNameForName(name), QPair<QString, IBuildStepFactory *>(name, factory));
+ QStringList ids = factory->canCreateForBuildConfiguration(m_configuration);
+ foreach (const QString &id, ids) {
+ map.insert(factory->displayNameForId(id), QPair<QString, IBuildStepFactory *>(id, factory));
}
}
diff --git a/src/plugins/projectexplorer/currentprojectfilter.h b/src/plugins/projectexplorer/currentprojectfilter.h
index aefc8f5818..e4b336fee5 100644
--- a/src/plugins/projectexplorer/currentprojectfilter.h
+++ b/src/plugins/projectexplorer/currentprojectfilter.h
@@ -51,8 +51,8 @@ class CurrentProjectFilter : public Locator::BaseFileFilter
public:
CurrentProjectFilter(ProjectExplorerPlugin *pe);
- QString trName() const { return tr("Files in current project"); }
- QString name() const { return "Files in current project"; }
+ QString displayName() const { return tr("Files in current project"); }
+ QString id() const { return "Files in current project"; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Low; }
void refresh(QFutureInterface<void> &future);
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index 14dcca1ad6..eef1bb28bd 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -252,7 +252,7 @@ CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Project *pro)
m_baseEnvironmentBase(CustomExecutableRunConfiguration::BuildEnvironmentBase)
{
m_workingDirectory = "$BUILDDIR";
- setName(tr("Custom Executable"));
+ setDisplayName(tr("Custom Executable"));
connect(pro, SIGNAL(activeBuildConfigurationChanged()),
this, SLOT(activeBuildConfigurationChanged()));
@@ -282,7 +282,7 @@ void CustomExecutableRunConfiguration::activeBuildConfigurationChanged()
}
}
-QString CustomExecutableRunConfiguration::type() const
+QString CustomExecutableRunConfiguration::id() const
{
return "ProjectExplorer.CustomExecutableRunConfiguration";
}
@@ -450,7 +450,7 @@ void CustomExecutableRunConfiguration::setExecutable(const QString &executable)
{
m_executable = executable;
if (!m_userSetName)
- setName(tr("Run %1").arg(m_executable));
+ setDisplayName(tr("Run %1").arg(m_executable));
emit changed();
}
@@ -482,11 +482,11 @@ void CustomExecutableRunConfiguration::setUserName(const QString &name)
if (name.isEmpty()) {
m_userName = name;
m_userSetName = false;
- setName(tr("Run %1").arg(m_executable));
+ setDisplayName(tr("Run %1").arg(m_executable));
} else {
m_userName = name;
m_userSetName = true;
- setName(name);
+ setDisplayName(name);
}
emit changed();
}
@@ -522,31 +522,31 @@ CustomExecutableRunConfigurationFactory::~CustomExecutableRunConfigurationFactor
}
// used to recreate the runConfigurations when restoring settings
-bool CustomExecutableRunConfigurationFactory::canRestore(const QString &type) const
+bool CustomExecutableRunConfigurationFactory::canRestore(const QString &id) const
{
- return type == "ProjectExplorer.CustomExecutableRunConfiguration";
+ return id == "ProjectExplorer.CustomExecutableRunConfiguration";
}
-RunConfiguration* CustomExecutableRunConfigurationFactory::create(Project *project, const QString &type)
+RunConfiguration* CustomExecutableRunConfigurationFactory::create(Project *project, const QString &id)
{
- if (type == "ProjectExplorer.CustomExecutableRunConfiguration") {
+ if (id == "ProjectExplorer.CustomExecutableRunConfiguration") {
RunConfiguration* rc = new CustomExecutableRunConfiguration(project);
- rc->setName(tr("Custom Executable"));
+ rc->setDisplayName(tr("Custom Executable"));
return rc;
} else {
return 0;
}
}
-QStringList CustomExecutableRunConfigurationFactory::availableCreationTypes(Project *pro) const
+QStringList CustomExecutableRunConfigurationFactory::availableCreationIds(Project *pro) const
{
Q_UNUSED(pro)
return QStringList()<< "ProjectExplorer.CustomExecutableRunConfiguration";
}
-QString CustomExecutableRunConfigurationFactory::displayNameForType(const QString &type) const
+QString CustomExecutableRunConfigurationFactory::displayNameForId(const QString &id) const
{
- if (type == "ProjectExplorer.CustomExecutableRunConfiguration")
+ if (id == "ProjectExplorer.CustomExecutableRunConfiguration")
return tr("Custom Executable");
else
return QString();
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.h b/src/plugins/projectexplorer/customexecutablerunconfiguration.h
index f6df16ae87..575ccc3936 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.h
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.h
@@ -61,7 +61,7 @@ class PROJECTEXPLORER_EXPORT CustomExecutableRunConfiguration : public LocalAppl
public:
CustomExecutableRunConfiguration(Project *pro);
~CustomExecutableRunConfiguration();
- virtual QString type() const;
+ virtual QString id() const;
/**
* Returns the executable, looks in the environment for it and might even
@@ -140,10 +140,10 @@ public:
CustomExecutableRunConfigurationFactory();
virtual ~CustomExecutableRunConfigurationFactory();
// used to recreate the runConfigurations when restoring settings
- virtual bool canRestore(const QString &type) const;
- virtual RunConfiguration* create(Project *project, const QString &type);
- QStringList availableCreationTypes(Project *pro) const;
- QString displayNameForType(const QString &type) const;
+ virtual bool canRestore(const QString &id) const;
+ virtual RunConfiguration* create(Project *project, const QString &id);
+ QStringList availableCreationIds(Project *pro) const;
+ QString displayNameForId(const QString &id) const;
};
namespace Internal {
diff --git a/src/plugins/projectexplorer/dependenciespanel.cpp b/src/plugins/projectexplorer/dependenciespanel.cpp
index c284c18bbe..b36f87ed70 100644
--- a/src/plugins/projectexplorer/dependenciespanel.cpp
+++ b/src/plugins/projectexplorer/dependenciespanel.cpp
@@ -103,7 +103,7 @@ QVariant DependenciesModel::data(const QModelIndex &index, int role) const
switch (role) {
case Qt::DisplayRole:
- return p->name();
+ return p->displayName();
case Qt::CheckStateRole:
return m_session->hasDependency(m_project, p) ? Qt::Checked : Qt::Unchecked;
case Qt::DecorationRole:
@@ -266,16 +266,16 @@ void DependenciesWidget::updateDetails()
foreach(Project *other, m_session->projects()) {
if (m_session->hasDependency(m_project, other)) {
- dependsOn.append(other->name());
+ dependsOn.append(other->displayName());
}
}
QString text;
if (dependsOn.isEmpty()) {
- text = tr("%1 has no dependencies.").arg(m_project->name());
+ text = tr("%1 has no dependencies.").arg(m_project->displayName());
} else if (dependsOn.count() == 1) {
- text =tr("%1 depends on %2.").arg(m_project->name(), dependsOn.first());
+ text =tr("%1 depends on %2.").arg(m_project->displayName(), dependsOn.first());
} else {
- text = tr("%1 depends on: %2.").arg(m_project->name(), dependsOn.join(QLatin1String(", ")));
+ text = tr("%1 depends on: %2.").arg(m_project->displayName(), dependsOn.join(QLatin1String(", ")));
}
m_detailsContainer->setSummaryText(text);
}
@@ -295,7 +295,7 @@ DependenciesPanel::~DependenciesPanel()
delete m_widget;
}
-QString DependenciesPanel::name() const
+QString DependenciesPanel::displayName() const
{
return QApplication::tr("Dependencies");
}
diff --git a/src/plugins/projectexplorer/dependenciespanel.h b/src/plugins/projectexplorer/dependenciespanel.h
index bb2697c9d1..fef72b97ca 100644
--- a/src/plugins/projectexplorer/dependenciespanel.h
+++ b/src/plugins/projectexplorer/dependenciespanel.h
@@ -65,7 +65,7 @@ class DependenciesPanel : public IPropertiesPanel
public:
DependenciesPanel(SessionManager *session, Project *project);
~DependenciesPanel();
- QString name() const;
+ QString displayName() const;
QWidget *widget() const;
QIcon icon() const;
diff --git a/src/plugins/projectexplorer/editorsettingspropertiespage.cpp b/src/plugins/projectexplorer/editorsettingspropertiespage.cpp
index 0df3c8e044..de8539510c 100644
--- a/src/plugins/projectexplorer/editorsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/editorsettingspropertiespage.cpp
@@ -59,7 +59,7 @@ EditorSettingsPanel::~EditorSettingsPanel()
delete m_widget;
}
-QString EditorSettingsPanel::name() const
+QString EditorSettingsPanel::displayName() const
{
return QApplication::tr("Editor Settings");
}
diff --git a/src/plugins/projectexplorer/editorsettingspropertiespage.h b/src/plugins/projectexplorer/editorsettingspropertiespage.h
index dfe497439e..2104c8dcc8 100644
--- a/src/plugins/projectexplorer/editorsettingspropertiespage.h
+++ b/src/plugins/projectexplorer/editorsettingspropertiespage.h
@@ -51,7 +51,7 @@ class EditorSettingsPanel : public IPropertiesPanel
public:
EditorSettingsPanel(Project *project);
~EditorSettingsPanel();
- QString name() const;
+ QString displayName() const;
QWidget *widget() const;
QIcon icon() const;
diff --git a/src/plugins/projectexplorer/iprojectproperties.h b/src/plugins/projectexplorer/iprojectproperties.h
index 1311a60293..fe2d7f8759 100644
--- a/src/plugins/projectexplorer/iprojectproperties.h
+++ b/src/plugins/projectexplorer/iprojectproperties.h
@@ -45,7 +45,7 @@ public:
virtual ~IPropertiesPanel()
{ }
- virtual QString name() const = 0;
+ virtual QString displayName() const = 0;
virtual QIcon icon() const = 0;
virtual QWidget *widget() const = 0;
};
diff --git a/src/plugins/projectexplorer/pluginfilefactory.cpp b/src/plugins/projectexplorer/pluginfilefactory.cpp
index b135ce6a6f..4c128acb4c 100644
--- a/src/plugins/projectexplorer/pluginfilefactory.cpp
+++ b/src/plugins/projectexplorer/pluginfilefactory.cpp
@@ -46,7 +46,6 @@ using namespace ProjectExplorer::Internal;
ProjectFileFactory::ProjectFileFactory(IProjectManager *manager)
: m_mimeTypes(manager->mimeType()),
- m_kind(Constants::FILE_FACTORY_KIND),
m_manager(manager)
{
}
@@ -56,9 +55,14 @@ QStringList ProjectFileFactory::mimeTypes() const
return m_mimeTypes;
}
-QString ProjectFileFactory::kind() const
+QString ProjectFileFactory::id() const
{
- return m_kind;
+ return QLatin1String(Constants::FILE_FACTORY_ID);
+}
+
+QString ProjectFileFactory::displayName() const
+{
+ return tr("Project File Factory", "ProjectExplorer::ProjectFileFactory display name.");
}
Core::IFile *ProjectFileFactory::open(const QString &fileName)
diff --git a/src/plugins/projectexplorer/pluginfilefactory.h b/src/plugins/projectexplorer/pluginfilefactory.h
index 59bd84cf8b..66eee7f5f3 100644
--- a/src/plugins/projectexplorer/pluginfilefactory.h
+++ b/src/plugins/projectexplorer/pluginfilefactory.h
@@ -53,14 +53,15 @@ class ProjectFileFactory : public Core::IFileFactory
public:
virtual QStringList mimeTypes() const;
bool canOpen(const QString &fileName);
- QString kind() const;
+ QString id() const;
+ QString displayName() const;
+
Core::IFile *open(const QString &fileName);
static QList<ProjectFileFactory*> createFactories(QString *filterString);
private:
const QStringList m_mimeTypes;
- const QString m_kind;
ProjectExplorer::IProjectManager *m_manager;
};
diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp
index 85e8b8570e..910bece73d 100644
--- a/src/plugins/projectexplorer/processstep.cpp
+++ b/src/plugins/projectexplorer/processstep.cpp
@@ -83,12 +83,12 @@ void ProcessStep::run(QFutureInterface<bool> & fi)
return AbstractProcessStep::run(fi);
}
-QString ProcessStep::name()
+QString ProcessStep::id()
{
return "projectexplorer.processstep";
}
-void ProcessStep::restoreFromGlobalMap(const QMap<QString, QVariant> &map)
+void ProcessStep::restoreFromGlobalMap(const QVariantMap &map)
{
QMap<QString, QVariant>::const_iterator it = map.constFind("ProjectExplorer.ProcessStep.DisplayName");
if (it != map.constEnd())
@@ -96,7 +96,7 @@ void ProcessStep::restoreFromGlobalMap(const QMap<QString, QVariant> &map)
ProjectExplorer::AbstractProcessStep::restoreFromGlobalMap(map);
}
-void ProcessStep::restoreFromLocalMap(const QMap<QString, QVariant> &map)
+void ProcessStep::restoreFromLocalMap(const QVariantMap &map)
{
// TODO checking for PROCESS_*
setCommand(map.value(PROCESS_COMMAND).toString());
@@ -111,7 +111,7 @@ void ProcessStep::restoreFromLocalMap(const QMap<QString, QVariant> &map)
ProjectExplorer::AbstractProcessStep::restoreFromLocalMap(map);
}
-void ProcessStep::storeIntoLocalMap(QMap<QString, QVariant> &map)
+void ProcessStep::storeIntoLocalMap(QVariantMap &map)
{
map[PROCESS_COMMAND] = command();
map[PROCESS_WORKINGDIRECTORY] = workingDirectory();
@@ -197,14 +197,14 @@ ProcessStepFactory::ProcessStepFactory()
}
-bool ProcessStepFactory::canCreate(const QString &name) const
+bool ProcessStepFactory::canCreate(const QString &id) const
{
- return name == "projectexplorer.processstep";
+ return id == "projectexplorer.processstep";
}
-BuildStep *ProcessStepFactory::create(BuildConfiguration *bc, const QString &name) const
+BuildStep *ProcessStepFactory::create(BuildConfiguration *bc, const QString &id) const
{
- Q_UNUSED(name)
+ Q_UNUSED(id)
return new ProcessStep(bc);
}
@@ -218,9 +218,9 @@ QStringList ProcessStepFactory::canCreateForBuildConfiguration(BuildConfiguratio
Q_UNUSED(bc)
return QStringList()<<"projectexplorer.processstep";
}
-QString ProcessStepFactory::displayNameForName(const QString &name) const
+QString ProcessStepFactory::displayNameForId(const QString &id) const
{
- Q_UNUSED(name)
+ Q_UNUSED(id)
return ProcessStep::tr("Custom Process Step", "item in combobox");
}
@@ -261,7 +261,7 @@ void ProcessStepConfigWidget::updateDetails()
QString ProcessStepConfigWidget::displayName() const
{
- return m_step->name();
+ return m_step->displayName();
}
void ProcessStepConfigWidget::init()
diff --git a/src/plugins/projectexplorer/processstep.h b/src/plugins/projectexplorer/processstep.h
index 801ba25894..7032f0d891 100644
--- a/src/plugins/projectexplorer/processstep.h
+++ b/src/plugins/projectexplorer/processstep.h
@@ -44,11 +44,11 @@ class ProcessStepFactory : public IBuildStepFactory
{
public:
ProcessStepFactory();
- virtual bool canCreate(const QString &name) const;
- virtual BuildStep *create(BuildConfiguration *bc, const QString &name) const;
+ virtual bool canCreate(const QString &id) const;
+ virtual BuildStep *create(BuildConfiguration *bc, const QString &id) const;
virtual BuildStep *clone(BuildStep *bs, BuildConfiguration *bc) const;
virtual QStringList canCreateForBuildConfiguration(BuildConfiguration *pro) const;
- virtual QString displayNameForName(const QString &name) const;
+ virtual QString displayNameForId(const QString &id) const;
};
class ProcessStep : public ProjectExplorer::AbstractProcessStep
@@ -60,7 +60,7 @@ public:
virtual bool init();
virtual void run(QFutureInterface<bool> &);
- virtual QString name();
+ virtual QString id();
void setDisplayName(const QString &name);
virtual QString displayName();
virtual BuildStepConfigWidget *createConfigWidget();
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp
index 33a8582a5b..f246b09d99 100644
--- a/src/plugins/projectexplorer/project.cpp
+++ b/src/plugins/projectexplorer/project.cpp
@@ -158,7 +158,7 @@ void Project::saveSettingsImpl(PersistentSettingsWriter &writer)
for(int i=0; i < bcs.size(); ++i) {
QStringList buildStepNames;
foreach (BuildStep *buildStep, bcs.at(i)->buildSteps())
- buildStepNames << buildStep->name();
+ buildStepNames << buildStep->displayName();
writer.saveValue("buildconfiguration-" + QString::number(i) + "-buildsteps", buildStepNames);
int buildstepnr = 0;
@@ -174,7 +174,7 @@ void Project::saveSettingsImpl(PersistentSettingsWriter &writer)
for(int i=0; i < bcs.size(); ++i) {
QStringList cleanStepNames;
foreach (BuildStep *cleanStep, bcs.at(i)->cleanSteps())
- cleanStepNames << cleanStep->name();
+ cleanStepNames << cleanStep->displayName();
writer.saveValue("buildconfiguration-" + QString::number(i) + "-cleansteps", cleanStepNames);
int cleanstepnr = 0;
@@ -191,7 +191,7 @@ void Project::saveSettingsImpl(PersistentSettingsWriter &writer)
int activeId = 0;
foreach (RunConfiguration* rc, m_runConfigurations) {
writer.setPrefix("RunConfiguration" + QString().setNum(i) + "-");
- writer.saveValue("type", rc->type());
+ writer.saveValue("Id", rc->id());
rc->save(writer);
if (rc == m_activeRunConfiguration)
activeId = i;
@@ -358,13 +358,13 @@ bool Project::restoreSettingsImpl(PersistentSettingsReader &reader)
ExtensionSystem::PluginManager::instance()->getObjects<IRunConfigurationFactory>();
forever {
reader.setPrefix("RunConfiguration" + QString().setNum(i) + "-");
- const QVariant &typeVariant = reader.restoreValue("type");
- if (!typeVariant.isValid())
+ const QVariant &idVariant = reader.restoreValue("Id");
+ if (!idVariant.isValid())
break;
- const QString &type = typeVariant.toString();
+ const QString &id = idVariant.toString();
foreach (IRunConfigurationFactory *factory, factories) {
- if (factory->canRestore(type)) {
- RunConfiguration* rc = factory->create(this, type);
+ if (factory->canRestore(id)) {
+ RunConfiguration* rc = factory->create(this, id);
rc->restore(reader);
addRunConfiguration(rc);
if (i == activeId)
@@ -405,17 +405,17 @@ QList<RunConfiguration *> Project::runConfigurations() const
void Project::addRunConfiguration(RunConfiguration* runConfiguration)
{
if (m_runConfigurations.contains(runConfiguration)) {
- qWarning()<<"Not adding already existing runConfiguration"<<runConfiguration->name();
+ qWarning()<<"Not adding already existing runConfiguration"<<runConfiguration->displayName();
return;
}
m_runConfigurations.push_back(runConfiguration);
- emit addedRunConfiguration(this, runConfiguration->name());
+ emit addedRunConfiguration(this, runConfiguration->displayName());
}
void Project::removeRunConfiguration(RunConfiguration* runConfiguration)
{
if(!m_runConfigurations.contains(runConfiguration)) {
- qWarning()<<"Not removing runConfiguration"<<runConfiguration->name()<<"becasue it doesn't exist";
+ qWarning()<<"Not removing runConfiguration"<<runConfiguration->displayName()<<"becasue it doesn't exist";
return;
}
@@ -429,7 +429,7 @@ void Project::removeRunConfiguration(RunConfiguration* runConfiguration)
}
m_runConfigurations.removeOne(runConfiguration);
- emit removedRunConfiguration(this, runConfiguration->name());
+ emit removedRunConfiguration(this, runConfiguration->displayName());
delete runConfiguration;
}
diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h
index 21cd21f3d9..730c1762db 100644
--- a/src/plugins/projectexplorer/project.h
+++ b/src/plugins/projectexplorer/project.h
@@ -73,7 +73,7 @@ public:
Project();
virtual ~Project();
- virtual QString name() const = 0;
+ virtual QString displayName() const = 0;
virtual Core::IFile *file() const = 0;
virtual IProjectManager *projectManager() const = 0;
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 4e71f4a063..48d526e6dd 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -256,8 +256,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
pecontext << core->uniqueIDManager()->uniqueIdentifier(Constants::C_PROJECTEXPLORER);
Core::BaseMode *mode = new Core::BaseMode;
- mode->setName(tr("Projects"));
- mode->setUniqueModeName(Constants::MODE_SESSION);
+ mode->setDisplayName(tr("Projects"));
+ mode->setId(QLatin1String(Constants::MODE_SESSION));
mode->setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Project.png")));
mode->setPriority(Constants::P_MODE_SESSION);
mode->setWidget(d->m_proWindow);
@@ -854,7 +854,7 @@ void ProjectExplorerPlugin::unloadProject()
if (!success)
return;
- addToRecentProjects(fi->fileName(), d->m_currentProject->name());
+ addToRecentProjects(fi->fileName(), d->m_currentProject->displayName());
d->m_session->removeProject(d->m_currentProject);
updateActions();
}
@@ -983,7 +983,7 @@ bool ProjectExplorerPlugin::openProject(const QString &fileName)
QList<Project *> list = openProjects(QStringList() << fileName);
if (!list.isEmpty()) {
- addToRecentProjects(fileName, list.first()->name());
+ addToRecentProjects(fileName, list.first()->displayName());
return true;
}
return false;
@@ -1052,7 +1052,7 @@ Project *ProjectExplorerPlugin::currentProject() const
{
if (debug) {
if (d->m_currentProject)
- qDebug() << "ProjectExplorerPlugin::currentProject returns " << d->m_currentProject->name();
+ qDebug() << "ProjectExplorerPlugin::currentProject returns " << d->m_currentProject->displayName();
else
qDebug() << "ProjectExplorerPlugin::currentProject returns 0";
}
@@ -1290,7 +1290,7 @@ void ProjectExplorerPlugin::setCurrent(Project *project, QString filePath, Node
{
if (debug)
qDebug() << "ProjectExplorer - setting path to " << (node ? node->path() : filePath)
- << " and project to " << (project ? project->name() : "0");
+ << " and project to " << (project ? project->displayName() : "0");
if (node)
filePath = node->path();
@@ -1327,12 +1327,12 @@ void ProjectExplorerPlugin::setCurrent(Project *project, QString filePath, Node
if (projectChanged || d->m_currentNode != node) {
d->m_currentNode = node;
if (debug)
- qDebug() << "ProjectExplorer - currentNodeChanged(" << (node ? node->path() : "0") << ", " << (project ? project->name() : "0") << ")";
+ qDebug() << "ProjectExplorer - currentNodeChanged(" << (node ? node->path() : "0") << ", " << (project ? project->displayName() : "0") << ")";
emit currentNodeChanged(d->m_currentNode, project);
}
if (projectChanged) {
if (debug)
- qDebug() << "ProjectExplorer - currentProjectChanged(" << (project ? project->name() : "0") << ")";
+ qDebug() << "ProjectExplorer - currentProjectChanged(" << (project ? project->displayName() : "0") << ")";
emit currentProjectChanged(project);
updateActions();
}
@@ -1350,7 +1350,7 @@ void ProjectExplorerPlugin::updateActions()
&& d->m_currentProject->hasBuildSettings();
bool hasProjects = !d->m_session->projects().isEmpty();
bool building = d->m_buildManager->isBuilding();
- QString projectName = d->m_currentProject ? d->m_currentProject->name() : QString();
+ QString projectName = d->m_currentProject ? d->m_currentProject->displayName() : QString();
if (debug)
qDebug() << "BuildManager::isBuilding()" << building;
@@ -1753,7 +1753,7 @@ void ProjectExplorerPlugin::openRecentProject()
void ProjectExplorerPlugin::invalidateProject(Project *project)
{
if (debug)
- qDebug() << "ProjectExplorerPlugin::invalidateProject" << project->name();
+ qDebug() << "ProjectExplorerPlugin::invalidateProject" << project->displayName();
if (d->m_currentProject == project) {
//
// Workaround for a bug in QItemSelectionModel
@@ -1817,7 +1817,7 @@ void ProjectExplorerPlugin::addExistingFiles()
projectNode->addFiles(type, fileTypeToFiles.values(type), &notAdded);
}
if (!notAdded.isEmpty()) {
- QString message = tr("Could not add following files to project %1:\n").arg(projectNode->name());
+ QString message = tr("Could not add following files to project %1:\n").arg(projectNode->displayName());
QString files = notAdded.join("\n");
QMessageBox::warning(core->mainWindow(), tr("Add files to project failed"),
message + files);
@@ -1830,7 +1830,7 @@ void ProjectExplorerPlugin::addExistingFiles()
const QString files = fileNames.join(QString(QLatin1Char('\n')));
QMessageBox::StandardButton button =
QMessageBox::question(core->mainWindow(), tr("Add to Version Control"),
- tr("Add files\n%1\nto version control (%2)?").arg(files, vcManager->name()),
+ tr("Add files\n%1\nto version control (%2)?").arg(files, vcManager->displayName()),
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
QStringList notAddedToVc;
@@ -1840,7 +1840,7 @@ void ProjectExplorerPlugin::addExistingFiles()
}
if (!notAddedToVc.isEmpty()) {
- const QString message = tr("Could not add following files to version control (%1)\n").arg(vcManager->name());
+ const QString message = tr("Could not add following files to version control (%1)\n").arg(vcManager->displayName());
const QString filesNotAdded = notAddedToVc.join(QString(QLatin1Char('\n')));
QMessageBox::warning(core->mainWindow(), tr("Add files to version control failed"),
message + filesNotAdded);
@@ -1944,7 +1944,7 @@ void ProjectExplorerPlugin::removeFile()
if (!projectNode->removeFiles(fileNode->fileType(), QStringList(filePath))) {
QMessageBox::warning(core->mainWindow(), tr("Remove file failed"),
- tr("Could not remove file %1 from project %2.").arg(filePath).arg(projectNode->name()));
+ tr("Could not remove file %1 from project %2.").arg(filePath).arg(projectNode->displayName()));
return;
}
@@ -2029,14 +2029,14 @@ void ProjectExplorerPlugin::populateRunConfigurationMenu()
foreach (const Project *pro, d->m_session->projects()) {
foreach (RunConfiguration *runConfiguration, pro->runConfigurations()) {
- const QString title = QString("%1 (%2)").arg(pro->name(), runConfiguration->name());
+ const QString title = QString("%1 (%2)").arg(pro->displayName(), runConfiguration->displayName());
QAction *act = new QAction(title, d->m_runConfigurationActionGroup);
act->setCheckable(true);
act->setData(qVariantFromValue(runConfiguration));
act->setChecked(runConfiguration == activeRunConfiguration);
d->m_runConfigurationMenu->addAction(act);
if (debug)
- qDebug() << "RunConfiguration" << runConfiguration << "project:" << pro->name()
+ qDebug() << "RunConfiguration" << runConfiguration << "project:" << pro->displayName()
<< "active:" << (runConfiguration == activeRunConfiguration);
}
}
@@ -2074,7 +2074,7 @@ void ProjectExplorerPlugin::populateOpenWithMenu()
// Add all suitable editors
foreach (Core::IEditorFactory *editorFactory, factories) {
// Add action to open with this very editor factory
- QString const actionTitle = qApp->translate("OpenWith::Editors", editorFactory->kind().toAscii());
+ QString const actionTitle = editorFactory->displayName();
QAction * const action = d->m_openWithMenu->addAction(actionTitle);
action->setData(qVariantFromValue(editorFactory));
// File already open in an editor -> only enable that entry since
@@ -2082,7 +2082,7 @@ void ProjectExplorerPlugin::populateOpenWithMenu()
if (!editorsOpenForFile.isEmpty()) {
bool enabled = false;
foreach (Core::IEditor * const openEditor, editorsOpenForFile) {
- if (editorFactory->kind() == QLatin1String(openEditor->kind()))
+ if (editorFactory->id() == openEditor->id())
enabled = true;
break;
}
@@ -2091,7 +2091,7 @@ void ProjectExplorerPlugin::populateOpenWithMenu()
} // for editor factories
// Add all suitable external editors
foreach (Core::IExternalEditor *externalEditor, externalEditors) {
- QAction * const action = d->m_openWithMenu->addAction(qApp->translate("OpenWith::Editors", externalEditor->kind().toAscii()));
+ QAction * const action = d->m_openWithMenu->addAction(externalEditor->displayName());
action->setData(qVariantFromValue(externalEditor));
}
} // matches
@@ -2109,13 +2109,13 @@ void ProjectExplorerPlugin::openWithMenuTriggered(QAction *action)
const QVariant data = action->data();
if (qVariantCanConvert<Core::IEditorFactory *>(data)) {
Core::IEditorFactory *factory = qVariantValue<Core::IEditorFactory *>(data);
- em->openEditor(currentNode()->path(), factory->kind());
+ em->openEditor(currentNode()->path(), factory->id());
em->ensureEditorManagerVisible();
return;
}
if (qVariantCanConvert<Core::IExternalEditor *>(data)) {
Core::IExternalEditor *externalEditor = qVariantValue<Core::IExternalEditor *>(data);
- em->openExternalEditor(currentNode()->path(), externalEditor->kind());
+ em->openExternalEditor(currentNode()->path(), externalEditor->id());
}
}
@@ -2205,7 +2205,7 @@ BuildConfigDialog::BuildConfigDialog(Project *project, QWidget *parent)
QFormLayout *formlayout = new QFormLayout;
formlayout->addRow(ActiveConfigurationWidget::tr("Active run configuration"),
// ^ avoiding a new translatable string for active run configuration
- new QLabel(activeRun->name()));
+ new QLabel(activeRun->displayName()));
formlayout->addRow(tr("Choose build configuration:"), m_configCombo);
vlayout->addLayout(formlayout);
vlayout->addWidget(buttonBox);
diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h
index b3a1b6145f..cb3080bf2b 100644
--- a/src/plugins/projectexplorer/projectexplorerconstants.h
+++ b/src/plugins/projectexplorer/projectexplorerconstants.h
@@ -141,8 +141,8 @@ const char * const G_FILE_OPEN = "ProjectFile.Group.Open";
const char * const G_FILE_OTHER = "ProjectFile.Group.Other";
const char * const G_FILE_CONFIG = "ProjectFile.Group.Config";
-// file kind
-const char * const FILE_FACTORY_KIND = "ProjectExplorer.FileFactoryKind";
+// file id
+const char * const FILE_FACTORY_ID = "ProjectExplorer.FileFactoryId";
// wizard kind
const char * const WIZARD_TYPE_PROJECT = "ProjectExplorer.WizardType.Project";
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.cpp b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
index 1a3a22831e..157a8b2921 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.cpp
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
@@ -122,7 +122,7 @@ QString ProjectExplorerSettingsPage::id() const
return QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_ID);
}
-QString ProjectExplorerSettingsPage::trName() const
+QString ProjectExplorerSettingsPage::displayName() const
{
return tr("General");
}
@@ -132,7 +132,7 @@ QString ProjectExplorerSettingsPage::category() const
return QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
}
-QString ProjectExplorerSettingsPage::trCategory() const
+QString ProjectExplorerSettingsPage::displayCategory() const
{
return tr("Projects");
}
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.h b/src/plugins/projectexplorer/projectexplorersettingspage.h
index f2888f5c8e..7191a2497b 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.h
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.h
@@ -72,9 +72,9 @@ public:
ProjectExplorerSettingsPage();
virtual QString id() const;
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp
index ac5e65f207..5e6b7e575d 100644
--- a/src/plugins/projectexplorer/projectfilewizardextension.cpp
+++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp
@@ -118,7 +118,7 @@ void ProjectFileWizardExtension::firstExtensionPageShown(const QList<Core::Gener
const bool canAddToVCS = m_context->versionControl && m_context->versionControl->supportsOperation(Core::IVersionControl::AddOperation);
if (m_context->versionControl)
- m_context->page->setVCSDisplay(m_context->versionControl->name());
+ m_context->page->setVCSDisplay(m_context->versionControl->displayName());
m_context->page->setAddToVersionControlEnabled(canAddToVCS);
}
diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp
index dea024776c..de589580fd 100644
--- a/src/plugins/projectexplorer/projectmodels.cpp
+++ b/src/plugins/projectexplorer/projectmodels.cpp
@@ -86,8 +86,8 @@ bool sortNodes(Node *n1, Node *n2)
ProjectNode *project1 = static_cast<ProjectNode*>(n1);
ProjectNode *project2 = static_cast<ProjectNode*>(n2);
- if (project1->name() != project2->name())
- return project1->name() < project2->name(); // sort by name
+ if (project1->displayName() != project2->displayName())
+ return project1->displayName() < project2->displayName(); // sort by name
else
return project1 < project2; // sort by pointer value
} else {
@@ -102,8 +102,8 @@ bool sortNodes(Node *n1, Node *n2)
FolderNode *folder1 = static_cast<FolderNode*>(n1);
FolderNode *folder2 = static_cast<FolderNode*>(n2);
- if (folder1->name() != folder2->name())
- return folder1->name() < folder2->name();
+ if (folder1->displayName() != folder2->displayName())
+ return folder1->displayName() < folder2->displayName();
else
return folder1 < folder2;
} else {
@@ -228,7 +228,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
case Qt::DisplayRole:
case Qt::EditRole: {
if (folderNode)
- result = folderNode->name();
+ result = folderNode->displayName();
else
result = QFileInfo(node->path()).fileName(); //TODO cache that?
break;
diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp
index 7b7b54cf38..56d81627ca 100644
--- a/src/plugins/projectexplorer/projectnodes.cpp
+++ b/src/plugins/projectexplorer/projectnodes.cpp
@@ -172,7 +172,7 @@ FolderNode::~FolderNode()
\see setFolderName()
*/
-QString FolderNode::name() const
+QString FolderNode::displayName() const
{
return m_folderName;
}
@@ -559,7 +559,7 @@ bool ProjectNode::sortNodesByPath(Node *n1, Node *n2) {
bool ProjectNode::sortFolderNodesByName(FolderNode *f1, FolderNode *f2)
{
- return f1->name() < f2->name();
+ return f1->displayName() < f2->displayName();
}
/*!
diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h
index cfd0d7ca49..422a113b42 100644
--- a/src/plugins/projectexplorer/projectnodes.h
+++ b/src/plugins/projectexplorer/projectnodes.h
@@ -128,7 +128,7 @@ public:
explicit FolderNode(const QString &folderPath);
virtual ~FolderNode();
- QString name() const;
+ QString displayName() const;
QIcon icon() const;
QList<FileNode*> fileNodes() const;
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp
index f76df79020..72a5561dc7 100644
--- a/src/plugins/projectexplorer/projecttreewidget.cpp
+++ b/src/plugins/projectexplorer/projecttreewidget.cpp
@@ -247,7 +247,7 @@ void ProjectTreeWidget::editCurrentItem()
void ProjectTreeWidget::setCurrentItem(Node *node, Project *project)
{
if (debug)
- qDebug() << "ProjectTreeWidget::setCurrentItem(" << (project ? project->name() : "0")
+ qDebug() << "ProjectTreeWidget::setCurrentItem(" << (project ? project->displayName() : "0")
<< ", " << (node ? node->path() : "0") << ")";
if (!project) {
return;
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index 891627462b..1812a5e9fd 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -252,7 +252,7 @@ ActiveConfigurationWidget::ActiveConfigurationWidget(QWidget *parent)
foreach(Project *p, session->projects()) {
++i;
BuildConfigurationComboBox *buildConfigurationComboBox = new BuildConfigurationComboBox(p, this);
- QLabel *label = new QLabel("Build configuration for <b>" + p->name() + "</b>", this);
+ QLabel *label = new QLabel("Build configuration for <b>" + p->displayName() + "</b>", this);
grid->addWidget(label, i, 0);
grid->addWidget(buildConfigurationComboBox, i, 1);
m_buildComboBoxMap.insert(p, qMakePair(buildConfigurationComboBox, label));
@@ -270,7 +270,7 @@ void ActiveConfigurationWidget::projectAdded(Project *p)
{
QGridLayout *grid = static_cast<QGridLayout *>(layout());
BuildConfigurationComboBox *buildConfigurationComboBox = new BuildConfigurationComboBox(p, this);
- QLabel *label = new QLabel("Build configuration for <b>" + p->name() + "</b>");
+ QLabel *label = new QLabel("Build configuration for <b>" + p->displayName() + "</b>");
grid->addWidget(label);
grid->addWidget(buildConfigurationComboBox);
m_buildComboBoxMap.insert(p, qMakePair(buildConfigurationComboBox, label));
@@ -310,7 +310,7 @@ RunConfigurationComboBox::RunConfigurationComboBox(QWidget *parent)
// Connect
foreach(Project *p, session->projects()) {
foreach(RunConfiguration *rc, p->runConfigurations()) {
- connect(rc, SIGNAL(nameChanged()), this, SLOT(rebuildTree()));
+ connect(rc, SIGNAL(displayNameChanged()), this, SLOT(rebuildTree()));
}
connectToProject(p);
}
@@ -411,13 +411,13 @@ void RunConfigurationComboBox::addedRunConfiguration(ProjectExplorer::Project *p
{
RunConfiguration *runConfiguration = 0;
foreach(RunConfiguration *rc, p->runConfigurations()) {
- if (rc->name() == name) {
+ if (rc->displayName() == name) {
runConfiguration = rc;
break;
}
}
if (runConfiguration) {
- connect(runConfiguration, SIGNAL(nameChanged()),
+ connect(runConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(rebuildTree()));
}
rebuildTree();
@@ -434,7 +434,7 @@ void RunConfigurationComboBox::projectAdded(ProjectExplorer::Project *p)
{
rebuildTree();
foreach(RunConfiguration *rc, p->runConfigurations())
- connect(rc, SIGNAL(nameChanged()), this, SLOT(rebuildTree()));
+ connect(rc, SIGNAL(displayNameChanged()), this, SLOT(rebuildTree()));
connectToProject(p);
}
@@ -472,9 +472,9 @@ void RunConfigurationComboBox::rebuildTree()
SessionManager *session = ProjectExplorer::ProjectExplorerPlugin::instance()->session();
Project *startupProject = session->startupProject();
foreach(Project *p, session->projects()) {
- addItem(p->name(), QVariant(0));
+ addItem(p->displayName(), QVariant(0));
foreach(RunConfiguration *rc, p->runConfigurations()) {
- addItem(" " + rc->name(), QVariant(1));
+ addItem(" " + rc->displayName(), QVariant(1));
if ((startupProject == p) && (p->activeRunConfiguration() == rc)){
setCurrentIndex(count() - 1);
}
@@ -613,7 +613,7 @@ ProjectLabel::~ProjectLabel()
void ProjectLabel::setProject(ProjectExplorer::Project *p)
{
if (p)
- setText(tr("Edit Project Settings for Project <b>%1</b>").arg(p->name()));
+ setText(tr("Edit Project Settings for Project <b>%1</b>").arg(p->displayName()));
else
setText(tr("No Project loaded"));
}
@@ -634,7 +634,7 @@ ProjectPushButton::ProjectPushButton(QWidget *parent)
SessionManager *session = ProjectExplorerPlugin::instance()->session();
foreach(Project *p, session->projects()) {
- QAction *act = m_menu->addAction(p->name());
+ QAction *act = m_menu->addAction(p->displayName());
act->setData(QVariant::fromValue((void *) p));
connect(act, SIGNAL(triggered()),
this, SLOT(actionTriggered()));
@@ -655,7 +655,7 @@ ProjectPushButton::~ProjectPushButton()
void ProjectPushButton::projectAdded(ProjectExplorer::Project *p)
{
- QAction *act = m_menu->addAction(p->name());
+ QAction *act = m_menu->addAction(p->displayName());
act->setData(QVariant::fromValue((void *) p));
connect(act, SIGNAL(triggered()),
this, SLOT(actionTriggered()));
@@ -824,7 +824,7 @@ void ProjectWindow::showProperties(Project *project)
foreach (IPanelFactory *panelFactory, pages) {
if (panelFactory->supports(project)) {
IPropertiesPanel *panel = panelFactory->createPanel(project);
- m_panelsWidget->addWidget(panel->name(), panel->widget(), panel->icon());
+ m_panelsWidget->addWidget(panel->displayName(), panel->widget(), panel->icon());
m_panels.push_back(panel);
}
}
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 50d5ff05b7..ca11b487f8 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -28,6 +28,7 @@
**************************************************************************/
#include "runconfiguration.h"
+
#include "project.h"
#include "persistentsettings.h"
#include "buildconfiguration.h"
@@ -38,8 +39,6 @@
#include <Carbon/Carbon.h>
#endif
-#include <QtDebug>
-
using namespace ProjectExplorer;
// RunConfiguration
@@ -67,27 +66,27 @@ bool RunConfiguration::isEnabled() const
return isEnabled(m_project->activeBuildConfiguration());
}
-QString RunConfiguration::name() const
+QString RunConfiguration::displayName() const
{
- return m_name;
+ return m_displayName;
}
-void RunConfiguration::setName(const QString &name)
+void RunConfiguration::setDisplayName(const QString &name)
{
- m_name = name;
- emit nameChanged();
+ m_displayName = name;
+ emit displayNameChanged();
}
void RunConfiguration::save(PersistentSettingsWriter &writer) const
{
- writer.saveValue("RunConfiguration.name", m_name);
+ writer.saveValue("RunConfiguration.name", m_displayName);
}
void RunConfiguration::restore(const PersistentSettingsReader &reader)
{
QVariant var = reader.restoreValue("RunConfiguration.name");
if (var.isValid() && !var.toString().isEmpty())
- m_name = var.toString();
+ m_displayName = var.toString();
}
@@ -113,7 +112,7 @@ RunControl::RunControl(RunConfiguration *runConfiguration)
: m_runConfiguration(runConfiguration)
{
if (runConfiguration)
- m_displayName = runConfiguration->name();
+ m_displayName = runConfiguration->displayName();
}
RunControl::~RunControl()
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index 1179b14105..51cdc2ac6f 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -71,10 +71,10 @@ public:
Project *project() const;
// The type of this RunConfiguration, e.g. "ProjectExplorer.LocalApplicationRunConfiguration"
- virtual QString type() const = 0;
+ virtual QString id() const = 0;
// Name shown to the user
- QString name() const;
- void setName(const QString &name);
+ QString displayName() const;
+ void setDisplayName(const QString &name);
virtual bool isEnabled(BuildConfiguration *) const { return true; }
bool isEnabled() const;
@@ -86,17 +86,17 @@ public:
virtual void save(PersistentSettingsWriter &writer) const;
virtual void restore(const PersistentSettingsReader &reader);
signals:
- void nameChanged();
+ void displayNameChanged();
private:
QPointer<Project> m_project;
- QString m_name;
+ QString m_displayName;
};
/* The run configuration factory is used for restoring run configurations from
* settings. And used to create new runconfigurations in the "Run Settings" Dialog.
* For the first case bool canRestore(const QString &type) and
* RunConfiguration* create(Project *project, QString type) are used.
- * For the second type the functions QStringList availableCreationTypes(Project *pro) and
+ * For the second type the functions QStringList availableCreationIds(Project *pro) and
* QString displayNameForType(const QString&) are used to generate a list of creatable
* RunConfigurations, and create(..) is used to create it.
*/
@@ -107,13 +107,13 @@ public:
explicit IRunConfigurationFactory(QObject *parent = 0);
virtual ~IRunConfigurationFactory();
// used to recreate the runConfigurations when restoring settings
- virtual bool canRestore(const QString &type) const = 0;
+ virtual bool canRestore(const QString &id) const = 0;
// used to show the list of possible additons to a project, returns a list of types
- virtual QStringList availableCreationTypes(Project *pro) const = 0;
+ virtual QStringList availableCreationIds(Project *pro) const = 0;
// used to translate the types to names to display to the user
- virtual QString displayNameForType(const QString &type) const = 0;
+ virtual QString displayNameForId(const QString &id) const = 0;
// used to create a run configuration from scratch
- virtual RunConfiguration* create(Project *project, const QString &type) = 0;
+ virtual RunConfiguration* create(Project *project, const QString &id) = 0;
};
class PROJECTEXPLORER_EXPORT IRunControlFactory : public QObject
diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.cpp b/src/plugins/projectexplorer/runsettingspropertiespage.cpp
index ccccca85dd..db8cd24809 100644
--- a/src/plugins/projectexplorer/runsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/runsettingspropertiespage.cpp
@@ -44,16 +44,16 @@
namespace ProjectExplorer {
namespace Internal {
-struct FactoryAndType
+struct FactoryAndId
{
ProjectExplorer::IRunConfigurationFactory *factory;
- QString type;
+ QString id;
};
} // namespace Internal
} // namespace ProjectExplorer
-Q_DECLARE_METATYPE(ProjectExplorer::Internal::FactoryAndType);
+Q_DECLARE_METATYPE(ProjectExplorer::Internal::FactoryAndId);
namespace ProjectExplorer {
namespace Internal {
@@ -72,7 +72,7 @@ public:
void setRunConfigurations(const QList<RunConfiguration *> &runConfigurations);
QList<RunConfiguration *> runConfigurations() const { return m_runConfigurations; }
- void nameChanged(RunConfiguration *rc);
+ void displayNameChanged(RunConfiguration *rc);
private:
QList<RunConfiguration *> m_runConfigurations;
@@ -114,7 +114,7 @@ RunSettingsPanel::~RunSettingsPanel()
delete m_widget;
}
-QString RunSettingsPanel::name() const
+QString RunSettingsPanel::displayName() const
{
return QApplication::tr("Run Settings");
}
@@ -143,7 +143,7 @@ int RunConfigurationsModel::columnCount(const QModelIndex &parent) const
return parent.isValid() ? 0 : 1;
}
-void RunConfigurationsModel::nameChanged(RunConfiguration *rc)
+void RunConfigurationsModel::displayNameChanged(RunConfiguration *rc)
{
for (int i = 0; i<m_runConfigurations.size(); ++i) {
if (m_runConfigurations.at(i) == rc) {
@@ -158,7 +158,7 @@ QVariant RunConfigurationsModel::data(const QModelIndex &index, int role) const
if (role == Qt::DisplayRole) {
const int row = index.row();
if (row < m_runConfigurations.size()) {
- return m_runConfigurations.at(row)->name();
+ return m_runConfigurations.at(row)->displayName();
}
}
@@ -214,8 +214,8 @@ RunSettingsWidget::RunSettingsWidget(Project *project)
initRunConfigurationComboBox();
const QList<RunConfiguration *> runConfigurations = m_project->runConfigurations();
for (int i=0; i<runConfigurations.size(); ++i) {
- connect(runConfigurations.at(i), SIGNAL(nameChanged()),
- this, SLOT(nameChanged()));
+ connect(runConfigurations.at(i), SIGNAL(displayNameChanged()),
+ this, SLOT(displayNameChanged()));
}
// TODO: Add support for custom runner configuration widgets once we have some
@@ -239,14 +239,14 @@ void RunSettingsWidget::aboutToShowAddMenu()
QList<IRunConfigurationFactory *> factories =
ExtensionSystem::PluginManager::instance()->getObjects<IRunConfigurationFactory>();
foreach (IRunConfigurationFactory *factory, factories) {
- QStringList types = factory->availableCreationTypes(m_project);
- foreach (const QString &type, types) {
- QAction *action = m_addMenu->addAction(factory->displayNameForType(type));;
- FactoryAndType fat;
- fat.factory = factory;
- fat.type = type;
+ QStringList ids = factory->availableCreationIds(m_project);
+ foreach (const QString &id, ids) {
+ QAction *action = m_addMenu->addAction(factory->displayNameForId(id));;
+ FactoryAndId fai;
+ fai.factory = factory;
+ fai.id = id;
QVariant v;
- v.setValue(fat);
+ v.setValue(fai);
action->setData(v);
connect(action, SIGNAL(triggered()),
this, SLOT(addRunConfiguration()));
@@ -259,22 +259,22 @@ void RunSettingsWidget::addRunConfiguration()
QAction *act = qobject_cast<QAction *>(sender());
if (!act)
return;
- FactoryAndType fat = act->data().value<FactoryAndType>();
- RunConfiguration *newRC = fat.factory->create(m_project, fat.type);
+ FactoryAndId fai = act->data().value<FactoryAndId>();
+ RunConfiguration *newRC = fai.factory->create(m_project, fai.id);
if (!newRC)
return;
m_project->addRunConfiguration(newRC);
initRunConfigurationComboBox();
m_ui->runConfigurationCombo->setCurrentIndex(
m_runConfigurationsModel->runConfigurations().indexOf(newRC));
- connect(newRC, SIGNAL(nameChanged()), this, SLOT(nameChanged()));
+ connect(newRC, SIGNAL(displayNameChanged()), this, SLOT(displayNameChanged()));
}
void RunSettingsWidget::removeRunConfiguration()
{
int index = m_ui->runConfigurationCombo->currentIndex();
RunConfiguration *rc = m_runConfigurationsModel->runConfigurations().at(index);
- disconnect(rc, SIGNAL(nameChanged()), this, SLOT(nameChanged()));
+ disconnect(rc, SIGNAL(displayNameChanged()), this, SLOT(displayNameChanged()));
m_project->removeRunConfiguration(rc);
initRunConfigurationComboBox();
}
@@ -324,7 +324,7 @@ void RunSettingsWidget::updateMakeActiveLabel()
}
if (rc) {
if (m_project->activeRunConfiguration() != rc) {
- m_makeActiveLabel->setText(tr("<a href=\"#\">Make %1 active.</a>").arg(rc->name()));
+ m_makeActiveLabel->setText(tr("<a href=\"#\">Make %1 active.</a>").arg(rc->displayName()));
m_makeActiveLabel->setVisible(true);
}
}
@@ -341,9 +341,9 @@ void RunSettingsWidget::makeActive()
m_project->setActiveRunConfiguration(rc);
}
-void RunSettingsWidget::nameChanged()
+void RunSettingsWidget::displayNameChanged()
{
RunConfiguration *rc = qobject_cast<RunConfiguration *>(sender());
- m_runConfigurationsModel->nameChanged(rc);
+ m_runConfigurationsModel->displayNameChanged(rc);
updateMakeActiveLabel();
}
diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.h b/src/plugins/projectexplorer/runsettingspropertiespage.h
index b53fbd6101..93281c7038 100644
--- a/src/plugins/projectexplorer/runsettingspropertiespage.h
+++ b/src/plugins/projectexplorer/runsettingspropertiespage.h
@@ -62,7 +62,7 @@ public:
RunSettingsPanel(Project *project);
~RunSettingsPanel();
- QString name() const;
+ QString displayName() const;
QWidget *widget() const;
QIcon icon() const;
@@ -83,7 +83,7 @@ private slots:
void aboutToShowAddMenu();
void addRunConfiguration();
void removeRunConfiguration();
- void nameChanged();
+ void displayNameChanged();
void initRunConfigurationComboBox();
void updateMakeActiveLabel();
void makeActive();
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index 8fb3b897d5..4d4edf5484 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -335,7 +335,7 @@ QString SessionFile::defaultPath() const
QString SessionFile::suggestedFileName() const
{
if (m_startupProject)
- return m_startupProject->name();
+ return m_startupProject->displayName();
return tr("Untitled", "default file name to display");
}
@@ -419,7 +419,7 @@ bool SessionManager::isDefaultSession(const QString &session) const
void SessionManager::saveActiveMode(Core::IMode *mode)
{
- setValue(QLatin1String("ActiveMode"), mode->uniqueModeName());
+ setValue(QLatin1String("ActiveMode"), mode->id());
}
void SessionManager::clearProjectFileCache()
@@ -521,7 +521,7 @@ void SessionManager::removeDependency(Project *project, Project *depProject)
void SessionManager::setStartupProject(Project *startupProject)
{
if (debug)
- qDebug() << Q_FUNC_INFO << (startupProject ? startupProject->name() : "0");
+ qDebug() << Q_FUNC_INFO << (startupProject ? startupProject->displayName() : "0");
if (startupProject) {
Q_ASSERT(m_file->m_projects.contains(startupProject));
@@ -557,7 +557,7 @@ void SessionManager::addProjects(const QList<Project*> &projects)
this, SLOT(clearProjectFileCache()));
if (debug)
- qDebug() << "SessionManager - adding project " << pro->name();
+ qDebug() << "SessionManager - adding project " << pro->displayName();
}
}
@@ -886,7 +886,7 @@ void SessionManager::updateWindowTitle()
windowTitle.prepend(sessionName + " - ");
} else {
if (Project *currentProject = ProjectExplorerPlugin::instance()->currentProject())
- windowTitle.prepend(currentProject->name() + " - ");
+ windowTitle.prepend(currentProject->displayName() + " - ");
}
if (m_core->editorManager()->currentEditor()) {
QFileInfo fi(m_core->editorManager()->currentEditor()->file()->fileName());
@@ -919,7 +919,7 @@ void SessionManager::removeProjects(QList<Project *> remove)
foreach (Project *pro, remove) {
if (debug)
- qDebug() << "SessionManager - emitting aboutToRemoveProject(" << pro->name() << ")";
+ qDebug() << "SessionManager - emitting aboutToRemoveProject(" << pro->displayName() << ")";
emit aboutToRemoveProject(pro);
}
@@ -938,7 +938,7 @@ void SessionManager::removeProjects(QList<Project *> remove)
m_projectFileCache.remove(pro);
if (debug)
- qDebug() << "SessionManager - emitting projectRemoved(" << pro->name() << ")";
+ qDebug() << "SessionManager - emitting projectRemoved(" << pro->displayName() << ")";
m_sessionNode->removeProjectNode(pro->rootProjectNode());
emit projectRemoved(pro);
delete pro;
diff --git a/src/plugins/qmleditor/qmleditor.cpp b/src/plugins/qmleditor/qmleditor.cpp
index 7bd674f498..f8449e2f80 100644
--- a/src/plugins/qmleditor/qmleditor.cpp
+++ b/src/plugins/qmleditor/qmleditor.cpp
@@ -278,8 +278,10 @@ QmlEditorEditable::QmlEditorEditable(QmlTextEditor *editor)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
- m_context << uidm->uniqueIdentifier(QmlEditor::Constants::C_QMLEDITOR);
+ m_context << uidm->uniqueIdentifier(QmlEditor::Constants::C_QMLEDITOR_ID);
m_context << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
+
+ setDisplayName(tr(QmlEditor::Constants::C_QMLEDITOR_DISPLAY_NAME));
}
QmlTextEditor::QmlTextEditor(QWidget *parent) :
@@ -328,9 +330,9 @@ Core::IEditor *QmlEditorEditable::duplicate(QWidget *parent)
return newEditor->editableInterface();
}
-const char *QmlEditorEditable::kind() const
+QString QmlEditorEditable::id() const
{
- return QmlEditor::Constants::C_QMLEDITOR;
+ return QLatin1String(QmlEditor::Constants::C_QMLEDITOR_ID);
}
QmlTextEditor::Context QmlEditorEditable::context() const
diff --git a/src/plugins/qmleditor/qmleditor.h b/src/plugins/qmleditor/qmleditor.h
index 2381ec941b..75221ec77f 100644
--- a/src/plugins/qmleditor/qmleditor.h
+++ b/src/plugins/qmleditor/qmleditor.h
@@ -66,7 +66,7 @@ public:
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
- const char *kind() const;
+ QString id() const;
bool isTemporary() const { return false; }
private:
diff --git a/src/plugins/qmleditor/qmleditoractionhandler.cpp b/src/plugins/qmleditor/qmleditoractionhandler.cpp
index 45fc2f9d66..019769c08a 100644
--- a/src/plugins/qmleditor/qmleditoractionhandler.cpp
+++ b/src/plugins/qmleditor/qmleditoractionhandler.cpp
@@ -43,7 +43,7 @@ namespace QmlEditor {
namespace Internal {
QmlEditorActionHandler::QmlEditorActionHandler()
- : TextEditor::TextEditorActionHandler(QLatin1String(QmlEditor::Constants::C_QMLEDITOR),
+ : TextEditor::TextEditorActionHandler(QLatin1String(QmlEditor::Constants::C_QMLEDITOR_ID),
Format)
{
}
diff --git a/src/plugins/qmleditor/qmleditorconstants.h b/src/plugins/qmleditor/qmleditorconstants.h
index 2fc8919ddd..9a8755b679 100644
--- a/src/plugins/qmleditor/qmleditorconstants.h
+++ b/src/plugins/qmleditor/qmleditorconstants.h
@@ -30,12 +30,15 @@
#ifndef QMLEDITOR_CONSTANTS_H
#define QMLEDITOR_CONSTANTS_H
+#include <QtCore/QtGlobal>
+
namespace QmlEditor {
namespace Constants {
const char * const M_CONTEXT = "QML Editor.ContextMenu";
const char * const RUN_SEP = "QmlEditor.Run.Separator";
-const char * const C_QMLEDITOR = "QML Editor";
+const char * const C_QMLEDITOR_ID = "QMLProjectManager.QMLEditor";
+const char * const C_QMLEDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", "QML Editor");
const char * const TASK_INDEX = "QmlEditor.TaskIndex";
const char * const QMLEDITOR_MIMETYPE = "application/x-qml";
diff --git a/src/plugins/qmleditor/qmleditorfactory.cpp b/src/plugins/qmleditor/qmleditorfactory.cpp
index aa541cd4d5..13e308b58f 100644
--- a/src/plugins/qmleditor/qmleditorfactory.cpp
+++ b/src/plugins/qmleditor/qmleditorfactory.cpp
@@ -43,7 +43,6 @@ using namespace QmlEditor::Constants;
QmlEditorFactory::QmlEditorFactory(QObject *parent)
: Core::IEditorFactory(parent),
- m_kind(QLatin1String(C_QMLEDITOR)),
m_mimeTypes(QLatin1String(QmlEditor::Constants::QMLEDITOR_MIMETYPE))
{
}
@@ -52,14 +51,20 @@ QmlEditorFactory::~QmlEditorFactory()
{
}
-QString QmlEditorFactory::kind() const
+QString QmlEditorFactory::id() const
{
- return m_kind;
+ return QLatin1String(C_QMLEDITOR_ID);
}
+QString QmlEditorFactory::displayName() const
+{
+ return tr(C_QMLEDITOR_DISPLAY_NAME);
+}
+
+
Core::IFile *QmlEditorFactory::open(const QString &fileName)
{
- Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
+ Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
if (!iface) {
qWarning() << "QmlEditorFactory::open: openEditor failed for " << fileName;
return 0;
diff --git a/src/plugins/qmleditor/qmleditorfactory.h b/src/plugins/qmleditor/qmleditorfactory.h
index a3a3588953..f22b24c7a9 100644
--- a/src/plugins/qmleditor/qmleditorfactory.h
+++ b/src/plugins/qmleditor/qmleditorfactory.h
@@ -53,12 +53,12 @@ public:
virtual QStringList mimeTypes() const;
// IEditorFactory
- QString kind() const;
+ QString id() const;
+ QString displayName() const;
Core::IFile *open(const QString &fileName);
Core::IEditor *createEditor(QWidget *parent);
private:
- const QString m_kind;
const QStringList m_mimeTypes;
};
diff --git a/src/plugins/qmleditor/qmleditorplugin.cpp b/src/plugins/qmleditor/qmleditorplugin.cpp
index b06543ece7..13659fcdf2 100644
--- a/src/plugins/qmleditor/qmleditorplugin.cpp
+++ b/src/plugins/qmleditor/qmleditorplugin.cpp
@@ -96,20 +96,20 @@ bool QmlEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
addAutoReleasedObject(typeSystem);
QList<int> context;
- context<< core->uniqueIDManager()->uniqueIdentifier(QmlEditor::Constants::C_QMLEDITOR);
+ context<< core->uniqueIDManager()->uniqueIdentifier(QmlEditor::Constants::C_QMLEDITOR_ID);
m_editor = new QmlEditorFactory(this);
addObject(m_editor);
Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setCategory(QLatin1String(Core::Constants::WIZARD_CATEGORY_QT));
- wizardParameters.setTrCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
+ wizardParameters.setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
wizardParameters.setDescription(tr("Creates a Qt QML file."));
- wizardParameters.setName(tr("Qt QML File"));
+ wizardParameters.setDisplayName(tr("Qt QML File"));
wizardParameters.setId(QLatin1String("Q.Qml"));
addAutoReleasedObject(new QmlFileWizard(wizardParameters, core));
- m_actionHandler = new TextEditor::TextEditorActionHandler(QmlEditor::Constants::C_QMLEDITOR,
+ m_actionHandler = new TextEditor::TextEditorActionHandler(QmlEditor::Constants::C_QMLEDITOR_ID,
TextEditor::TextEditorActionHandler::Format
| TextEditor::TextEditorActionHandler::UnCommentSelection
| TextEditor::TextEditorActionHandler::UnCollapseAll);
diff --git a/src/plugins/qmleditor/qmlfilewizard.cpp b/src/plugins/qmleditor/qmlfilewizard.cpp
index 6259aaf52a..644bf524d0 100644
--- a/src/plugins/qmleditor/qmlfilewizard.cpp
+++ b/src/plugins/qmleditor/qmlfilewizard.cpp
@@ -50,7 +50,7 @@ Core::GeneratedFiles QmlFileWizard::generateFilesFromPath(const QString &path,
const QString fileName = Core::BaseFileWizard::buildFileName(path, name, preferredSuffix(mimeType));
Core::GeneratedFile file(fileName);
- file.setEditorKind(QLatin1String(Constants::C_QMLEDITOR));
+ file.setEditorId(QLatin1String(Constants::C_QMLEDITOR_ID));
file.setContents(fileContents(fileName));
return Core::GeneratedFiles() << file;
diff --git a/src/plugins/qmlinspector/qmlinspectormode.cpp b/src/plugins/qmlinspector/qmlinspectormode.cpp
index 7af3a4fdb9..a55e19df2e 100644
--- a/src/plugins/qmlinspector/qmlinspectormode.cpp
+++ b/src/plugins/qmlinspector/qmlinspectormode.cpp
@@ -160,9 +160,9 @@ QmlInspectorMode::QmlInspectorMode(QObject *parent)
setWidget(createModeWindow());
- setName(tr("QML Inspect"));
+ setDisplayName(tr("QML Inspect"));
setIcon(QIcon(":/qmlinspector/images/logo.png"));
- setUniqueModeName("QML_INSPECT_MODE");
+ setId(QLatin1String("QML_INSPECT_MODE"));
}
void QmlInspectorMode::connectToViewer()
diff --git a/src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp b/src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
index 9ccfcb6b5b..ced52f6cd6 100644
--- a/src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
+++ b/src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
@@ -59,11 +59,11 @@ Core::BaseFileWizardParameters QmlNewProjectWizard::parameters()
{
static Core::BaseFileWizardParameters parameters(ProjectWizard);
parameters.setIcon(QIcon(QLatin1String(":/wizards/images/console.png")));
- parameters.setName(tr("QML Application"));
+ parameters.setDisplayName(tr("QML Application"));
parameters.setId(QLatin1String("QA.QML Application"));
parameters.setDescription(tr("Creates a QML application."));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY));
- parameters.setTrCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
+ parameters.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
return parameters;
}
@@ -74,7 +74,7 @@ QWizard *QmlNewProjectWizard::createWizardDialog(QWidget *parent,
QmlNewProjectWizardDialog *wizard = new QmlNewProjectWizardDialog(parent);
wizard->setPath(defaultPath);
- wizard->setName(QmlNewProjectWizardDialog::projectName(defaultPath));
+ wizard->setProjectName(QmlNewProjectWizardDialog::uniqueProjectName(defaultPath));
foreach (QWizardPage *p, extensionPages)
wizard->addPage(p);
@@ -88,7 +88,7 @@ Core::GeneratedFiles QmlNewProjectWizard::generateFiles(const QWizard *w,
Q_UNUSED(errorMessage)
const QmlNewProjectWizardDialog *wizard = qobject_cast<const QmlNewProjectWizardDialog *>(w);
- const QString projectName = wizard->name();
+ const QString projectName = wizard->projectName();
const QString projectPath = wizard->path() + QLatin1Char('/') + projectName;
const QString creatorFileName = Core::BaseFileWizard::buildFileName(projectPath,
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index 98130fbf48..2643fdccaa 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -166,7 +166,7 @@ QStringList QmlProject::convertToAbsoluteFiles(const QStringList &paths) const
QStringList QmlProject::files() const
{ return m_files; }
-QString QmlProject::name() const
+QString QmlProject::displayName() const
{
return m_projectName;
}
@@ -305,10 +305,9 @@ void QmlProjectFile::modified(ReloadBehavior *)
QmlRunConfiguration::QmlRunConfiguration(QmlProject *pro)
: ProjectExplorer::RunConfiguration(pro),
m_project(pro),
- m_type(Constants::QMLRUNCONFIGURATION),
m_debugServerPort(3768)
{
- setName(tr("QML Viewer"));
+ setDisplayName(tr("QML Viewer"));
// append creator/bin dir to search path (only useful for special creator-qml package)
const QString searchPath = QString(qgetenv("PATH"))
@@ -322,9 +321,9 @@ QmlRunConfiguration::~QmlRunConfiguration()
{
}
-QString QmlRunConfiguration::type() const
+QString QmlRunConfiguration::id() const
{
- return m_type;
+ return QLatin1String(Constants::QMLRUNCONFIGURATION);
}
QString QmlRunConfiguration::viewerPath() const
@@ -476,7 +475,6 @@ void QmlRunConfiguration::restore(const ProjectExplorer::PersistentSettingsReade
}
QmlRunConfigurationFactory::QmlRunConfigurationFactory()
- : m_type(Constants::QMLRUNCONFIGURATION)
{
}
@@ -484,22 +482,22 @@ QmlRunConfigurationFactory::~QmlRunConfigurationFactory()
{
}
-bool QmlRunConfigurationFactory::canRestore(const QString &type) const
+bool QmlRunConfigurationFactory::canRestore(const QString &id) const
{
- if (type.startsWith(m_type))
+ if (id.startsWith(QLatin1String(Constants::QMLRUNCONFIGURATION)))
return true;
return false;
}
-QStringList QmlRunConfigurationFactory::availableCreationTypes(ProjectExplorer::Project *) const
+QStringList QmlRunConfigurationFactory::availableCreationIds(ProjectExplorer::Project *) const
{
return QStringList();
}
-QString QmlRunConfigurationFactory::displayNameForType(const QString &type) const
+QString QmlRunConfigurationFactory::displayNameForId(const QString &id) const
{
- return type;
+ return id;
}
ProjectExplorer::RunConfiguration *QmlRunConfigurationFactory::create(ProjectExplorer::Project *project,
@@ -592,7 +590,7 @@ QmlRunControlFactory::~QmlRunControlFactory()
bool QmlRunControlFactory::canRun(RunConfiguration *runConfiguration, const QString &mode) const
{
- Q_UNUSED(mode)
+ Q_UNUSED(mode);
return (qobject_cast<QmlRunConfiguration*>(runConfiguration) != 0);
}
diff --git a/src/plugins/qmlprojectmanager/qmlproject.h b/src/plugins/qmlprojectmanager/qmlproject.h
index 5419a5ecf9..44d65b582a 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.h
+++ b/src/plugins/qmlprojectmanager/qmlproject.h
@@ -61,7 +61,7 @@ public:
QString filesFileName() const;
- virtual QString name() const;
+ virtual QString displayName() const;
virtual Core::IFile *file() const;
virtual Manager *projectManager() const;
virtual ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const;
@@ -149,7 +149,7 @@ public:
uint debugServerPort() const;
// RunConfiguration
- virtual QString type() const;
+ virtual QString id() const;
virtual QWidget *configurationWidget();
virtual void save(ProjectExplorer::PersistentSettingsWriter &writer) const;
@@ -168,7 +168,6 @@ private:
QString m_qmlViewerCustomPath;
QString m_qmlViewerDefaultPath;
QString m_qmlViewerArgs;
- QLatin1String m_type;
uint m_debugServerPort;
};
@@ -181,19 +180,16 @@ public:
virtual ~QmlRunConfigurationFactory();
// used to recreate the runConfigurations when restoring settings
- virtual bool canRestore(const QString &type) const;
+ virtual bool canRestore(const QString &id) const;
// used to show the list of possible additons to a project, returns a list of types
- virtual QStringList availableCreationTypes(ProjectExplorer::Project *pro) const;
+ virtual QStringList availableCreationIds(ProjectExplorer::Project *pro) const;
// used to translate the types to names to display to the user
- virtual QString displayNameForType(const QString &type) const;
+ virtual QString displayNameForId(const QString &id) const;
virtual ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project,
- const QString &type);
-
-private:
- QLatin1String m_type;
+ const QString &id);
};
class QmlRunControl : public ProjectExplorer::RunControl {
diff --git a/src/plugins/qmlprojectmanager/qmlprojectconstants.h b/src/plugins/qmlprojectmanager/qmlprojectconstants.h
index 38611e657c..a3f1d27c85 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectconstants.h
+++ b/src/plugins/qmlprojectmanager/qmlprojectconstants.h
@@ -46,7 +46,8 @@ const char *const C_FILESEDITOR = ".files Editor";
// kinds
const char *const PROJECT_KIND = "QML";
-const char *const FILES_EDITOR = ".qmlproject Editor";
+const char *const FILES_EDITOR_ID = "Qt4.QmlProjectEditor";
+const char *const FILES_EDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", ".qmlproject Editor");
const char *const FILES_MIMETYPE = QMLMIMETYPE;
const char *const TASK_CATEGORY_QML = "Task.Category.Qml";
diff --git a/src/plugins/qmlprojectmanager/qmlprojectfileseditor.cpp b/src/plugins/qmlprojectmanager/qmlprojectfileseditor.cpp
index 15547a8ce1..18f0fe7241 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectfileseditor.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectfileseditor.cpp
@@ -75,16 +75,21 @@ QStringList ProjectFilesFactory::mimeTypes() const
return m_mimeTypes;
}
-QString ProjectFilesFactory::kind() const
+QString ProjectFilesFactory::id() const
{
- return QLatin1String(Constants::FILES_EDITOR);
+ return QLatin1String(Constants::FILES_EDITOR_ID);
+}
+
+QString ProjectFilesFactory::displayName() const
+{
+ return tr(Constants::FILES_EDITOR_DISPLAY_NAME);
}
Core::IFile *ProjectFilesFactory::open(const QString &fileName)
{
Core::EditorManager *editorManager = Core::EditorManager::instance();
- if (Core::IEditor *editor = editorManager->openEditor(fileName, kind()))
+ if (Core::IEditor *editor = editorManager->openEditor(fileName, id()))
return editor->file();
return 0;
@@ -99,6 +104,8 @@ ProjectFilesEditable::ProjectFilesEditable(ProjectFilesEditor *editor)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_context << uidm->uniqueIdentifier(Constants::C_FILESEDITOR);
+
+ setDisplayName(tr(Constants::FILES_EDITOR_DISPLAY_NAME));
}
ProjectFilesEditable::~ProjectFilesEditable()
@@ -109,9 +116,9 @@ QList<int> ProjectFilesEditable::context() const
return m_context;
}
-const char *ProjectFilesEditable::kind() const
+QString ProjectFilesEditable::id() const
{
- return Constants::FILES_EDITOR;
+ return Constants::FILES_EDITOR_ID;
}
bool ProjectFilesEditable::duplicateSupported() const
diff --git a/src/plugins/qmlprojectmanager/qmlprojectfileseditor.h b/src/plugins/qmlprojectmanager/qmlprojectfileseditor.h
index cd9a785a7f..727b3b2796 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectfileseditor.h
+++ b/src/plugins/qmlprojectmanager/qmlprojectfileseditor.h
@@ -57,7 +57,8 @@ public:
virtual Core::IEditor *createEditor(QWidget *parent);
virtual QStringList mimeTypes() const;
- virtual QString kind() const;
+ virtual QString id() const;
+ virtual QString displayName() const;
virtual Core::IFile *open(const QString &fileName);
private:
@@ -75,7 +76,7 @@ public:
virtual ~ProjectFilesEditable();
virtual QList<int> context() const;
- virtual const char *kind() const;
+ virtual QString id() const;
virtual bool duplicateSupported() const;
virtual Core::IEditor *duplicate(QWidget *parent);
diff --git a/src/plugins/qmlprojectmanager/qmlprojectwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
index aaa7bcdb6a..4b653ea50c 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
@@ -56,7 +56,7 @@ QmlProjectWizardDialog::QmlProjectWizardDialog(QWidget *parent)
// first page
m_firstPage = new FileWizardPage;
m_firstPage->setTitle(tr("QML Project"));
- m_firstPage->setNameLabel(tr("Project name:"));
+ m_firstPage->setFileNameLabel(tr("Project name:"));
m_firstPage->setPathLabel(tr("Location:"));
addPage(m_firstPage);
@@ -77,7 +77,7 @@ void QmlProjectWizardDialog::setPath(const QString &path)
QString QmlProjectWizardDialog::projectName() const
{
- return m_firstPage->name();
+ return m_firstPage->fileName();
}
QmlProjectWizard::QmlProjectWizard()
@@ -91,11 +91,11 @@ Core::BaseFileWizardParameters QmlProjectWizard::parameters()
{
static Core::BaseFileWizardParameters parameters(ProjectWizard);
parameters.setIcon(QIcon(QLatin1String(":/wizards/images/console.png")));
- parameters.setName(tr("Import of existing QML directory"));
+ parameters.setDisplayName(tr("Import of existing QML directory"));
parameters.setId(QLatin1String("QI.QML Import"));
parameters.setDescription(tr("Creates a QML project from an existing directory of QML files."));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY));
- parameters.setTrCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
+ parameters.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
return parameters;
}
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp
index cb5518047e..a1e0eed80f 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp
@@ -50,9 +50,9 @@ QWizard *CustomWidgetWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- CustomWidgetWizardDialog *rc = new CustomWidgetWizardDialog(name(), icon(), extensionPages, parent);
+ CustomWidgetWizardDialog *rc = new CustomWidgetWizardDialog(displayName(), icon(), extensionPages, parent);
rc->setPath(defaultPath);
- rc->setName(CustomWidgetWizardDialog::projectName(defaultPath));
+ rc->setProjectName(CustomWidgetWizardDialog::uniqueProjectName(defaultPath));
rc->setFileNamingParameters(FileNamingParameters(headerSuffix(), sourceSuffix(), QtWizard::lowerCaseFiles()));
return rc;
}
@@ -63,7 +63,7 @@ Core::GeneratedFiles CustomWidgetWizard::generateFiles(const QWizard *w,
const CustomWidgetWizardDialog *cw = qobject_cast<const CustomWidgetWizardDialog *>(w);
Q_ASSERT(w);
GenerationParameters p;
- p.name = cw->name();
+ p.fileName = cw->projectName();
p.path = cw->path();
p.license = CppTools::AbstractEditorSupport::licenseTemplate();
p.templatePath = QtWizard::templateDir();
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp
index 60c7160bed..5e22af5ae5 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.cpp
@@ -76,7 +76,7 @@ QList<Core::GeneratedFile> PluginGenerator::generatePlugin(const GenerationPara
QString baseDir = p.path;
baseDir += slash;
- baseDir += p.name;
+ baseDir += p.fileName;
const QString slashLessBaseDir = baseDir;
baseDir += slash;
@@ -280,7 +280,7 @@ QList<Core::GeneratedFile> PluginGenerator::generatePlugin(const GenerationPara
const QString proFileContents = processTemplate(p.templatePath + QLatin1String("/tpl_plugin.pro"), sm, errorMessage);
if (proFileContents.isEmpty())
return QList<Core::GeneratedFile>();
- Core::GeneratedFile proFile(baseDir + p.name + QLatin1String(".pro"));
+ Core::GeneratedFile proFile(baseDir + p.fileName + QLatin1String(".pro"));
proFile.setContents(proFileContents);
rc.push_back(proFile);
return rc;
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.h b/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.h
index 9977f32050..3d1484207b 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.h
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/plugingenerator.h
@@ -50,7 +50,7 @@ struct PluginOptions;
struct GenerationParameters {
QString path;
- QString name;
+ QString fileName;
QString license;
QString templatePath;
};
diff --git a/src/plugins/qt4projectmanager/externaleditors.cpp b/src/plugins/qt4projectmanager/externaleditors.cpp
index 5c6cb81358..0f113175d7 100644
--- a/src/plugins/qt4projectmanager/externaleditors.cpp
+++ b/src/plugins/qt4projectmanager/externaleditors.cpp
@@ -68,15 +68,15 @@ static inline QString msgStartFailed(const QString &binary, QStringList argument
return ExternalQtEditor::tr("Unable to start \"%1\"").arg(arguments.join(QString(QLatin1Char(' '))));
}
-static inline QString msgAppNotFound(const QString &kind)
+static inline QString msgAppNotFound(const QString &id)
{
- return ExternalQtEditor::tr("The application \"%1\" could not be found.").arg(kind);
+ return ExternalQtEditor::tr("The application \"%1\" could not be found.").arg(id);
}
// -- Commands and helpers
#ifdef Q_OS_MAC
-static const char *linguistBinaryC = "Linguist";
-static const char *designerBinaryC = "Designer";
+static const char * const linguistBinaryC = "Linguist";
+static const char * const designerBinaryC = "Designer";
// Mac: Change the call 'Foo.app/Contents/MacOS/Foo <file>' to
// 'open Foo.app <file>'. Do this ONLY if you do not want to have
@@ -90,21 +90,26 @@ static void createMacOpenCommand(QString *binary, QStringList *arguments)
*binary = QLatin1String("open");
}
}
-
#else
-static const char *linguistBinaryC = "linguist";
-static const char *designerBinaryC = "designer";
+static const char * const linguistBinaryC = "linguist";
+static const char * const designerBinaryC = "designer";
#endif
-static const char *designerKindC = "Qt Designer";
+static const char * const designerIdC = "Qt.Designer";
+static const char * const linguistIdC = "Qt.Linguisr";
+
+static const char * const designerDisplayName = QT_TRANSLATE_NOOP("OpenWith::Editors", "Qt Designer");
+static const char * const linguistDisplayName = QT_TRANSLATE_NOOP("OpenWith::Editors", "Qt Linguist");
// -------------- ExternalQtEditor
-ExternalQtEditor::ExternalQtEditor(const QString &kind,
- const QString &mimetype,
- QObject *parent) :
+ExternalQtEditor::ExternalQtEditor(const QString &id,
+ const QString &displayName,
+ const QString &mimetype,
+ QObject *parent) :
Core::IExternalEditor(parent),
m_mimeTypes(mimetype),
- m_kind(kind)
+ m_id(id),
+ m_displayName(displayName)
{
}
@@ -113,9 +118,14 @@ QStringList ExternalQtEditor::mimeTypes() const
return m_mimeTypes;
}
-QString ExternalQtEditor::kind() const
+QString ExternalQtEditor::id() const
+{
+ return m_id;
+}
+
+QString ExternalQtEditor::displayName() const
{
- return m_kind;
+ return m_displayName;
}
bool ExternalQtEditor::getEditorLaunchData(const QString &fileName,
@@ -138,7 +148,7 @@ bool ExternalQtEditor::getEditorLaunchData(const QString &fileName,
data->binary = Utils::SynchronousProcess::locateBinary(fallbackBinary);
}
if (data->binary.isEmpty()) {
- *errorMessage = msgAppNotFound(kind());
+ *errorMessage = msgAppNotFound(id());
return false;
}
// Setup binary + arguments, use Mac Open if appropriate
@@ -169,7 +179,8 @@ bool ExternalQtEditor::startEditorProcess(const EditorLaunchData &data, QString
// --------------- LinguistExternalEditor
LinguistExternalEditor::LinguistExternalEditor(QObject *parent) :
- ExternalQtEditor(QLatin1String("Qt Linguist"),
+ ExternalQtEditor(QLatin1String(linguistIdC),
+ QLatin1String(linguistDisplayName),
QLatin1String(Qt4ProjectManager::Constants::LINGUIST_MIMETYPE),
parent)
{
@@ -186,7 +197,8 @@ bool LinguistExternalEditor::startEditor(const QString &fileName, QString *error
// --------------- MacDesignerExternalEditor, using Mac 'open'
MacDesignerExternalEditor::MacDesignerExternalEditor(QObject *parent) :
- ExternalQtEditor(QLatin1String(designerKindC),
+ ExternalQtEditor(QLatin1String(designerIdC),
+ QLatin1String(designerDisplayName),
QLatin1String(Qt4ProjectManager::Constants::FORM_MIMETYPE),
parent)
{
@@ -204,7 +216,8 @@ bool MacDesignerExternalEditor::startEditor(const QString &fileName, QString *er
// --------------- DesignerExternalEditor with Designer Tcp remote control.
DesignerExternalEditor::DesignerExternalEditor(QObject *parent) :
- ExternalQtEditor(QLatin1String(designerKindC),
+ ExternalQtEditor(QLatin1String(designerIdC),
+ QLatin1String(designerDisplayName),
QLatin1String(Designer::Constants::FORM_MIMETYPE),
parent),
m_terminationMapper(0)
diff --git a/src/plugins/qt4projectmanager/externaleditors.h b/src/plugins/qt4projectmanager/externaleditors.h
index b67d7af5c1..f94f9a40f0 100644
--- a/src/plugins/qt4projectmanager/externaleditors.h
+++ b/src/plugins/qt4projectmanager/externaleditors.h
@@ -58,7 +58,8 @@ class ExternalQtEditor : public Core::IExternalEditor
Q_OBJECT
public:
virtual QStringList mimeTypes() const;
- virtual QString kind() const;
+ virtual QString id() const;
+ virtual QString displayName() const;
protected:
// Method pointer for a QtVersion method return a string (command)
@@ -71,7 +72,8 @@ protected:
QString workingDirectory;
};
- explicit ExternalQtEditor(const QString &kind,
+ explicit ExternalQtEditor(const QString &id,
+ const QString &displayName,
const QString &mimetype,
QObject *parent = 0);
@@ -91,7 +93,8 @@ protected:
private:
const QStringList m_mimeTypes;
- const QString m_kind;
+ const QString m_id;
+ const QString m_displayName;
};
// Qt Linguist
diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp
index 2ff62bb025..254465c64a 100644
--- a/src/plugins/qt4projectmanager/makestep.cpp
+++ b/src/plugins/qt4projectmanager/makestep.cpp
@@ -166,7 +166,7 @@ void MakeStep::run(QFutureInterface<bool> & fi)
AbstractProcessStep::run(fi);
}
-QString MakeStep::name()
+QString MakeStep::id()
{
return Constants::MAKESTEP;
}
@@ -317,14 +317,14 @@ MakeStepFactory::~MakeStepFactory()
{
}
-bool MakeStepFactory::canCreate(const QString & name) const
+bool MakeStepFactory::canCreate(const QString &id) const
{
- return (name == Constants::MAKESTEP);
+ return (id == Constants::MAKESTEP);
}
-ProjectExplorer::BuildStep *MakeStepFactory::create(ProjectExplorer::BuildConfiguration *bc, const QString & name) const
+ProjectExplorer::BuildStep *MakeStepFactory::create(ProjectExplorer::BuildConfiguration *bc, const QString &id) const
{
- Q_UNUSED(name)
+ Q_UNUSED(id);
return new MakeStep(bc);
}
@@ -341,8 +341,8 @@ QStringList MakeStepFactory::canCreateForBuildConfiguration(ProjectExplorer::Bui
return QStringList();
}
-QString MakeStepFactory::displayNameForName(const QString &name) const
+QString MakeStepFactory::displayNameForId(const QString &id) const
{
- Q_UNUSED(name)
+ Q_UNUSED(id);
return tr("Make");
}
diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qt4projectmanager/makestep.h
index b18bca6ef2..2626acaf5f 100644
--- a/src/plugins/qt4projectmanager/makestep.h
+++ b/src/plugins/qt4projectmanager/makestep.h
@@ -52,11 +52,11 @@ class MakeStepFactory : public ProjectExplorer::IBuildStepFactory
public:
MakeStepFactory();
virtual ~MakeStepFactory();
- bool canCreate(const QString & name) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *bc, const QString & name) const;
+ bool canCreate(const QString &id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *bc, const QString &id) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStep *bs, ProjectExplorer::BuildConfiguration *bc) const;
QStringList canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration *bc) const;
- QString displayNameForName(const QString &name) const;
+ QString displayNameForId(const QString &id) const;
};
} //namespace Internal
@@ -76,7 +76,7 @@ public:
virtual bool init();
virtual void run(QFutureInterface<bool> &);
- virtual QString name();
+ virtual QString id();
virtual QString displayName();
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
virtual bool immutable() const;
diff --git a/src/plugins/qt4projectmanager/profileeditor.cpp b/src/plugins/qt4projectmanager/profileeditor.cpp
index 15df3c59a1..86a7f36bd7 100644
--- a/src/plugins/qt4projectmanager/profileeditor.cpp
+++ b/src/plugins/qt4projectmanager/profileeditor.cpp
@@ -72,9 +72,9 @@ Core::IEditor *ProFileEditorEditable::duplicate(QWidget *parent)
return ret->editableInterface();
}
-const char *ProFileEditorEditable::kind() const
+QString ProFileEditorEditable::id() const
{
- return Qt4ProjectManager::Constants::PROFILE_EDITOR;
+ return QLatin1String(Qt4ProjectManager::Constants::PROFILE_EDITOR_ID);
}
//
diff --git a/src/plugins/qt4projectmanager/profileeditor.h b/src/plugins/qt4projectmanager/profileeditor.h
index d9673e7e42..6756dc5b78 100644
--- a/src/plugins/qt4projectmanager/profileeditor.h
+++ b/src/plugins/qt4projectmanager/profileeditor.h
@@ -57,7 +57,7 @@ public:
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
- const char *kind() const;
+ QString id() const;
bool isTemporary() const { return false; }
private:
QList<int> m_context;
diff --git a/src/plugins/qt4projectmanager/profileeditorfactory.cpp b/src/plugins/qt4projectmanager/profileeditorfactory.cpp
index a9b96dcf75..33b7a88c69 100644
--- a/src/plugins/qt4projectmanager/profileeditorfactory.cpp
+++ b/src/plugins/qt4projectmanager/profileeditorfactory.cpp
@@ -46,7 +46,6 @@ using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
ProFileEditorFactory::ProFileEditorFactory(Qt4Manager *manager, TextEditor::TextEditorActionHandler *handler) :
- m_kind(QLatin1String(Qt4ProjectManager::Constants::PROFILE_EDITOR)),
m_mimeTypes(QStringList() << QLatin1String(Qt4ProjectManager::Constants::PROFILE_MIMETYPE)
<< QLatin1String(Qt4ProjectManager::Constants::PROINCLUDEFILE_MIMETYPE)),
m_manager(manager),
@@ -63,14 +62,19 @@ ProFileEditorFactory::~ProFileEditorFactory()
{
}
-QString ProFileEditorFactory::kind() const
+QString ProFileEditorFactory::id() const
{
- return m_kind;
+ return QLatin1String(Qt4ProjectManager::Constants::PROFILE_EDITOR_ID);
+}
+
+QString ProFileEditorFactory::displayName() const
+{
+ return tr(Qt4ProjectManager::Constants::PROFILE_EDITOR_DISPLAY_NAME);
}
Core::IFile *ProFileEditorFactory::open(const QString &fileName)
{
- Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
+ Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
return iface ? iface->file() : 0;
}
diff --git a/src/plugins/qt4projectmanager/profileeditorfactory.h b/src/plugins/qt4projectmanager/profileeditorfactory.h
index aa41561b95..91ccf4e3da 100644
--- a/src/plugins/qt4projectmanager/profileeditorfactory.h
+++ b/src/plugins/qt4projectmanager/profileeditorfactory.h
@@ -57,14 +57,14 @@ public:
~ProFileEditorFactory();
virtual QStringList mimeTypes() const;
- virtual QString kind() const;
+ virtual QString id() const;
+ virtual QString displayName() const;
Core::IFile *open(const QString &fileName);
Core::IEditor *createEditor(QWidget *parent);
inline Qt4Manager *qt4ProjectManager() const { return m_manager; }
private:
- const QString m_kind;
const QStringList m_mimeTypes;
Qt4Manager *m_manager;
TextEditor::TextEditorActionHandler *m_actionHandler;
diff --git a/src/plugins/qt4projectmanager/projectloadwizard.cpp b/src/plugins/qt4projectmanager/projectloadwizard.cpp
index 04d46cb2ca..4051ae0b22 100644
--- a/src/plugins/qt4projectmanager/projectloadwizard.cpp
+++ b/src/plugins/qt4projectmanager/projectloadwizard.cpp
@@ -172,7 +172,7 @@ void ProjectLoadWizard::setupImportPage(QtVersion *version, QtVersion::QmakeBuil
QVBoxLayout *importLayout = new QVBoxLayout(importPage);
importLabel = new QLabel(importPage);
- QString versionString = version->name() + " (" + QDir::toNativeSeparators(version->qmakeCommand()) + ")";
+ QString versionString = version->displayName() + " (" + QDir::toNativeSeparators(version->qmakeCommand()) + ")";
QString buildConfigString = (buildConfig & QtVersion::BuildAll) ? QLatin1String("debug_and_release ") : QLatin1String("");
buildConfigString.append((buildConfig & QtVersion::DebugBuild) ? QLatin1String("debug") : QLatin1String("release"));
importLabel->setTextFormat(Qt::RichText);
diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index 545ecd0a2e..920c9f0f77 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -161,7 +161,7 @@ void QMakeStep::run(QFutureInterface<bool> &fi)
AbstractProcessStep::run(fi);
}
-QString QMakeStep::name()
+QString QMakeStep::id()
{
return QLatin1String(Constants::QMAKESTEP);
}
@@ -374,14 +374,14 @@ QMakeStepFactory::~QMakeStepFactory()
{
}
-bool QMakeStepFactory::canCreate(const QString & name) const
+bool QMakeStepFactory::canCreate(const QString &id) const
{
- return (name == Constants::QMAKESTEP);
+ return (id == Constants::QMAKESTEP);
}
-ProjectExplorer::BuildStep *QMakeStepFactory::create(BuildConfiguration *bc, const QString & name) const
+ProjectExplorer::BuildStep *QMakeStepFactory::create(BuildConfiguration *bc, const QString &id) const
{
- Q_UNUSED(name)
+ Q_UNUSED(id);
return new QMakeStep(bc);
}
@@ -398,9 +398,9 @@ QStringList QMakeStepFactory::canCreateForBuildConfiguration(ProjectExplorer::Bu
return QStringList();
}
-QString QMakeStepFactory::displayNameForName(const QString &name) const
+QString QMakeStepFactory::displayNameForId(const QString &id) const
{
- Q_UNUSED(name);
+ Q_UNUSED(id);
return tr("QMake");
}
diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qt4projectmanager/qmakestep.h
index acee94ad52..53fa52d2e8 100644
--- a/src/plugins/qt4projectmanager/qmakestep.h
+++ b/src/plugins/qt4projectmanager/qmakestep.h
@@ -54,11 +54,11 @@ class QMakeStepFactory : public ProjectExplorer::IBuildStepFactory
public:
QMakeStepFactory();
virtual ~QMakeStepFactory();
- bool canCreate(const QString & name) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *bc, const QString & name) const;
+ bool canCreate(const QString & id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildConfiguration *bc, const QString &id) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStep *bs, ProjectExplorer::BuildConfiguration *bc) const;
QStringList canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration *bc) const;
- QString displayNameForName(const QString &name) const;
+ QString displayNameForId(const QString &id) const;
};
} // namespace Internal
@@ -74,7 +74,7 @@ public:
Internal::Qt4BuildConfiguration *qt4BuildConfiguration() const;
virtual bool init();
virtual void run(QFutureInterface<bool> &);
- virtual QString name();
+ virtual QString id();
virtual QString displayName();
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
virtual bool immutable() const;
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
index ff1cb5668a..97a3d6f2dd 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
@@ -113,10 +113,10 @@ MaemoRunConfiguration::MaemoRunConfiguration(Project *project,
, qemu(0)
{
if (!m_proFilePath.isEmpty()) {
- setName(tr("%1 on Maemo device").arg(QFileInfo(m_proFilePath)
+ setDisplayName(tr("%1 on Maemo device").arg(QFileInfo(m_proFilePath)
.completeBaseName()));
} else {
- setName(tr("MaemoRunConfiguration"));
+ setDisplayName(tr("MaemoRunConfiguration"));
}
connect(&MaemoDeviceConfigurations::instance(), SIGNAL(updated()),
@@ -148,7 +148,7 @@ MaemoRunConfiguration::~MaemoRunConfiguration()
qemu = NULL;
}
-QString MaemoRunConfiguration::type() const
+QString MaemoRunConfiguration::id() const
{
return QLatin1String("Qt4ProjectManager.MaemoRunConfiguration");
}
@@ -421,7 +421,7 @@ void MaemoRunConfiguration::updateTarget()
if (info.error == Qt4TargetInformation::ProParserError) {
Core::ICore::instance()->messageManager()->printToOutputPane(tr(
"Could not parse %1. The Maemo run configuration %2 "
- "can not be started.").arg(m_proFilePath).arg(name()));
+ "can not be started.").arg(m_proFilePath).arg(displayName()));
}
emit targetInformationChanged();
return;
@@ -561,12 +561,12 @@ MaemoRunConfigurationFactory::~MaemoRunConfigurationFactory()
{
}
-bool MaemoRunConfigurationFactory::canRestore(const QString &type) const
+bool MaemoRunConfigurationFactory::canRestore(const QString &id) const
{
- return type == "Qt4ProjectManager.MaemoRunConfiguration";
+ return id == "Qt4ProjectManager.MaemoRunConfiguration";
}
-QStringList MaemoRunConfigurationFactory::availableCreationTypes(
+QStringList MaemoRunConfigurationFactory::availableCreationIds(
Project *pro) const
{
Qt4Project *qt4project = qobject_cast<Qt4Project *>(pro);
@@ -581,16 +581,15 @@ QStringList MaemoRunConfigurationFactory::availableCreationTypes(
return QStringList();
}
-QString MaemoRunConfigurationFactory::displayNameForType(
- const QString &type) const
+QString MaemoRunConfigurationFactory::displayNameForId(const QString &id) const
{
const int size = QString::fromLocal8Bit("MaemoRunConfiguration.").size();
- return tr("%1 on Maemo Device").arg(QFileInfo(type.mid(size))
+ return tr("%1 on Maemo Device").arg(QFileInfo(id.mid(size))
.completeBaseName());
}
RunConfiguration *MaemoRunConfigurationFactory::create(Project *project,
- const QString &type)
+ const QString &id)
{
Qt4Project *qt4project = qobject_cast<Qt4Project *>(project);
Q_ASSERT(qt4project);
@@ -602,10 +601,10 @@ RunConfiguration *MaemoRunConfigurationFactory::create(Project *project,
RunConfiguration *rc = 0;
const QLatin1String prefix("MaemoRunConfiguration.");
- if (type.startsWith(prefix)) {
- rc = new MaemoRunConfiguration(qt4project, type.mid(QString(prefix).size()));
+ if (id.startsWith(prefix)) {
+ rc = new MaemoRunConfiguration(qt4project, id.mid(QString(prefix).size()));
} else {
- Q_ASSERT(type == "Qt4ProjectManager.MaemoRunConfiguration");
+ Q_ASSERT(id == "Qt4ProjectManager.MaemoRunConfiguration");
rc = new MaemoRunConfiguration(qt4project, QString::null);
}
@@ -642,35 +641,35 @@ bool hasMaemoRunConfig(ProjectExplorer::Project* project)
}
void MaemoRunConfigurationFactory::addedRunConfiguration(
- ProjectExplorer::Project* project)
+ ProjectExplorer::Project *project)
{
if (hasMaemoRunConfig(project))
MaemoManager::instance()->addQemuSimulatorStarter(project);
}
void MaemoRunConfigurationFactory::removedRunConfiguration(
- ProjectExplorer::Project* project)
+ ProjectExplorer::Project *project)
{
if (!hasMaemoRunConfig(project))
MaemoManager::instance()->removeQemuSimulatorStarter(project);
}
void MaemoRunConfigurationFactory::projectAdded(
- ProjectExplorer::Project* project)
+ ProjectExplorer::Project *project)
{
if (hasMaemoRunConfig(project))
MaemoManager::instance()->addQemuSimulatorStarter(project);
}
void MaemoRunConfigurationFactory::projectRemoved(
- ProjectExplorer::Project* project)
+ ProjectExplorer::Project *project)
{
if (hasMaemoRunConfig(project))
MaemoManager::instance()->removeQemuSimulatorStarter(project);
}
void MaemoRunConfigurationFactory::currentProjectChanged(
- ProjectExplorer::Project* project)
+ ProjectExplorer::Project *project)
{
bool hasRunConfig = hasMaemoRunConfig(project);
MaemoManager::instance()->setQemuSimulatorStarterEnabled(hasRunConfig);
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
index 94ca55fe2e..f9d39af039 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
@@ -70,7 +70,7 @@ public:
const QString &proFilePath);
~MaemoRunConfiguration();
- QString type() const;
+ QString id() const;
bool isEnabled(ProjectExplorer::BuildConfiguration *config) const;
using RunConfiguration::isEnabled;
QWidget *configurationWidget();
@@ -173,7 +173,6 @@ private:
#endif
};
-
class MaemoRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory
{
Q_OBJECT
@@ -181,20 +180,18 @@ public:
MaemoRunConfigurationFactory(QObject *parent);
~MaemoRunConfigurationFactory();
- bool canRestore(const QString &type) const;
- QStringList availableCreationTypes(ProjectExplorer::Project *project) const;
- QString displayNameForType(const QString &type) const;
- ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project,
- const QString &type);
-
+ bool canRestore(const QString &id) const;
+ QStringList availableCreationIds(ProjectExplorer::Project *project) const;
+ QString displayNameForId(const QString &id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project, const QString &id);
private slots:
- void addedRunConfiguration(ProjectExplorer::Project* project);
- void removedRunConfiguration(ProjectExplorer::Project* project);
+ void addedRunConfiguration(ProjectExplorer::Project *project);
+ void removedRunConfiguration(ProjectExplorer::Project *project);
- void projectAdded(ProjectExplorer::Project* project);
- void projectRemoved(ProjectExplorer::Project* project);
- void currentProjectChanged(ProjectExplorer::Project* project);
+ void projectAdded(ProjectExplorer::Project *project);
+ void projectRemoved(ProjectExplorer::Project *project);
+ void currentProjectChanged(ProjectExplorer::Project *project);
};
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
index 503930b057..92c9f7e82d 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
@@ -63,7 +63,7 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
setLayout(mainLayout);
mainLayout->setFormAlignment(Qt::AlignLeft | Qt::AlignVCenter);
- m_configNameLineEdit = new QLineEdit(m_runConfiguration->name());
+ m_configNameLineEdit = new QLineEdit(m_runConfiguration->displayName());
mainLayout->addRow(tr("Run configuration name:"), m_configNameLineEdit);
QWidget *devConfWidget = new QWidget;
QHBoxLayout *devConfLayout = new QHBoxLayout(devConfWidget);
@@ -105,7 +105,7 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
void MaemoRunConfigurationWidget::configNameEdited(const QString &text)
{
- m_runConfiguration->setName(text);
+ m_runConfiguration->setDisplayName(text);
}
void MaemoRunConfigurationWidget::argumentsEdited(const QString &text)
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.cpp
index 0fe08e2f1d..86f1724dbf 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.cpp
@@ -95,7 +95,7 @@ public:
{
}
- void setName(const QString &name) { m_oldName = name; }
+ void setDisplayName(const QString &name) { m_oldName = name; }
virtual State validate(QString &input, int & /* pos */) const
{
@@ -186,7 +186,7 @@ QString MaemoSettingsPage::id() const
return QLatin1String(PAGE_ID);
}
-QString MaemoSettingsPage::trName() const
+QString MaemoSettingsPage::displayName() const
{
return tr(PAGE_ID_TR);
}
@@ -196,7 +196,7 @@ QString MaemoSettingsPage::category() const
return QLatin1String(Constants::QT_SETTINGS_CATEGORY);
}
-QString MaemoSettingsPage::trCategory() const
+QString MaemoSettingsPage::displayCategory() const
{
return QCoreApplication::translate("Qt4ProjectManager",
Constants::QT_SETTINGS_CATEGORY);
@@ -311,7 +311,7 @@ void MaemoSettingsWidget::display(const MaemoDeviceConfig &devConfig)
m_ui->pwdLineEdit->setText(devConfig.pwd);
m_ui->keyFileLineEdit->setPath(devConfig.keyFile);
m_ui->detailsWidget->setEnabled(true);
- m_nameValidator.setName(devConfig.name);
+ m_nameValidator.setDisplayName(devConfig.name);
m_portValidator.setValue(devConfig.port);
m_timeoutValidator.setValue(devConfig.timeout);
m_ui->detailsWidget->setEnabled(true);
@@ -337,7 +337,7 @@ void MaemoSettingsWidget::configNameEditingFinished()
{
const QString &newName = m_ui->nameLineEdit->text();
currentConfig().name = newName;
- m_nameValidator.setName(newName);
+ m_nameValidator.setDisplayName(newName);
m_ui->configListWidget->currentItem()->setText(newName);
}
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h b/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h
index 0b9171ad8d..ca48160a79 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h
@@ -57,9 +57,9 @@ public:
~MaemoSettingsPage();
virtual QString id() const;
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
virtual void finish();
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
index 4d10173ad7..a7ce8a4b4b 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
@@ -93,9 +93,9 @@ S60DeviceRunConfiguration::S60DeviceRunConfiguration(Project *project, const QSt
m_signingMode(SignSelf)
{
if (!m_proFilePath.isEmpty())
- setName(tr("%1 on Symbian Device").arg(QFileInfo(m_proFilePath).completeBaseName()));
+ setDisplayName(tr("%1 on Symbian Device").arg(QFileInfo(m_proFilePath).completeBaseName()));
else
- setName(tr("QtS60DeviceRunConfiguration"));
+ setDisplayName(tr("QtS60DeviceRunConfiguration"));
connect(project, SIGNAL(targetInformationChanged()),
this, SLOT(invalidateCachedTargetInformation()));
@@ -120,7 +120,7 @@ Qt4Project *S60DeviceRunConfiguration::qt4Project() const
return static_cast<Qt4Project *>(project());
}
-QString S60DeviceRunConfiguration::type() const
+QString S60DeviceRunConfiguration::id() const
{
return QLatin1String("Qt4ProjectManager.DeviceRunConfiguration");
}
@@ -286,7 +286,7 @@ void S60DeviceRunConfiguration::updateTarget()
if (info.error == Qt4TargetInformation::ProParserError) {
Core::ICore::instance()->messageManager()->printToOutputPane(
tr("Could not parse %1. The QtS60 Device run configuration %2 can not be started.")
- .arg(m_proFilePath).arg(name()));
+ .arg(m_proFilePath).arg(displayName()));
}
m_targetName = QString::null;
m_baseFileName = QString::null;
@@ -347,12 +347,12 @@ S60DeviceRunConfigurationFactory::~S60DeviceRunConfigurationFactory()
{
}
-bool S60DeviceRunConfigurationFactory::canRestore(const QString &type) const
+bool S60DeviceRunConfigurationFactory::canRestore(const QString &id) const
{
- return type == "Qt4ProjectManager.DeviceRunConfiguration";
+ return id == "Qt4ProjectManager.DeviceRunConfiguration";
}
-QStringList S60DeviceRunConfigurationFactory::availableCreationTypes(Project *pro) const
+QStringList S60DeviceRunConfigurationFactory::availableCreationIds(Project *pro) const
{
Qt4Project *qt4project = qobject_cast<Qt4Project *>(pro);
if (qt4project) {
@@ -367,21 +367,21 @@ QStringList S60DeviceRunConfigurationFactory::availableCreationTypes(Project *pr
}
}
-QString S60DeviceRunConfigurationFactory::displayNameForType(const QString &type) const
+QString S60DeviceRunConfigurationFactory::displayNameForId(const QString &id) const
{
- QString fileName = type.mid(QString("QtSymbianDeviceRunConfiguration.").size());
+ QString fileName = id.mid(QString("QtSymbianDeviceRunConfiguration.").size());
return tr("%1 on Symbian Device").arg(QFileInfo(fileName).completeBaseName());
}
-RunConfiguration *S60DeviceRunConfigurationFactory::create(Project *project, const QString &type)
+RunConfiguration *S60DeviceRunConfigurationFactory::create(Project *project, const QString &id)
{
Qt4Project *p = qobject_cast<Qt4Project *>(project);
Q_ASSERT(p);
- if (type.startsWith("QtSymbianDeviceRunConfiguration.")) {
- QString fileName = type.mid(QString("QtSymbianDeviceRunConfiguration.").size());
+ if (id.startsWith("QtSymbianDeviceRunConfiguration.")) {
+ QString fileName = id.mid(QString("QtSymbianDeviceRunConfiguration.").size());
return new S60DeviceRunConfiguration(p, fileName);
}
- Q_ASSERT(type == "Qt4ProjectManager.DeviceRunConfiguration");
+ Q_ASSERT(id == "Qt4ProjectManager.DeviceRunConfiguration");
// The right path is set in restoreSettings
RunConfiguration *rc = new S60DeviceRunConfiguration(p, QString::null);
return rc;
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
index 8bfe992aa3..11b3db05b7 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
@@ -67,7 +67,7 @@ public:
Qt4Project *qt4Project() const;
- QString type() const;
+ QString id() const;
bool isEnabled(ProjectExplorer::BuildConfiguration *configuration) const;
QWidget *configurationWidget();
void save(ProjectExplorer::PersistentSettingsWriter &writer) const;
@@ -127,11 +127,11 @@ class S60DeviceRunConfigurationFactory : public ProjectExplorer::IRunConfigurati
public:
explicit S60DeviceRunConfigurationFactory(QObject *parent);
~S60DeviceRunConfigurationFactory();
- bool canRestore(const QString &type) const;
- QStringList availableCreationTypes(ProjectExplorer::Project *pro) const;
- // used to translate the types to names to display to the user
- QString displayNameForType(const QString &type) const;
- ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project, const QString &type);
+ bool canRestore(const QString &id) const;
+ QStringList availableCreationIds(ProjectExplorer::Project *pro) const;
+ // used to translate the ids to names to display to the user
+ QString displayNameForId(const QString &id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project, const QString &id);
};
/* S60DeviceRunControlBase: Builds the package and starts launcher
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp
index 7fbbf9f7fc..ac5820c4b8 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp
@@ -69,7 +69,7 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(
m_runConfiguration(runConfiguration),
m_detailsWidget(new Utils::DetailsWidget),
m_serialPortsCombo(new QComboBox),
- m_nameLineEdit(new QLineEdit(m_runConfiguration->name())),
+ m_nameLineEdit(new QLineEdit(m_runConfiguration->displayName())),
m_sisxFileLabel(new QLabel),
m_deviceInfoButton(new QToolButton),
m_deviceInfoDescriptionLabel(new QLabel(tr("Device:"))),
@@ -162,7 +162,7 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(
keyPath->setPath(m_runConfiguration->customKeyPath());
connect(m_nameLineEdit, SIGNAL(textEdited(QString)),
- this, SLOT(nameEdited(QString)));
+ this, SLOT(displayNameEdited(QString)));
connect(m_runConfiguration, SIGNAL(targetInformationChanged()),
this, SLOT(updateTargetInformation()));
connect(selfSign, SIGNAL(toggled(bool)), this, SLOT(selfSignToggled(bool)));
@@ -216,9 +216,9 @@ CommunicationDevice S60DeviceRunConfigurationWidget::currentDevice() const
return device(m_serialPortsCombo->currentIndex());
}
-void S60DeviceRunConfigurationWidget::nameEdited(const QString &text)
+void S60DeviceRunConfigurationWidget::displayNameEdited(const QString &text)
{
- m_runConfiguration->setName(text);
+ m_runConfiguration->setDisplayName(text);
}
void S60DeviceRunConfigurationWidget::updateTargetInformation()
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h
index 18f736da73..83de31aa4a 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h
@@ -66,7 +66,7 @@ public:
QWidget *parent = 0);
private slots:
- void nameEdited(const QString &text);
+ void displayNameEdited(const QString &text);
void updateTargetInformation();
void updateSerialDevices();
void setSerialPort(int index);
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp
index 9c6e4830ec..5cac9cf955 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.cpp
@@ -109,7 +109,7 @@ QString S60DevicesPreferencePane::id() const
return QLatin1String("Z.S60 SDKs");
}
-QString S60DevicesPreferencePane::trName() const
+QString S60DevicesPreferencePane::displayName() const
{
return tr("S60 SDKs");
}
@@ -119,7 +119,7 @@ QString S60DevicesPreferencePane::category() const
return QLatin1String(Constants::QT_SETTINGS_CATEGORY);
}
-QString S60DevicesPreferencePane::trCategory() const
+QString S60DevicesPreferencePane::displayCategory() const
{
return QCoreApplication::translate("Qt4ProjectManager", Constants::QT_SETTINGS_CATEGORY);
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h
index 92efc14e49..19e9008c51 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicespreferencepane.h
@@ -70,9 +70,9 @@ public:
~S60DevicesPreferencePane();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp
index 2672e54c5e..6e39e1f98f 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.cpp
@@ -58,9 +58,9 @@ S60EmulatorRunConfiguration::S60EmulatorRunConfiguration(Project *project, const
m_cachedTargetInformationValid(false)
{
if (!m_proFilePath.isEmpty())
- setName(tr("%1 in Symbian Emulator").arg(QFileInfo(m_proFilePath).completeBaseName()));
+ setDisplayName(tr("%1 in Symbian Emulator").arg(QFileInfo(m_proFilePath).completeBaseName()));
else
- setName(tr("QtSymbianEmulatorRunConfiguration"));
+ setDisplayName(tr("QtSymbianEmulatorRunConfiguration"));
connect(project, SIGNAL(targetInformationChanged()),
this, SLOT(invalidateCachedTargetInformation()));
@@ -85,7 +85,7 @@ Qt4Project *S60EmulatorRunConfiguration::qt4Project() const
return static_cast<Qt4Project *>(project());
}
-QString S60EmulatorRunConfiguration::type() const
+QString S60EmulatorRunConfiguration::id() const
{
return "Qt4ProjectManager.EmulatorRunConfiguration";
}
@@ -133,7 +133,7 @@ void S60EmulatorRunConfiguration::updateTarget()
if (info.error == Qt4TargetInformation::ProParserError) {
Core::ICore::instance()->messageManager()->printToOutputPane(
tr("Could not parse %1. The Qt for Symbian emulator run configuration %2 can not be started.")
- .arg(m_proFilePath).arg(name()));
+ .arg(m_proFilePath).arg(displayName()));
}
m_executable = QString::null;
m_cachedTargetInformationValid = true;
@@ -170,7 +170,7 @@ S60EmulatorRunConfigurationWidget::S60EmulatorRunConfigurationWidget(S60Emulator
: QWidget(parent),
m_runConfiguration(runConfiguration),
m_detailsWidget(new Utils::DetailsWidget),
- m_nameLineEdit(new QLineEdit(m_runConfiguration->name())),
+ m_nameLineEdit(new QLineEdit(m_runConfiguration->displayName())),
m_executableLabel(new QLabel(m_runConfiguration->executable()))
{
QVBoxLayout *mainBoxLayout = new QVBoxLayout();
@@ -192,15 +192,15 @@ S60EmulatorRunConfigurationWidget::S60EmulatorRunConfigurationWidget(S60Emulator
detailsFormLayout->addRow(tr("Executable:"), m_executableLabel);
connect(m_nameLineEdit, SIGNAL(textEdited(QString)),
- this, SLOT(nameEdited(QString)));
+ this, SLOT(displayNameEdited(QString)));
connect(m_runConfiguration, SIGNAL(targetInformationChanged()),
this, SLOT(updateTargetInformation()));
updateSummary();
}
-void S60EmulatorRunConfigurationWidget::nameEdited(const QString &text)
+void S60EmulatorRunConfigurationWidget::displayNameEdited(const QString &text)
{
- m_runConfiguration->setName(text);
+ m_runConfiguration->setDisplayName(text);
}
void S60EmulatorRunConfigurationWidget::updateTargetInformation()
@@ -224,12 +224,12 @@ S60EmulatorRunConfigurationFactory::~S60EmulatorRunConfigurationFactory()
{
}
-bool S60EmulatorRunConfigurationFactory::canRestore(const QString &type) const
+bool S60EmulatorRunConfigurationFactory::canRestore(const QString &id) const
{
- return type == "Qt4ProjectManager.EmulatorRunConfiguration";
+ return id == "Qt4ProjectManager.EmulatorRunConfiguration";
}
-QStringList S60EmulatorRunConfigurationFactory::availableCreationTypes(Project *pro) const
+QStringList S60EmulatorRunConfigurationFactory::availableCreationIds(Project *pro) const
{
Qt4Project *qt4project = qobject_cast<Qt4Project *>(pro);
if (qt4project) {
@@ -244,21 +244,21 @@ QStringList S60EmulatorRunConfigurationFactory::availableCreationTypes(Project *
}
}
-QString S60EmulatorRunConfigurationFactory::displayNameForType(const QString &type) const
+QString S60EmulatorRunConfigurationFactory::displayNameForId(const QString &id) const
{
- QString fileName = type.mid(QString("QtSymbianEmulatorRunConfiguration.").size());
+ QString fileName = id.mid(QString("QtSymbianEmulatorRunConfiguration.").size());
return tr("%1 in Symbian Emulator").arg(QFileInfo(fileName).completeBaseName());
}
-RunConfiguration *S60EmulatorRunConfigurationFactory::create(Project *project, const QString &type)
+RunConfiguration *S60EmulatorRunConfigurationFactory::create(Project *project, const QString &id)
{
Qt4Project *p = qobject_cast<Qt4Project *>(project);
Q_ASSERT(p);
- if (type.startsWith("QtSymbianEmulatorRunConfiguration.")) {
- QString fileName = type.mid(QString("QtSymbianEmulatorRunConfiguration.").size());
+ if (id.startsWith("QtSymbianEmulatorRunConfiguration.")) {
+ QString fileName = id.mid(QString("QtSymbianEmulatorRunConfiguration.").size());
return new S60EmulatorRunConfiguration(p, fileName);
}
- Q_ASSERT(type == "Qt4ProjectManager.EmulatorRunConfiguration");
+ Q_ASSERT(id == "Qt4ProjectManager.EmulatorRunConfiguration");
// The right path is set in restoreSettings
RunConfiguration *rc = new S60EmulatorRunConfiguration(p, QString::null);
return rc;
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.h
index b5db9a313b..c4aa2103bf 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60emulatorrunconfiguration.h
@@ -59,7 +59,7 @@ public:
Qt4Project *qt4Project() const;
- QString type() const;
+ QString id() const;
bool isEnabled(ProjectExplorer::BuildConfiguration *configuration) const;
QWidget *configurationWidget();
void save(ProjectExplorer::PersistentSettingsWriter &writer) const;
@@ -90,7 +90,7 @@ public:
QWidget *parent = 0);
private slots:
- void nameEdited(const QString &text);
+ void displayNameEdited(const QString &text);
void updateTargetInformation();
void updateSummary();
@@ -107,11 +107,11 @@ class S60EmulatorRunConfigurationFactory : public ProjectExplorer::IRunConfigura
public:
explicit S60EmulatorRunConfigurationFactory(QObject *parent);
~S60EmulatorRunConfigurationFactory();
- bool canRestore(const QString &type) const;
- QStringList availableCreationTypes(ProjectExplorer::Project *pro) const;
- // used to translate the types to names to display to the user
- QString displayNameForType(const QString &type) const;
- ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project, const QString &type);
+ bool canRestore(const QString &id) const;
+ QStringList availableCreationIds(ProjectExplorer::Project *pro) const;
+ // used to translate the ids to names to display to the user
+ QString displayNameForId(const QString &id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project, const QString &id);
};
class S60EmulatorRunControl : public ProjectExplorer::RunControl
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60manager.cpp b/src/plugins/qt4projectmanager/qt-s60/s60manager.cpp
index fa7bf32ee5..e8853ff768 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60manager.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60manager.cpp
@@ -183,12 +183,12 @@ void S60Manager::updateQtVersions()
}
if (deviceVersion) {
deviceVersion->setQMakeCommand(qmakeFromQtDir(device.qt));
- deviceVersion->setName(QString("%1 (Qt %2)").arg(device.id, deviceVersion->qtVersionString()));
+ deviceVersion->setDisplayName(QString("%1 (Qt %2)").arg(device.id, deviceVersion->qtVersionString()));
handledVersions.append(deviceVersion);
} else {
deviceVersion = new QtVersion(QString("%1 (Qt %2)").arg(device.id), qmakeFromQtDir(device.qt),
true, QString("%1.%2").arg(S60_AUTODETECTION_SOURCE, device.id));
- deviceVersion->setName(deviceVersion->name().arg(deviceVersion->qtVersionString()));
+ deviceVersion->setDisplayName(deviceVersion->displayName().arg(deviceVersion->qtVersionString()));
versionsToAdd.append(deviceVersion);
}
deviceVersion->setS60SDKDirectory(device.epocRoot);
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
index eae0c39b8b..2a2a9d49bd 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
@@ -28,8 +28,13 @@
**************************************************************************/
#include "qt4buildconfiguration.h"
+
#include "qt4project.h"
+#include <utils/qtcassert.h>
+
+#include <QtGui/QInputDialog>
+
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
using namespace ProjectExplorer;
@@ -501,3 +506,90 @@ QString Qt4BuildConfiguration::extractSpecFromArgumentList(const QStringList &li
#endif
return parsedSpec;
}
+
+/*!
+ \class Qt4BuildConfigurationFactory
+*/
+
+Qt4BuildConfigurationFactory::Qt4BuildConfigurationFactory(Qt4Project *project)
+ : IBuildConfigurationFactory(project),
+ m_project(project)
+{
+ update();
+
+ QtVersionManager *vm = QtVersionManager::instance();
+ connect(vm, SIGNAL(defaultQtVersionChanged()),
+ this, SLOT(update()));
+ connect(vm, SIGNAL(qtVersionsChanged(QList<int>)),
+ this, SLOT(update()));
+}
+
+Qt4BuildConfigurationFactory::~Qt4BuildConfigurationFactory()
+{
+}
+
+void Qt4BuildConfigurationFactory::update()
+{
+
+ m_versions.clear();
+ m_versions.insert(QLatin1String("DefaultQt"), VersionInfo(tr("Using Default Qt Version"), 0));
+ QtVersionManager *vm = QtVersionManager::instance();
+ foreach (const QtVersion *version, vm->versions()) {
+ m_versions.insert(QString::fromLatin1("Qt%1").arg(version->uniqueId()),
+ VersionInfo(tr("Using Qt Version \"%1\"").arg(version->displayName()), version->uniqueId()));
+ }
+ emit availableCreationIdsChanged();
+}
+
+QStringList Qt4BuildConfigurationFactory::availableCreationIds() const
+{
+ return m_versions.keys();
+}
+
+QString Qt4BuildConfigurationFactory::displayNameForId(const QString &id) const
+{
+ if (m_versions.contains(id))
+ return m_versions.value(id).displayName;
+ return QString();
+}
+
+BuildConfiguration *Qt4BuildConfigurationFactory::create(const QString &id) const
+{
+ QTC_ASSERT(m_versions.contains(id), return false);
+ const VersionInfo &info = m_versions.value(id);
+ QtVersion *version = QtVersionManager::instance()->version(info.versionId);
+ if (!version)
+ return false;
+ bool ok;
+ QString buildConfigurationName = QInputDialog::getText(0,
+ tr("New configuration"),
+ tr("New Configuration Name:"),
+ QLineEdit::Normal,
+ version->displayName(),
+ &ok);
+ if (!ok || buildConfigurationName.isEmpty())
+ return false;
+
+ m_project->addQt4BuildConfiguration(tr("%1 Debug").arg(buildConfigurationName),
+ version,
+ (version->defaultBuildConfig() | QtVersion::DebugBuild));
+ BuildConfiguration *bc =
+ m_project->addQt4BuildConfiguration(tr("%1 Release").arg(buildConfigurationName),
+ version,
+ (version->defaultBuildConfig() & ~QtVersion::DebugBuild));
+ return bc;
+}
+
+BuildConfiguration *Qt4BuildConfigurationFactory::clone(BuildConfiguration *source) const
+{
+ Qt4BuildConfiguration *oldbc = static_cast<Qt4BuildConfiguration *>(source);
+ Qt4BuildConfiguration *newbc = new Qt4BuildConfiguration(oldbc);
+ return newbc;
+}
+
+BuildConfiguration *Qt4BuildConfigurationFactory::restore(const QMap<QString, QVariant> &values) const
+{
+ Qt4BuildConfiguration *bc = new Qt4BuildConfiguration(m_project, values);
+ return bc;
+}
+
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.h b/src/plugins/qt4projectmanager/qt4buildconfiguration.h
index 45febf077f..ea913fe308 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.h
@@ -138,6 +138,37 @@ private:
QtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration;
};
+class Qt4BuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
+{
+ Q_OBJECT
+
+public:
+ Qt4BuildConfigurationFactory(Qt4Project *project);
+ ~Qt4BuildConfigurationFactory();
+
+ QStringList availableCreationIds() const;
+ QString displayNameForId(const QString &id) const;
+
+ ProjectExplorer::BuildConfiguration *create(const QString &id) const;
+ ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::BuildConfiguration *source) const;
+ ProjectExplorer::BuildConfiguration *restore(const QVariantMap &values) const;
+
+private slots:
+ void update();
+
+private:
+ struct VersionInfo {
+ VersionInfo() {}
+ VersionInfo(const QString &d, int v)
+ : displayName(d), versionId(v) { }
+ QString displayName;
+ int versionId;
+ };
+
+ Qt4Project *m_project;
+ QMap<QString, VersionInfo> m_versions;
+};
+
} // namespace Qt4ProjectManager
} // namespace Internal
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index c428cddb03..987e1ec58d 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -237,10 +237,10 @@ namespace Internal {
QMap<QString, InternalNode*>::const_iterator newNodeIter = subnodes.constBegin();;
while (existingNodeIter != existingFolderNodes.constEnd()
&& newNodeIter != subnodes.constEnd()) {
- if ((*existingNodeIter)->name() < newNodeIter.key()) {
+ if ((*existingNodeIter)->displayName() < newNodeIter.key()) {
foldersToRemove << *existingNodeIter;
++existingNodeIter;
- } else if ((*existingNodeIter)->name() > newNodeIter.key()) {
+ } else if ((*existingNodeIter)->displayName() > newNodeIter.key()) {
FolderNode *newNode = new FolderNode(newNodeIter.value()->fullName);
newNode->setFolderName(newNodeIter.key());
if (!newNodeIter.value()->icon.isNull())
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index 2f6a668ce6..6f1a9c3adc 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -219,93 +219,6 @@ void Qt4ProjectFile::modified(Core::IFile::ReloadBehavior *)
{
}
-
-/*!
- \class Qt4BuildConfigurationFactory
-*/
-
-Qt4BuildConfigurationFactory::Qt4BuildConfigurationFactory(Qt4Project *project)
- : IBuildConfigurationFactory(project),
- m_project(project)
-{
- update();
-
- QtVersionManager *vm = QtVersionManager::instance();
- connect(vm, SIGNAL(defaultQtVersionChanged()),
- this, SLOT(update()));
- connect(vm, SIGNAL(qtVersionsChanged(QList<int>)),
- this, SLOT(update()));
-}
-
-Qt4BuildConfigurationFactory::~Qt4BuildConfigurationFactory()
-{
-}
-
-void Qt4BuildConfigurationFactory::update()
-{
-
- m_versions.clear();
- m_versions.insert(QLatin1String("DefaultQt"), VersionInfo(tr("Using Default Qt Version"), 0));
- QtVersionManager *vm = QtVersionManager::instance();
- foreach (const QtVersion *version, vm->versions()) {
- m_versions.insert(QString::fromLatin1("Qt%1").arg(version->uniqueId()),
- VersionInfo(tr("Using Qt Version \"%1\"").arg(version->name()), version->uniqueId()));
- }
- emit availableCreationTypesChanged();
-}
-
-QStringList Qt4BuildConfigurationFactory::availableCreationTypes() const
-{
- return m_versions.keys();
-}
-
-QString Qt4BuildConfigurationFactory::displayNameForType(const QString &type) const
-{
- if (m_versions.contains(type))
- return m_versions.value(type).displayName;
- return QString();
-}
-
-BuildConfiguration *Qt4BuildConfigurationFactory::create(const QString &type) const
-{
- QTC_ASSERT(m_versions.contains(type), return false);
- const VersionInfo &info = m_versions.value(type);
- QtVersion *version = QtVersionManager::instance()->version(info.versionId);
- if (!version)
- return false;
- bool ok;
- QString buildConfigurationName = QInputDialog::getText(0,
- tr("New configuration"),
- tr("New Configuration Name:"),
- QLineEdit::Normal,
- version->name(),
- &ok);
- if (!ok || buildConfigurationName.isEmpty())
- return false;
-
- m_project->addQt4BuildConfiguration(tr("%1 Debug").arg(buildConfigurationName),
- version,
- (version->defaultBuildConfig() | QtVersion::DebugBuild));
- BuildConfiguration *bc =
- m_project->addQt4BuildConfiguration(tr("%1 Release").arg(buildConfigurationName),
- version,
- (version->defaultBuildConfig() & ~QtVersion::DebugBuild));
- return bc;
-}
-
-BuildConfiguration *Qt4BuildConfigurationFactory::clone(BuildConfiguration *source) const
-{
- Qt4BuildConfiguration *oldbc = static_cast<Qt4BuildConfiguration *>(source);
- Qt4BuildConfiguration *newbc = new Qt4BuildConfiguration(oldbc);
- return newbc;
-}
-
-BuildConfiguration *Qt4BuildConfigurationFactory::restore(const QMap<QString, QVariant> &values) const
-{
- Qt4BuildConfiguration *bc = new Qt4BuildConfiguration(m_project, values);
- return bc;
-}
-
/*!
\class Qt4Project
@@ -783,7 +696,7 @@ Qt4Manager *Qt4Project::qt4ProjectManager() const
return m_manager;
}
-QString Qt4Project::name() const
+QString Qt4Project::displayName() const
{
return QFileInfo(file()->fileName()).completeBaseName();
}
diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h
index f0a280f0ae..8c2f6e2fb8 100644
--- a/src/plugins/qt4projectmanager/qt4project.h
+++ b/src/plugins/qt4projectmanager/qt4project.h
@@ -74,6 +74,7 @@ namespace Internal {
struct Qt4ProjectFiles;
class Qt4ProjectConfigWidget;
class Qt4BuildConfiguration;
+ class Qt4BuildConfigurationFactory;
class CodeModelInfo
{
@@ -117,37 +118,6 @@ private:
QString m_filePath;
};
-class Qt4BuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
-{
- Q_OBJECT
-
-public:
- Qt4BuildConfigurationFactory(Qt4Project *project);
- ~Qt4BuildConfigurationFactory();
-
- QStringList availableCreationTypes() const;
- QString displayNameForType(const QString &type) const;
-
- ProjectExplorer::BuildConfiguration *create(const QString &type) const;
- ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::BuildConfiguration *source) const;
- ProjectExplorer::BuildConfiguration *restore(const QMap<QString, QVariant> &values) const;
-
-private slots:
- void update();
-
-private:
- struct VersionInfo {
- VersionInfo() {}
- VersionInfo(const QString &d, int v)
- : displayName(d), versionId(v) { }
- QString displayName;
- int versionId;
- };
-
- Qt4Project *m_project;
- QMap<QString, VersionInfo> m_versions;
-};
-
struct Qt4TargetInformation
{
enum ErrorCode {
@@ -174,7 +144,7 @@ public:
Internal::Qt4BuildConfiguration *activeQt4BuildConfiguration() const;
- QString name() const;
+ QString displayName() const;
Core::IFile *file() const;
ProjectExplorer::IProjectManager *projectManager() const;
Qt4Manager *qt4ProjectManager() const;
@@ -261,7 +231,7 @@ private:
Qt4Manager *m_manager;
Internal::Qt4ProFileNode *m_rootProjectNode;
Internal::Qt4NodesWatcher *m_nodesWatcher;
- Qt4BuildConfigurationFactory *m_buildConfigurationFactory;
+ Internal::Qt4BuildConfigurationFactory *m_buildConfigurationFactory;
Qt4ProjectFile *m_fileInfo;
bool m_isApplication;
diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
index 004e3720fd..1bbdc9d19c 100644
--- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
@@ -116,9 +116,9 @@ void Qt4ProjectConfigWidget::updateDetails()
QtVersion *version = m_buildConfiguration->qtVersion();
QString versionString;
if (m_buildConfiguration->qtVersionId() == 0) {
- versionString = tr("Default Qt Version (%1)").arg(version->name());
+ versionString = tr("Default Qt Version (%1)").arg(version->displayName());
} else if(version){
- versionString = version->name();
+ versionString = version->displayName();
} else {
versionString = tr("No Qt Version set");
}
@@ -203,7 +203,7 @@ void Qt4ProjectConfigWidget::qtVersionsChanged()
QtVersionManager *vm = QtVersionManager::instance();
m_ui->qtVersionComboBox->clear();
- m_ui->qtVersionComboBox->addItem(tr("Default Qt Version (%1)").arg(vm->defaultVersion()->name()), 0);
+ m_ui->qtVersionComboBox->addItem(tr("Default Qt Version (%1)").arg(vm->defaultVersion()->displayName()), 0);
int qtVersionId = m_buildConfiguration->qtVersionId();
@@ -214,7 +214,7 @@ void Qt4ProjectConfigWidget::qtVersionsChanged()
// Add Qt Versions to the combo box
const QList<QtVersion *> &versions = vm->versions();
for (int i = 0; i < versions.size(); ++i) {
- m_ui->qtVersionComboBox->addItem(versions.at(i)->name(), versions.at(i)->uniqueId());
+ m_ui->qtVersionComboBox->addItem(versions.at(i)->displayName(), versions.at(i)->uniqueId());
if (versions.at(i)->uniqueId() == qtVersionId) {
m_ui->qtVersionComboBox->setCurrentIndex(i + 1);
diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
index 3e940b9e74..771ade7ce7 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
+++ b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
@@ -40,8 +40,9 @@ const char * const C_PROFILEEDITOR = ".pro File Editor";
const char * const C_PROFILEEDITOR_PANEL = ".pro File Editor (embedded)";
// kinds
-const char * const PROJECT_KIND = "Qt4";
-const char * const PROFILE_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors", ".pro File Editor");
+const char * const PROJECT_ID = "Qt4.Qt4Project";
+const char * const PROFILE_EDITOR_ID = "Qt4.proFileEditor";
+const char * const PROFILE_EDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", ".pro File Editor");
const char * const PROFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeprofile";
const char * const PROINCLUDEFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeproincludefile";
const char * const CPP_SOURCE_MIMETYPE = "text/x-c++src";
diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
index 4f3fc2ca61..cb5ae5c835 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
@@ -166,7 +166,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
//register actions
m_projectContext = core->uniqueIDManager()->
- uniqueIdentifier(Qt4ProjectManager::Constants::PROJECT_KIND);
+ uniqueIdentifier(Qt4ProjectManager::Constants::PROJECT_ID);
QList<int> context = QList<int>() << m_projectContext;
Core::Command *command;
diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
index e038ac5572..c919531ccd 100644
--- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
@@ -68,9 +68,9 @@ Qt4RunConfiguration::Qt4RunConfiguration(Qt4Project *pro, const QString &proFile
m_baseEnvironmentBase(Qt4RunConfiguration::BuildEnvironmentBase)
{
if (!m_proFilePath.isEmpty())
- setName(QFileInfo(m_proFilePath).completeBaseName());
+ setDisplayName(QFileInfo(m_proFilePath).completeBaseName());
else
- setName(tr("Qt4RunConfiguration"));
+ setDisplayName(tr("Qt4RunConfiguration"));
connect(pro, SIGNAL(targetInformationChanged()),
this, SLOT(invalidateCachedTargetInformation()));
@@ -91,7 +91,7 @@ Qt4Project *Qt4RunConfiguration::qt4Project() const
return static_cast<Qt4Project *>(project());
}
-QString Qt4RunConfiguration::type() const
+QString Qt4RunConfiguration::id() const
{
return "Qt4ProjectManager.Qt4RunConfiguration";
}
@@ -142,7 +142,7 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
toplayout->setMargin(0);
QLabel *nameLabel = new QLabel(tr("Name:"));
- m_nameLineEdit = new QLineEdit(m_qt4RunConfiguration->name());
+ m_nameLineEdit = new QLineEdit(m_qt4RunConfiguration->displayName());
nameLabel->setBuddy(m_nameLineEdit);
toplayout->addRow(nameLabel, m_nameLineEdit);
@@ -221,7 +221,7 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
connect(m_argumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(argumentsEdited(QString)));
connect(m_nameLineEdit, SIGNAL(textEdited(QString)),
- this, SLOT(nameEdited(QString)));
+ this, SLOT(displayNameEdited(QString)));
connect(m_useTerminalCheck, SIGNAL(toggled(bool)),
this, SLOT(termToggled(bool)));
@@ -233,8 +233,8 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
connect(qt4RunConfiguration, SIGNAL(commandLineArgumentsChanged(QString)),
this, SLOT(commandLineArgumentsChanged(QString)));
- connect(qt4RunConfiguration, SIGNAL(nameChanged(QString)),
- this, SLOT(nameChanged(QString)));
+ connect(qt4RunConfiguration, SIGNAL(displayNameChanged(QString)),
+ this, SLOT(displayNameChanged(QString)));
connect(qt4RunConfiguration, SIGNAL(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode)),
this, SLOT(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode)));
connect(qt4RunConfiguration, SIGNAL(usingDyldImageSuffixChanged(bool)),
@@ -317,7 +317,7 @@ void Qt4RunConfigurationWidget::argumentsEdited(const QString &args)
m_ignoreChange = false;
}
-void Qt4RunConfigurationWidget::nameEdited(const QString &name)
+void Qt4RunConfigurationWidget::displayNameEdited(const QString &name)
{
m_ignoreChange = true;
m_qt4RunConfiguration->setUserName(name);
@@ -353,7 +353,7 @@ void Qt4RunConfigurationWidget::commandLineArgumentsChanged(const QString &args)
m_argumentsLineEdit->setText(args);
}
-void Qt4RunConfigurationWidget::nameChanged(const QString &name)
+void Qt4RunConfigurationWidget::displayNameChanged(const QString &name)
{
if (!m_ignoreChange)
m_nameLineEdit->setText(name);
@@ -432,7 +432,7 @@ void Qt4RunConfiguration::restore(const PersistentSettingsReader &reader)
if (!m_proFilePath.isEmpty()) {
m_cachedTargetInformationValid = false;
if (!m_userSetName)
- setName(QFileInfo(m_proFilePath).completeBaseName());
+ setDisplayName(QFileInfo(m_proFilePath).completeBaseName());
}
m_userEnvironmentChanges = ProjectExplorer::EnvironmentItem::fromStringList(reader.restoreValue("UserEnvironmentChanges").toStringList());
QVariant tmp = reader.restoreValue("BaseEnvironmentBase");
@@ -551,14 +551,14 @@ void Qt4RunConfiguration::setRunMode(RunMode runMode)
void Qt4RunConfiguration::setUserName(const QString &name)
{
- if (name == "") {
+ if (name.isEmpty()) {
m_userSetName = false;
- setName(tr("Qt4RunConfiguration"));
+ setDisplayName(tr("Qt4RunConfiguration"));
} else {
m_userSetName = true;
- setName(name);
+ setDisplayName(name);
}
- emit nameChanged(name);
+ emit displayNameChanged(name);
}
QString Qt4RunConfiguration::proFilePath() const
@@ -576,7 +576,7 @@ void Qt4RunConfiguration::updateTarget()
if (info.error == Qt4TargetInformation::ProParserError) {
Core::ICore::instance()->messageManager()->printToOutputPane(
tr("Could not parse %1. The Qt4 run configuration %2 can not be started.")
- .arg(m_proFilePath).arg(name()));
+ .arg(m_proFilePath).arg(displayName()));
}
m_workingDir = QString::null;
m_executable = QString::null;
@@ -648,25 +648,25 @@ Qt4RunConfigurationFactory::~Qt4RunConfigurationFactory()
}
// used to recreate the runConfigurations when restoring settings
-bool Qt4RunConfigurationFactory::canRestore(const QString &type) const
+bool Qt4RunConfigurationFactory::canRestore(const QString &id) const
{
- return type == "Qt4ProjectManager.Qt4RunConfiguration";
+ return id == "Qt4ProjectManager.Qt4RunConfiguration";
}
-ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::create(ProjectExplorer::Project *project, const QString &type)
+ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::create(ProjectExplorer::Project *project, const QString &id)
{
Qt4Project *p = qobject_cast<Qt4Project *>(project);
Q_ASSERT(p);
- if (type.startsWith("Qt4RunConfiguration.")) {
- QString fileName = type.mid(QString("Qt4RunConfiguration.").size());
+ if (id.startsWith("Qt4RunConfiguration.")) {
+ QString fileName = id.mid(QString("Qt4RunConfiguration.").size());
return new Qt4RunConfiguration(p, fileName);
}
- Q_ASSERT(type == "Qt4ProjectManager.Qt4RunConfiguration");
+ Q_ASSERT(id == "Qt4ProjectManager.Qt4RunConfiguration");
// The right path is set in restoreSettings
return new Qt4RunConfiguration(p, QString::null);
}
-QStringList Qt4RunConfigurationFactory::availableCreationTypes(ProjectExplorer::Project *pro) const
+QStringList Qt4RunConfigurationFactory::availableCreationIds(ProjectExplorer::Project *pro) const
{
Qt4Project *qt4project = qobject_cast<Qt4Project *>(pro);
if (qt4project) {
@@ -681,8 +681,8 @@ QStringList Qt4RunConfigurationFactory::availableCreationTypes(ProjectExplorer::
}
}
-QString Qt4RunConfigurationFactory::displayNameForType(const QString &type) const
+QString Qt4RunConfigurationFactory::displayNameForId(const QString &id) const
{
- QString fileName = type.mid(QString("Qt4RunConfiguration.").size());
+ QString fileName = id.mid(QString("Qt4RunConfiguration.").size());
return QFileInfo(fileName).completeBaseName();
}
diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt4runconfiguration.h
index ca3c4630d2..8df1a4b58c 100644
--- a/src/plugins/qt4projectmanager/qt4runconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt4runconfiguration.h
@@ -59,7 +59,7 @@ class Qt4ProFileNode;
class Qt4RunConfiguration : public ProjectExplorer::LocalApplicationRunConfiguration
{
Q_OBJECT
- // to change the name and arguments and set the userenvironmentchanges
+ // to change the display name and arguments and set the userenvironmentchanges
friend class Qt4RunConfigurationWidget;
public:
Qt4RunConfiguration(Qt4Project *pro, const QString &proFilePath);
@@ -67,7 +67,7 @@ public:
Qt4Project *qt4Project() const;
- virtual QString type() const;
+ virtual QString id() const;
virtual bool isEnabled(ProjectExplorer::BuildConfiguration *configuration) const;
virtual QWidget *configurationWidget();
virtual void save(ProjectExplorer::PersistentSettingsWriter &writer) const;
@@ -97,7 +97,7 @@ public slots:
void invalidateCachedTargetInformation();
signals:
- void nameChanged(const QString&);
+ void displayNameChanged(const QString&);
void commandLineArgumentsChanged(const QString&);
void workingDirectoryChanged(const QString&);
void runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode);
@@ -157,12 +157,12 @@ private slots:
void workDirectoryEdited();
void workingDirectoryReseted();
void argumentsEdited(const QString &arguments);
- void nameEdited(const QString &name);
+ void displayNameEdited(const QString &name);
void userChangesEdited();
void workingDirectoryChanged(const QString &workingDirectory);
void commandLineArgumentsChanged(const QString &args);
- void nameChanged(const QString &name);
+ void displayNameChanged(const QString &name);
void runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode);
void userEnvironmentChangesChanged(const QList<ProjectExplorer::EnvironmentItem> &userChanges);
void baseEnvironmentChanged();
@@ -197,10 +197,10 @@ class Qt4RunConfigurationFactory : public ProjectExplorer::IRunConfigurationFact
public:
Qt4RunConfigurationFactory();
virtual ~Qt4RunConfigurationFactory();
- virtual bool canRestore(const QString &type) const;
- virtual ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project, const QString &type);
- QStringList availableCreationTypes(ProjectExplorer::Project *pro) const;
- QString displayNameForType(const QString &type) const;
+ virtual bool canRestore(const QString &id) const;
+ virtual ProjectExplorer::RunConfiguration *create(ProjectExplorer::Project *project, const QString &id);
+ QStringList availableCreationIds(ProjectExplorer::Project *pro) const;
+ QString displayNameForId(const QString &id) const;
};
} // namespace Internal
diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp
index 6e604de2df..08e490acf0 100644
--- a/src/plugins/qt4projectmanager/qtoptionspage.cpp
+++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp
@@ -72,7 +72,7 @@ void DebuggingHelperBuildTask::run(QFutureInterface<void> &future)
future.setProgressValue(1);
const QString output = m_version->buildDebuggingHelperLibrary();
future.setProgressValue(1);
- emit finished(m_version->name(), output);
+ emit finished(m_version->displayName(), output);
deleteLater();
}
@@ -89,7 +89,7 @@ QString QtOptionsPage::id() const
return QLatin1String(Constants::QTVERSION_SETTINGS_PAGE_ID);
}
-QString QtOptionsPage::trName() const
+QString QtOptionsPage::displayName() const
{
return QCoreApplication::translate("Qt4ProjectManager", Constants::QTVERSION_SETTINGS_PAGE_NAME);
}
@@ -99,7 +99,7 @@ QString QtOptionsPage::category() const
return QLatin1String(Constants::QT_SETTINGS_CATEGORY);
}
-QString QtOptionsPage::trCategory() const
+QString QtOptionsPage::displayCategory() const
{
return QCoreApplication::translate("Qt4ProjectManager", Constants::QT_SETTINGS_TR_CATEGORY);
}
@@ -178,7 +178,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
for (int i = 0; i < m_versions.count(); ++i) {
const QtVersion * const version = m_versions.at(i).data();
QTreeWidgetItem *item = new QTreeWidgetItem(version->isAutodetected()? autoItem : manualItem);
- item->setText(0, version->name());
+ item->setText(0, version->displayName());
item->setText(1, QDir::toNativeSeparators(version->qmakeCommand()));
item->setData(0, Qt::UserRole, version->uniqueId());
@@ -188,7 +188,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
item->setData(2, Qt::DecorationRole, QIcon());
}
- m_ui->defaultCombo->addItem(version->name());
+ m_ui->defaultCombo->addItem(version->displayName());
if (i == m_defaultVersion)
m_ui->defaultCombo->setCurrentIndex(i);
}
@@ -275,7 +275,7 @@ static inline int findVersionByName(const QList<QSharedPointerQtVersion> &l, con
{
const int size = l.size();
for (int i = 0; i < size; i++)
- if (l.at(i)->name() == name)
+ if (l.at(i)->displayName() == name)
return i;
return -1;
}
@@ -347,16 +347,16 @@ void QtOptionsPageWidget::addQtDir()
m_versions.append(newVersion);
QTreeWidgetItem *item = new QTreeWidgetItem(m_ui->qtdirList->topLevelItem(1));
- item->setText(0, newVersion->name());
+ item->setText(0, newVersion->displayName());
item->setText(1, QDir::toNativeSeparators(newVersion->qmakeCommand()));
item->setData(0, Qt::UserRole, newVersion->uniqueId());
item->setData(2, Qt::DecorationRole, QIcon());
m_ui->qtdirList->setCurrentItem(item);
- m_ui->nameEdit->setText(newVersion->name());
+ m_ui->nameEdit->setText(newVersion->displayName());
m_ui->qmakePath->setPath(newVersion->qmakeCommand());
- m_ui->defaultCombo->addItem(newVersion->name());
+ m_ui->defaultCombo->addItem(newVersion->displayName());
m_ui->nameEdit->setFocus();
m_ui->nameEdit->selectAll();
@@ -606,7 +606,7 @@ void QtOptionsPageWidget::onMingwBrowsed()
void QtOptionsPageWidget::defaultChanged(int)
{
for (int i=0; i<m_ui->defaultCombo->count(); ++i) {
- if (m_versions.at(i)->name() == m_ui->defaultCombo->currentText()) {
+ if (m_versions.at(i)->displayName() == m_ui->defaultCombo->currentText()) {
m_defaultVersion = i;
return;
}
@@ -622,10 +622,10 @@ void QtOptionsPageWidget::updateCurrentQtName()
int currentItemIndex = indexForTreeItem(currentItem);
if (currentItemIndex < 0)
return;
- m_versions[currentItemIndex]->setName(m_ui->nameEdit->text());
- currentItem->setText(0, m_versions[currentItemIndex]->name());
+ m_versions[currentItemIndex]->setDisplayName(m_ui->nameEdit->text());
+ currentItem->setText(0, m_versions[currentItemIndex]->displayName());
- m_ui->defaultCombo->setItemText(currentItemIndex, m_versions[currentItemIndex]->name());
+ m_ui->defaultCombo->setItemText(currentItemIndex, m_versions[currentItemIndex]->displayName());
}
@@ -644,10 +644,10 @@ void QtOptionsPageWidget::fixQtVersionName(int index)
if (index < 0)
return;
int count = m_versions.count();
- QString name = m_versions.at(index)->name();
+ QString name = m_versions.at(index)->displayName();
for (int i = 0; i < count; ++i) {
if (i != index) {
- if (m_versions.at(i)->name() == m_versions.at(index)->name()) {
+ if (m_versions.at(i)->displayName() == m_versions.at(index)->displayName()) {
// Same name, find new name
QRegExp regexp("^(.*)\\((\\d)\\)$");
if (regexp.exactMatch(name)) {
@@ -657,7 +657,7 @@ void QtOptionsPageWidget::fixQtVersionName(int index)
name = name + " (2)";
}
// set new name
- m_versions[index]->setName(name);
+ m_versions[index]->setDisplayName(name);
treeItemForIndex(index)->setText(0, name);
m_ui->defaultCombo->setItemText(index, name);
diff --git a/src/plugins/qt4projectmanager/qtoptionspage.h b/src/plugins/qt4projectmanager/qtoptionspage.h
index 7c3e2c5053..7441437d1f 100644
--- a/src/plugins/qt4projectmanager/qtoptionspage.h
+++ b/src/plugins/qt4projectmanager/qtoptionspage.h
@@ -134,9 +134,9 @@ class QtOptionsPage : public Core::IOptionsPage
public:
QtOptionsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
void finish() { }
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index 95e5030a02..10530a54e8 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -256,7 +256,7 @@ void QtVersionManager::writeVersionsIntoSettings()
for (int i = 0; i < m_versions.size(); ++i) {
const QtVersion *version = m_versions.at(i);
s->setArrayIndex(i);
- s->setValue("Name", version->name());
+ s->setValue("Name", version->displayName());
// for downwards compat
s->setValue("Path", version->versionInfo().value("QT_INSTALL_DATA"));
s->setValue("QMakePath", version->qmakeCommand());
@@ -363,7 +363,7 @@ void QtVersionManager::updateSystemVersion()
if (version->isAutodetected()
&& version->autodetectionSource() == PATH_AUTODETECTION_SOURCE) {
version->setQMakeCommand(systemQMakePath);
- version->setName(tr("Qt in PATH"));
+ version->setDisplayName(tr("Qt in PATH"));
haveSystemVersion = true;
}
}
@@ -486,7 +486,7 @@ void QtVersionManager::setNewQtVersions(QList<QtVersion *> newVersions, int newD
QtVersion::QtVersion(const QString &name, const QString &qmakeCommand, int id,
bool isAutodetected, const QString &autodetectionSource)
- : m_name(name),
+ : m_displayName(name),
m_isAutodetected(isAutodetected),
m_autodetectionSource(autodetectionSource),
m_hasDebuggingHelper(false),
@@ -508,7 +508,7 @@ QtVersion::QtVersion(const QString &name, const QString &qmakeCommand, int id,
QtVersion::QtVersion(const QString &name, const QString &qmakeCommand,
bool isAutodetected, const QString &autodetectionSource)
- : m_name(name),
+ : m_displayName(name),
m_isAutodetected(isAutodetected),
m_autodetectionSource(autodetectionSource),
m_hasDebuggingHelper(false),
@@ -541,11 +541,11 @@ QtVersion::QtVersion(const QString &qmakeCommand, bool isAutodetected, const QSt
{
m_id = getUniqueId();
setQMakeCommand(qmakeCommand);
- m_name = qtVersionString();
+ m_displayName = qtVersionString();
}
QtVersion::QtVersion()
- : m_name(QString::null),
+ : m_displayName(QString::null),
m_id(-1),
m_isAutodetected(false),
m_hasDebuggingHelper(false),
@@ -573,7 +573,7 @@ QString QtVersion::toHtml() const
QTextStream str(&rc);
str << "<html></head><body><table>";
str << "<tr><td><b>" << QtVersionManager::tr("Name:")
- << "</b></td><td>" << name() << "</td></tr>";
+ << "</b></td><td>" << displayName() << "</td></tr>";
str << "<tr><td><b>" << QtVersionManager::tr("Source:")
<< "</b></td><td>" << sourcePath() << "</td></tr>";
str << "<tr><td><b>" << QtVersionManager::tr("mkspec:")
@@ -603,9 +603,9 @@ QString QtVersion::toHtml() const
return rc;
}
-QString QtVersion::name() const
+QString QtVersion::displayName() const
{
- return m_name;
+ return m_displayName;
}
QString QtVersion::qmakeCommand() const
@@ -641,9 +641,9 @@ QHash<QString,QString> QtVersion::versionInfo() const
return m_versionInfo;
}
-void QtVersion::setName(const QString &name)
+void QtVersion::setDisplayName(const QString &name)
{
- m_name = name;
+ m_displayName = name;
}
void QtVersion::setQMakeCommand(const QString& qmakeCommand)
@@ -1360,7 +1360,7 @@ bool QtVersion::isValid() const
{
updateVersionInfo();
return (!(m_id == -1 || qmakeCommand() == QString::null
- || name() == QString::null) && !m_notInstalled);
+ || displayName() == QString::null) && !m_notInstalled);
}
QtVersion::QmakeBuildConfigs QtVersion::defaultBuildConfig() const
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qt4projectmanager/qtversionmanager.h
index ea09da8adf..6a5cbf7033 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.h
+++ b/src/plugins/qt4projectmanager/qtversionmanager.h
@@ -68,7 +68,7 @@ public:
bool isAutodetected() const { return m_isAutodetected; }
QString autodetectionSource() const { return m_autodetectionSource; }
- QString name() const;
+ QString displayName() const;
QString sourcePath() const;
QString qmakeCommand() const;
QString uicCommand() const;
@@ -86,7 +86,7 @@ public:
/// specifally not the directory the symlink/ORIGINAL_QMAKESPEC points to
QString mkspecPath() const;
- void setName(const QString &name);
+ void setDisplayName(const QString &name);
void setQMakeCommand(const QString &path);
QString qtVersionString() const;
@@ -145,7 +145,7 @@ private:
void updateVersionInfo() const;
QString findQtBinary(const QStringList &possibleName) const;
void updateToolChainAndMkspec() const;
- QString m_name;
+ QString m_displayName;
QString m_sourcePath;
QString m_mingwDirectory;
QString m_msvcVersion;
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
index 4456b6a87c..c3477a5ef9 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
@@ -66,10 +66,10 @@ QWizard *ConsoleAppWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- ConsoleAppWizardDialog *dialog = new ConsoleAppWizardDialog(name(), icon(), extensionPages,
+ ConsoleAppWizardDialog *dialog = new ConsoleAppWizardDialog(displayName(), icon(), extensionPages,
showModulesPageForApplications(), parent);
dialog->setPath(defaultPath);
- dialog->setName(ConsoleAppWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(ConsoleAppWizardDialog::uniqueProjectName(defaultPath));
return dialog;
}
@@ -88,7 +88,7 @@ Core::GeneratedFiles
Core::GeneratedFile source(sourceFileName);
source.setContents(license + QLatin1String(mainCppC));
// Create files: Profile
- const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.name,profileSuffix());
+ const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
QString contents;
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
index 445a34620a..4a7a84dd4b 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
@@ -59,7 +59,7 @@ QtProjectParameters ConsoleAppWizardDialog::parameters() const
{
QtProjectParameters rc;
rc.type = QtProjectParameters::ConsoleApp;
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
rc.selectedModules = selectedModules();
diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp b/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
index b16ea2dbe1..cb8ab14caa 100644
--- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
@@ -46,9 +46,9 @@ QWizard *EmptyProjectWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- EmptyProjectWizardDialog *dialog = new EmptyProjectWizardDialog(name(), icon(), extensionPages, parent);
+ EmptyProjectWizardDialog *dialog = new EmptyProjectWizardDialog(displayName(), icon(), extensionPages, parent);
dialog->setPath(defaultPath);
- dialog->setName(EmptyProjectWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(EmptyProjectWizardDialog::uniqueProjectName(defaultPath));
return dialog;
}
@@ -59,7 +59,7 @@ Core::GeneratedFiles
const EmptyProjectWizardDialog *wizard = qobject_cast< const EmptyProjectWizardDialog *>(w);
const QtProjectParameters params = wizard->parameters();
const QString projectPath = params.projectPath();
- const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.name, profileSuffix());
+ const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
return Core::GeneratedFiles() << profile;
diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
index b32bb7bf03..bd09c18690 100644
--- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
@@ -53,7 +53,7 @@ QtProjectParameters EmptyProjectWizardDialog::parameters() const
{
QtProjectParameters rc;
rc.type = QtProjectParameters::EmptyProject;
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
return rc;
}
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
index 0634a69d87..871cf20cec 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
@@ -83,11 +83,11 @@ QWizard *GuiAppWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- GuiAppWizardDialog *dialog = new GuiAppWizardDialog(name(), icon(), extensionPages,
+ GuiAppWizardDialog *dialog = new GuiAppWizardDialog(displayName(), icon(), extensionPages,
showModulesPageForApplications(),
parent);
dialog->setPath(defaultPath);
- dialog->setName(GuiAppWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(GuiAppWizardDialog::uniqueProjectName(defaultPath));
// Order! suffixes first to generate files correctly
dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles());
dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix());
@@ -169,7 +169,7 @@ Core::GeneratedFiles GuiAppWizard::generateFiles(const QWizard *w,
formHeader.setContents(license + contents);
}
// Create files: profile
- const QString profileName = buildFileName(projectPath, projectParams.name, profileSuffix());
+ const QString profileName = buildFileName(projectPath, projectParams.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
contents.clear();
{
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
index 2c1769369a..97750490c5 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
@@ -87,7 +87,7 @@ QtProjectParameters GuiAppWizardDialog::projectParameters() const
{
QtProjectParameters rc;
rc.type = QtProjectParameters::GuiApp;
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
rc.selectedModules = selectedModules();
rc.deselectedModules = deselectedModules();
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
index cd5cbe0855..6a9ffb3ba8 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
@@ -58,11 +58,11 @@ QWizard *LibraryWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- LibraryWizardDialog *dialog = new LibraryWizardDialog(name(), icon(), extensionPages,
+ LibraryWizardDialog *dialog = new LibraryWizardDialog(displayName(), icon(), extensionPages,
showModulesPageForLibraries(), parent);
dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles());
dialog->setPath(defaultPath);
- dialog->setName(LibraryWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(LibraryWizardDialog::uniqueProjectName(defaultPath));
dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix());
return dialog;
}
@@ -78,7 +78,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
const LibraryParameters params = dialog->libraryParameters();
const QString license = CppTools::AbstractEditorSupport::licenseTemplate();
- const QString sharedLibExportMacro = QtProjectParameters::exportMacro(projectParams.name);
+ const QString sharedLibExportMacro = QtProjectParameters::exportMacro(projectParams.fileName);
Core::GeneratedFiles rc;
// Class header + source
@@ -92,16 +92,16 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
// Create files: global header for shared libs
QString globalHeaderFileName;
if (projectParams.type == QtProjectParameters::SharedLibrary) {
- const QString globalHeaderName = buildFileName(projectPath, projectParams.name + QLatin1String(sharedHeaderPostfixC), headerSuffix());
+ const QString globalHeaderName = buildFileName(projectPath, projectParams.fileName + QLatin1String(sharedHeaderPostfixC), headerSuffix());
Core::GeneratedFile globalHeader(globalHeaderName);
globalHeaderFileName = QFileInfo(globalHeader.path()).fileName();
- globalHeader.setContents(license + LibraryParameters::generateSharedHeader(globalHeaderFileName, projectParams.name, sharedLibExportMacro));
+ globalHeader.setContents(license + LibraryParameters::generateSharedHeader(globalHeaderFileName, projectParams.fileName, sharedLibExportMacro));
rc.push_back(globalHeader);
}
// Generate code
QString headerContents, sourceContents;
- params.generateCode(projectParams.type, projectParams.name, headerFileName,
+ params.generateCode(projectParams.type, projectParams.fileName, headerFileName,
globalHeaderFileName, sharedLibExportMacro,
/* indentation*/ 4, &headerContents, &sourceContents);
@@ -110,7 +110,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
rc.push_back(source);
rc.push_back(header);
// Create files: profile
- const QString profileName = buildFileName(projectPath, projectParams.name, profileSuffix());
+ const QString profileName = buildFileName(projectPath, projectParams.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
QString profileContents;
{
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
index e445f62854..fb6102c503 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
@@ -192,7 +192,7 @@ QtProjectParameters LibraryWizardDialog::parameters() const
{
QtProjectParameters rc;
rc.type = type();
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
if (rc.type == QtProjectParameters::Qt4Plugin) {
// Plugin: Dependencies & Target directory
@@ -236,7 +236,7 @@ void LibraryWizardDialog::slotCurrentIdChanged(int id)
break;
default: {
// Urrm, figure out a good class name. Use project name this time
- QString className = name();
+ QString className = projectName();
if (!className.isEmpty())
className[0] = className.at(0).toUpper();
m_filesPage->setClassName(className);
diff --git a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
index e91aedaa62..4a8ddcfdf7 100644
--- a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.cpp
@@ -50,7 +50,7 @@ QString QtProjectParameters::projectPath() const
QString rc = path;
if (!rc.isEmpty())
rc += QDir::separator();
- rc += name;
+ rc += fileName;
return rc;
}
@@ -60,7 +60,7 @@ void QtProjectParameters::writeProFile(QTextStream &str) const
str << "QT += " << selectedModules << "\n\n";
if (!deselectedModules.isEmpty())
str << "QT -= " << deselectedModules << "\n\n";
- const QString &effectiveTarget = target.isEmpty() ? name : target;
+ const QString &effectiveTarget = target.isEmpty() ? fileName : target;
if (!effectiveTarget.isEmpty())
str << "TARGET = " << effectiveTarget << '\n';
switch (type) {
@@ -74,7 +74,7 @@ void QtProjectParameters::writeProFile(QTextStream &str) const
str << "TEMPLATE = lib\nCONFIG += staticlib\n";
break;
case SharedLibrary:
- str << "TEMPLATE = lib\n\nDEFINES += " << libraryMacro(name) << '\n';
+ str << "TEMPLATE = lib\n\nDEFINES += " << libraryMacro(fileName) << '\n';
break;
case Qt4Plugin:
str << "TEMPLATE = lib\nCONFIG += plugin\n";
diff --git a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
index c361404051..63b45e21df 100644
--- a/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
+++ b/src/plugins/qt4projectmanager/wizards/qtprojectparameters.h
@@ -61,7 +61,7 @@ struct QtProjectParameters {
static QString libraryMacro(const QString &projectName);
Type type;
- QString name;
+ QString fileName;
QString target;
QString path;
QString selectedModules;
diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
index 9bd987f7aa..8651accd10 100644
--- a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
@@ -56,9 +56,9 @@ static inline Core::BaseFileWizardParameters
{
Core::BaseFileWizardParameters rc(Core::IWizard::ProjectWizard);
rc.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY));
- rc.setTrCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
+ rc.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
rc.setIcon(icon);
- rc.setName(name);
+ rc.setDisplayName(name);
rc.setId(id);
rc.setDescription(description);
return rc;
diff --git a/src/plugins/qt4projectmanager/wizards/testwizard.cpp b/src/plugins/qt4projectmanager/wizards/testwizard.cpp
index 2257daa01b..5c1a0fe96d 100644
--- a/src/plugins/qt4projectmanager/wizards/testwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/testwizard.cpp
@@ -53,9 +53,9 @@ QWizard *TestWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- TestWizardDialog *dialog = new TestWizardDialog(name(), icon(), extensionPages, parent);
+ TestWizardDialog *dialog = new TestWizardDialog(displayName(), icon(), extensionPages, parent);
dialog->setPath(defaultPath);
- dialog->setName(TestWizardDialog::projectName(defaultPath));
+ dialog->setProjectName(TestWizardDialog::uniqueProjectName(defaultPath));
return dialog;
}
@@ -160,7 +160,7 @@ Core::GeneratedFiles TestWizard::generateFiles(const QWizard *w, QString *errorM
source.setContents(generateTestCode(testParams, sourceFileInfo.baseName()));
// Create profile with define for base dir to find test data
- const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, projectParams.name, profileSuffix());
+ const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, projectParams.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
QString contents;
{
diff --git a/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
index 266abb5a33..e84fcd27f8 100644
--- a/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
@@ -69,7 +69,7 @@ TestWizardDialog::TestWizardDialog(const QString &templateName,
void TestWizardDialog::slotCurrentIdChanged(int id)
{
if (id == TestPageId)
- m_testPage->setProjectName(name());
+ m_testPage->setProjectName(projectName());
}
TestWizardParameters TestWizardDialog::testParameters() const
@@ -81,7 +81,7 @@ QtProjectParameters TestWizardDialog::projectParameters() const
{
QtProjectParameters rc;
rc.type = QtProjectParameters::ConsoleApp;
- rc.name = name();
+ rc.fileName = projectName();
rc.path = path();
// Name binary "tst_xx" after the main source
rc.target = QFileInfo(m_testPage->sourcefileName()).baseName();
diff --git a/src/plugins/qtscripteditor/qtscripteditor.cpp b/src/plugins/qtscripteditor/qtscripteditor.cpp
index 4a2c9cd489..8b38d97e7f 100644
--- a/src/plugins/qtscripteditor/qtscripteditor.cpp
+++ b/src/plugins/qtscripteditor/qtscripteditor.cpp
@@ -180,9 +180,9 @@ Core::IEditor *ScriptEditorEditable::duplicate(QWidget *parent)
return newEditor->editableInterface();
}
-const char *ScriptEditorEditable::kind() const
+QString ScriptEditorEditable::id() const
{
- return QtScriptEditor::Constants::C_QTSCRIPTEDITOR;
+ return QtScriptEditor::Constants::C_QTSCRIPTEDITOR_ID;
}
ScriptEditor::Context ScriptEditorEditable::context() const
diff --git a/src/plugins/qtscripteditor/qtscripteditor.h b/src/plugins/qtscripteditor/qtscripteditor.h
index 6556176a35..0724be58e6 100644
--- a/src/plugins/qtscripteditor/qtscripteditor.h
+++ b/src/plugins/qtscripteditor/qtscripteditor.h
@@ -56,7 +56,7 @@ public:
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
- const char *kind() const;
+ QString id() const;
bool isTemporary() const { return false; }
diff --git a/src/plugins/qtscripteditor/qtscripteditorconstants.h b/src/plugins/qtscripteditor/qtscripteditorconstants.h
index 0c7704ba0d..2b082229dc 100644
--- a/src/plugins/qtscripteditor/qtscripteditorconstants.h
+++ b/src/plugins/qtscripteditor/qtscripteditorconstants.h
@@ -34,7 +34,8 @@ namespace QtScriptEditor {
namespace Constants {
const char * const M_CONTEXT = "Qt Script Editor.ContextMenu";
-const char * const C_QTSCRIPTEDITOR = "Qt Script Editor";
+const char * const C_QTSCRIPTEDITOR_ID = "Qt4.ScriptEditor";
+const char * const C_QTSCRIPTEDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", "Qt Script Editor");
const char * const C_QTSCRIPTEDITOR_MIMETYPE = "application/javascript";
diff --git a/src/plugins/qtscripteditor/qtscripteditorfactory.cpp b/src/plugins/qtscripteditor/qtscripteditorfactory.cpp
index 7e4ae5715b..a4d306b918 100644
--- a/src/plugins/qtscripteditor/qtscripteditorfactory.cpp
+++ b/src/plugins/qtscripteditor/qtscripteditorfactory.cpp
@@ -46,7 +46,6 @@ using namespace QtScriptEditor::Constants;
QtScriptEditorFactory::QtScriptEditorFactory(const Context &context, QObject *parent)
: Core::IEditorFactory(parent),
- m_kind(QLatin1String(C_QTSCRIPTEDITOR)),
m_mimeTypes(QLatin1String(QtScriptEditor::Constants::C_QTSCRIPTEDITOR_MIMETYPE)),
m_context(context)
{
@@ -56,14 +55,19 @@ QtScriptEditorFactory::~QtScriptEditorFactory()
{
}
-QString QtScriptEditorFactory::kind() const
+QString QtScriptEditorFactory::id() const
{
- return m_kind;
+ return QLatin1String(C_QTSCRIPTEDITOR_ID);
+}
+
+QString QtScriptEditorFactory::displayName() const
+{
+ return tr(C_QTSCRIPTEDITOR_DISPLAY_NAME);
}
Core::IFile *QtScriptEditorFactory::open(const QString &fileName)
{
- Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
+ Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
if (!iface) {
qWarning() << "QtScriptEditorFactory::open: openEditor failed for " << fileName;
return 0;
diff --git a/src/plugins/qtscripteditor/qtscripteditorfactory.h b/src/plugins/qtscripteditor/qtscripteditorfactory.h
index 0556f35f16..d4c664ee37 100644
--- a/src/plugins/qtscripteditor/qtscripteditorfactory.h
+++ b/src/plugins/qtscripteditor/qtscripteditorfactory.h
@@ -55,12 +55,13 @@ public:
virtual QStringList mimeTypes() const;
// IEditorFactory
- QString kind() const;
+ QString id() const;
+ QString displayName() const;
+
Core::IFile *open(const QString &fileName);
Core::IEditor *createEditor(QWidget *parent);
private:
- const QString m_kind;
const QStringList m_mimeTypes;
const Context m_context;
};
diff --git a/src/plugins/qtscripteditor/qtscripteditorplugin.cpp b/src/plugins/qtscripteditor/qtscripteditorplugin.cpp
index d17f981de7..fef32e79a1 100644
--- a/src/plugins/qtscripteditor/qtscripteditorplugin.cpp
+++ b/src/plugins/qtscripteditor/qtscripteditorplugin.cpp
@@ -85,11 +85,11 @@ bool QtScriptEditorPlugin::initialize(const QStringList & /*arguments*/, QString
Core::ICore *core = Core::ICore::instance();
if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":/qtscripteditor/QtScriptEditor.mimetypes.xml"), error_message))
return false;
- m_scriptcontext << core->uniqueIDManager()->uniqueIdentifier(QtScriptEditor::Constants::C_QTSCRIPTEDITOR);
+ m_scriptcontext << core->uniqueIDManager()->uniqueIdentifier(QtScriptEditor::Constants::C_QTSCRIPTEDITOR_ID);
m_context = m_scriptcontext;
m_context << core->uniqueIDManager()->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
- m_actionHandler = new TextEditor::TextEditorActionHandler(QtScriptEditor::Constants::C_QTSCRIPTEDITOR,
+ m_actionHandler = new TextEditor::TextEditorActionHandler(QtScriptEditor::Constants::C_QTSCRIPTEDITOR_ID,
TextEditor::TextEditorActionHandler::Format
| TextEditor::TextEditorActionHandler::UnCommentSelection
| TextEditor::TextEditorActionHandler::UnCollapseAll);
@@ -101,12 +101,12 @@ bool QtScriptEditorPlugin::initialize(const QStringList & /*arguments*/, QString
Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setDescription(tr("Creates a Qt Script file."));
- wizardParameters.setName(tr("Qt Script file"));
+ wizardParameters.setDisplayName(tr("Qt Script file"));
wizardParameters.setId(QLatin1String("Z.Script"));
wizardParameters.setCategory(QLatin1String(Core::Constants::WIZARD_CATEGORY_QT));
- wizardParameters.setTrCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
+ wizardParameters.setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
m_wizard = new TextEditor::TextFileWizard(QLatin1String(QtScriptEditor::Constants::C_QTSCRIPTEDITOR_MIMETYPE),
- QLatin1String(QtScriptEditor::Constants::C_QTSCRIPTEDITOR),
+ QLatin1String(QtScriptEditor::Constants::C_QTSCRIPTEDITOR_ID),
QLatin1String("qtscript$"),
wizardParameters, this);
addObject(m_wizard);
diff --git a/src/plugins/resourceeditor/resourceeditorconstants.h b/src/plugins/resourceeditor/resourceeditorconstants.h
index 525e1e285a..44ac35ec61 100644
--- a/src/plugins/resourceeditor/resourceeditorconstants.h
+++ b/src/plugins/resourceeditor/resourceeditorconstants.h
@@ -33,7 +33,9 @@
namespace ResourceEditor {
namespace Constants {
-const char * const C_RESOURCEEDITOR = "Resource Editor";
+const char * const C_RESOURCEEDITOR_ID = "Qt4.ResourceEditor";
+const char * const C_RESOURCEEDITOR_DISPLAY_NAME = QT_TRANSLATE_NOOP("OpenWith::Editors", "Resource Editor");
+
const char * const C_RESOURCE_MIMETYPE = "application/vnd.nokia.xml.qt.resource";
} // namespace Constants
diff --git a/src/plugins/resourceeditor/resourceeditorfactory.cpp b/src/plugins/resourceeditor/resourceeditorfactory.cpp
index f5f139660d..d8a641ecc6 100644
--- a/src/plugins/resourceeditor/resourceeditorfactory.cpp
+++ b/src/plugins/resourceeditor/resourceeditorfactory.cpp
@@ -45,24 +45,28 @@ using namespace ResourceEditor::Constants;
ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) :
Core::IEditorFactory(plugin),
m_mimeTypes(QStringList(QLatin1String("application/vnd.nokia.xml.qt.resource"))),
- m_kind(QLatin1String(C_RESOURCEEDITOR)),
m_plugin(plugin)
{
m_context += Core::UniqueIDManager::instance()
- ->uniqueIdentifier(QLatin1String(ResourceEditor::Constants::C_RESOURCEEDITOR));
+ ->uniqueIdentifier(QLatin1String(ResourceEditor::Constants::C_RESOURCEEDITOR_ID));
Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance();
iconProvider->registerIconOverlayForSuffix(QIcon(":/resourceeditor/images/qt_qrc.png"),
QLatin1String("qrc"));
}
-QString ResourceEditorFactory::kind() const
+QString ResourceEditorFactory::id() const
{
- return m_kind;
+ return QLatin1String(C_RESOURCEEDITOR_ID);
+}
+
+QString ResourceEditorFactory::displayName() const
+{
+ return tr(C_RESOURCEEDITOR_DISPLAY_NAME);
}
Core::IFile *ResourceEditorFactory::open(const QString &fileName)
{
- Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
+ Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
if (!iface) {
qWarning() << "ResourceEditorFactory::open: openEditor failed for " << fileName;
return 0;
diff --git a/src/plugins/resourceeditor/resourceeditorfactory.h b/src/plugins/resourceeditor/resourceeditorfactory.h
index 2b60f1fd55..f58219c01d 100644
--- a/src/plugins/resourceeditor/resourceeditorfactory.h
+++ b/src/plugins/resourceeditor/resourceeditorfactory.h
@@ -51,13 +51,13 @@ public:
virtual QStringList mimeTypes() const;
// IEditorFactory
- QString kind() const;
+ QString id() const;
+ QString displayName() const;
Core::IFile *open(const QString &fileName);
Core::IEditor *createEditor(QWidget *parent);
private:
const QStringList m_mimeTypes;
- const QString m_kind;
Context m_context;
ResourceEditorPlugin *m_plugin;
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp
index 7f43f6e9f8..e2aad83f57 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.cpp
+++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp
@@ -76,10 +76,10 @@ bool ResourceEditorPlugin::initialize(const QStringList &arguments, QString *err
Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setDescription(tr("Creates a Qt Resource file (.qrc)."));
- wizardParameters.setName(tr("Qt Resource file"));
+ wizardParameters.setDisplayName(tr("Qt Resource file"));
wizardParameters.setId(QLatin1String("F.Resource"));
wizardParameters.setCategory(QLatin1String(Core::Constants::WIZARD_CATEGORY_QT));
- wizardParameters.setTrCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
+ wizardParameters.setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT));
m_wizard = new ResourceWizard(wizardParameters, this);
addObject(m_wizard);
@@ -89,7 +89,7 @@ bool ResourceEditorPlugin::initialize(const QStringList &arguments, QString *err
// Register undo and redo
Core::ActionManager * const actionManager = core->actionManager();
int const pluginId = core->uniqueIDManager()->uniqueIdentifier(
- Constants::C_RESOURCEEDITOR);
+ Constants::C_RESOURCEEDITOR_ID);
const QList<int> idList = QList<int>() << pluginId;
m_undoAction = new QAction(tr("&Undo"), this);
m_redoAction = new QAction(tr("&Redo"), this);
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp
index abc2062b40..db9e835bce 100644
--- a/src/plugins/resourceeditor/resourceeditorw.cpp
+++ b/src/plugins/resourceeditor/resourceeditorw.cpp
@@ -157,8 +157,8 @@ bool ResourceEditorFile::save(const QString &name /*= QString()*/)
return true;
}
-const char *ResourceEditorW::kind() const {
- return ResourceEditor::Constants::C_RESOURCEEDITOR;
+QString ResourceEditorW::id() const {
+ return QLatin1String(ResourceEditor::Constants::C_RESOURCEEDITOR_ID);
}
QString ResourceEditorFile::fileName() const
diff --git a/src/plugins/resourceeditor/resourceeditorw.h b/src/plugins/resourceeditor/resourceeditorw.h
index b6ff35a783..bbbae75c8a 100644
--- a/src/plugins/resourceeditor/resourceeditorw.h
+++ b/src/plugins/resourceeditor/resourceeditorw.h
@@ -90,7 +90,7 @@ public:
bool duplicateSupported() const { return false; }
Core::IEditor *duplicate(QWidget *) { return 0; }
Core::IFile *file() { return m_resourceFile; }
- const char *kind() const;
+ QString id() const;
QString displayName() const { return m_displayName; }
void setDisplayName(const QString &title) { m_displayName = title; }
QWidget *toolBar() { return 0; }
diff --git a/src/plugins/resourceeditor/resourcewizard.cpp b/src/plugins/resourceeditor/resourcewizard.cpp
index 1830cfeb31..eaa5e3a4f3 100644
--- a/src/plugins/resourceeditor/resourcewizard.cpp
+++ b/src/plugins/resourceeditor/resourcewizard.cpp
@@ -49,6 +49,6 @@ ResourceWizard::generateFilesFromPath(const QString &path,
const QString fileName = Core::BaseFileWizard::buildFileName(path, name, suffix);
Core::GeneratedFile file(fileName);
file.setContents(QLatin1String("<RCC/>"));
- file.setEditorKind(QLatin1String(Constants::C_RESOURCEEDITOR));
+ file.setEditorId(QLatin1String(Constants::C_RESOURCEEDITOR_ID));
return Core::GeneratedFiles() << file;
}
diff --git a/src/plugins/subversion/checkoutwizard.cpp b/src/plugins/subversion/checkoutwizard.cpp
index 61d0fd797e..d9721e4009 100644
--- a/src/plugins/subversion/checkoutwizard.cpp
+++ b/src/plugins/subversion/checkoutwizard.cpp
@@ -56,7 +56,7 @@ QString CheckoutWizard::description() const
return tr("Checks out a project from a Subversion repository.");
}
-QString CheckoutWizard::name() const
+QString CheckoutWizard::displayName() const
{
return tr("Subversion Checkout");
}
diff --git a/src/plugins/subversion/checkoutwizard.h b/src/plugins/subversion/checkoutwizard.h
index 15f156dd3e..cf6243b236 100644
--- a/src/plugins/subversion/checkoutwizard.h
+++ b/src/plugins/subversion/checkoutwizard.h
@@ -44,7 +44,7 @@ public:
// IWizard
virtual QIcon icon() const;
virtual QString description() const;
- virtual QString name() const;
+ virtual QString displayName() const;
protected:
// BaseCheckoutWizard
diff --git a/src/plugins/subversion/settingspage.cpp b/src/plugins/subversion/settingspage.cpp
index 6fb8352c53..8e3ae2e3c9 100644
--- a/src/plugins/subversion/settingspage.cpp
+++ b/src/plugins/subversion/settingspage.cpp
@@ -101,7 +101,7 @@ QString SettingsPage::id() const
return QLatin1String(VCSBase::Constants::VCS_ID_SUBVERSION);
}
-QString SettingsPage::trName() const
+QString SettingsPage::displayName() const
{
return tr("Subversion");
}
@@ -111,7 +111,7 @@ QString SettingsPage::category() const
return QLatin1String(VCSBase::Constants::VCS_SETTINGS_CATEGORY);
}
-QString SettingsPage::trCategory() const
+QString SettingsPage::displayCategory() const
{
return QCoreApplication::translate("VCSBase", VCSBase::Constants::VCS_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/subversion/settingspage.h b/src/plugins/subversion/settingspage.h
index f355fce0bb..e6aa2ccaf7 100644
--- a/src/plugins/subversion/settingspage.h
+++ b/src/plugins/subversion/settingspage.h
@@ -70,9 +70,9 @@ public:
SettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/subversion/subversioncontrol.cpp b/src/plugins/subversion/subversioncontrol.cpp
index df653466a6..a3913fe561 100644
--- a/src/plugins/subversion/subversioncontrol.cpp
+++ b/src/plugins/subversion/subversioncontrol.cpp
@@ -41,7 +41,7 @@ SubversionControl::SubversionControl(SubversionPlugin *plugin) :
{
}
-QString SubversionControl::name() const
+QString SubversionControl::displayName() const
{
return QLatin1String("subversion");
}
diff --git a/src/plugins/subversion/subversioncontrol.h b/src/plugins/subversion/subversioncontrol.h
index 6e1f0d3866..99512e53f7 100644
--- a/src/plugins/subversion/subversioncontrol.h
+++ b/src/plugins/subversion/subversioncontrol.h
@@ -43,7 +43,7 @@ class SubversionControl : public Core::IVersionControl
Q_OBJECT
public:
explicit SubversionControl(SubversionPlugin *plugin);
- virtual QString name() const;
+ virtual QString displayName() const;
virtual bool managesDirectory(const QString &directory) const;
virtual QString findTopLevelForDirectory(const QString &directory) const;
diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp
index 2404a20202..a0c3212907 100644
--- a/src/plugins/subversion/subversionplugin.cpp
+++ b/src/plugins/subversion/subversionplugin.cpp
@@ -972,11 +972,11 @@ Core::IEditor * SubversionPlugin::showOutputInEditor(const QString& title, const
{
const VCSBase::VCSBaseEditorParameters *params = findType(editorType);
QTC_ASSERT(params, return 0);
- const QString kind = QLatin1String(params->kind);
+ const QString id = params->id;
if (Subversion::Constants::debug)
- qDebug() << "SubversionPlugin::showOutputInEditor" << title << kind << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
+ qDebug() << "SubversionPlugin::showOutputInEditor" << title << id << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
- Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(kind, &s, output);
+ Core::IEditor *editor = Core::EditorManager::instance()->openEditorWithContents(id, &s, output);
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,int)));
SubversionEditor *e = qobject_cast<SubversionEditor*>(editor->widget());
diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h
index 89786204ed..572a54f918 100644
--- a/src/plugins/texteditor/basetexteditor.h
+++ b/src/plugins/texteditor/basetexteditor.h
@@ -291,7 +291,7 @@ public:
~BaseTextEditor();
static ITextEditor *openEditorAt(const QString &fileName, int line, int column = 0,
- const QString &editorKind = QString());
+ const QString &editorId = QString());
const Utils::ChangeSet &changeSet() const;
void setChangeSet(const Utils::ChangeSet &changeSet);
diff --git a/src/plugins/texteditor/behaviorsettingspage.cpp b/src/plugins/texteditor/behaviorsettingspage.cpp
index 79c0d7e29a..9e6c8fbf8b 100644
--- a/src/plugins/texteditor/behaviorsettingspage.cpp
+++ b/src/plugins/texteditor/behaviorsettingspage.cpp
@@ -83,9 +83,9 @@ QString BehaviorSettingsPage::id() const
return m_d->m_parameters.id;
}
-QString BehaviorSettingsPage::trName() const
+QString BehaviorSettingsPage::displayName() const
{
- return m_d->m_parameters.name;
+ return m_d->m_parameters.displayName;
}
QString BehaviorSettingsPage::category() const
@@ -93,9 +93,9 @@ QString BehaviorSettingsPage::category() const
return m_d->m_parameters.category;
}
-QString BehaviorSettingsPage::trCategory() const
+QString BehaviorSettingsPage::displayCategory() const
{
- return m_d->m_parameters.trCategory;
+ return m_d->m_parameters.displayCategory;
}
QWidget *BehaviorSettingsPage::createPage(QWidget *parent)
diff --git a/src/plugins/texteditor/behaviorsettingspage.h b/src/plugins/texteditor/behaviorsettingspage.h
index a07eb24ef7..389e0c5947 100644
--- a/src/plugins/texteditor/behaviorsettingspage.h
+++ b/src/plugins/texteditor/behaviorsettingspage.h
@@ -45,9 +45,9 @@ struct BehaviorSettings;
struct BehaviorSettingsPageParameters
{
QString id;
- QString name;
+ QString displayName;
QString category;
- QString trCategory;
+ QString displayCategory;
QString settingsPrefix;
};
@@ -61,9 +61,9 @@ public:
// IOptionsPage
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/texteditor/colorscheme.cpp b/src/plugins/texteditor/colorscheme.cpp
index 87ab6efe0c..8feecd69f9 100644
--- a/src/plugins/texteditor/colorscheme.cpp
+++ b/src/plugins/texteditor/colorscheme.cpp
@@ -142,8 +142,8 @@ bool ColorScheme::save(const QString &fileName) const
w.writeStartDocument();
w.writeStartElement(QLatin1String("style-scheme"));
w.writeAttribute(QLatin1String("version"), QLatin1String("1.0"));
- if (!m_name.isEmpty())
- w.writeAttribute(QLatin1String("name"), m_name);
+ if (!m_displayName.isEmpty())
+ w.writeAttribute(QLatin1String("name"), m_displayName);
Format textFormat = formatFor(QLatin1String(Constants::C_TEXT));
@@ -245,7 +245,7 @@ void ColorSchemeReader::readStyleScheme()
// We're done
raiseError(QLatin1String("name loaded"));
else
- m_scheme->setName(m_name);
+ m_scheme->setDisplayName(m_name);
while (readNextStartElement()) {
if (name() == QLatin1String("style"))
diff --git a/src/plugins/texteditor/colorscheme.h b/src/plugins/texteditor/colorscheme.h
index 7ccd9f70fd..22bbc399f8 100644
--- a/src/plugins/texteditor/colorscheme.h
+++ b/src/plugins/texteditor/colorscheme.h
@@ -80,11 +80,11 @@ class ColorScheme
public:
ColorScheme();
- void setName(const QString &name)
- { m_name = name; }
+ void setDisplayName(const QString &name)
+ { m_displayName = name; }
- QString name() const
- { return m_name; }
+ QString displayName() const
+ { return m_displayName; }
inline bool isEmpty() const
{ return m_formats.isEmpty(); }
@@ -104,14 +104,14 @@ public:
inline bool equals(const ColorScheme &cs) const
{
return m_formats == cs.m_formats
- && m_name == cs.m_name;
+ && m_displayName == cs.m_displayName;
}
static QString readNameOfScheme(const QString &fileName);
private:
QMap<QString, Format> m_formats;
- QString m_name;
+ QString m_displayName;
};
inline bool operator==(const ColorScheme &cs1, const ColorScheme &cs2) { return cs1.equals(cs2); }
diff --git a/src/plugins/texteditor/colorschemeedit.cpp b/src/plugins/texteditor/colorschemeedit.cpp
index 9f70d3154d..5de321a680 100644
--- a/src/plugins/texteditor/colorschemeedit.cpp
+++ b/src/plugins/texteditor/colorschemeedit.cpp
@@ -95,23 +95,23 @@ public:
switch (role) {
case Qt::DisplayRole:
- return description.trName();
+ return description.displayName();
case Qt::ForegroundRole: {
- QColor foreground = m_scheme->formatFor(description.name()).foreground();
+ QColor foreground = m_scheme->formatFor(description.id()).foreground();
if (foreground.isValid())
return foreground;
else
return m_scheme->formatFor(QLatin1String(TextEditor::Constants::C_TEXT)).foreground();
}
case Qt::BackgroundRole: {
- QColor background = m_scheme->formatFor(description.name()).background();
+ QColor background = m_scheme->formatFor(description.id()).background();
if (background.isValid())
return background;
}
case Qt::FontRole: {
QFont font = m_baseFont;
- font.setBold(m_scheme->formatFor(description.name()).bold());
- font.setItalic(m_scheme->formatFor(description.name()).italic());
+ font.setBold(m_scheme->formatFor(description.id()).bold());
+ font.setItalic(m_scheme->formatFor(description.id()).italic());
return font;
}
}
@@ -218,7 +218,7 @@ void ColorSchemeEdit::currentItemChanged(const QModelIndex &index)
void ColorSchemeEdit::updateControls()
{
- const Format &format = m_scheme.formatFor(m_descriptions[m_curItem].name());
+ const Format &format = m_scheme.formatFor(m_descriptions[m_curItem].id());
m_ui->foregroundToolButton->setStyleSheet(colorButtonStyleSheet(format.foreground()));
m_ui->backgroundToolButton->setStyleSheet(colorButtonStyleSheet(format.background()));
@@ -238,7 +238,7 @@ void ColorSchemeEdit::changeForeColor()
{
if (m_curItem == -1)
return;
- QColor color = m_scheme.formatFor(m_descriptions[m_curItem].name()).foreground();
+ QColor color = m_scheme.formatFor(m_descriptions[m_curItem].id()).foreground();
const QColor newColor = QColorDialog::getColor(color, m_ui->boldCheckBox->window());
if (!newColor.isValid())
return;
@@ -247,7 +247,7 @@ void ColorSchemeEdit::changeForeColor()
m_ui->foregroundToolButton->setStyleSheet(colorButtonStyleSheet(newColor));
foreach (const QModelIndex &index, m_ui->itemList->selectionModel()->selectedRows()) {
- const QString category = m_descriptions[index.row()].name();
+ const QString category = m_descriptions[index.row()].id();
m_scheme.formatFor(category).setForeground(newColor);
m_formatsModel->emitDataChanged(index);
}
@@ -257,7 +257,7 @@ void ColorSchemeEdit::changeBackColor()
{
if (m_curItem == -1)
return;
- QColor color = m_scheme.formatFor(m_descriptions[m_curItem].name()).background();
+ QColor color = m_scheme.formatFor(m_descriptions[m_curItem].id()).background();
const QColor newColor = QColorDialog::getColor(color, m_ui->boldCheckBox->window());
if (!newColor.isValid())
return;
@@ -265,7 +265,7 @@ void ColorSchemeEdit::changeBackColor()
m_ui->eraseBackgroundToolButton->setEnabled(true);
foreach (const QModelIndex &index, m_ui->itemList->selectionModel()->selectedRows()) {
- const QString category = m_descriptions[index.row()].name();
+ const QString category = m_descriptions[index.row()].id();
m_scheme.formatFor(category).setBackground(newColor);
m_formatsModel->emitDataChanged(index);
// Synchronize item list background with text background
@@ -283,7 +283,7 @@ void ColorSchemeEdit::eraseBackColor()
m_ui->eraseBackgroundToolButton->setEnabled(false);
foreach (const QModelIndex &index, m_ui->itemList->selectionModel()->selectedRows()) {
- const QString category = m_descriptions[index.row()].name();
+ const QString category = m_descriptions[index.row()].id();
m_scheme.formatFor(category).setBackground(newColor);
m_formatsModel->emitDataChanged(index);
}
@@ -295,7 +295,7 @@ void ColorSchemeEdit::checkCheckBoxes()
return;
foreach (const QModelIndex &index, m_ui->itemList->selectionModel()->selectedRows()) {
- const QString category = m_descriptions[index.row()].name();
+ const QString category = m_descriptions[index.row()].id();
m_scheme.formatFor(category).setBold(m_ui->boldCheckBox->isChecked());
m_scheme.formatFor(category).setItalic(m_ui->italicCheckBox->isChecked());
m_formatsModel->emitDataChanged(index);
diff --git a/src/plugins/texteditor/displaysettingspage.cpp b/src/plugins/texteditor/displaysettingspage.cpp
index 19efd49f27..c250ae8ea1 100644
--- a/src/plugins/texteditor/displaysettingspage.cpp
+++ b/src/plugins/texteditor/displaysettingspage.cpp
@@ -74,9 +74,9 @@ QString DisplaySettingsPage::id() const
return m_d->m_parameters.id;
}
-QString DisplaySettingsPage::trName() const
+QString DisplaySettingsPage::displayName() const
{
- return m_d->m_parameters.name;
+ return m_d->m_parameters.displayName;
}
QString DisplaySettingsPage::category() const
@@ -84,9 +84,9 @@ QString DisplaySettingsPage::category() const
return m_d->m_parameters.category;
}
-QString DisplaySettingsPage::trCategory() const
+QString DisplaySettingsPage::displayCategory() const
{
- return m_d->m_parameters.trCategory;
+ return m_d->m_parameters.displayCategory;
}
QWidget *DisplaySettingsPage::createPage(QWidget *parent)
diff --git a/src/plugins/texteditor/displaysettingspage.h b/src/plugins/texteditor/displaysettingspage.h
index 0554aa5149..c6dfe13091 100644
--- a/src/plugins/texteditor/displaysettingspage.h
+++ b/src/plugins/texteditor/displaysettingspage.h
@@ -43,9 +43,9 @@ struct DisplaySettings;
struct DisplaySettingsPageParameters
{
QString id;
- QString name;
+ QString displayName;
QString category;
- QString trCategory;
+ QString displayCategory;
QString settingsPrefix;
};
@@ -59,9 +59,9 @@ public:
// IOptionsPage
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp
index cf14545c8f..e707af2670 100644
--- a/src/plugins/texteditor/fontsettings.cpp
+++ b/src/plugins/texteditor/fontsettings.cpp
@@ -126,8 +126,8 @@ bool FontSettings::fromSettings(const QString &category,
} else {
// Load color scheme from ini file
foreach (const FormatDescription &desc, descriptions) {
- const QString name = desc.name();
- const QString fmt = s->value(group + name, QString()).toString();
+ const QString id = desc.id();
+ const QString fmt = s->value(group + id, QString()).toString();
Format format;
if (fmt.isEmpty()) {
format.setForeground(desc.foreground());
@@ -137,10 +137,10 @@ bool FontSettings::fromSettings(const QString &category,
} else {
format.fromString(fmt);
}
- m_scheme.setFormatFor(name, format);
+ m_scheme.setFormatFor(id, format);
}
- m_scheme.setName(QCoreApplication::translate("TextEditor::Internal::FontSettings", "Customized"));
+ m_scheme.setDisplayName(QCoreApplication::translate("TextEditor::Internal::FontSettings", "Customized"));
}
return true;
@@ -286,14 +286,14 @@ bool FontSettings::loadColorScheme(const QString &fileName,
// Apply default formats to undefined categories
foreach (const FormatDescription &desc, descriptions) {
- const QString name = desc.name();
- if (!m_scheme.contains(name)) {
+ const QString id = desc.id();
+ if (!m_scheme.contains(id)) {
Format format;
format.setForeground(desc.foreground());
format.setBackground(desc.background());
format.setBold(desc.format().bold());
format.setItalic(desc.format().italic());
- m_scheme.setFormatFor(name, format);
+ m_scheme.setFormatFor(id, format);
}
}
diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp
index ea351db3a0..450267ac25 100644
--- a/src/plugins/texteditor/fontsettingspage.cpp
+++ b/src/plugins/texteditor/fontsettingspage.cpp
@@ -125,10 +125,10 @@ public:
public:
const QString m_id;
- const QString m_name;
+ const QString m_displayName;
const QString m_settingsGroup;
const QString m_category;
- const QString m_trCategory;
+ const QString m_displayCategory;
TextEditor::FormatDescriptions m_descriptions;
FontSettings m_value;
@@ -178,14 +178,14 @@ static QString createColorSchemeFileName(const QString &pattern)
// ------- FontSettingsPagePrivate
FontSettingsPagePrivate::FontSettingsPagePrivate(const TextEditor::FormatDescriptions &fd,
const QString &id,
- const QString &name,
+ const QString &displayName,
const QString &category,
const QString &trCategory) :
m_id(id),
- m_name(name),
+ m_displayName(displayName),
m_settingsGroup(Utils::settingsKey(category)),
m_category(category),
- m_trCategory(trCategory),
+ m_displayCategory(trCategory),
m_descriptions(fd),
m_schemeListModel(new SchemeListModel),
m_refreshingSchemeList(false)
@@ -197,22 +197,22 @@ FontSettingsPagePrivate::FontSettingsPagePrivate(const TextEditor::FormatDescrip
if (!settingsFound) { // Apply defaults
foreach (const FormatDescription &f, m_descriptions) {
- const QString name = f.name();
+ const QString id = f.id();
- m_value.formatFor(name).setForeground(f.foreground());
- m_value.formatFor(name).setBackground(f.background());
- m_value.formatFor(name).setBold(f.format().bold());
- m_value.formatFor(name).setItalic(f.format().italic());
+ m_value.formatFor(id).setForeground(f.foreground());
+ m_value.formatFor(id).setBackground(f.background());
+ m_value.formatFor(id).setBold(f.format().bold());
+ m_value.formatFor(id).setItalic(f.format().italic());
}
} else if (m_value.colorSchemeFileName().isEmpty()) {
// No color scheme was loaded, but one might be imported from the ini file
ColorScheme defaultScheme;
foreach (const FormatDescription &f, m_descriptions) {
- const QString name = f.name();
- defaultScheme.formatFor(name).setForeground(f.foreground());
- defaultScheme.formatFor(name).setBackground(f.background());
- defaultScheme.formatFor(name).setBold(f.format().bold());
- defaultScheme.formatFor(name).setItalic(f.format().italic());
+ const QString id = f.id();
+ defaultScheme.formatFor(id).setForeground(f.foreground());
+ defaultScheme.formatFor(id).setBackground(f.background());
+ defaultScheme.formatFor(id).setBold(f.format().bold());
+ defaultScheme.formatFor(id).setItalic(f.format().italic());
}
if (m_value.colorScheme() != defaultScheme) {
// Save it as a color scheme file
@@ -234,32 +234,32 @@ FontSettingsPagePrivate::~FontSettingsPagePrivate()
// ------- FormatDescription
-FormatDescription::FormatDescription(const QString &name, const QString &trName, const QColor &color) :
- m_name(name),
- m_trName(trName)
+FormatDescription::FormatDescription(const QString &id, const QString &displayName, const QColor &color) :
+ m_id(id),
+ m_displayName(displayName)
{
m_format.setForeground(color);
}
QColor FormatDescription::foreground() const
{
- if (m_name == QLatin1String(Constants::C_LINE_NUMBER)) {
+ if (m_id == QLatin1String(Constants::C_LINE_NUMBER)) {
const QColor bg = QApplication::palette().background().color();
if (bg.value() < 128) {
return QApplication::palette().foreground().color();
} else {
return QApplication::palette().dark().color();
}
- } else if (m_name == QLatin1String(Constants::C_CURRENT_LINE_NUMBER)) {
+ } else if (m_id == QLatin1String(Constants::C_CURRENT_LINE_NUMBER)) {
const QColor bg = QApplication::palette().background().color();
if (bg.value() < 128) {
return QApplication::palette().foreground().color();
} else {
return m_format.foreground();
}
- } else if (m_name == QLatin1String(Constants::C_OCCURRENCES_UNUSED)) {
+ } else if (m_id == QLatin1String(Constants::C_OCCURRENCES_UNUSED)) {
return Qt::darkYellow;
- } else if (m_name == QLatin1String(Constants::C_PARENTHESES)) {
+ } else if (m_id == QLatin1String(Constants::C_PARENTHESES)) {
return QColor(Qt::red);
}
return m_format.foreground();
@@ -267,23 +267,23 @@ QColor FormatDescription::foreground() const
QColor FormatDescription::background() const
{
- if (m_name == QLatin1String(Constants::C_TEXT))
+ if (m_id == QLatin1String(Constants::C_TEXT))
return Qt::white;
- else if (m_name == QLatin1String(Constants::C_LINE_NUMBER))
+ else if (m_id == QLatin1String(Constants::C_LINE_NUMBER))
return QApplication::palette().background().color();
- else if (m_name == QLatin1String(Constants::C_SEARCH_RESULT))
+ else if (m_id == QLatin1String(Constants::C_SEARCH_RESULT))
return QColor(0xffef0b);
- else if (m_name == QLatin1String(Constants::C_PARENTHESES))
+ else if (m_id == QLatin1String(Constants::C_PARENTHESES))
return QColor(0xb4, 0xee, 0xb4);
- else if (m_name == QLatin1String(Constants::C_CURRENT_LINE)
- || m_name == QLatin1String(Constants::C_SEARCH_SCOPE)) {
+ else if (m_id == QLatin1String(Constants::C_CURRENT_LINE)
+ || m_id == QLatin1String(Constants::C_SEARCH_SCOPE)) {
const QPalette palette = QApplication::palette();
const QColor &fg = palette.color(QPalette::Highlight);
const QColor &bg = palette.color(QPalette::Base);
qreal smallRatio;
qreal largeRatio;
- if (m_name == QLatin1String(Constants::C_CURRENT_LINE)) {
+ if (m_id == QLatin1String(Constants::C_CURRENT_LINE)) {
smallRatio = .15;
largeRatio = .3;
} else {
@@ -297,14 +297,14 @@ QColor FormatDescription::background() const
fg.greenF() * ratio + bg.greenF() * (1 - ratio),
fg.blueF() * ratio + bg.blueF() * (1 - ratio));
return col;
- } else if (m_name == QLatin1String(Constants::C_SELECTION)) {
+ } else if (m_id == QLatin1String(Constants::C_SELECTION)) {
const QPalette palette = QApplication::palette();
return palette.color(QPalette::Highlight);
- } else if (m_name == QLatin1String(Constants::C_OCCURRENCES)) {
+ } else if (m_id == QLatin1String(Constants::C_OCCURRENCES)) {
return QColor(180, 180, 180);
- } else if (m_name == QLatin1String(Constants::C_OCCURRENCES_RENAME)) {
+ } else if (m_id == QLatin1String(Constants::C_OCCURRENCES_RENAME)) {
return QColor(255, 100, 100);
- } else if (m_name == QLatin1String(Constants::C_DISABLED_CODE)) {
+ } else if (m_id == QLatin1String(Constants::C_DISABLED_CODE)) {
return QColor(239, 239, 239);
}
return QColor(); // invalid color
@@ -332,9 +332,9 @@ QString FontSettingsPage::id() const
return d_ptr->m_id;
}
-QString FontSettingsPage::trName() const
+QString FontSettingsPage::displayName() const
{
- return d_ptr->m_name;
+ return d_ptr->m_displayName;
}
QString FontSettingsPage::category() const
@@ -342,9 +342,9 @@ QString FontSettingsPage::category() const
return d_ptr->m_category;
}
-QString FontSettingsPage::trCategory() const
+QString FontSettingsPage::displayCategory() const
{
- return d_ptr->m_trCategory;
+ return d_ptr->m_displayCategory;
}
QWidget *FontSettingsPage::createPage(QWidget *parent)
@@ -454,7 +454,7 @@ void FontSettingsPage::copyColorScheme()
dialog->setInputMode(QInputDialog::TextInput);
dialog->setWindowTitle(tr("Copy Color Scheme"));
dialog->setLabelText(tr("Color Scheme name:"));
- dialog->setTextValue(tr("%1 (copy)").arg(d_ptr->m_value.colorScheme().name()));
+ dialog->setTextValue(tr("%1 (copy)").arg(d_ptr->m_value.colorScheme().displayName()));
connect(dialog, SIGNAL(textValueSelected(QString)), this, SLOT(copyColorScheme(QString)));
dialog->open();
@@ -480,7 +480,7 @@ void FontSettingsPage::copyColorScheme(const QString &name)
d_ptr->m_value.setColorScheme(d_ptr->ui.schemeEdit->colorScheme());
ColorScheme scheme = d_ptr->m_value.colorScheme();
- scheme.setName(name);
+ scheme.setDisplayName(name);
scheme.save(fileName);
d_ptr->m_value.setColorSchemeFileName(fileName);
@@ -536,7 +536,7 @@ void FontSettingsPage::maybeSaveColorScheme()
QMessageBox *messageBox = new QMessageBox(QMessageBox::Warning,
tr("Color Scheme Changed"),
tr("The color scheme \"%1\" was modified, do you want to save the changes?")
- .arg(d_ptr->ui.schemeEdit->colorScheme().name()),
+ .arg(d_ptr->ui.schemeEdit->colorScheme().displayName()),
QMessageBox::Discard | QMessageBox::Save,
d_ptr->ui.schemeComboBox->window());
diff --git a/src/plugins/texteditor/fontsettingspage.h b/src/plugins/texteditor/fontsettingspage.h
index 4e555c263b..caaa27b595 100644
--- a/src/plugins/texteditor/fontsettingspage.h
+++ b/src/plugins/texteditor/fontsettingspage.h
@@ -49,19 +49,19 @@ namespace Internal {
class FontSettingsPagePrivate;
} // namespace Internal
-// GUI description of a format consisting of name (settings key)
-// and trName to be displayed
+// GUI description of a format consisting of id (settings key)
+// and displayName to be displayed
class TEXTEDITOR_EXPORT FormatDescription
{
public:
- FormatDescription(const QString &name, const QString &trName,
+ FormatDescription(const QString &id, const QString &displayName,
const QColor &foreground = Qt::black);
- QString name() const
- { return m_name; }
+ QString id() const
+ { return m_id; }
- QString trName() const
- { return m_trName; }
+ QString displayName() const
+ { return m_displayName; }
QColor foreground() const;
QColor background() const;
@@ -70,8 +70,8 @@ public:
Format &format() { return m_format; }
private:
- QString m_name; // Name of the category
- QString m_trName; // Displayed name of the category
+ QString m_id; // Name of the category
+ QString m_displayName; // Displayed name of the category
Format m_format; // Default format
};
@@ -91,9 +91,9 @@ public:
~FontSettingsPage();
QString id() const;
- QString trName() const;
+ QString displayName() const;
QString category() const;
- QString trCategory() const;
+ QString displayCategory() const;
QWidget *createPage(QWidget *parent);
void apply();
diff --git a/src/plugins/texteditor/linenumberfilter.h b/src/plugins/texteditor/linenumberfilter.h
index 54bb858bfe..c06b441723 100644
--- a/src/plugins/texteditor/linenumberfilter.h
+++ b/src/plugins/texteditor/linenumberfilter.h
@@ -49,8 +49,8 @@ class LineNumberFilter : public Locator::ILocatorFilter
public:
explicit LineNumberFilter(QObject *parent = 0);
- QString trName() const { return tr("Line in current document"); }
- QString name() const { return "Line in current document"; }
+ QString displayName() const { return tr("Line in current document"); }
+ QString id() const { return "Line in current document"; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::High; }
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
diff --git a/src/plugins/texteditor/plaintexteditor.cpp b/src/plugins/texteditor/plaintexteditor.cpp
index a960943a76..53276f0875 100644
--- a/src/plugins/texteditor/plaintexteditor.cpp
+++ b/src/plugins/texteditor/plaintexteditor.cpp
@@ -42,8 +42,10 @@ PlainTextEditorEditable::PlainTextEditorEditable(PlainTextEditor *editor)
: BaseTextEditorEditable(editor)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
- m_context << uidm->uniqueIdentifier(Core::Constants::K_DEFAULT_TEXT_EDITOR);
+ m_context << uidm->uniqueIdentifier(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
m_context << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
+
+ setDisplayName(tr(Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME));
}
PlainTextEditor::PlainTextEditor(QWidget *parent)
@@ -55,6 +57,7 @@ PlainTextEditor::PlainTextEditor(QWidget *parent)
setLineSeparatorsAllowed(true);
setMimeType(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT));
+ setDisplayName(tr(Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME));
}
QList<int> PlainTextEditorEditable::context() const
@@ -70,9 +73,9 @@ Core::IEditor *PlainTextEditorEditable::duplicate(QWidget *parent)
return newEditor->editableInterface();
}
-const char *PlainTextEditorEditable::kind() const
+QString PlainTextEditorEditable::id() const
{
- return Core::Constants::K_DEFAULT_TEXT_EDITOR;
+ return QLatin1String(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
}
// Indent a text block based on previous line.
diff --git a/src/plugins/texteditor/plaintexteditor.h b/src/plugins/texteditor/plaintexteditor.h
index 68ac887d6d..5c570b0c25 100644
--- a/src/plugins/texteditor/plaintexteditor.h
+++ b/src/plugins/texteditor/plaintexteditor.h
@@ -46,7 +46,7 @@ public:
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
- const char *kind() const;
+ QString id() const;
bool isTemporary() const { return false; }
private:
QList<int> m_context;
diff --git a/src/plugins/texteditor/plaintexteditorfactory.cpp b/src/plugins/texteditor/plaintexteditorfactory.cpp
index db7a1764cc..cff72e1126 100644
--- a/src/plugins/texteditor/plaintexteditorfactory.cpp
+++ b/src/plugins/texteditor/plaintexteditorfactory.cpp
@@ -40,8 +40,7 @@ using namespace TextEditor;
using namespace TextEditor::Internal;
PlainTextEditorFactory::PlainTextEditorFactory(QObject *parent)
- : Core::IEditorFactory(parent),
- m_kind(Core::Constants::K_DEFAULT_TEXT_EDITOR)
+ : Core::IEditorFactory(parent)
{
m_actionHandler = new TextEditorActionHandler(
QLatin1String(TextEditor::Constants::C_TEXTEDITOR),
@@ -55,14 +54,19 @@ PlainTextEditorFactory::~PlainTextEditorFactory()
delete m_actionHandler;
}
-QString PlainTextEditorFactory::kind() const
+QString PlainTextEditorFactory::id() const
{
- return m_kind;
+ return QLatin1String(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
+}
+
+QString PlainTextEditorFactory::displayName() const
+{
+ return tr(Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME);
}
Core::IFile *PlainTextEditorFactory::open(const QString &fileName)
{
- Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
+ Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
return iface ? iface->file() : 0;
}
diff --git a/src/plugins/texteditor/plaintexteditorfactory.h b/src/plugins/texteditor/plaintexteditorfactory.h
index 9f3f8b4b2c..f9a812bdb5 100644
--- a/src/plugins/texteditor/plaintexteditorfactory.h
+++ b/src/plugins/texteditor/plaintexteditorfactory.h
@@ -52,14 +52,15 @@ public:
virtual QStringList mimeTypes() const;
//Core::IEditorFactory
- QString kind() const;
+ QString id() const;
+ QString displayName() const;
+
Core::IFile *open(const QString &fileName);
Core::IEditor *createEditor(QWidget *parent);
TextEditor::TextEditorActionHandler *actionHandler() const { return m_actionHandler; }
private:
- const QString m_kind;
QStringList m_mimeTypes;
TextEditor::TextEditorActionHandler *m_actionHandler;
};
diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp
index ea2b6e0168..db17b7bc58 100644
--- a/src/plugins/texteditor/texteditorplugin.cpp
+++ b/src/plugins/texteditor/texteditorplugin.cpp
@@ -92,11 +92,11 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setDescription(tr("Creates a text file (.txt)."));
- wizardParameters.setName(tr("Text File"));
+ wizardParameters.setDisplayName(tr("Text File"));
wizardParameters.setCategory(QLatin1String("O.General"));
- wizardParameters.setTrCategory(tr("General"));
+ wizardParameters.setDisplayCategory(tr("General"));
m_wizard = new TextFileWizard(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT),
- QLatin1String(Core::Constants::K_DEFAULT_TEXT_EDITOR),
+ QLatin1String(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID),
QLatin1String("text$"),
wizardParameters);
// Add text file wizard
diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp
index 7047ee1bcd..dd74c18432 100644
--- a/src/plugins/texteditor/texteditorsettings.cpp
+++ b/src/plugins/texteditor/texteditorsettings.cpp
@@ -104,28 +104,28 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
formatDescriptions.append(FormatDescription(QLatin1String(C_DIFF_LOCATION), tr("Diff Location"), Qt::blue));
const QString category = QLatin1String(Constants::TEXT_EDITOR_SETTINGS_CATEGORY);
- const QString trCategory = QCoreApplication::translate("TextEditor", Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY);
+ const QString displayCategory = QCoreApplication::translate("TextEditor", Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY);
m_fontSettingsPage = new FontSettingsPage(formatDescriptions,
QLatin1String("A.FontSettings"),
- category, trCategory, this);
+ category, displayCategory, this);
pm->addObject(m_fontSettingsPage);
// Add the GUI used to configure the tab, storage and interaction settings
TextEditor::BehaviorSettingsPageParameters behaviorSettingsPageParameters;
behaviorSettingsPageParameters.id = QLatin1String("B.BehaviourSettings");
- behaviorSettingsPageParameters.name = tr("Behavior");
+ behaviorSettingsPageParameters.displayName = tr("Behavior");
behaviorSettingsPageParameters.category = category;
- behaviorSettingsPageParameters.trCategory = trCategory;
+ behaviorSettingsPageParameters.displayCategory = displayCategory;
behaviorSettingsPageParameters.settingsPrefix = QLatin1String("text");
m_behaviorSettingsPage = new BehaviorSettingsPage(behaviorSettingsPageParameters, this);
pm->addObject(m_behaviorSettingsPage);
TextEditor::DisplaySettingsPageParameters displaySettingsPageParameters;
displaySettingsPageParameters.id = QLatin1String("D.DisplaySettings"),
- displaySettingsPageParameters.name = tr("Display");
+ displaySettingsPageParameters.displayName = tr("Display");
displaySettingsPageParameters.category = category;;
- displaySettingsPageParameters.trCategory = trCategory;
+ displaySettingsPageParameters.displayCategory = displayCategory;
displaySettingsPageParameters.settingsPrefix = QLatin1String("text");
m_displaySettingsPage = new DisplaySettingsPage(displaySettingsPageParameters, this);
pm->addObject(m_displaySettingsPage);
diff --git a/src/plugins/texteditor/textfilewizard.cpp b/src/plugins/texteditor/textfilewizard.cpp
index 9b504854e9..9e7595d458 100644
--- a/src/plugins/texteditor/textfilewizard.cpp
+++ b/src/plugins/texteditor/textfilewizard.cpp
@@ -35,13 +35,13 @@
using namespace TextEditor;
TextFileWizard::TextFileWizard(const QString &mimeType,
- const QString &editorKind,
+ const QString &editorId,
const QString &suggestedFileName,
const BaseFileWizardParameters &parameters,
QObject *parent) :
Core::StandardFileWizard(parameters, parent),
m_mimeType(mimeType),
- m_editorKind(editorKind),
+ m_editorId(editorId),
m_suggestedFileName(suggestedFileName)
{
}
@@ -53,6 +53,6 @@ Core::GeneratedFiles
const QString suffix = preferredSuffix(m_mimeType);
const QString fileName = Core::BaseFileWizard::buildFileName(path, name, suffix);
Core::GeneratedFile file(fileName);
- file.setEditorKind(m_editorKind);
+ file.setEditorId(m_editorId);
return Core::GeneratedFiles() << file;
}
diff --git a/src/plugins/texteditor/textfilewizard.h b/src/plugins/texteditor/textfilewizard.h
index bfb38ff963..53217048f3 100644
--- a/src/plugins/texteditor/textfilewizard.h
+++ b/src/plugins/texteditor/textfilewizard.h
@@ -43,7 +43,7 @@ class TEXTEDITOR_EXPORT TextFileWizard : public Core::StandardFileWizard
public:
typedef Core::BaseFileWizardParameters BaseFileWizardParameters;
TextFileWizard(const QString &mimeType,
- const QString &editorKind,
+ const QString &editorId,
const QString &suggestedFileName,
const BaseFileWizardParameters &parameters,
QObject *parent = 0);
@@ -54,7 +54,7 @@ protected:
QString *errorMessage) const;
private:
const QString m_mimeType;
- const QString m_editorKind;
+ const QString m_editorId;
const QString m_suggestedFileName;
};
diff --git a/src/plugins/vcsbase/basecheckoutwizard.cpp b/src/plugins/vcsbase/basecheckoutwizard.cpp
index 6005987d54..23fba97e7b 100644
--- a/src/plugins/vcsbase/basecheckoutwizard.cpp
+++ b/src/plugins/vcsbase/basecheckoutwizard.cpp
@@ -80,7 +80,7 @@ QString BaseCheckoutWizard::category() const
return QLatin1String(VCSBase::Constants::VCS_WIZARD_CATEGORY);
}
-QString BaseCheckoutWizard::trCategory() const
+QString BaseCheckoutWizard::displayCategory() const
{
return QCoreApplication::translate("VCSBase", VCSBase::Constants::VCS_WIZARD_TR_CATEGORY);
}
@@ -102,7 +102,7 @@ QStringList BaseCheckoutWizard::runWizard(const QString &path, QWidget *parent)
Internal::CheckoutWizardDialog dialog(d->parameterPages, parent);
d->dialog = &dialog;
connect(&dialog, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown()));
- dialog.setWindowTitle(name());
+ dialog.setWindowTitle(displayName());
if (dialog.exec() != QDialog::Accepted)
return QStringList();
// Now try to find the project file and open
diff --git a/src/plugins/vcsbase/basecheckoutwizard.h b/src/plugins/vcsbase/basecheckoutwizard.h
index deab4ee3f8..3596c6a7cc 100644
--- a/src/plugins/vcsbase/basecheckoutwizard.h
+++ b/src/plugins/vcsbase/basecheckoutwizard.h
@@ -70,7 +70,7 @@ public:
virtual Kind kind() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QString id() const;
virtual QStringList runWizard(const QString &path, QWidget *parent);
diff --git a/src/plugins/vcsbase/basevcseditorfactory.cpp b/src/plugins/vcsbase/basevcseditorfactory.cpp
index 633d2e1722..0751a59878 100644
--- a/src/plugins/vcsbase/basevcseditorfactory.cpp
+++ b/src/plugins/vcsbase/basevcseditorfactory.cpp
@@ -42,14 +42,14 @@ struct BaseVCSEditorFactoryPrivate
BaseVCSEditorFactoryPrivate(const VCSBaseEditorParameters *t);
const VCSBaseEditorParameters *m_type;
- const QString m_kind;
+ const QString m_id;
const QStringList m_mimeTypes;
TextEditor::TextEditorActionHandler *m_editorHandler;
};
BaseVCSEditorFactoryPrivate::BaseVCSEditorFactoryPrivate(const VCSBaseEditorParameters *t) :
m_type(t),
- m_kind(QLatin1String(t->kind)),
+ m_id(t->id),
m_mimeTypes(QStringList(QLatin1String(t->mimeType))),
m_editorHandler(new TextEditor::TextEditorActionHandler(t->context))
{
@@ -70,14 +70,19 @@ QStringList BaseVCSEditorFactory::mimeTypes() const
return m_d->m_mimeTypes;
}
-QString BaseVCSEditorFactory::kind() const
+QString BaseVCSEditorFactory::id() const
{
- return m_d->m_kind;
+ return m_d->m_id;
+}
+
+QString BaseVCSEditorFactory::displayName() const
+{
+ return tr("Base VCS Editor", "VCSBase BaseVCSEditorFactory display name.");
}
Core::IFile *BaseVCSEditorFactory::open(const QString &fileName)
{
- Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
+ Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
return iface ? iface->file() : 0;
}
diff --git a/src/plugins/vcsbase/basevcseditorfactory.h b/src/plugins/vcsbase/basevcseditorfactory.h
index 97ad4628d4..0f81294d01 100644
--- a/src/plugins/vcsbase/basevcseditorfactory.h
+++ b/src/plugins/vcsbase/basevcseditorfactory.h
@@ -53,7 +53,9 @@ public:
virtual QStringList mimeTypes() const;
// IEditorFactory
- virtual QString kind() const;
+ virtual QString id() const;
+ virtual QString displayName() const;
+
virtual Core::IFile *open(const QString &fileName);
virtual Core::IEditor *createEditor(QWidget *parent);
diff --git a/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp b/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp
index e402dcbd61..0ca8dc05da 100644
--- a/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp
+++ b/src/plugins/vcsbase/basevcssubmiteditorfactory.cpp
@@ -39,13 +39,15 @@ struct BaseVCSSubmitEditorFactoryPrivate
BaseVCSSubmitEditorFactoryPrivate(const VCSBaseSubmitEditorParameters *parameters);
const VCSBaseSubmitEditorParameters *m_parameters;
- const QString m_kind;
+ const QString m_id;
+ const QString m_displayName;
const QStringList m_mimeTypes;
};
BaseVCSSubmitEditorFactoryPrivate::BaseVCSSubmitEditorFactoryPrivate(const VCSBaseSubmitEditorParameters *parameters) :
m_parameters(parameters),
- m_kind(QLatin1String(parameters->kind)),
+ m_id(parameters->id),
+ m_displayName(parameters->displayName),
m_mimeTypes(QLatin1String(parameters->mimeType))
{
}
@@ -65,11 +67,17 @@ Core::IEditor *BaseVCSSubmitEditorFactory::createEditor(QWidget *parent)
return createBaseSubmitEditor(m_d->m_parameters, parent);
}
-QString BaseVCSSubmitEditorFactory::kind() const
+QString BaseVCSSubmitEditorFactory::id() const
{
- return m_d->m_kind;
+ return m_d->m_id;
}
+QString BaseVCSSubmitEditorFactory::displayName() const
+{
+ return m_d->m_displayName;
+}
+
+
QStringList BaseVCSSubmitEditorFactory::mimeTypes() const
{
return m_d->m_mimeTypes;
@@ -77,7 +85,7 @@ QStringList BaseVCSSubmitEditorFactory::mimeTypes() const
Core::IFile *BaseVCSSubmitEditorFactory::open(const QString &fileName)
{
- if (Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind()))
+ if (Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id()))
return iface->file();
return 0;
}
diff --git a/src/plugins/vcsbase/basevcssubmiteditorfactory.h b/src/plugins/vcsbase/basevcssubmiteditorfactory.h
index 0024f52970..efb3ec9676 100644
--- a/src/plugins/vcsbase/basevcssubmiteditorfactory.h
+++ b/src/plugins/vcsbase/basevcssubmiteditorfactory.h
@@ -53,7 +53,8 @@ public:
virtual ~BaseVCSSubmitEditorFactory();
virtual Core::IEditor *createEditor(QWidget *parent);
- virtual QString kind() const;
+ virtual QString id() const;
+ virtual QString displayName() const;
virtual QStringList mimeTypes() const;
Core::IFile *open(const QString &fileName);
diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp
index 771f5b03fb..8f65b8bd2c 100644
--- a/src/plugins/vcsbase/vcsbaseeditor.cpp
+++ b/src/plugins/vcsbase/vcsbaseeditor.cpp
@@ -81,7 +81,7 @@ public:
bool duplicateSupported() const { return false; }
Core::IEditor *duplicate(QWidget * /*parent*/) { return 0; }
- const char *kind() const { return m_kind; }
+ QString id() const { return m_id; }
bool isTemporary() const { return true; }
@@ -90,14 +90,14 @@ signals:
void annotateRevisionRequested(const QString &source, const QString &change, int line);
private:
- const char *m_kind;
+ QString m_id;
QList<int> m_context;
};
VCSBaseEditorEditable::VCSBaseEditorEditable(VCSBaseEditor *editor,
const VCSBaseEditorParameters *type) :
BaseTextEditorEditable(editor),
- m_kind(type->kind)
+ m_id(type->id)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_context << uidm->uniqueIdentifier(QLatin1String(type->context))
@@ -180,7 +180,7 @@ VCSBaseEditor::VCSBaseEditor(const VCSBaseEditorParameters *type, QWidget *paren
d(new VCSBaseEditorPrivate(type))
{
if (VCSBase::Constants::Internal::debug)
- qDebug() << "VCSBaseEditor::VCSBaseEditor" << type->type << type->kind;
+ qDebug() << "VCSBaseEditor::VCSBaseEditor" << type->type << type->id;
setReadOnly(true);
viewport()->setMouseTracking(true);
@@ -674,7 +674,7 @@ static QTextCodec *findProjectCodec(const QString &dir)
if (file->fileName().startsWith(dir)) {
QTextCodec *codec = (*it)->editorConfiguration()->defaultTextCodec();
if (VCSBase::Constants::Internal::debug)
- qDebug() << Q_FUNC_INFO << dir << (*it)->name() << codec->name();
+ qDebug() << Q_FUNC_INFO << dir << (*it)->displayName() << codec->name();
return codec;
}
}
diff --git a/src/plugins/vcsbase/vcsbaseeditor.h b/src/plugins/vcsbase/vcsbaseeditor.h
index 5ba893e007..a47461bee7 100644
--- a/src/plugins/vcsbase/vcsbaseeditor.h
+++ b/src/plugins/vcsbase/vcsbaseeditor.h
@@ -70,11 +70,12 @@ enum EditorContentType {
};
// Helper struct used to parametrize an editor with mime type, context
-// and kind. The extension is currently only a suggestion when running
+// and id. The extension is currently only a suggestion when running
// VCS commands with redirection.
struct VCSBASE_EXPORT VCSBaseEditorParameters {
EditorContentType type;
- const char *kind;
+ QString id;
+ QString displayName;
const char *context;
const char *mimeType;
const char *extension;
diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp
index dd0007ac85..07b719414d 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.cpp
+++ b/src/plugins/vcsbase/vcsbaseplugin.cpp
@@ -194,7 +194,7 @@ void StateListener::slotStateChanged()
Core::IVersionControl *projectControl = 0;
if (const ProjectExplorer::Project *currentProject = pe->currentProject()) {
state.currentProjectPath = QFileInfo(currentProject->file()->fileName()).absolutePath();
- state.currentProjectName = currentProject->name();
+ state.currentProjectName = currentProject->displayName();
projectControl = vcsManager->findVersionControlForDirectory(state.currentProjectPath,
&state.currentProjectTopLevel);
if (projectControl) {
@@ -209,7 +209,7 @@ void StateListener::slotStateChanged()
// Assemble state and emit signal.
Core::IVersionControl *vc = state.currentFile.isEmpty() ? projectControl : fileControl;
if (debug)
- qDebug() << state << (vc ? vc->name() : QString(QLatin1String("No version control")));
+ qDebug() << state << (vc ? vc->displayName() : QString(QLatin1String("No version control")));
emit stateChanged(state, vc);
}
@@ -342,9 +342,9 @@ VCSBASE_EXPORT QDebug operator<<(QDebug in, const VCSBasePluginState &state)
// VCSBasePlugin
struct VCSBasePluginPrivate {
- explicit VCSBasePluginPrivate(const QString &submitEditorKind);
+ explicit VCSBasePluginPrivate(const QString &submitEditorId);
- const QString m_submitEditorKind;
+ const QString m_submitEditorId;
Core::IVersionControl *m_versionControl;
VCSBasePluginState m_state;
int m_actionState;
@@ -352,8 +352,8 @@ struct VCSBasePluginPrivate {
static Internal::StateListener *m_listener;
};
-VCSBasePluginPrivate::VCSBasePluginPrivate(const QString &submitEditorKind) :
- m_submitEditorKind(submitEditorKind),
+VCSBasePluginPrivate::VCSBasePluginPrivate(const QString &submitEditorId) :
+ m_submitEditorId(submitEditorId),
m_versionControl(0),
m_actionState(-1)
{
@@ -361,8 +361,8 @@ VCSBasePluginPrivate::VCSBasePluginPrivate(const QString &submitEditorKind) :
Internal::StateListener *VCSBasePluginPrivate::m_listener = 0;
-VCSBasePlugin::VCSBasePlugin(const QString &submitEditorKind) :
- d(new VCSBasePluginPrivate(submitEditorKind))
+VCSBasePlugin::VCSBasePlugin(const QString &submitEditorId) :
+ d(new VCSBasePluginPrivate(submitEditorId))
{
}
@@ -391,8 +391,8 @@ void VCSBasePlugin::initialize(Core::IVersionControl *vc)
void VCSBasePlugin::slotSubmitEditorAboutToClose(VCSBaseSubmitEditor *submitEditor, bool *result)
{
if (debug)
- qDebug() << this << d->m_submitEditorKind << "Closing submit editor" << submitEditor << submitEditor->kind();
- if (submitEditor->kind() == d->m_submitEditorKind)
+ qDebug() << this << d->m_submitEditorId << "Closing submit editor" << submitEditor << submitEditor->id();
+ if (submitEditor->id() == d->m_submitEditorId)
*result = submitEditorAboutToClose(submitEditor);
}
diff --git a/src/plugins/vcsbase/vcsbaseplugin.h b/src/plugins/vcsbase/vcsbaseplugin.h
index 95e5cc1975..70f3e8f20a 100644
--- a/src/plugins/vcsbase/vcsbaseplugin.h
+++ b/src/plugins/vcsbase/vcsbaseplugin.h
@@ -139,7 +139,7 @@ class VCSBASE_EXPORT VCSBasePlugin : public ExtensionSystem::IPlugin
Q_OBJECT
protected:
- explicit VCSBasePlugin(const QString &submitEditorKind);
+ explicit VCSBasePlugin(const QString &submitEditorId);
void initialize(Core::IVersionControl *vc);
diff --git a/src/plugins/vcsbase/vcsbasesettingspage.cpp b/src/plugins/vcsbase/vcsbasesettingspage.cpp
index e4591f4133..f283c8bf31 100644
--- a/src/plugins/vcsbase/vcsbasesettingspage.cpp
+++ b/src/plugins/vcsbase/vcsbasesettingspage.cpp
@@ -112,7 +112,7 @@ QString VCSBaseSettingsPage::id() const
return QLatin1String(Constants::VCS_COMMON_SETTINGS_ID);
}
-QString VCSBaseSettingsPage::trName() const
+QString VCSBaseSettingsPage::displayName() const
{
return QCoreApplication::translate("VCSBase", Constants::VCS_COMMON_SETTINGS_NAME);
}
@@ -122,7 +122,7 @@ QString VCSBaseSettingsPage::category() const
return QLatin1String(Constants::VCS_SETTINGS_CATEGORY);
}
-QString VCSBaseSettingsPage::trCategory() const
+QString VCSBaseSettingsPage::displayCategory() const
{
return QCoreApplication::translate("VCSBase", Constants::VCS_SETTINGS_TR_CATEGORY);
}
diff --git a/src/plugins/vcsbase/vcsbasesettingspage.h b/src/plugins/vcsbase/vcsbasesettingspage.h
index 9e94e00b75..7da0bbdb3b 100644
--- a/src/plugins/vcsbase/vcsbasesettingspage.h
+++ b/src/plugins/vcsbase/vcsbasesettingspage.h
@@ -67,9 +67,9 @@ public:
virtual ~VCSBaseSettingsPage();
virtual QString id() const;
- virtual QString trName() const;
+ virtual QString displayName() const;
virtual QString category() const;
- virtual QString trCategory() const;
+ virtual QString displayCategory() const;
virtual QWidget *createPage(QWidget *parent);
virtual void apply();
diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
index d78bc34069..c7edea0628 100644
--- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
+++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
@@ -336,9 +336,9 @@ Core::IEditor *VCSBaseSubmitEditor::duplicate(QWidget * /*parent*/)
return 0;
}
-const char *VCSBaseSubmitEditor::kind() const
+QString VCSBaseSubmitEditor::id() const
{
- return m_d->m_parameters->kind;
+ return m_d->m_parameters->id;
}
static QToolBar *createToolBar(const QWidget *someWidget, QAction *submitAction, QAction *diffAction)
@@ -624,7 +624,7 @@ QStringList VCSBaseSubmitEditor::currentProjectFiles(bool nativeSeparators, QStr
if (const ProjectExplorer::Project *currentProject = pe->currentProject()) {
QStringList files = currentProject->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
if (name)
- *name = currentProject->name();
+ *name = currentProject->displayName();
if (nativeSeparators && !files.empty()) {
const QStringList::iterator end = files.end();
for (QStringList::iterator it = files.begin(); it != end; ++it)
diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.h b/src/plugins/vcsbase/vcsbasesubmiteditor.h
index 75acdcbca1..78ca4e9993 100644
--- a/src/plugins/vcsbase/vcsbasesubmiteditor.h
+++ b/src/plugins/vcsbase/vcsbasesubmiteditor.h
@@ -56,7 +56,8 @@ struct VCSBaseSubmitEditorPrivate;
/* Utility struct to parametrize a VCSBaseSubmitEditor. */
struct VCSBASE_EXPORT VCSBaseSubmitEditorParameters {
const char *mimeType;
- const char *kind;
+ QString id;
+ QString displayName;
const char *context;
};
@@ -141,7 +142,7 @@ public:
virtual void setDisplayName(const QString &title);
virtual bool duplicateSupported() const;
virtual Core::IEditor *duplicate(QWidget * parent);
- virtual const char *kind() const;
+ virtual QString id() const;
virtual QWidget *toolBar();
virtual QList<int> context() const;
diff --git a/src/plugins/welcome/welcomemode.cpp b/src/plugins/welcome/welcomemode.cpp
index 6397930cfa..4ebefd396a 100644
--- a/src/plugins/welcome/welcomemode.cpp
+++ b/src/plugins/welcome/welcomemode.cpp
@@ -111,7 +111,7 @@ WelcomeMode::~WelcomeMode()
delete m_d;
}
-QString WelcomeMode::name() const
+QString WelcomeMode::displayName() const
{
return tr("Welcome");
}
@@ -131,9 +131,9 @@ QWidget* WelcomeMode::widget()
return m_d->m_scrollArea;
}
-const char* WelcomeMode::uniqueModeName() const
+QString WelcomeMode::id() const
{
- return Core::Constants::MODE_WELCOME;
+ return QLatin1String(Core::Constants::MODE_WELCOME);
}
QList<int> WelcomeMode::context() const
diff --git a/src/plugins/welcome/welcomemode.h b/src/plugins/welcome/welcomemode.h
index eee3f687bf..1cae434e23 100644
--- a/src/plugins/welcome/welcomemode.h
+++ b/src/plugins/welcome/welcomemode.h
@@ -53,11 +53,11 @@ public:
~WelcomeMode();
// IMode
- QString name() const;
+ QString displayName() const;
QIcon icon() const;
int priority() const;
QWidget *widget();
- const char *uniqueModeName() const;
+ QString id() const;
QList<int> context() const;
void activated();
QString contextHelpId() const { return QLatin1String("Qt Creator"); }
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp
index 83c9da7dbb..bdfa890cd4 100644
--- a/src/plugins/welcome/welcomeplugin.cpp
+++ b/src/plugins/welcome/welcomeplugin.cpp
@@ -100,7 +100,7 @@ bool WelcomePlugin::initialize(const QStringList &arguments, QString *error_mess
void WelcomePlugin::extensionsInitialized()
{
m_welcomeMode->initPlugins();
- Core::ModeManager::instance()->activateMode(m_welcomeMode->uniqueModeName());
+ Core::ModeManager::instance()->activateMode(m_welcomeMode->id());
}
Q_EXPORT_PLUGIN(WelcomePlugin)