summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2009-10-05 17:26:13 +0200
committercon <qtc-committer@nokia.com>2009-10-05 17:26:13 +0200
commitddb78427611dabebadba8ecb401d633ebe986f94 (patch)
treeb1089cad97a1042b1f27e9f9ada9d947402affee /src
parent44e2704bc151cfe508b449969a4a47a2b749cbd9 (diff)
parentfa2ca2dee15084af3dfaec5284fc0757e9de4a10 (diff)
downloadqt-creator-ddb78427611dabebadba8ecb401d633ebe986f94.tar.gz
Merge branch '1.3' of git@scm.dev.nokia.troll.no:creator/mainline into 1.3
Conflicts: src/plugins/cpptools/cppfindreferences.cpp src/plugins/cpptools/cpptoolsplugin.cpp src/plugins/texteditor/basefilefind.cpp
Diffstat (limited to 'src')
-rw-r--r--src/libs/cplusplus/ResolveExpression.cpp278
-rw-r--r--src/libs/cplusplus/ResolveExpression.h22
-rw-r--r--src/libs/utils/abstractprocess.h2
-rw-r--r--src/libs/utils/abstractprocess_win.cpp2
-rw-r--r--src/libs/utils/basevalidatinglineedit.cpp2
-rw-r--r--src/libs/utils/basevalidatinglineedit.h2
-rw-r--r--src/libs/utils/checkablemessagebox.cpp2
-rw-r--r--src/libs/utils/checkablemessagebox.h2
-rw-r--r--src/libs/utils/checkablemessagebox.ui8
-rw-r--r--src/libs/utils/classnamevalidatinglineedit.cpp6
-rw-r--r--src/libs/utils/classnamevalidatinglineedit.h4
-rw-r--r--src/libs/utils/codegeneration.cpp2
-rw-r--r--src/libs/utils/codegeneration.h2
-rw-r--r--src/libs/utils/consoleprocess.cpp2
-rw-r--r--src/libs/utils/consoleprocess.h2
-rw-r--r--src/libs/utils/consoleprocess_unix.cpp2
-rw-r--r--src/libs/utils/consoleprocess_win.cpp2
-rw-r--r--src/libs/utils/fancylineedit.cpp2
-rw-r--r--src/libs/utils/fancylineedit.h2
-rw-r--r--src/libs/utils/fancymainwindow.cpp2
-rw-r--r--src/libs/utils/fancymainwindow.h2
-rw-r--r--src/libs/utils/filenamevalidatinglineedit.cpp2
-rw-r--r--src/libs/utils/filenamevalidatinglineedit.h2
-rw-r--r--src/libs/utils/filesearch.cpp12
-rw-r--r--src/libs/utils/filesearch.h2
-rw-r--r--src/libs/utils/filewizarddialog.cpp2
-rw-r--r--src/libs/utils/filewizarddialog.h2
-rw-r--r--src/libs/utils/filewizardpage.cpp2
-rw-r--r--src/libs/utils/filewizardpage.h2
-rw-r--r--src/libs/utils/filewizardpage.ui12
-rw-r--r--src/libs/utils/linecolumnlabel.cpp2
-rw-r--r--src/libs/utils/linecolumnlabel.h2
-rw-r--r--src/libs/utils/listutils.h2
-rw-r--r--src/libs/utils/newclasswidget.cpp2
-rw-r--r--src/libs/utils/newclasswidget.h2
-rw-r--r--src/libs/utils/newclasswidget.ui20
-rw-r--r--src/libs/utils/parameteraction.cpp3
-rw-r--r--src/libs/utils/parameteraction.h2
-rw-r--r--src/libs/utils/pathchooser.cpp8
-rw-r--r--src/libs/utils/pathchooser.h3
-rw-r--r--src/libs/utils/pathlisteditor.cpp2
-rw-r--r--src/libs/utils/pathlisteditor.h2
-rw-r--r--src/libs/utils/projectintropage.cpp2
-rw-r--r--src/libs/utils/projectintropage.h2
-rw-r--r--src/libs/utils/projectintropage.ui12
-rw-r--r--src/libs/utils/projectnamevalidatinglineedit.cpp2
-rw-r--r--src/libs/utils/projectnamevalidatinglineedit.h2
-rw-r--r--src/libs/utils/qtcolorbutton.cpp2
-rw-r--r--src/libs/utils/qtcolorbutton.h2
-rw-r--r--src/libs/utils/reloadpromptutils.cpp17
-rw-r--r--src/libs/utils/reloadpromptutils.h2
-rw-r--r--src/libs/utils/savedaction.cpp4
-rw-r--r--src/libs/utils/savedaction.h3
-rw-r--r--src/libs/utils/settingsutils.cpp2
-rw-r--r--src/libs/utils/settingsutils.h2
-rw-r--r--src/libs/utils/styledbar.cpp2
-rw-r--r--src/libs/utils/styledbar.h2
-rw-r--r--src/libs/utils/stylehelper.cpp4
-rw-r--r--src/libs/utils/stylehelper.h2
-rw-r--r--src/libs/utils/submiteditorwidget.cpp2
-rw-r--r--src/libs/utils/submiteditorwidget.h2
-rw-r--r--src/libs/utils/submiteditorwidget.ui4
-rw-r--r--src/libs/utils/submitfieldwidget.cpp4
-rw-r--r--src/libs/utils/submitfieldwidget.h4
-rw-r--r--src/libs/utils/synchronousprocess.cpp3
-rw-r--r--src/libs/utils/synchronousprocess.h2
-rw-r--r--src/libs/utils/treewidgetcolumnstretcher.cpp2
-rw-r--r--src/libs/utils/treewidgetcolumnstretcher.h2
-rw-r--r--src/libs/utils/uncommentselection.cpp2
-rw-r--r--src/libs/utils/uncommentselection.h2
-rw-r--r--src/libs/utils/welcomemodetreewidget.cpp4
-rw-r--r--src/libs/utils/welcomemodetreewidget.h4
-rw-r--r--src/libs/utils/winutils.cpp2
-rw-r--r--src/libs/utils/winutils.h2
-rw-r--r--src/plugins/bineditor/bineditorplugin.cpp14
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp6
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h10
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectmanager.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.h2
-rw-r--r--src/plugins/coreplugin/basefilewizard.cpp4
-rw-r--r--src/plugins/coreplugin/basefilewizard.h4
-rw-r--r--src/plugins/coreplugin/dialogs/shortcutsettings.cpp2
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp2
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.cpp2
-rw-r--r--src/plugins/coreplugin/fancytabwidget.cpp16
-rw-r--r--src/plugins/coreplugin/generalsettings.cpp2
-rw-r--r--src/plugins/coreplugin/generalsettings.ui4
-rw-r--r--src/plugins/coreplugin/mainwindow.cpp6
-rw-r--r--src/plugins/coreplugin/mainwindow.h5
-rw-r--r--src/plugins/coreplugin/manhattanstyle.cpp52
-rw-r--r--src/plugins/coreplugin/minisplitter.cpp2
-rw-r--r--src/plugins/coreplugin/navigationwidget.cpp2
-rw-r--r--src/plugins/coreplugin/navigationwidget.h5
-rw-r--r--src/plugins/coreplugin/outputpane.cpp2
-rw-r--r--src/plugins/coreplugin/progressmanager/progresspie.cpp16
-rw-r--r--src/plugins/coreplugin/sidebar.cpp8
-rw-r--r--src/plugins/cppeditor/cppclasswizard.cpp20
-rw-r--r--src/plugins/cppeditor/cppclasswizard.h6
-rw-r--r--src/plugins/cppeditor/cppeditor.cpp44
-rw-r--r--src/plugins/cppeditor/cppeditor.h3
-rw-r--r--src/plugins/cppeditor/cppeditorconstants.h1
-rw-r--r--src/plugins/cppeditor/cppfilewizard.cpp2
-rw-r--r--src/plugins/cppeditor/cppplugin.cpp14
-rw-r--r--src/plugins/cppeditor/cppplugin.h1
-rw-r--r--src/plugins/cpptools/cppcodecompletion.cpp20
-rw-r--r--src/plugins/cpptools/cppfilesettingspage.cpp2
-rw-r--r--src/plugins/cpptools/cppfilesettingspage.ui4
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp92
-rw-r--r--src/plugins/cpptools/cppfindreferences.h8
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp19
-rw-r--r--src/plugins/cpptools/cppmodelmanager.h3
-rw-r--r--src/plugins/cpptools/cppmodelmanagerinterface.h5
-rw-r--r--src/plugins/cpptools/cppsemanticsearch.cpp22
-rw-r--r--src/plugins/cpptools/cppsemanticsearch.h12
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp8
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.h4
-rw-r--r--src/plugins/cvs/cvsplugin.cpp28
-rw-r--r--src/plugins/cvs/cvsplugin.h21
-rw-r--r--src/plugins/cvs/cvssubmiteditor.cpp2
-rw-r--r--src/plugins/cvs/settingspage.cpp2
-rw-r--r--src/plugins/cvs/settingspage.ui4
-rw-r--r--src/plugins/debugger/attachcoredialog.ui6
-rw-r--r--src/plugins/debugger/attachtcfdialog.ui4
-rw-r--r--src/plugins/debugger/cdb/cdbdebugengine.cpp10
-rw-r--r--src/plugins/debugger/cdb/cdbdebugengine_p.h2
-rw-r--r--src/plugins/debugger/cdb/cdboptionspage.cpp2
-rw-r--r--src/plugins/debugger/cdb/cdboptionspagewidget.ui8
-rw-r--r--src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp2
-rw-r--r--src/plugins/debugger/cdb/cdbsymbolpathlisteditor.h2
-rw-r--r--src/plugins/debugger/debuggeractions.cpp4
-rw-r--r--src/plugins/debugger/debuggeractions.h8
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp10
-rw-r--r--src/plugins/debugger/debuggermanager.cpp10
-rw-r--r--src/plugins/debugger/debuggermanager.h4
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp12
-rw-r--r--src/plugins/debugger/dumperoptionpage.ui4
-rw-r--r--src/plugins/debugger/gdb/coregdbadapter.cpp79
-rw-r--r--src/plugins/debugger/gdb/coregdbadapter.h4
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp237
-rw-r--r--src/plugins/debugger/gdb/gdbengine.h3
-rw-r--r--src/plugins/debugger/gdb/gdboptionspage.cpp4
-rw-r--r--src/plugins/debugger/gdb/gdboptionspage.h2
-rw-r--r--src/plugins/debugger/gdb/gdboptionspage.ui6
-rw-r--r--src/plugins/debugger/gdb/plaingdbadapter.cpp6
-rw-r--r--src/plugins/debugger/gdb/plaingdbadapter.h2
-rw-r--r--src/plugins/debugger/gdb/trkgdbadapter.cpp39
-rw-r--r--src/plugins/debugger/gdb/trkgdbadapter.h9
-rw-r--r--src/plugins/debugger/gdb/trkoptionswidget.cpp4
-rw-r--r--src/plugins/debugger/gdb/trkoptionswidget.ui6
-rw-r--r--src/plugins/debugger/shared/peutils.cpp2
-rw-r--r--src/plugins/debugger/shared/sharedlibraryinjector.cpp2
-rw-r--r--src/plugins/debugger/stackhandler.h11
-rw-r--r--src/plugins/debugger/startexternaldialog.ui4
-rw-r--r--src/plugins/debugger/startremotedialog.ui4
-rw-r--r--src/plugins/designer/cpp/formclasswizardpage.ui4
-rw-r--r--src/plugins/designer/cpp/formclasswizardparameters.cpp18
-rw-r--r--src/plugins/designer/editorwidget.cpp2
-rw-r--r--src/plugins/designer/editorwidget.h2
-rw-r--r--src/plugins/designer/formeditorw.cpp1
-rw-r--r--src/plugins/designer/formeditorw.h3
-rw-r--r--src/plugins/designer/formwindoweditor.cpp1
-rw-r--r--src/plugins/designer/formwindoweditor.h9
-rw-r--r--src/plugins/designer/formwindowfile.cpp10
-rw-r--r--src/plugins/designer/formwizarddialog.cpp2
-rw-r--r--src/plugins/designer/formwizarddialog.h4
-rw-r--r--src/plugins/fakevim/fakevimactions.cpp2
-rw-r--r--src/plugins/fakevim/fakevimactions.h10
-rw-r--r--src/plugins/fakevim/fakevimhandler.cpp2
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp2
-rw-r--r--src/plugins/find/findtoolbar.cpp6
-rw-r--r--src/plugins/find/findtoolbar.h2
-rw-r--r--src/plugins/find/findwidget.ui4
-rw-r--r--src/plugins/genericprojectmanager/genericproject.cpp2
-rw-r--r--src/plugins/genericprojectmanager/genericproject.h4
-rw-r--r--src/plugins/genericprojectmanager/genericprojectwizard.cpp6
-rw-r--r--src/plugins/genericprojectmanager/genericprojectwizard.h4
-rw-r--r--src/plugins/git/gitplugin.cpp20
-rw-r--r--src/plugins/git/gitplugin.h22
-rw-r--r--src/plugins/git/gitsettings.cpp2
-rw-r--r--src/plugins/git/gitsubmiteditorwidget.cpp2
-rw-r--r--src/plugins/git/gitsubmiteditorwidget.h2
-rw-r--r--src/plugins/help/helpplugin.cpp6
-rw-r--r--src/plugins/perforce/perforceplugin.cpp32
-rw-r--r--src/plugins/perforce/perforceplugin.h24
-rw-r--r--src/plugins/perforce/perforcesubmiteditorwidget.cpp2
-rw-r--r--src/plugins/perforce/perforcesubmiteditorwidget.h2
-rw-r--r--src/plugins/perforce/settingspage.cpp2
-rw-r--r--src/plugins/perforce/settingspage.ui4
-rw-r--r--src/plugins/projectexplorer/applicationlauncher.h4
-rw-r--r--src/plugins/projectexplorer/applicationlauncher_win.cpp2
-rw-r--r--src/plugins/projectexplorer/applicationlauncher_x11.cpp2
-rw-r--r--src/plugins/projectexplorer/buildprogress.cpp6
-rw-r--r--src/plugins/projectexplorer/buildsettingspropertiespage.cpp4
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.cpp10
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.h9
-rw-r--r--src/plugins/projectexplorer/foldernavigationwidget.cpp2
-rw-r--r--src/plugins/projectexplorer/processstep.cpp2
-rw-r--r--src/plugins/projectexplorer/processstep.ui6
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp24
-rw-r--r--src/plugins/projectexplorer/projectexplorer.h7
-rw-r--r--src/plugins/projectexplorer/projectwelcomepagewidget.ui12
-rw-r--r--src/plugins/projectexplorer/projectwindow.cpp4
-rw-r--r--src/plugins/projectexplorer/winguiprocess.h2
-rw-r--r--src/plugins/qmleditor/qmleditor.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp4
-rw-r--r--src/plugins/qmlprojectmanager/qmlnewprojectwizard.h5
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.cpp10
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectwizard.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectwizard.h6
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.cpp2
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.ui4
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.h8
-rw-r--r--src/plugins/qt4projectmanager/externaleditors.cpp2
-rw-r--r--src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui12
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp27
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h5
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.h4
-rw-r--r--src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt4projectconfigwidget.ui4
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt4runconfiguration.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt4runconfiguration.h2
-rw-r--r--src/plugins/qt4projectmanager/qtoptionspage.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qtuicodemodelsupport.h4
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.ui8
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h8
-rw-r--r--src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h8
-rw-r--r--src/plugins/qt4projectmanager/wizards/filespage.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/filespage.h4
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h10
-rw-r--r--src/plugins/qt4projectmanager/wizards/libraryparameters.cpp18
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp4
-rw-r--r--src/plugins/quickopen/quickopentoolwindow.cpp2
-rw-r--r--src/plugins/quickopen/quickopentoolwindow.h9
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.cpp10
-rw-r--r--src/plugins/subversion/settingspage.cpp2
-rw-r--r--src/plugins/subversion/settingspage.ui4
-rw-r--r--src/plugins/subversion/subversionplugin.cpp28
-rw-r--r--src/plugins/subversion/subversionplugin.h20
-rw-r--r--src/plugins/subversion/subversionsubmiteditor.cpp2
-rw-r--r--src/plugins/texteditor/basefilefind.cpp8
-rw-r--r--src/plugins/texteditor/basefilefind.h2
-rw-r--r--src/plugins/texteditor/basetextdocument.cpp10
-rw-r--r--src/plugins/texteditor/basetexteditor.cpp23
-rw-r--r--src/plugins/texteditor/basetexteditor.h8
-rw-r--r--src/plugins/texteditor/fontsettingspage.cpp2
-rw-r--r--src/plugins/vcsbase/basecheckoutwizardpage.cpp2
-rw-r--r--src/plugins/vcsbase/basecheckoutwizardpage.ui8
-rw-r--r--src/plugins/vcsbase/vcsbasesettingspage.cpp6
-rw-r--r--src/plugins/vcsbase/vcsbasesettingspage.ui8
-rw-r--r--src/plugins/vcsbase/vcsbasesubmiteditor.cpp16
-rw-r--r--src/plugins/vcsbase/vcsbasesubmiteditor.h10
-rw-r--r--src/plugins/welcome/communitywelcomepagewidget.ui12
-rw-r--r--src/plugins/welcome/welcomemode.cpp2
-rw-r--r--src/shared/trk/launcher.cpp38
-rw-r--r--src/shared/trk/launcher.h4
-rw-r--r--src/shared/trk/trkdevice.cpp6
-rw-r--r--src/tools/qtcreatorwidgets/customwidgets.cpp24
-rw-r--r--src/tools/qtcreatorwidgets/customwidgets.h22
272 files changed, 1235 insertions, 1156 deletions
diff --git a/src/libs/cplusplus/ResolveExpression.cpp b/src/libs/cplusplus/ResolveExpression.cpp
index 31ff8a0086..23aa23a66d 100644
--- a/src/libs/cplusplus/ResolveExpression.cpp
+++ b/src/libs/cplusplus/ResolveExpression.cpp
@@ -194,6 +194,22 @@ protected:
{ Q_ASSERT(false); }
};
+template <typename _Tp>
+static QList<_Tp> removeDuplicates(const QList<_Tp> &results)
+{
+ QList<_Tp> uniqueList;
+ QSet<_Tp> processed;
+ foreach (const _Tp &r, results) {
+ if (processed.contains(r))
+ continue;
+
+ processed.insert(r);
+ uniqueList.append(r);
+ }
+
+ return uniqueList;
+}
+
} // end of anonymous namespace
/////////////////////////////////////////////////////////////////////
@@ -212,7 +228,7 @@ QList<ResolveExpression::Result> ResolveExpression::operator()(ExpressionAST *as
{
const QList<Result> previousResults = switchResults(QList<Result>());
accept(ast);
- return switchResults(previousResults);
+ return removeDuplicates(switchResults(previousResults));
}
QList<ResolveExpression::Result>
@@ -482,7 +498,7 @@ bool ResolveExpression::visit(QualifiedNameAST *ast)
if (NamedType *namedTy = symbol->type()->asNamedType()) {
const Result r(namedTy, symbol);
const QList<Symbol *> resolvedClasses =
- resolveClass(r, _context);
+ resolveClass(namedTy->name(), r, _context);
if (resolvedClasses.count()) {
foreach (Symbol *s, resolvedClasses) {
addResult(s->type(), s);
@@ -591,7 +607,7 @@ bool ResolveExpression::visit(ArrayAccessAST *ast)
addResult(arrTy->elementType(), contextSymbol);
} else if (NamedType *namedTy = ty->asNamedType()) {
const QList<Symbol *> classObjectCandidates =
- symbolsForDotAcccess(p, _context);
+ symbolsForDotAcccess(namedTy->name(), p, _context);
foreach (Symbol *classObject, classObjectCandidates) {
const QList<Result> overloads =
@@ -630,30 +646,38 @@ bool ResolveExpression::visit(MemberAccessAST *ast)
return false;
}
-QList<Symbol *> ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int accessOp) const
+QList<ResolveExpression::Result>
+ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int accessOp) const
{
- QList<Symbol *> classObjectCandidates;
+ QList<Result> results;
if (baseResults.isEmpty())
- return classObjectCandidates;
+ return results;
Result result = baseResults.first();
+ FullySpecifiedType ty = result.first.simplified();
+ Symbol *lastVisibleSymbol = result.second;
if (accessOp == T_ARROW) {
- FullySpecifiedType ty = result.first.simplified();
+ if (lastVisibleSymbol && ty->isClassType() && ! lastVisibleSymbol->isClass()) {
+ // ### remove ! lastVisibleSymbol->isClass() from the condition.
+ results.append(Result(ty, lastVisibleSymbol));
- if (Class *classTy = ty->asClassType()) {
- Symbol *symbol = result.second;
- if (symbol && ! symbol->isClass())
- classObjectCandidates.append(classTy);
} else if (NamedType *namedTy = ty->asNamedType()) {
// ### This code is pretty slow.
const QList<Symbol *> candidates = _context.resolve(namedTy->name());
+
foreach (Symbol *candidate, candidates) {
if (candidate->isTypedef()) {
- ty = candidate->type();
- const ResolveExpression::Result r(ty, candidate);
+ FullySpecifiedType declTy = candidate->type().simplified();
+ const ResolveExpression::Result r(declTy, candidate);
+
+ // update the result
result = r;
+
+ // refresh the cached ty and lastVisibileSymbol.
+ ty = result.first.simplified();
+ lastVisibleSymbol = result.second;
break;
}
}
@@ -662,82 +686,49 @@ QList<Symbol *> ResolveExpression::resolveBaseExpression(const QList<Result> &ba
if (NamedType *namedTy = ty->asNamedType()) {
ResolveClass resolveClass;
- const QList<Symbol *> candidates = resolveClass(result, _context);
+ const QList<Symbol *> candidates = resolveClass(namedTy->name(), result, _context);
foreach (Symbol *classObject, candidates) {
const QList<Result> overloads = resolveArrowOperator(result, namedTy,
classObject->asClass());
- foreach (Result r, overloads) {
- FullySpecifiedType ty = r.first;
- Function *funTy = ty->asFunctionType();
+ foreach (const Result &r, overloads) {
+ FullySpecifiedType typeOfOverloadFunction = r.first.simplified();
+ Symbol *lastVisibleSymbol = r.second;
+ Function *funTy = typeOfOverloadFunction->asFunctionType();
if (! funTy)
continue;
- ty = funTy->returnType().simplified();
+ typeOfOverloadFunction = funTy->returnType().simplified();
- if (PointerType *ptrTy = ty->asPointerType()) {
- if (NamedType *namedTy = ptrTy->elementType()->asNamedType()) {
- const QList<Symbol *> classes =
- resolveClass(namedTy, result, _context);
+ if (PointerType *ptrTy = typeOfOverloadFunction->asPointerType()) {
+ FullySpecifiedType elementTy = ptrTy->elementType().simplified();
- foreach (Symbol *c, classes) {
- if (! classObjectCandidates.contains(c))
- classObjectCandidates.append(c);
- }
- }
+ if (elementTy->isNamedType())
+ results.append(Result(elementTy, lastVisibleSymbol));
}
}
}
} else if (PointerType *ptrTy = ty->asPointerType()) {
- if (NamedType *namedTy = ptrTy->elementType()->asNamedType()) {
- ResolveClass resolveClass;
+ FullySpecifiedType elementTy = ptrTy->elementType().simplified();
- const QList<Symbol *> classes = resolveClass(namedTy, result,
- _context);
-
- foreach (Symbol *c, classes) {
- if (! classObjectCandidates.contains(c))
- classObjectCandidates.append(c);
- }
- } else if (Class *classTy = ptrTy->elementType()->asClassType()) {
- // typedef struct { int x } *Ptr;
- // Ptr p;
- // p->
- classObjectCandidates.append(classTy);
- }
+ if (elementTy->isNamedType() || elementTy->isClassType())
+ results.append(Result(elementTy, lastVisibleSymbol));
}
} else if (accessOp == T_DOT) {
- FullySpecifiedType ty = result.first.simplified();
-
- NamedType *namedTy = 0;
-
- if (Class *classTy = ty->asClassType()) {
- Symbol *symbol = result.second;
- if (symbol && ! symbol->isClass())
- classObjectCandidates.append(classTy);
- } else {
- namedTy = ty->asNamedType();
- if (! namedTy) {
- Function *fun = ty->asFunctionType();
- if (fun && fun->scope() && (fun->scope()->isBlockScope() || fun->scope()->isNamespaceScope()))
- namedTy = fun->returnType()->asNamedType();
- }
- }
+ if (ty->isClassType() || ty->isNamedType())
+ results.append(Result(ty, lastVisibleSymbol));
- if (namedTy) {
- ResolveClass resolveClass;
- const QList<Symbol *> symbols = resolveClass(namedTy, result,
- _context);
- foreach (Symbol *symbol, symbols) {
- if (classObjectCandidates.contains(symbol))
- continue;
- if (Class *klass = symbol->asClass())
- classObjectCandidates.append(klass);
+ if (Function *fun = ty->asFunctionType()) {
+ Scope *funScope = fun->scope();
+
+ if (funScope && (funScope->isBlockScope() || funScope->isNamespaceScope())) {
+ FullySpecifiedType retTy = fun->returnType().simplified();
+ results.append(Result(retTy, lastVisibleSymbol));
}
}
}
- return classObjectCandidates;
+ return removeDuplicates(results);
}
QList<ResolveExpression::Result>
@@ -745,25 +736,42 @@ ResolveExpression::resolveMemberExpression(const QList<Result> &baseResults,
unsigned accessOp,
Name *memberName) const
{
+ ResolveClass resolveClass;
QList<Result> results;
- const QList<Symbol *> classObjectCandidates = resolveBaseExpression(baseResults, accessOp);
- foreach (Symbol *candidate, classObjectCandidates) {
- Class *klass = candidate->asClass();
- if (! klass)
- continue;
+ const QList<Result> classObjectResults = resolveBaseExpression(baseResults, accessOp);
+ foreach (const Result &r, classObjectResults) {
+ FullySpecifiedType ty = r.first;
+
+ if (Class *klass = ty->asClassType())
+ results += resolveMember(memberName, klass);
- results += resolveMember(memberName, klass);
+ else if (NamedType *namedTy = ty->asNamedType()) {
+ Name *className = namedTy->name();
+ const QList<Symbol *> classes = resolveClass(className, r, _context);
+
+ foreach (Symbol *c, classes) {
+ if (Class *klass = c->asClass())
+ results += resolveMember(memberName, klass, className);
+ }
+ }
}
- return results;
+ return removeDuplicates(results);
}
QList<ResolveExpression::Result>
-ResolveExpression::resolveMember(Name *memberName, Class *klass) const
+ResolveExpression::resolveMember(Name *memberName, Class *klass,
+ Name *className) const
{
QList<Result> results;
+ if (! className)
+ className = klass->name();
+
+ if (! className)
+ return results;
+
QList<Scope *> scopes;
_context.expand(klass->members(), _context.visibleScopes(), &scopes);
@@ -771,35 +779,30 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass) const
foreach (Symbol *candidate, candidates) {
FullySpecifiedType ty = candidate->type();
-
- if (Name *className = klass->name()) {
- Name *unqualifiedNameId = className;
-
- if (QualifiedNameId *q = className->asQualifiedNameId())
- unqualifiedNameId = q->unqualifiedNameId();
-
- if (TemplateNameId *templId = unqualifiedNameId->asTemplateNameId()) {
- Substitution subst;
-
- for (unsigned i = 0; i < templId->templateArgumentCount(); ++i) {
- FullySpecifiedType templArgTy = templId->templateArgumentAt(i);
-
- if (i < klass->templateParameterCount())
- subst.append(qMakePair(klass->templateParameterAt(i)->name(),
- templArgTy));
- }
-
- Instantiation inst(control(), subst);
- ty = inst(ty);
+ Name *unqualifiedNameId = className;
+
+ if (QualifiedNameId *q = className->asQualifiedNameId())
+ unqualifiedNameId = q->unqualifiedNameId();
+
+ if (TemplateNameId *templId = unqualifiedNameId->asTemplateNameId()) {
+ Substitution subst;
+
+ for (unsigned i = 0; i < templId->templateArgumentCount(); ++i) {
+ FullySpecifiedType templArgTy = templId->templateArgumentAt(i);
+
+ if (i < klass->templateParameterCount())
+ subst.append(qMakePair(klass->templateParameterAt(i)->name(),
+ templArgTy));
}
+
+ Instantiation inst(control(), subst);
+ ty = inst(ty);
}
-
- const Result result(ty, candidate);
- if (! results.contains(result))
- results.append(result);
+
+ results.append(Result(ty, candidate));
}
- return results;
+ return removeDuplicates(results);
}
QList<ResolveExpression::Result>
@@ -832,11 +835,10 @@ ResolveExpression::resolveArrowOperator(const Result &,
}
const Result result(ty, candidate);
- if (! results.contains(result))
- results.append(result);
+ results.append(result);
}
- return results;
+ return removeDuplicates(results);
}
QList<ResolveExpression::Result>
@@ -870,12 +872,10 @@ ResolveExpression::resolveArrayOperator(const Result &,
ty = inst(ty);
}
- const Result result(ty, candidate);
- if (! results.contains(result))
- results.append(result);
+ results.append(Result(ty, candidate));
}
- return results;
+ return removeDuplicates(results);
}
bool ResolveExpression::visit(PostIncrDecrAST *)
@@ -894,27 +894,18 @@ bool ResolveClass::pointerAccess() const
void ResolveClass::setPointerAccess(bool pointerAccess)
{ _pointerAccess = pointerAccess; }
-QList<Symbol *> ResolveClass::operator()(NamedType *namedTy,
- ResolveExpression::Result p,
- const LookupContext &context)
-{
- const QList<ResolveExpression::Result> previousBlackList = _blackList;
- const QList<Symbol *> symbols = resolveClass(namedTy, p, context);
- _blackList = previousBlackList;
- return symbols;
-}
-
-QList<Symbol *> ResolveClass::operator()(ResolveExpression::Result p,
+QList<Symbol *> ResolveClass::operator()(Name *name,
+ const ResolveExpression::Result &p,
const LookupContext &context)
{
const QList<ResolveExpression::Result> previousBlackList = _blackList;
- const QList<Symbol *> symbols = resolveClass(p, context);
+ const QList<Symbol *> symbols = resolveClass(name, p, context);
_blackList = previousBlackList;
return symbols;
}
-QList<Symbol *> ResolveClass::resolveClass(NamedType *namedTy,
- ResolveExpression::Result p,
+QList<Symbol *> ResolveClass::resolveClass(Name *name,
+ const ResolveExpression::Result &p,
const LookupContext &context)
{
QList<Symbol *> resolvedSymbols;
@@ -925,7 +916,7 @@ QList<Symbol *> ResolveClass::resolveClass(NamedType *namedTy,
_blackList.append(p);
const QList<Symbol *> candidates =
- context.resolve(namedTy->name(), context.visibleScopes(p));
+ context.resolve(name, context.visibleScopes(p));
foreach (Symbol *candidate, candidates) {
if (Class *klass = candidate->asClass()) {
@@ -936,10 +927,13 @@ QList<Symbol *> ResolveClass::resolveClass(NamedType *namedTy,
if (Declaration *decl = candidate->asDeclaration()) {
if (_pointerAccess && decl->type()->isPointerType()) {
PointerType *ptrTy = decl->type()->asPointerType();
- _pointerAccess = false;
- const ResolveExpression::Result r(ptrTy->elementType(), decl);
- resolvedSymbols += resolveClass(r, context);
- _pointerAccess = true;
+ FullySpecifiedType elementTy = ptrTy->elementType().simplified();
+ if (NamedType *namedTy = elementTy->asNamedType()) {
+ _pointerAccess = false;
+ const ResolveExpression::Result r(elementTy, decl);
+ resolvedSymbols += resolveClass(namedTy->name(), r, context);
+ _pointerAccess = true;
+ }
} else if (Class *asClass = decl->type()->asClassType()) {
// typedef struct { } Point;
// Point pt;
@@ -949,8 +943,11 @@ QList<Symbol *> ResolveClass::resolveClass(NamedType *namedTy,
// typedef Point Boh;
// Boh b;
// b.
- const ResolveExpression::Result r(decl->type(), decl);
- resolvedSymbols += resolveClass(r, context);
+ FullySpecifiedType declType = decl->type().simplified();
+ if (NamedType *namedTy = declType->asNamedType()) {
+ const ResolveExpression::Result r(declType, decl);
+ resolvedSymbols += resolveClass(namedTy->name(), r, context);
+ }
}
}
} else if (Declaration *decl = candidate->asDeclaration()) {
@@ -958,8 +955,11 @@ QList<Symbol *> ResolveClass::resolveClass(NamedType *namedTy,
// QString foo("ciao");
// foo.
if (funTy->scope() && (funTy->scope()->isBlockScope() || funTy->scope()->isNamespaceScope())) {
- const ResolveExpression::Result r(funTy->returnType(), decl);
- resolvedSymbols += resolveClass(r, context);
+ FullySpecifiedType retTy = funTy->returnType().simplified();
+ if (NamedType *namedTy = retTy->asNamedType()) {
+ const ResolveExpression::Result r(retTy, decl);
+ resolvedSymbols += resolveClass(namedTy->name(), r, context);
+ }
}
}
}
@@ -967,19 +967,3 @@ QList<Symbol *> ResolveClass::resolveClass(NamedType *namedTy,
return resolvedSymbols;
}
-
-QList<Symbol *> ResolveClass::resolveClass(ResolveExpression::Result p,
- const LookupContext &context)
-{
- FullySpecifiedType ty = p.first;
-
- if (NamedType *namedTy = ty->asNamedType()) {
- return resolveClass(namedTy, p, context);
- } else if (ReferenceType *refTy = ty->asReferenceType()) {
- const ResolveExpression::Result e(refTy->elementType(), p.second);
- return resolveClass(e, context);
- }
-
- return QList<Symbol *>();
-}
-
diff --git a/src/libs/cplusplus/ResolveExpression.h b/src/libs/cplusplus/ResolveExpression.h
index 71289ef343..fb00f9e23f 100644
--- a/src/libs/cplusplus/ResolveExpression.h
+++ b/src/libs/cplusplus/ResolveExpression.h
@@ -53,7 +53,7 @@ public:
unsigned accessOp,
Name *memberName) const;
- QList<Result> resolveMember(Name *memberName, Class *klass) const;
+ QList<Result> resolveMember(Name *memberName, Class *klass, Name *className = 0) const;
QList<Result> resolveArrowOperator(const Result &result,
NamedType *namedTy,
@@ -64,8 +64,8 @@ public:
Class *klass) const;
- QList<Symbol *> resolveBaseExpression(const QList<Result> &baseResults,
- int accessOp) const;
+ QList<Result> resolveBaseExpression(const QList<Result> &baseResults,
+ int accessOp) const;
protected:
QList<Result> switchResults(const QList<Result> &symbols);
@@ -131,20 +131,14 @@ public:
bool pointerAccess() const;
void setPointerAccess(bool pointerAccess);
- QList<Symbol *> operator()(NamedType *namedTy,
- ResolveExpression::Result p,
- const LookupContext &context);
-
- QList<Symbol *> operator()(ResolveExpression::Result p,
+ QList<Symbol *> operator()(Name *name,
+ const ResolveExpression::Result &p,
const LookupContext &context);
private:
- QList<Symbol *> resolveClass(NamedType *namedTy,
- ResolveExpression::Result p,
- const LookupContext &context);
-
- QList<Symbol *> resolveClass(ResolveExpression::Result p,
- const LookupContext &context);
+ QList<Symbol *> resolveClass(Name *name,
+ const ResolveExpression::Result &p,
+ const LookupContext &context);
private:
QList<ResolveExpression::Result> _blackList;
diff --git a/src/libs/utils/abstractprocess.h b/src/libs/utils/abstractprocess.h
index c0373b64ee..3dcdee9617 100644
--- a/src/libs/utils/abstractprocess.h
+++ b/src/libs/utils/abstractprocess.h
@@ -34,7 +34,6 @@
#include <QtCore/QStringList>
-namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT AbstractProcess
@@ -75,7 +74,6 @@ private:
};
} //namespace Utils
-} //namespace Core
#endif // ABSTRACTPROCESS_H
diff --git a/src/libs/utils/abstractprocess_win.cpp b/src/libs/utils/abstractprocess_win.cpp
index 6f038988a4..70aa028e1c 100644
--- a/src/libs/utils/abstractprocess_win.cpp
+++ b/src/libs/utils/abstractprocess_win.cpp
@@ -31,7 +31,6 @@
#include <windows.h>
-namespace Core {
namespace Utils {
QStringList AbstractProcess::fixWinEnvironment(const QStringList &env)
@@ -114,4 +113,3 @@ QByteArray AbstractProcess::createWinEnvironment(const QStringList &env)
}
} //namespace Utils
-} //namespace Core
diff --git a/src/libs/utils/basevalidatinglineedit.cpp b/src/libs/utils/basevalidatinglineedit.cpp
index c648b59cc7..c70aa59e1f 100644
--- a/src/libs/utils/basevalidatinglineedit.cpp
+++ b/src/libs/utils/basevalidatinglineedit.cpp
@@ -33,7 +33,6 @@
enum { debug = 0 };
-namespace Core {
namespace Utils {
struct BaseValidatingLineEditPrivate {
@@ -156,4 +155,3 @@ void BaseValidatingLineEdit::triggerChanged()
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/basevalidatinglineedit.h b/src/libs/utils/basevalidatinglineedit.h
index 34dddf367b..77031bbd96 100644
--- a/src/libs/utils/basevalidatinglineedit.h
+++ b/src/libs/utils/basevalidatinglineedit.h
@@ -34,7 +34,6 @@
#include <QtGui/QLineEdit>
-namespace Core {
namespace Utils {
struct BaseValidatingLineEditPrivate;
@@ -98,6 +97,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // BASEVALIDATINGLINEEDIT_H
diff --git a/src/libs/utils/checkablemessagebox.cpp b/src/libs/utils/checkablemessagebox.cpp
index d72bd9e6da..68c3065652 100644
--- a/src/libs/utils/checkablemessagebox.cpp
+++ b/src/libs/utils/checkablemessagebox.cpp
@@ -4,7 +4,6 @@
#include <QtGui/QPushButton>
#include <QtCore/QDebug>
-namespace Core {
namespace Utils {
struct CheckableMessageBoxPrivate {
@@ -147,4 +146,3 @@ QMessageBox::StandardButton CheckableMessageBox::dialogButtonBoxToMessageBoxButt
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/checkablemessagebox.h b/src/libs/utils/checkablemessagebox.h
index 4b57e25fa3..e14908b4b7 100644
--- a/src/libs/utils/checkablemessagebox.h
+++ b/src/libs/utils/checkablemessagebox.h
@@ -7,7 +7,6 @@
#include <QtGui/QMessageBox>
#include <QtGui/QDialog>
-namespace Core {
namespace Utils {
struct CheckableMessageBoxPrivate;
@@ -72,6 +71,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // CHECKABLEMESSAGEBOX_H
diff --git a/src/libs/utils/checkablemessagebox.ui b/src/libs/utils/checkablemessagebox.ui
index c5f6d7265b..7491a84916 100644
--- a/src/libs/utils/checkablemessagebox.ui
+++ b/src/libs/utils/checkablemessagebox.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>Core::Utils::CheckableMessageBox</class>
- <widget class="QDialog" name="Core::Utils::CheckableMessageBox">
+ <class>Utils::CheckableMessageBox</class>
+ <widget class="QDialog" name="Utils::CheckableMessageBox">
<property name="geometry">
<rect>
<x>0</x>
@@ -121,7 +121,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
- <receiver>Core::Utils::CheckableMessageBox</receiver>
+ <receiver>Utils::CheckableMessageBox</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@@ -137,7 +137,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
- <receiver>Core::Utils::CheckableMessageBox</receiver>
+ <receiver>Utils::CheckableMessageBox</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
diff --git a/src/libs/utils/classnamevalidatinglineedit.cpp b/src/libs/utils/classnamevalidatinglineedit.cpp
index 324c5d4dd6..462e698b60 100644
--- a/src/libs/utils/classnamevalidatinglineedit.cpp
+++ b/src/libs/utils/classnamevalidatinglineedit.cpp
@@ -34,7 +34,6 @@
#include <QtCore/QDebug>
#include <QtCore/QRegExp>
-namespace Core {
namespace Utils {
struct ClassNameValidatingLineEditPrivate {
@@ -58,7 +57,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
// --------------------- ClassNameValidatingLineEdit
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
- Core::Utils::BaseValidatingLineEdit(parent),
+ Utils::BaseValidatingLineEdit(parent),
m_d(new ClassNameValidatingLineEditPrivate)
{
}
@@ -98,7 +97,7 @@ bool ClassNameValidatingLineEdit::validate(const QString &value, QString *errorM
void ClassNameValidatingLineEdit::slotChanged(const QString &t)
{
- Core::Utils::BaseValidatingLineEdit::slotChanged(t);
+ Utils::BaseValidatingLineEdit::slotChanged(t);
if (isValid()) {
// Suggest file names, strip namespaces
QString fileName = m_d->m_lowerCaseFileName ? t.toLower() : t;
@@ -148,4 +147,3 @@ void ClassNameValidatingLineEdit::setLowerCaseFileName(bool v)
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/classnamevalidatinglineedit.h b/src/libs/utils/classnamevalidatinglineedit.h
index 8e7ea31333..3c650906ed 100644
--- a/src/libs/utils/classnamevalidatinglineedit.h
+++ b/src/libs/utils/classnamevalidatinglineedit.h
@@ -33,7 +33,6 @@
#include "utils_global.h"
#include "basevalidatinglineedit.h"
-namespace Core {
namespace Utils {
struct ClassNameValidatingLineEditPrivate;
@@ -42,7 +41,7 @@ struct ClassNameValidatingLineEditPrivate;
* to derive suggested file names from it. */
class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit
- : public Core::Utils::BaseValidatingLineEdit
+ : public Utils::BaseValidatingLineEdit
{
Q_DISABLE_COPY(ClassNameValidatingLineEdit)
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
@@ -76,6 +75,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // CLASSNAMEVALIDATINGLINEEDIT_H
diff --git a/src/libs/utils/codegeneration.cpp b/src/libs/utils/codegeneration.cpp
index 8b2a2869b0..c0b1a64356 100644
--- a/src/libs/utils/codegeneration.cpp
+++ b/src/libs/utils/codegeneration.cpp
@@ -33,7 +33,6 @@
#include <QtCore/QStringList>
#include <QtCore/QFileInfo>
-namespace Core {
namespace Utils {
static QString toAlphaNum(const QString &s)
@@ -101,4 +100,3 @@ void writeClosingNameSpaces(const QStringList &l, const QString &indent,
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/codegeneration.h b/src/libs/utils/codegeneration.h
index c1e3f5ab74..5c8fc746ce 100644
--- a/src/libs/utils/codegeneration.h
+++ b/src/libs/utils/codegeneration.h
@@ -38,7 +38,6 @@ class QTextStream;
class QStringList;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
QTCREATOR_UTILS_EXPORT QString headerGuard(const QString &file);
@@ -62,6 +61,5 @@ void writeClosingNameSpaces(const QStringList &namespaces,
QTextStream &str);
} // namespace Utils
-} // namespace Core
#endif // CODEGENERATION_H
diff --git a/src/libs/utils/consoleprocess.cpp b/src/libs/utils/consoleprocess.cpp
index 0fa3a9b7d3..d89f9f86a5 100644
--- a/src/libs/utils/consoleprocess.cpp
+++ b/src/libs/utils/consoleprocess.cpp
@@ -29,7 +29,6 @@
#include "consoleprocess.h"
-namespace Core {
namespace Utils {
QString ConsoleProcess::modeOption(Mode m)
@@ -83,4 +82,3 @@ QString ConsoleProcess::msgCannotExecute(const QString & p, const QString &why)
}
}
-}
diff --git a/src/libs/utils/consoleprocess.h b/src/libs/utils/consoleprocess.h
index 18c684f258..d3d4ff58cd 100644
--- a/src/libs/utils/consoleprocess.h
+++ b/src/libs/utils/consoleprocess.h
@@ -51,7 +51,6 @@ class QSettings;
class QTemporaryFile;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT ConsoleProcess : public QObject, public AbstractProcess
@@ -138,6 +137,5 @@ private:
};
} //namespace Utils
-} //namespace Core
#endif
diff --git a/src/libs/utils/consoleprocess_unix.cpp b/src/libs/utils/consoleprocess_unix.cpp
index 36d8a94b71..5879ab4c9d 100644
--- a/src/libs/utils/consoleprocess_unix.cpp
+++ b/src/libs/utils/consoleprocess_unix.cpp
@@ -42,7 +42,7 @@
#include <string.h>
#include <unistd.h>
-using namespace Core::Utils;
+using namespace Utils;
ConsoleProcess::ConsoleProcess(QObject *parent) :
QObject(parent),
diff --git a/src/libs/utils/consoleprocess_win.cpp b/src/libs/utils/consoleprocess_win.cpp
index 9fcf5c976a..437295d086 100644
--- a/src/libs/utils/consoleprocess_win.cpp
+++ b/src/libs/utils/consoleprocess_win.cpp
@@ -40,7 +40,7 @@
#include <stdlib.h>
-using namespace Core::Utils;
+using namespace Utils;
ConsoleProcess::ConsoleProcess(QObject *parent) :
QObject(parent),
diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp
index b7e8b770b8..3f6d74d175 100644
--- a/src/libs/utils/fancylineedit.cpp
+++ b/src/libs/utils/fancylineedit.cpp
@@ -39,7 +39,6 @@
enum { margin = 6 };
-namespace Core {
namespace Utils {
static inline QString sideToStyleSheetString(FancyLineEdit::Side side)
@@ -311,4 +310,3 @@ QString FancyLineEdit::typedText() const
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/fancylineedit.h b/src/libs/utils/fancylineedit.h
index 4d6dfedff8..754fccbbeb 100644
--- a/src/libs/utils/fancylineedit.h
+++ b/src/libs/utils/fancylineedit.h
@@ -34,7 +34,6 @@
#include <QtGui/QLineEdit>
-namespace Core {
namespace Utils {
class FancyLineEditPrivate;
@@ -107,6 +106,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // FANCYLINEEDIT_H
diff --git a/src/libs/utils/fancymainwindow.cpp b/src/libs/utils/fancymainwindow.cpp
index eadb7f2ae2..09d0583366 100644
--- a/src/libs/utils/fancymainwindow.cpp
+++ b/src/libs/utils/fancymainwindow.cpp
@@ -35,7 +35,7 @@
#include <QtCore/QSettings>
-using namespace Core::Utils;
+using namespace Utils;
FancyMainWindow::FancyMainWindow(QWidget *parent)
: QMainWindow(parent),
diff --git a/src/libs/utils/fancymainwindow.h b/src/libs/utils/fancymainwindow.h
index 6f4f866897..68420183e4 100644
--- a/src/libs/utils/fancymainwindow.h
+++ b/src/libs/utils/fancymainwindow.h
@@ -41,7 +41,6 @@ QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT FancyMainWindow : public QMainWindow
@@ -85,6 +84,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // FANCYMAINWINDOW_H
diff --git a/src/libs/utils/filenamevalidatinglineedit.cpp b/src/libs/utils/filenamevalidatinglineedit.cpp
index 359ee7a4bb..70b064e9f4 100644
--- a/src/libs/utils/filenamevalidatinglineedit.cpp
+++ b/src/libs/utils/filenamevalidatinglineedit.cpp
@@ -33,7 +33,6 @@
#include <QtCore/QRegExp>
#include <QtCore/QDebug>
-namespace Core {
namespace Utils {
#define WINDOWS_DEVICES "CON|AUX|PRN|COM1|COM2|LPT1|LPT2|NUL"
@@ -133,4 +132,3 @@ bool FileNameValidatingLineEdit::validate(const QString &value, QString *errorM
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/filenamevalidatinglineedit.h b/src/libs/utils/filenamevalidatinglineedit.h
index df5556f679..2648bb5301 100644
--- a/src/libs/utils/filenamevalidatinglineedit.h
+++ b/src/libs/utils/filenamevalidatinglineedit.h
@@ -32,7 +32,6 @@
#include "basevalidatinglineedit.h"
-namespace Core {
namespace Utils {
/**
@@ -67,6 +66,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // FILENAMEVALIDATINGLINEEDIT_H
diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp
index a925e9069b..192fa34321 100644
--- a/src/libs/utils/filesearch.cpp
+++ b/src/libs/utils/filesearch.cpp
@@ -40,11 +40,11 @@
#include <qtconcurrent/runextensions.h>
-using namespace Core::Utils;
+using namespace Utils;
static inline QString msgCanceled(const QString &searchTerm, int numMatches, int numFilesSearched)
{
- return QCoreApplication::translate("Core::Utils::FileSearch",
+ return QCoreApplication::translate("Utils::FileSearch",
"%1: canceled. %n occurrences found in %2 files.",
0, QCoreApplication::CodecForTr, numMatches).
arg(searchTerm).arg(numFilesSearched);
@@ -52,7 +52,7 @@ static inline QString msgCanceled(const QString &searchTerm, int numMatches, int
static inline QString msgFound(const QString &searchTerm, int numMatches, int numFilesSearched)
{
- return QCoreApplication::translate("Core::Utils::FileSearch",
+ return QCoreApplication::translate("Utils::FileSearch",
"%1: %n occurrences found in %2 files.",
0, QCoreApplication::CodecForTr, numMatches).
arg(searchTerm).arg(numFilesSearched);
@@ -60,7 +60,7 @@ static inline QString msgFound(const QString &searchTerm, int numMatches, int nu
static inline QString msgFound(const QString &searchTerm, int numMatches, int numFilesSearched, int filesSize)
{
- return QCoreApplication::translate("Core::Utils::FileSearch",
+ return QCoreApplication::translate("Utils::FileSearch",
"%1: %n occurrences found in %2 of %3 files.",
0, QCoreApplication::CodecForTr, numMatches).
arg(searchTerm).arg(numFilesSearched).arg(filesSize);
@@ -246,14 +246,14 @@ void runFileSearchRegExp(QFutureInterface<FileSearchResult> &future,
} // namespace
-QFuture<FileSearchResult> Core::Utils::findInFiles(const QString &searchTerm, const QStringList &files,
+QFuture<FileSearchResult> Utils::findInFiles(const QString &searchTerm, const QStringList &files,
QTextDocument::FindFlags flags, QMap<QString, QString> fileToContentsMap)
{
return QtConcurrent::run<FileSearchResult, QString, QStringList, QTextDocument::FindFlags, QMap<QString, QString> >
(runFileSearch, searchTerm, files, flags, fileToContentsMap);
}
-QFuture<FileSearchResult> Core::Utils::findInFilesRegExp(const QString &searchTerm, const QStringList &files,
+QFuture<FileSearchResult> Utils::findInFilesRegExp(const QString &searchTerm, const QStringList &files,
QTextDocument::FindFlags flags, QMap<QString, QString> fileToContentsMap)
{
return QtConcurrent::run<FileSearchResult, QString, QStringList, QTextDocument::FindFlags, QMap<QString, QString> >
diff --git a/src/libs/utils/filesearch.h b/src/libs/utils/filesearch.h
index 59dd7d6b4e..6609eb12c6 100644
--- a/src/libs/utils/filesearch.h
+++ b/src/libs/utils/filesearch.h
@@ -37,7 +37,6 @@
#include <QtCore/QMap>
#include <QtGui/QTextDocument>
-namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT FileSearchResult
@@ -62,6 +61,5 @@ QTCREATOR_UTILS_EXPORT QFuture<FileSearchResult> findInFilesRegExp(const QString
QTextDocument::FindFlags flags, QMap<QString, QString> fileToContentsMap = QMap<QString, QString>());
} // namespace Utils
-} // namespace Core
#endif // FILESEARCH_H
diff --git a/src/libs/utils/filewizarddialog.cpp b/src/libs/utils/filewizarddialog.cpp
index 5c1003cf26..d1190b0d38 100644
--- a/src/libs/utils/filewizarddialog.cpp
+++ b/src/libs/utils/filewizarddialog.cpp
@@ -32,7 +32,6 @@
#include <QtGui/QAbstractButton>
-namespace Core {
namespace Utils {
FileWizardDialog::FileWizardDialog(QWidget *parent) :
@@ -69,4 +68,3 @@ void FileWizardDialog::setName(const QString &name)
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/filewizarddialog.h b/src/libs/utils/filewizarddialog.h
index c4baf284d0..c408543bb4 100644
--- a/src/libs/utils/filewizarddialog.h
+++ b/src/libs/utils/filewizarddialog.h
@@ -34,7 +34,6 @@
#include <QtGui/QWizard>
-namespace Core {
namespace Utils {
class FileWizardPage;
@@ -62,6 +61,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // FILEWIZARDDIALOG_H
diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp
index d2901d468f..06db5d5c28 100644
--- a/src/libs/utils/filewizardpage.cpp
+++ b/src/libs/utils/filewizardpage.cpp
@@ -30,7 +30,6 @@
#include "filewizardpage.h"
#include "ui_filewizardpage.h"
-namespace Core {
namespace Utils {
struct FileWizardPagePrivate
@@ -130,4 +129,3 @@ bool FileWizardPage::validateBaseName(const QString &name, QString *errorMessage
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/filewizardpage.h b/src/libs/utils/filewizardpage.h
index f2099c73dc..fd2ded147b 100644
--- a/src/libs/utils/filewizardpage.h
+++ b/src/libs/utils/filewizardpage.h
@@ -34,7 +34,6 @@
#include <QtGui/QWizardPage>
-namespace Core {
namespace Utils {
struct FileWizardPagePrivate;
@@ -87,6 +86,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // FILEWIZARDPAGE_H
diff --git a/src/libs/utils/filewizardpage.ui b/src/libs/utils/filewizardpage.ui
index fea35b9c5b..2657a586bd 100644
--- a/src/libs/utils/filewizardpage.ui
+++ b/src/libs/utils/filewizardpage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>Core::Utils::WizardPage</class>
- <widget class="QWizardPage" name="Core::Utils::WizardPage">
+ <class>Utils::WizardPage</class>
+ <widget class="QWizardPage" name="Utils::WizardPage">
<property name="geometry">
<rect>
<x>0</x>
@@ -22,7 +22,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::FileNameValidatingLineEdit" name="nameLineEdit"/>
+ <widget class="Utils::FileNameValidatingLineEdit" name="nameLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pathLabel">
@@ -32,19 +32,19 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="Core::Utils::PathChooser" name="pathChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="pathChooser" native="true"/>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header>pathchooser.h</header>
<container>1</container>
</customwidget>
<customwidget>
- <class>Core::Utils::FileNameValidatingLineEdit</class>
+ <class>Utils::FileNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header>filenamevalidatinglineedit.h</header>
</customwidget>
diff --git a/src/libs/utils/linecolumnlabel.cpp b/src/libs/utils/linecolumnlabel.cpp
index b5b6d88f53..2f8756e40a 100644
--- a/src/libs/utils/linecolumnlabel.cpp
+++ b/src/libs/utils/linecolumnlabel.cpp
@@ -29,7 +29,6 @@
#include "linecolumnlabel.h"
-namespace Core {
namespace Utils {
LineColumnLabel::LineColumnLabel(QWidget *parent)
@@ -62,4 +61,3 @@ void LineColumnLabel::setMaxText(const QString &maxText)
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/linecolumnlabel.h b/src/libs/utils/linecolumnlabel.h
index 335d74e36e..c3158daa3b 100644
--- a/src/libs/utils/linecolumnlabel.h
+++ b/src/libs/utils/linecolumnlabel.h
@@ -33,7 +33,6 @@
#include "utils_global.h"
#include <QtGui/QLabel>
-namespace Core {
namespace Utils {
/* A label suitable for displaying cursor positions, etc. with a fixed
@@ -61,6 +60,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // LINECOLUMNLABEL_H
diff --git a/src/libs/utils/listutils.h b/src/libs/utils/listutils.h
index b9475f2c63..23224ba459 100644
--- a/src/libs/utils/listutils.h
+++ b/src/libs/utils/listutils.h
@@ -32,7 +32,6 @@
#include <QtCore/QList>
-namespace Core {
namespace Utils {
template <class T1, class T2>
@@ -46,6 +45,5 @@ QList<T1> qwConvertList(const QList<T2> &list)
}
} // namespace Utils
-} // namespace Core
#endif // LISTUTILS_H
diff --git a/src/libs/utils/newclasswidget.cpp b/src/libs/utils/newclasswidget.cpp
index 95af0d542f..42265a062e 100644
--- a/src/libs/utils/newclasswidget.cpp
+++ b/src/libs/utils/newclasswidget.cpp
@@ -41,7 +41,6 @@
enum { debugNewClassWidget = 0 };
-namespace Core {
namespace Utils {
struct NewClassWidgetPrivate {
@@ -485,4 +484,3 @@ QStringList NewClassWidget::files() const
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/newclasswidget.h b/src/libs/utils/newclasswidget.h
index c762c247e0..52d03720a8 100644
--- a/src/libs/utils/newclasswidget.h
+++ b/src/libs/utils/newclasswidget.h
@@ -38,7 +38,6 @@ QT_BEGIN_NAMESPACE
class QStringList;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
struct NewClassWidgetPrivate;
@@ -157,6 +156,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // NEWCLASSWIDGET_H
diff --git a/src/libs/utils/newclasswidget.ui b/src/libs/utils/newclasswidget.ui
index 4399a850a1..76a093a76f 100644
--- a/src/libs/utils/newclasswidget.ui
+++ b/src/libs/utils/newclasswidget.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>Core::Utils::NewClassWidget</class>
- <widget class="QWidget" name="Core::Utils::NewClassWidget">
+ <class>Utils::NewClassWidget</class>
+ <widget class="QWidget" name="Utils::NewClassWidget">
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
@@ -17,7 +17,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::ClassNameValidatingLineEdit" name="classLineEdit"/>
+ <widget class="Utils::ClassNameValidatingLineEdit" name="classLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="baseClassLabel">
@@ -76,7 +76,7 @@
</widget>
</item>
<item row="3" column="1">
- <widget class="Core::Utils::FileNameValidatingLineEdit" name="headerFileLineEdit"/>
+ <widget class="Utils::FileNameValidatingLineEdit" name="headerFileLineEdit"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="sourceLabel">
@@ -86,7 +86,7 @@
</widget>
</item>
<item row="4" column="1">
- <widget class="Core::Utils::FileNameValidatingLineEdit" name="sourceFileLineEdit"/>
+ <widget class="Utils::FileNameValidatingLineEdit" name="sourceFileLineEdit"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="generateFormLabel">
@@ -103,7 +103,7 @@
</widget>
</item>
<item row="6" column="1">
- <widget class="Core::Utils::FileNameValidatingLineEdit" name="formFileLineEdit"/>
+ <widget class="Utils::FileNameValidatingLineEdit" name="formFileLineEdit"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="pathLabel">
@@ -113,7 +113,7 @@
</widget>
</item>
<item row="7" column="1">
- <widget class="Core::Utils::PathChooser" name="pathChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="pathChooser" native="true"/>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="generateFormCheckBox">
@@ -126,18 +126,18 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">pathchooser.h</header>
<container>1</container>
</customwidget>
<customwidget>
- <class>Core::Utils::ClassNameValidatingLineEdit</class>
+ <class>Utils::ClassNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header>classnamevalidatinglineedit.h</header>
</customwidget>
<customwidget>
- <class>Core::Utils::FileNameValidatingLineEdit</class>
+ <class>Utils::FileNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/filenamevalidatinglineedit.h</header>
</customwidget>
diff --git a/src/libs/utils/parameteraction.cpp b/src/libs/utils/parameteraction.cpp
index 3653d1ca8f..1ab37e7085 100644
--- a/src/libs/utils/parameteraction.cpp
+++ b/src/libs/utils/parameteraction.cpp
@@ -1,6 +1,5 @@
#include "parameteraction.h"
-namespace Core {
namespace Utils {
ParameterAction::ParameterAction(const QString &emptyText,
@@ -57,5 +56,3 @@ void ParameterAction::setParameter(const QString &p)
}
}
-}
-
diff --git a/src/libs/utils/parameteraction.h b/src/libs/utils/parameteraction.h
index 2f6444e43b..8f047d323b 100644
--- a/src/libs/utils/parameteraction.h
+++ b/src/libs/utils/parameteraction.h
@@ -34,7 +34,6 @@
#include <QtGui/QAction>
-namespace Core {
namespace Utils {
/* ParameterAction: Intended for actions that act on a 'current',
@@ -80,6 +79,5 @@ private:
};
}
-}
#endif // PARAMETERACTION_H
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index c0503c402b..c550ecbc39 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -44,14 +44,13 @@
#include <QtGui/QToolButton>
#include <QtGui/QPushButton>
-/*static*/ const char * const Core::Utils::PathChooser::browseButtonLabel =
+/*static*/ const char * const Utils::PathChooser::browseButtonLabel =
#ifdef Q_WS_MAC
- QT_TRANSLATE_NOOP("Core::Utils::PathChooser", "Choose...");
+ QT_TRANSLATE_NOOP("Utils::PathChooser", "Choose...");
#else
- QT_TRANSLATE_NOOP("Core::Utils::PathChooser", "Browse...");
+ QT_TRANSLATE_NOOP("Utils::PathChooser", "Browse...");
#endif
-namespace Core {
namespace Utils {
// ------------------ PathValidatingLineEdit
@@ -324,4 +323,3 @@ QString PathChooser::makeDialogTitle(const QString &title)
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h
index 88b9215115..ee3e6eaf40 100644
--- a/src/libs/utils/pathchooser.h
+++ b/src/libs/utils/pathchooser.h
@@ -35,7 +35,6 @@
#include <QtGui/QWidget>
#include <QtGui/QAbstractButton>
-namespace Core {
namespace Utils {
struct PathChooserPrivate;
@@ -117,6 +116,6 @@ private:
};
} // namespace Utils
-} // namespace Core
+
#endif // PATHCHOOSER_H
diff --git a/src/libs/utils/pathlisteditor.cpp b/src/libs/utils/pathlisteditor.cpp
index ef315f9bf5..c0f498b8b2 100644
--- a/src/libs/utils/pathlisteditor.cpp
+++ b/src/libs/utils/pathlisteditor.cpp
@@ -46,7 +46,6 @@
#include <QtCore/QDir>
#include <QtCore/QDebug>
-namespace Core {
namespace Utils {
// ------------ PathListPlainTextEdit:
@@ -310,4 +309,3 @@ void PathListEditor::deletePathAtCursor()
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/pathlisteditor.h b/src/libs/utils/pathlisteditor.h
index 1613819e7a..bcab653002 100644
--- a/src/libs/utils/pathlisteditor.h
+++ b/src/libs/utils/pathlisteditor.h
@@ -39,7 +39,6 @@ QT_BEGIN_NAMESPACE
class QAction;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
struct PathListEditorPrivate;
@@ -105,6 +104,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // PATHLISTEDITOR_H
diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp
index ec26dacd20..da66bb6449 100644
--- a/src/libs/utils/projectintropage.cpp
+++ b/src/libs/utils/projectintropage.cpp
@@ -35,7 +35,6 @@
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
-namespace Core {
namespace Utils {
struct ProjectIntroPagePrivate
@@ -210,4 +209,3 @@ void ProjectIntroPage::hideStatusLabel()
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/projectintropage.h b/src/libs/utils/projectintropage.h
index ecc3354787..9e127ee646 100644
--- a/src/libs/utils/projectintropage.h
+++ b/src/libs/utils/projectintropage.h
@@ -34,7 +34,6 @@
#include <QtGui/QWizardPage>
-namespace Core {
namespace Utils {
struct ProjectIntroPagePrivate;
@@ -101,6 +100,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // PROJECTINTROPAGE_H
diff --git a/src/libs/utils/projectintropage.ui b/src/libs/utils/projectintropage.ui
index 62efa2d9fe..b527a25420 100644
--- a/src/libs/utils/projectintropage.ui
+++ b/src/libs/utils/projectintropage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>Core::Utils::ProjectIntroPage</class>
- <widget class="QWizardPage" name="Core::Utils::ProjectIntroPage">
+ <class>Utils::ProjectIntroPage</class>
+ <widget class="QWizardPage" name="Utils::ProjectIntroPage">
<property name="geometry">
<rect>
<x>0</x>
@@ -59,7 +59,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::ProjectNameValidatingLineEdit" name="nameLineEdit"/>
+ <widget class="Utils::ProjectNameValidatingLineEdit" name="nameLineEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pathLabel">
@@ -69,7 +69,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="Core::Utils::PathChooser" name="pathChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="pathChooser" native="true"/>
</item>
</layout>
</widget>
@@ -97,13 +97,13 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header>pathchooser.h</header>
<container>1</container>
</customwidget>
<customwidget>
- <class>Core::Utils::ProjectNameValidatingLineEdit</class>
+ <class>Utils::ProjectNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header>projectnamevalidatinglineedit.h</header>
</customwidget>
diff --git a/src/libs/utils/projectnamevalidatinglineedit.cpp b/src/libs/utils/projectnamevalidatinglineedit.cpp
index 693bc3e248..f4762a5ed9 100644
--- a/src/libs/utils/projectnamevalidatinglineedit.cpp
+++ b/src/libs/utils/projectnamevalidatinglineedit.cpp
@@ -30,7 +30,6 @@
#include "projectnamevalidatinglineedit.h"
#include "filenamevalidatinglineedit.h"
-namespace Core {
namespace Utils {
ProjectNameValidatingLineEdit::ProjectNameValidatingLineEdit(QWidget *parent)
@@ -60,4 +59,3 @@ bool ProjectNameValidatingLineEdit::validate(const QString &value, QString *erro
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/projectnamevalidatinglineedit.h b/src/libs/utils/projectnamevalidatinglineedit.h
index 5f1275999d..f8596dfad6 100644
--- a/src/libs/utils/projectnamevalidatinglineedit.h
+++ b/src/libs/utils/projectnamevalidatinglineedit.h
@@ -32,7 +32,6 @@
#include "basevalidatinglineedit.h"
-namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT ProjectNameValidatingLineEdit : public BaseValidatingLineEdit
@@ -50,6 +49,5 @@ protected:
};
} // namespace Utils
-} // namespace Core
#endif // PROJECTNAMEVALIDATINGLINEEDIT_H
diff --git a/src/libs/utils/qtcolorbutton.cpp b/src/libs/utils/qtcolorbutton.cpp
index 0f32e61bc5..9ba39b0305 100644
--- a/src/libs/utils/qtcolorbutton.cpp
+++ b/src/libs/utils/qtcolorbutton.cpp
@@ -35,7 +35,6 @@
#include <QtGui/QDragEnterEvent>
#include <QtGui/QPainter>
-namespace Core {
namespace Utils {
class QtColorButtonPrivate
@@ -283,6 +282,5 @@ void QtColorButton::dropEvent(QDropEvent *event)
#endif
} // namespace Utils
-} // namespace Core
#include "moc_qtcolorbutton.cpp"
diff --git a/src/libs/utils/qtcolorbutton.h b/src/libs/utils/qtcolorbutton.h
index 67b0148b3f..f7c35c8761 100644
--- a/src/libs/utils/qtcolorbutton.h
+++ b/src/libs/utils/qtcolorbutton.h
@@ -34,7 +34,6 @@
#include <QtGui/QToolButton>
-namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT QtColorButton : public QToolButton
@@ -76,6 +75,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // QTCOLORBUTTON_H
diff --git a/src/libs/utils/reloadpromptutils.cpp b/src/libs/utils/reloadpromptutils.cpp
index 7b00845a36..1d0015a5bf 100644
--- a/src/libs/utils/reloadpromptutils.cpp
+++ b/src/libs/utils/reloadpromptutils.cpp
@@ -33,27 +33,26 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
-using namespace Core;
-using namespace Core::Utils;
+using namespace Utils;
-QTCREATOR_UTILS_EXPORT Core::Utils::ReloadPromptAnswer
- Core::Utils::reloadPrompt(const QString &fileName, bool modified, QWidget *parent)
+QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer
+ Utils::reloadPrompt(const QString &fileName, bool modified, QWidget *parent)
{
- const QString title = QCoreApplication::translate("Core::Utils::reloadPrompt", "File Changed");
+ const QString title = QCoreApplication::translate("Utils::reloadPrompt", "File Changed");
QString msg;
if (modified)
- msg = QCoreApplication::translate("Core::Utils::reloadPrompt",
+ msg = QCoreApplication::translate("Utils::reloadPrompt",
"The unsaved file %1 has been changed outside Qt Creator. Do you want to reload it and discard your changes?").arg(QDir::toNativeSeparators(fileName));
else
- msg = QCoreApplication::translate("Core::Utils::reloadPrompt",
+ msg = QCoreApplication::translate("Utils::reloadPrompt",
"The file %1 has changed outside Qt Creator. Do you want to reload it?").arg(QDir::toNativeSeparators(fileName));
return reloadPrompt(title, msg, parent);
}
-QTCREATOR_UTILS_EXPORT Core::Utils::ReloadPromptAnswer
- Core::Utils::reloadPrompt(const QString &title, const QString &prompt, QWidget *parent)
+QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer
+ Utils::reloadPrompt(const QString &title, const QString &prompt, QWidget *parent)
{
switch (QMessageBox::question(parent, title, prompt,
QMessageBox::Yes|QMessageBox::YesToAll|QMessageBox::No|QMessageBox::NoToAll,
diff --git a/src/libs/utils/reloadpromptutils.h b/src/libs/utils/reloadpromptutils.h
index a35b55d8f7..04ae1bbb4c 100644
--- a/src/libs/utils/reloadpromptutils.h
+++ b/src/libs/utils/reloadpromptutils.h
@@ -37,7 +37,6 @@ class QString;
class QWidget;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
enum ReloadPromptAnswer { ReloadCurrent, ReloadAll, ReloadSkipCurrent, ReloadNone };
@@ -46,6 +45,5 @@ QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &fileName,
QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &title, const QString &prompt, QWidget *parent);
} // namespace Utils
-} // namespace Core
#endif // RELOADPROMPTUTILS_H
diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp
index bf406f0b23..e3833bebb6 100644
--- a/src/libs/utils/savedaction.cpp
+++ b/src/libs/utils/savedaction.cpp
@@ -44,7 +44,7 @@
#include <QtGui/QSpinBox>
-using namespace Core::Utils;
+using namespace Utils;
//////////////////////////////////////////////////////////////////////////
@@ -54,7 +54,7 @@ using namespace Core::Utils;
//////////////////////////////////////////////////////////////////////////
/*!
- \class Core::Utils::SavedAction
+ \class Utils::SavedAction
\brief The SavedAction class is a helper class for actions with persistent
state.
diff --git a/src/libs/utils/savedaction.h b/src/libs/utils/savedaction.h
index 2e0857a721..4306a800bd 100644
--- a/src/libs/utils/savedaction.h
+++ b/src/libs/utils/savedaction.h
@@ -42,8 +42,6 @@ QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
-
-namespace Core {
namespace Utils {
enum ApplyMode { ImmediateApply, DeferedApply };
@@ -122,6 +120,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // SAVED_ACTION_H
diff --git a/src/libs/utils/settingsutils.cpp b/src/libs/utils/settingsutils.cpp
index 024c1c09fa..14727b3645 100644
--- a/src/libs/utils/settingsutils.cpp
+++ b/src/libs/utils/settingsutils.cpp
@@ -31,7 +31,6 @@
#include <QtCore/QString>
-namespace Core {
namespace Utils {
QTCREATOR_UTILS_EXPORT QString settingsKey(const QString &category)
@@ -48,4 +47,3 @@ QTCREATOR_UTILS_EXPORT QString settingsKey(const QString &category)
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/settingsutils.h b/src/libs/utils/settingsutils.h
index bd7d835358..0e1aac3f45 100644
--- a/src/libs/utils/settingsutils.h
+++ b/src/libs/utils/settingsutils.h
@@ -32,7 +32,6 @@
#include "utils_global.h"
-namespace Core {
namespace Utils {
// Create a usable settings key from a category,
@@ -40,6 +39,5 @@ namespace Utils {
QTCREATOR_UTILS_EXPORT QString settingsKey(const QString &category);
} // namespace Utils
-} // namespace Core
#endif // SETTINGSTUTILS_H
diff --git a/src/libs/utils/styledbar.cpp b/src/libs/utils/styledbar.cpp
index 60eb639216..12b0b82826 100644
--- a/src/libs/utils/styledbar.cpp
+++ b/src/libs/utils/styledbar.cpp
@@ -37,7 +37,7 @@
#include <QtGui/QStyle>
#include <QtGui/QStyleOption>
-using namespace Core::Utils;
+using namespace Utils;
StyledBar::StyledBar(QWidget *parent)
: QWidget(parent)
diff --git a/src/libs/utils/styledbar.h b/src/libs/utils/styledbar.h
index 9171a3dbae..b79aa92be0 100644
--- a/src/libs/utils/styledbar.h
+++ b/src/libs/utils/styledbar.h
@@ -34,7 +34,6 @@
#include <QtGui/QWidget>
-namespace Core {
namespace Utils {
class QTCREATOR_UTILS_EXPORT StyledBar : public QWidget
@@ -56,6 +55,5 @@ protected:
};
} // Utils
-} // Core
#endif // STYLEDBAR_H
diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp
index 0544bd2569..3087894c8d 100644
--- a/src/libs/utils/stylehelper.cpp
+++ b/src/libs/utils/stylehelper.cpp
@@ -52,6 +52,8 @@ static int range(float x, int min, int max)
}
*/
+namespace Utils {
+
QColor StyleHelper::mergedColors(const QColor &colorA, const QColor &colorB, int factor)
{
const int maxFactor = 100;
@@ -231,3 +233,5 @@ void StyleHelper::menuGradient(QPainter *painter, const QRect &spanRect, const Q
QPixmapCache::insert(key, pixmap);
}
}
+
+} // namespace Utils
diff --git a/src/libs/utils/stylehelper.h b/src/libs/utils/stylehelper.h
index b2be66f748..a314f2e4ae 100644
--- a/src/libs/utils/stylehelper.h
+++ b/src/libs/utils/stylehelper.h
@@ -42,6 +42,7 @@ QT_END_NAMESPACE
// Helper class holding all custom color values
+namespace Utils {
class QTCREATOR_UTILS_EXPORT StyleHelper
{
public:
@@ -74,4 +75,5 @@ private:
static QColor m_baseColor;
};
+} // namespace Utils
#endif // STYLEHELPER_H
diff --git a/src/libs/utils/submiteditorwidget.cpp b/src/libs/utils/submiteditorwidget.cpp
index 1bd1abc110..3433329d52 100644
--- a/src/libs/utils/submiteditorwidget.cpp
+++ b/src/libs/utils/submiteditorwidget.cpp
@@ -44,7 +44,6 @@
enum { debug = 0 };
enum { defaultLineWidth = 72 };
-namespace Core {
namespace Utils {
// QActionPushButton: A push button tied to an action
@@ -505,6 +504,5 @@ void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos)
}
} // namespace Utils
-} // namespace Core
#include "submiteditorwidget.moc"
diff --git a/src/libs/utils/submiteditorwidget.h b/src/libs/utils/submiteditorwidget.h
index 2559635b79..6ec7da52c0 100644
--- a/src/libs/utils/submiteditorwidget.h
+++ b/src/libs/utils/submiteditorwidget.h
@@ -44,7 +44,6 @@ class QModelIndex;
class QLineEdit;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
class SubmitFieldWidget;
@@ -144,6 +143,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif // SUBMITEDITORWIDGET_H
diff --git a/src/libs/utils/submiteditorwidget.ui b/src/libs/utils/submiteditorwidget.ui
index 7015a2c75b..957210e40a 100644
--- a/src/libs/utils/submiteditorwidget.ui
+++ b/src/libs/utils/submiteditorwidget.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>Core::Utils::SubmitEditorWidget</class>
- <widget class="QWidget" name="Core::Utils::SubmitEditorWidget">
+ <class>Utils::SubmitEditorWidget</class>
+ <widget class="QWidget" name="Utils::SubmitEditorWidget">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/src/libs/utils/submitfieldwidget.cpp b/src/libs/utils/submitfieldwidget.cpp
index d371595218..f1c271bc03 100644
--- a/src/libs/utils/submitfieldwidget.cpp
+++ b/src/libs/utils/submitfieldwidget.cpp
@@ -22,8 +22,7 @@ static void inline setComboBlocked(QComboBox *cb, int index)
cb->blockSignals(blocked);
}
-namespace Core {
- namespace Utils {
+namespace Utils {
// Field/Row entry
struct FieldEntry {
@@ -341,4 +340,3 @@ void SubmitFieldWidget::slotBrowseButtonClicked()
}
}
-}
diff --git a/src/libs/utils/submitfieldwidget.h b/src/libs/utils/submitfieldwidget.h
index 08e834bfb4..870180790b 100644
--- a/src/libs/utils/submitfieldwidget.h
+++ b/src/libs/utils/submitfieldwidget.h
@@ -9,8 +9,7 @@ QT_BEGIN_NAMESPACE
class QCompleter;
QT_END_NAMESPACE
-namespace Core {
- namespace Utils {
+namespace Utils {
struct SubmitFieldWidgetPrivate;
@@ -66,6 +65,5 @@ private:
};
}
-}
#endif // SUBMITFIELDWIDGET_H
diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp
index 07fd6df975..9486caa5a0 100644
--- a/src/libs/utils/synchronousprocess.cpp
+++ b/src/libs/utils/synchronousprocess.cpp
@@ -44,7 +44,6 @@ enum { debug = 0 };
enum { defaultMaxHangTimerCount = 10 };
-namespace Core {
namespace Utils {
// ----------- SynchronousProcessResponse
@@ -492,6 +491,4 @@ QChar SynchronousProcess::pathSeparator()
return QLatin1Char(':');
}
-
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/synchronousprocess.h b/src/libs/utils/synchronousprocess.h
index 31562a598a..86f45060cd 100644
--- a/src/libs/utils/synchronousprocess.h
+++ b/src/libs/utils/synchronousprocess.h
@@ -42,7 +42,6 @@ class QDebug;
class QByteArray;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
struct SynchronousProcessPrivate;
@@ -146,6 +145,5 @@ private:
};
} // namespace Utils
-} // namespace Core
#endif
diff --git a/src/libs/utils/treewidgetcolumnstretcher.cpp b/src/libs/utils/treewidgetcolumnstretcher.cpp
index d33c04ac4e..a8e49d3e1d 100644
--- a/src/libs/utils/treewidgetcolumnstretcher.cpp
+++ b/src/libs/utils/treewidgetcolumnstretcher.cpp
@@ -2,7 +2,7 @@
#include <QtGui/QTreeWidget>
#include <QtGui/QHideEvent>
#include <QtGui/QHeaderView>
-using namespace Core::Utils;
+using namespace Utils;
TreeWidgetColumnStretcher::TreeWidgetColumnStretcher(QTreeWidget *treeWidget, int columnToStretch)
: QObject(treeWidget->header()), m_columnToStretch(columnToStretch)
diff --git a/src/libs/utils/treewidgetcolumnstretcher.h b/src/libs/utils/treewidgetcolumnstretcher.h
index b40368a46c..f8f1668ff6 100644
--- a/src/libs/utils/treewidgetcolumnstretcher.h
+++ b/src/libs/utils/treewidgetcolumnstretcher.h
@@ -37,7 +37,6 @@ QT_BEGIN_NAMESPACE
class QTreeWidget;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
/*
@@ -58,6 +57,5 @@ public:
};
} // namespace Utils
-} // namespace Core
#endif // TREEWIDGETCOLUMNSTRETCHER_H
diff --git a/src/libs/utils/uncommentselection.cpp b/src/libs/utils/uncommentselection.cpp
index 7cac84ce59..f59e56835e 100644
--- a/src/libs/utils/uncommentselection.cpp
+++ b/src/libs/utils/uncommentselection.cpp
@@ -33,7 +33,7 @@
#include <QtGui/QTextBlock>
#include <QtGui/QTextDocument>
-void Core::Utils::unCommentSelection(QPlainTextEdit *edit)
+void Utils::unCommentSelection(QPlainTextEdit *edit)
{
QTextCursor cursor = edit->textCursor();
QTextDocument *doc = cursor.document();
diff --git a/src/libs/utils/uncommentselection.h b/src/libs/utils/uncommentselection.h
index aff5a9eedf..4d7bb7a1cd 100644
--- a/src/libs/utils/uncommentselection.h
+++ b/src/libs/utils/uncommentselection.h
@@ -36,12 +36,10 @@ QT_BEGIN_NAMESPACE
class QPlainTextEdit;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
QTCREATOR_UTILS_EXPORT void unCommentSelection(QPlainTextEdit *edit);
} // end of namespace Utils
-} // end of namespace Core
#endif // UNCOMMENTSELECTION_H
diff --git a/src/libs/utils/welcomemodetreewidget.cpp b/src/libs/utils/welcomemodetreewidget.cpp
index 3002e69202..1fd3b52a43 100644
--- a/src/libs/utils/welcomemodetreewidget.cpp
+++ b/src/libs/utils/welcomemodetreewidget.cpp
@@ -33,8 +33,7 @@
#include <QtGui/QBoxLayout>
#include <QtGui/QHeaderView>
-namespace Core {
- namespace Utils {
+namespace Utils {
void WelcomeModeLabel::setStyledText(const QString &text)
{
@@ -115,4 +114,3 @@ void WelcomeModeTreeWidget::slotItemClicked(QTreeWidgetItem *item)
}
}
-}
diff --git a/src/libs/utils/welcomemodetreewidget.h b/src/libs/utils/welcomemodetreewidget.h
index 5b35ee651c..61ae5b6de8 100644
--- a/src/libs/utils/welcomemodetreewidget.h
+++ b/src/libs/utils/welcomemodetreewidget.h
@@ -35,8 +35,7 @@
#include <QtGui/QTreeWidget>
#include <QtGui/QLabel>
-namespace Core {
- namespace Utils {
+namespace Utils {
struct WelcomeModeTreeWidgetPrivate;
struct WelcomeModeLabelPrivate;
@@ -77,6 +76,5 @@ private:
};
}
-}
#endif // WELCOMEMODETREEWIDGET_H
diff --git a/src/libs/utils/winutils.cpp b/src/libs/utils/winutils.cpp
index 2048f810d4..7815d553fb 100644
--- a/src/libs/utils/winutils.cpp
+++ b/src/libs/utils/winutils.cpp
@@ -32,7 +32,6 @@
#include <QtCore/QString>
-namespace Core {
namespace Utils {
QTCREATOR_UTILS_EXPORT QString winErrorMessage(unsigned long error)
@@ -53,4 +52,3 @@ QTCREATOR_UTILS_EXPORT QString winErrorMessage(unsigned long error)
}
} // namespace Utils
-} // namespace Core
diff --git a/src/libs/utils/winutils.h b/src/libs/utils/winutils.h
index 770c7afda9..19b8986ce1 100644
--- a/src/libs/utils/winutils.h
+++ b/src/libs/utils/winutils.h
@@ -36,7 +36,6 @@ QT_BEGIN_NAMESPACE
class QString;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
// Helper to format a Windows error message, taking the
@@ -44,5 +43,4 @@ namespace Utils {
QTCREATOR_UTILS_EXPORT QString winErrorMessage(unsigned long error);
} // namespace Utils
-} // namespace Core
#endif // WINUTILS_H
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp
index 5175f4b6a9..04bf7642f9 100644
--- a/src/plugins/bineditor/bineditorplugin.cpp
+++ b/src/plugins/bineditor/bineditorplugin.cpp
@@ -271,17 +271,17 @@ public:
break;
}
- switch (Core::Utils::reloadPrompt(fileName, isModified(), Core::ICore::instance()->mainWindow())) {
- case Core::Utils::ReloadCurrent:
+ switch (Utils::reloadPrompt(fileName, isModified(), Core::ICore::instance()->mainWindow())) {
+ case Utils::ReloadCurrent:
open(fileName);
break;
- case Core::Utils::ReloadAll:
+ case Utils::ReloadAll:
open(fileName);
*behavior = Core::IFile::ReloadAll;
break;
- case Core::Utils::ReloadSkipCurrent:
+ case Utils::ReloadSkipCurrent:
break;
- case Core::Utils::ReloadNone:
+ case Utils::ReloadNone:
*behavior = Core::IFile::ReloadNone;
break;
}
@@ -305,7 +305,7 @@ public:
m_file = new BinEditorFile(parent);
m_context << uidm->uniqueIdentifier(Core::Constants::K_DEFAULT_BINARY_EDITOR);
m_context << uidm->uniqueIdentifier(Constants::C_BINEDITOR);
- m_cursorPositionLabel = new Core::Utils::LineColumnLabel;
+ m_cursorPositionLabel = new Utils::LineColumnLabel;
QHBoxLayout *l = new QHBoxLayout;
QWidget *w = new QWidget;
@@ -362,7 +362,7 @@ private:
BinEditorFile *m_file;
QList<int> m_context;
QToolBar *m_toolBar;
- Core::Utils::LineColumnLabel *m_cursorPositionLabel;
+ Utils::LineColumnLabel *m_cursorPositionLabel;
};
diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
index 98693ed96d..0939a1c43f 100644
--- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
@@ -236,7 +236,7 @@ ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool chang
"This ensures that the source directory remains clean and enables multiple builds "
"with different settings."));
fl->addWidget(label);
- m_pc = new Core::Utils::PathChooser(this);
+ m_pc = new Utils::PathChooser(this);
m_pc->setPath(m_cmakeWizard->buildDirectory());
connect(m_pc, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
fl->addRow(tr("Build directory:"), m_pc);
@@ -284,8 +284,8 @@ void CMakeRunPage::initWidgets()
fl->addRow(new QLabel(text, this));
// Show a field for the user to enter
- m_cmakeExecutable = new Core::Utils::PathChooser(this);
- m_cmakeExecutable->setExpectedKind(Core::Utils::PathChooser::Command);
+ m_cmakeExecutable = new Utils::PathChooser(this);
+ m_cmakeExecutable->setExpectedKind(Utils::PathChooser::Command);
fl->addRow("CMake Executable", m_cmakeExecutable);
}
diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
index 6a74741b5f..307ac61a67 100644
--- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
+++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
@@ -40,10 +40,8 @@
#include <QtGui/QWizard>
#include <QtGui/QPlainTextEdit>
-namespace Core {
- namespace Utils {
- class PathChooser;
- }
+namespace Utils {
+ class PathChooser;
}
namespace CMakeProjectManager {
@@ -115,7 +113,7 @@ private slots:
void buildDirectoryChanged();
private:
CMakeOpenProjectWizard *m_cmakeWizard;
- Core::Utils::PathChooser *m_pc;
+ Utils::PathChooser *m_pc;
};
class CMakeRunPage : public QWizardPage
@@ -139,7 +137,7 @@ private:
QPushButton *m_runCMake;
QProcess *m_cmakeProcess;
QLineEdit *m_argumentsLineEdit;
- Core::Utils::PathChooser *m_cmakeExecutable;
+ Utils::PathChooser *m_cmakeExecutable;
QComboBox *m_generatorComboBox;
QLabel *m_descriptionLabel;
bool m_complete;
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
index 2b7da6fc0d..fbab5af5d8 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
@@ -262,8 +262,8 @@ QWidget *CMakeSettingsPage::createPage(QWidget *parent)
{
QWidget *w = new QWidget(parent);
QFormLayout *fl = new QFormLayout(w);
- m_pathchooser = new Core::Utils::PathChooser(w);
- m_pathchooser->setExpectedKind(Core::Utils::PathChooser::Command);
+ m_pathchooser = new Utils::PathChooser(w);
+ m_pathchooser->setExpectedKind(Utils::PathChooser::Command);
fl->addRow(tr("CMake executable"), m_pathchooser);
m_pathchooser->setPath(cmakeExecutable());
return w;
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
index 904094b1a1..a33055235a 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.h
@@ -107,7 +107,7 @@ private:
QString findCmakeExecutable() const;
void updateInfo();
- Core::Utils::PathChooser *m_pathchooser;
+ Utils::PathChooser *m_pathchooser;
QString m_cmakeExecutable;
enum STATE { VALID, INVALID, RUNNING } m_state;
QProcess *m_process;
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index 8e25314ba8..8a5b337a68 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -246,9 +246,9 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
this, SLOT(setArguments(QString)));
fl->addRow(tr("Arguments:"), argumentsLineEdit);
- m_workingDirectoryEdit = new Core::Utils::PathChooser();
+ m_workingDirectoryEdit = new Utils::PathChooser();
m_workingDirectoryEdit->setPath(m_cmakeRunConfiguration->workingDirectory());
- m_workingDirectoryEdit->setExpectedKind(Core::Utils::PathChooser::Directory);
+ m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select the working directory"));
QToolButton *resetButton = new QToolButton();
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
index 197d0b2a8d..85b87d1d07 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
@@ -120,7 +120,7 @@ private:
void updateSummary();
bool m_ignoreChange;
CMakeRunConfiguration *m_cmakeRunConfiguration;
- Core::Utils::PathChooser *m_workingDirectoryEdit;
+ Utils::PathChooser *m_workingDirectoryEdit;
QComboBox *m_baseEnvironmentComboBox;
ProjectExplorer::EnvironmentWidget *m_environmentWidget;
Utils::DetailsWidget *m_detailsContainer;
diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp
index 0148fc74eb..5c185a546c 100644
--- a/src/plugins/coreplugin/basefilewizard.cpp
+++ b/src/plugins/coreplugin/basefilewizard.cpp
@@ -647,7 +647,7 @@ QWizard *StandardFileWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
- Core::Utils::FileWizardDialog *standardWizardDialog = new Core::Utils::FileWizardDialog(parent);
+ Utils::FileWizardDialog *standardWizardDialog = new Utils::FileWizardDialog(parent);
standardWizardDialog->setWindowTitle(tr("New %1").arg(name()));
setupWizard(standardWizardDialog);
standardWizardDialog->setPath(defaultPath);
@@ -659,7 +659,7 @@ QWizard *StandardFileWizard::createWizardDialog(QWidget *parent,
GeneratedFiles StandardFileWizard::generateFiles(const QWizard *w,
QString *errorMessage) const
{
- const Core::Utils::FileWizardDialog *standardWizardDialog = qobject_cast<const Core::Utils::FileWizardDialog *>(w);
+ const Utils::FileWizardDialog *standardWizardDialog = qobject_cast<const Utils::FileWizardDialog *>(w);
return generateFilesFromPath(standardWizardDialog->path(),
standardWizardDialog->name(),
errorMessage);
diff --git a/src/plugins/coreplugin/basefilewizard.h b/src/plugins/coreplugin/basefilewizard.h
index 6ec1c0b970..fb27113792 100644
--- a/src/plugins/coreplugin/basefilewizard.h
+++ b/src/plugins/coreplugin/basefilewizard.h
@@ -199,7 +199,7 @@ private:
};
// StandardFileWizard convenience class for creating one file. It uses
-// Core::Utils::FileWizardDialog and introduces a new virtual to generate the
+// Utils::FileWizardDialog and introduces a new virtual to generate the
// files from path and name.
class CORE_EXPORT StandardFileWizard : public BaseFileWizard
@@ -210,7 +210,7 @@ class CORE_EXPORT StandardFileWizard : public BaseFileWizard
protected:
explicit StandardFileWizard(const BaseFileWizardParameters &parameters, QObject *parent = 0);
- // Implemented to create a Core::Utils::FileWizardDialog
+ // Implemented to create a Utils::FileWizardDialog
virtual QWizard *createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const;
diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
index 3414a3d77c..4aad9f573b 100644
--- a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
+++ b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
@@ -113,7 +113,7 @@ QWidget *ShortcutSettings::createPage(QWidget *parent)
this, SLOT(commandChanged(QTreeWidgetItem *)));
connect(m_page->shortcutEdit, SIGNAL(textChanged(QString)), this, SLOT(keyChanged()));
- new Core::Utils::TreeWidgetColumnStretcher(m_page->commandList, 1);
+ new Utils::TreeWidgetColumnStretcher(m_page->commandList, 1);
commandChanged(0);
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index ea1ed14015..32a786e050 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -78,7 +78,7 @@ Q_DECLARE_METATYPE(Core::IEditor*)
using namespace Core;
using namespace Core::Internal;
-using namespace Core::Utils;
+using namespace Utils;
enum { debugEditorManager=0 };
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index 240905a325..5cb4e43ff1 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -137,7 +137,7 @@ EditorView::EditorView(OpenEditorsModel *model, QWidget *parent) :
toplayout->addWidget(m_lockButton);
toplayout->addWidget(m_closeButton);
- Core::Utils::StyledBar *top = new Core::Utils::StyledBar;
+ Utils::StyledBar *top = new Utils::StyledBar;
top->setLayout(toplayout);
tl->addWidget(top);
diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp
index 7abb1f9011..8cf175651b 100644
--- a/src/plugins/coreplugin/fancytabwidget.cpp
+++ b/src/plugins/coreplugin/fancytabwidget.cpp
@@ -76,7 +76,7 @@ FancyTabBar::~FancyTabBar()
QSize FancyTabBar::tabSizeHint(bool minimum) const
{
QFont boldFont(font());
- boldFont.setPointSizeF(StyleHelper::sidebarFontSize());
+ boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize());
boldFont.setBold(true);
QFontMetrics fm(boldFont);
int spacing = 6;
@@ -245,13 +245,13 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
QRect tabTextRect(tabRect(tabIndex));
QRect tabIconRect(tabTextRect);
QFont boldFont(painter->font());
- boldFont.setPointSizeF(StyleHelper::sidebarFontSize());
+ boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize());
boldFont.setBold(true);
painter->setFont(boldFont);
- painter->setPen(selected ? StyleHelper::panelTextColor() : QColor(30, 30, 30, 80));
+ painter->setPen(selected ? Utils::StyleHelper::panelTextColor() : QColor(30, 30, 30, 80));
int textFlags = Qt::AlignCenter | Qt::AlignBottom | Qt::ElideRight | Qt::TextWordWrap;
painter->drawText(tabTextRect, textFlags, tabText);
- painter->setPen(selected ? QColor(60, 60, 60) : StyleHelper::panelTextColor());
+ painter->setPen(selected ? QColor(60, 60, 60) : Utils::StyleHelper::panelTextColor());
int textHeight = painter->fontMetrics().boundingRect(QRect(0, 0, width(), height()), Qt::TextWordWrap, tabText).height();
tabIconRect.adjust(0, 4, 0, -textHeight);
int iconSize = qMin(tabIconRect.width(), tabIconRect.height());
@@ -285,7 +285,7 @@ public:
void mousePressEvent(QMouseEvent *ev)
{
if (ev->modifiers() & Qt::ShiftModifier)
- StyleHelper::setBaseColor(QColorDialog::getColor(StyleHelper::baseColor(), m_parent));
+ Utils::StyleHelper::setBaseColor(QColorDialog::getColor(Utils::StyleHelper::baseColor(), m_parent));
}
private:
QWidget *m_parent;
@@ -305,7 +305,7 @@ FancyTabWidget::FancyTabWidget(QWidget *parent)
selectionLayout->setSpacing(0);
selectionLayout->setMargin(0);
- Core::Utils::StyledBar *bar = new Core::Utils::StyledBar;
+ Utils::StyledBar *bar = new Utils::StyledBar;
QHBoxLayout *layout = new QHBoxLayout(bar);
layout->setMargin(0);
layout->setSpacing(0);
@@ -377,8 +377,8 @@ void FancyTabWidget::paintEvent(QPaintEvent *event)
QRect rect = m_selectionWidget->rect().adjusted(0, 0, 1, 0);
rect = style()->visualRect(layoutDirection(), geometry(), rect);
- StyleHelper::verticalGradient(&p, rect, rect);
- p.setPen(StyleHelper::borderColor());
+ Utils::StyleHelper::verticalGradient(&p, rect, rect);
+ p.setPen(Utils::StyleHelper::borderColor());
p.drawLine(rect.topRight(), rect.bottomRight());
}
diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp
index 683d969629..30ce55f36f 100644
--- a/src/plugins/coreplugin/generalsettings.cpp
+++ b/src/plugins/coreplugin/generalsettings.cpp
@@ -38,7 +38,7 @@
#include "ui_generalsettings.h"
-using namespace Core::Utils;
+using namespace Utils;
using namespace Core::Internal;
GeneralSettings::GeneralSettings():
diff --git a/src/plugins/coreplugin/generalsettings.ui b/src/plugins/coreplugin/generalsettings.ui
index 269d146165..dd680aa10c 100644
--- a/src/plugins/coreplugin/generalsettings.ui
+++ b/src/plugins/coreplugin/generalsettings.ui
@@ -46,7 +46,7 @@
</spacer>
</item>
<item>
- <widget class="Core::Utils::QtColorButton" name="colorButton">
+ <widget class="Utils::QtColorButton" name="colorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -228,7 +228,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::QtColorButton</class>
+ <class>Utils::QtColorButton</class>
<extends>QToolButton</extends>
<header location="global">utils/qtcolorbutton.h</header>
</customwidget>
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index 0a82ef2369..a8434f6fdf 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -863,7 +863,7 @@ QStringList MainWindow::showNewItemDialog(const QString &title,
if (defaultDir.isEmpty() && !m_coreImpl->fileManager()->currentFile().isEmpty())
defaultDir = QFileInfo(m_coreImpl->fileManager()->currentFile()).absolutePath();
if (defaultDir.isEmpty())
- defaultDir = Core::Utils::PathChooser::homePath();
+ defaultDir = Utils::PathChooser::homePath();
// Scan for wizards matching the filter and pick one. Don't show
// dialog if there is only one.
@@ -1101,7 +1101,7 @@ void MainWindow::readSettings()
{
m_settings->beginGroup(QLatin1String(settingsGroup));
- StyleHelper::setBaseColor(m_settings->value(QLatin1String(colorKey)).value<QColor>());
+ Utils::StyleHelper::setBaseColor(m_settings->value(QLatin1String(colorKey)).value<QColor>());
const QVariant geom = m_settings->value(QLatin1String(geometryKey));
if (geom.isValid()) {
@@ -1124,7 +1124,7 @@ void MainWindow::writeSettings()
{
m_settings->beginGroup(QLatin1String(settingsGroup));
- m_settings->setValue(QLatin1String(colorKey), StyleHelper::baseColor());
+ m_settings->setValue(QLatin1String(colorKey), Utils::StyleHelper::baseColor());
if (windowState() & (Qt::WindowMaximized | Qt::WindowFullScreen)) {
m_settings->setValue(QLatin1String(maxKey), (bool) (windowState() & Qt::WindowMaximized));
diff --git a/src/plugins/coreplugin/mainwindow.h b/src/plugins/coreplugin/mainwindow.h
index 7c2721deeb..a85a51ddda 100644
--- a/src/plugins/coreplugin/mainwindow.h
+++ b/src/plugins/coreplugin/mainwindow.h
@@ -35,11 +35,6 @@
#include "eventfilteringmainwindow.h"
#include <QtCore/QMap>
-#include <QtCore/QList>
-#include <QtCore/QSet>
-#include <QtCore/QPointer>
-#include <QtGui/QPrinter>
-#include <QtGui/QToolButton>
QT_BEGIN_NAMESPACE
class QSettings;
diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp
index 816c6d32d1..ffb3959c58 100644
--- a/src/plugins/coreplugin/manhattanstyle.cpp
+++ b/src/plugins/coreplugin/manhattanstyle.cpp
@@ -287,7 +287,7 @@ void ManhattanStyle::unpolish(QApplication *app)
QPalette panelPalette(const QPalette &oldPalette)
{
- QColor color = StyleHelper::panelTextColor();
+ QColor color = Utils::StyleHelper::panelTextColor();
QPalette pal = oldPalette;
pal.setBrush(QPalette::All, QPalette::WindowText, color);
pal.setBrush(QPalette::All, QPalette::ButtonText, color);
@@ -312,20 +312,20 @@ void ManhattanStyle::polish(QWidget *widget)
widget->setAttribute(Qt::WA_LayoutUsesWidgetRect, true);
if (qobject_cast<QToolButton*>(widget)) {
widget->setAttribute(Qt::WA_Hover);
- widget->setMaximumHeight(StyleHelper::navigationWidgetHeight() - 2);
+ widget->setMaximumHeight(Utils::StyleHelper::navigationWidgetHeight() - 2);
}
else if (qobject_cast<QLineEdit*>(widget)) {
widget->setAttribute(Qt::WA_Hover);
- widget->setMaximumHeight(StyleHelper::navigationWidgetHeight() - 2);
+ widget->setMaximumHeight(Utils::StyleHelper::navigationWidgetHeight() - 2);
}
else if (qobject_cast<QLabel*>(widget))
widget->setPalette(panelPalette(widget->palette()));
else if (qobject_cast<QToolBar*>(widget) || widget->property("panelwidget_singlerow").toBool())
- widget->setFixedHeight(StyleHelper::navigationWidgetHeight());
+ widget->setFixedHeight(Utils::StyleHelper::navigationWidgetHeight());
else if (qobject_cast<QStatusBar*>(widget))
- widget->setFixedHeight(StyleHelper::navigationWidgetHeight() + 2);
+ widget->setFixedHeight(Utils::StyleHelper::navigationWidgetHeight() + 2);
else if (qobject_cast<QComboBox*>(widget)) {
- widget->setMaximumHeight(StyleHelper::navigationWidgetHeight() - 2);
+ widget->setMaximumHeight(Utils::StyleHelper::navigationWidgetHeight() - 2);
widget->setAttribute(Qt::WA_Hover);
}
}
@@ -486,7 +486,7 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
drawCornerImage(d->lineeditImage_disabled, painter, option->rect, 2, 2, 2, 2);
if (option->state & State_HasFocus || option->state & State_MouseOver) {
- QColor hover = StyleHelper::baseColor();
+ QColor hover = Utils::StyleHelper::baseColor();
if (state & State_HasFocus)
hover.setAlpha(100);
else
@@ -533,15 +533,15 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
{
painter->save();
QLinearGradient grad(option->rect.topLeft(), QPoint(rect.center().x(), rect.bottom()));
- QColor startColor = StyleHelper::shadowColor().darker(164);
- QColor endColor = StyleHelper::baseColor().darker(130);
+ QColor startColor = Utils::StyleHelper::shadowColor().darker(164);
+ QColor endColor = Utils::StyleHelper::baseColor().darker(130);
grad.setColorAt(0, startColor);
grad.setColorAt(1, endColor);
painter->fillRect(option->rect, grad);
painter->setPen(QColor(255, 255, 255, 60));
painter->drawLine(rect.topLeft() + QPoint(0,1),
rect.topRight()+ QPoint(0,1));
- painter->setPen(StyleHelper::borderColor().darker(110));
+ painter->setPen(Utils::StyleHelper::borderColor().darker(110));
painter->drawLine(rect.topLeft(), rect.topRight());
painter->restore();
}
@@ -549,7 +549,7 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
case PE_IndicatorToolBarSeparator:
{
- QColor separatorColor = StyleHelper::borderColor();
+ QColor separatorColor = Utils::StyleHelper::borderColor();
separatorColor.setAlpha(100);
painter->setPen(separatorColor);
const int margin = 6;
@@ -593,10 +593,10 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
}
painter->setPen(Qt::NoPen);
- QColor dark = StyleHelper::borderColor();
+ QColor dark = Utils::StyleHelper::borderColor();
dark.setAlphaF(0.4);
- QColor light = StyleHelper::baseColor();
+ QColor light = Utils::StyleHelper::baseColor();
light.setAlphaF(0.4);
painter->fillPath(path, light);
@@ -709,10 +709,10 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
case CE_MenuBarItem:
painter->save();
if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
- QColor highlightOutline = StyleHelper::borderColor().lighter(120);
+ QColor highlightOutline = Utils::StyleHelper::borderColor().lighter(120);
bool act = mbi->state & State_Selected && mbi->state & State_Sunken;
bool dis = !(mbi->state & State_Enabled);
- StyleHelper::menuGradient(painter, option->rect, option->rect);
+ Utils::StyleHelper::menuGradient(painter, option->rect, option->rect);
QStyleOptionMenuItem item = *mbi;
item.rect = mbi->rect;
QPalette pal = mbi->palette;
@@ -723,7 +723,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
if (act) {
// Fill|
- QColor baseColor = StyleHelper::baseColor();
+ QColor baseColor = Utils::StyleHelper::baseColor();
QLinearGradient grad(option->rect.topLeft(), option->rect.bottomLeft());
grad.setColorAt(0, baseColor.lighter(120));
grad.setColorAt(1, baseColor.lighter(130));
@@ -786,7 +786,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
drawItemText(painter, editRect.translated(0, 1),
visualAlignment(option->direction, Qt::AlignLeft | Qt::AlignVCenter),
customPal, cb->state & State_Enabled, text, QPalette::ButtonText);
- customPal.setBrush(QPalette::All, QPalette::ButtonText, StyleHelper::panelTextColor());
+ customPal.setBrush(QPalette::All, QPalette::ButtonText, Utils::StyleHelper::panelTextColor());
drawItemText(painter, editRect,
visualAlignment(option->direction, Qt::AlignLeft | Qt::AlignVCenter),
customPal, cb->state & State_Enabled, text, QPalette::ButtonText);
@@ -830,9 +830,9 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
break;
case CE_MenuBarEmptyArea: {
- StyleHelper::menuGradient(painter, option->rect, option->rect);
+ Utils::StyleHelper::menuGradient(painter, option->rect, option->rect);
painter->save();
- painter->setPen(StyleHelper::borderColor());
+ painter->setPen(Utils::StyleHelper::borderColor());
painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight());
painter->restore();
}
@@ -841,12 +841,12 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
case CE_ToolBar:
{
QString key;
- key.sprintf("mh_toolbar %d %d %d", option->rect.width(), option->rect.height(), StyleHelper::baseColor().rgb());;
+ key.sprintf("mh_toolbar %d %d %d", option->rect.width(), option->rect.height(), Utils::StyleHelper::baseColor().rgb());;
QPixmap pixmap;
QPainter *p = painter;
QRect rect = option->rect;
- if (StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
+ if (Utils::StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
pixmap = QPixmap(option->rect.size());
p = new QPainter(&pixmap);
rect = QRect(0, 0, option->rect.width(), option->rect.height());
@@ -861,11 +861,11 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
gradientSpan = QRect(offset, widget->window()->size());
}
if (horizontal)
- StyleHelper::horizontalGradient(p, gradientSpan, rect);
+ Utils::StyleHelper::horizontalGradient(p, gradientSpan, rect);
else
- StyleHelper::verticalGradient(p, gradientSpan, rect);
+ Utils::StyleHelper::verticalGradient(p, gradientSpan, rect);
- painter->setPen(StyleHelper::borderColor());
+ painter->setPen(Utils::StyleHelper::borderColor());
if (horizontal) {
// Note: This is a hack to determine if the
@@ -886,7 +886,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
p->drawLine(rect.topRight(), rect.bottomRight());
}
- if (StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
+ if (Utils::StyleHelper::usePixmapCache() && !QPixmapCache::find(key, pixmap)) {
painter->drawPixmap(rect.topLeft(), pixmap);
p->end();
delete p;
@@ -946,7 +946,7 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti
fr.rect.adjust(0, 0, -pixelMetric(QStyle::PM_MenuButtonIndicator,
toolbutton, widget), 0);
QPen oldPen = painter->pen();
- QColor focusColor = StyleHelper::panelTextColor();
+ QColor focusColor = Utils::StyleHelper::panelTextColor();
focusColor.setAlpha(120);
QPen outline(focusColor, 1);
outline.setStyle(Qt::DotLine);
diff --git a/src/plugins/coreplugin/minisplitter.cpp b/src/plugins/coreplugin/minisplitter.cpp
index b391e6cb68..25b00d4f7b 100644
--- a/src/plugins/coreplugin/minisplitter.cpp
+++ b/src/plugins/coreplugin/minisplitter.cpp
@@ -71,7 +71,7 @@ void MiniSplitterHandle::resizeEvent(QResizeEvent *event)
void MiniSplitterHandle::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
- painter.fillRect(event->rect(), StyleHelper::borderColor());
+ painter.fillRect(event->rect(), Utils::StyleHelper::borderColor());
}
QSplitterHandle *MiniSplitter::createHandle()
diff --git a/src/plugins/coreplugin/navigationwidget.cpp b/src/plugins/coreplugin/navigationwidget.cpp
index 78750c49d1..5b8bbc6fa4 100644
--- a/src/plugins/coreplugin/navigationwidget.cpp
+++ b/src/plugins/coreplugin/navigationwidget.cpp
@@ -369,7 +369,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget)
m_navigationComboBox->setMinimumContentsLength(0);
m_navigationWidget = 0;
- m_toolBar = new Core::Utils::StyledBar(this);
+ m_toolBar = new Utils::StyledBar(this);
QHBoxLayout *toolBarLayout = new QHBoxLayout;
toolBarLayout->setMargin(0);
toolBarLayout->setSpacing(0);
diff --git a/src/plugins/coreplugin/navigationwidget.h b/src/plugins/coreplugin/navigationwidget.h
index a4a6753ab3..61dbc3dacb 100644
--- a/src/plugins/coreplugin/navigationwidget.h
+++ b/src/plugins/coreplugin/navigationwidget.h
@@ -40,10 +40,11 @@ class QShortcut;
class QToolButton;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
class StyledBar;
}
+
+namespace Core {
class INavigationWidgetFactory;
class IMode;
class Command;
@@ -147,7 +148,7 @@ private:
NavigationWidget *m_parentWidget;
QComboBox *m_navigationComboBox;
QWidget *m_navigationWidget;
- Core::Utils::StyledBar *m_toolBar;
+ Utils::StyledBar *m_toolBar;
QList<QToolButton *> m_additionalToolBarWidgets;
};
diff --git a/src/plugins/coreplugin/outputpane.cpp b/src/plugins/coreplugin/outputpane.cpp
index 0b56545156..7b46cbd23a 100644
--- a/src/plugins/coreplugin/outputpane.cpp
+++ b/src/plugins/coreplugin/outputpane.cpp
@@ -193,7 +193,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
QVBoxLayout *mainlayout = new QVBoxLayout;
mainlayout->setSpacing(0);
mainlayout->setMargin(0);
- m_toolBar = new Core::Utils::StyledBar;
+ m_toolBar = new Utils::StyledBar;
QHBoxLayout *toolLayout = new QHBoxLayout(m_toolBar);
toolLayout->setMargin(0);
toolLayout->setSpacing(0);
diff --git a/src/plugins/coreplugin/progressmanager/progresspie.cpp b/src/plugins/coreplugin/progressmanager/progresspie.cpp
index da9b16a871..59929d437f 100644
--- a/src/plugins/coreplugin/progressmanager/progresspie.cpp
+++ b/src/plugins/coreplugin/progressmanager/progresspie.cpp
@@ -125,8 +125,8 @@ void ProgressBar::mouseMoveEvent(QMouseEvent *)
void ProgressBar::paintEvent(QPaintEvent *)
{
- // TODO move font into stylehelper
- // TODO use stylehelper white
+ // TODO move font into Utils::StyleHelper
+ // TODO use Utils::StyleHelper white
double range = maximum() - minimum();
double percent = 0.50;
@@ -139,7 +139,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
QPainter p(this);
QFont boldFont(p.font());
- boldFont.setPointSizeF(StyleHelper::sidebarFontSize());
+ boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize());
boldFont.setBold(true);
p.setFont(boldFont);
QFontMetrics fm(boldFont);
@@ -158,7 +158,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
p.setPen(QColor(30, 30, 30, 80));
p.drawText(textRect, Qt::AlignHCenter | Qt::AlignBottom, m_title);
p.translate(0, -1);
- p.setPen(StyleHelper::panelTextColor());
+ p.setPen(Utils::StyleHelper::panelTextColor());
p.drawText(textRect, Qt::AlignHCenter | Qt::AlignBottom, m_title);
p.translate(0, 1);
@@ -166,11 +166,11 @@ void ProgressBar::paintEvent(QPaintEvent *)
m_progressHeight += ((m_progressHeight % 2) + 1) % 2; // make odd
// draw outer rect
QRect rect(INDENT - 1, h+6, size().width()-2*INDENT, m_progressHeight-1);
- p.setPen(StyleHelper::panelTextColor());
+ p.setPen(Utils::StyleHelper::panelTextColor());
p.drawRect(rect);
// draw inner rect
- QColor c = StyleHelper::panelTextColor();
+ QColor c = Utils::StyleHelper::panelTextColor();
c.setAlpha(180);
p.setPen(Qt::NoPen);
@@ -196,7 +196,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
p.drawRect(inner);
if (value() < maximum() && !m_error) {
- QColor cancelOutline = StyleHelper::panelTextColor();
+ QColor cancelOutline = Utils::StyleHelper::panelTextColor();
p.setPen(cancelOutline);
QRect cancelRect(rect.right() - m_progressHeight + 2, rect.top(), m_progressHeight-1, rect.height());
if (cancelRect.contains(mapFromGlobal(QCursor::pos())))
@@ -210,7 +210,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
p.drawLine(cancelRect.center()+QPoint(-1,-1), cancelRect.center()+QPoint(+3,+3));
p.drawLine(cancelRect.center()+QPoint(+3,-1), cancelRect.center()+QPoint(-1,+3));
- p.setPen(StyleHelper::panelTextColor());
+ p.setPen(Utils::StyleHelper::panelTextColor());
p.drawLine(cancelRect.center()+QPoint(-1,-1), cancelRect.center()+QPoint(+3,+3));
p.drawLine(cancelRect.center()+QPoint(+3,-1), cancelRect.center()+QPoint(-1,+3));
}
diff --git a/src/plugins/coreplugin/sidebar.cpp b/src/plugins/coreplugin/sidebar.cpp
index 4705dc9be8..a89720c240 100644
--- a/src/plugins/coreplugin/sidebar.cpp
+++ b/src/plugins/coreplugin/sidebar.cpp
@@ -288,9 +288,9 @@ void SideBarWidget::setCurrentItem(const QString &title)
int idx = m_comboBox->findText(title);
if (idx < 0)
idx = 0;
- m_comboBox->blockSignals(true);
+ bool blocked = m_comboBox->blockSignals(true);
m_comboBox->setCurrentIndex(idx);
- m_comboBox->blockSignals(false);
+ m_comboBox->blockSignals(blocked);
}
SideBarItem *item = m_sideBar->item(title);
@@ -307,7 +307,7 @@ void SideBarWidget::setCurrentItem(const QString &title)
void SideBarWidget::updateAvailableItems()
{
- m_comboBox->blockSignals(true);
+ bool blocked = m_comboBox->blockSignals(true);
QString current = m_comboBox->currentText();
m_comboBox->clear();
QStringList itms = m_sideBar->availableItems();
@@ -320,7 +320,7 @@ void SideBarWidget::updateAvailableItems()
idx = 0;
m_comboBox->setCurrentIndex(idx);
m_splitButton->setEnabled(itms.count() > 1);
- m_comboBox->blockSignals(false);
+ m_comboBox->blockSignals(blocked);
}
void SideBarWidget::removeCurrentItem()
diff --git a/src/plugins/cppeditor/cppclasswizard.cpp b/src/plugins/cppeditor/cppclasswizard.cpp
index b5c8393b8d..1c994c6ebc 100644
--- a/src/plugins/cppeditor/cppclasswizard.cpp
+++ b/src/plugins/cppeditor/cppclasswizard.cpp
@@ -63,7 +63,7 @@ ClassNamePage::ClassNamePage(QWidget *parent) :
setTitle(tr("Enter class name"));
setSubTitle(tr("The header and source file names will be derived from the class name"));
- m_newClassWidget = new Core::Utils::NewClassWidget;
+ m_newClassWidget = new Utils::NewClassWidget;
// Order, set extensions first before suggested name is derived
m_newClassWidget->setBaseClassInputVisible(true);
m_newClassWidget->setBaseClassChoices(QStringList() << QString()
@@ -148,7 +148,7 @@ void CppClassWizardDialog::setPath(const QString &path)
CppClassWizardParameters CppClassWizardDialog::parameters() const
{
CppClassWizardParameters rc;
- const Core::Utils::NewClassWidget *ncw = m_classNamePage->newClassWidget();
+ const Utils::NewClassWidget *ncw = m_classNamePage->newClassWidget();
rc.className = ncw->className();
rc.headerFile = ncw->headerFileName();
rc.sourceFile = ncw->sourceFileName();
@@ -216,7 +216,7 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
{
// TODO:
// Quite a bit of this code has been copied from FormClassWizardParameters::generateCpp.
- // Maybe more of it could be merged into Core::Utils.
+ // Maybe more of it could be merged into Utils.
const QString indent = QString(4, QLatin1Char(' '));
@@ -228,7 +228,7 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
const QString license = CppTools::AbstractEditorSupport::licenseTemplate();
const QString unqualifiedClassName = namespaceList.takeLast();
- const QString guard = Core::Utils::headerGuard(params.headerFile);
+ const QString guard = Utils::headerGuard(params.headerFile);
// == Header file ==
QTextStream headerStr(header);
@@ -240,10 +240,10 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
const bool superIsQtClass = qtClassExpr.exactMatch(params.baseClass);
if (superIsQtClass) {
headerStr << '\n';
- Core::Utils::writeIncludeFileDirective(params.baseClass, true, headerStr);
+ Utils::writeIncludeFileDirective(params.baseClass, true, headerStr);
}
- const QString namespaceIndent = Core::Utils::writeOpeningNameSpaces(namespaceList, QString(), headerStr);
+ const QString namespaceIndent = Utils::writeOpeningNameSpaces(namespaceList, QString(), headerStr);
// Class declaration
headerStr << '\n';
@@ -257,7 +257,7 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
<< namespaceIndent << indent << unqualifiedClassName << "();\n";
headerStr << namespaceIndent << "};\n";
- Core::Utils::writeClosingNameSpaces(namespaceList, QString(), headerStr);
+ Utils::writeClosingNameSpaces(namespaceList, QString(), headerStr);
headerStr << '\n';
headerStr << "#endif // "<< guard << '\n';
@@ -266,13 +266,13 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par
// == Source file ==
QTextStream sourceStr(source);
sourceStr << license;
- Core::Utils::writeIncludeFileDirective(params.headerFile, false, sourceStr);
- Core::Utils::writeOpeningNameSpaces(namespaceList, QString(), sourceStr);
+ Utils::writeIncludeFileDirective(params.headerFile, false, sourceStr);
+ Utils::writeOpeningNameSpaces(namespaceList, QString(), sourceStr);
// Constructor
sourceStr << '\n' << namespaceIndent << unqualifiedClassName << "::" << unqualifiedClassName << "()\n";
sourceStr << namespaceIndent << "{\n" << namespaceIndent << "}\n";
- Core::Utils::writeClosingNameSpaces(namespaceList, QString(), sourceStr);
+ Utils::writeClosingNameSpaces(namespaceList, QString(), sourceStr);
return true;
}
diff --git a/src/plugins/cppeditor/cppclasswizard.h b/src/plugins/cppeditor/cppclasswizard.h
index 6b80bbac9e..1bc26d1b56 100644
--- a/src/plugins/cppeditor/cppclasswizard.h
+++ b/src/plugins/cppeditor/cppclasswizard.h
@@ -36,13 +36,11 @@
#include <QtGui/QWizardPage>
#include <QtGui/QWizard>
-namespace Core {
namespace Utils {
class NewClassWidget;
} // namespace Utils
-} // namespace Core
namespace CppEditor {
namespace Internal {
@@ -55,7 +53,7 @@ public:
explicit ClassNamePage(QWidget *parent = 0);
bool isComplete() const { return m_isValid; }
- Core::Utils::NewClassWidget *newClassWidget() const { return m_newClassWidget; }
+ Utils::NewClassWidget *newClassWidget() const { return m_newClassWidget; }
private slots:
void slotValidChanged();
@@ -64,7 +62,7 @@ private slots:
private:
void initParameters();
- Core::Utils::NewClassWidget *m_newClassWidget;
+ Utils::NewClassWidget *m_newClassWidget;
bool m_isValid;
};
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp
index f1f277e8ea..b03e4ca346 100644
--- a/src/plugins/cppeditor/cppeditor.cpp
+++ b/src/plugins/cppeditor/cppeditor.cpp
@@ -862,7 +862,21 @@ CPlusPlus::Symbol *CPPEditor::findCanonicalSymbol(const QTextCursor &cursor,
return canonicalSymbol;
}
-void CPPEditor::findReferences()
+
+void CPPEditor::findUsages()
+{
+ updateSemanticInfo(m_semanticHighlighter->semanticInfo(currentSource()));
+
+ SemanticInfo info = m_lastSemanticInfo;
+
+ if (! info.doc)
+ return;
+
+ if (Symbol *canonicalSymbol = findCanonicalSymbol(textCursor(), info.doc, info.snapshot))
+ m_modelManager->findUsages(canonicalSymbol);
+}
+
+void CPPEditor::renameUsages()
{
m_currentRenameSelection = -1;
@@ -896,7 +910,7 @@ void CPPEditor::findReferences()
setExtraSelections(CodeSemanticsSelection, selections);
- m_modelManager->findReferences(canonicalSymbol);
+ m_modelManager->renameUsages(canonicalSymbol);
}
}
}
@@ -908,7 +922,6 @@ void CPPEditor::renameSymbolUnderCursor()
QTextCursor c = textCursor();
m_currentRenameSelection = -1;
- m_renameSelections = extraSelections(CodeSemanticsSelection);
for (int i = 0; i < m_renameSelections.size(); ++i) {
QTextEdit::ExtraSelection s = m_renameSelections.at(i);
if (c.position() >= s.cursor.anchor()
@@ -921,7 +934,7 @@ void CPPEditor::renameSymbolUnderCursor()
}
if (m_renameSelections.isEmpty())
- findReferences();
+ renameUsages();
}
void CPPEditor::onContentsChanged(int position, int charsRemoved, int charsAdded)
@@ -980,10 +993,9 @@ void CPPEditor::highlightUses(const QList<SemanticInfo::Use> &uses,
QList<QTextEdit::ExtraSelection> *selections)
{
bool isUnused = false;
- if (uses.size() == 1) {
+
+ if (uses.size() == 1)
isUnused = true;
- return; // ###
- }
foreach (const SemanticInfo::Use &use, uses) {
QTextEdit::ExtraSelection sel;
@@ -1882,13 +1894,12 @@ void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs)
// only set the background, we do not want to modify foreground properties set by the syntax highlighter or the link
m_occurrencesFormat.clearForeground();
- m_occurrencesUnusedFormat.clearForeground();
m_occurrenceRenameFormat.clearForeground();
}
void CPPEditor::unCommentSelection()
{
- Core::Utils::unCommentSelection(this);
+ Utils::unCommentSelection(this);
}
CPPEditor::Link CPPEditor::linkToSymbol(CPlusPlus::Symbol *symbol)
@@ -1944,7 +1955,9 @@ void CPPEditor::updateSemanticInfo(const SemanticInfo &semanticInfo)
int line = 0, column = 0;
convertPosition(position(), &line, &column);
- QList<QTextEdit::ExtraSelection> selections;
+ QList<QTextEdit::ExtraSelection> allSelections;
+
+ m_renameSelections.clear();
SemanticInfo::LocalUseIterator it(semanticInfo.localUses);
while (it.hasNext()) {
@@ -1961,11 +1974,18 @@ void CPPEditor::updateSemanticInfo(const SemanticInfo &semanticInfo)
}
}
- if (uses.size() == 1 || good)
+ if (uses.size() == 1) {
+ // it's an unused declaration
+ highlightUses(uses, &allSelections);
+ } else if (good) {
+ QList<QTextEdit::ExtraSelection> selections;
highlightUses(uses, &selections);
+ m_renameSelections += selections;
+ allSelections += selections;
+ }
}
- setExtraSelections(CodeSemanticsSelection, selections);
+ setExtraSelections(CodeSemanticsSelection, allSelections);
}
SemanticHighlighter::Source CPPEditor::currentSource()
diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h
index 5f544cfbbd..6c853672bf 100644
--- a/src/plugins/cppeditor/cppeditor.h
+++ b/src/plugins/cppeditor/cppeditor.h
@@ -197,7 +197,8 @@ public Q_SLOTS:
void switchDeclarationDefinition();
void jumpToDefinition();
void renameSymbolUnderCursor();
- void findReferences();
+ void renameUsages();
+ void findUsages();
void moveToPreviousToken();
void moveToNextToken();
diff --git a/src/plugins/cppeditor/cppeditorconstants.h b/src/plugins/cppeditor/cppeditorconstants.h
index 24d1504caf..356f711ba9 100644
--- a/src/plugins/cppeditor/cppeditorconstants.h
+++ b/src/plugins/cppeditor/cppeditorconstants.h
@@ -39,6 +39,7 @@ const char * const C_CPPEDITOR = "C++ Editor";
const char * const CPPEDITOR_KIND = 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";
const char * const SEPARATOR = "CppEditor.Separator";
const char * const FIND_REFERENCES = "CppEditor.FindReferences";
const char * const JUMP_TO_DEFINITION = "CppEditor.JumpToDefinition";
diff --git a/src/plugins/cppeditor/cppfilewizard.cpp b/src/plugins/cppeditor/cppfilewizard.cpp
index 190b16b72f..3f86ea88a5 100644
--- a/src/plugins/cppeditor/cppfilewizard.cpp
+++ b/src/plugins/cppeditor/cppfilewizard.cpp
@@ -74,7 +74,7 @@ QString CppFileWizard::fileContents(FileType type, const QString &fileName) cons
str << CppTools::AbstractEditorSupport::licenseTemplate();
switch (type) {
case Header: {
- const QString guard = Core::Utils::headerGuard(fileName);
+ const QString guard = Utils::headerGuard(fileName);
str << QLatin1String("#ifndef ") << guard
<< QLatin1String("\n#define ") << guard << QLatin1String("\n\n#endif // ")
<< guard << QLatin1String("\n");
diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp
index d1c8d89b00..bd65c32666 100644
--- a/src/plugins/cppeditor/cppplugin.cpp
+++ b/src/plugins/cppeditor/cppplugin.cpp
@@ -212,6 +212,12 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
contextMenu->addAction(cmd);
am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
+ QAction *findUsagesAction = new QAction(tr("Find Usages"), this);
+ cmd = am->registerAction(findUsagesAction, Constants::FIND_USAGES, context);
+ connect(findUsagesAction, SIGNAL(triggered()), this, SLOT(findUsages()));
+ contextMenu->addAction(cmd);
+ am->actionContainer(CppTools::Constants::M_TOOLS_CPP)->addAction(cmd);
+
QAction *renameSymbolUnderCursorAction = new QAction(tr("Rename Symbol under Cursor"), this);
cmd = am->registerAction(renameSymbolUnderCursorAction,
Constants::RENAME_SYMBOL_UNDER_CURSOR, context);
@@ -286,4 +292,12 @@ void CppPlugin::renameSymbolUnderCursor()
editor->renameSymbolUnderCursor();
}
+void CppPlugin::findUsages()
+{
+ Core::EditorManager *em = Core::EditorManager::instance();
+ CPPEditor *editor = qobject_cast<CPPEditor*>(em->currentEditor()->widget());
+ if (editor)
+ editor->findUsages();
+}
+
Q_EXPORT_PLUGIN(CppPlugin)
diff --git a/src/plugins/cppeditor/cppplugin.h b/src/plugins/cppeditor/cppplugin.h
index 9d46a981f1..6437f6e241 100644
--- a/src/plugins/cppeditor/cppplugin.h
+++ b/src/plugins/cppeditor/cppplugin.h
@@ -74,6 +74,7 @@ private slots:
void switchDeclarationDefinition();
void jumpToDefinition();
void renameSymbolUnderCursor();
+ void findUsages();
private:
Core::IEditor *createEditor(QWidget *parent);
diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp
index 988bba9966..cd0c8f705e 100644
--- a/src/plugins/cpptools/cppcodecompletion.cpp
+++ b/src/plugins/cpptools/cppcodecompletion.cpp
@@ -1011,7 +1011,7 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
ResolveExpression resolveExpression(context);
ResolveClass resolveClass;
- const QList<Symbol *> candidates = resolveClass(result, context);
+ const QList<Symbol *> candidates = resolveClass(namedTy->name(), result, context);
foreach (Symbol *classObject, candidates) {
const QList<TypeOfExpression::Result> overloads =
resolveExpression.resolveArrowOperator(result, namedTy,
@@ -1026,9 +1026,10 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
ty = funTy->returnType().simplified();
if (PointerType *ptrTy = ty->asPointerType()) {
- if (NamedType *namedTy = ptrTy->elementType()->asNamedType()) {
+ FullySpecifiedType elementTy = ptrTy->elementType().simplified();
+ if (NamedType *namedTy = elementTy->asNamedType()) {
const QList<Symbol *> classes =
- resolveClass(namedTy, result, context);
+ resolveClass(namedTy->name(), result, context);
foreach (Symbol *c, classes) {
if (! classObjectCandidates.contains(c))
@@ -1039,17 +1040,18 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
}
}
} else if (PointerType *ptrTy = ty->asPointerType()) {
- if (NamedType *namedTy = ptrTy->elementType()->asNamedType()) {
+ FullySpecifiedType elementTy = ptrTy->elementType().simplified();
+ if (NamedType *namedTy = elementTy->asNamedType()) {
ResolveClass resolveClass;
- const QList<Symbol *> classes = resolveClass(namedTy, result,
+ const QList<Symbol *> classes = resolveClass(namedTy->name(), result,
context);
foreach (Symbol *c, classes) {
if (! classObjectCandidates.contains(c))
classObjectCandidates.append(c);
}
- } else if (Class *classTy = ptrTy->elementType()->asClassType()) {
+ } else if (Class *classTy = elementTy->asClassType()) {
// typedef struct { int x } *Ptr;
// Ptr p;
// p->
@@ -1099,7 +1101,7 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
if (namedTy) {
ResolveClass resolveClass;
- const QList<Symbol *> symbols = resolveClass(namedTy, result,
+ const QList<Symbol *> symbols = resolveClass(namedTy->name(), result,
context);
foreach (Symbol *symbol, symbols) {
if (classObjectCandidates.contains(symbol))
@@ -1330,7 +1332,7 @@ bool CppCodeCompletion::completeQtMethod(const QList<TypeOfExpression::Result> &
FullySpecifiedType ty = p.first.simplified();
if (PointerType *ptrTy = ty->asPointerType())
- ty = ptrTy->elementType();
+ ty = ptrTy->elementType().simplified();
else
continue; // not a pointer or a reference to a pointer.
@@ -1339,7 +1341,7 @@ bool CppCodeCompletion::completeQtMethod(const QList<TypeOfExpression::Result> &
continue;
const QList<Symbol *> classObjects =
- resolveClass(namedTy, p, context);
+ resolveClass(namedTy->name(), p, context);
if (classObjects.isEmpty())
continue;
diff --git a/src/plugins/cpptools/cppfilesettingspage.cpp b/src/plugins/cpptools/cppfilesettingspage.cpp
index c69711fa12..a8320a87cc 100644
--- a/src/plugins/cpptools/cppfilesettingspage.cpp
+++ b/src/plugins/cpptools/cppfilesettingspage.cpp
@@ -208,7 +208,7 @@ CppFileSettingsWidget::CppFileSettingsWidget(QWidget *parent) :
if (const Core::MimeType headerMt = mdb->findByType(QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)))
foreach (const QString &suffix, headerMt.suffixes())
m_ui->headerSuffixComboBox->addItem(suffix);
- m_ui->licenseTemplatePathChooser->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui->licenseTemplatePathChooser->setExpectedKind(Utils::PathChooser::File);
m_ui->licenseTemplatePathChooser->addButton(tr("Edit..."), this, SLOT(slotEdit()));
}
diff --git a/src/plugins/cpptools/cppfilesettingspage.ui b/src/plugins/cpptools/cppfilesettingspage.ui
index ea074c2ff8..e981bd7ef9 100644
--- a/src/plugins/cpptools/cppfilesettingspage.ui
+++ b/src/plugins/cpptools/cppfilesettingspage.ui
@@ -61,7 +61,7 @@
</widget>
</item>
<item row="3" column="1">
- <widget class="Core::Utils::PathChooser" name="licenseTemplatePathChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="licenseTemplatePathChooser" native="true"/>
</item>
</layout>
</widget>
@@ -83,7 +83,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index b9a22812cc..f9c27ccdd9 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -69,7 +69,7 @@ struct Process: protected ASTVisitor
{
public:
Process(Document::Ptr doc, const Snapshot &snapshot,
- QFutureInterface<Core::Utils::FileSearchResult> *future)
+ QFutureInterface<Utils::FileSearchResult> *future)
: ASTVisitor(doc->control()),
_future(future),
_doc(doc),
@@ -115,6 +115,14 @@ protected:
}
+ void reportResult(unsigned tokenIndex, const QList<Symbol *> &candidates)
+ {
+ const bool isStrongResult = checkCandidates(candidates);
+
+ if (isStrongResult)
+ reportResult(tokenIndex);
+ }
+
void reportResult(unsigned tokenIndex)
{
const Token &tk = tokenAt(tokenIndex);
@@ -129,8 +137,8 @@ protected:
const int len = tk.f.length;
if (_future)
- _future->reportResult(Core::Utils::FileSearchResult(QDir::toNativeSeparators(_doc->fileName()),
- line, lineText, col, len));
+ _future->reportResult(Utils::FileSearchResult(QDir::toNativeSeparators(_doc->fileName()),
+ line, lineText, col, len));
_references.append(tokenIndex);
}
@@ -197,8 +205,7 @@ protected:
if (identifier(simple->identifier_token) == _id) {
LookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(simple->name);
- if (checkCandidates(candidates))
- reportResult(simple->identifier_token);
+ reportResult(simple->identifier_token, candidates);
}
}
accept(ast->expression);
@@ -262,8 +269,7 @@ protected:
candidates.append(lastVisibleSymbol);
}
- if (checkCandidates(candidates))
- reportResult(endToken);
+ reportResult(endToken, candidates);
}
virtual bool visit(QualifiedNameAST *ast)
@@ -331,8 +337,7 @@ protected:
if (id == _id) {
LookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(ast->name);
- if (checkCandidates(candidates))
- reportResult(ast->identifier_token);
+ reportResult(ast->identifier_token, candidates);
}
return false;
@@ -344,8 +349,7 @@ protected:
if (id == _id) {
LookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(ast->name);
- if (checkCandidates(candidates))
- reportResult(ast->identifier_token);
+ reportResult(ast->identifier_token, candidates);
}
return false;
@@ -353,19 +357,50 @@ protected:
virtual bool visit(TemplateIdAST *ast)
{
- Identifier *id = identifier(ast->identifier_token);
- if (id == _id) {
+ if (_id == identifier(ast->identifier_token)) {
LookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(ast->name);
- if (checkCandidates(candidates))
- reportResult(ast->identifier_token);
+ reportResult(ast->identifier_token, candidates);
+ }
+
+ for (TemplateArgumentListAST *template_arguments = ast->template_arguments;
+ template_arguments; template_arguments = template_arguments->next) {
+ accept(template_arguments->template_argument);
}
return false;
}
+ virtual bool visit(ParameterDeclarationAST *ast)
+ {
+ for (SpecifierAST *spec = ast->type_specifier; spec; spec = spec->next)
+ accept(spec);
+
+ if (DeclaratorAST *declarator = ast->declarator) {
+ for (SpecifierAST *attr = declarator->attributes; attr; attr = attr->next)
+ accept(attr);
+
+ for (PtrOperatorAST *ptr_op = declarator->ptr_operators; ptr_op; ptr_op = ptr_op->next)
+ accept(ptr_op);
+
+ // ### TODO: well, not exactly. We need to look at qualified-name-ids and nested-declarators.
+ // accept(declarator->core_declarator);
+
+ for (PostfixDeclaratorAST *fx_op = declarator->postfix_declarators; fx_op; fx_op = fx_op->next)
+ accept(fx_op);
+
+ for (SpecifierAST *spec = declarator->post_attributes; spec; spec = spec->next)
+ accept(spec);
+
+ accept(declarator->initializer);
+ }
+
+ accept(ast->expression);
+ return false;
+ }
+
private:
- QFutureInterface<Core::Utils::FileSearchResult> *_future;
+ QFutureInterface<Utils::FileSearchResult> *_future;
Identifier *_id; // ### remove me
Symbol *_declSymbol;
Document::Ptr _doc;
@@ -415,7 +450,7 @@ QList<int> CppFindReferences::references(Symbol *symbol,
return references;
}
-static void find_helper(QFutureInterface<Core::Utils::FileSearchResult> &future,
+static void find_helper(QFutureInterface<Utils::FileSearchResult> &future,
const QMap<QString, QString> wl,
Snapshot snapshot,
Symbol *symbol)
@@ -435,6 +470,12 @@ static void find_helper(QFutureInterface<Core::Utils::FileSearchResult> &future,
future.setProgressRange(0, files.size());
for (int i = 0; i < files.size(); ++i) {
+ if (future.isPaused())
+ future.waitForResume();
+
+ if (future.isCanceled())
+ break;
+
const QString &fileName = files.at(i);
future.setProgressValueAndText(i, QFileInfo(fileName).fileName());
@@ -491,13 +532,24 @@ static void find_helper(QFutureInterface<Core::Utils::FileSearchResult> &future,
future.setProgressValue(files.size());
}
-void CppFindReferences::findAll(Symbol *symbol)
+void CppFindReferences::findUsages(Symbol *symbol)
+{
+ _resultWindow->clearContents();
+ findAll_helper(symbol);
+}
+
+void CppFindReferences::renameUsages(Symbol *symbol)
{
Find::SearchResult *search = _resultWindow->startNewSearch();
connect(search, SIGNAL(activated(Find::SearchResultItem)),
this, SLOT(openEditor(Find::SearchResultItem)));
_resultWindow->setShowReplaceUI(true);
+ findAll_helper(symbol);
+}
+
+void CppFindReferences::findAll_helper(Symbol *symbol)
+{
_resultWindow->popup(true);
const Snapshot snapshot = _modelManager->snapshot();
@@ -505,7 +557,7 @@ void CppFindReferences::findAll(Symbol *symbol)
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
- QFuture<Core::Utils::FileSearchResult> result = QtConcurrent::run(&find_helper, wl, snapshot, symbol);
+ QFuture<Utils::FileSearchResult> result = QtConcurrent::run(&find_helper, wl, snapshot, symbol);
m_watcher.setFuture(result);
Core::FutureProgress *progress = progressManager->addTask(result, tr("Searching..."),
@@ -517,7 +569,7 @@ void CppFindReferences::findAll(Symbol *symbol)
void CppFindReferences::displayResult(int index)
{
- Core::Utils::FileSearchResult result = m_watcher.future().resultAt(index);
+ Utils::FileSearchResult result = m_watcher.future().resultAt(index);
_resultWindow->addResult(result.fileName,
result.lineNumber,
result.matchingLine,
diff --git a/src/plugins/cpptools/cppfindreferences.h b/src/plugins/cpptools/cppfindreferences.h
index 78bbf33838..429a945e2c 100644
--- a/src/plugins/cpptools/cppfindreferences.h
+++ b/src/plugins/cpptools/cppfindreferences.h
@@ -63,7 +63,8 @@ Q_SIGNALS:
void changed();
public:
- void findAll(CPlusPlus::Symbol *symbol);
+ void findUsages(CPlusPlus::Symbol *symbol);
+ void renameUsages(CPlusPlus::Symbol *symbol);
private Q_SLOTS:
void displayResult(int);
@@ -71,9 +72,12 @@ private Q_SLOTS:
void openEditor(const Find::SearchResultItem &item);
private:
+ void findAll_helper(CPlusPlus::Symbol *symbol);
+
+private:
QPointer<CppModelManager> _modelManager;
Find::SearchResultWindow *_resultWindow;
- QFutureWatcher<Core::Utils::FileSearchResult> m_watcher;
+ QFutureWatcher<Utils::FileSearchResult> m_watcher;
};
} // end of namespace Internal
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 8aa6bdf767..56e7b1d48f 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -56,6 +56,8 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/progressmanager/progressmanager.h>
+#include <extensionsystem/pluginmanager.h>
+
#include <utils/qtcassert.h>
#include <TranslationUnit.h>
@@ -588,6 +590,13 @@ Document::Ptr CppPreprocessor::switchDocument(Document::Ptr doc)
}
+CppTools::CppModelManagerInterface *CppTools::CppModelManagerInterface::instance()
+{
+ ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
+ return pluginManager->getObject<CppTools::CppModelManagerInterface>();
+
+}
+
/*!
\class CppTools::CppModelManager
@@ -746,10 +755,16 @@ QList<int> CppModelManager::references(CPlusPlus::Symbol *symbol,
return m_findReferences->references(LookupContext::canonicalSymbol(symbol), doc, snapshot);
}
-void CppModelManager::findReferences(CPlusPlus::Symbol *symbol)
+void CppModelManager::findUsages(CPlusPlus::Symbol *symbol)
+{
+ if (symbol->identifier())
+ m_findReferences->findUsages(symbol);
+}
+
+void CppModelManager::renameUsages(CPlusPlus::Symbol *symbol)
{
if (symbol->identifier())
- m_findReferences->findAll(symbol);
+ m_findReferences->renameUsages(symbol);
}
QMap<QString, QString> CppModelManager::buildWorkingCopyList()
diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h
index 0f6911f97f..9aa3a800b2 100644
--- a/src/plugins/cpptools/cppmodelmanager.h
+++ b/src/plugins/cpptools/cppmodelmanager.h
@@ -106,7 +106,8 @@ public:
CPlusPlus::Document::Ptr doc,
const CPlusPlus::Snapshot &snapshot);
- virtual void findReferences(CPlusPlus::Symbol *symbol);
+ virtual void findUsages(CPlusPlus::Symbol *symbol);
+ virtual void renameUsages(CPlusPlus::Symbol *symbol);
void setHeaderSuffixes(const QStringList &suffixes)
{ m_headerSuffixes = suffixes; }
diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.h b/src/plugins/cpptools/cppmodelmanagerinterface.h
index 0a2ba32e38..58b04d4bf5 100644
--- a/src/plugins/cpptools/cppmodelmanagerinterface.h
+++ b/src/plugins/cpptools/cppmodelmanagerinterface.h
@@ -81,6 +81,8 @@ public:
CppModelManagerInterface(QObject *parent = 0) : QObject(parent) {}
virtual ~CppModelManagerInterface() {}
+ static CppModelManagerInterface *instance();
+
virtual void GC() = 0;
virtual void updateSourceFiles(const QStringList &sourceFiles) = 0;
@@ -99,7 +101,8 @@ public:
CPlusPlus::Document::Ptr doc,
const CPlusPlus::Snapshot &snapshot) = 0;
- virtual void findReferences(CPlusPlus::Symbol *symbol) = 0;
+ virtual void renameUsages(CPlusPlus::Symbol *symbol) = 0;
+ virtual void findUsages(CPlusPlus::Symbol *symbol) = 0;
};
class CPPTOOLS_EXPORT AbstractEditorSupport
diff --git a/src/plugins/cpptools/cppsemanticsearch.cpp b/src/plugins/cpptools/cppsemanticsearch.cpp
index 554290e478..bc8510625b 100644
--- a/src/plugins/cpptools/cppsemanticsearch.cpp
+++ b/src/plugins/cpptools/cppsemanticsearch.cpp
@@ -51,7 +51,7 @@ class SearchClass: public SemanticSearch
QTextDocument::FindFlags _findFlags;
public:
- SearchClass(QFutureInterface<Core::Utils::FileSearchResult> &future,
+ SearchClass(QFutureInterface<Utils::FileSearchResult> &future,
Document::Ptr doc, Snapshot snapshot)
: SemanticSearch(future, doc, snapshot)
{ }
@@ -118,7 +118,7 @@ class SearchFunctionCall: public SemanticSearch
QTextDocument::FindFlags _findFlags;
public:
- SearchFunctionCall(QFutureInterface<Core::Utils::FileSearchResult> &future,
+ SearchFunctionCall(QFutureInterface<Utils::FileSearchResult> &future,
Document::Ptr doc, Snapshot snapshot)
: SemanticSearch(future, doc, snapshot)
{ }
@@ -184,7 +184,7 @@ protected:
} // end of anonymous namespace
-SemanticSearch::SemanticSearch(QFutureInterface<Core::Utils::FileSearchResult> &future,
+SemanticSearch::SemanticSearch(QFutureInterface<Utils::FileSearchResult> &future,
Document::Ptr doc,
Snapshot snapshot)
: ASTVisitor(doc->control()),
@@ -236,11 +236,11 @@ void SemanticSearch::reportResult(unsigned tokenIndex, int offset, int len)
if (col)
--col; // adjust the column position.
- _future.reportResult(Core::Utils::FileSearchResult(QDir::toNativeSeparators(_doc->fileName()),
+ _future.reportResult(Utils::FileSearchResult(QDir::toNativeSeparators(_doc->fileName()),
line, lineText, col + offset, len));
}
-SemanticSearch *SearchClassDeclarationsFactory::create(QFutureInterface<Core::Utils::FileSearchResult> &future,
+SemanticSearch *SearchClassDeclarationsFactory::create(QFutureInterface<Utils::FileSearchResult> &future,
Document::Ptr doc,
Snapshot snapshot)
{
@@ -250,7 +250,7 @@ SemanticSearch *SearchClassDeclarationsFactory::create(QFutureInterface<Core::Ut
return search;
}
-SemanticSearch *SearchFunctionCallFactory::create(QFutureInterface<Core::Utils::FileSearchResult> &future,
+SemanticSearch *SearchFunctionCallFactory::create(QFutureInterface<Utils::FileSearchResult> &future,
Document::Ptr doc,
Snapshot snapshot)
{
@@ -260,7 +260,7 @@ SemanticSearch *SearchFunctionCallFactory::create(QFutureInterface<Core::Utils::
return search;
}
-static void semanticSearch_helper(QFutureInterface<Core::Utils::FileSearchResult> &future,
+static void semanticSearch_helper(QFutureInterface<Utils::FileSearchResult> &future,
QPointer<CppModelManager> modelManager,
QMap<QString, QString> wl,
SemanticSearchFactory::Ptr factory)
@@ -272,6 +272,12 @@ static void semanticSearch_helper(QFutureInterface<Core::Utils::FileSearchResult
int progress = 0;
foreach (Document::Ptr doc, snapshot) {
+ if (future.isPaused())
+ future.waitForResume();
+
+ if (future.isCanceled())
+ break;
+
const QString fileName = doc->fileName();
QByteArray source;
@@ -300,7 +306,7 @@ static void semanticSearch_helper(QFutureInterface<Core::Utils::FileSearchResult
}
}
-QFuture<Core::Utils::FileSearchResult> CppTools::Internal::semanticSearch(QPointer<CppModelManager> modelManager,
+QFuture<Utils::FileSearchResult> CppTools::Internal::semanticSearch(QPointer<CppModelManager> modelManager,
SemanticSearchFactory::Ptr factory)
{
return QtConcurrent::run(&semanticSearch_helper, modelManager,
diff --git a/src/plugins/cpptools/cppsemanticsearch.h b/src/plugins/cpptools/cppsemanticsearch.h
index c619110832..b0ff968b4d 100644
--- a/src/plugins/cpptools/cppsemanticsearch.h
+++ b/src/plugins/cpptools/cppsemanticsearch.h
@@ -48,14 +48,14 @@ class SemanticSearchFactory;
class SemanticSearch: protected CPlusPlus::ASTVisitor
{
- QFutureInterface<Core::Utils::FileSearchResult> &_future;
+ QFutureInterface<Utils::FileSearchResult> &_future;
CPlusPlus::Document::Ptr _doc;
CPlusPlus::Snapshot _snapshot;
CPlusPlus::Document::Ptr _thisDocument;
QByteArray _source;
public:
- SemanticSearch(QFutureInterface<Core::Utils::FileSearchResult> &future,
+ SemanticSearch(QFutureInterface<Utils::FileSearchResult> &future,
CPlusPlus::Document::Ptr doc,
CPlusPlus::Snapshot snapshot);
@@ -81,7 +81,7 @@ public:
SemanticSearchFactory() {}
virtual ~SemanticSearchFactory() {}
- virtual SemanticSearch *create(QFutureInterface<Core::Utils::FileSearchResult> &future,
+ virtual SemanticSearch *create(QFutureInterface<Utils::FileSearchResult> &future,
CPlusPlus::Document::Ptr doc,
CPlusPlus::Snapshot snapshot) = 0;
};
@@ -96,7 +96,7 @@ public:
: _text(text), _findFlags(findFlags)
{ }
- virtual SemanticSearch *create(QFutureInterface<Core::Utils::FileSearchResult> &future,
+ virtual SemanticSearch *create(QFutureInterface<Utils::FileSearchResult> &future,
CPlusPlus::Document::Ptr doc,
CPlusPlus::Snapshot snapshot);
};
@@ -111,12 +111,12 @@ public:
: _text(text), _findFlags(findFlags)
{ }
- virtual SemanticSearch *create(QFutureInterface<Core::Utils::FileSearchResult> &future,
+ virtual SemanticSearch *create(QFutureInterface<Utils::FileSearchResult> &future,
CPlusPlus::Document::Ptr doc,
CPlusPlus::Snapshot snapshot);
};
-QFuture<Core::Utils::FileSearchResult> semanticSearch(QPointer<CppModelManager> modelManager,
+QFuture<Utils::FileSearchResult> semanticSearch(QPointer<CppModelManager> modelManager,
SemanticSearchFactory::Ptr factory);
diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp
index b4952f334f..c3f09a98f1 100644
--- a/src/plugins/cpptools/cpptoolsplugin.cpp
+++ b/src/plugins/cpptools/cpptoolsplugin.cpp
@@ -96,7 +96,7 @@ void FindClassDeclarations::findAll(const QString &text, QTextDocument::FindFlag
SemanticSearchFactory::Ptr factory(new SearchClassDeclarationsFactory(text, findFlags));
- QFuture<Core::Utils::FileSearchResult> result = semanticSearch(_modelManager, factory);
+ QFuture<Utils::FileSearchResult> result = semanticSearch(_modelManager, factory);
m_watcher.setFuture(result);
@@ -109,7 +109,7 @@ void FindClassDeclarations::findAll(const QString &text, QTextDocument::FindFlag
void FindClassDeclarations::displayResult(int index)
{
- Core::Utils::FileSearchResult result = m_watcher.future().resultAt(index);
+ Utils::FileSearchResult result = m_watcher.future().resultAt(index);
_resultWindow->addResult(result.fileName,
result.lineNumber,
result.matchingLine,
@@ -149,7 +149,7 @@ void FindFunctionCalls::findAll(const QString &text, QTextDocument::FindFlags fi
SemanticSearchFactory::Ptr factory(new SearchFunctionCallFactory(text, findFlags));
- QFuture<Core::Utils::FileSearchResult> result = semanticSearch(_modelManager, factory);
+ QFuture<Utils::FileSearchResult> result = semanticSearch(_modelManager, factory);
m_watcher.setFuture(result);
@@ -162,7 +162,7 @@ void FindFunctionCalls::findAll(const QString &text, QTextDocument::FindFlags fi
void FindFunctionCalls::displayResult(int index)
{
- Core::Utils::FileSearchResult result = m_watcher.future().resultAt(index);
+ Utils::FileSearchResult result = m_watcher.future().resultAt(index);
_resultWindow->addResult(result.fileName,
result.lineNumber,
result.matchingLine,
diff --git a/src/plugins/cpptools/cpptoolsplugin.h b/src/plugins/cpptools/cpptoolsplugin.h
index 7084e3d2fa..a78bf260c0 100644
--- a/src/plugins/cpptools/cpptoolsplugin.h
+++ b/src/plugins/cpptools/cpptoolsplugin.h
@@ -85,7 +85,7 @@ protected Q_SLOTS:
private:
QPointer<CppModelManager> _modelManager;
Find::SearchResultWindow *_resultWindow;
- QFutureWatcher<Core::Utils::FileSearchResult> m_watcher;
+ QFutureWatcher<Utils::FileSearchResult> m_watcher;
};
class FindFunctionCalls: public Find::IFindFilter // ### share code with FindClassDeclarations
@@ -110,7 +110,7 @@ protected Q_SLOTS:
private:
QPointer<CppModelManager> _modelManager;
Find::SearchResultWindow *_resultWindow;
- QFutureWatcher<Core::Utils::FileSearchResult> m_watcher;
+ QFutureWatcher<Utils::FileSearchResult> m_watcher;
};
class CppToolsPlugin : public ExtensionSystem::IPlugin
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp
index 922f6229f3..38b2ed74d0 100644
--- a/src/plugins/cvs/cvsplugin.cpp
+++ b/src/plugins/cvs/cvsplugin.cpp
@@ -260,7 +260,7 @@ bool CVSPlugin::initialize(const QStringList &arguments, QString *errorMessage)
globalcontext << core->uniqueIDManager()->uniqueIdentifier(C_GLOBAL);
Core::Command *command;
- m_addAction = new Core::Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_addAction = new Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_addAction, CMD_ID_ADD,
globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -270,14 +270,14 @@ bool CVSPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
cvsMenu->addAction(command);
- m_deleteAction = new Core::Utils::ParameterAction(tr("Delete"), tr("Delete \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_deleteAction = new Utils::ParameterAction(tr("Delete"), tr("Delete \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_deleteAction, CMD_ID_DELETE_FILE,
globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile()));
cvsMenu->addAction(command);
- m_revertAction = new Core::Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_revertAction = new Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_revertAction, CMD_ID_REVERT,
globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -292,7 +292,7 @@ bool CVSPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffProject()));
cvsMenu->addAction(command);
- m_diffCurrentAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_diffCurrentAction = new Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_diffCurrentAction,
CMD_ID_DIFF_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -310,7 +310,7 @@ bool CVSPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_commitAllAction, SIGNAL(triggered()), this, SLOT(startCommitAll()));
cvsMenu->addAction(command);
- m_commitCurrentAction = new Core::Utils::ParameterAction(tr("Commit Current File"), tr("Commit \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_commitCurrentAction = new Utils::ParameterAction(tr("Commit Current File"), tr("Commit \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_commitCurrentAction,
CMD_ID_COMMIT_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -322,7 +322,7 @@ bool CVSPlugin::initialize(const QStringList &arguments, QString *errorMessage)
cvsMenu->addAction(createSeparator(this, ami, CMD_ID_SEPARATOR2, globalcontext));
- m_filelogCurrentAction = new Core::Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_filelogCurrentAction = new Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_filelogCurrentAction,
CMD_ID_FILELOG_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -330,7 +330,7 @@ bool CVSPlugin::initialize(const QStringList &arguments, QString *errorMessage)
SLOT(filelogCurrentFile()));
cvsMenu->addAction(command);
- m_annotateCurrentAction = new Core::Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_annotateCurrentAction = new Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_annotateCurrentAction,
CMD_ID_ANNOTATE_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -1081,7 +1081,7 @@ CVSResponse CVSPlugin::runCVS(const QString &workingDirectory,
qDebug() << "runCVS" << timeOut << outputText;
// Run, connect stderr to the output window
- Core::Utils::SynchronousProcess process;
+ Utils::SynchronousProcess process;
if (!response.workingDirectory.isEmpty())
process.setWorkingDirectory(response.workingDirectory);
@@ -1101,25 +1101,25 @@ CVSResponse CVSPlugin::runCVS(const QString &workingDirectory,
connect(&process, SIGNAL(stdOutBuffered(QString,bool)), outputWindow, SLOT(append(QString)));
}
- const Core::Utils::SynchronousProcessResponse sp_resp = process.run(executable, allArgs);
+ const Utils::SynchronousProcessResponse sp_resp = process.run(executable, allArgs);
response.result = CVSResponse::OtherError;
response.stdErr = sp_resp.stdErr;
response.stdOut = sp_resp.stdOut;
switch (sp_resp.result) {
- case Core::Utils::SynchronousProcessResponse::Finished:
+ case Utils::SynchronousProcessResponse::Finished:
response.result = CVSResponse::Ok;
break;
- case Core::Utils::SynchronousProcessResponse::FinishedError:
+ case Utils::SynchronousProcessResponse::FinishedError:
response.result = CVSResponse::NonNullExitCode;
response.message = tr("The process terminated with exit code %1.").arg(sp_resp.exitCode);
break;
- case Core::Utils::SynchronousProcessResponse::TerminatedAbnormally:
+ case Utils::SynchronousProcessResponse::TerminatedAbnormally:
response.message = tr("The process terminated abnormally.");
break;
- case Core::Utils::SynchronousProcessResponse::StartFailed:
+ case Utils::SynchronousProcessResponse::StartFailed:
response.message = tr("Could not start cvs '%1'. Please check your settings in the preferences.").arg(executable);
break;
- case Core::Utils::SynchronousProcessResponse::Hang:
+ case Utils::SynchronousProcessResponse::Hang:
response.message = tr("CVS did not respond within timeout limit (%1 ms).").arg(timeOut);
break;
}
diff --git a/src/plugins/cvs/cvsplugin.h b/src/plugins/cvs/cvsplugin.h
index bac3815d86..c0f63473b2 100644
--- a/src/plugins/cvs/cvsplugin.h
+++ b/src/plugins/cvs/cvsplugin.h
@@ -45,9 +45,10 @@ QT_END_NAMESPACE
namespace Core {
class IEditorFactory;
class IVersionControl;
- namespace Utils {
- class ParameterAction;
- }
+}
+
+namespace Utils {
+ class ParameterAction;
}
namespace ProjectExplorer {
@@ -157,15 +158,15 @@ private:
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
- Core::Utils::ParameterAction *m_addAction;
- Core::Utils::ParameterAction *m_deleteAction;
- Core::Utils::ParameterAction *m_revertAction;
+ Utils::ParameterAction *m_addAction;
+ Utils::ParameterAction *m_deleteAction;
+ Utils::ParameterAction *m_revertAction;
QAction *m_diffProjectAction;
- Core::Utils::ParameterAction *m_diffCurrentAction;
+ Utils::ParameterAction *m_diffCurrentAction;
QAction *m_commitAllAction;
- Core::Utils::ParameterAction *m_commitCurrentAction;
- Core::Utils::ParameterAction *m_filelogCurrentAction;
- Core::Utils::ParameterAction *m_annotateCurrentAction;
+ Utils::ParameterAction *m_commitCurrentAction;
+ Utils::ParameterAction *m_filelogCurrentAction;
+ Utils::ParameterAction *m_annotateCurrentAction;
QAction *m_statusAction;
QAction *m_updateProjectAction;
diff --git a/src/plugins/cvs/cvssubmiteditor.cpp b/src/plugins/cvs/cvssubmiteditor.cpp
index 35310e98f5..b19aeb7dde 100644
--- a/src/plugins/cvs/cvssubmiteditor.cpp
+++ b/src/plugins/cvs/cvssubmiteditor.cpp
@@ -37,7 +37,7 @@ using namespace CVS::Internal;
CVSSubmitEditor::CVSSubmitEditor(const VCSBase::VCSBaseSubmitEditorParameters *parameters,
QWidget *parentWidget) :
- VCSBase::VCSBaseSubmitEditor(parameters, new Core::Utils::SubmitEditorWidget(parentWidget)),
+ VCSBase::VCSBaseSubmitEditor(parameters, new Utils::SubmitEditorWidget(parentWidget)),
m_msgAdded(tr("Added")),
m_msgRemoved(tr("Removed")),
m_msgModified(tr("Modified"))
diff --git a/src/plugins/cvs/settingspage.cpp b/src/plugins/cvs/settingspage.cpp
index 327f63a36a..72e17ee5d4 100644
--- a/src/plugins/cvs/settingspage.cpp
+++ b/src/plugins/cvs/settingspage.cpp
@@ -40,7 +40,7 @@
#include <QtGui/QFileDialog>
using namespace CVS::Internal;
-using namespace Core::Utils;
+using namespace Utils;
SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
QWidget(parent)
diff --git a/src/plugins/cvs/settingspage.ui b/src/plugins/cvs/settingspage.ui
index efff37aadd..2eaf4c935d 100644
--- a/src/plugins/cvs/settingspage.ui
+++ b/src/plugins/cvs/settingspage.ui
@@ -63,7 +63,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::PathChooser" name="commandPathChooser"/>
+ <widget class="Utils::PathChooser" name="commandPathChooser"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="rootLabel">
@@ -119,7 +119,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/debugger/attachcoredialog.ui b/src/plugins/debugger/attachcoredialog.ui
index 271cfb2051..513b12eeab 100644
--- a/src/plugins/debugger/attachcoredialog.ui
+++ b/src/plugins/debugger/attachcoredialog.ui
@@ -43,10 +43,10 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::PathChooser" name="execFileName" native="true"/>
+ <widget class="Utils::PathChooser" name="execFileName" native="true"/>
</item>
<item row="1" column="1">
- <widget class="Core::Utils::PathChooser" name="coreFileName" native="true"/>
+ <widget class="Utils::PathChooser" name="coreFileName" native="true"/>
</item>
</layout>
</item>
@@ -84,7 +84,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/debugger/attachtcfdialog.ui b/src/plugins/debugger/attachtcfdialog.ui
index a7ccaf03b4..c890f11ff9 100644
--- a/src/plugins/debugger/attachtcfdialog.ui
+++ b/src/plugins/debugger/attachtcfdialog.ui
@@ -60,7 +60,7 @@
</widget>
</item>
<item row="3" column="1">
- <widget class="Core::Utils::PathChooser" name="serverStartScript" native="true"/>
+ <widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="serverStartScriptLabel">
@@ -85,7 +85,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
</customwidget>
diff --git a/src/plugins/debugger/cdb/cdbdebugengine.cpp b/src/plugins/debugger/cdb/cdbdebugengine.cpp
index 462a71cf87..c6e4ca512c 100644
--- a/src/plugins/debugger/cdb/cdbdebugengine.cpp
+++ b/src/plugins/debugger/cdb/cdbdebugengine.cpp
@@ -107,7 +107,7 @@ QString msgDebugEngineComResult(HRESULT hr)
return QLatin1String("ERROR_ACCESS_DENIED");;
if (hr == HRESULT_FROM_NT(STATUS_CONTROL_C_EXIT))
return QLatin1String("STATUS_CONTROL_C_EXIT");
- return QLatin1String("E_FAIL ") + Core::Utils::winErrorMessage(HRESULT_CODE(hr));
+ return QLatin1String("E_FAIL ") + Utils::winErrorMessage(HRESULT_CODE(hr));
}
static QString msgStackIndexOutOfRange(int idx, int size)
@@ -462,7 +462,7 @@ CdbDebugEngine::CdbDebugEngine(DebuggerManager *manager, const QSharedPointer<Cd
IDebuggerEngine(manager),
m_d(new CdbDebugEnginePrivate(manager, options, this))
{
- m_d->m_consoleStubProc.setMode(Core::Utils::ConsoleProcess::Suspend);
+ m_d->m_consoleStubProc.setMode(Utils::ConsoleProcess::Suspend);
connect(&m_d->m_consoleStubProc, SIGNAL(processError(QString)),
this, SLOT(slotConsoleStubError(QString)));
connect(&m_d->m_consoleStubProc, SIGNAL(processStarted()),
@@ -710,13 +710,13 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString *
symbolOptions |= SYMOPT_DEBUG;
m_d->m_cif.debugSymbols->SetSymbolOptions(symbolOptions);
- const QString cmd = Core::Utils::AbstractProcess::createWinCommandline(filename, sp->processArgs);
+ const QString cmd = Utils::AbstractProcess::createWinCommandline(filename, sp->processArgs);
if (debugCDB)
qDebug() << "Starting " << cmd;
PCWSTR env = 0;
QByteArray envData;
if (!sp->environment.empty()) {
- envData = Core::Utils::AbstractProcess::createWinEnvironment(Core::Utils::AbstractProcess::fixWinEnvironment(sp->environment));
+ envData = Utils::AbstractProcess::createWinEnvironment(Utils::AbstractProcess::fixWinEnvironment(sp->environment));
env = reinterpret_cast<PCWSTR>(envData.data());
}
// The working directory cannot be empty.
@@ -1170,7 +1170,7 @@ bool CdbDebugEnginePrivate::interruptInterferiorProcess(QString *errorMessage)
}
if (!DebugBreakProcess(m_hDebuggeeProcess)) {
- *errorMessage = QString::fromLatin1("DebugBreakProcess failed: %1").arg(Core::Utils::winErrorMessage(GetLastError()));
+ *errorMessage = QString::fromLatin1("DebugBreakProcess failed: %1").arg(Utils::winErrorMessage(GetLastError()));
return false;
}
#if 0
diff --git a/src/plugins/debugger/cdb/cdbdebugengine_p.h b/src/plugins/debugger/cdb/cdbdebugengine_p.h
index f302713872..72a154906c 100644
--- a/src/plugins/debugger/cdb/cdbdebugengine_p.h
+++ b/src/plugins/debugger/cdb/cdbdebugengine_p.h
@@ -175,7 +175,7 @@ struct CdbDebugEnginePrivate
bool m_firstActivatedFrame;
DebuggerStartMode m_mode;
- Core::Utils::ConsoleProcess m_consoleStubProc;
+ Utils::ConsoleProcess m_consoleStubProc;
};
// helper functions
diff --git a/src/plugins/debugger/cdb/cdboptionspage.cpp b/src/plugins/debugger/cdb/cdboptionspage.cpp
index 04ce314804..f8cdc05168 100644
--- a/src/plugins/debugger/cdb/cdboptionspage.cpp
+++ b/src/plugins/debugger/cdb/cdboptionspage.cpp
@@ -72,7 +72,7 @@ CdbOptionsPageWidget::CdbOptionsPageWidget(QWidget *parent) :
m_ui.noteLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
connect(m_ui.noteLabel, SIGNAL(linkActivated(QString)), this, SLOT(downLoadLinkActivated(QString)));
- m_ui.pathChooser->setExpectedKind(Core::Utils::PathChooser::Directory);
+ m_ui.pathChooser->setExpectedKind(Utils::PathChooser::Directory);
m_ui.pathChooser->addButton(tr("Autodetect"), this, SLOT(autoDetect()));
m_ui.failureLabel->setVisible(false);
}
diff --git a/src/plugins/debugger/cdb/cdboptionspagewidget.ui b/src/plugins/debugger/cdb/cdboptionspagewidget.ui
index b998e7c6f3..5ff8605d08 100644
--- a/src/plugins/debugger/cdb/cdboptionspagewidget.ui
+++ b/src/plugins/debugger/cdb/cdboptionspagewidget.ui
@@ -33,7 +33,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="Core::Utils::PathChooser" name="pathChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="pathChooser" native="true"/>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="noteLabel">
@@ -74,7 +74,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="Core::Utils::PathListEditor" name="sourcePathListEditor" native="true"/>
+ <widget class="Utils::PathListEditor" name="sourcePathListEditor" native="true"/>
</item>
</layout>
</widget>
@@ -122,13 +122,13 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
</customwidget>
<customwidget>
- <class>Core::Utils::PathListEditor</class>
+ <class>Utils::PathListEditor</class>
<extends>QWidget</extends>
<header location="global">utils/pathlisteditor.h</header>
<container>1</container>
diff --git a/src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp b/src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
index 6af1b4648f..3b8181a95e 100644
--- a/src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
+++ b/src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
@@ -36,7 +36,7 @@ namespace Debugger {
namespace Internal {
CdbSymbolPathListEditor::CdbSymbolPathListEditor(QWidget *parent) :
- Core::Utils::PathListEditor(parent)
+ Utils::PathListEditor(parent)
{
//! Add Microsoft Symbol server connection
QAction *action = insertAction(lastAddActionIndex() + 1, tr("Symbol Server..."), this, SLOT(addSymbolServer()));
diff --git a/src/plugins/debugger/cdb/cdbsymbolpathlisteditor.h b/src/plugins/debugger/cdb/cdbsymbolpathlisteditor.h
index d95d89f8cf..08f052531c 100644
--- a/src/plugins/debugger/cdb/cdbsymbolpathlisteditor.h
+++ b/src/plugins/debugger/cdb/cdbsymbolpathlisteditor.h
@@ -35,7 +35,7 @@
namespace Debugger {
namespace Internal {
-class CdbSymbolPathListEditor : public Core::Utils::PathListEditor
+class CdbSymbolPathListEditor : public Utils::PathListEditor
{
Q_OBJECT
public:
diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp
index 6ef805bd96..c5f3addd1d 100644
--- a/src/plugins/debugger/debuggeractions.cpp
+++ b/src/plugins/debugger/debuggeractions.cpp
@@ -41,7 +41,7 @@
#include <QtGui/QCheckBox>
#include <QtGui/QLineEdit>
-using namespace Core::Utils;
+using namespace Utils;
namespace Debugger {
namespace Internal {
@@ -84,7 +84,7 @@ void DebuggerSettings::writeSettings(QSettings *settings) const
SavedAction *DebuggerSettings::item(int code) const
{
- QTC_ASSERT(m_items.value(code, 0), return 0);
+ QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0);
return m_items.value(code, 0);
}
diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h
index d8c1966abd..8e1937f23b 100644
--- a/src/plugins/debugger/debuggeractions.h
+++ b/src/plugins/debugger/debuggeractions.h
@@ -48,8 +48,8 @@ public:
DebuggerSettings(QObject *parent = 0);
~DebuggerSettings();
- void insertItem(int code, Core::Utils::SavedAction *item);
- Core::Utils::SavedAction *item(int code) const;
+ void insertItem(int code, Utils::SavedAction *item);
+ Utils::SavedAction *item(int code) const;
QString dump() const;
@@ -60,7 +60,7 @@ public slots:
void writeSettings(QSettings *settings) const;
private:
- QHash<int, Core::Utils::SavedAction *> m_items;
+ QHash<int, Utils::SavedAction *> m_items;
};
@@ -126,7 +126,7 @@ enum DebuggerActionCode
};
// singleton access
-Core::Utils::SavedAction *theDebuggerAction(int code);
+Utils::SavedAction *theDebuggerAction(int code);
// convenience
bool theDebuggerBoolSetting(int code);
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index d503983904..199a6f5218 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -130,10 +130,10 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
{
m_ui->setupUi(this);
- m_ui->execFileName->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui->execFileName->setExpectedKind(Utils::PathChooser::File);
m_ui->execFileName->setPromptDialogTitle(tr("Select Executable"));
- m_ui->coreFileName->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui->coreFileName->setExpectedKind(Utils::PathChooser::File);
m_ui->coreFileName->setPromptDialogTitle(tr("Select Core File"));
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
@@ -327,7 +327,7 @@ AttachTcfDialog::AttachTcfDialog(QWidget *parent)
{
m_ui->setupUi(this);
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
- m_ui->serverStartScript->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File);
m_ui->serverStartScript->setPromptDialogTitle(tr("Select Executable"));
connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)),
@@ -414,7 +414,7 @@ StartExternalDialog::StartExternalDialog(QWidget *parent)
: QDialog(parent), m_ui(new Ui::StartExternalDialog)
{
m_ui->setupUi(this);
- m_ui->execFile->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui->execFile->setExpectedKind(Utils::PathChooser::File);
m_ui->execFile->setPromptDialogTitle(tr("Select Executable"));
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
@@ -473,7 +473,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
{
m_ui->setupUi(this);
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
- m_ui->serverStartScript->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File);
m_ui->serverStartScript->setPromptDialogTitle(tr("Select Executable"));
connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)),
diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp
index 7250cdded2..8394cbbf26 100644
--- a/src/plugins/debugger/debuggermanager.cpp
+++ b/src/plugins/debugger/debuggermanager.cpp
@@ -275,7 +275,7 @@ struct DebuggerManagerPrivate
DebuggerStartParametersPtr m_startParameters;
qint64 m_inferiorPid;
/// Views
- Core::Utils::FancyMainWindow *m_mainWindow;
+ Utils::FancyMainWindow *m_mainWindow;
QLabel *m_statusLabel;
QDockWidget *m_breakDock;
QDockWidget *m_modulesDock;
@@ -369,7 +369,7 @@ void DebuggerManager::init()
d->m_watchersWindow = new WatchWindow(WatchWindow::WatchersType, this);
d->m_statusTimer = new QTimer(this);
- d->m_mainWindow = new Core::Utils::FancyMainWindow;
+ d->m_mainWindow = new Utils::FancyMainWindow;
d->m_mainWindow->setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::North);
d->m_mainWindow->setDocumentMode(true);
@@ -454,6 +454,7 @@ void DebuggerManager::init()
//QTreeView *tooltipView = qobject_cast<QTreeView *>(d->m_tooltipWindow);
//tooltipView->setModel(d->m_watchHandler->model(TooltipsWatch));
qRegisterMetaType<WatchData>("WatchData");
+ qRegisterMetaType<StackCookie>("StackCookie");
d->m_actions.continueAction = new QAction(tr("Continue"), this);
d->m_actions.continueAction->setIcon(QIcon(":/debugger/images/debugger_continue_small.png"));
@@ -586,7 +587,7 @@ DebuggerManagerActions DebuggerManager::debuggerManagerActions() const
return d->m_actions;
}
-Core::Utils::FancyMainWindow *DebuggerManager::mainWindow() const
+Utils::FancyMainWindow *DebuggerManager::mainWindow() const
{
return d->m_mainWindow;
}
@@ -707,7 +708,6 @@ void DebuggerManager::showStatusMessage(const QString &msg, int timeout)
void DebuggerManager::notifyInferiorStopped()
{
- resetLocation();
setState(InferiorStopped);
showStatusMessage(tr("Stopped."), 5000);
}
@@ -1349,7 +1349,7 @@ void DebuggerManager::gotoLocation(const Debugger::Internal::StackFrame &frame,
{
if (theDebuggerBoolSetting(OperateByInstruction) || !frame.isUsable()) {
if (setMarker)
- resetLocation();
+ emit resetLocationRequested();
d->m_disassemblerViewAgent.setFrame(frame);
} else {
// Connected to the plugin.
diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h
index 8c588ddbea..7579ebd722 100644
--- a/src/plugins/debugger/debuggermanager.h
+++ b/src/plugins/debugger/debuggermanager.h
@@ -50,10 +50,10 @@ QT_END_NAMESPACE
namespace Core {
class IOptionsPage;
+}
namespace Utils {
class FancyMainWindow;
}
-} // namespace Core
namespace TextEditor {
class ITextEditor;
@@ -166,7 +166,7 @@ public:
DebuggerState state() const;
QList<Core::IOptionsPage*> initializeEngines(unsigned enabledTypeFlags);
- Core::Utils::FancyMainWindow *mainWindow() const;
+ Utils::FancyMainWindow *mainWindow() const;
QLabel *statusLabel() const;
Internal::IDebuggerEngine *currentEngine() const;
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 38202e0899..a4de205f95 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -276,7 +276,7 @@ public:
private:
Ui::CommonOptionsPage m_ui;
- Core::Utils::SavedActionSet m_group;
+ Utils::SavedActionSet m_group;
};
QWidget *CommonOptionsPage::createPage(QWidget *parent)
@@ -347,7 +347,7 @@ private:
friend class DebuggerPlugin;
Ui::DebuggingHelperOptionPage m_ui;
- Core::Utils::SavedActionSet m_group;
+ Utils::SavedActionSet m_group;
};
QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
@@ -355,7 +355,7 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
QWidget *w = new QWidget(parent);
m_ui.setupUi(w);
- m_ui.dumperLocationChooser->setExpectedKind(Core::Utils::PathChooser::Command);
+ m_ui.dumperLocationChooser->setExpectedKind(Utils::PathChooser::Command);
m_ui.dumperLocationChooser->setPromptDialogTitle(tr("Choose DebuggingHelper Location"));
m_ui.dumperLocationChooser->setInitialBrowsePathBackup(
Core::ICore::instance()->resourcePath() + "../../lib");
@@ -820,7 +820,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
m_debugMode->setWidget(splitter2);
- Core::Utils::StyledBar *debugToolBar = new Core::Utils::StyledBar;
+ Utils::StyledBar *debugToolBar = new Utils::StyledBar;
debugToolBar->setProperty("topBorder", true);
QHBoxLayout *debugToolBarLayout = new QHBoxLayout(debugToolBar);
debugToolBarLayout->setMargin(0);
@@ -832,10 +832,10 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
debugToolBarLayout->addWidget(toolButton(am->command(Constants::STEPOUT)->action()));
debugToolBarLayout->addWidget(toolButton(am->command(Constants::OPERATE_BY_INSTRUCTION)->action()));
#ifdef USE_REVERSE_DEBUGGING
- debugToolBarLayout->addWidget(new Core::Utils::StyledSeparator);
+ debugToolBarLayout->addWidget(new Utils::StyledSeparator);
debugToolBarLayout->addWidget(toolButton(am->command(Constants::REVERSE)->action()));
#endif
- debugToolBarLayout->addWidget(new Core::Utils::StyledSeparator);
+ debugToolBarLayout->addWidget(new Utils::StyledSeparator);
debugToolBarLayout->addWidget(new QLabel(tr("Threads:")));
QComboBox *threadBox = new QComboBox;
diff --git a/src/plugins/debugger/dumperoptionpage.ui b/src/plugins/debugger/dumperoptionpage.ui
index ddba465b5f..1b6bb8ed50 100644
--- a/src/plugins/debugger/dumperoptionpage.ui
+++ b/src/plugins/debugger/dumperoptionpage.ui
@@ -83,7 +83,7 @@
</widget>
</item>
<item>
- <widget class="Core::Utils::PathChooser" name="dumperLocationChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="dumperLocationChooser" native="true"/>
</item>
</layout>
</item>
@@ -117,7 +117,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/debugger/gdb/coregdbadapter.cpp b/src/plugins/debugger/gdb/coregdbadapter.cpp
index 9c4585791c..0c2356ec58 100644
--- a/src/plugins/debugger/gdb/coregdbadapter.cpp
+++ b/src/plugins/debugger/gdb/coregdbadapter.cpp
@@ -119,32 +119,59 @@ void CoreGdbAdapter::prepareInferior()
void CoreGdbAdapter::startInferior()
{
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
- QFileInfo fi2(startParameters().coreFile);
- // quoting core name below fails in gdb 6.8-debian
- m_executable.clear();
- QString coreName = fi2.absoluteFilePath();
- m_engine->postCommand(_("target core ") + coreName, CB(handleTargetCore));
+ QFileInfo fi(startParameters().coreFile);
+ m_executable = startParameters().executable;
+ if (m_executable.isEmpty()) {
+ // Extra round trip to get executable name from core file.
+ // This is sometimes not the full name, so it can't be used
+ // as the generic solution.
+ // Quoting core name below fails in gdb 6.8-debian.
+ QString coreName = fi.absoluteFilePath();
+ m_engine->postCommand(_("target core ") + coreName, CB(handleTargetCore1));
+ } else {
+ // Directly load symbols.
+ QFileInfo fi(m_executable);
+ m_engine->postCommand(_("-file-exec-and-symbols \"%1\"")
+ .arg(fi.absoluteFilePath()), CB(handleFileExecAndSymbols));
+ }
}
-void CoreGdbAdapter::handleTargetCore(const GdbResponse &response)
+void CoreGdbAdapter::handleTargetCore1(const GdbResponse &response)
{
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
if (response.resultClass == GdbResultDone) {
- showStatusMessage(tr("Attached to core."));
- m_executable = startParameters().executable;
- if (m_executable.isEmpty()) {
- GdbMi console = response.data.findChild("consolestreamoutput");
- int pos1 = console.data().indexOf('`');
- int pos2 = console.data().indexOf('\'');
- if (pos1 != -1 && pos2 != -1)
- m_executable = console.data().mid(pos1 + 1, pos2 - pos1 - 1);
+ showStatusMessage(tr("Attached to core temporarily."));
+ GdbMi console = response.data.findChild("consolestreamoutput");
+ int pos1 = console.data().indexOf('`');
+ int pos2 = console.data().indexOf('\'');
+ if (pos1 == -1 || pos2 == -1) {
+ setState(InferiorStartFailed);
+ emit inferiorStartFailed(tr("No binary found."));
+ } else {
+ m_executable = console.data().mid(pos1 + 1, pos2 - pos1 - 1);
+ QTC_ASSERT(!m_executable.isEmpty(), /**/);
+ // Finish extra round.
+ m_engine->postCommand(_("detach"), CB(handleDetach1));
}
+ } else {
+ QTC_ASSERT(response.resultClass == GdbResultError, /**/);
+ const QByteArray msg = response.data.findChild("msg").data();
+ setState(InferiorStartFailed);
+ emit inferiorStartFailed(msg);
+ }
+}
+
+void CoreGdbAdapter::handleDetach1(const GdbResponse &response)
+{
+ QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
+ if (response.resultClass == GdbResultDone) {
+ // Load symbols.
QFileInfo fi(m_executable);
m_engine->postCommand(_("-file-exec-and-symbols \"%1\"")
.arg(fi.absoluteFilePath()), CB(handleFileExecAndSymbols));
} else {
QTC_ASSERT(response.resultClass == GdbResultError, /**/);
- const QByteArray &msg = response.data.findChild("msg").data();
+ const QByteArray msg = response.data.findChild("msg").data();
setState(InferiorStartFailed);
emit inferiorStartFailed(msg);
}
@@ -155,8 +182,10 @@ void CoreGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
if (response.resultClass == GdbResultDone) {
showStatusMessage(tr("Symbols found."));
- setState(InferiorUnrunnable);
- m_engine->updateAll();
+ // Quoting core name below fails in gdb 6.8-debian.
+ QFileInfo fi(startParameters().coreFile);
+ QString coreName = fi.absoluteFilePath();
+ m_engine->postCommand(_("target core ") + coreName, CB(handleTargetCore2));
} else if (response.resultClass == GdbResultError) {
QString msg = tr("Symbols not found in \"%1\" failed:\n%2")
.arg(__(response.data.findChild("msg").data()));
@@ -167,6 +196,22 @@ void CoreGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
}
}
+void CoreGdbAdapter::handleTargetCore2(const GdbResponse &response)
+{
+ QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
+ if (response.resultClass == GdbResultDone) {
+ showStatusMessage(tr("Attached to core."));
+ setState(InferiorUnrunnable);
+ m_engine->updateAll();
+ } else if (response.resultClass == GdbResultError) {
+ QString msg = tr("Attach to core \"%1\" failed:\n%2")
+ .arg(__(response.data.findChild("msg").data()));
+ setState(InferiorUnrunnable);
+ m_engine->updateAll();
+ //setState(InferiorStartFailed);
+ // emit inferiorStartFailed(msg);
+ }
+}
void CoreGdbAdapter::interruptInferior()
{
// A core should never 'run'
diff --git a/src/plugins/debugger/gdb/coregdbadapter.h b/src/plugins/debugger/gdb/coregdbadapter.h
index 8cb74db99d..273891d133 100644
--- a/src/plugins/debugger/gdb/coregdbadapter.h
+++ b/src/plugins/debugger/gdb/coregdbadapter.h
@@ -67,8 +67,10 @@ private:
void interruptInferior();
void shutdown();
+ void handleTargetCore1(const GdbResponse &response);
+ void handleDetach1(const GdbResponse &response);
void handleFileExecAndSymbols(const GdbResponse &response);
- void handleTargetCore(const GdbResponse &response);
+ void handleTargetCore2(const GdbResponse &response);
void handleExit(const GdbResponse &response);
Q_SLOT void handleGdbStarted();
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 4c2b2428a6..c6c59fccfc 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -894,18 +894,13 @@ void GdbEngine::updateAll()
{
QTC_ASSERT(state() == InferiorUnrunnable || state() == InferiorStopped, /**/);
tryLoadDebuggingHelpers();
- updateLocals();
- postCommand(_("-stack-list-frames"), WatchUpdate, CB(handleStackListFrames1), false);
+ postCommand(_("-stack-list-frames"), WatchUpdate, CB(handleStackListFrames),
+ QVariant::fromValue<StackCookie>(StackCookie(false, true)));
manager()->stackHandler()->setCurrentIndex(0);
if (supportsThreads())
postCommand(_("-thread-list-ids"), WatchUpdate, CB(handleStackListThreads), 0);
manager()->reloadRegisters();
-}
-
-void GdbEngine::handleStackListFrames1(const GdbResponse &response)
-{
- handleStackListFrames(response);
- manager()->gotoLocation(manager()->stackHandler()->currentFrame(), true);
+ updateLocals();
}
void GdbEngine::handleQuerySources(const GdbResponse &response)
@@ -1182,29 +1177,6 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data)
#endif
}
-void GdbEngine::reloadFullStack()
-{
- QString cmd = _("-stack-list-frames");
- postCommand(cmd, WatchUpdate, CB(handleStackListFrames), true);
-}
-
-void GdbEngine::reloadStack()
-{
- QString cmd = _("-stack-list-frames");
- int stackDepth = theDebuggerAction(MaximalStackDepth)->value().toInt();
- if (stackDepth && !m_gdbAdapter->isTrkAdapter())
- cmd += _(" 0 ") + QString::number(stackDepth);
- postCommand(cmd, WatchUpdate, CB(handleStackListFrames), false);
- // FIXME: gdb 6.4 symbianelf likes to be asked twice. The first time it
- // returns with "^error,msg="Previous frame identical to this frame
- // (corrupt stack?)". Might be related to the fact that we can't
- // access the memory belonging to the lower frames. But as we know
- // this sometimes happens, ask the second time immediately instead
- // of waiting for the first request to fail.
- if (m_gdbAdapter->isTrkAdapter())
- postCommand(cmd, WatchUpdate, CB(handleStackListFrames), false);
-}
-
void GdbEngine::handleStop1(const GdbResponse &response)
{
GdbMi data = response.cookie.value<GdbMi>();
@@ -1307,7 +1279,7 @@ void GdbEngine::handleStop2(const GdbMi &data)
manager()->stackHandler()->setCurrentIndex(0);
updateLocals(); // Quick shot
- reloadStack();
+ reloadStack(false);
if (supportsThreads()) {
int currentId = data.findChild("thread-id").data().toInt();
@@ -2235,13 +2207,52 @@ void GdbEngine::reloadSourceFiles()
//
//////////////////////////////////////////////////////////////////////
+void GdbEngine::selectThread(int index)
+{
+ ThreadsHandler *threadsHandler = manager()->threadsHandler();
+ threadsHandler->setCurrentThread(index);
+
+ QList<ThreadData> threads = threadsHandler->threads();
+ QTC_ASSERT(index < threads.size(), return);
+ int id = threads.at(index).id;
+ showStatusMessage(tr("Retrieving data for stack view..."), 10000);
+ postCommand(_("-thread-select %1").arg(id), CB(handleStackSelectThread));
+}
+
void GdbEngine::handleStackSelectThread(const GdbResponse &)
{
+ QTC_ASSERT(state() == InferiorUnrunnable || state() == InferiorStopped, /**/);
//qDebug("FIXME: StackHandler::handleOutput: SelectThread");
showStatusMessage(tr("Retrieving data for stack view..."), 3000);
- reloadStack();
+ manager()->reloadRegisters();
+ reloadStack(true);
+ updateLocals();
+}
+
+void GdbEngine::reloadFullStack()
+{
+ QString cmd = _("-stack-list-frames");
+ postCommand(cmd, WatchUpdate, CB(handleStackListFrames),
+ QVariant::fromValue<StackCookie>(StackCookie(true, true)));
}
+void GdbEngine::reloadStack(bool forceGotoLocation)
+{
+ QString cmd = _("-stack-list-frames");
+ int stackDepth = theDebuggerAction(MaximalStackDepth)->value().toInt();
+ if (stackDepth && !m_gdbAdapter->isTrkAdapter())
+ cmd += _(" 0 ") + QString::number(stackDepth);
+ // FIXME: gdb 6.4 symbianelf likes to be asked twice. The first time it
+ // returns with "^error,msg="Previous frame identical to this frame
+ // (corrupt stack?)". Might be related to the fact that we can't
+ // access the memory belonging to the lower frames. But as we know
+ // this sometimes happens, ask the second time immediately instead
+ // of waiting for the first request to fail.
+ if (m_gdbAdapter->isTrkAdapter())
+ postCommand(cmd, WatchUpdate);
+ postCommand(cmd, WatchUpdate, CB(handleStackListFrames),
+ QVariant::fromValue<StackCookie>(StackCookie(false, forceGotoLocation)));
+}
StackFrame GdbEngine::parseStackFrame(const GdbMi &frameMi, int level)
{
@@ -2266,94 +2277,94 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response)
#else
bool handleIt = response.resultClass == GdbResultDone;
#endif
- if (handleIt) {
- bool isFull = response.cookie.toBool();
- QList<StackFrame> stackFrames;
-
- GdbMi stack = response.data.findChild("stack");
- if (!stack.isValid()) {
- qDebug() << "FIXME: stack:" << stack.toString();
- return;
- }
+ if (!handleIt) {
+ // That always happens on symbian gdb with
+ // ^error,data={msg="Previous frame identical to this frame (corrupt stack?)"
+ // logstreamoutput="Previous frame identical to this frame (corrupt stack?)\n"
+ //qDebug() << "LISTING STACK FAILED: " << response.toString();
+ return;
+ }
- int topFrame = -1;
+ StackCookie cookie = response.cookie.value<StackCookie>();
+ QList<StackFrame> stackFrames;
- int n = stack.childCount();
- for (int i = 0; i != n; ++i) {
- stackFrames.append(parseStackFrame(stack.childAt(i), i));
- const StackFrame &frame = stackFrames.back();
+ GdbMi stack = response.data.findChild("stack");
+ if (!stack.isValid()) {
+ qDebug() << "FIXME: stack:" << stack.toString();
+ return;
+ }
- #if defined(Q_OS_WIN)
- const bool isBogus =
- // Assume this is wrong and points to some strange stl_algobase
- // implementation. Happens on Karsten's XP system with Gdb 5.50
- (frame.file.endsWith(__("/bits/stl_algobase.h")) && frame.line == 150)
- // Also wrong. Happens on Vista with Gdb 5.50
- || (frame.function == __("operator new") && frame.line == 151);
+ int targetFrame = -1;
- // Immediately leave bogus frames.
- if (topFrame == -1 && isBogus) {
- postCommand(_("-exec-finish"));
- return;
- }
- #endif
+ int n = stack.childCount();
+ for (int i = 0; i != n; ++i) {
+ stackFrames.append(parseStackFrame(stack.childAt(i), i));
+ const StackFrame &frame = stackFrames.back();
- // Initialize top frame to the first valid frame.
- // FIXME: Check for QFile(frame.fullname).isReadable()?
- const bool isValid = !frame.file.isEmpty() && !frame.function.isEmpty();
- if (isValid && topFrame == -1)
- topFrame = i;
+ #if defined(Q_OS_WIN)
+ const bool isBogus =
+ // Assume this is wrong and points to some strange stl_algobase
+ // implementation. Happens on Karsten's XP system with Gdb 5.50
+ (frame.file.endsWith(__("/bits/stl_algobase.h")) && frame.line == 150)
+ // Also wrong. Happens on Vista with Gdb 5.50
+ || (frame.function == __("operator new") && frame.line == 151);
+
+ // Immediately leave bogus frames.
+ if (targetFrame == -1 && isBogus) {
+ postCommand(_("-exec-finish"));
+ return;
}
-
- bool canExpand = !isFull
- && (n >= theDebuggerAction(MaximalStackDepth)->value().toInt());
- theDebuggerAction(ExpandStack)->setEnabled(canExpand);
- manager()->stackHandler()->setFrames(stackFrames, canExpand);
-
- #ifdef Q_OS_MAC
- // Mac gdb does not add the location to the "stopped" message,
- // so the early gotoLocation() was not triggered. Force it here.
- bool jump = topFrame != -1
- && !theDebuggerBoolSetting(OperateByInstruction);
- #else
- // For topFrame == -1 there is no frame at all, for topFrame == 0
- // we already issued a 'gotoLocation' when reading the *stopped
- // message. Also, when OperateByInstruction we always want to
- // use frame #0.
- bool jump = topFrame != -1 && topFrame != 0
- && !theDebuggerBoolSetting(OperateByInstruction);
#endif
-
- if (jump) {
- const StackFrame &frame = manager()->stackHandler()->currentFrame();
- qDebug() << "GOTO, 2nd try" << frame.toString() << topFrame;
- gotoLocation(frame, true);
- }
- } else {
- // That always happens on symbian gdb with
- // ^error,data={msg="Previous frame identical to this frame (corrupt stack?)"
- // logstreamoutput="Previous frame identical to this frame (corrupt stack?)\n"
- //qDebug() << "LISTING STACK FAILED: " << response.toString();
+
+ // Initialize top frame to the first valid frame.
+ // FIXME: Check for QFile(frame.fullname).isReadable()?
+ const bool isValid = !frame.file.isEmpty() && !frame.function.isEmpty();
+ if (isValid && targetFrame == -1)
+ targetFrame = i;
}
-}
-void GdbEngine::selectThread(int index)
-{
- //reset location arrow
- m_manager->resetLocation();
+ bool canExpand = !cookie.isFull
+ && (n >= theDebuggerAction(MaximalStackDepth)->value().toInt());
+ theDebuggerAction(ExpandStack)->setEnabled(canExpand);
+ manager()->stackHandler()->setFrames(stackFrames, canExpand);
- ThreadsHandler *threadsHandler = manager()->threadsHandler();
- threadsHandler->setCurrentThread(index);
+ // We can't jump to any file if we don't have any frames.
+ if (stackFrames.isEmpty())
+ return;
- QList<ThreadData> threads = threadsHandler->threads();
- QTC_ASSERT(index < threads.size(), return);
- int id = threads.at(index).id;
- showStatusMessage(tr("Retrieving data for stack view..."), 10000);
- postCommand(_("-thread-select %1").arg(id), CB(handleStackSelectThread));
+ // targetFrame contains the top most frame for which we have source
+ // information. That's typically the frame we'd like to jump to, with
+ // a few exceptions:
+
+ // Always jump to frame #0 when stepping by instruction.
+ if (theDebuggerBoolSetting(OperateByInstruction))
+ targetFrame = 0;
+
+ // If there is no frame with source, jump to frame #0.
+ if (targetFrame == -1)
+ targetFrame = 0;
+
+ #ifdef Q_OS_MAC
+ // Mac gdb does not add the location to the "stopped" message,
+ // so the early gotoLocation() was not triggered. Force it here.
+ bool jump = true;
+ #else
+ // For targetFrame == 0 we already issued a 'gotoLocation'
+ // when reading the *stopped message.
+ bool jump = targetFrame != 0;
+ #endif
+
+ manager()->stackHandler()->setCurrentIndex(targetFrame);
+ if (jump || cookie.gotoLocation) {
+ const StackFrame &frame = manager()->stackHandler()->currentFrame();
+ //qDebug() << "GOTO, 2ND ATTEMPT: " << frame.toString() << targetFrame;
+ gotoLocation(frame, true);
+ }
}
void GdbEngine::activateFrame(int frameIndex)
{
+ m_manager->resetLocation();
if (state() != InferiorStopped)
return;
@@ -2394,7 +2405,8 @@ void GdbEngine::handleStackListThreads(const GdbResponse &response)
thread.id = items.at(index).data().toInt();
threads.append(thread);
if (thread.id == id) {
- //qDebug() << "SETTING INDEX TO:" << index << " ID:" << id << " RECOD:" << response.toString();
+ //qDebug() << "SETTING INDEX TO:" << index << " ID:"
+ // << id << " RECOD:" << response.toString();
currentIndex = index;
}
}
@@ -3086,7 +3098,7 @@ void GdbEngine::sendWatchParameters(const QByteArray &params0)
void GdbEngine::handleVarAssign(const GdbResponse &)
{
- // everything might have changed, force re-evaluation
+ // Everything might have changed, force re-evaluation.
// FIXME: Speed this up by re-using variables and only
// marking values as 'unknown'
setTokenBarrier();
@@ -3421,7 +3433,8 @@ void GdbEngine::handleStackListArguments(const GdbResponse &response)
const GdbMi args = frame.findChild("args");
m_currentFunctionArgs = args.children();
} else if (response.resultClass == GdbResultError) {
- qDebug() << "FIXME: GdbEngine::handleStackListArguments: should not happen";
+ qDebug() << "FIXME: GdbEngine::handleStackListArguments: should not happen"
+ << response.toString();
}
}
@@ -4068,7 +4081,11 @@ void GdbEngine::handleInferiorPrepared()
//postCommand(_("set print pretty on"));
//postCommand(_("set confirm off"));
//postCommand(_("set pagination off"));
- postCommand(_("set print inferior-events 1"));
+
+ // The following does not work with 6.3.50-20050815 (Apple version gdb-1344)
+ // (Mac OS 10.6), but does so for gdb-966 (10.5):
+ //postCommand(_("set print inferior-events 1"));
+
postCommand(_("set breakpoint pending on"));
postCommand(_("set print elements 10000"));
postCommand(_("-data-list-register-names"), CB(handleRegisterListNames));
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index 58352b4ab3..6b5b5ebcb9 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -339,10 +339,9 @@ private:
// Stack specific stuff
//
void handleStackListFrames(const GdbResponse &response);
- void handleStackListFrames1(const GdbResponse &response);
void handleStackSelectThread(const GdbResponse &response);
void handleStackListThreads(const GdbResponse &response);
- Q_SLOT void reloadStack();
+ Q_SLOT void reloadStack(bool forceGotoLocation);
Q_SLOT void reloadFullStack();
diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp
index b3a4281092..226bfb7283 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.cpp
+++ b/src/plugins/debugger/gdb/gdboptionspage.cpp
@@ -38,9 +38,9 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent)
{
QWidget *w = new QWidget(parent);
m_ui.setupUi(w);
- m_ui.gdbLocationChooser->setExpectedKind(Core::Utils::PathChooser::Command);
+ m_ui.gdbLocationChooser->setExpectedKind(Utils::PathChooser::Command);
m_ui.gdbLocationChooser->setPromptDialogTitle(tr("Choose Gdb Location"));
- m_ui.scriptFileChooser->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui.scriptFileChooser->setExpectedKind(Utils::PathChooser::File);
m_ui.scriptFileChooser->setPromptDialogTitle(tr("Choose Location of Startup Script File"));
m_group.clear();
diff --git a/src/plugins/debugger/gdb/gdboptionspage.h b/src/plugins/debugger/gdb/gdboptionspage.h
index bd70ed68ec..2a86e95014 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.h
+++ b/src/plugins/debugger/gdb/gdboptionspage.h
@@ -28,7 +28,7 @@ public:
private:
Ui::GdbOptionsPage m_ui;
- Core::Utils::SavedActionSet m_group;
+ Utils::SavedActionSet m_group;
};
} // namespace Internal
diff --git a/src/plugins/debugger/gdb/gdboptionspage.ui b/src/plugins/debugger/gdb/gdboptionspage.ui
index 922ed4d4c3..01900e9763 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.ui
+++ b/src/plugins/debugger/gdb/gdboptionspage.ui
@@ -57,10 +57,10 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="Core::Utils::PathChooser" name="scriptFileChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="scriptFileChooser" native="true"/>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::PathChooser" name="gdbLocationChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="gdbLocationChooser" native="true"/>
</item>
</layout>
</widget>
@@ -145,7 +145,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/debugger/gdb/plaingdbadapter.cpp b/src/plugins/debugger/gdb/plaingdbadapter.cpp
index 5d5e051c83..a65381920b 100644
--- a/src/plugins/debugger/gdb/plaingdbadapter.cpp
+++ b/src/plugins/debugger/gdb/plaingdbadapter.cpp
@@ -72,7 +72,7 @@ PlainGdbAdapter::PlainGdbAdapter(GdbEngine *engine, QObject *parent)
connect(&m_gdbProc, SIGNAL(finished(int, QProcess::ExitStatus)),
this, SLOT(handleGdbFinished(int, QProcess::ExitStatus)));
- m_stubProc.setMode(Core::Utils::ConsoleProcess::Debug);
+ m_stubProc.setMode(Utils::ConsoleProcess::Debug);
#ifdef Q_OS_UNIX
m_stubProc.setSettings(Core::ICore::instance()->settings());
#endif
@@ -337,9 +337,9 @@ void PlainGdbAdapter::emitAdapterStartFailed(const QString &msg)
{
// QMessageBox::critical(mainWindow(), tr("Debugger Startup Failure"),
// tr("Cannot start debugger: %1").arg(m_gdbAdapter->errorString()));
- m_stubProc.blockSignals(true);
+ bool blocked = m_stubProc.blockSignals(true);
m_stubProc.stop();
- m_stubProc.blockSignals(false);
+ m_stubProc.blockSignals(blocked);
emit adapterStartFailed(msg);
}
diff --git a/src/plugins/debugger/gdb/plaingdbadapter.h b/src/plugins/debugger/gdb/plaingdbadapter.h
index aade811839..73a3c8760d 100644
--- a/src/plugins/debugger/gdb/plaingdbadapter.h
+++ b/src/plugins/debugger/gdb/plaingdbadapter.h
@@ -84,7 +84,7 @@ private:
Q_SLOT void stubError(const QString &msg);
QProcess m_gdbProc;
- Core::Utils::ConsoleProcess m_stubProc;
+ Utils::ConsoleProcess m_stubProc;
};
} // namespace Internal
diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp
index 3b5e7740ba..a51d6a864f 100644
--- a/src/plugins/debugger/gdb/trkgdbadapter.cpp
+++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp
@@ -143,7 +143,7 @@ TrkGdbAdapter::TrkGdbAdapter(GdbEngine *engine, const TrkOptionsPtr &options) :
TrkGdbAdapter::~TrkGdbAdapter()
{
- delete m_gdbServer;
+ cleanup();
logMessage("Shutting down.\n");
}
@@ -283,6 +283,17 @@ QByteArray TrkGdbAdapter::trkInterruptMessage()
return ba;
}
+void TrkGdbAdapter::emitDelayedAdapterStartFailed(const QString &msg)
+{
+ m_adapterFailMessage = msg;
+ QTimer::singleShot(0, this, SLOT(slotEmitDelayedAdapterStartFailed()));
+}
+
+void TrkGdbAdapter::slotEmitDelayedAdapterStartFailed()
+{
+ emit adapterStartFailed(m_adapterFailMessage);
+}
+
void TrkGdbAdapter::startInferiorEarly()
{
QTC_ASSERT(state() == AdapterStarting, qDebug() << state());
@@ -1063,8 +1074,9 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result)
logMessage("ERROR: " + result.errorString());
QString msg = _("Cannot start executable \"%1\" on the device:\n%2")
.arg(m_remoteExecutable).arg(result.errorString());
- //m_trkDevice.close();
- emit adapterStartFailed(msg);
+ // Delay cleanup as not to close a trk device from its read handler,
+ // which blocks.
+ emitDelayedAdapterStartFailed(msg);
return;
}
const char *data = result.data.data();
@@ -1470,7 +1482,7 @@ void TrkGdbAdapter::startAdapter()
m_remoteExecutable = parameters.executable;
m_symbolFile = parameters.symbolFileName;
// FIXME: testing hack, remove!
- if (parameters.processArgs.at(0) == _("@sym@")) {
+ if (parameters.processArgs.size() == 3 && parameters.processArgs.at(0) == _("@sym@")) {
m_remoteExecutable = parameters.processArgs.at(1);
m_symbolFile = parameters.processArgs.at(2);
}
@@ -1593,7 +1605,9 @@ void TrkGdbAdapter::startGdb()
QString msg = QString("Unable to start the gdb server at %1: %2.")
.arg(m_gdbServerName).arg(m_gdbServer->errorString());
logMessage(msg);
- emit adapterStartFailed(msg);
+ // Delay cleanup as not to close a trk device from its read handler,
+ // which blocks.
+ emitDelayedAdapterStartFailed(msg);
return;
}
@@ -1908,11 +1922,19 @@ void TrkGdbAdapter::setEnvironment(const QStringList &env)
m_gdbProc.setEnvironment(env);
}
+void TrkGdbAdapter::cleanup()
+{
+ if (m_trkDevice.isOpen())
+ m_trkDevice.close();
+ if (m_gdbServer)
+ delete m_gdbServer;
+}
+
void TrkGdbAdapter::shutdown()
{
switch (state()) {
-
case AdapterStarting:
+ cleanup();
setState(DebuggerNotReady);
return;
@@ -1931,10 +1953,7 @@ void TrkGdbAdapter::shutdown()
case InferiorShutDown:
setState(AdapterShuttingDown);
- //sendTrkMessage(0x02, TrkCB(handleDisconnect));
- m_trkDevice.close();
- delete m_gdbServer;
- m_gdbServer = 0;
+ cleanup();
m_engine->postCommand(_("-gdb-exit"), CB(handleExit));
return;
diff --git a/src/plugins/debugger/gdb/trkgdbadapter.h b/src/plugins/debugger/gdb/trkgdbadapter.h
index aa22f81d06..018f52b51f 100644
--- a/src/plugins/debugger/gdb/trkgdbadapter.h
+++ b/src/plugins/debugger/gdb/trkgdbadapter.h
@@ -90,8 +90,6 @@ signals:
void output(const QString &msg);
private:
- friend class RunnerGui;
-
const TrkOptionsPtr m_options;
QString m_overrideTrkDevice;
@@ -115,11 +113,15 @@ public:
bool isTrkAdapter() const { return true; }
bool dumpersAvailable() const { return false; }
+private:
void startAdapter();
void prepareInferior();
void startInferior();
void interruptInferior();
void shutdown();
+ void cleanup();
+ void emitDelayedAdapterStartFailed(const QString &msg);
+ Q_SLOT void slotEmitDelayedAdapterStartFailed();
Q_SLOT void startInferiorEarly();
void handleKill(const GdbResponse &response);
@@ -192,10 +194,11 @@ public:
QByteArray trkWriteMemoryMessage(uint add, const QByteArray &date);
QByteArray trkBreakpointMessage(uint addr, uint len, bool armMode = true);
QByteArray trkStepRangeMessage(byte option);
- QByteArray trkDeleteProcessMessage();
+ QByteArray trkDeleteProcessMessage();
QByteArray trkInterruptMessage();
trk::TrkDevice m_trkDevice;
+ QString m_adapterFailMessage;
//
// Gdb
diff --git a/src/plugins/debugger/gdb/trkoptionswidget.cpp b/src/plugins/debugger/gdb/trkoptionswidget.cpp
index 34b5afb4f3..b77a030c1a 100644
--- a/src/plugins/debugger/gdb/trkoptionswidget.cpp
+++ b/src/plugins/debugger/gdb/trkoptionswidget.cpp
@@ -40,8 +40,8 @@ TrkOptionsWidget::TrkOptionsWidget(QWidget *parent) :
ui(new Ui::TrkOptionsWidget)
{
ui->setupUi(this);
- ui->gdbChooser->setExpectedKind(Core::Utils::PathChooser::Command);
- ui->cygwinChooser->setExpectedKind(Core::Utils::PathChooser::Directory);
+ ui->gdbChooser->setExpectedKind(Utils::PathChooser::Command);
+ ui->cygwinChooser->setExpectedKind(Utils::PathChooser::Directory);
ui->blueToothComboBox->addItems(TrkOptions::blueToothDevices());
ui->serialComboBox->addItems(TrkOptions::serialPorts());
connect(ui->commComboBox, SIGNAL(currentIndexChanged(int)), ui->commStackedWidget, SLOT(setCurrentIndex(int)));
diff --git a/src/plugins/debugger/gdb/trkoptionswidget.ui b/src/plugins/debugger/gdb/trkoptionswidget.ui
index a1c699438d..f8786a979d 100644
--- a/src/plugins/debugger/gdb/trkoptionswidget.ui
+++ b/src/plugins/debugger/gdb/trkoptionswidget.ui
@@ -28,7 +28,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::PathChooser" name="gdbChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="gdbChooser" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="cygwinLabel">
@@ -38,7 +38,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="Core::Utils::PathChooser" name="cygwinChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="cygwinChooser" native="true"/>
</item>
</layout>
</widget>
@@ -138,7 +138,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/debugger/shared/peutils.cpp b/src/plugins/debugger/shared/peutils.cpp
index a0e779e931..0fb5350fbb 100644
--- a/src/plugins/debugger/shared/peutils.cpp
+++ b/src/plugins/debugger/shared/peutils.cpp
@@ -35,7 +35,7 @@
#include <climits>
#include <windows.h>
-using Core::Utils::winErrorMessage;
+using Utils::winErrorMessage;
// Create a pointer from base and offset when rummaging around in
// a memory mapped file
diff --git a/src/plugins/debugger/shared/sharedlibraryinjector.cpp b/src/plugins/debugger/shared/sharedlibraryinjector.cpp
index 24d81c6fa6..b9e1252a5d 100644
--- a/src/plugins/debugger/shared/sharedlibraryinjector.cpp
+++ b/src/plugins/debugger/shared/sharedlibraryinjector.cpp
@@ -66,7 +66,7 @@ enum { debug = 0 };
static QString msgFuncFailed(const char *f, unsigned long error)
{
- return QString::fromLatin1("%1 failed: %2").arg(QLatin1String(f), Core::Utils::winErrorMessage(error));
+ return QString::fromLatin1("%1 failed: %2").arg(QLatin1String(f), Utils::winErrorMessage(error));
}
// Resolve a symbol from a library handle
diff --git a/src/plugins/debugger/stackhandler.h b/src/plugins/debugger/stackhandler.h
index dd2c0a4997..8b0d7a165c 100644
--- a/src/plugins/debugger/stackhandler.h
+++ b/src/plugins/debugger/stackhandler.h
@@ -41,6 +41,14 @@
namespace Debugger {
namespace Internal {
+struct StackCookie
+{
+ StackCookie() : isFull(true), gotoLocation(false) {}
+ StackCookie(bool full, bool jump) : isFull(full), gotoLocation(jump) {}
+ bool isFull;
+ bool gotoLocation;
+};
+
////////////////////////////////////////////////////////////////////////
//
// StackModel
@@ -129,4 +137,7 @@ private:
} // namespace Internal
} // namespace Debugger
+Q_DECLARE_METATYPE(Debugger::Internal::StackCookie)
+
+
#endif // DEBUGGER_STACKHANDLER_H
diff --git a/src/plugins/debugger/startexternaldialog.ui b/src/plugins/debugger/startexternaldialog.ui
index ff2aea3608..90ed85ac59 100644
--- a/src/plugins/debugger/startexternaldialog.ui
+++ b/src/plugins/debugger/startexternaldialog.ui
@@ -59,7 +59,7 @@
<widget class="QLineEdit" name="argsEdit"/>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::PathChooser" name="execFile" native="true"/>
+ <widget class="Utils::PathChooser" name="execFile" native="true"/>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="checkBoxBreakAtMain">
@@ -98,7 +98,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/debugger/startremotedialog.ui b/src/plugins/debugger/startremotedialog.ui
index 242589276d..4bfc215190 100644
--- a/src/plugins/debugger/startremotedialog.ui
+++ b/src/plugins/debugger/startremotedialog.ui
@@ -60,7 +60,7 @@
</widget>
</item>
<item row="3" column="1">
- <widget class="Core::Utils::PathChooser" name="serverStartScript" native="true"/>
+ <widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="serverStartScriptLabel">
@@ -85,7 +85,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
</customwidget>
diff --git a/src/plugins/designer/cpp/formclasswizardpage.ui b/src/plugins/designer/cpp/formclasswizardpage.ui
index 6381b45fd0..605406993d 100644
--- a/src/plugins/designer/cpp/formclasswizardpage.ui
+++ b/src/plugins/designer/cpp/formclasswizardpage.ui
@@ -21,7 +21,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="Core::Utils::NewClassWidget" name="newClassWidget"/>
+ <widget class="Utils::NewClassWidget" name="newClassWidget"/>
</item>
</layout>
</widget>
@@ -54,7 +54,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::NewClassWidget</class>
+ <class>Utils::NewClassWidget</class>
<extends>QWidget</extends>
<header location="global">utils/newclasswidget.h</header>
<container>1</container>
diff --git a/src/plugins/designer/cpp/formclasswizardparameters.cpp b/src/plugins/designer/cpp/formclasswizardparameters.cpp
index f777d0eec7..e05079f8da 100644
--- a/src/plugins/designer/cpp/formclasswizardparameters.cpp
+++ b/src/plugins/designer/cpp/formclasswizardparameters.cpp
@@ -341,7 +341,7 @@ bool FormClassWizardParametersPrivate::generateCpp(const FormClassWizardGenerati
const QString license = CppTools::AbstractEditorSupport::licenseTemplate();
// Include guards
- const QString guard = Core::Utils::headerGuard(headerFile);
+ const QString guard = Utils::headerGuard(headerFile);
QString uiInclude = QLatin1String("ui_");
uiInclude += QFileInfo(uiFile).completeBaseName();
@@ -354,7 +354,7 @@ bool FormClassWizardParametersPrivate::generateCpp(const FormClassWizardGenerati
// Include 'ui_'
if (embedding != FormClassWizardGenerationParameters::PointerAggregatedUiClass) {
- Core::Utils::writeIncludeFileDirective(uiInclude, false, headerStr);
+ Utils::writeIncludeFileDirective(uiInclude, false, headerStr);
} else {
// Todo: Can we obtain the header from the code model for custom widgets?
// Alternatively, from Designer.
@@ -362,11 +362,11 @@ bool FormClassWizardParametersPrivate::generateCpp(const FormClassWizardGenerati
QString baseInclude = formBaseClass;
if (generationParameters.includeQtModule())
baseInclude.insert(0, QLatin1String("QtGui/"));
- Core::Utils::writeIncludeFileDirective(baseInclude, true, headerStr);
+ Utils::writeIncludeFileDirective(baseInclude, true, headerStr);
}
}
- const QString namespaceIndent = Core::Utils::writeOpeningNameSpaces(namespaceList,
+ const QString namespaceIndent = Utils::writeOpeningNameSpaces(namespaceList,
generationParameters.indentNamespace() ? indent : QString(),
headerStr);
@@ -402,17 +402,17 @@ bool FormClassWizardParametersPrivate::generateCpp(const FormClassWizardGenerati
headerStr << uiMemberC << ";\n";
}
headerStr << namespaceIndent << "};\n\n";
- Core::Utils::writeClosingNameSpaces(namespaceList, generationParameters.indentNamespace() ? indent : QString(), headerStr);
+ Utils::writeClosingNameSpaces(namespaceList, generationParameters.indentNamespace() ? indent : QString(), headerStr);
headerStr << "#endif // "<< guard << '\n';
// 2) Source file
QTextStream sourceStr(source);
sourceStr << license;
- Core::Utils::writeIncludeFileDirective(headerFile, false, sourceStr);
+ Utils::writeIncludeFileDirective(headerFile, false, sourceStr);
if (embedding == FormClassWizardGenerationParameters::PointerAggregatedUiClass)
- Core::Utils::writeIncludeFileDirective(uiInclude, false, sourceStr);
+ Utils::writeIncludeFileDirective(uiInclude, false, sourceStr);
// NameSpaces(
- Core::Utils::writeOpeningNameSpaces(namespaceList, generationParameters.indentNamespace() ? indent : QString(), sourceStr);
+ Utils::writeOpeningNameSpaces(namespaceList, generationParameters.indentNamespace() ? indent : QString(), sourceStr);
// Constructor with setupUi
sourceStr << '\n' << namespaceIndent << unqualifiedClassName << "::" << unqualifiedClassName << "(QWidget *parent) :\n"
<< namespaceIndent << indent << formBaseClass << "(parent)";
@@ -443,7 +443,7 @@ bool FormClassWizardParametersPrivate::generateCpp(const FormClassWizardGenerati
<< namespaceIndent << indent << "}\n"
<< namespaceIndent << "}\n";
}
- Core::Utils::writeClosingNameSpaces(namespaceList, generationParameters.indentNamespace() ? indent : QString(), sourceStr);
+ Utils::writeClosingNameSpaces(namespaceList, generationParameters.indentNamespace() ? indent : QString(), sourceStr);
return true;
}
diff --git a/src/plugins/designer/editorwidget.cpp b/src/plugins/designer/editorwidget.cpp
index 65555e3241..c12a076100 100644
--- a/src/plugins/designer/editorwidget.cpp
+++ b/src/plugins/designer/editorwidget.cpp
@@ -80,7 +80,7 @@ SharedSubWindow::~SharedSubWindow()
QHash<QString, QVariant> EditorWidget::m_globalState = QHash<QString, QVariant>();
EditorWidget::EditorWidget(QWidget *formWindow)
- : m_mainWindow(new Core::Utils::FancyMainWindow),
+ : m_mainWindow(new Utils::FancyMainWindow),
m_initialized(false)
{
QVBoxLayout *layout = new QVBoxLayout;
diff --git a/src/plugins/designer/editorwidget.h b/src/plugins/designer/editorwidget.h
index 1738531069..4f1312c3b6 100644
--- a/src/plugins/designer/editorwidget.h
+++ b/src/plugins/designer/editorwidget.h
@@ -95,7 +95,7 @@ protected:
private:
SharedSubWindow* m_designerSubWindows[Designer::Constants::DesignerSubWindowCount];
QDockWidget *m_designerDockWidgets[Designer::Constants::DesignerSubWindowCount];
- Core::Utils::FancyMainWindow *m_mainWindow;
+ Utils::FancyMainWindow *m_mainWindow;
bool m_initialized;
static QHash<QString, QVariant> m_globalState;
diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp
index 41b1d11dfd..50bc5f1e93 100644
--- a/src/plugins/designer/formeditorw.cpp
+++ b/src/plugins/designer/formeditorw.cpp
@@ -159,6 +159,7 @@ static inline void addToolAction(QAction *a,
c1->addAction(command);
}
+using namespace Designer;
using namespace Designer::Internal;
using namespace Designer::Constants;
diff --git a/src/plugins/designer/formeditorw.h b/src/plugins/designer/formeditorw.h
index 58cdd64e6f..e592cfacf2 100644
--- a/src/plugins/designer/formeditorw.h
+++ b/src/plugins/designer/formeditorw.h
@@ -68,9 +68,10 @@ class IEditor;
}
namespace Designer {
+class FormWindowEditor;
+
namespace Internal {
-class FormWindowEditor;
class SettingsPage;
class ProxyAction : public QAction
diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp
index 0be5ec28a1..2623f1b9df 100644
--- a/src/plugins/designer/formwindoweditor.cpp
+++ b/src/plugins/designer/formwindoweditor.cpp
@@ -60,6 +60,7 @@
#include <QtGui/QToolBar>
#include <QtGui/QDockWidget>
+using namespace Designer;
using namespace Designer::Internal;
using namespace Designer::Constants;
using namespace SharedTools;
diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h
index cc49605ac3..3ca63df81a 100644
--- a/src/plugins/designer/formwindoweditor.h
+++ b/src/plugins/designer/formwindoweditor.h
@@ -51,10 +51,10 @@ class NodesWatcher;
namespace Designer {
namespace Internal {
-
class FormWindowFile;
class FormWindowHost;
class EditorWidget;
+}
// Master class maintaining a form window editor,
// containing file and widget host
@@ -114,9 +114,9 @@ private:
QString m_displayName;
const QList<int> m_context;
QDesignerFormWindowInterface *m_formWindow;
- FormWindowFile *m_file;
- FormWindowHost *m_host;
- EditorWidget *m_editorWidget;
+ Internal::FormWindowFile *m_file;
+ Internal::FormWindowHost *m_host;
+ Internal::EditorWidget *m_editorWidget;
QToolBar *m_toolBar;
QStringList m_originalUiQrcPaths;
ProjectExplorer::SessionNode *m_sessionNode;
@@ -124,6 +124,5 @@ private:
};
} // namespace Internal
-} // namespace Designer
#endif // FORMWINDOWEDITOR_H
diff --git a/src/plugins/designer/formwindowfile.cpp b/src/plugins/designer/formwindowfile.cpp
index 4df60e9f5d..0ab5f767f6 100644
--- a/src/plugins/designer/formwindowfile.cpp
+++ b/src/plugins/designer/formwindowfile.cpp
@@ -134,17 +134,17 @@ void FormWindowFile::modified(Core::IFile::ReloadBehavior *behavior)
break;
}
- switch (Core::Utils::reloadPrompt(m_fileName, isModified(), Core::ICore::instance()->mainWindow())) {
- case Core::Utils::ReloadCurrent:
+ switch (Utils::reloadPrompt(m_fileName, isModified(), Core::ICore::instance()->mainWindow())) {
+ case Utils::ReloadCurrent:
emit reload(m_fileName);
break;
- case Core::Utils::ReloadAll:
+ case Utils::ReloadAll:
emit reload(m_fileName);
*behavior = Core::IFile::ReloadAll;
break;
- case Core::Utils::ReloadSkipCurrent:
+ case Utils::ReloadSkipCurrent:
break;
- case Core::Utils::ReloadNone:
+ case Utils::ReloadNone:
*behavior = Core::IFile::ReloadNone;
break;
}
diff --git a/src/plugins/designer/formwizarddialog.cpp b/src/plugins/designer/formwizarddialog.cpp
index a9bb38e0ce..ac04fd3db8 100644
--- a/src/plugins/designer/formwizarddialog.cpp
+++ b/src/plugins/designer/formwizarddialog.cpp
@@ -79,7 +79,7 @@ QString FormWizardDialog::templateContents() const
FormFileWizardDialog::FormFileWizardDialog(const WizardPageList &extensionPages,
QWidget *parent)
: FormWizardDialog(extensionPages, parent),
- m_filePage(new Core::Utils::FileWizardPage)
+ m_filePage(new Utils::FileWizardPage)
{
setPage(FilePageId, m_filePage);
connect(m_filePage, SIGNAL(activated()),
diff --git a/src/plugins/designer/formwizarddialog.h b/src/plugins/designer/formwizarddialog.h
index 534ac9ac39..a31630515e 100644
--- a/src/plugins/designer/formwizarddialog.h
+++ b/src/plugins/designer/formwizarddialog.h
@@ -32,11 +32,9 @@
#include <QtGui/QWizard>
-namespace Core {
namespace Utils {
class FileWizardPage;
}
-}
namespace Designer {
namespace Internal {
@@ -88,7 +86,7 @@ private slots:
void slotCurrentIdChanged(int id);
private:
- Core::Utils::FileWizardPage *m_filePage;
+ Utils::FileWizardPage *m_filePage;
};
} // namespace Internal
diff --git a/src/plugins/fakevim/fakevimactions.cpp b/src/plugins/fakevim/fakevimactions.cpp
index e805311a24..272c2d10fe 100644
--- a/src/plugins/fakevim/fakevimactions.cpp
+++ b/src/plugins/fakevim/fakevimactions.cpp
@@ -48,7 +48,7 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QStack>
-using namespace Core::Utils;
+using namespace Utils;
///////////////////////////////////////////////////////////////////////
//
diff --git a/src/plugins/fakevim/fakevimactions.h b/src/plugins/fakevim/fakevimactions.h
index 11d2398935..2a5a5e4cbe 100644
--- a/src/plugins/fakevim/fakevimactions.h
+++ b/src/plugins/fakevim/fakevimactions.h
@@ -66,24 +66,24 @@ class FakeVimSettings : public QObject
public:
FakeVimSettings();
~FakeVimSettings();
- void insertItem(int code, Core::Utils::SavedAction *item,
+ void insertItem(int code, Utils::SavedAction *item,
const QString &longname = QString(),
const QString &shortname = QString());
- Core::Utils::SavedAction *item(int code);
- Core::Utils::SavedAction *item(const QString &name);
+ Utils::SavedAction *item(int code);
+ Utils::SavedAction *item(const QString &name);
void readSettings(QSettings *settings);
void writeSettings(QSettings *settings);
private:
- QHash<int, Core::Utils::SavedAction *> m_items;
+ QHash<int, Utils::SavedAction *> m_items;
QHash<QString, int> m_nameToCode;
QHash<int, QString> m_codeToName;
};
FakeVimSettings *theFakeVimSettings();
-Core::Utils::SavedAction *theFakeVimSetting(int code);
+Utils::SavedAction *theFakeVimSetting(int code);
} // namespace Internal
} // namespace FakeVim
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index 49bf5df793..09dd130753 100644
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -93,7 +93,7 @@
# define UNDO_DEBUG(s)
#endif
-using namespace Core::Utils;
+using namespace Utils;
namespace FakeVim {
namespace Internal {
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index c4c4792f49..4246e1d133 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -128,7 +128,7 @@ private:
friend class DebuggerPlugin;
Ui::FakeVimOptionPage m_ui;
- Core::Utils::SavedActionSet m_group;
+ Utils::SavedActionSet m_group;
};
QWidget *FakeVimOptionPage::createPage(QWidget *parent)
diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp
index 01d6449aac..948aeb6f89 100644
--- a/src/plugins/find/findtoolbar.cpp
+++ b/src/plugins/find/findtoolbar.cpp
@@ -91,7 +91,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
m_findCompleter->popup()->installEventFilter(this);
m_ui.replaceEdit->setCompleter(m_replaceCompleter);
- m_ui.findEdit->setSide(qApp->layoutDirection() == Qt::LeftToRight ? Core::Utils::FancyLineEdit::Right : Core::Utils::FancyLineEdit::Left);
+ m_ui.findEdit->setSide(qApp->layoutDirection() == Qt::LeftToRight ? Utils::FancyLineEdit::Right : Utils::FancyLineEdit::Left);
QMenu *lineEditMenu = new QMenu(m_ui.findEdit);
m_ui.findEdit->setMenu(lineEditMenu);
@@ -278,7 +278,7 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event)
m_currentDocumentFind->clearFindScope();
}
}
- return Core::Utils::StyledBar::eventFilter(obj, event);
+ return Utils::StyledBar::eventFilter(obj, event);
}
void FindToolBar::adaptToCandidate()
@@ -598,7 +598,7 @@ bool FindToolBar::focusNextPrevChild(bool next)
else if (!next && m_ui.findEdit->hasFocus())
m_ui.replaceAllButton->setFocus(Qt::TabFocusReason);
else
- return Core::Utils::StyledBar::focusNextPrevChild(next);
+ return Utils::StyledBar::focusNextPrevChild(next);
return true;
}
diff --git a/src/plugins/find/findtoolbar.h b/src/plugins/find/findtoolbar.h
index cbde5eceb5..ac531defdf 100644
--- a/src/plugins/find/findtoolbar.h
+++ b/src/plugins/find/findtoolbar.h
@@ -48,7 +48,7 @@ namespace Internal {
class FindPlugin;
-class FindToolBar : public Core::Utils::StyledBar
+class FindToolBar : public Utils::StyledBar
{
Q_OBJECT
diff --git a/src/plugins/find/findwidget.ui b/src/plugins/find/findwidget.ui
index 08abeb8efc..59153e4936 100644
--- a/src/plugins/find/findwidget.ui
+++ b/src/plugins/find/findwidget.ui
@@ -40,7 +40,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::FancyLineEdit" name="findEdit"/>
+ <widget class="Utils::FancyLineEdit" name="findEdit"/>
</item>
<item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
@@ -162,7 +162,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::FancyLineEdit</class>
+ <class>Utils::FancyLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/fancylineedit.h</header>
</customwidget>
diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp
index 03e24d1b6b..bc7c96138b 100644
--- a/src/plugins/genericprojectmanager/genericproject.cpp
+++ b/src/plugins/genericprojectmanager/genericproject.cpp
@@ -587,7 +587,7 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project)
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
// build directory
- m_pathChooser = new Core::Utils::PathChooser(this);
+ m_pathChooser = new Utils::PathChooser(this);
m_pathChooser->setEnabled(true);
fl->addRow(tr("Build directory:"), m_pathChooser);
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
diff --git a/src/plugins/genericprojectmanager/genericproject.h b/src/plugins/genericprojectmanager/genericproject.h
index 3d87082df4..8b096fc133 100644
--- a/src/plugins/genericprojectmanager/genericproject.h
+++ b/src/plugins/genericprojectmanager/genericproject.h
@@ -45,11 +45,9 @@ class QPushButton;
class QStringListModel;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
class PathChooser;
}
-}
namespace GenericProjectManager {
namespace Internal {
@@ -204,7 +202,7 @@ private Q_SLOTS:
private:
GenericProject *m_project;
- Core::Utils::PathChooser *m_pathChooser;
+ Utils::PathChooser *m_pathChooser;
QString m_buildConfiguration;
};
diff --git a/src/plugins/genericprojectmanager/genericprojectwizard.cpp b/src/plugins/genericprojectmanager/genericprojectwizard.cpp
index 0ee4d297e9..46bdecf414 100644
--- a/src/plugins/genericprojectmanager/genericprojectwizard.cpp
+++ b/src/plugins/genericprojectmanager/genericprojectwizard.cpp
@@ -46,7 +46,7 @@
#include <QtGui/QTreeView>
using namespace GenericProjectManager::Internal;
-using namespace Core::Utils;
+using namespace Utils;
namespace {
@@ -209,7 +209,7 @@ void GenericProjectWizardDialog::initializePage(int id)
Q_UNUSED(id)
#if 0
if (id == m_secondPageId) {
- using namespace Core::Utils;
+ using namespace Utils;
const QString projectPath = m_pathChooser->path();
@@ -221,7 +221,7 @@ void GenericProjectWizardDialog::initializePage(int id)
bool GenericProjectWizardDialog::validateCurrentPage()
{
- using namespace Core::Utils;
+ using namespace Utils;
#if 0
if (currentId() == m_secondPageId) {
diff --git a/src/plugins/genericprojectmanager/genericprojectwizard.h b/src/plugins/genericprojectmanager/genericprojectwizard.h
index 8b72a179d4..a5d3b26dcf 100644
--- a/src/plugins/genericprojectmanager/genericprojectwizard.h
+++ b/src/plugins/genericprojectmanager/genericprojectwizard.h
@@ -44,13 +44,11 @@ class QStringList;
class QTreeView;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
class FileWizardPage;
} // namespace Utils
-} // namespace Core
namespace GenericProjectManager {
namespace Internal {
@@ -79,7 +77,7 @@ protected:
private:
int m_secondPageId;
- Core::Utils::FileWizardPage *m_firstPage;
+ Utils::FileWizardPage *m_firstPage;
QTreeView *m_dirView;
QDirModel *m_dirModel;
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 38b9b52f91..f08e8b65d7 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -238,7 +238,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
Core::Command *command;
- m_diffAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_diffAction = new Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_diffAction, "Git.Diff", globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_WS_MAC
@@ -247,7 +247,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_diffAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
gitContainer->addAction(command);
- m_statusAction = new Core::Utils::ParameterAction(tr("File Status"), tr("Status Related to \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_statusAction = new Utils::ParameterAction(tr("File Status"), tr("Status Related to \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_statusAction, "Git.Status", globalcontext);
#ifndef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+S")));
@@ -256,7 +256,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_statusAction, SIGNAL(triggered()), this, SLOT(statusFile()));
gitContainer->addAction(command);
- m_logAction = new Core::Utils::ParameterAction(tr("Log File"), tr("Log of \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_logAction = new Utils::ParameterAction(tr("Log File"), tr("Log of \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_logAction, "Git.Log", globalcontext);
#ifndef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L")));
@@ -265,7 +265,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_logAction, SIGNAL(triggered()), this, SLOT(logFile()));
gitContainer->addAction(command);
- m_blameAction = new Core::Utils::ParameterAction(tr("Blame"), tr("Blame for \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_blameAction = new Utils::ParameterAction(tr("Blame"), tr("Blame for \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_blameAction, "Git.Blame", globalcontext);
#ifndef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B")));
@@ -274,7 +274,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_blameAction, SIGNAL(triggered()), this, SLOT(blameFile()));
gitContainer->addAction(command);
- m_undoFileAction = new Core::Utils::ParameterAction(tr("Undo Changes"), tr("Undo Changes for \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_undoFileAction = new Utils::ParameterAction(tr("Undo Changes"), tr("Undo Changes for \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_undoFileAction, "Git.Undo", globalcontext);
#ifndef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U")));
@@ -283,7 +283,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_undoFileAction, SIGNAL(triggered()), this, SLOT(undoFileChanges()));
gitContainer->addAction(command);
- m_stageAction = new Core::Utils::ParameterAction(tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_stageAction = new Utils::ParameterAction(tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_stageAction, "Git.Stage", globalcontext);
#ifndef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A")));
@@ -292,7 +292,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_stageAction, SIGNAL(triggered()), this, SLOT(stageFile()));
gitContainer->addAction(command);
- m_unstageAction = new Core::Utils::ParameterAction(tr("Unstage File from Commit"), tr("Unstage \"%1\" from Commit"), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_unstageAction = new Utils::ParameterAction(tr("Unstage File from Commit"), tr("Unstage \"%1\" from Commit"), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_unstageAction, "Git.Unstage", globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_unstageAction, SIGNAL(triggered()), this, SLOT(unstageFile()));
@@ -300,7 +300,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
gitContainer->addAction(createSeparator(actionManager, globalcontext, QLatin1String("Git.Sep.Project"), this));
- m_diffProjectAction = new Core::Utils::ParameterAction(tr("Diff Current Project"), tr("Diff Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_diffProjectAction = new Utils::ParameterAction(tr("Diff Current Project"), tr("Diff Project \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_diffProjectAction, "Git.DiffProject", globalcontext);
#ifndef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence("Alt+G,Alt+Shift+D"));
@@ -309,13 +309,13 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject()));
gitContainer->addAction(command);
- m_statusProjectAction = new Core::Utils::ParameterAction(tr("Project Status"), tr("Status Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_statusProjectAction = new Utils::ParameterAction(tr("Project Status"), tr("Status Project \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_statusProjectAction, "Git.StatusProject", globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_statusProjectAction, SIGNAL(triggered()), this, SLOT(statusProject()));
gitContainer->addAction(command);
- m_logProjectAction = new Core::Utils::ParameterAction(tr("Log Project"), tr("Log Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_logProjectAction = new Utils::ParameterAction(tr("Log Project"), tr("Log Project \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = actionManager->registerAction(m_logProjectAction, "Git.LogProject", globalcontext);
#ifndef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K")));
diff --git a/src/plugins/git/gitplugin.h b/src/plugins/git/gitplugin.h
index 116d8f6638..4f934a8939 100644
--- a/src/plugins/git/gitplugin.h
+++ b/src/plugins/git/gitplugin.h
@@ -50,10 +50,10 @@ namespace Core {
class IEditorFactory;
class ICore;
class IVersionControl;
+}
namespace Utils {
class ParameterAction;
}
-} // namespace Core
namespace Git {
namespace Internal {
@@ -133,18 +133,18 @@ private:
static GitPlugin *m_instance;
Core::ICore *m_core;
- Core::Utils::ParameterAction *m_diffAction;
- Core::Utils::ParameterAction *m_diffProjectAction;
- Core::Utils::ParameterAction *m_statusAction;
- Core::Utils::ParameterAction *m_statusProjectAction;
- Core::Utils::ParameterAction *m_logAction;
- Core::Utils::ParameterAction *m_blameAction;
- Core::Utils::ParameterAction *m_logProjectAction;
- Core::Utils::ParameterAction *m_undoFileAction;
+ Utils::ParameterAction *m_diffAction;
+ Utils::ParameterAction *m_diffProjectAction;
+ Utils::ParameterAction *m_statusAction;
+ Utils::ParameterAction *m_statusProjectAction;
+ Utils::ParameterAction *m_logAction;
+ Utils::ParameterAction *m_blameAction;
+ Utils::ParameterAction *m_logProjectAction;
+ Utils::ParameterAction *m_undoFileAction;
QAction *m_undoProjectAction;
QAction *m_showAction;
- Core::Utils::ParameterAction *m_stageAction;
- Core::Utils::ParameterAction *m_unstageAction;
+ Utils::ParameterAction *m_stageAction;
+ Utils::ParameterAction *m_unstageAction;
QAction *m_commitAction;
QAction *m_pullAction;
QAction *m_pushAction;
diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp
index 971282247e..cffe8b351a 100644
--- a/src/plugins/git/gitsettings.cpp
+++ b/src/plugins/git/gitsettings.cpp
@@ -102,7 +102,7 @@ QString GitSettings::gitBinaryPath(bool *ok, QString *errorMessage) const
if (!adoptPath)
return binary;
// Search in path?
- const QString pathBinary = Core::Utils::SynchronousProcess::locateBinary(path, binary);
+ const QString pathBinary = Utils::SynchronousProcess::locateBinary(path, binary);
if (pathBinary.isEmpty()) {
if (ok)
*ok = false;
diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp
index b12a4f03cc..d735611b6e 100644
--- a/src/plugins/git/gitsubmiteditorwidget.cpp
+++ b/src/plugins/git/gitsubmiteditorwidget.cpp
@@ -110,7 +110,7 @@ void GitSubmitHighlighter::highlightBlock(const QString &text)
// ------------------
GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) :
- Core::Utils::SubmitEditorWidget(parent),
+ Utils::SubmitEditorWidget(parent),
m_gitSubmitPanel(new QWidget)
{
m_gitSubmitPanelUi.setupUi(m_gitSubmitPanel);
diff --git a/src/plugins/git/gitsubmiteditorwidget.h b/src/plugins/git/gitsubmiteditorwidget.h
index faadcc5a16..9abf933585 100644
--- a/src/plugins/git/gitsubmiteditorwidget.h
+++ b/src/plugins/git/gitsubmiteditorwidget.h
@@ -47,7 +47,7 @@ struct GitSubmitEditorPanelData;
* remaining un-added and untracked files will be added 'unchecked' for the
* user to click. */
-class GitSubmitEditorWidget : public Core::Utils::SubmitEditorWidget
+class GitSubmitEditorWidget : public Utils::SubmitEditorWidget
{
public:
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp
index 63375b7ef0..8421dca38d 100644
--- a/src/plugins/help/helpplugin.cpp
+++ b/src/plugins/help/helpplugin.cpp
@@ -478,7 +478,7 @@ void HelpPlugin::createRightPaneSideBar()
hboxLayout->addWidget(rightPaneToolBar);
hboxLayout->addStretch(5);
hboxLayout->addWidget(closeButton);
- Core::Utils::StyledBar *w = new Core::Utils::StyledBar;
+ Utils::StyledBar *w = new Utils::StyledBar;
w->setLayout(hboxLayout);
connect(closeButton, SIGNAL(clicked()), this, SLOT(slotHideRightPane()));
@@ -633,9 +633,9 @@ void HelpPlugin::extensionsInitialized()
hc.addCustomFilter(tr("Unfiltered"), QStringList());
hc.setCustomValue(key, 1);
}
- m_helpEngine->blockSignals(true);
+ bool blocked = m_helpEngine->blockSignals(true);
m_helpEngine->setCurrentFilter(tr("Unfiltered"));
- m_helpEngine->blockSignals(false);
+ m_helpEngine->blockSignals(blocked);
needsSetup = true;
}
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index 0777d21235..60f0d98522 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -257,7 +257,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
Core::Command *command;
QAction *tmpaction;
- m_editAction = new Core::Utils::ParameterAction(tr("Edit"), tr("Edit \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_editAction = new Utils::ParameterAction(tr("Edit"), tr("Edit \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_editAction, CMD_ID_EDIT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_WS_MAC
@@ -267,7 +267,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
connect(m_editAction, SIGNAL(triggered()), this, SLOT(openCurrentFile()));
mperforce->addAction(command);
- m_addAction = new Core::Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_addAction = new Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_addAction, CMD_ID_ADD, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_WS_MAC
@@ -277,14 +277,14 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
mperforce->addAction(command);
- m_deleteAction = new Core::Utils::ParameterAction(tr("Delete"), tr("Delete \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_deleteAction = new Utils::ParameterAction(tr("Delete"), tr("Delete \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_deleteAction, CMD_ID_DELETE_FILE, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultText(tr("Delete File"));
connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile()));
mperforce->addAction(command);
- m_revertAction = new Core::Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_revertAction = new Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_revertAction, CMD_ID_REVERT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_WS_MAC
@@ -299,7 +299,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
command = am->registerAction(tmpaction, QLatin1String("Perforce.Sep.Edit"), globalcontext);
mperforce->addAction(command);
- m_diffCurrentAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_diffCurrentAction = new Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_diffCurrentAction, CMD_ID_DIFF_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultText(tr("Diff Current File"));
@@ -307,7 +307,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
mperforce->addAction(command);
const QString diffProjectDefaultText = tr("Diff Current Project/Session");
- m_diffProjectAction = new Core::Utils::ParameterAction(diffProjectDefaultText, tr("Diff Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_diffProjectAction = new Utils::ParameterAction(diffProjectDefaultText, tr("Diff Project \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = am->registerAction(m_diffProjectAction, CMD_ID_DIFF_PROJECT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_WS_MAC
@@ -347,7 +347,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
mperforce->addAction(command);
const QString updateProjectDefaultText = tr("Update Current Project/Session");
- m_updateProjectAction = new Core::Utils::ParameterAction(updateProjectDefaultText, tr("Update Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this);
+ m_updateProjectAction = new Utils::ParameterAction(updateProjectDefaultText, tr("Update Project \"%1\""), Utils::ParameterAction::AlwaysEnabled, this);
command = am->registerAction(m_updateProjectAction, CMD_ID_UPDATE_PROJECT, globalcontext);
command->setDefaultText(updateProjectDefaultText);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -364,7 +364,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
connect(m_describeAction, SIGNAL(triggered()), this, SLOT(describeChange()));
mperforce->addAction(command);
- m_annotateCurrentAction = new Core::Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_annotateCurrentAction = new Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_annotateCurrentAction, CMD_ID_ANNOTATE_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultText(tr("Annotate Current File"));
@@ -376,7 +376,7 @@ bool PerforcePlugin::initialize(const QStringList &arguments, QString *errorMess
connect(m_annotateAction, SIGNAL(triggered()), this, SLOT(annotate()));
mperforce->addAction(command);
- m_filelogCurrentAction = new Core::Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_filelogCurrentAction = new Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = am->registerAction(m_filelogCurrentAction, CMD_ID_FILELOG_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_WS_MAC
@@ -833,7 +833,7 @@ PerforceResponse PerforcePlugin::runP4Cmd(const QStringList &args,
outputWindow->appendCommand(formatCommand(m_settings.p4Command(), actualArgs));
// Run, connect stderr to the output window
- Core::Utils::SynchronousProcess process;
+ Utils::SynchronousProcess process;
process.setTimeout(p4Timeout);
process.setStdOutCodec(outputCodec);
process.setEnvironment(environment());
@@ -850,7 +850,7 @@ PerforceResponse PerforcePlugin::runP4Cmd(const QStringList &args,
connect(&process, SIGNAL(stdOutBuffered(QString,bool)), outputWindow, SLOT(append(QString)));
}
- const Core::Utils::SynchronousProcessResponse sp_resp = process.run(m_settings.p4Command(), actualArgs);
+ const Utils::SynchronousProcessResponse sp_resp = process.run(m_settings.p4Command(), actualArgs);
if (Perforce::Constants::debug)
qDebug() << sp_resp;
@@ -858,19 +858,19 @@ PerforceResponse PerforcePlugin::runP4Cmd(const QStringList &args,
response.stdErr = sp_resp.stdErr;
response.stdOut = sp_resp.stdOut;
switch (sp_resp.result) {
- case Core::Utils::SynchronousProcessResponse::Finished:
+ case Utils::SynchronousProcessResponse::Finished:
response.error = false;
break;
- case Core::Utils::SynchronousProcessResponse::FinishedError:
+ case Utils::SynchronousProcessResponse::FinishedError:
response.message = tr("The process terminated with exit code %1.").arg(sp_resp.exitCode);
break;
- case Core::Utils::SynchronousProcessResponse::TerminatedAbnormally:
+ case Utils::SynchronousProcessResponse::TerminatedAbnormally:
response.message = tr("The process terminated abnormally.");
break;
- case Core::Utils::SynchronousProcessResponse::StartFailed:
+ case Utils::SynchronousProcessResponse::StartFailed:
response.message = tr("Could not start perforce '%1'. Please check your settings in the preferences.").arg(m_settings.p4Command());
break;
- case Core::Utils::SynchronousProcessResponse::Hang:
+ case Utils::SynchronousProcessResponse::Hang:
response.message = tr("Perforce did not respond within timeout limit (%1 ms).").arg(p4Timeout );
break;
}
diff --git a/src/plugins/perforce/perforceplugin.h b/src/plugins/perforce/perforceplugin.h
index 761fb96799..275903a9c5 100644
--- a/src/plugins/perforce/perforceplugin.h
+++ b/src/plugins/perforce/perforceplugin.h
@@ -48,10 +48,8 @@ class QAction;
class QTextCodec;
QT_END_NAMESPACE
-namespace Core {
- namespace Utils {
- class ParameterAction;
- }
+namespace Utils {
+ class ParameterAction;
}
namespace Perforce {
@@ -168,22 +166,22 @@ private:
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
- Core::Utils::ParameterAction *m_editAction;
- Core::Utils::ParameterAction *m_addAction;
- Core::Utils::ParameterAction *m_deleteAction;
+ Utils::ParameterAction *m_editAction;
+ Utils::ParameterAction *m_addAction;
+ Utils::ParameterAction *m_deleteAction;
QAction *m_openedAction;
- Core::Utils::ParameterAction *m_revertAction;
- Core::Utils::ParameterAction *m_diffCurrentAction;
- Core::Utils::ParameterAction *m_diffProjectAction;
- Core::Utils::ParameterAction *m_updateProjectAction;
+ Utils::ParameterAction *m_revertAction;
+ Utils::ParameterAction *m_diffCurrentAction;
+ Utils::ParameterAction *m_diffProjectAction;
+ Utils::ParameterAction *m_updateProjectAction;
QAction *m_diffAllAction;
QAction *m_resolveAction;
QAction *m_submitAction;
QAction *m_pendingAction;
QAction *m_describeAction;
- Core::Utils::ParameterAction *m_annotateCurrentAction;
+ Utils::ParameterAction *m_annotateCurrentAction;
QAction *m_annotateAction;
- Core::Utils::ParameterAction *m_filelogCurrentAction;
+ Utils::ParameterAction *m_filelogCurrentAction;
QAction *m_filelogAction;
QAction *m_submitCurrentLogAction;
QAction *m_updateAllAction;
diff --git a/src/plugins/perforce/perforcesubmiteditorwidget.cpp b/src/plugins/perforce/perforcesubmiteditorwidget.cpp
index 9ef31d5626..b11ba12b81 100644
--- a/src/plugins/perforce/perforcesubmiteditorwidget.cpp
+++ b/src/plugins/perforce/perforcesubmiteditorwidget.cpp
@@ -33,7 +33,7 @@ namespace Perforce {
namespace Internal {
PerforceSubmitEditorWidget::PerforceSubmitEditorWidget(QWidget *parent) :
- Core::Utils::SubmitEditorWidget(parent),
+ Utils::SubmitEditorWidget(parent),
m_submitPanel(new QGroupBox)
{
m_submitPanelUi.setupUi(m_submitPanel);
diff --git a/src/plugins/perforce/perforcesubmiteditorwidget.h b/src/plugins/perforce/perforcesubmiteditorwidget.h
index a5240cb94e..6afeca66aa 100644
--- a/src/plugins/perforce/perforcesubmiteditorwidget.h
+++ b/src/plugins/perforce/perforcesubmiteditorwidget.h
@@ -38,7 +38,7 @@ namespace Internal {
/* Submit editor widget with additional information pane
* at the top. */
-class PerforceSubmitEditorWidget : public Core::Utils::SubmitEditorWidget
+class PerforceSubmitEditorWidget : public Utils::SubmitEditorWidget
{
public:
diff --git a/src/plugins/perforce/settingspage.cpp b/src/plugins/perforce/settingspage.cpp
index f2e01fd90c..4fe846f8ea 100644
--- a/src/plugins/perforce/settingspage.cpp
+++ b/src/plugins/perforce/settingspage.cpp
@@ -38,7 +38,7 @@
#include <QtGui/QFileDialog>
using namespace Perforce::Internal;
-using namespace Core::Utils;
+using namespace Utils;
SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
QWidget(parent)
diff --git a/src/plugins/perforce/settingspage.ui b/src/plugins/perforce/settingspage.ui
index 5eccd25c95..fe25bcf584 100644
--- a/src/plugins/perforce/settingspage.ui
+++ b/src/plugins/perforce/settingspage.ui
@@ -51,7 +51,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::PathChooser" name="pathChooser"/>
+ <widget class="Utils::PathChooser" name="pathChooser"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="defaultCheckBox">
@@ -161,7 +161,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/projectexplorer/applicationlauncher.h b/src/plugins/projectexplorer/applicationlauncher.h
index f11fa7c82d..937f9409a9 100644
--- a/src/plugins/projectexplorer/applicationlauncher.h
+++ b/src/plugins/projectexplorer/applicationlauncher.h
@@ -39,11 +39,9 @@
#include <QtCore/QTextCodec>
#endif
-namespace Core {
namespace Utils {
class ConsoleProcess;
}
-}
namespace ProjectExplorer {
@@ -92,7 +90,7 @@ private slots:
private:
QProcess *m_guiProcess;
- Core::Utils::ConsoleProcess *m_consoleProcess;
+ Utils::ConsoleProcess *m_consoleProcess;
Mode m_currentMode;
#ifdef Q_OS_WIN
diff --git a/src/plugins/projectexplorer/applicationlauncher_win.cpp b/src/plugins/projectexplorer/applicationlauncher_win.cpp
index 7880465a2f..2647ad1507 100644
--- a/src/plugins/projectexplorer/applicationlauncher_win.cpp
+++ b/src/plugins/projectexplorer/applicationlauncher_win.cpp
@@ -35,7 +35,7 @@
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
-using namespace Core::Utils;
+using namespace Utils;
ApplicationLauncher::ApplicationLauncher(QObject *parent)
: QObject(parent)
diff --git a/src/plugins/projectexplorer/applicationlauncher_x11.cpp b/src/plugins/projectexplorer/applicationlauncher_x11.cpp
index 87291dd252..f4a0bb018a 100644
--- a/src/plugins/projectexplorer/applicationlauncher_x11.cpp
+++ b/src/plugins/projectexplorer/applicationlauncher_x11.cpp
@@ -35,7 +35,7 @@
#include <QtCore/QTimer>
using namespace ProjectExplorer;
-using namespace Core::Utils;
+using namespace Utils;
ApplicationLauncher::ApplicationLauncher(QObject *parent)
: QObject(parent)
diff --git a/src/plugins/projectexplorer/buildprogress.cpp b/src/plugins/projectexplorer/buildprogress.cpp
index 9c6ab93799..edc3576b71 100644
--- a/src/plugins/projectexplorer/buildprogress.cpp
+++ b/src/plugins/projectexplorer/buildprogress.cpp
@@ -62,12 +62,12 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow)
// ### TODO this setup should be done by style
QFont f = this->font();
- f.setPointSizeF(StyleHelper::sidebarFontSize());
+ f.setPointSizeF(Utils::StyleHelper::sidebarFontSize());
f.setBold(true);
m_errorLabel->setFont(f);
m_warningLabel->setFont(f);
- m_errorLabel->setPalette(StyleHelper::sidebarFontPalette(m_errorLabel->palette()));
- m_warningLabel->setPalette(StyleHelper::sidebarFontPalette(m_warningLabel->palette()));
+ m_errorLabel->setPalette(Utils::StyleHelper::sidebarFontPalette(m_errorLabel->palette()));
+ m_warningLabel->setPalette(Utils::StyleHelper::sidebarFontPalette(m_warningLabel->palette()));
m_errorIcon->setAlignment(Qt::AlignRight);
m_warningIcon->setAlignment(Qt::AlignRight);
diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
index b6fe770d54..82e187367b 100644
--- a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
@@ -220,7 +220,7 @@ void BuildSettingsWidget::updateBuildSettings()
// TODO save position, entry from combbox
// Delete old tree items
- m_buildConfigurationComboBox->blockSignals(true);
+ bool blocked = m_buildConfigurationComboBox->blockSignals(true);
m_buildConfigurationComboBox->clear();
m_subWidgets->clear();
@@ -245,7 +245,7 @@ void BuildSettingsWidget::updateBuildSettings()
m_buildConfigurationComboBox->setCurrentIndex(m_buildConfigurationComboBox->count() - 1);
}
- m_buildConfigurationComboBox->blockSignals(false);
+ m_buildConfigurationComboBox->blockSignals(blocked);
// TODO Restore position, entry from combbox
// TODO? select entry from combobox ?
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index 6755ccc835..4839443bae 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -53,11 +53,11 @@
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;
-class CustomDirectoryPathChooser : public Core::Utils::PathChooser
+class CustomDirectoryPathChooser : public Utils::PathChooser
{
public:
CustomDirectoryPathChooser(QWidget *parent)
- : Core::Utils::PathChooser(parent)
+ : Utils::PathChooser(parent)
{
}
virtual bool validatePath(const QString &path, QString *errorMessage = 0)
@@ -78,8 +78,8 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
m_userName = new QLineEdit(this);
layout->addRow(tr("Name:"), m_userName);
- m_executableChooser = new Core::Utils::PathChooser(this);
- m_executableChooser->setExpectedKind(Core::Utils::PathChooser::Command);
+ m_executableChooser = new Utils::PathChooser(this);
+ m_executableChooser->setExpectedKind(Utils::PathChooser::Command);
layout->addRow(tr("Executable:"), m_executableChooser);
m_commandLineArgumentsLineEdit = new QLineEdit(this);
@@ -87,7 +87,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
layout->addRow(tr("Arguments:"), m_commandLineArgumentsLineEdit);
m_workingDirectory = new CustomDirectoryPathChooser(this);
- m_workingDirectory->setExpectedKind(Core::Utils::PathChooser::Directory);
+ m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory);
layout->addRow(tr("Working Directory:"), m_workingDirectory);
m_useTerminalCheck = new QCheckBox(tr("Run in &Terminal"), this);
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.h b/src/plugins/projectexplorer/customexecutablerunconfiguration.h
index 2387f9ca72..46c871bd67 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.h
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.h
@@ -33,7 +33,6 @@
#include "applicationrunconfiguration.h"
#include <QtGui/QWidget>
-
QT_BEGIN_NAMESPACE
class QCheckBox;
class QLineEdit;
@@ -44,12 +43,8 @@ QT_END_NAMESPACE
namespace Utils {
class DetailsWidget;
-}
-namespace Core {
-namespace Utils {
class PathChooser;
}
-}
namespace ProjectExplorer {
class EnvironmentWidget;
@@ -172,10 +167,10 @@ private slots:
private:
bool m_ignoreChange;
CustomExecutableRunConfiguration *m_runConfiguration;
- Core::Utils::PathChooser *m_executableChooser;
+ Utils::PathChooser *m_executableChooser;
QLineEdit *m_userName;
QLineEdit *m_commandLineArgumentsLineEdit;
- Core::Utils::PathChooser *m_workingDirectory;
+ Utils::PathChooser *m_workingDirectory;
QCheckBox *m_useTerminalCheck;
ProjectExplorer::EnvironmentWidget *m_environmentWidget;
QComboBox *m_baseEnvironmentComboBox;
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp
index 53e5a0f407..163418b0db 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.cpp
+++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp
@@ -139,7 +139,7 @@ void FolderNavigationWidget::setCurrentFile(const QString &filePath)
QString dir = QFileInfo(filePath).path();
if (dir.isEmpty())
- dir = Core::Utils::PathChooser::homePath();
+ dir = Utils::PathChooser::homePath();
QModelIndex dirIndex = m_dirModel->index(dir);
QModelIndex fileIndex = m_dirModel->index(filePath);
diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp
index 7e1f5afb82..a4d46bdd27 100644
--- a/src/plugins/projectexplorer/processstep.cpp
+++ b/src/plugins/projectexplorer/processstep.cpp
@@ -132,7 +132,7 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step)
: m_step(step)
{
m_ui.setupUi(this);
- m_ui.command->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui.command->setExpectedKind(Utils::PathChooser::File);
connect(m_ui.command, SIGNAL(changed(QString)),
this, SLOT(commandLineEditTextEdited()));
connect(m_ui.workingDirectory, SIGNAL(changed(QString)),
diff --git a/src/plugins/projectexplorer/processstep.ui b/src/plugins/projectexplorer/processstep.ui
index ed01c90aec..8d049ed363 100644
--- a/src/plugins/projectexplorer/processstep.ui
+++ b/src/plugins/projectexplorer/processstep.ui
@@ -43,7 +43,7 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="Core::Utils::PathChooser" name="command" native="true"/>
+ <widget class="Utils::PathChooser" name="command" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="workingDirecoryLabel">
@@ -53,7 +53,7 @@
</widget>
</item>
<item row="3" column="1">
- <widget class="Core::Utils::PathChooser" name="workingDirectory" native="true"/>
+ <widget class="Utils::PathChooser" name="workingDirectory" native="true"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="commandArgumentsLabel">
@@ -69,7 +69,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index f5ba13661d..f1917bf594 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -126,16 +126,16 @@ struct ProjectExplorerPluginPrivate {
#if 0
QAction *m_loadAction;
#endif
- Core::Utils::ParameterAction *m_unloadAction;
+ Utils::ParameterAction *m_unloadAction;
QAction *m_clearSession;
QAction *m_buildProjectOnlyAction;
- Core::Utils::ParameterAction *m_buildAction;
+ Utils::ParameterAction *m_buildAction;
QAction *m_buildSessionAction;
QAction *m_rebuildProjectOnlyAction;
- Core::Utils::ParameterAction *m_rebuildAction;
+ Utils::ParameterAction *m_rebuildAction;
QAction *m_rebuildSessionAction;
QAction *m_cleanProjectOnlyAction;
- Core::Utils::ParameterAction *m_cleanAction;
+ Utils::ParameterAction *m_cleanAction;
QAction *m_cleanSessionAction;
QAction *m_runAction;
QAction *m_runActionContextMenu;
@@ -508,8 +508,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
this, SLOT(updateRecentProjectMenu()));
// unload action
- d->m_unloadAction = new Core::Utils::ParameterAction(tr("Close Project"), tr("Close Project \"%1\""),
- Core::Utils::ParameterAction::EnabledWithParameter, this);
+ d->m_unloadAction = new Utils::ParameterAction(tr("Close Project"), tr("Close Project \"%1\""),
+ Utils::ParameterAction::EnabledWithParameter, this);
cmd = am->registerAction(d->m_unloadAction, Constants::UNLOAD, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText);
cmd->setDefaultText(d->m_unloadAction->text());
@@ -569,8 +569,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD);
// build action
- d->m_buildAction = new Core::Utils::ParameterAction(tr("Build Project"), tr("Build Project \"%1\""),
- Core::Utils::ParameterAction::EnabledWithParameter, this);
+ d->m_buildAction = new Utils::ParameterAction(tr("Build Project"), tr("Build Project \"%1\""),
+ Utils::ParameterAction::EnabledWithParameter, this);
cmd = am->registerAction(d->m_buildAction, Constants::BUILD, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText);
cmd->setDefaultText(d->m_buildAction->text());
@@ -579,8 +579,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mproject->addAction(cmd, Constants::G_PROJECT_BUILD);
// rebuild action
- d->m_rebuildAction = new Core::Utils::ParameterAction(tr("Rebuild Project"), tr("Rebuild Project \"%1\""),
- Core::Utils::ParameterAction::EnabledWithParameter, this);
+ d->m_rebuildAction = new Utils::ParameterAction(tr("Rebuild Project"), tr("Rebuild Project \"%1\""),
+ Utils::ParameterAction::EnabledWithParameter, this);
cmd = am->registerAction(d->m_rebuildAction, Constants::REBUILD, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText);
cmd->setDefaultText(d->m_rebuildAction->text());
@@ -588,8 +588,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mproject->addAction(cmd, Constants::G_PROJECT_BUILD);
// clean action
- d->m_cleanAction = new Core::Utils::ParameterAction(tr("Clean Project"), tr("Clean Project \"%1\""),
- Core::Utils::ParameterAction::EnabledWithParameter, this);
+ d->m_cleanAction = new Utils::ParameterAction(tr("Clean Project"), tr("Clean Project \"%1\""),
+ Utils::ParameterAction::EnabledWithParameter, this);
cmd = am->registerAction(d->m_cleanAction, Constants::CLEAN, globalcontext);
cmd->setAttribute(Core::Command::CA_UpdateText);
cmd->setDefaultText(d->m_cleanAction->text());
diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h
index 4fe3b3d6f5..6066b9e69d 100644
--- a/src/plugins/projectexplorer/projectexplorer.h
+++ b/src/plugins/projectexplorer/projectexplorer.h
@@ -45,9 +45,10 @@ namespace Core {
class IContext;
class IMode;
class IFileFactory;
- namespace Utils {
- class ParameterAction;
- }
+}
+
+namespace Utils {
+class ParameterAction;
}
namespace ProjectExplorer {
diff --git a/src/plugins/projectexplorer/projectwelcomepagewidget.ui b/src/plugins/projectexplorer/projectwelcomepagewidget.ui
index 38558d441b..cb94d9b53b 100644
--- a/src/plugins/projectexplorer/projectwelcomepagewidget.ui
+++ b/src/plugins/projectexplorer/projectwelcomepagewidget.ui
@@ -39,7 +39,7 @@
<number>3</number>
</property>
<item row="0" column="0" colspan="3">
- <widget class="Core::Utils::WelcomeModeLabel" name="recentSessionsTitleLabel">
+ <widget class="Utils::WelcomeModeLabel" name="recentSessionsTitleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>0</horstretch>
@@ -52,7 +52,7 @@
</widget>
</item>
<item row="1" column="0" colspan="3">
- <widget class="Core::Utils::WelcomeModeTreeWidget" name="sessTreeWidget">
+ <widget class="Utils::WelcomeModeTreeWidget" name="sessTreeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -146,7 +146,7 @@
<number>9</number>
</property>
<item row="0" column="0" colspan="3">
- <widget class="Core::Utils::WelcomeModeLabel" name="projTitleLabel">
+ <widget class="Utils::WelcomeModeLabel" name="projTitleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>0</horstretch>
@@ -159,7 +159,7 @@
</widget>
</item>
<item row="1" column="0" colspan="3">
- <widget class="Core::Utils::WelcomeModeTreeWidget" name="projTreeWidget">
+ <widget class="Utils::WelcomeModeTreeWidget" name="projTreeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -244,12 +244,12 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::WelcomeModeTreeWidget</class>
+ <class>Utils::WelcomeModeTreeWidget</class>
<extends>QTreeWidget</extends>
<header>utils/welcomemodetreewidget.h</header>
</customwidget>
<customwidget>
- <class>Core::Utils::WelcomeModeLabel</class>
+ <class>Utils::WelcomeModeLabel</class>
<extends>QLabel</extends>
<header>utils/welcomemodetreewidget.h</header>
</customwidget>
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index 1ee0522584..a3fe25fdd6 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -653,7 +653,7 @@ public:
void paintEvent(QPaintEvent *e)
{
QPainter p(this);
- p.fillRect(e->rect(), QBrush(StyleHelper::borderColor()));
+ p.fillRect(e->rect(), QBrush(Utils::StyleHelper::borderColor()));
}
};
@@ -704,7 +704,7 @@ ProjectWindow::ProjectWindow(QWidget *parent)
QVBoxLayout *topLevelLayout = new QVBoxLayout(this);
topLevelLayout->setMargin(0);
topLevelLayout->setSpacing(0);
- topLevelLayout->addWidget(new Core::Utils::StyledBar(this));
+ topLevelLayout->addWidget(new Utils::StyledBar(this));
topLevelLayout->addWidget(m_panelsWidget);
diff --git a/src/plugins/projectexplorer/winguiprocess.h b/src/plugins/projectexplorer/winguiprocess.h
index c74f4f389c..460651ff12 100644
--- a/src/plugins/projectexplorer/winguiprocess.h
+++ b/src/plugins/projectexplorer/winguiprocess.h
@@ -37,7 +37,7 @@
#include <windows.h>
-using namespace Core::Utils;
+using namespace Utils;
namespace ProjectExplorer {
namespace Internal {
diff --git a/src/plugins/qmleditor/qmleditor.cpp b/src/plugins/qmleditor/qmleditor.cpp
index fd627aea22..76d44b6777 100644
--- a/src/plugins/qmleditor/qmleditor.cpp
+++ b/src/plugins/qmleditor/qmleditor.cpp
@@ -768,7 +768,7 @@ void ScriptEditor::contextMenuEvent(QContextMenuEvent *e)
void ScriptEditor::unCommentSelection()
{
- Core::Utils::unCommentSelection(this);
+ Utils::unCommentSelection(this);
}
} // namespace Internal
diff --git a/src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp b/src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
index febfb21521..1cb7347093 100644
--- a/src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
+++ b/src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
@@ -47,7 +47,7 @@
#include <QtGui/QTreeView>
using namespace QmlProjectManager::Internal;
-using namespace Core::Utils;
+using namespace Utils;
namespace {
@@ -124,7 +124,7 @@ QmlNewProjectWizardDialog::QmlNewProjectWizardDialog(QWidget *parent)
{
setWindowTitle(tr("New QML Project"));
- m_introPage = new Core::Utils::ProjectIntroPage();
+ m_introPage = new Utils::ProjectIntroPage();
m_introPage->setDescription(tr("This wizard generates a QML application project."));
addPage(m_introPage);
diff --git a/src/plugins/qmlprojectmanager/qmlnewprojectwizard.h b/src/plugins/qmlprojectmanager/qmlnewprojectwizard.h
index acc8db618d..52acd2cf9d 100644
--- a/src/plugins/qmlprojectmanager/qmlnewprojectwizard.h
+++ b/src/plugins/qmlprojectmanager/qmlnewprojectwizard.h
@@ -43,14 +43,13 @@ class QStringList;
class QTreeView;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
class FileWizardPage;
class ProjectIntroPage;
} // namespace Utils
-} // namespace Core
+
namespace QmlProjectManager {
namespace Internal {
@@ -79,7 +78,7 @@ protected:
private:
int m_secondPageId;
- Core::Utils::ProjectIntroPage *m_introPage;
+ Utils::ProjectIntroPage *m_introPage;
QTreeView *m_dirView;
QDirModel *m_dirModel;
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index e68e8d9730..3eba42cdcd 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -338,7 +338,7 @@ QmlRunConfiguration::QmlRunConfiguration(QmlProject *pro)
{
setName(tr("QML Viewer"));
- m_qmlViewer = Core::Utils::SynchronousProcess::locateBinary(QLatin1String("qmlviewer"));
+ m_qmlViewer = Utils::SynchronousProcess::locateBinary(QLatin1String("qmlviewer"));
}
QmlRunConfiguration::~QmlRunConfiguration()
@@ -428,8 +428,8 @@ QWidget *QmlRunConfiguration::configurationWidget()
connect(combo, SIGNAL(activated(QString)), this, SLOT(setMainScript(QString)));
- Core::Utils::PathChooser *qmlViewer = new Core::Utils::PathChooser;
- qmlViewer->setExpectedKind(Core::Utils::PathChooser::Command);
+ Utils::PathChooser *qmlViewer = new Utils::PathChooser;
+ qmlViewer->setExpectedKind(Utils::PathChooser::Command);
qmlViewer->setPath(executable());
connect(qmlViewer, SIGNAL(changed(QString)), this, SLOT(onQmlViewerChanged()));
@@ -463,7 +463,7 @@ void QmlRunConfiguration::setMainScript(const QString &scriptFile)
void QmlRunConfiguration::onQmlViewerChanged()
{
- if (Core::Utils::PathChooser *chooser = qobject_cast<Core::Utils::PathChooser *>(sender())) {
+ if (Utils::PathChooser *chooser = qobject_cast<Utils::PathChooser *>(sender())) {
m_qmlViewer = chooser->path();
}
}
@@ -492,7 +492,7 @@ void QmlRunConfiguration::restore(const ProjectExplorer::PersistentSettingsReade
m_scriptFile = reader.restoreValue(QLatin1String("mainscript")).toString();
if (m_qmlViewer.isEmpty())
- m_qmlViewer = Core::Utils::SynchronousProcess::locateBinary(QLatin1String("qmlviewer"));
+ m_qmlViewer = Utils::SynchronousProcess::locateBinary(QLatin1String("qmlviewer"));
if (m_scriptFile.isEmpty())
m_scriptFile = tr("<Current File>");
diff --git a/src/plugins/qmlprojectmanager/qmlprojectwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
index e7d50aa9d6..c797e461cf 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
@@ -46,7 +46,7 @@
#include <QtGui/QTreeView>
using namespace QmlProjectManager::Internal;
-using namespace Core::Utils;
+using namespace Utils;
namespace {
diff --git a/src/plugins/qmlprojectmanager/qmlprojectwizard.h b/src/plugins/qmlprojectmanager/qmlprojectwizard.h
index 1715ccdeb0..9f46c6b4a3 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectwizard.h
+++ b/src/plugins/qmlprojectmanager/qmlprojectwizard.h
@@ -44,13 +44,9 @@ class QStringList;
class QTreeView;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
-
class FileWizardPage;
-
} // namespace Utils
-} // namespace Core
namespace QmlProjectManager {
namespace Internal {
@@ -79,7 +75,7 @@ protected:
private:
int m_secondPageId;
- Core::Utils::FileWizardPage *m_firstPage;
+ Utils::FileWizardPage *m_firstPage;
QTreeView *m_dirView;
QDirModel *m_dirModel;
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.cpp
index 98b4f13f80..df5c911699 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.cpp
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.cpp
@@ -40,7 +40,7 @@ ClassDefinition::ClassDefinition(QWidget *parent) :
m_domXmlChanged(false)
{
setupUi(this);
- iconPathChooser->setExpectedKind(Core::Utils::PathChooser::File);
+ iconPathChooser->setExpectedKind(Utils::PathChooser::File);
iconPathChooser->setPromptDialogTitle(tr("Select Icon"));
iconPathChooser->setPromptDialogFilter(tr("Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg)"));
}
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.ui b/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.ui
index 21fc000415..d705685a2d 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.ui
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/classdefinition.ui
@@ -158,7 +158,7 @@
</widget>
</item>
<item row="9" column="1">
- <widget class="Core::Utils::PathChooser" name="iconPathChooser"/>
+ <widget class="Utils::PathChooser" name="iconPathChooser"/>
</item>
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout">
@@ -296,7 +296,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
</customwidget>
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp
index bf621b9f15..8020bdfcf8 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.cpp
@@ -51,7 +51,7 @@ QWizard *CustomWidgetWizard::createWizardDialog(QWidget *parent,
const WizardPageList &extensionPages) const
{
CustomWidgetWizardDialog *rc = new CustomWidgetWizardDialog(name(), icon(), extensionPages, parent);
- rc->setPath(defaultPath.isEmpty() ? Core::Utils::PathChooser::homePath() : defaultPath);
+ rc->setPath(defaultPath.isEmpty() ? Utils::PathChooser::homePath() : defaultPath);
rc->setFileNamingParameters(FileNamingParameters(headerSuffix(), sourceSuffix(), QtWizard::lowerCaseFiles()));
return rc;
}
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp
index 9ff8933083..b0f2c5a362 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp
@@ -44,7 +44,7 @@ CustomWidgetWizardDialog::CustomWidgetWizardDialog(const QString &templateName,
const QList<QWizardPage*> &extensionPages,
QWidget *parent) :
QWizard(parent),
- m_introPage(new Core::Utils::ProjectIntroPage),
+ m_introPage(new Utils::ProjectIntroPage),
m_widgetsPage(new CustomWidgetWidgetsWizardPage),
m_pluginPage(new CustomWidgetPluginWizardPage)
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.h b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.h
index e3fc976a1f..c4c3505770 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.h
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.h
@@ -35,10 +35,8 @@
#include <QtGui/QWizard>
#include <QtGui/QWizardPage>
-namespace Core {
- namespace Utils {
- class ProjectIntroPage;
- }
+namespace Utils {
+ class ProjectIntroPage;
}
namespace Qt4ProjectManager {
@@ -73,7 +71,7 @@ private slots:
void slotCurrentIdChanged (int id);
private:
- Core::Utils::ProjectIntroPage *m_introPage;
+ Utils::ProjectIntroPage *m_introPage;
CustomWidgetWidgetsWizardPage *m_widgetsPage;
CustomWidgetPluginWizardPage *m_pluginPage;
};
diff --git a/src/plugins/qt4projectmanager/externaleditors.cpp b/src/plugins/qt4projectmanager/externaleditors.cpp
index 68ab239079..142bef7f50 100644
--- a/src/plugins/qt4projectmanager/externaleditors.cpp
+++ b/src/plugins/qt4projectmanager/externaleditors.cpp
@@ -104,7 +104,7 @@ bool ExternalQtEditor::getEditorLaunchData(const QString &fileName,
data->workingDirectory = QFileInfo(project->file()->fileName()).absolutePath();
} else {
data->workingDirectory.clear();
- data->binary = Core::Utils::SynchronousProcess::locateBinary(fallbackBinary);
+ data->binary = Utils::SynchronousProcess::locateBinary(fallbackBinary);
}
if (data->binary.isEmpty()) {
*errorMessage = msgAppNotFound(kind());
diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui
index e4dc34ba35..13238718fd 100644
--- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui
+++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui
@@ -33,7 +33,7 @@
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
- <widget class="Core::Utils::WelcomeModeLabel" name="tutorialsTitleLabel">
+ <widget class="Utils::WelcomeModeLabel" name="tutorialsTitleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@@ -46,7 +46,7 @@
</widget>
</item>
<item row="1" column="0">
- <widget class="Core::Utils::WelcomeModeTreeWidget" name="tutorialTreeWidget">
+ <widget class="Utils::WelcomeModeTreeWidget" name="tutorialTreeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -126,7 +126,7 @@
<number>0</number>
</property>
<item row="0" column="0" colspan="4">
- <widget class="Core::Utils::WelcomeModeLabel" name="demoTitleLabel">
+ <widget class="Utils::WelcomeModeLabel" name="demoTitleLabel">
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
@@ -207,7 +207,7 @@
<number>9</number>
</property>
<item row="0" column="0">
- <widget class="Core::Utils::WelcomeModeLabel" name="didYouKnowTitleLabel">
+ <widget class="Utils::WelcomeModeLabel" name="didYouKnowTitleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>0</horstretch>
@@ -331,12 +331,12 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::WelcomeModeTreeWidget</class>
+ <class>Utils::WelcomeModeTreeWidget</class>
<extends>QTreeWidget</extends>
<header>utils/welcomemodetreewidget.h</header>
</customwidget>
<customwidget>
- <class>Core::Utils::WelcomeModeLabel</class>
+ <class>Utils::WelcomeModeLabel</class>
<extends>QLabel</extends>
<header>utils/welcomemodetreewidget.h</header>
</customwidget>
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
index 757bde525f..ef43573482 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
@@ -355,12 +355,12 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(S60DeviceRunCon
QFormLayout *customLayout = new QFormLayout();
customLayout->setMargin(0);
customLayout->setLabelAlignment(Qt::AlignRight);
- Core::Utils::PathChooser *signaturePath = new Core::Utils::PathChooser();
- signaturePath->setExpectedKind(Core::Utils::PathChooser::File);
+ Utils::PathChooser *signaturePath = new Utils::PathChooser();
+ signaturePath->setExpectedKind(Utils::PathChooser::File);
signaturePath->setPromptDialogTitle(tr("Choose certificate file (.cer)"));
customLayout->addRow(new QLabel(tr("Custom certificate:")), signaturePath);
- Core::Utils::PathChooser *keyPath = new Core::Utils::PathChooser();
- keyPath->setExpectedKind(Core::Utils::PathChooser::File);
+ Utils::PathChooser *keyPath = new Utils::PathChooser();
+ keyPath->setExpectedKind(Utils::PathChooser::File);
keyPath->setPromptDialogTitle(tr("Choose key file (.key / .pem)"));
customLayout->addRow(new QLabel(tr("Key file:")), keyPath);
customHBox->addLayout(customLayout);
@@ -628,6 +628,7 @@ void S60DeviceRunControlBase::signsisProcessFinished()
connect(m_launcher, SIGNAL(finished()), this, SLOT(launcherFinished()));
connect(m_launcher, SIGNAL(copyingStarted()), this, SLOT(printCopyingNotice()));
connect(m_launcher, SIGNAL(canNotCreateFile(QString,QString)), this, SLOT(printCreateFileFailed(QString,QString)));
+ connect(m_launcher, SIGNAL(canNotWriteFile(QString,QString)), this, SLOT(printWriteFileFailed(QString,QString)));
connect(m_launcher, SIGNAL(installingStarted()), this, SLOT(printInstallingNotice()));
connect(m_launcher, SIGNAL(copyProgress(int)), this, SLOT(printCopyProgress(int)));
@@ -655,10 +656,14 @@ void S60DeviceRunControlBase::printCreateFileFailed(const QString &filename, con
emit addToOutputWindow(this, tr("Could not create file %1 on device: %2").arg(filename, errorMessage));
}
+void S60DeviceRunControlBase::printWriteFileFailed(const QString &filename, const QString &errorMessage)
+{
+ emit addToOutputWindow(this, tr("Could not write to file %1 on device: %2").arg(filename, errorMessage));
+}
+
void S60DeviceRunControlBase::printCopyingNotice()
{
emit addToOutputWindow(this, tr("Copying install file..."));
- emit addToOutputWindow(this, tr("0% copied."));
}
void S60DeviceRunControlBase::printCopyProgress(int progress)
@@ -695,6 +700,11 @@ void S60DeviceRunControlBase::processFailed(const QString &program, QProcess::Pr
emit finished();
}
+void S60DeviceRunControlBase::printApplicationOutput(const QString &output)
+{
+ emit addToOutputWindowInline(this, output);
+}
+
// =============== S60DeviceRunControl
S60DeviceRunControl::S60DeviceRunControl(const QSharedPointer<ProjectExplorer::RunConfiguration> &runConfiguration) :
S60DeviceRunControlBase(runConfiguration)
@@ -730,11 +740,6 @@ void S60DeviceRunControl::printRunFailNotice(const QString &errorMessage) {
emit addToOutputWindow(this, tr("Could not start application: %1").arg(errorMessage));
}
-void S60DeviceRunControl::printApplicationOutput(const QString &output)
-{
- emit addToOutputWindowInline(this, output);
-}
-
// ======== S60DeviceDebugRunControl
S60DeviceDebugRunControl::S60DeviceDebugRunControl(const QSharedPointer<ProjectExplorer::RunConfiguration> &runConfiguration) :
@@ -748,7 +753,7 @@ S60DeviceDebugRunControl::S60DeviceDebugRunControl(const QSharedPointer<ProjectE
connect(dm, SIGNAL(debuggingFinished()),
this, SLOT(debuggingFinished()), Qt::QueuedConnection);
connect(dm, SIGNAL(applicationOutputAvailable(QString)),
- this, SLOT(slotAddToOutputWindow(QString)),
+ this, SLOT(printApplicationOutput(QString)),
Qt::QueuedConnection);
m_startParams->remoteChannel = rc->serialPortName();
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
index c4c3d5496b..fd67e5431c 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
@@ -160,6 +160,9 @@ protected:
virtual void handleLauncherFinished() = 0;
void processFailed(const QString &program, QProcess::ProcessError errorCode);
+protected slots:
+ void printApplicationOutput(const QString &output);
+
private slots:
void readStandardError();
void readStandardOutput();
@@ -169,6 +172,7 @@ private slots:
void signsisProcessFinished();
void printCopyingNotice();
void printCreateFileFailed(const QString &filename, const QString &errorMessage);
+ void printWriteFileFailed(const QString &filename, const QString &errorMessage);
void printCopyProgress(int progress);
void printInstallingNotice();
void launcherFinished();
@@ -208,7 +212,6 @@ private slots:
void printStartingNotice();
void printRunNotice(uint pid);
void printRunFailNotice(const QString &errorMessage);
- void printApplicationOutput(const QString &output);
private:
};
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index 660d46961d..9d213e2cf2 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -1236,7 +1236,7 @@ void Qt4ProFileNode::updateCodeModelSupportFromBuild(const QStringList &files)
}
}
-void Qt4ProFileNode::updateCodeModelSupportFromEditor(const QString &uiFileName, Designer::Internal::FormWindowEditor *fw)
+void Qt4ProFileNode::updateCodeModelSupportFromEditor(const QString &uiFileName, Designer::FormWindowEditor *fw)
{
QMap<QString, Qt4UiCodeModelSupport *>::const_iterator it;
it = m_uiCodeModelSupport.constFind(uiFileName);
diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h
index ecc32cddc3..58ecafe5eb 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.h
+++ b/src/plugins/qt4projectmanager/qt4nodes.h
@@ -53,10 +53,8 @@ class FileWatcher;
}
namespace Designer {
-namespace Internal {
class FormWindowEditor;
}
-}
namespace Qt4ProjectManager {
@@ -197,7 +195,7 @@ public:
QStringList variableValue(const Qt4Variable var) const;
void updateCodeModelSupportFromBuild(const QStringList &files);
- void updateCodeModelSupportFromEditor(const QString &uiFileName, Designer::Internal::FormWindowEditor *fw);
+ void updateCodeModelSupportFromEditor(const QString &uiFileName, Designer::FormWindowEditor *fw);
public slots:
void scheduleUpdate();
void update();
diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
index 25e66aa189..b2ae002371 100644
--- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
@@ -69,7 +69,7 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
// TODO refix the layout
m_ui->shadowBuildDirEdit->setPromptDialogTitle(tr("Shadow Build Directory"));
- m_ui->shadowBuildDirEdit->setExpectedKind(Core::Utils::PathChooser::Directory);
+ m_ui->shadowBuildDirEdit->setExpectedKind(Utils::PathChooser::Directory);
m_ui->invalidQtWarningLabel->setVisible(false);
connect(m_ui->nameLineEdit, SIGNAL(textEdited(QString)),
diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.ui b/src/plugins/qt4projectmanager/qt4projectconfigwidget.ui
index 48501e8ec9..0beb5258e6 100644
--- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.ui
+++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.ui
@@ -99,7 +99,7 @@
</widget>
</item>
<item row="7" column="1">
- <widget class="Core::Utils::PathChooser" name="shadowBuildDirEdit" native="true">
+ <widget class="Utils::PathChooser" name="shadowBuildDirEdit" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -139,7 +139,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp
index 04d32a826b..7290b523ec 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp
@@ -124,7 +124,7 @@ void Qt4Manager::init()
void Qt4Manager::editorChanged(Core::IEditor *editor)
{
// Handle old editor
- Designer::Internal::FormWindowEditor *lastEditor = qobject_cast<Designer::Internal::FormWindowEditor *>(m_lastEditor);
+ Designer::FormWindowEditor *lastEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor);
if (lastEditor) {
disconnect(lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
@@ -138,7 +138,7 @@ void Qt4Manager::editorChanged(Core::IEditor *editor)
m_lastEditor = editor;
// Handle new editor
- if (Designer::Internal::FormWindowEditor *fw = qobject_cast<Designer::Internal::FormWindowEditor *>(editor))
+ if (Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(editor))
connect(fw, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
}
@@ -147,7 +147,7 @@ void Qt4Manager::editorAboutToClose(Core::IEditor *editor)
if (m_lastEditor == editor) {
// Oh no our editor is going to be closed
// get the content first
- Designer::Internal::FormWindowEditor *lastEditor = qobject_cast<Designer::Internal::FormWindowEditor *>(m_lastEditor);
+ Designer::FormWindowEditor *lastEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor);
if (lastEditor) {
disconnect(lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (m_dirty) {
@@ -165,7 +165,7 @@ void Qt4Manager::uiEditorContentsChanged()
// cast sender, get filename
if (m_dirty)
return;
- Designer::Internal::FormWindowEditor *fw = qobject_cast<Designer::Internal::FormWindowEditor *>(sender());
+ Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(sender());
if (!fw)
return;
m_dirty = true;
diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
index f6ee0a72e4..2c4083ad46 100644
--- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp
@@ -138,9 +138,9 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
m_executableLabel = new QLabel(m_qt4RunConfiguration->executable());
toplayout->addRow(tr("Executable:"), m_executableLabel);
- m_workingDirectoryEdit = new Core::Utils::PathChooser();
+ m_workingDirectoryEdit = new Utils::PathChooser();
m_workingDirectoryEdit->setPath(m_qt4RunConfiguration->workingDirectory());
- m_workingDirectoryEdit->setExpectedKind(Core::Utils::PathChooser::Directory);
+ m_workingDirectoryEdit->setExpectedKind(Utils::PathChooser::Directory);
m_workingDirectoryEdit->setPromptDialogTitle(tr("Select the working directory"));
QToolButton *resetButton = new QToolButton();
diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt4runconfiguration.h
index 2584fa2853..69fa0d6575 100644
--- a/src/plugins/qt4projectmanager/qt4runconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt4runconfiguration.h
@@ -174,7 +174,7 @@ private:
Qt4RunConfiguration *m_qt4RunConfiguration;
bool m_ignoreChange;
QLabel *m_executableLabel;
- Core::Utils::PathChooser *m_workingDirectoryEdit;
+ Utils::PathChooser *m_workingDirectoryEdit;
QLineEdit *m_nameLineEdit;
QLineEdit *m_argumentsLineEdit;
QCheckBox *m_useTerminalCheck;
diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp
index ce7bd1aef9..60eef5de89 100644
--- a/src/plugins/qt4projectmanager/qtoptionspage.cpp
+++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp
@@ -116,17 +116,17 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
m_versions.push_back(QSharedPointerQtVersion(new QtVersion(*version)));
m_ui->setupUi(this);
- m_ui->qmakePath->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui->qmakePath->setExpectedKind(Utils::PathChooser::File);
m_ui->qmakePath->setPromptDialogTitle(tr("Select QMake Executable"));
- m_ui->mingwPath->setExpectedKind(Core::Utils::PathChooser::Directory);
+ m_ui->mingwPath->setExpectedKind(Utils::PathChooser::Directory);
m_ui->mingwPath->setPromptDialogTitle(tr("Select the MinGW Directory"));
- m_ui->mwcPath->setExpectedKind(Core::Utils::PathChooser::Directory);
+ m_ui->mwcPath->setExpectedKind(Utils::PathChooser::Directory);
m_ui->mwcPath->setPromptDialogTitle(tr("Select \"x86build\" Directory from Carbide Install"));
m_ui->addButton->setIcon(QIcon(Core::Constants::ICON_PLUS));
m_ui->delButton->setIcon(QIcon(Core::Constants::ICON_MINUS));
- new Core::Utils::TreeWidgetColumnStretcher(m_ui->qtdirList, 1);
+ new Utils::TreeWidgetColumnStretcher(m_ui->qtdirList, 1);
// setup parent items for auto-detected and manual versions
m_ui->qtdirList->header()->setResizeMode(QHeaderView::ResizeToContents);
diff --git a/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp b/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
index 8d078f60c6..62a0f17553 100644
--- a/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
+++ b/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
@@ -109,7 +109,7 @@ bool Qt4UiCodeModelSupport::runUic(const QString &ui) const
return false;
}
-void Qt4UiCodeModelSupport::updateFromEditor(Designer::Internal::FormWindowEditor *fw)
+void Qt4UiCodeModelSupport::updateFromEditor(Designer::FormWindowEditor *fw)
{
// qDebug()<<"Qt4UiCodeModelSupport::updateFromEditor"<<fw;
if (runUic(fw->contents())) {
diff --git a/src/plugins/qt4projectmanager/qtuicodemodelsupport.h b/src/plugins/qt4projectmanager/qtuicodemodelsupport.h
index 748a1288d2..d7b46518d4 100644
--- a/src/plugins/qt4projectmanager/qtuicodemodelsupport.h
+++ b/src/plugins/qt4projectmanager/qtuicodemodelsupport.h
@@ -35,10 +35,8 @@
#include <QtCore/QDateTime>
namespace Designer {
-namespace Internal {
class FormWindowEditor;
}
-}
namespace Qt4ProjectManager {
class Qt4Project;
@@ -56,7 +54,7 @@ public:
void setSourceName(const QString &name);
virtual QByteArray contents() const;
virtual QString fileName() const;
- void updateFromEditor(Designer::Internal::FormWindowEditor *);
+ void updateFromEditor(Designer::FormWindowEditor *);
void updateFromBuild();
private:
void init();
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.ui b/src/plugins/qt4projectmanager/qtversionmanager.ui
index ed7aedf3b8..9905b2fe09 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.ui
+++ b/src/plugins/qt4projectmanager/qtversionmanager.ui
@@ -174,7 +174,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="2" column="1">
- <widget class="Core::Utils::PathChooser" name="qmakePath" native="true"/>
+ <widget class="Utils::PathChooser" name="qmakePath" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mingwLabel">
@@ -184,7 +184,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="3" column="1">
- <widget class="Core::Utils::PathChooser" name="mingwPath" native="true"/>
+ <widget class="Utils::PathChooser" name="mingwPath" native="true"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="msvcLabel">
@@ -215,7 +215,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="5" column="1">
- <widget class="Core::Utils::PathChooser" name="mwcPath" native="true"/>
+ <widget class="Utils::PathChooser" name="mwcPath" native="true"/>
</item>
</layout>
</widget>
@@ -245,7 +245,7 @@ p, li { white-space: pre-wrap; }
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
index cb178258e0..438ac44152 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizard.cpp
@@ -67,7 +67,7 @@ QWizard *ConsoleAppWizard::createWizardDialog(QWidget *parent,
const WizardPageList &extensionPages) const
{
ConsoleAppWizardDialog *dialog = new ConsoleAppWizardDialog(name(), icon(), extensionPages, parent);
- dialog->setPath(defaultPath.isEmpty() ? Core::Utils::PathChooser::homePath() : defaultPath);
+ dialog->setPath(defaultPath.isEmpty() ? Utils::PathChooser::homePath() : defaultPath);
return dialog;
}
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
index 1d81b174d7..b3214e400a 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
@@ -42,7 +42,7 @@ ConsoleAppWizardDialog::ConsoleAppWizardDialog(const QString &templateName,
const QList<QWizardPage*> &extensionPages,
QWidget *parent) :
QWizard(parent),
- m_introPage(new Core::Utils::ProjectIntroPage),
+ m_introPage(new Utils::ProjectIntroPage),
m_modulesPage(new ModulesPage)
{
setWindowIcon(icon);
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h
index cceefb4e61..41aa2f3dfd 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.h
@@ -32,10 +32,8 @@
#include <QtGui/QWizard>
-namespace Core {
- namespace Utils {
- class ProjectIntroPage;
- }
+namespace Utils {
+ class ProjectIntroPage;
}
namespace Qt4ProjectManager {
@@ -61,7 +59,7 @@ public slots:
void setName(const QString &name);
private:
- Core::Utils::ProjectIntroPage *m_introPage;
+ Utils::ProjectIntroPage *m_introPage;
ModulesPage *m_modulesPage;
};
diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp b/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
index 7674be5f13..ad8e07aa33 100644
--- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizard.cpp
@@ -48,7 +48,7 @@ QWizard *EmptyProjectWizard::createWizardDialog(QWidget *parent,
const WizardPageList &extensionPages) const
{
EmptyProjectWizardDialog *dialog = new EmptyProjectWizardDialog(name(), icon(), extensionPages, parent);
- dialog->setPath(defaultPath.isEmpty() ? Core::Utils::PathChooser::homePath() : defaultPath);
+ dialog->setPath(defaultPath.isEmpty() ? Utils::PathChooser::homePath() : defaultPath);
return dialog;
}
diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
index f72af6b58e..4953ecf3bd 100644
--- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
@@ -41,7 +41,7 @@ EmptyProjectWizardDialog::EmptyProjectWizardDialog(const QString &templateName,
const QList<QWizardPage*> &extensionPages,
QWidget *parent) :
QWizard(parent),
- m_introPage(new Core::Utils::ProjectIntroPage)
+ m_introPage(new Utils::ProjectIntroPage)
{
setWindowIcon(icon);
setWindowTitle(templateName);
diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h
index 0dc27d4512..adc9571eec 100644
--- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h
+++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.h
@@ -32,10 +32,8 @@
#include <QtGui/QWizard>
-namespace Core {
- namespace Utils {
- class ProjectIntroPage;
- }
+namespace Utils {
+ class ProjectIntroPage;
}
namespace Qt4ProjectManager {
@@ -60,7 +58,7 @@ public slots:
void setName(const QString &name);
private:
- Core::Utils::ProjectIntroPage *m_introPage;
+ Utils::ProjectIntroPage *m_introPage;
};
} // namespace Internal
diff --git a/src/plugins/qt4projectmanager/wizards/filespage.cpp b/src/plugins/qt4projectmanager/wizards/filespage.cpp
index e2d6bbffbd..6346a409a6 100644
--- a/src/plugins/qt4projectmanager/wizards/filespage.cpp
+++ b/src/plugins/qt4projectmanager/wizards/filespage.cpp
@@ -39,7 +39,7 @@ namespace Internal {
FilesPage::FilesPage(QWidget *parent) :
QWizardPage(parent),
- m_newClassWidget(new Core::Utils::NewClassWidget)
+ m_newClassWidget(new Utils::NewClassWidget)
{
m_newClassWidget->setPathInputVisible(false);
setTitle(tr("Class Information"));
diff --git a/src/plugins/qt4projectmanager/wizards/filespage.h b/src/plugins/qt4projectmanager/wizards/filespage.h
index 9446170a1c..f20e6ce8ab 100644
--- a/src/plugins/qt4projectmanager/wizards/filespage.h
+++ b/src/plugins/qt4projectmanager/wizards/filespage.h
@@ -36,11 +36,9 @@ QT_BEGIN_NAMESPACE
class QLabel;
QT_END_NAMESPACE
-namespace Core {
namespace Utils {
class NewClassWidget;
} // namespace Utils
-} // namespace Core
namespace Qt4ProjectManager {
namespace Internal {
@@ -83,7 +81,7 @@ public slots:
void setLowerCaseFiles(bool l);
private:
- Core::Utils::NewClassWidget *m_newClassWidget;
+ Utils::NewClassWidget *m_newClassWidget;
QLabel *m_errorLabel;
};
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
index 059387b462..2c4a7d2c86 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
@@ -84,7 +84,7 @@ QWizard *GuiAppWizard::createWizardDialog(QWidget *parent,
const WizardPageList &extensionPages) const
{
GuiAppWizardDialog *dialog = new GuiAppWizardDialog(name(), icon(), extensionPages, parent);
- dialog->setPath(defaultPath.isEmpty() ? Core::Utils::PathChooser::homePath() : defaultPath);
+ dialog->setPath(defaultPath.isEmpty() ? Utils::PathChooser::homePath() : defaultPath);
// Order! suffixes first to generate files correctly
dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles());
dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix());
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
index 833c2935f2..1ba1edf7da 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
@@ -52,7 +52,7 @@ GuiAppWizardDialog::GuiAppWizardDialog(const QString &templateName,
const QList<QWizardPage*> &extensionPages,
QWidget *parent) :
QWizard(parent),
- m_introPage(new Core::Utils::ProjectIntroPage),
+ m_introPage(new Utils::ProjectIntroPage),
m_modulesPage(new ModulesPage),
m_filesPage(new FilesPage)
{
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h
index a20f36a216..ee6d327cf5 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.h
@@ -32,13 +32,9 @@
#include <QtGui/QWizard>
-namespace Core {
namespace Utils {
-
-class ProjectIntroPage;
-
-} // namespace Utils
-} // namespace Core
+ class ProjectIntroPage;
+}
namespace Qt4ProjectManager {
namespace Internal {
@@ -81,7 +77,7 @@ public slots:
void setName(const QString &name);
private:
- Core::Utils::ProjectIntroPage *m_introPage;
+ Utils::ProjectIntroPage *m_introPage;
ModulesPage *m_modulesPage;
FilesPage *m_filesPage;
};
diff --git a/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp b/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp
index 4df6d7e3ac..a8e9c53bff 100644
--- a/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp
+++ b/src/plugins/qt4projectmanager/wizards/libraryparameters.cpp
@@ -71,12 +71,12 @@ void LibraryParameters::generateCode(QtProjectParameters:: Type t,
const QString indent = QString(indentation, QLatin1Char(' '));
// 1) Header
- const QString guard = Core::Utils::headerGuard(headerFileName);
+ const QString guard = Utils::headerGuard(headerFileName);
headerStr << "#ifndef " << guard
<< "\n#define " << guard << '\n' << '\n';
if (!sharedHeader.isEmpty())
- Core::Utils::writeIncludeFileDirective(sharedHeader, false, headerStr);
+ Utils::writeIncludeFileDirective(sharedHeader, false, headerStr);
// include base class header
if (!baseClassName.isEmpty()) {
@@ -86,7 +86,7 @@ void LibraryParameters::generateCode(QtProjectParameters:: Type t,
include += QLatin1Char('/');
}
include += baseClassName;
- Core::Utils::writeIncludeFileDirective(include, true, headerStr);
+ Utils::writeIncludeFileDirective(include, true, headerStr);
headerStr << '\n';
}
@@ -98,7 +98,7 @@ void LibraryParameters::generateCode(QtProjectParameters:: Type t,
const QString unqualifiedClassName = namespaceList.back();
namespaceList.pop_back();
- const QString namespaceIndent = Core::Utils::writeOpeningNameSpaces(namespaceList, indent, headerStr);
+ const QString namespaceIndent = Utils::writeOpeningNameSpaces(namespaceList, indent, headerStr);
// Class declaraction
headerStr << '\n' << namespaceIndent << "class ";
@@ -122,15 +122,15 @@ void LibraryParameters::generateCode(QtProjectParameters:: Type t,
headerStr << namespaceIndent << indent << unqualifiedClassName << "();\n";
}
headerStr << namespaceIndent << "};\n\n";
- Core::Utils::writeClosingNameSpaces(namespaceList, indent, headerStr);
+ Utils::writeClosingNameSpaces(namespaceList, indent, headerStr);
headerStr << "#endif // "<< guard << '\n';
/// 2) Source
QTextStream sourceStr(source);
- Core::Utils::writeIncludeFileDirective(headerName, false, sourceStr);
+ Utils::writeIncludeFileDirective(headerName, false, sourceStr);
sourceStr << '\n';
- Core::Utils::writeOpeningNameSpaces(namespaceList, indent, sourceStr);
+ Utils::writeOpeningNameSpaces(namespaceList, indent, sourceStr);
// Constructor
sourceStr << '\n' << namespaceIndent << unqualifiedClassName << "::" << unqualifiedClassName;
if (inheritsQObject) {
@@ -141,7 +141,7 @@ void LibraryParameters::generateCode(QtProjectParameters:: Type t,
}
sourceStr << namespaceIndent << "{\n" << namespaceIndent << "}\n";
- Core::Utils::writeClosingNameSpaces(namespaceList, indent, sourceStr);
+ Utils::writeClosingNameSpaces(namespaceList, indent, sourceStr);
if (t == QtProjectParameters::Qt4Plugin)
sourceStr << '\n' << "Q_EXPORT_PLUGIN2(" << projectTarget << ", " << className << ")\n";
@@ -152,7 +152,7 @@ QString LibraryParameters::generateSharedHeader(const QString &globalHeaderFile
const QString &exportMacro)
{
QString contents = QLatin1String(globalHeaderContentsC);
- contents.replace(QLatin1String(GUARD_VARIABLE), Core::Utils::headerGuard(globalHeaderFileName));
+ contents.replace(QLatin1String(GUARD_VARIABLE), Utils::headerGuard(globalHeaderFileName));
contents.replace(QLatin1String(EXPORT_MACRO_VARIABLE), exportMacro);
contents.replace(QLatin1String(LIBRARY_MACRO_VARIABLE), QtProjectParameters::libraryMacro(projectTarget));
return contents;
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
index aa82b1bfe1..9247d26b3c 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
@@ -60,7 +60,7 @@ QWizard *LibraryWizard::createWizardDialog(QWidget *parent,
{
LibraryWizardDialog *dialog = new LibraryWizardDialog(name(), icon(), extensionPages, parent);
dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles());
- dialog->setPath(defaultPath.isEmpty() ? Core::Utils::PathChooser::homePath() : defaultPath);
+ dialog->setPath(defaultPath.isEmpty() ? Utils::PathChooser::homePath() : defaultPath);
dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix());
return dialog;
}
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
index 98bf5f010e..4515954d51 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
@@ -100,7 +100,7 @@ static QString pluginDependencies(const PluginBaseClasses *plb)
}
// A Project intro page with an additional type chooser.
-class LibraryIntroPage : public Core::Utils::ProjectIntroPage
+class LibraryIntroPage : public Utils::ProjectIntroPage
{
Q_DISABLE_COPY(LibraryIntroPage)
public:
@@ -115,7 +115,7 @@ private:
};
LibraryIntroPage::LibraryIntroPage(QWidget *parent) :
- Core::Utils::ProjectIntroPage(parent),
+ Utils::ProjectIntroPage(parent),
m_typeCombo(new QComboBox)
{
m_typeCombo->setEditable(false);
diff --git a/src/plugins/quickopen/quickopentoolwindow.cpp b/src/plugins/quickopen/quickopentoolwindow.cpp
index 3462f1817e..d5ca7ec735 100644
--- a/src/plugins/quickopen/quickopentoolwindow.cpp
+++ b/src/plugins/quickopen/quickopentoolwindow.cpp
@@ -253,7 +253,7 @@ QuickOpenToolWindow::QuickOpenToolWindow(QuickOpenPlugin *qop) :
m_filterMenu(new QMenu(this)),
m_refreshAction(new QAction(tr("Refresh"), this)),
m_configureAction(new QAction(tr("Configure..."), this)),
- m_fileLineEdit(new Core::Utils::FancyLineEdit)
+ m_fileLineEdit(new Utils::FancyLineEdit)
{
// Explicitly hide the completion list popup.
m_completionList->hide();
diff --git a/src/plugins/quickopen/quickopentoolwindow.h b/src/plugins/quickopen/quickopentoolwindow.h
index 6d0c9305e4..2509b17544 100644
--- a/src/plugins/quickopen/quickopentoolwindow.h
+++ b/src/plugins/quickopen/quickopentoolwindow.h
@@ -43,11 +43,10 @@ class QMenu;
class QTreeView;
QT_END_NAMESPACE
-namespace Core {
- namespace Utils {
- class FancyLineEdit;
- }
+namespace Utils {
+ class FancyLineEdit;
}
+
namespace QuickOpen {
namespace Internal {
@@ -89,7 +88,7 @@ private:
QMenu *m_filterMenu;
QAction *m_refreshAction;
QAction *m_configureAction;
- Core::Utils::FancyLineEdit *m_fileLineEdit;
+ Utils::FancyLineEdit *m_fileLineEdit;
};
} // namespace Internal
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp
index de4f8ba877..abc2062b40 100644
--- a/src/plugins/resourceeditor/resourceeditorw.cpp
+++ b/src/plugins/resourceeditor/resourceeditorw.cpp
@@ -208,17 +208,17 @@ void ResourceEditorFile::modified(Core::IFile::ReloadBehavior *behavior)
break;
}
- switch (Core::Utils::reloadPrompt(fileName, isModified(), Core::ICore::instance()->mainWindow())) {
- case Core::Utils::ReloadCurrent:
+ switch (Utils::reloadPrompt(fileName, isModified(), Core::ICore::instance()->mainWindow())) {
+ case Utils::ReloadCurrent:
m_parent->open(fileName);
break;
- case Core::Utils::ReloadAll:
+ case Utils::ReloadAll:
m_parent->open(fileName);
*behavior = Core::IFile::ReloadAll;
break;
- case Core::Utils::ReloadSkipCurrent:
+ case Utils::ReloadSkipCurrent:
break;
- case Core::Utils::ReloadNone:
+ case Utils::ReloadNone:
*behavior = Core::IFile::ReloadNone;
break;
}
diff --git a/src/plugins/subversion/settingspage.cpp b/src/plugins/subversion/settingspage.cpp
index a37a0a1d20..93b9ef0a1e 100644
--- a/src/plugins/subversion/settingspage.cpp
+++ b/src/plugins/subversion/settingspage.cpp
@@ -40,7 +40,7 @@
#include <QtGui/QFileDialog>
using namespace Subversion::Internal;
-using namespace Core::Utils;
+using namespace Utils;
SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
QWidget(parent)
diff --git a/src/plugins/subversion/settingspage.ui b/src/plugins/subversion/settingspage.ui
index b4b8d93b7e..743702e684 100644
--- a/src/plugins/subversion/settingspage.ui
+++ b/src/plugins/subversion/settingspage.ui
@@ -53,7 +53,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::PathChooser" name="pathChooser"/>
+ <widget class="Utils::PathChooser" name="pathChooser"/>
</item>
</layout>
</item>
@@ -125,7 +125,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp
index dd6bdd7103..d99145aa62 100644
--- a/src/plugins/subversion/subversionplugin.cpp
+++ b/src/plugins/subversion/subversionplugin.cpp
@@ -289,7 +289,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
globalcontext << core->uniqueIDManager()->uniqueIdentifier(C_GLOBAL);
Core::Command *command;
- m_addAction = new Core::Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_addAction = new Utils::ParameterAction(tr("Add"), tr("Add \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_addAction, CMD_ID_ADD,
globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -299,14 +299,14 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
subversionMenu->addAction(command);
- m_deleteAction = new Core::Utils::ParameterAction(tr("Delete"), tr("Delete \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_deleteAction = new Utils::ParameterAction(tr("Delete"), tr("Delete \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_deleteAction, CMD_ID_DELETE_FILE,
globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(deleteCurrentFile()));
subversionMenu->addAction(command);
- m_revertAction = new Core::Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_revertAction = new Utils::ParameterAction(tr("Revert"), tr("Revert \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_revertAction, CMD_ID_REVERT,
globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -321,7 +321,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffProject()));
subversionMenu->addAction(command);
- m_diffCurrentAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_diffCurrentAction = new Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_diffCurrentAction,
CMD_ID_DIFF_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -339,7 +339,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
connect(m_commitAllAction, SIGNAL(triggered()), this, SLOT(startCommitAll()));
subversionMenu->addAction(command);
- m_commitCurrentAction = new Core::Utils::ParameterAction(tr("Commit Current File"), tr("Commit \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_commitCurrentAction = new Utils::ParameterAction(tr("Commit Current File"), tr("Commit \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_commitCurrentAction,
CMD_ID_COMMIT_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -351,7 +351,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
subversionMenu->addAction(createSeparator(this, ami, CMD_ID_SEPARATOR2, globalcontext));
- m_filelogCurrentAction = new Core::Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_filelogCurrentAction = new Utils::ParameterAction(tr("Filelog Current File"), tr("Filelog \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_filelogCurrentAction,
CMD_ID_FILELOG_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -359,7 +359,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
SLOT(filelogCurrentFile()));
subversionMenu->addAction(command);
- m_annotateCurrentAction = new Core::Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Core::Utils::ParameterAction::EnabledWithParameter, this);
+ m_annotateCurrentAction = new Utils::ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), Utils::ParameterAction::EnabledWithParameter, this);
command = ami->registerAction(m_annotateCurrentAction,
CMD_ID_ANNOTATE_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
@@ -935,7 +935,7 @@ SubversionResponse SubversionPlugin::runSvn(const QStringList &arguments,
qDebug() << "runSvn" << timeOut << outputText;
// Run, connect stderr to the output window
- Core::Utils::SynchronousProcess process;
+ Utils::SynchronousProcess process;
process.setTimeout(timeOut);
process.setStdOutCodec(outputCodec);
@@ -948,24 +948,24 @@ SubversionResponse SubversionPlugin::runSvn(const QStringList &arguments,
connect(&process, SIGNAL(stdOutBuffered(QString,bool)), outputWindow, SLOT(append(QString)));
}
- const Core::Utils::SynchronousProcessResponse sp_resp = process.run(executable, allArgs);
+ const Utils::SynchronousProcessResponse sp_resp = process.run(executable, allArgs);
response.error = true;
response.stdErr = sp_resp.stdErr;
response.stdOut = sp_resp.stdOut;
switch (sp_resp.result) {
- case Core::Utils::SynchronousProcessResponse::Finished:
+ case Utils::SynchronousProcessResponse::Finished:
response.error = false;
break;
- case Core::Utils::SynchronousProcessResponse::FinishedError:
+ case Utils::SynchronousProcessResponse::FinishedError:
response.message = tr("The process terminated with exit code %1.").arg(sp_resp.exitCode);
break;
- case Core::Utils::SynchronousProcessResponse::TerminatedAbnormally:
+ case Utils::SynchronousProcessResponse::TerminatedAbnormally:
response.message = tr("The process terminated abnormally.");
break;
- case Core::Utils::SynchronousProcessResponse::StartFailed:
+ case Utils::SynchronousProcessResponse::StartFailed:
response.message = tr("Could not start subversion '%1'. Please check your settings in the preferences.").arg(executable);
break;
- case Core::Utils::SynchronousProcessResponse::Hang:
+ case Utils::SynchronousProcessResponse::Hang:
response.message = tr("Subversion did not respond within timeout limit (%1 ms).").arg(timeOut);
break;
}
diff --git a/src/plugins/subversion/subversionplugin.h b/src/plugins/subversion/subversionplugin.h
index b7bbc2f710..1dcfce6803 100644
--- a/src/plugins/subversion/subversionplugin.h
+++ b/src/plugins/subversion/subversionplugin.h
@@ -43,9 +43,9 @@ QT_END_NAMESPACE
namespace Core {
class IVersionControl;
- namespace Utils {
- class ParameterAction;
- }
+}
+namespace Utils {
+ class ParameterAction;
}
namespace ProjectExplorer {
@@ -136,15 +136,15 @@ private:
ProjectExplorer::ProjectExplorerPlugin *m_projectExplorer;
- Core::Utils::ParameterAction *m_addAction;
- Core::Utils::ParameterAction *m_deleteAction;
- Core::Utils::ParameterAction *m_revertAction;
+ Utils::ParameterAction *m_addAction;
+ Utils::ParameterAction *m_deleteAction;
+ Utils::ParameterAction *m_revertAction;
QAction *m_diffProjectAction;
- Core::Utils::ParameterAction *m_diffCurrentAction;
+ Utils::ParameterAction *m_diffCurrentAction;
QAction *m_commitAllAction;
- Core::Utils::ParameterAction *m_commitCurrentAction;
- Core::Utils::ParameterAction *m_filelogCurrentAction;
- Core::Utils::ParameterAction *m_annotateCurrentAction;
+ Utils::ParameterAction *m_commitCurrentAction;
+ Utils::ParameterAction *m_filelogCurrentAction;
+ Utils::ParameterAction *m_annotateCurrentAction;
QAction *m_statusAction;
QAction *m_updateProjectAction;
QAction *m_describeAction;
diff --git a/src/plugins/subversion/subversionsubmiteditor.cpp b/src/plugins/subversion/subversionsubmiteditor.cpp
index 154009778c..e5c0f521b4 100644
--- a/src/plugins/subversion/subversionsubmiteditor.cpp
+++ b/src/plugins/subversion/subversionsubmiteditor.cpp
@@ -37,7 +37,7 @@ using namespace Subversion::Internal;
SubversionSubmitEditor::SubversionSubmitEditor(const VCSBase::VCSBaseSubmitEditorParameters *parameters,
QWidget *parentWidget) :
- VCSBase::VCSBaseSubmitEditor(parameters, new Core::Utils::SubmitEditorWidget(parentWidget))
+ VCSBase::VCSBaseSubmitEditor(parameters, new Utils::SubmitEditorWidget(parentWidget))
{
setDisplayName(tr("Subversion Submit"));
}
diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp
index 480ceb9a8f..5126d2e96a 100644
--- a/src/plugins/texteditor/basefilefind.cpp
+++ b/src/plugins/texteditor/basefilefind.cpp
@@ -47,7 +47,7 @@
#include <QtGui/QPushButton>
#include <QtGui/QFileDialog>
-using namespace Core::Utils;
+using namespace Utils;
using namespace Find;
using namespace TextEditor;
@@ -95,9 +95,9 @@ void BaseFileFind::findAll(const QString &txt, QTextDocument::FindFlags findFlag
connect(result, SIGNAL(activated(Find::SearchResultItem)), this, SLOT(openEditor(Find::SearchResultItem)));
m_resultWindow->popup(true);
if (m_useRegExp)
- m_watcher.setFuture(Core::Utils::findInFilesRegExp(txt, files(), findFlags, ITextEditor::openedTextEditorsContents()));
+ m_watcher.setFuture(Utils::findInFilesRegExp(txt, files(), findFlags, ITextEditor::openedTextEditorsContents()));
else
- m_watcher.setFuture(Core::Utils::findInFiles(txt, files(), findFlags, ITextEditor::openedTextEditorsContents()));
+ m_watcher.setFuture(Utils::findInFiles(txt, files(), findFlags, ITextEditor::openedTextEditorsContents()));
Core::FutureProgress *progress =
Core::ICore::instance()->progressManager()->addTask(m_watcher.future(),
"Search",
@@ -109,7 +109,7 @@ void BaseFileFind::findAll(const QString &txt, QTextDocument::FindFlags findFlag
}
void BaseFileFind::displayResult(int index) {
- Core::Utils::FileSearchResult result = m_watcher.future().resultAt(index);
+ Utils::FileSearchResult result = m_watcher.future().resultAt(index);
m_resultWindow->addResult(result.fileName,
result.lineNumber,
result.matchingLine,
diff --git a/src/plugins/texteditor/basefilefind.h b/src/plugins/texteditor/basefilefind.h
index 33d9af90b8..c31858d240 100644
--- a/src/plugins/texteditor/basefilefind.h
+++ b/src/plugins/texteditor/basefilefind.h
@@ -84,7 +84,7 @@ private:
QWidget *createProgressWidget();
Find::SearchResultWindow *m_resultWindow;
- QFutureWatcher<Core::Utils::FileSearchResult> m_watcher;
+ QFutureWatcher<Utils::FileSearchResult> m_watcher;
bool m_isSearching;
QLabel *m_resultLabel;
QStringListModel m_filterStrings;
diff --git a/src/plugins/texteditor/basetextdocument.cpp b/src/plugins/texteditor/basetextdocument.cpp
index b4f6d873d5..ba6e835f3e 100644
--- a/src/plugins/texteditor/basetextdocument.cpp
+++ b/src/plugins/texteditor/basetextdocument.cpp
@@ -273,17 +273,17 @@ void BaseTextDocument::modified(Core::IFile::ReloadBehavior *behavior)
#ifndef TEXTEDITOR_STANDALONE
- switch (Core::Utils::reloadPrompt(m_fileName, isModified(), QApplication::activeWindow())) {
- case Core::Utils::ReloadCurrent:
+ switch (Utils::reloadPrompt(m_fileName, isModified(), QApplication::activeWindow())) {
+ case Utils::ReloadCurrent:
reload();
break;
- case Core::Utils::ReloadAll:
+ case Utils::ReloadAll:
reload();
*behavior = Core::IFile::ReloadAll;
break;
- case Core::Utils::ReloadSkipCurrent:
+ case Utils::ReloadSkipCurrent:
break;
- case Core::Utils::ReloadNone:
+ case Utils::ReloadNone:
*behavior = Core::IFile::ReloadNone;
break;
}
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index 0386cec463..99c18a9bb3 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -962,6 +962,23 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
return;
}
}
+ } else if (!ro
+ && e == QKeySequence::DeleteStartOfWord
+ && d->m_document->tabSettings().m_autoIndent
+ && !textCursor().hasSelection()){
+ e->accept();
+ QTextCursor c = textCursor();
+ int pos = c.position();
+ c.movePosition(QTextCursor::PreviousWord);
+ int targetpos = c.position();
+ forever {
+ handleBackspaceKey();
+ int cpos = textCursor().position();
+ if (cpos == pos || cpos <= targetpos)
+ break;
+ pos = cpos;
+ }
+ return;
} else switch (e->key()) {
@@ -2427,7 +2444,7 @@ static void drawRectBox(QPainter *painter, const QRect &rect, bool start, bool e
QRgb b = pal.base().color().rgb();
QRgb h = pal.highlight().color().rgb();
- QColor c = StyleHelper::mergedColors(b,h, 50);
+ QColor c = Utils::StyleHelper::mergedColors(b,h, 50);
QLinearGradient grad(rect.topLeft(), rect.topRight());
grad.setColorAt(0, c.lighter(110));
@@ -3289,7 +3306,7 @@ void BaseTextEditor::handleBackspaceKey()
const TextEditor::TabSettings &tabSettings = d->m_document->tabSettings();
- if (autoBackspace(cursor))
+ if (tabSettings.m_autoIndent && autoBackspace(cursor))
return;
if (!tabSettings.m_smartBackspace) {
@@ -4678,7 +4695,7 @@ BaseTextEditorEditable::BaseTextEditorEditable(BaseTextEditor *editor)
aggregate->add(editor);
#endif
- m_cursorPositionLabel = new Core::Utils::LineColumnLabel;
+ m_cursorPositionLabel = new Utils::LineColumnLabel;
QHBoxLayout *l = new QHBoxLayout;
QWidget *w = new QWidget;
diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h
index f899072c39..17adcce1b1 100644
--- a/src/plugins/texteditor/basetexteditor.h
+++ b/src/plugins/texteditor/basetexteditor.h
@@ -44,10 +44,8 @@ class QToolBar;
class QTimeLine;
QT_END_NAMESPACE
-namespace Core {
- namespace Utils {
- class LineColumnLabel;
- }
+namespace Utils {
+ class LineColumnLabel;
}
namespace TextEditor {
@@ -673,7 +671,7 @@ private:
BaseTextEditor *e;
mutable QString m_contextHelpId;
QToolBar *m_toolBar;
- Core::Utils::LineColumnLabel *m_cursorPositionLabel;
+ Utils::LineColumnLabel *m_cursorPositionLabel;
};
} // namespace TextEditor
diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp
index 5812a6df8f..54224bb498 100644
--- a/src/plugins/texteditor/fontsettingspage.cpp
+++ b/src/plugins/texteditor/fontsettingspage.cpp
@@ -177,7 +177,7 @@ FontSettingsPagePrivate::FontSettingsPagePrivate(const TextEditor::FormatDescrip
const QString &category,
const QString &trCategory) :
m_name(name),
- m_settingsGroup(Core::Utils::settingsKey(category)),
+ m_settingsGroup(Utils::settingsKey(category)),
m_category(category),
m_trCategory(trCategory),
m_descriptions(fd),
diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.cpp b/src/plugins/vcsbase/basecheckoutwizardpage.cpp
index 16c03107a9..96b2bfce70 100644
--- a/src/plugins/vcsbase/basecheckoutwizardpage.cpp
+++ b/src/plugins/vcsbase/basecheckoutwizardpage.cpp
@@ -45,7 +45,7 @@ BaseCheckoutWizardPage::BaseCheckoutWizardPage(QWidget *parent) :
d(new BaseCheckoutWizardPagePrivate)
{
d->ui.setupUi(this);
- d->ui.pathChooser->setExpectedKind(Core::Utils::PathChooser::Directory);
+ d->ui.pathChooser->setExpectedKind(Utils::PathChooser::Directory);
connect(d->ui.pathChooser, SIGNAL(validChanged()), this, SLOT(slotChanged()));
connect(d->ui.checkoutDirectoryLineEdit, SIGNAL(validChanged()),
this, SLOT(slotChanged()));
diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.ui b/src/plugins/vcsbase/basecheckoutwizardpage.ui
index 75ac881df2..7be84e63cb 100644
--- a/src/plugins/vcsbase/basecheckoutwizardpage.ui
+++ b/src/plugins/vcsbase/basecheckoutwizardpage.ui
@@ -37,10 +37,10 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="Core::Utils::PathChooser" name="pathChooser"/>
+ <widget class="Utils::PathChooser" name="pathChooser"/>
</item>
<item row="1" column="1">
- <widget class="Core::Utils::ProjectNameValidatingLineEdit" name="checkoutDirectoryLineEdit"/>
+ <widget class="Utils::ProjectNameValidatingLineEdit" name="checkoutDirectoryLineEdit"/>
</item>
</layout>
</item>
@@ -48,12 +48,12 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::ProjectNameValidatingLineEdit</class>
+ <class>Utils::ProjectNameValidatingLineEdit</class>
<extends>QLineEdit</extends>
<header location="global">utils/projectnamevalidatinglineedit.h</header>
</customwidget>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/vcsbase/vcsbasesettingspage.cpp b/src/plugins/vcsbase/vcsbasesettingspage.cpp
index b74dc7c2c3..baa088a7ad 100644
--- a/src/plugins/vcsbase/vcsbasesettingspage.cpp
+++ b/src/plugins/vcsbase/vcsbasesettingspage.cpp
@@ -50,9 +50,9 @@ VCSBaseSettingsWidget::VCSBaseSettingsWidget(QWidget *parent) :
m_ui(new Ui::VCSBaseSettingsPage)
{
m_ui->setupUi(this);
- m_ui->submitMessageCheckScriptChooser->setExpectedKind(Core::Utils::PathChooser::Command);
- m_ui->nickNameFieldsFileChooser->setExpectedKind(Core::Utils::PathChooser::File);
- m_ui->nickNameMailMapChooser->setExpectedKind(Core::Utils::PathChooser::File);
+ m_ui->submitMessageCheckScriptChooser->setExpectedKind(Utils::PathChooser::Command);
+ m_ui->nickNameFieldsFileChooser->setExpectedKind(Utils::PathChooser::File);
+ m_ui->nickNameMailMapChooser->setExpectedKind(Utils::PathChooser::File);
}
VCSBaseSettingsWidget::~VCSBaseSettingsWidget()
diff --git a/src/plugins/vcsbase/vcsbasesettingspage.ui b/src/plugins/vcsbase/vcsbasesettingspage.ui
index b4c7e23316..78a1326291 100644
--- a/src/plugins/vcsbase/vcsbasesettingspage.ui
+++ b/src/plugins/vcsbase/vcsbasesettingspage.ui
@@ -76,7 +76,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="Core::Utils::PathChooser" name="submitMessageCheckScriptChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="submitMessageCheckScriptChooser" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="nickNameMailMapLabel">
@@ -90,7 +90,7 @@ name &lt;email&gt; alias &lt;email&gt;</string>
</widget>
</item>
<item row="1" column="1">
- <widget class="Core::Utils::PathChooser" name="nickNameMailMapChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="nickNameMailMapChooser" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="nickNameFieldsFileLabel">
@@ -103,7 +103,7 @@ name &lt;email&gt; alias &lt;email&gt;</string>
</widget>
</item>
<item row="2" column="1">
- <widget class="Core::Utils::PathChooser" name="nickNameFieldsFileChooser" native="true"/>
+ <widget class="Utils::PathChooser" name="nickNameFieldsFileChooser" native="true"/>
</item>
</layout>
</item>
@@ -142,7 +142,7 @@ name &lt;email&gt; alias &lt;email&gt;</string>
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::PathChooser</class>
+ <class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
index 93cbf344ff..82efcb537b 100644
--- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
+++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp
@@ -81,10 +81,10 @@ static inline QString submitMessageCheckScript()
struct VCSBaseSubmitEditorPrivate
{
VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditorParameters *parameters,
- Core::Utils::SubmitEditorWidget *editorWidget,
+ Utils::SubmitEditorWidget *editorWidget,
QObject *q);
- Core::Utils::SubmitEditorWidget *m_widget;
+ Utils::SubmitEditorWidget *m_widget;
QToolBar *m_toolWidget;
const VCSBaseSubmitEditorParameters *m_parameters;
QString m_displayName;
@@ -98,7 +98,7 @@ struct VCSBaseSubmitEditorPrivate
};
VCSBaseSubmitEditorPrivate::VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditorParameters *parameters,
- Core::Utils::SubmitEditorWidget *editorWidget,
+ Utils::SubmitEditorWidget *editorWidget,
QObject *q) :
m_widget(editorWidget),
m_toolWidget(0),
@@ -110,7 +110,7 @@ VCSBaseSubmitEditorPrivate::VCSBaseSubmitEditorPrivate(const VCSBaseSubmitEditor
}
VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *parameters,
- Core::Utils::SubmitEditorWidget *editorWidget) :
+ Utils::SubmitEditorWidget *editorWidget) :
m_d(new VCSBaseSubmitEditorPrivate(parameters, editorWidget, this))
{
// Message font according to settings
@@ -202,7 +202,7 @@ void VCSBaseSubmitEditor::createUserFields(const QString &fieldConfigFile)
const QStandardItemModel *nickNameModel = Internal::VCSBasePlugin::instance()->nickNameModel();
QCompleter *completer = new QCompleter(Internal::NickNameDialog::nickNameList(nickNameModel), this);
- Core::Utils::SubmitFieldWidget *fieldWidget = new Core::Utils::SubmitFieldWidget;
+ Utils::SubmitFieldWidget *fieldWidget = new Utils::SubmitFieldWidget;
connect(fieldWidget, SIGNAL(browseButtonClicked(int,QString)),
this, SLOT(slotSetFieldNickName(int)));
fieldWidget->setCompleter(completer);
@@ -453,11 +453,11 @@ VCSBaseSubmitEditor::PromptSubmitResult
// Provide check box to turn off prompt ONLY if it was not forced
if (*promptSetting && !forcePrompt) {
const QDialogButtonBox::StandardButton danswer =
- Core::Utils::CheckableMessageBox::question(parent, title, question,
+ Utils::CheckableMessageBox::question(parent, title, question,
tr("Prompt to submit"), promptSetting,
QDialogButtonBox::Yes|QDialogButtonBox::No|QDialogButtonBox::Cancel,
QDialogButtonBox::Yes);
- answer = Core::Utils::CheckableMessageBox::dialogButtonBoxToMessageBoxButton(danswer);
+ answer = Utils::CheckableMessageBox::dialogButtonBoxToMessageBoxButton(danswer);
} else {
answer = QMessageBox::question(parent, title, question,
QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel,
@@ -502,7 +502,7 @@ void VCSBaseSubmitEditor::slotInsertNickName()
void VCSBaseSubmitEditor::slotSetFieldNickName(int i)
{
- if (Core::Utils::SubmitFieldWidget *sfw =m_d->m_widget->submitFieldWidgets().front()) {
+ if (Utils::SubmitFieldWidget *sfw =m_d->m_widget->submitFieldWidgets().front()) {
const QString nick = promptForNickName();
if (!nick.isEmpty())
sfw->setFieldValue(i, nick);
diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.h b/src/plugins/vcsbase/vcsbasesubmiteditor.h
index 8859e5f1f3..fea9e469a2 100644
--- a/src/plugins/vcsbase/vcsbasesubmiteditor.h
+++ b/src/plugins/vcsbase/vcsbasesubmiteditor.h
@@ -43,10 +43,8 @@ class QAbstractItemModel;
class QAction;
QT_END_NAMESPACE
-namespace Core {
- namespace Utils {
- class SubmitEditorWidget;
- }
+namespace Utils {
+ class SubmitEditorWidget;
}
namespace VCSBase {
@@ -62,7 +60,7 @@ struct VCSBASE_EXPORT VCSBaseSubmitEditorParameters {
const char *context;
};
-/* Base class for a submit editor based on the Core::Utils::SubmitEditorWidget
+/* Base class for a submit editor based on the Utils::SubmitEditorWidget
* that presents the commit message in a text editor and an
* checkable list of modified files in a list window. The user can delete
* files from the list by pressing unchecking them or diff the selection
@@ -97,7 +95,7 @@ public:
protected:
explicit VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *parameters,
- Core::Utils::SubmitEditorWidget *editorWidget);
+ Utils::SubmitEditorWidget *editorWidget);
public:
// Register the actions with the submit editor widget.
diff --git a/src/plugins/welcome/communitywelcomepagewidget.ui b/src/plugins/welcome/communitywelcomepagewidget.ui
index 7d05f30d70..8bba317f79 100644
--- a/src/plugins/welcome/communitywelcomepagewidget.ui
+++ b/src/plugins/welcome/communitywelcomepagewidget.ui
@@ -24,7 +24,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="Core::Utils::WelcomeModeLabel" name="labsTitleLabel">
+ <widget class="Utils::WelcomeModeLabel" name="labsTitleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@@ -37,7 +37,7 @@
</widget>
</item>
<item>
- <widget class="Core::Utils::WelcomeModeTreeWidget" name="newsTreeWidget">
+ <widget class="Utils::WelcomeModeTreeWidget" name="newsTreeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -108,7 +108,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="Core::Utils::WelcomeModeLabel" name="sitesTitleLabel">
+ <widget class="Utils::WelcomeModeLabel" name="sitesTitleLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@@ -121,7 +121,7 @@
</widget>
</item>
<item>
- <widget class="Core::Utils::WelcomeModeTreeWidget" name="sitesTreeWidget">
+ <widget class="Utils::WelcomeModeTreeWidget" name="sitesTreeWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -180,12 +180,12 @@
</widget>
<customwidgets>
<customwidget>
- <class>Core::Utils::WelcomeModeTreeWidget</class>
+ <class>Utils::WelcomeModeTreeWidget</class>
<extends>QTreeWidget</extends>
<header>utils/welcomemodetreewidget.h</header>
</customwidget>
<customwidget>
- <class>Core::Utils::WelcomeModeLabel</class>
+ <class>Utils::WelcomeModeLabel</class>
<extends>QLabel</extends>
<header>utils/welcomemodetreewidget.h</header>
</customwidget>
diff --git a/src/plugins/welcome/welcomemode.cpp b/src/plugins/welcome/welcomemode.cpp
index c3812c0d10..9da0ad90d4 100644
--- a/src/plugins/welcome/welcomemode.cpp
+++ b/src/plugins/welcome/welcomemode.cpp
@@ -83,7 +83,7 @@ WelcomeMode::WelcomeMode() :
QVBoxLayout *l = new QVBoxLayout(m_d->m_widget);
l->setMargin(0);
l->setSpacing(0);
- l->addWidget(new Core::Utils::StyledBar(m_d->m_widget));
+ l->addWidget(new Utils::StyledBar(m_d->m_widget));
m_d->m_welcomePage = new QWidget(m_d->m_widget);
m_d->ui.setupUi(m_d->m_welcomePage);
m_d->ui.helpUsLabel->setAttribute(Qt::WA_LayoutUsesWidgetRect);
diff --git a/src/shared/trk/launcher.cpp b/src/shared/trk/launcher.cpp
index cfad2379d9..0c6a76deb3 100644
--- a/src/shared/trk/launcher.cpp
+++ b/src/shared/trk/launcher.cpp
@@ -299,7 +299,7 @@ void Launcher::handleTrkVersion(const TrkResult &result)
void Launcher::handleFileCreation(const TrkResult &result)
{
if (result.errorCode() || result.data.size() < 6) {
- emit canNotCreateFile(d->m_copyState.destinationFileName, errorMessage(result.errorCode()));
+ emit canNotCreateFile(d->m_copyState.destinationFileName, result.errorString());
emit finished();
return;
}
@@ -315,15 +315,19 @@ void Launcher::handleFileCreation(const TrkResult &result)
void Launcher::handleCopy(const TrkResult &result)
{
- Q_UNUSED(result)
-
- continueCopying();
+ if (result.errorCode() || result.data.size() < 4) {
+ closeRemoteFile(true);
+ emit canNotWriteFile(d->m_copyState.destinationFileName, result.errorString());
+ emit finished();
+ } else {
+ continueCopying(extractShort(result.data.data() + 2));
+ }
}
-void Launcher::continueCopying()
+void Launcher::continueCopying(uint lastCopiedBlockSize)
{
- static const int BLOCKSIZE = 1024;
int size = d->m_copyState.data->length();
+ d->m_copyState.position += lastCopiedBlockSize;
if (size == 0)
emit copyProgress(100);
else {
@@ -333,18 +337,24 @@ void Launcher::continueCopying()
if (d->m_copyState.position < size) {
QByteArray ba;
appendInt(&ba, d->m_copyState.copyFileHandle, TargetByteOrder);
- appendString(&ba, d->m_copyState.data->mid(d->m_copyState.position, BLOCKSIZE), TargetByteOrder, false);
- d->m_copyState.position += BLOCKSIZE;
+ appendString(&ba, d->m_copyState.data->mid(d->m_copyState.position, 2048), TargetByteOrder, false);
d->m_device.sendTrkMessage(TrkWriteFile, TrkCallback(this, &Launcher::handleCopy), ba);
} else {
- QByteArray ba;
- appendInt(&ba, d->m_copyState.copyFileHandle, TargetByteOrder);
- appendInt(&ba, QDateTime::currentDateTime().toTime_t(), TargetByteOrder);
- d->m_device.sendTrkMessage(TrkCloseFile, TrkCallback(this, &Launcher::handleFileCopied), ba);
- d->m_copyState.data.reset();
+ closeRemoteFile();
}
}
+void Launcher::closeRemoteFile(bool failed)
+{
+ QByteArray ba;
+ appendInt(&ba, d->m_copyState.copyFileHandle, TargetByteOrder);
+ appendInt(&ba, QDateTime::currentDateTime().toTime_t(), TargetByteOrder);
+ d->m_device.sendTrkMessage(TrkCloseFile,
+ failed ? TrkCallback() : TrkCallback(this, &Launcher::handleFileCopied),
+ ba);
+ d->m_copyState.data.reset();
+}
+
void Launcher::handleFileCopied(const TrkResult &result)
{
Q_UNUSED(result)
@@ -372,7 +382,7 @@ void Launcher::handleCpuType(const TrkResult &result)
void Launcher::handleCreateProcess(const TrkResult &result)
{
if (result.errorCode()) {
- emit canNotRun(errorMessage(result.errorCode()));
+ emit canNotRun(result.errorString());
emit finished();
return;
}
diff --git a/src/shared/trk/launcher.h b/src/shared/trk/launcher.h
index ec1048885c..9a33a57dbf 100644
--- a/src/shared/trk/launcher.h
+++ b/src/shared/trk/launcher.h
@@ -58,6 +58,7 @@ public:
signals:
void copyingStarted();
void canNotCreateFile(const QString &filename, const QString &errorMessage);
+ void canNotWriteFile(const QString &filename, const QString &errorMessage);
void installingStarted();
void startingApplication();
void applicationRunning(uint pid);
@@ -78,7 +79,8 @@ private:
void handleFileCreation(const TrkResult &result);
void handleCopy(const TrkResult &result);
- void continueCopying();
+ void continueCopying(uint lastCopiedBlockSize = 0);
+ void closeRemoteFile(bool failed = false);
void handleFileCopied(const TrkResult &result);
void handleInstallPackageFinished(const TrkResult &result);
void handleCpuType(const TrkResult &result);
diff --git a/src/shared/trk/trkdevice.cpp b/src/shared/trk/trkdevice.cpp
index a227e0c3a5..c7ebe792b7 100644
--- a/src/shared/trk/trkdevice.cpp
+++ b/src/shared/trk/trkdevice.cpp
@@ -836,6 +836,8 @@ TrkDevice::~TrkDevice()
bool TrkDevice::open(const QString &port, QString *errorMessage)
{
+ if (d->verbose)
+ qDebug() << "Opening" << port << "is open: " << isOpen();
close();
#ifdef Q_OS_WIN
d->deviceContext->device = CreateFile(port.toStdWString().c_str(),
@@ -908,6 +910,8 @@ void TrkDevice::close()
{
if (!isOpen())
return;
+ d->readerThread->terminate();
+ d->writerThread->terminate();
#ifdef Q_OS_WIN
CloseHandle(d->deviceContext->device);
d->deviceContext->device = INVALID_HANDLE_VALUE;
@@ -917,8 +921,6 @@ void TrkDevice::close()
#else
d->deviceContext->file.close();
#endif
- d->readerThread->terminate();
- d->writerThread->terminate();
if (d->verbose)
emitLogMessage("Close");
}
diff --git a/src/tools/qtcreatorwidgets/customwidgets.cpp b/src/tools/qtcreatorwidgets/customwidgets.cpp
index e8867a59fa..011e819908 100644
--- a/src/tools/qtcreatorwidgets/customwidgets.cpp
+++ b/src/tools/qtcreatorwidgets/customwidgets.cpp
@@ -38,7 +38,7 @@ static const char *groupC = "QtCreator";
NewClassCustomWidget::NewClassCustomWidget(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::NewClassWidget>
+ CustomWidget<Utils::NewClassWidget>
(QLatin1String("<utils/newclasswidget.h>"),
false,
QLatin1String(groupC),
@@ -49,7 +49,7 @@ NewClassCustomWidget::NewClassCustomWidget(QObject *parent) :
ClassNameValidatingLineEdit_CW::ClassNameValidatingLineEdit_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::ClassNameValidatingLineEdit>
+ CustomWidget<Utils::ClassNameValidatingLineEdit>
(QLatin1String("<utils/classnamevalidatinglineedit.h>"),
false,
QLatin1String(groupC),
@@ -60,7 +60,7 @@ ClassNameValidatingLineEdit_CW::ClassNameValidatingLineEdit_CW(QObject *parent)
FileNameValidatingLineEdit_CW::FileNameValidatingLineEdit_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::FileNameValidatingLineEdit>
+ CustomWidget<Utils::FileNameValidatingLineEdit>
(QLatin1String("<utils/filenamevalidatinglineedit.h>"),
false,
QLatin1String(groupC),
@@ -71,7 +71,7 @@ FileNameValidatingLineEdit_CW::FileNameValidatingLineEdit_CW(QObject *parent) :
ProjectNameValidatingLineEdit_CW::ProjectNameValidatingLineEdit_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::ProjectNameValidatingLineEdit>
+ CustomWidget<Utils::ProjectNameValidatingLineEdit>
(QLatin1String("<utils/projectnamevalidatinglineedit.h>"),
false,
QLatin1String(groupC),
@@ -82,7 +82,7 @@ ProjectNameValidatingLineEdit_CW::ProjectNameValidatingLineEdit_CW(QObject *pare
LineColumnLabel_CW::LineColumnLabel_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::LineColumnLabel>
+ CustomWidget<Utils::LineColumnLabel>
(QLatin1String("<utils/linecolumnlabel.h>"),
false,
QLatin1String(groupC),
@@ -94,7 +94,7 @@ LineColumnLabel_CW::LineColumnLabel_CW(QObject *parent) :
PathChooser_CW::PathChooser_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::PathChooser>
+ CustomWidget<Utils::PathChooser>
(QLatin1String("<utils/pathchooser.h>"),
false,
QLatin1String(groupC),
@@ -105,7 +105,7 @@ PathChooser_CW::PathChooser_CW(QObject *parent) :
FancyLineEdit_CW::FancyLineEdit_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::FancyLineEdit>
+ CustomWidget<Utils::FancyLineEdit>
(QLatin1String("<utils/fancylineedit.h>"),
false,
QLatin1String(groupC),
@@ -116,7 +116,7 @@ FancyLineEdit_CW::FancyLineEdit_CW(QObject *parent) :
QtColorButton_CW::QtColorButton_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::QtColorButton>
+ CustomWidget<Utils::QtColorButton>
(QLatin1String("<utils/qtcolorbutton.h>"),
false,
QLatin1String(groupC),
@@ -127,7 +127,7 @@ QtColorButton_CW::QtColorButton_CW(QObject *parent) :
QWidget *FancyLineEdit_CW::createWidget(QWidget *parent)
{
- Core::Utils::FancyLineEdit *fle = new Core::Utils::FancyLineEdit(parent);
+ Utils::FancyLineEdit *fle = new Utils::FancyLineEdit(parent);
QMenu *menu = new QMenu(fle);
menu->addAction("Test");
fle->setMenu(menu);
@@ -136,7 +136,7 @@ QWidget *FancyLineEdit_CW::createWidget(QWidget *parent)
SubmitEditorWidget_CW::SubmitEditorWidget_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::SubmitEditorWidget>
+ CustomWidget<Utils::SubmitEditorWidget>
(QLatin1String("<utils/submiteditorwidget.h>"),
false,
QLatin1String(groupC),
@@ -147,7 +147,7 @@ SubmitEditorWidget_CW::SubmitEditorWidget_CW(QObject *parent) :
SubmitFieldWidget_CW::SubmitFieldWidget_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::SubmitFieldWidget>
+ CustomWidget<Utils::SubmitFieldWidget>
(QLatin1String("<utils/submitfieldwidget.h>"),
false,
QLatin1String(groupC),
@@ -158,7 +158,7 @@ SubmitFieldWidget_CW::SubmitFieldWidget_CW(QObject *parent) :
PathListEditor_CW::PathListEditor_CW(QObject *parent) :
QObject(parent),
- CustomWidget<Core::Utils::PathListEditor>
+ CustomWidget<Utils::PathListEditor>
(QLatin1String("<utils/pathlisteditor.h>"),
false,
QLatin1String(groupC),
diff --git a/src/tools/qtcreatorwidgets/customwidgets.h b/src/tools/qtcreatorwidgets/customwidgets.h
index f9999d2030..0543c78764 100644
--- a/src/tools/qtcreatorwidgets/customwidgets.h
+++ b/src/tools/qtcreatorwidgets/customwidgets.h
@@ -61,7 +61,7 @@ QT_END_NAMESPACE
class NewClassCustomWidget :
public QObject,
- public CustomWidget<Core::Utils::NewClassWidget>
+ public CustomWidget<Utils::NewClassWidget>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -71,7 +71,7 @@ public:
class ClassNameValidatingLineEdit_CW :
public QObject,
- public CustomWidget<Core::Utils::ClassNameValidatingLineEdit>
+ public CustomWidget<Utils::ClassNameValidatingLineEdit>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -81,7 +81,7 @@ public:
class FileNameValidatingLineEdit_CW :
public QObject,
- public CustomWidget<Core::Utils::FileNameValidatingLineEdit>
+ public CustomWidget<Utils::FileNameValidatingLineEdit>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -91,7 +91,7 @@ public:
class ProjectNameValidatingLineEdit_CW :
public QObject,
- public CustomWidget<Core::Utils::ProjectNameValidatingLineEdit>
+ public CustomWidget<Utils::ProjectNameValidatingLineEdit>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -101,7 +101,7 @@ public:
class LineColumnLabel_CW :
public QObject,
- public CustomWidget<Core::Utils::LineColumnLabel>
+ public CustomWidget<Utils::LineColumnLabel>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -111,7 +111,7 @@ public:
class PathChooser_CW :
public QObject,
- public CustomWidget<Core::Utils::PathChooser>
+ public CustomWidget<Utils::PathChooser>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -121,7 +121,7 @@ public:
class FancyLineEdit_CW :
public QObject,
- public CustomWidget<Core::Utils::FancyLineEdit>
+ public CustomWidget<Utils::FancyLineEdit>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -133,7 +133,7 @@ public:
class QtColorButton_CW :
public QObject,
- public CustomWidget<Core::Utils::QtColorButton>
+ public CustomWidget<Utils::QtColorButton>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -143,7 +143,7 @@ public:
class SubmitEditorWidget_CW :
public QObject,
- public CustomWidget<Core::Utils::SubmitEditorWidget>
+ public CustomWidget<Utils::SubmitEditorWidget>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -153,7 +153,7 @@ public:
class SubmitFieldWidget_CW :
public QObject,
- public CustomWidget<Core::Utils::SubmitFieldWidget>
+ public CustomWidget<Utils::SubmitFieldWidget>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -163,7 +163,7 @@ public:
class PathListEditor_CW :
public QObject,
- public CustomWidget<Core::Utils::PathListEditor>
+ public CustomWidget<Utils::PathListEditor>
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)