From 63d2e0e4b54248a0a5ca29ef9cd3205c16ab0365 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 25 Jun 2014 09:30:32 +0200 Subject: [PATCH 1/6] ProjectExplorer: Fix compile Change-Id: I578ac76029f52e3d7ca562034b263510f1d63e49 Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/projectexplorer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 8568a61be9d..76fd8d359fb 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1049,7 +1049,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er VariableManager::registerFileVariables(Constants::VAR_CURRENTPROJECT_PREFIX, tr("Current project's main file"), - []() -> QString { + [&]() -> QString { QString projectFilePath; if (Project *project = ProjectExplorerPlugin::currentProject()) if (IDocument *doc = project->document()) @@ -1103,7 +1103,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er VariableManager::registerVariable(Constants::VAR_CURRENTBUILD_TYPE, tr("The currently active build configuration's type."), - []() -> QString { + [&]() -> QString { if (BuildConfiguration *bc = activeBuildConfiguration()) { BuildConfiguration::BuildType type = bc->buildType(); if (type == BuildConfiguration::Debug) From 8da0742ae2f42e6862c2df5e6b4730cd28fc62c5 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 24 Jun 2014 12:16:16 +0200 Subject: [PATCH 2/6] ProgressManager: Unify style of progress manager task descriptions Change-Id: I6826e66f00f47997c644c24d1b20f4a1ea53a8a2 (cherry picked from commit 36d8ec4f4771ebeb9d923af35c473e11bae1fe29) Reviewed-by: Tobias Hunger --- src/plugins/clangcodemodel/pchmanager.cpp | 2 +- src/plugins/help/searchwidget.cpp | 2 +- src/plugins/updateinfo/updateinfoplugin.cpp | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/clangcodemodel/pchmanager.cpp b/src/plugins/clangcodemodel/pchmanager.cpp index 280dde4c6be..6733cd83c24 100644 --- a/src/plugins/clangcodemodel/pchmanager.cpp +++ b/src/plugins/clangcodemodel/pchmanager.cpp @@ -184,7 +184,7 @@ void PchManager::updatePchInfo(ClangProjectSettings *cps, QFuture future = QtConcurrent::run(updateFunction, UpdateParams(customPchFile, projectParts)); m_pchGenerationWatcher.setFuture(future); - Core::ProgressManager::addTask(future, tr("Precompiling..."), "Key.Tmp.Precompiling"); + Core::ProgressManager::addTask(future, tr("Precompiling"), "Key.Tmp.Precompiling"); } namespace { diff --git a/src/plugins/help/searchwidget.cpp b/src/plugins/help/searchwidget.cpp index 53a7305d544..8c2ec3381b3 100644 --- a/src/plugins/help/searchwidget.cpp +++ b/src/plugins/help/searchwidget.cpp @@ -198,7 +198,7 @@ void SearchWidget::indexingStarted() m_progress = new QFutureInterface(); Core::ProgressManager::addTask(m_progress->future(), tr("Indexing Documentation"), "Help.Indexer"); m_progress->setProgressRange(0, 2); - m_progress->setProgressValueAndText(1, tr("Indexing Documentation...")); + m_progress->setProgressValueAndText(1, tr("Indexing Documentation")); m_progress->reportStarted(); m_watcher.setFuture(m_progress->future()); diff --git a/src/plugins/updateinfo/updateinfoplugin.cpp b/src/plugins/updateinfo/updateinfoplugin.cpp index 4be994ce41b..fc8c30f8018 100644 --- a/src/plugins/updateinfo/updateinfoplugin.cpp +++ b/src/plugins/updateinfo/updateinfoplugin.cpp @@ -207,8 +207,9 @@ void UpdateInfoPlugin::parseUpdates() return; // add the finished task to the progress manager - d->updateInfoProgress = ProgressManager::addTask(d->lastCheckUpdateInfoTask, tr("Updates " - "available"), "Update.GetInfo", ProgressManager::KeepOnFinish); + d->updateInfoProgress + = ProgressManager::addTask(d->lastCheckUpdateInfoTask, tr("Updates Available"), + "Update.GetInfo", ProgressManager::KeepOnFinish); d->updateInfoProgress->setKeepOnFinish(FutureProgress::KeepOnFinish); d->progressUpdateInfoButton = new UpdateInfoButton(); From 7fbd4b7c6a60328c3b9cb394ae4fe2d64621d47e Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 25 Jun 2014 09:29:33 +0300 Subject: [PATCH 3/6] Lambda cleanup Change-Id: Ia7f1d530e01d4ae3990713e23d672249d9489561 Reviewed-by: Daniel Teske --- src/plugins/coreplugin/variablemanager.cpp | 10 ++++----- src/plugins/cpptools/cppmodelmanager.cpp | 2 +- src/plugins/debugger/debuggerengine.cpp | 2 +- .../projectexplorer/projectexplorer.cpp | 22 +++++++++---------- src/plugins/qtsupport/qtsupportplugin.cpp | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/plugins/coreplugin/variablemanager.cpp b/src/plugins/coreplugin/variablemanager.cpp index aa4fbcda818..e6ad21b9f45 100644 --- a/src/plugins/coreplugin/variablemanager.cpp +++ b/src/plugins/coreplugin/variablemanager.cpp @@ -254,7 +254,7 @@ void VariableManager::registerIntVariable(const QByteArray &variable, const QString &description, const VariableManager::IntFunction &value) { registerVariable(variable, description, - [=]() -> QString { return QString::number(value ? value() : 0); }); + [value]() { return QString::number(value ? value() : 0); }); } /*! @@ -270,19 +270,19 @@ void VariableManager::registerFileVariables(const QByteArray &prefix, { registerVariable(prefix + kFilePathPostfix, QCoreApplication::translate("Core::VariableManager", "%1: Full path including file name.").arg(heading), - [=]() -> QString { return QFileInfo(base()).filePath(); }); + [base]() { return QFileInfo(base()).filePath(); }); registerVariable(prefix + kPathPostfix, QCoreApplication::translate("Core::VariableManager", "%1: Full path excluding file name.").arg(heading), - [=]() -> QString { return QFileInfo(base()).path(); }); + [base]() { return QFileInfo(base()).path(); }); registerVariable(prefix + kFileNamePostfix, QCoreApplication::translate("Core::VariableManager", "%1: File name without path.").arg(heading), - [=]() -> QString { return QFileInfo(base()).fileName(); }); + [base]() { return QFileInfo(base()).fileName(); }); registerVariable(prefix + kFileBaseNamePostfix, QCoreApplication::translate("Core::VariableManager", "%1: File base name without path and suffix.").arg(heading), - [=]() -> QString { return QFileInfo(base()).baseName(); }); + [base]() { return QFileInfo(base()).baseName(); }); } /*! diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 79461634393..25300b1d1d1 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -172,7 +172,7 @@ QStringList CppModelManager::timeStampModifiedFiles(const QList & CppSourceProcessor *CppModelManager::createSourceProcessor() { CppModelManager *that = instance(); - return new CppSourceProcessor(that->snapshot(), [=](const Document::Ptr &doc) { + return new CppSourceProcessor(that->snapshot(), [that](const Document::Ptr &doc) { that->emitDocumentUpdated(doc); doc->releaseSourceAndAST(); }); diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 47d0bbac1b7..6afb7704a09 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -178,7 +178,7 @@ public: VariableManager::registerFileVariables(PrefixDebugExecutable, tr("Debugged executable"), - [&]() { return this->m_startParameters.executable; }); + [this]() { return m_startParameters.executable; }); } public slots: diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 76fd8d359fb..13824d827e6 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1066,40 +1066,40 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er VariableManager::registerVariable(Constants::VAR_CURRENTPROJECT_NAME, tr("The current project's name."), - []() -> QString { return variableValue(Constants::VAR_CURRENTPROJECT_NAME); }); + []() { return variableValue(Constants::VAR_CURRENTPROJECT_NAME); }); VariableManager::registerVariable(Constants::VAR_CURRENTKIT_NAME, tr("The currently active kit's name."), - []() -> QString { return variableValue(Constants::VAR_CURRENTKIT_NAME); }); + []() { return variableValue(Constants::VAR_CURRENTKIT_NAME); }); VariableManager::registerVariable(Constants::VAR_CURRENTKIT_FILESYSTEMNAME, tr("The currently active kit's name in a filesystem friendly version."), - []() -> QString { return variableValue(Constants::VAR_CURRENTKIT_FILESYSTEMNAME); }); + []() { return variableValue(Constants::VAR_CURRENTKIT_FILESYSTEMNAME); }); VariableManager::registerVariable(Constants::VAR_CURRENTKIT_ID, tr("The currently active kit's id."), - []() -> QString { return variableValue(Constants::VAR_CURRENTKIT_ID); }); + []() { return variableValue(Constants::VAR_CURRENTKIT_ID); }); VariableManager::registerVariable(Constants::VAR_CURRENTDEVICE_HOSTADDRESS, tr("The host address of the device in the currently active kit."), - []() -> QString { return variableValue(Constants::VAR_CURRENTDEVICE_HOSTADDRESS); }); + []() { return variableValue(Constants::VAR_CURRENTDEVICE_HOSTADDRESS); }); VariableManager::registerVariable(Constants::VAR_CURRENTDEVICE_SSHPORT, tr("The SSH port of the device in the currently active kit."), - []() -> QString { return variableValue(Constants::VAR_CURRENTDEVICE_SSHPORT); }); + []() { return variableValue(Constants::VAR_CURRENTDEVICE_SSHPORT); }); VariableManager::registerVariable(Constants::VAR_CURRENTDEVICE_USERNAME, tr("The user name with which to log into the device in the currently active kit."), - []() -> QString { return variableValue(Constants::VAR_CURRENTDEVICE_USERNAME); }); + []() { return variableValue(Constants::VAR_CURRENTDEVICE_USERNAME); }); VariableManager::registerVariable(Constants::VAR_CURRENTDEVICE_PRIVATEKEYFILE, tr("The private key file with which to authenticate when logging into the device " "in the currently active kit."), - []() -> QString { return variableValue(Constants::VAR_CURRENTDEVICE_PRIVATEKEYFILE); }); + []() { return variableValue(Constants::VAR_CURRENTDEVICE_PRIVATEKEYFILE); }); VariableManager::registerVariable(Constants::VAR_CURRENTBUILD_NAME, tr("The currently active build configuration's name."), - []() -> QString { return variableValue(Constants::VAR_CURRENTBUILD_NAME); }); + []() { return variableValue(Constants::VAR_CURRENTBUILD_NAME); }); VariableManager::registerVariable(Constants::VAR_CURRENTBUILD_TYPE, tr("The currently active build configuration's type."), @@ -1116,11 +1116,11 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er VariableManager::registerFileVariables(Constants::VAR_CURRENTSESSION_PREFIX, tr("File where current session is saved."), - []() -> QString { return SessionManager::sessionNameToFileName(SessionManager::activeSession()).toString(); }); + []() { return SessionManager::sessionNameToFileName(SessionManager::activeSession()).toString(); }); VariableManager::registerVariable(Constants::VAR_CURRENTSESSION_NAME, tr("Name of current session."), - []() -> QString { return SessionManager::activeSession(); }); + []() { return SessionManager::activeSession(); }); return true; } diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp index 15b9712e6ef..9a9d2e2c726 100644 --- a/src/plugins/qtsupport/qtsupportplugin.cpp +++ b/src/plugins/qtsupport/qtsupportplugin.cpp @@ -117,12 +117,12 @@ void QtSupportPlugin::extensionsInitialized() { VariableManager::registerVariable(kHostBins, tr("Full path to the host bin directory of the current project's Qt version."), - []() -> QString { return qmakeProperty("QT_HOST_BINS"); }); + []() { return qmakeProperty("QT_HOST_BINS"); }); VariableManager::registerVariable(kInstallBins, tr("Full path to the target bin directory of the current project's Qt version." " You probably want %1 instead.").arg(QString::fromLatin1(kHostBins)), - []() -> QString { return qmakeProperty("QT_INSTALL_BINS"); }); + []() { return qmakeProperty("QT_INSTALL_BINS"); }); } bool QtSupportPlugin::delayedInitialize() From 91ee7d1451d48ad9a86809b1fa8381857e79048c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 25 Jun 2014 15:09:59 +0200 Subject: [PATCH 4/6] Fix location and rpaths of qbs command-line tools on OSX. Change-Id: I3393ac940b60b8741e503420d9d0b44c12423bcb Reviewed-by: Christian Kandeler --- src/shared/qbs | 2 +- src/src.qbs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/shared/qbs b/src/shared/qbs index a68470880a0..5e77a9d1927 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit a68470880a0195f7a52caad46b442df694cb26b0 +Subproject commit 5e77a9d1927ec4f3ab405824a92d48930d48c487 diff --git a/src/src.qbs b/src/src.qbs index 387b13acd8c..5301b6a4f5a 100644 --- a/src/src.qbs +++ b/src/src.qbs @@ -26,10 +26,11 @@ Project { property bool installApiHeaders: false property string libInstallDir: project.ide_library_path property stringList libRPaths: qbs.targetOS.contains("osx") - ? ["@loader_path/.."] : ["$ORIGIN/..", "$ORIGIN/../" + project.ide_library_path] + ? ["@loader_path/" + FileInfo.relativePath(appInstallDir, libInstallDir)] + : ["$ORIGIN/..", "$ORIGIN/../" + project.ide_library_path] property string resourcesInstallDir: project.ide_data_path + "/qbs" property string pluginsInstallDir: project.libDirName + "/qtcreator" - property string appInstallDir: project.ide_libexec_path + property string appInstallDir: project.ide_bin_path property string relativePluginsPath: FileInfo.relativePath(appInstallDir, pluginsInstallDir) property string relativeSearchPath: FileInfo.relativePath(appInstallDir, resourcesInstallDir) From 604bdad77f6599527e5cd6f6e445c9d38c3d95ff Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 25 Jun 2014 14:13:43 +0200 Subject: [PATCH 5/6] QmlDesigner.ItemLibrary: Fix icon file path Change-Id: I5f5b6fa3fc4b1445b4f51fb82765cff38c67525e Reviewed-by: Tim Jenssen --- .../componentsplugin/components.metainfo | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/plugins/qmldesigner/componentsplugin/components.metainfo b/src/plugins/qmldesigner/componentsplugin/components.metainfo index 54c54717dfa..fbbfdf13fa4 100644 --- a/src/plugins/qmldesigner/componentsplugin/components.metainfo +++ b/src/plugins/qmldesigner/componentsplugin/components.metainfo @@ -249,12 +249,12 @@ MetaInfo { Type { name: "QtQuick.Controls.Frame" - icon: ":/desktopplugin//images/window16.png" + icon: ":/componentsplugin//images/window16.png" ItemLibraryEntry { name: "Frame" category: "Qt Quick - Controls" - libraryIcon: ":/desktopplugin/images/window.png" + libraryIcon: ":/componentsplugin/images/window.png" version: "1.0" requiredImport: "QtQuick.Controls" @@ -265,12 +265,12 @@ MetaInfo { Type { name: "QtQuick.Controls.ToolButton" - icon: ":/desktopplugin/images/button16.png" + icon: ":/componentsplugin/images/button16.png" ItemLibraryEntry { name: "Tool Button" category: "Qt Quick - Controls" - libraryIcon: ":/desktopplugin/images/button.png" + libraryIcon: ":/componentsplugin/images/button.png" version: "1.0" requiredImport: "QtQuick.Controls" @@ -281,12 +281,12 @@ MetaInfo { Type { name: "QtQuick.Controls.ToolBar" - icon: ":/desktopplugin/images/toolbar16.png" + icon: ":/componentsplugin/images/toolbar16.png" ItemLibraryEntry { name: "Tool Bar" category: "Qt Quick - Controls" - libraryIcon: ":/desktopplugin/images/toolbar.png" + libraryIcon: ":/componentsplugin/images/toolbar.png" version: "1.0" requiredImport: "QtQuick.Controls" @@ -297,12 +297,12 @@ MetaInfo { Type { name: "QtQuick.Controls.StatusBar" - icon: ":/desktopplugin/images/toolbar16.png" + icon: ":/componentsplugin/images/toolbar16.png" ItemLibraryEntry { name: "Status Bar" category: "Qt Quick - Controls" - libraryIcon: ":/desktopplugin/images/toolbar.png" + libraryIcon: ":/componentsplugin/images/toolbar.png" version: "1.0" requiredImport: "QtQuick.Controls" } @@ -310,12 +310,12 @@ MetaInfo { Type { name: "QtQuick.Controls.Dial" - //icon: ":/desktopplugin/images/progressbar16.png" + //icon: ":/componentsplugin/images/progressbar16.png" ItemLibraryEntry { name: "Dial" category: "Qt Quick - Controls" - //libraryIcon: ":/desktopplugin/images/progressbar.png" + //libraryIcon: ":/componentsplugin/images/progressbar.png" version: "1.0" requiredImport: "QtQuick.Controls" From a7b882315d961740fc5e34df754d2b40f9e8fe8a Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 25 Jun 2014 15:44:22 +0200 Subject: [PATCH 6/6] Mark unused fields with Q_UNUSED. .. to suppress -Wunused-private-field warnings. Change-Id: I9eaea1b45bbe4fda4714831af1926c14b31cb9fe Reviewed-by: hjk --- tests/manual/debugger/simple/simple_test_app.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index 83e8bcc77bc..7c92102d65f 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -412,7 +412,7 @@ class XX : virtual public Foo { public: XX() { } }; class Y : virtual public Foo { public: Y() { } }; -class D : public X, public Y { int diamond; }; +class D : public X, public Y { int diamond; D(){Q_UNUSED(diamond);} }; namespace peekandpoke { @@ -6503,7 +6503,7 @@ namespace bug5106 { class A5106 { public: - A5106(int a, int b) : m_a(a), m_b(b) {} + A5106(int a, int b) : m_a(a), m_b(b) {Q_UNUSED(m_a);Q_UNUSED(m_b);} virtual int test() { return 5; } private: int m_a, m_b; @@ -6512,7 +6512,7 @@ namespace bug5106 { class B5106 : public A5106 { public: - B5106(int c, int a, int b) : A5106(a, b), m_c(c) {} + B5106(int c, int a, int b) : A5106(a, b), m_c(c) {Q_UNUSED(m_c);} virtual int test() { return 4; BREAK_HERE; } private: int m_c;