diff --git a/dist/changelog/changes-12.0.0.md b/dist/changelog/changes-12.0.0.md index 944a3451aec..177ae477ff0 100644 --- a/dist/changelog/changes-12.0.0.md +++ b/dist/changelog/changes-12.0.0.md @@ -71,7 +71,15 @@ General without a unified menu bar ([QTCREATORBUG-29498](https://bugreports.qt.io/browse/QTCREATORBUG-29498)) ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-show-and-hide-main-menu.html)) +* Changed the `Enable high DPI scaling` setting to a `DPI rounding policy` + setting, which fits Qt's settings better + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-set-high-dpi-scaling.html)) * Fixed an issue with growing session files +* Fixed that the shortcuts for the navigation views could be stuck to opening a + view in the right side bar + ([QTCREATORBUG-29770](https://bugreports.qt.io/browse/QTCREATORBUG-29770)) +* Fixed that the shortcut for Locator switched to the main window + ([QTCREATORBUG-29741](https://bugreports.qt.io/browse/QTCREATORBUG-29741)) Help ---- @@ -90,6 +98,7 @@ Editing ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-coding-navigating.html#navigating-between-open-files-and-symbols)) * Added an indenter, auto-brace and auto-quote for JSON ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-enclose-code-in-characters.html)) +* Improved the performance of searching in big documents * Fixed that the historical order of open documents was not restored * Fixed that suggestions were rendered with the wrong tab size ([QTCREATORBUG-29483](https://bugreports.qt.io/browse/QTCREATORBUG-29483)) @@ -119,8 +128,17 @@ Editing * Fixed that automatically created functions could be added between another function and its documentation ([QTCREATORBUG-6934](https://bugreports.qt.io/browse/QTCREATORBUG-6934)) -* Fixed that the refactoring actions from Clangd were not available in the - context menu +* Fixed that scope names were considered when searching for `C++ Symbols` with + advanced find + ([QTCREATORBUG-29133](https://bugreports.qt.io/browse/QTCREATORBUG-29133)) +* Clangd + * Added the `Completion ranking model` option for choosing the order of + completion results + ([QTCREATORBUG-29013](https://bugreports.qt.io/browse/QTCREATORBUG-29013)) + * Fixed that the refactoring actions from Clangd were not available in the + context menu + * Fixed that renaming symbols could rename them in generated files + ([QTCREATORBUG-29778](https://bugreports.qt.io/browse/QTCREATORBUG-29778)) * Clang Format * Fixed the style settings for Clang Format 16 and later ([QTCREATORBUG-29434](https://bugreports.qt.io/browse/QTCREATORBUG-29434)) @@ -144,11 +162,18 @@ Editing of files ([QTCREATORBUG-29542](https://bugreports.qt.io/browse/QTCREATORBUG-29542)) +### Widget Designer + +* Fixed that renaming layouts in the property editor switched to edit mode + ([QTCREATORBUG-29644](https://bugreports.qt.io/browse/QTCREATORBUG-29644)) + ### Copilot * Added support for proxies ([QTCREATORBUG-29485](https://bugreports.qt.io/browse/QTCREATORBUG-29485)) ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-copilot.html)) +* Fixed the auto-detection of `agent.js` + ([QTCREATORBUG-29750](https://bugreports.qt.io/browse/QTCREATORBUG-29750)) ### TODO @@ -207,6 +232,15 @@ Projects * Added help tooltips ([QTCREATORBUG-25780](https://bugreports.qt.io/browse/QTCREATORBUG-25780)) * Extended context help for variables, properties and modules +* Improved performance when switching sessions + ([QTCREATORBUG-27729](https://bugreports.qt.io/browse/QTCREATORBUG-27729)) +* Fixed issues with the subdirectory structure of the project tree + ([QTCREATORBUG-23942](https://bugreports.qt.io/browse/QTCREATORBUG-23942), + [QTCREATORBUG-29105](https://bugreports.qt.io/browse/QTCREATORBUG-29105)) +* Presets + * Fixed that variables were not expanded for `cmakeExecutable` + ([QTCREATORBUG-29643](https://bugreports.qt.io/browse/QTCREATORBUG-29643)) + * Fixed unnecessary restrictions on the preset name ### Python @@ -217,6 +251,11 @@ Projects ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-run-settings.html#specifying-run-settings-for-linux-based-devices)) * Fixed PySide wheels installation on macOS +### qmake + +* Fixed the project tree structure in case of some subfolder structures + ([QTCREATORBUG-29733](https://bugreports.qt.io/browse/QTCREATORBUG-29733)) + ### vcpkg * Added the generation of code for `CMakeLists.txt` @@ -244,6 +283,8 @@ Analyzer * Fixed that error messages were not shown ([QTCREATORBUG-29298](https://bugreports.qt.io/browse/QTCREATORBUG-29298)) +* Fixed that `-mno-direct-extern-access` could be passed to `clang-tidy` which + does not support it ### CTF Visualizer @@ -263,8 +304,10 @@ Version Control Systems ### Git -* Added option for ignoring whitespace changes and line moves in `Instant Blame` +* Added the `Ignore whitespace changes` and `Ignore line moves` options to + `Preferences > Version Control > Git > Instant Blame` ([QTCREATORBUG-29378](https://bugreports.qt.io/browse/QTCREATORBUG-29378)) + ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-vcs-git.html)) ### CVS @@ -275,6 +318,23 @@ Test Integration * Added an option for the number of threads used for scanning ([QTCREATORBUG-29301](https://bugreports.qt.io/browse/QTCREATORBUG-29301)) +* Improved the wizards for `GTest` and `Catch2` + +Platforms +--------- + +### Android + +* Fixed issues when `LIBRARY_OUTPUT_DIRECTORY` is set in the CMake build files + ([QTCREATORBUG-26479](https://bugreports.qt.io/browse/QTCREATORBUG-26479)) + +### iOS + +* Known Issue: iOS 17 devices are not supported + +### Docker + +* Fixed the check for commands that are built-ins of the shell Credits for these changes go to: -------------------------------- @@ -304,6 +364,7 @@ Jonas Karlsson Jussi Witick Knud Dollereder Leena Miettinen +Ludovic Le Brun Mahmoud Badri Marco Bubke Marcus Tillmanns @@ -317,6 +378,7 @@ Pranta Dastider Robert Löhning Sami Shalayel Samuel Ghinet +Samuli Piippo Semih Yavuz Tasuku Suzuki Thiago Macieira diff --git a/doc/qtcreator/images/qtcreator-preferences-testing-general.webp b/doc/qtcreator/images/qtcreator-preferences-testing-general.webp index 0b92925e6a1..8fb41b64f7d 100644 Binary files a/doc/qtcreator/images/qtcreator-preferences-testing-general.webp and b/doc/qtcreator/images/qtcreator-preferences-testing-general.webp differ diff --git a/doc/qtcreator/images/qtcreator-preferences-vcs-git.webp b/doc/qtcreator/images/qtcreator-preferences-vcs-git.webp index 1d76dc557bc..bb450df15c9 100644 Binary files a/doc/qtcreator/images/qtcreator-preferences-vcs-git.webp and b/doc/qtcreator/images/qtcreator-preferences-vcs-git.webp differ diff --git a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc index 47611d26c3f..8d72d3ba896 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc @@ -406,6 +406,10 @@ \uicontrol {Active Test Frameworks} list. By default, \QC groups tests that are in the same directory. + By default, \QC uses a quarter of the available logical CPUs when + scanning for tests. You can set the amount of worker threads used + in \uicontrol {Scan threads}. + \QC omits internal messages and run configuration warnings for deduced configurations by default. To view them, deselect the \uicontrol {Omit internal messages} and diff --git a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc index ee1ba25ed15..9f5f79f3910 100644 --- a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc +++ b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc @@ -144,9 +144,13 @@ By default, each line is annotated in the editor when you scroll through the file. To disable this feature, select \preferences > \uicontrol {Version Control} > \uicontrol Git, and - deselect \uicontrol {Add instant blame annotations to editor}. To view - annotations for the current line, select \uicontrol Tools > \uicontrol Git > - \uicontrol {Current File} > \uicontrol {Instant Blame}. + deselect \uicontrol {Instant Blame}. To find the commit that introduced + the last real code change, select \uicontrol {Ignore whitespace changes}. + To find the commit that introduced a line before it was moved, select + \uicontrol {Ignore line moves}. + + To view annotations for the current line, select \uicontrol Tools > + \uicontrol Git > \uicontrol {Current File} > \uicontrol {Instant Blame}. Click the commit identifier to show a detailed description of the change. diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 5a406c03190..784691e81a7 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -328,10 +328,16 @@ def qdump__QDateTime(d, value): isValid = status & 0x08 else: dptr = d.extractPointer(value) - (msecs, status, offsetFromUtc, ref, timeZone) = d.split('qIIIp', dptr) + (_, status, msecs, offsetFromUtc, _, timeZone) = d.split('iIqII{QTimeZone}', dptr) spec = (status & 0x30) >> 4 isValid = True - + tzD = d.extractPointer(timeZone) + if tzD == 0: + timeZone = 'UTC' + else: + idAddr = tzD + 2 * d.ptrSize() + tzBa = d.encodeByteArray(idAddr, limit=100) + timeZone = tzBa d.putValue( '%s/%s/%s/%s/%s/%s' % (msecs, @@ -365,7 +371,7 @@ def qdump__QDateTime(d, value): tz = '' else: idBase = tzp + 2 * d.ptrSize() # [QSharedData] + [vptr] - elided, tz = d.encodeByteArray(idBase, limit=100) + tz = d.encodeByteArray(idBase, limit=100) d.putValue('%s/%s/%s/%s/%s/%s' % (msecs, spec, offset, tz, status, 0), 'datetimeinternal') else: diff --git a/src/plugins/autotest/qtest/qttesttreeitem.cpp b/src/plugins/autotest/qtest/qttesttreeitem.cpp index de27cb089ff..68b50be9079 100644 --- a/src/plugins/autotest/qtest/qttesttreeitem.cpp +++ b/src/plugins/autotest/qtest/qttesttreeitem.cpp @@ -76,7 +76,7 @@ QVariant QtTestTreeItem::data(int column, int role) const return m_multiTest; } case LinkRole: - if (type() == GroupNode) + if (type() == GroupNode || type() == Root) return QVariant(); if (type() == TestDataFunction || type() == TestDataTag) return TestTreeItem::data(column, role); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp index 31a6ae23c02..370799fe260 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp @@ -775,22 +775,23 @@ void CMakeBuildStep::updateDeploymentData() DeploymentData deploymentData; deploymentData.setLocalInstallRoot(rootDir); - IDeviceConstPtr device = BuildDeviceKitAspect::device(buildSystem()->kit()); + IDeviceConstPtr runDevice = DeviceKitAspect::device(buildSystem()->kit()); const auto appFileNames = transform>(buildSystem()->applicationTargets(), [](const BuildTargetInfo &appTarget) { return appTarget.targetFilePath.fileName(); }); - auto handleFile = [&appFileNames, rootDir, &deploymentData, device](const FilePath &filePath) { - const DeployableFile::Type type = appFileNames.contains(filePath.fileName()) - ? DeployableFile::TypeExecutable - : DeployableFile::TypeNormal; + auto handleFile = + [&appFileNames, rootDir, &deploymentData, runDevice](const FilePath &filePath) { + const DeployableFile::Type type = appFileNames.contains(filePath.fileName()) + ? DeployableFile::TypeExecutable + : DeployableFile::TypeNormal; - FilePath targetDirPath = filePath.parentDir().relativePathFrom(rootDir); + FilePath targetDirPath = filePath.parentDir().relativePathFrom(rootDir); - const FilePath targetDir = device->rootPath().pathAppended(targetDirPath.path()); - deploymentData.addFile(filePath, targetDir.nativePath(), type); - return IterationPolicy::Continue; - }; + const FilePath targetDir = runDevice->rootPath().pathAppended(targetDirPath.path()); + deploymentData.addFile(filePath, targetDir.nativePath(), type); + return IterationPolicy::Continue; + }; rootDir.iterateDirectory(handleFile, {{}, QDir::Files | QDir::Hidden, QDirIterator::Subdirectories}); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 7c0001c6a86..b5630faf28c 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -272,6 +272,8 @@ static QString newFilesForFunction(const std::string &cmakeFunction, bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FilePaths *notAdded) { + if (notAdded) + *notAdded = filePaths; if (auto n = dynamic_cast(context)) { const QString targetName = n->buildKey(); auto target = Utils::findOrDefault(buildTargets(), @@ -279,10 +281,9 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP return target.title == targetName; }); - if (target.backtrace.isEmpty()) { - *notAdded = filePaths; + if (target.backtrace.isEmpty()) return false; - } + const FilePath targetCMakeFile = target.backtrace.last().path; const int targetDefinitionLine = target.backtrace.last().line; @@ -297,7 +298,6 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP if (!cmakeListFile.ParseString(fileContent->toStdString(), targetCMakeFile.fileName().toStdString(), errorString)) { - *notAdded = filePaths; return false; } } @@ -308,10 +308,8 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP return func.Line() == targetDefinitionLine; }); - if (function == cmakeListFile.Functions.end()) { - *notAdded = filePaths; + if (function == cmakeListFile.Functions.end()) return false; - } // Special case: when qt_add_executable and qt_add_qml_module use the same target name // then qt_add_qml_module function should be used @@ -385,16 +383,16 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP Core::EditorManager::openEditorAt({targetCMakeFile, line, column + extraChars}, Constants::CMAKE_EDITOR_ID, Core::EditorManager::DoNotMakeVisible)); - if (!editor) { - *notAdded = filePaths; + if (!editor) return false; - } editor->insert(snippet); editor->editorWidget()->autoIndent(); if (!Core::DocumentManager::saveDocument(editor->document())) return false; + if (notAdded) + notAdded->clear(); return true; } diff --git a/src/plugins/coreplugin/loggingviewer.cpp b/src/plugins/coreplugin/loggingviewer.cpp index 1cb95ae8b7f..57a1f42282b 100644 --- a/src/plugins/coreplugin/loggingviewer.cpp +++ b/src/plugins/coreplugin/loggingviewer.cpp @@ -95,6 +95,12 @@ private: void onFilter(QLoggingCategory *category) { + if (QThread::currentThread() != thread()) { + QMetaObject::invokeMethod( + this, [category, this] { onFilter(category); }, Qt::QueuedConnection); + return; + } + if (!m_categories.contains(category)) { m_categories.append(category); emit newLogCategory(category); @@ -108,7 +114,7 @@ private: bool m_started{false}; }; -QLoggingCategory::CategoryFilter LogCategoryRegistry::s_oldFilter; +QLoggingCategory::CategoryFilter LogCategoryRegistry::s_oldFilter = nullptr; struct SavedEntry { @@ -1100,6 +1106,8 @@ void setCategoryColor(const QString &category, const QColor &color) s_categoryColor.remove(category); } +static bool wasLogViewerShown = false; + void LoggingViewer::showLoggingView() { LoggingViewManagerWidget *staticLogWidget = LoggingViewManagerWidget::instance(); @@ -1108,10 +1116,15 @@ void LoggingViewer::showLoggingView() staticLogWidget->show(); staticLogWidget->raise(); staticLogWidget->activateWindow(); + + wasLogViewerShown = true; } void LoggingViewer::hideLoggingView() { + if (!wasLogViewerShown) + return; + LoggingViewManagerWidget *staticLogWidget = LoggingViewManagerWidget::instance(); QTC_ASSERT(staticLogWidget, return); staticLogWidget->close(); diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp index 3740b5b3b63..6df472afa52 100644 --- a/src/plugins/debugger/debuggerprotocol.cpp +++ b/src/plugins/debugger/debuggerprotocol.cpp @@ -737,9 +737,11 @@ QString decodeData(const QString &ba, const QString &encoding) if (spec == Qt::OffsetFromUTC) { dateTime = QDateTime(date, time, spec, offset); } else if (spec == Qt::TimeZone) { - if (!QTimeZone::isTimeZoneIdAvailable(timeZoneId)) + QTimeZone tz(timeZoneId); + if (!tz.isValid()) return QLatin1String(""); - dateTime = QDateTime(date, time, QTimeZone(timeZoneId)); + + dateTime = QDateTime(date, time, tz); } else { dateTime = QDateTime(date, time, spec); } diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index 67f4fb981c5..43cc6fab142 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -746,6 +746,8 @@ void IosSimulatorToolHandlerPrivate::requestTransferApp(const FilePath &appBundl installAppOnSimulator(); } else { errorMsg(Tr::tr("Application install on simulator failed. Simulator not running.")); + if (!response.commandOutput.isEmpty()) + errorMsg(response.commandOutput); didTransferApp(m_bundlePath, m_deviceId, IosToolHandler::Failure); emit q->finished(q); } diff --git a/src/plugins/ios/simulatorcontrol.cpp b/src/plugins/ios/simulatorcontrol.cpp index f7f3804983a..47cf3690f25 100644 --- a/src/plugins/ios/simulatorcontrol.cpp +++ b/src/plugins/ios/simulatorcontrol.cpp @@ -3,6 +3,7 @@ #include "simulatorcontrol.h" #include "iosconfigurations.h" +#include "iostr.h" #include #include @@ -384,10 +385,10 @@ void startSimulator(QPromise &promise, const QSt SimulatorInfo simInfo = deviceInfo(simUdid); if (!simInfo.available) { - qCDebug(simulatorLog) << "Simulator device is not available." << simUdid; + promise.addResult( + response.withError(Tr::tr("Simulator device is not available. (%1)").arg(simUdid))); return; } - // Shutting down state checks are for the case when simulator start is called within a short // interval of closing the previous interval of the simulator. We wait untill the shutdown // process is complete. @@ -399,8 +400,14 @@ void startSimulator(QPromise &promise, const QSt } if (simInfo.isShuttingDown()) { - qCDebug(simulatorLog) << "Cannot start Simulator device. " - << "Previous instance taking too long to shutdown." << simInfo; + promise.addResult(response.withError( + Tr::tr("Cannot start Simulator device. Previous instance taking " + "too long to shut down. (name=%1, udid=%2, available=%3, state=%4, runtime=%5)") + .arg(simInfo.name) + .arg(simInfo.identifier) + .arg(simInfo.available) + .arg(simInfo.state) + .arg(simInfo.runtimeName))); return; } @@ -421,11 +428,19 @@ void startSimulator(QPromise &promise, const QSt if (info.isBooted()) response.success = true; } else { - qCDebug(simulatorLog) << "Error starting simulator."; + promise.addResult(response.withError(Tr::tr("Error starting simulator."))); + return; } } else { - qCDebug(simulatorLog) << "Cannot start Simulator device. Simulator not in shutdown state." - << simInfo; + promise.addResult(response.withError( + Tr::tr("Cannot start Simulator device. Simulator not in shutdown state.(name=%1, " + "udid=%2, available=%3, state=%4, runtime=%5)") + .arg(simInfo.name) + .arg(simInfo.identifier) + .arg(simInfo.available) + .arg(simInfo.state) + .arg(simInfo.runtimeName))); + return; } if (!promise.isCanceled()) diff --git a/src/plugins/ios/simulatorcontrol.h b/src/plugins/ios/simulatorcontrol.h index 1e5d9375ad8..d9b4215af6c 100644 --- a/src/plugins/ios/simulatorcontrol.h +++ b/src/plugins/ios/simulatorcontrol.h @@ -61,6 +61,14 @@ public: bool success = false; qint64 pID = -1; QString commandOutput; + + ResponseData withError(const QString errorMsg) + { + ResponseData result = *this; + result.commandOutput = errorMsg; + result.success = false; + return result; + } }; public: diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp index 750ab333826..b13aef42077 100644 --- a/src/plugins/python/pythonlanguageclient.cpp +++ b/src/plugins/python/pythonlanguageclient.cpp @@ -301,10 +301,13 @@ void PyLSConfigureAssistant::installPythonLanguageServer(const FilePath &python, auto install = new PipInstallTask(python); connect(install, &PipInstallTask::finished, this, [=](const bool success) { + const QList additionalDocuments = m_infoBarEntries.take(python); if (success) { - if (document) { - if (PyLSClient *client = clientForPython(python)) + if (PyLSClient *client = clientForPython(python)) { + if (document) LanguageClientManager::openDocumentWithClient(document, client); + for (TextEditor::TextDocument *additionalDocument : additionalDocuments) + LanguageClientManager::openDocumentWithClient(additionalDocument, client); } } install->deleteLater(); @@ -375,15 +378,6 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, } } -void PyLSConfigureAssistant::updateEditorInfoBars(const FilePath &python, Client *client) -{ - for (TextEditor::TextDocument *document : instance()->m_infoBarEntries.take(python)) { - instance()->resetEditorInfoBar(document); - if (client) - LanguageClientManager::openDocumentWithClient(document, client); - } -} - void PyLSConfigureAssistant::resetEditorInfoBar(TextEditor::TextDocument *document) { for (QList &documents : m_infoBarEntries) diff --git a/src/plugins/python/pythonlanguageclient.h b/src/plugins/python/pythonlanguageclient.h index 82a4a73ea4f..41b559a0427 100644 --- a/src/plugins/python/pythonlanguageclient.h +++ b/src/plugins/python/pythonlanguageclient.h @@ -53,8 +53,6 @@ class PyLSConfigureAssistant : public QObject public: static PyLSConfigureAssistant *instance(); - static void updateEditorInfoBars(const Utils::FilePath &python, - LanguageClient::Client *client); static void openDocumentWithPython(const Utils::FilePath &python, TextEditor::TextDocument *document); diff --git a/src/plugins/screenrecorder/record.cpp b/src/plugins/screenrecorder/record.cpp index cade82dbe9c..12aa27f46da 100644 --- a/src/plugins/screenrecorder/record.cpp +++ b/src/plugins/screenrecorder/record.cpp @@ -120,6 +120,7 @@ RecordOptionsDialog::RecordOptionsDialog(QWidget *parent) st, buttonBox, }.attachTo(this); + layout()->setSizeConstraint(QLayout::SetFixedSize); connect(buttonBox, &QDialogButtonBox::accepted, this, [this] { const QRect cropRect = m_cropScene->fullySelected() ? QRect() : screenCropRect(); diff --git a/src/plugins/terminal/shortcutmap.cpp b/src/plugins/terminal/shortcutmap.cpp index 436757fd256..4e17f0c35e4 100644 --- a/src/plugins/terminal/shortcutmap.cpp +++ b/src/plugins/terminal/shortcutmap.cpp @@ -550,12 +550,18 @@ bool ShortcutMap::dispatchEvent(QKeyEvent *e) << "\", " << next->id << ", " << static_cast(enabledShortcuts > 1) << ") to object(" << next->owner << ')'; } - QShortcutEvent se(next->keyseq, next->id, enabledShortcuts > 1); - QCoreApplication::sendEvent(const_cast(next->owner), &se); - QAction *action = qobject_cast(next->owner); - if (action) + if (auto action = qobject_cast(next->owner)) { + // We call the action here ourselves instead of relying on sending a ShortCut event, + // as the action will try to match the shortcut id to the global shortcutmap. + // This triggers an annoying Q_ASSERT when linking against a debug Qt. Calling trigger + // directly circumvents this. + action->trigger(); return action->isEnabled(); + } else { + QShortcutEvent se(next->keyseq, next->id, enabledShortcuts > 1); + QCoreApplication::sendEvent(const_cast(next->owner), &se); + } return true; } diff --git a/src/shared/qbs b/src/shared/qbs index 40327c8277b..d99256dd794 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 40327c8277b904944dbd9a227f9a819e3d53666d +Subproject commit d99256dd79460628aafb5fa34a8dde7761ff7b1c diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index f58f8f73731..06ebfe1b638 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -2260,7 +2260,10 @@ void tst_Dumpers::dumper_data() QTest::newRow("QDateTime") - << Data("#include ", + << Data("#include \n" + "#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)\n" + "#include \n" + "#endif", "QDate d0;\n" "QDate d1;\n" @@ -2270,9 +2273,12 @@ void tst_Dumpers::dumper_data() "QTime t1(13, 15, 32);\n" "QDateTime dt0;\n" - "QDateTime dt1(QDate(1980, 1, 1), QTime(13, 15, 32), Qt::UTC);", + "QDateTime dt1(QDate(1980, 1, 1), QTime(13, 15, 32), Qt::UTC);\n" + "#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)\n" + "QDateTime dt2(QDate(1980, 1, 1), QTime(13, 15, 32), QTimeZone(60 * 60));\n" + "#endif\n", - "&d0, &d1, &t0, &t1, &dt0, &dt1") + "&d0, &d1, &t0, &t1, &dt0, &dt1, &dt2") + CoreProfile() @@ -2297,6 +2303,7 @@ void tst_Dumpers::dumper_data() + Check("dt0", "(invalid)", "@QDateTime") + Check("dt1", Value4("Tue Jan 1 13:15:32 1980"), "@QDateTime") + Check("dt1", Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime") + + Check("dt1", Value6("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime") + Check("dt1.(ISO)", "\"1980-01-01T13:15:32Z\"", "@QString") % NeedsInferiorCall + Check("dt1.(Locale)", AnyValue, "@QString") % NeedsInferiorCall @@ -2306,11 +2313,13 @@ void tst_Dumpers::dumper_data() + Check("dt1.toString", Value4("\"Tue Jan 1 13:15:32 1980\""), "@QString") % NeedsInferiorCall + Check("dt1.toString", - Value5("\"Tue Jan 1 13:15:32 1980 GMT\""), "@QString") % NeedsInferiorCall; + Value5("\"Tue Jan 1 13:15:32 1980 GMT\""), "@QString") % NeedsInferiorCall //+ Check("dt1.toUTC", // Value4("Tue Jan 1 13:15:32 1980"), "@QDateTime") % Optional() //+ Check("dt1.toUTC", // Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime") % Optional(); + + Check("dt2", Value5("Tue Jan 1 13:15:32 1980 UTC+01:00"), "@QDateTime") + + Check("dt2", Value6("Tue Jan 1 13:15:32 1980 UTC+01:00"), "@QDateTime"); QTest::newRow("QFileInfo")