From fefce829ad6b824dd8425ec16bf160c987ca20e3 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 13 Apr 2018 15:36:24 +0200 Subject: [PATCH 1/9] Qmake: Invalidate contents of QmakeVfs on target change Task-number: QTCREATORBUG-20113 Change-Id: I13cd3749a942cc06172dd63f163bff88490a44ed Reviewed-by: Oswald Buddenhagen --- src/plugins/qmakeprojectmanager/qmakeproject.cpp | 10 ++++++++-- src/plugins/qmakeprojectmanager/qmakeproject.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 1bc2feaa94e..17ae3995f26 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -562,7 +562,12 @@ void QmakeProject::asyncUpdate() { m_asyncUpdateTimer.setInterval(UPDATE_INTERVAL); - m_qmakeVfs->invalidateCache(); + if (m_invalidateQmakeVfsContents) { + m_invalidateQmakeVfsContents = false; + m_qmakeVfs->invalidateContents(); + } else { + m_qmakeVfs->invalidateCache(); + } Q_ASSERT(!m_asyncUpdateFutureInterface); m_asyncUpdateFutureInterface = new QFutureInterface(); @@ -588,7 +593,7 @@ void QmakeProject::asyncUpdate() void QmakeProject::buildFinished(bool success) { if (success) - m_qmakeVfs->invalidateContents(); + m_invalidateQmakeVfsContents = true; } bool QmakeProject::supportsKit(const Kit *k, QString *errorMessage) const @@ -819,6 +824,7 @@ void QmakeProject::activeTargetWasChanged() } m_activeTarget = activeTarget(); + m_invalidateQmakeVfsContents = true; if (!m_activeTarget) return; diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.h b/src/plugins/qmakeprojectmanager/qmakeproject.h index 580b750aade..f9001ac420f 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.h +++ b/src/plugins/qmakeprojectmanager/qmakeproject.h @@ -181,6 +181,7 @@ private: // cached data during project rescan std::unique_ptr m_qmakeGlobals; int m_qmakeGlobalsRefCnt = 0; + bool m_invalidateQmakeVfsContents = false; QString m_qmakeSysroot; From d75142732658c92303ae56f674276be1638672f0 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 16 Apr 2018 16:18:15 +0200 Subject: [PATCH 2/9] Add first changes file for 4.6.1 Change-Id: Id708d396cfbd285b96f07a1cb4f0b95029879ec8 Reviewed-by: Leena Miettinen --- dist/changes-4.6.1.md | 77 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 dist/changes-4.6.1.md diff --git a/dist/changes-4.6.1.md b/dist/changes-4.6.1.md new file mode 100644 index 00000000000..091d36ba683 --- /dev/null +++ b/dist/changes-4.6.1.md @@ -0,0 +1,77 @@ +Qt Creator version 4.6.1 contains bug fixes. + +The most important changes are listed in this document. For a complete +list of changes, see the Git log for the Qt Creator sources that +you can check out from the public Git repository. For example: + + git clone git://code.qt.io/qt-creator/qt-creator.git + git log --cherry-pick --pretty=oneline v4.6.0..v4.6.1 + +General + +* Locator + * Fixed min and max functions when using more than two arguments + in JavaScript filter (QTCREATORBUG-20167) + +Editing + +* Fixed crash when closing file with generic highlighting (QTCREATORBUG-20247) + +All Projects + +* Fixed that `.qrc` files were not listed as project files in Locator and + searches (QTCREATORBUG-20220) + +QMake Projects + +* Fixed that run and build buttons could stay disabled after project parsing + (QTCREATORBUG-20203) + +CMake Projects + +* Fixed that build steps for `clean` were missing (QTCREATORBUG-19823) + +Qbs Projects + +* Fixed performance issue (QTCREATORBUG-20175) + +C++ Support + +* Clang Code Model + * Fixed issue with parsing type_traits from GCC 7 (QTCREATORBUG-18757) + * Fixed warnings about unknown warning options (QTCREATORBUG-17460) + * Fixed wrong warning about overriding files from precompiled headers + (QTCREATORBUG-20125) + +QML Support + +* Made Qt 5.11 known to wizards + +Debugging + +* Fixed pointer address value for arrays +* QML + * Fixed that `console.info` was not shown in Debugger Console + (QTCREATORBUG-20117) + +QML Profiler + +* Fixed issue with spaces in path (QTCREATORBUG-20260) + +Qt Quick Designer + +* Fixed issue with `AbstractButton` enums +* Fixed issue with deferred properties + +Test Integration + +* Fixed issue with non-ASCII characters in Qt Quick test output + (QTCREATORBUG-20105) + +Platform Specific + +Android + +* Fixed deployment issue for 32-bit applications (QTCREATORBUG-20084) +* Fixed crash when trying to set up a broken NDK (QTCREATORBUG-20217) +* Fixed debugging on Android 8 or later From d21c508b0abd67321c4c01d4a5ac23c10891272b Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 17 Apr 2018 08:00:11 +0200 Subject: [PATCH 3/9] Squish: Remove dead code Change-Id: Ic24c9db0b923409026d92b87b246694dde8968db Reviewed-by: Robert Loehning --- tests/system/shared/classes.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py index d06398a159b..c18173eea61 100644 --- a/tests/system/shared/classes.py +++ b/tests/system/shared/classes.py @@ -193,18 +193,6 @@ class Qt5Path: @staticmethod def __createPlatformQtPath__(qt5Minor): - # special handling for Qt5.2 - if qt5Minor == 2: - if platform.system() in ('Microsoft', 'Windows'): - return "C:/Qt/Qt5.2.1/5.2.1/msvc2010" - elif platform.system() == 'Linux': - if __is64BitOS__(): - return os.path.expanduser("~/Qt5.2.1/5.2.1/gcc_64") - else: - return os.path.expanduser("~/Qt5.2.1/5.2.1/gcc") - else: - return os.path.expanduser("~/Qt5.2.1/5.2.1/clang_64") - # Qt5.3+ if platform.system() in ('Microsoft', 'Windows'): return "C:/Qt/Qt5.%d.1" % qt5Minor else: From 3eeaf965e8f7fb00044a623c2236cab803abb2b4 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 16 Apr 2018 14:40:59 +0200 Subject: [PATCH 4/9] Squish: Fix property name in tst_WELP03 Squish 6.2 still accepts both property names but Squish 6.3 is more strict. Change-Id: I390af974425242d1f766853b80870dcb1948ef92 Reviewed-by: Christian Stenger --- tests/system/suite_WELP/tst_WELP03/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/suite_WELP/tst_WELP03/test.py b/tests/system/suite_WELP/tst_WELP03/test.py index 34d0de76aa0..b6d4e1c9400 100644 --- a/tests/system/suite_WELP/tst_WELP03/test.py +++ b/tests/system/suite_WELP/tst_WELP03/test.py @@ -80,7 +80,7 @@ def main(): expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'", "examples list"), ("QLineEdit", "placeholderText='Search in Examples...'", "examples search line edit"), - ("QComboBox", "text~='.*Qt.*' visible='1'", "Qt version combo box")) + ("QComboBox", "currentText~='.*Qt.*' visible='1'", "Qt version combo box")) search = "{type='%s' %s}" test.verify(all(map(checkIfObjectExists, (search % (exp[0], exp[1]) for exp in expect))), "Verifying: 'Examples' topic is opened and the examples are shown.") From bb0358cc6882546ce558608d65994fa4761ee739 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 17 Apr 2018 18:28:27 +0200 Subject: [PATCH 5/9] Squish: Add expected error message for MSVC2015 Change-Id: Id1ace17486af21c4c0786859178c3a82d6e05145 Reviewed-by: Christian Stenger --- tests/system/suite_SCOM/tst_SCOM04/test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/system/suite_SCOM/tst_SCOM04/test.py b/tests/system/suite_SCOM/tst_SCOM04/test.py index 5698cae8eb7..e7136cb0d44 100644 --- a/tests/system/suite_SCOM/tst_SCOM04/test.py +++ b/tests/system/suite_SCOM/tst_SCOM04/test.py @@ -32,6 +32,7 @@ def main(): expectedErrorAlternatives = ["'SyntaxError' was not declared in this scope", "\xe2\x80\x98SyntaxError\xe2\x80\x99 was not declared in this scope", "'SyntaxError' : undeclared identifier", + '"SyntaxError" : undeclared identifier', "use of undeclared identifier 'SyntaxError'", "unknown type name 'SyntaxError'"] startApplication("qtcreator" + SettingsPath) From 3309ed878391a8b61414b0d3ac1b534366791da6 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 17 Apr 2018 16:59:42 +0200 Subject: [PATCH 6/9] Android: Add 'inline' to static function in header Clang complains with a warning otherwise Change-Id: Ia833529e4c37bb8c68d5445a04a7602481571a95 Reviewed-by: Vikas Pachdha --- src/plugins/android/androidrunnerworker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/android/androidrunnerworker.h b/src/plugins/android/androidrunnerworker.h index 7a5c6614b85..686104758c7 100644 --- a/src/plugins/android/androidrunnerworker.h +++ b/src/plugins/android/androidrunnerworker.h @@ -42,7 +42,7 @@ namespace Internal { const int MIN_SOCKET_HANDSHAKE_PORT = 20001; -static void deleter(QProcess *p) +static inline void deleter(QProcess *p) { p->terminate(); if (!p->waitForFinished(1000)) { From 0f090890a99f5bbd244c5537755f5c257b23805e Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 18 Apr 2018 10:25:29 +0200 Subject: [PATCH 7/9] Disable help search widget while indexing documentation If you try to search while indexing, in the best case you'd get incomplete results (though with a warning that that is the case), and in the worst case it crashes because of QTBUG-66816. So just disable the search widget with info and progress indicator in that case. Task-number: QTCREATORBUG-20295 Change-Id: Ibec602b1bc0e98f6fef029c6f10c0cdc5197294c Reviewed-by: Robert Loehning --- src/plugins/help/searchwidget.cpp | 26 ++++++++++++++++++++++---- src/plugins/help/searchwidget.h | 6 ++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/plugins/help/searchwidget.cpp b/src/plugins/help/searchwidget.cpp index 7d275fa0d54..c3bcd1c314d 100644 --- a/src/plugins/help/searchwidget.cpp +++ b/src/plugins/help/searchwidget.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -43,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -112,11 +114,14 @@ void SearchWidget::showEvent(QShowEvent *event) Utils::StyledBar *toolbar = new Utils::StyledBar(this); toolbar->setSingleRow(false); - QHelpSearchQueryWidget *queryWidget = searchEngine->queryWidget(); + m_queryWidget = searchEngine->queryWidget(); QLayout *tbLayout = new QVBoxLayout(); tbLayout->setSpacing(6); tbLayout->setMargin(4); - tbLayout->addWidget(queryWidget); + tbLayout->addWidget(m_queryWidget); + m_indexingDocumentationLabel = new QLabel(tr("Indexing Documentation"), toolbar); + m_indexingDocumentationLabel->hide(); + tbLayout->addWidget(m_indexingDocumentationLabel); toolbar->setLayout(tbLayout); Utils::StyledBar *toolbar2 = new Utils::StyledBar(this); @@ -127,12 +132,17 @@ void SearchWidget::showEvent(QShowEvent *event) tbLayout->addWidget(resultWidget = searchEngine->resultWidget()); toolbar2->setLayout(tbLayout); + m_indexingIndicator = new Utils::ProgressIndicator(Utils::ProgressIndicatorSize::Medium, + resultWidget); + m_indexingIndicator->attachToWidget(resultWidget); + m_indexingIndicator->hide(); + vLayout->addWidget(toolbar); vLayout->addWidget(toolbar2); - setFocusProxy(queryWidget); + setFocusProxy(m_queryWidget); - connect(queryWidget, &QHelpSearchQueryWidget::search, this, &SearchWidget::search); + connect(m_queryWidget, &QHelpSearchQueryWidget::search, this, &SearchWidget::search); connect(resultWidget, &QHelpSearchResultWidget::requestShowLink, this, [this](const QUrl &url) { emit linkActivated(url, currentSearchTerms(), false/*newPage*/); @@ -205,6 +215,10 @@ void SearchWidget::indexingStarted() m_watcher.setFuture(m_progress->future()); connect(&m_watcher, &QFutureWatcherBase::canceled, searchEngine, &QHelpSearchEngine::cancelIndexing); + + m_queryWidget->hide(); + m_indexingDocumentationLabel->show(); + m_indexingIndicator->show(); } void SearchWidget::indexingFinished() @@ -213,6 +227,10 @@ void SearchWidget::indexingFinished() delete m_progress; m_progress = NULL; + + m_queryWidget->show(); + m_indexingDocumentationLabel->hide(); + m_indexingIndicator->hide(); } bool SearchWidget::eventFilter(QObject *o, QEvent *e) diff --git a/src/plugins/help/searchwidget.h b/src/plugins/help/searchwidget.h index e0ad8ebab56..6464099d5aa 100644 --- a/src/plugins/help/searchwidget.h +++ b/src/plugins/help/searchwidget.h @@ -33,10 +33,13 @@ QT_BEGIN_NAMESPACE class QHelpSearchEngine; +class QHelpSearchQueryWidget; class QHelpSearchResultWidget; class QUrl; QT_END_NAMESPACE +namespace Utils { class ProgressIndicator; } + namespace Help { namespace Internal { @@ -93,6 +96,9 @@ private: QHelpSearchEngine *searchEngine; QHelpSearchResultWidget *resultWidget; + QHelpSearchQueryWidget *m_queryWidget; + QWidget *m_indexingDocumentationLabel; + Utils::ProgressIndicator *m_indexingIndicator; }; } // namespace Internal From cc0c7f2ccde5765132629f1bf77477d951c913ab Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 18 Apr 2018 09:06:42 +0200 Subject: [PATCH 8/9] Squish: Fix provided test settings for macOS Change-Id: Idec36e178d448015efa6d0ff73a4d17eba6ba76e Reviewed-by: Robert Loehning --- tests/system/settings/mac/QtProject/qtcreator/profiles.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/settings/mac/QtProject/qtcreator/profiles.xml b/tests/system/settings/mac/QtProject/qtcreator/profiles.xml index c7548b95d16..f64b5ba0550 100644 --- a/tests/system/settings/mac/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/mac/QtProject/qtcreator/profiles.xml @@ -18,7 +18,7 @@ ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371} - 4 + 2 :///DESKTOP/// {f16848fc-b615-43b5-b0cc-16a9f57fb573} @@ -112,7 +112,7 @@ Profile.Default - {a1e860d1-c241-4abf-80fe-cf0c9f0a43b3} + {fc5f34fd-e703-4f4c-85ce-ea5bf5869e6a} Version From 717c7bfd9f14c6928f231f522078a8ba333810a1 Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Wed, 18 Apr 2018 10:40:54 +0200 Subject: [PATCH 9/9] Android: Add explicit tag for google_apis system images Task-number: QTCREATORBUG-20298 Change-Id: I9bc4d9192584ffbc1180ae7b69f334c915ca16f4 Reviewed-by: BogDan Vatra --- src/plugins/android/androidavdmanager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/androidavdmanager.cpp b/src/plugins/android/androidavdmanager.cpp index 5af95e7a260..954053b08bc 100644 --- a/src/plugins/android/androidavdmanager.cpp +++ b/src/plugins/android/androidavdmanager.cpp @@ -53,6 +53,7 @@ const char avdInfoPathKey[] = "Path:"; const char avdInfoAbiKey[] = "abi.type"; const char avdInfoTargetKey[] = "target"; const char avdInfoErrorKey[] = "Error:"; +const char googleApiTag[] = "google_apis"; const int avdCreateTimeoutMs = 30000; @@ -111,13 +112,17 @@ static CreateAvdInfo createAvdCommand(const AndroidConfig config, const CreateAv return result; } - QStringList arguments({"create", "avd", "-k", result.sdkPlatform->sdkStylePath(), "-n", result.name}); + QStringList arguments({"create", "avd", "-n", result.name}); if (!result.abi.isEmpty()) { SystemImage *image = Utils::findOrDefault(result.sdkPlatform->systemImages(), Utils::equal(&SystemImage::abiName, result.abi)); if (image && image->isValid()) { arguments << "-k" << image->sdkStylePath(); + // Google api system images requires explicit abi as + // google-apis/ABI or --tag "google-apis" + if (image->sdkStylePath().contains(googleApiTag)) + arguments << "--tag" << googleApiTag; } else { QString name = result.sdkPlatform->displayText(); qCDebug(avdManagerLog) << "AVD Create failed. Cannot find system image for the platform"