From cc97609e60be4d4afeb28d7d4cacce9b4ea3478f Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 16 Feb 2017 11:07:27 +0200 Subject: [PATCH 1/5] ProjectTree: Remove "external file" warning when node is found If a new file is added, it is connected to the updateExternalFileWarning slot before the project tree is refreshed, and is not disconnected until closing and re-opening it. Task-number: QTCREATORBUG-17743 Change-Id: Icc7e3fe547a698d6f63116ca148cf1f4f8b60777 Reviewed-by: Tobias Hunger --- src/plugins/projectexplorer/projecttree.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/projecttree.cpp b/src/plugins/projectexplorer/projecttree.cpp index 3e89539aac1..c87d19c5ff4 100644 --- a/src/plugins/projectexplorer/projecttree.cpp +++ b/src/plugins/projectexplorer/projecttree.cpp @@ -225,10 +225,16 @@ void ProjectTree::update(Node *node, Project *project) } } - if (!node && Core::EditorManager::currentDocument()) { - connect(Core::EditorManager::currentDocument(), &Core::IDocument::changed, - this, &ProjectTree::updateExternalFileWarning, - Qt::UniqueConnection); + if (Core::IDocument *document = Core::EditorManager::currentDocument()) { + if (node) { + disconnect(document, &Core::IDocument::changed, + this, &ProjectTree::updateExternalFileWarning); + document->infoBar()->removeInfo(EXTERNAL_FILE_WARNING); + } else { + connect(document, &Core::IDocument::changed, + this, &ProjectTree::updateExternalFileWarning, + Qt::UniqueConnection); + } } if (changedNode) { From 8ed4685b9903a97df9175e89584727981d1743eb Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 13 Feb 2017 12:27:57 +0100 Subject: [PATCH 2/5] Settings: Do not crash when jumping to filtered out category Task-number: QTCREATORBUG-17677 Change-Id: I95633a905d71b981e0bb72ce4af2a2fed605f39d Reviewed-by: Tobias Hunger --- src/plugins/coreplugin/dialogs/settingsdialog.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp index 05912c00872..2322a2486d4 100644 --- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp +++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp @@ -480,10 +480,16 @@ void SettingsDialog::showPage(const Id pageId) return; // Unknown settings page, probably due to missing plugin. if (initialCategoryIndex != -1) { - const QModelIndex modelIndex = m_proxyModel->mapFromSource(m_model->index(initialCategoryIndex)); + QModelIndex modelIndex = m_proxyModel->mapFromSource(m_model->index(initialCategoryIndex)); + if (!modelIndex.isValid()) { // filtered out, so clear filter first + m_filterLineEdit->setText(QString()); + modelIndex = m_proxyModel->mapFromSource(m_model->index(initialCategoryIndex)); + } m_categoryList->setCurrentIndex(modelIndex); - if (initialPageIndex != -1) - categories.at(initialCategoryIndex)->tabWidget->setCurrentIndex(initialPageIndex); + if (initialPageIndex != -1) { + if (QTC_GUARD(categories.at(initialCategoryIndex)->tabWidget)) + categories.at(initialCategoryIndex)->tabWidget->setCurrentIndex(initialPageIndex); + } } } From a7ed20faaa927ecfa7493757756cef35a5c4c33c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 14 Feb 2017 15:06:45 +0100 Subject: [PATCH 3/5] QbsProjectManager: Do not interpret Project::GeneratedFiles literally The files retrieved by calling Project::files() with this flag show up in the locator, in search results etc. So only consider files that we know to be human-readable. Task-number: QTCREATORBUG-17382 Change-Id: I7a66159e67207a09adb57b0c5584b0b067fd1fca Reviewed-by: Eike Ziller Reviewed-by: Nikolai Kosjar --- src/plugins/qbsprojectmanager/qbsproject.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index 3c3747d30c5..37fd8b633c5 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -174,8 +174,21 @@ static void collectFilesForProject(const qbs::ProjectData &project, Project::Fil } if (mode & Project::GeneratedFiles) { foreach (const qbs::ProductData &prd, project.products()) { - foreach (const qbs::ArtifactData &artifact, prd.generatedArtifacts()) - result.insert(artifact.filePath()); + foreach (const qbs::ArtifactData &artifact, prd.generatedArtifacts()) { + // A list of human-readable file types that we can reasonably expect + // to get generated during a build. Extend as needed. + static const QSet sourceTags = { + QLatin1String("c"), QLatin1String("cpp"), QLatin1String("hpp"), + QLatin1String("objc"), QLatin1String("objcpp"), + QLatin1String("c_pch_src"), QLatin1String("cpp_pch_src"), + QLatin1String("objc_pch_src"), QLatin1String("objcpp_pch_src"), + QLatin1String("asm"), QLatin1String("asm_cpp"), + QLatin1String("linkerscript"), + QLatin1String("qrc"), QLatin1String("java.java") + }; + if (artifact.fileTags().toSet().intersects(sourceTags)) + result.insert(artifact.filePath()); + } } } } From cf091e5c3e033de7445647631fb73cffe86e935e Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 16 Feb 2017 12:38:35 +0100 Subject: [PATCH 4/5] Git: Initialize members of StashInfo Change-Id: I20e644d61163bb91addcfe16a58692cfacb988d3 Reviewed-by: Orgad Shaneh --- src/plugins/git/gitclient.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index 869ed366226..70439c862f9 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -114,10 +114,10 @@ public: void stashPrompt(const QString &command, const QString &statusOutput, QString *errorMessage); void executeStash(const QString &command, QString *errorMessage); - StashResult m_stashResult; + StashResult m_stashResult = NotStashed; QString m_message; QString m_workingDir; - StashFlag m_flags; + StashFlag m_flags = Default; PushAction m_pushAction = NoPush; }; From 7ee75bf4c21bac6992f0d63bf2ce850828a39eb0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 17 Feb 2017 13:01:16 +0100 Subject: [PATCH 5/5] Update qbs submodule To HEAD of 1.7 branch. Change-Id: I81eb7e5d2bfd70382d4f3f672f07a403eacaada7 Reviewed-by: Joerg Bornemann --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index 6deab2a1031..01eb6c948f1 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 6deab2a10313ea7a7cf5ebb1be56384f5bc71368 +Subproject commit 01eb6c948f13d33e1373251de7ca2262916766b8