diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-10-08 15:58:02 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-10-08 15:58:02 +0200 |
commit | 7bb21fcfff2b0fe6c6248ff85cdafae452ef7c8c (patch) | |
tree | 99e8ecdf74cca06f1ba9915ff96028f48edddf01 | |
parent | e454c918386c42478454cb64dde841fe4c49e18c (diff) | |
parent | 7c2121bcfdff8a652b9cb6d190829af0be62cf5f (diff) |
Merge remote-tracking branch 'origin/5.0' into 6.0
Conflicts:
cmake/QtCreatorIDEBranding.cmake
qbs/modules/qtc/qtc.qbs
qtcreator_ide_branding.pri
Change-Id: I87b19a51b1950d19eff95086848b0728ba2f0ebd
5 files changed, 43 insertions, 14 deletions
diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-lights.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-lights.qdoc index 239a168970..8fd1539d51 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} diff --git a/src/plugins/imageviewer/imageviewerfile.cpp b/src/plugins/imageviewer/imageviewerfile.cpp index 2a6204e11d..3fe26890d0 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 diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index e0d5703102..59cafdcfc1 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(); } diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index cbe4294389..d4df6f0411 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<Ref>(a); + Ref d = const_cast<Ref>(a); BREAK_HERE; // Check a "hello" QString &. // Check b "hello" QString &. diff --git a/tests/system/suite_general/tst_rename_file/test.py b/tests/system/suite_general/tst_rename_file/test.py index 5f867f1f98..7d846d3013 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: @@ -111,10 +113,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) @@ -122,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 == "": |