From 9dd6b59983b607aacd3b582ea6ed3970f82f945f Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 6 Oct 2021 10:36:52 +0200 Subject: [PATCH 1/7] Bump version to 5.0.3 Change-Id: Iba72b6b0ff1d13a35b6d7473b0617ecb80afa164 Reviewed-by: Eike Ziller --- cmake/QtCreatorIDEBranding.cmake | 4 ++-- qbs/modules/qtc/qtc.qbs | 4 ++-- qtcreator_ide_branding.pri | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index 5d19f3fcc4e..2edbc46eedd 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,6 +1,6 @@ -set(IDE_VERSION "5.0.2") # The IDE version. +set(IDE_VERSION "5.0.3") # The IDE version. set(IDE_VERSION_COMPAT "5.0.0") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "5.0.2") # The IDE display version. +set(IDE_VERSION_DISPLAY "5.0.3") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2021") # The IDE current copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 587b66df3c5..40d02fc9279 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -3,10 +3,10 @@ import qbs.Environment import qbs.FileInfo Module { - property string qtcreator_display_version: '5.0.2' + property string qtcreator_display_version: '5.0.3' property string ide_version_major: '5' property string ide_version_minor: '0' - property string ide_version_release: '2' + property string ide_version_release: '3' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release diff --git a/qtcreator_ide_branding.pri b/qtcreator_ide_branding.pri index e685d1488f5..1ab94df1f26 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 5.0.2 +QTCREATOR_VERSION = 5.0.3 QTCREATOR_COMPAT_VERSION = 5.0.0 -QTCREATOR_DISPLAY_VERSION = 5.0.2 +QTCREATOR_DISPLAY_VERSION = 5.0.3 QTCREATOR_COPYRIGHT_YEAR = 2021 IDE_DISPLAY_NAME = Qt Creator From 7d5c9be52b94f15bdc9c56799e81ae241535fd38 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Mon, 4 Oct 2021 17:29:39 +0200 Subject: [PATCH 2/7] qmljseditor: fix crash at shutdown Change-Id: Ifae7ec5f378c0b2d3e667bd26a509fbcbefadecf Reviewed-by: Thomas Hartmann Reviewed-by: Kai Koehne --- src/plugins/qmljseditor/qmljseditorplugin.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index e0d57031020..59cafdcfc19 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -110,6 +110,7 @@ QmlJSEditorPlugin::QmlJSEditorPlugin() QmlJSEditorPlugin::~QmlJSEditorPlugin() { + delete QmlJS::Icons::instance(); // delete object held by singleton delete d; d = nullptr; m_instance = nullptr; @@ -226,8 +227,6 @@ void QmlJSEditorPlugin::extensionsInitialized() ExtensionSystem::IPlugin::ShutdownFlag QmlJSEditorPlugin::aboutToShutdown() { - delete QmlJS::Icons::instance(); // delete object held by singleton - return IPlugin::aboutToShutdown(); } From 1cc4cbb402a8c1066416152c881d8586b3b9816c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Wed, 6 Oct 2021 22:28:22 +0200 Subject: [PATCH 3/7] Debugger: Tests: Fix warnings To not confuse testers. Change-Id: I2190e85cea5b0e32af883d8caa368aef0f55befc Reviewed-by: hjk --- tests/manual/debugger/simple/simple_test_app.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index cbe4294389d..d4df6f0411b 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -4433,7 +4433,11 @@ namespace qvariant { // FIXME: Known to break //QString type = var.typeName(); var.setValue(my); +#if QT_VERSION >= 0x051500 + const char *name = QMetaType(var.userType()).name(); +#else const char *name = QMetaType::typeName(var.userType()); +#endif BREAK_HERE; // Expand my my.0 my.0.value my.1 my.1.value var var.data var.data.0 var.data.0.value var.data.1 var.data.1.value. // Check my <2 items> qvariant::MyType. @@ -4706,6 +4710,7 @@ namespace noargs { { public: Goo(const QString &str, const int n) : str_(str), n_(n) {} + int n() {return n_;} private: QString str_; int n_; @@ -5459,7 +5464,7 @@ namespace basic { const int &b = a; typedef int &Ref; const int c = 44; - const Ref d = a; + Ref d = a; BREAK_HERE; // Check a 43 int. // Check b 43 int &. @@ -5475,7 +5480,7 @@ namespace basic { const QString &b = fooxx(); typedef QString &Ref; const QString c = "world"; - const Ref d = a; + Ref d = a; BREAK_HERE; // Check a "hello" QString. // Check b "bababa" QString &. @@ -5489,7 +5494,7 @@ namespace basic { { const QString &b = a; typedef QString &Ref; - const Ref d = const_cast(a); + Ref d = const_cast(a); BREAK_HERE; // Check a "hello" QString &. // Check b "hello" QString &. From 47cb2e9d245db1cff18bea42512a1c1a717a43e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Thu, 8 Jul 2021 14:22:03 +0200 Subject: [PATCH 4/7] Squish: Update and stabilize tst_rename_file Change-Id: I1dae24e20d8c65b716dd988812eee013f0491603 Reviewed-by: Christian Stenger --- tests/system/suite_general/tst_rename_file/test.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/system/suite_general/tst_rename_file/test.py b/tests/system/suite_general/tst_rename_file/test.py index 5f867f1f983..413e0385b43 100644 --- a/tests/system/suite_general/tst_rename_file/test.py +++ b/tests/system/suite_general/tst_rename_file/test.py @@ -111,10 +111,18 @@ def renameFile(projectDir, proFile, branch, oldname, newname): " windowTitle='Rename More Files?'}}")) test.verify(waitFor("os.path.exists(newFilePath)", 1000), "Verify that file with new name exists: %s" % newFilePath) - test.compare(readFile(newFilePath), oldFileText, - "Comparing content of file before and after renaming") test.verify(waitFor("' ' + newname in safeReadFile(proFile)", 2000), "Verify that new filename '%s' was added to pro-file." % newname) + if oldname.endswith(".h"): + # Creator updates include guards in renamed header files and changes line breaks + oldFileText = oldFileText.replace("\r\n", "\n") + includeGuard = " " + newname.upper().replace(".", "_") + if not includeGuard.endswith("_H"): + includeGuard += "_H" + oldFileText = oldFileText.replace(" " + oldname.upper().replace(".", "_"), includeGuard) + waitFor("includeGuard in safeReadFile(newFilePath)", 2000) + test.compare(readFile(newFilePath), oldFileText, + "Comparing content of file before and after renaming") if oldname not in newname: test.verify(oldname not in readFile(proFile), "Verify that old filename '%s' was removed from pro-file." % oldname) From cbc9f4c4e1f4a64b33d8f516f25cf2ba21d2716e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Tue, 13 Jul 2021 00:31:49 +0200 Subject: [PATCH 5/7] Squish: Stabilize tst_rename_file It takes a moment until the changed file appears in the project tree. A context menu opened in that time may be in an unexpected state, so wait until the renaming finished properly. Change-Id: I6e1941083737b2df5855b9b0e61a973c99831304 Reviewed-by: Christian Stenger --- .../suite_general/tst_rename_file/test.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/system/suite_general/tst_rename_file/test.py b/tests/system/suite_general/tst_rename_file/test.py index 413e0385b43..7d846d3013d 100644 --- a/tests/system/suite_general/tst_rename_file/test.py +++ b/tests/system/suite_general/tst_rename_file/test.py @@ -87,14 +87,16 @@ def renameFile(projectDir, proFile, branch, oldname, newname): oldFilePath = os.path.join(projectDir, oldname) newFilePath = os.path.join(projectDir, newname) oldFileText = readFile(oldFilePath) - itemText = branch + "." + oldname.replace(".", "\\.") + oldItemText = branch + "." + oldname.replace(".", "\\.") + newItemText = branch + "." + newname.replace(".", "\\.") treeview = waitForObject(":Qt Creator_Utils::NavigationTreeView") try: - openItemContextMenu(treeview, itemText, 5, 5, 0) + openItemContextMenu(treeview, oldItemText, 5, 5, 0) except: - itemWithWildcard = addBranchWildcardToRoot(itemText) - waitForObjectItem(treeview, itemWithWildcard, 10000) - openItemContextMenu(treeview, itemWithWildcard, 5, 5, 0) + oldItemText = addBranchWildcardToRoot(oldItemText) + newItemText = addBranchWildcardToRoot(newItemText) + waitForObjectItem(treeview, oldItemText, 10000) + openItemContextMenu(treeview, oldItemText, 5, 5, 0) if oldname.lower().endswith(".qrc"): menu = ":Qt Creator.Project.Menu.Folder_QMenu" else: @@ -130,6 +132,13 @@ def renameFile(projectDir, proFile, branch, oldname, newname): test.verify(oldname not in os.listdir(projectDir), "Verify that file with old name does not exist: %s" % oldFilePath) + if newItemText.endswith("\\.qml"): + newItemText = newItemText.replace(".Other files.", ".QML.") + else: + newItemText = newItemText.replace(".QML.", ".Other files.") + waitForObjectItem(treeview, newItemText) + + def safeReadFile(filename): text = "" while text == "": From 69fbe0ab906fe877a3aac8863492bf66f4e6073a Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 7 Oct 2021 10:23:34 +0200 Subject: [PATCH 6/7] ImageViewer: Fix crash when opening invalid movie MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Qt 6 sends the finished signal directly from QMovie::start, so if we connect QMovie::finished directly to QMovie::start, we end up in an endless recursion and stack exhaustion. Use a queued connection, and do not restart a movie if it went invalid. Fixes: QTCREATORBUG-26377 Change-Id: I9980615f44d0cf7e92f85c010427bd6b67046949 Reviewed-by: Robert Löhning Reviewed-by: Alessandro Portale Reviewed-by: Qt CI Bot --- src/plugins/imageviewer/imageviewerfile.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/imageviewer/imageviewerfile.cpp b/src/plugins/imageviewer/imageviewerfile.cpp index 2a6204e11d8..3fe26890d0d 100644 --- a/src/plugins/imageviewer/imageviewerfile.cpp +++ b/src/plugins/imageviewer/imageviewerfile.cpp @@ -126,7 +126,15 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString, m_type = TypeMovie; m_movie = new QMovie(fileName, QByteArray(), this); m_movie->setCacheMode(QMovie::CacheAll); - connect(m_movie, &QMovie::finished, m_movie, &QMovie::start); + connect( + m_movie, + &QMovie::finished, + m_movie, + [this] { + if (m_movie->isValid()) + m_movie->start(); + }, + Qt::QueuedConnection); connect(m_movie, &QMovie::resized, this, &ImageViewerFile::imageSizeChanged); m_movie->start(); m_isPaused = false; // force update From 7c2121bcfdff8a652b9cb6d190829af0be62cf5f Mon Sep 17 00:00:00 2001 From: Johanna Vanhatapio Date: Fri, 8 Oct 2021 14:58:44 +0300 Subject: [PATCH 7/7] Doc: Fix the file name for directional light Change-Id: Idd70918270f12371cf6dc6215047ef612616b4ec Reviewed-by: Mahmoud Badri --- .../src/qtquick3d-editor/qtdesignstudio-3d-lights.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-lights.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-lights.qdoc index 239a168970f..8fd1539d51e 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-lights.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-lights.qdoc @@ -60,7 +60,7 @@ \li More Information \row - \li \inlineimage spot.png + \li \inlineimage directional.png \li Directional Light \li \li \l{DirectionalLight}{Light Directional}