From 6e9acfe08ef80f21221bc56d321b4e22c875a316 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 4 Jun 2021 15:13:08 +0200 Subject: [PATCH 1/6] CMake build: Add files from qtc_copy_to_builddir to tree Make the files from qtc_copy_to_builddir part of the project tree, so they get included in searches etc. Change-Id: I191f88c8520b9e4a16fd6a5acfeda9cf880cea89 Reviewed-by: Cristian Adam Reviewed-by: David Schulz --- cmake/QtCreatorAPI.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 4e9e8f4c61d..c0db1ab3854 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -854,6 +854,7 @@ function(qtc_copy_to_builddir custom_target_name) set(timestampFiles) qtc_output_binary_dir(_output_binary_dir) + set(allFiles ${_arg_FILES}) foreach(srcFile ${_arg_FILES}) string(MAKE_C_IDENTIFIER "${srcFile}" destinationTimestampFilePart) @@ -888,6 +889,7 @@ function(qtc_copy_to_builddir custom_target_name) endif() file(GLOB_RECURSE filesToCopy "${srcDirectory}/*") + list(APPEND allFiles ${filesToCopy}) add_custom_command(OUTPUT "${destinationTimestampFileName}" COMMAND "${CMAKE_COMMAND}" -E copy_directory "${srcDirectory}" "${destinationDirectory}" COMMAND "${CMAKE_COMMAND}" -E touch "${destinationTimestampFileName}" @@ -898,7 +900,8 @@ function(qtc_copy_to_builddir custom_target_name) ) endforeach() - add_custom_target("${custom_target_name}" ALL DEPENDS ${timestampFiles}) + add_custom_target("${custom_target_name}" ALL DEPENDS ${timestampFiles} + SOURCES ${allFiles}) endfunction() function(qtc_add_resources target resourceName) From ef7cfe1570c3835f60596eff727c07f8d9223d48 Mon Sep 17 00:00:00 2001 From: Tuomo Pelkonen Date: Mon, 7 Jun 2021 18:04:39 +0300 Subject: [PATCH 2/6] FlowEditor: set TopRightCorner as the default text position for FlowDecision Task-number: QDS-2508 Change-Id: I1bb62443b8361fc166a7e92644d2641194c105ef Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/formeditor/formeditoritem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp index 6fac0dd0c36..ac9fbab89e3 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp @@ -2046,7 +2046,7 @@ void FormEditorFlowDecisionItem::updateGeometry() QRectF textRect(0, 0, 100, 20); - Qt::Corner corner = Qt::TopLeftCorner; + Qt::Corner corner = Qt::TopRightCorner; if (qmlItemNode().modelNode().hasAuxiliaryData("dialogLabelPosition")) corner = qmlItemNode().modelNode().auxiliaryData("dialogLabelPosition").value(); @@ -2191,7 +2191,7 @@ void FormEditorFlowDecisionItem::paint(QPainter *painter, const QStyleOptionGrap QRectF textRect(0, 0, 100, 20); - Qt::Corner corner = Qt::TopLeftCorner; + Qt::Corner corner = Qt::TopRightCorner; if (qmlItemNode().modelNode().hasAuxiliaryData("dialogLabelPosition")) corner = qmlItemNode().modelNode().auxiliaryData("dialogLabelPosition").value(); From e956873db34ae32e0ef730e64eb401aa38ce92fc Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 26 May 2021 11:15:18 +0200 Subject: [PATCH 3/6] Add changes file for 4.15.1 Change-Id: I032ed9a2113e0e2a13988b58d2acf90c0fab7aa3 Reviewed-by: Leena Miettinen --- dist/changes-4.15.1.md | 121 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 dist/changes-4.15.1.md diff --git a/dist/changes-4.15.1.md b/dist/changes-4.15.1.md new file mode 100644 index 00000000000..18e04f62908 --- /dev/null +++ b/dist/changes-4.15.1.md @@ -0,0 +1,121 @@ +Qt Creator 4.15.1 +================= + +Qt Creator version 4.15.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 origin/v4.15.0..v4.15.1 + +General +------- + +* Fixed crash in `Search Results` pane (QTCREATORBUG-25713) +* Fixed crash when showing tooltips after screen configuration changes + (QTCREATORBUG-25747) +* Fixed environment selection for external tools (QTCREATORBUG-25634) + +Editing +------- + +* Fixed crash when opening settings from tooltip (QTCREATORBUG-25623) +* Fixed hiding of function hints (QTCREATORBUG-25664) +* Fixed vanishing text marks (QTCREATORBUG-25427) + +### C++ + +* Fixed freeze when updating project while indexing is running + +### QML + +* Fixed wrong warning for blocks with `case` and `let` (QTCREATORBUG-24214) + +### QRC + +* Fixed that `compress-algo` tags were removed (QTCREATORBUG-25706) + +Projects +-------- + +* Fixed restoration of `Projects` mode layout (QTCREATORBUG-25551) + +### Wizards + +* Fixed `Fetch data asynchronously` for list and table models + +### CMake + +* Fixed issues when switching configurations or running CMake while parsing + (QTCREATORBUG-25588, QTCREATORBUG-25287) +* Fixed crash when cancelling scanning the project tree (QTCREATORBUG-24564) +* Fixed custom targets missing in Locator (QTCREATORBUG-25726) + +Debugging +--------- + +### GDB + +* Fixed crash (QTCREATORBUG-25745) + +Test Integration +---------------- + +* Fixed selection of individual tests (QTCREATORBUG-25702) + +### Catch2 + +* Fixed issues with Catch2 3.0 (QTCREATORBUG-25582) + +### GoogleTest + +* Fixed crash with empty test name + +Platforms +--------- + +### Windows + +* Fixed issues with `clang-cl` toolchain (QTCREATORBUG-25690, + QTCREATORBUG-25693, QTCREATORBUG-25698) + +### Remote Linux + +* Fixed install step (QTCREATORBUG-25359) + +### Android + +* Improved startup time (QTCREATORBUG-25463) +* Fixed `Checking pending licenses` (QTCREATORBUG-25667) + +### MCU + +* Added support for Cypress Traveo II (UL-4242) +* Fixed CMake generator for GHS compiler (UL-4247) + +Credits for these changes go to: +-------------------------------- +Alessandro Portale +André Pönitz +Christiaan Janssen +Christian Kandeler +Christian Stenger +Cristian Adam +David Schulz +Eike Ziller +Erik Verbruggen +Ivan Komissarov +Jaroslaw Kobus +Knud Dollereder +Leena Miettinen +Marco Bubke +Michael Winkelmann +Miikka Heikkinen +Mikhail Khachayants +Mitch Curtis +Tapani Mattila +Thiago Macieira +Thomas Hartmann +Tim Jenssen From f087e70e80bb086931c01fc85d63f8a1ef8f770b Mon Sep 17 00:00:00 2001 From: Tapani Mattila Date: Wed, 26 May 2021 12:29:18 +0300 Subject: [PATCH 4/6] AssetExport: Enable setting custom metadata file name for exported components Task-number: QDS-4384 Change-Id: I5d41ab00f7f90137355289f341defcb87ddf3b44 Reviewed-by: Vikas Pachdha --- .../assetexporterplugin/assetexportdialog.cpp | 19 ++++++++++++++++--- .../assetexporterplugin/assetexporter.cpp | 9 ++++++--- .../assetexporterplugin/assetexporter.h | 1 + 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp b/src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp index 0c6a8a46f78..a80d30830f0 100644 --- a/src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp +++ b/src/plugins/qmldesigner/assetexporterplugin/assetexportdialog.cpp @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include #include @@ -80,8 +82,13 @@ AssetExportDialog::AssetExportDialog(const Utils::FilePath &exportPath, { m_ui->setupUi(this); - m_ui->exportPath->setFilePath(exportPath); - m_ui->exportPath->setPromptDialogTitle(tr("Choose Export Path")); + m_ui->exportPath->setExpectedKind(Utils::PathChooser::Kind::SaveFile); + m_ui->exportPath->setFilePath( + exportPath.pathAppended( + ProjectExplorer::SessionManager::startupProject()->displayName() + ".metadata" + )); + m_ui->exportPath->setPromptDialogTitle(tr("Choose Export File")); + m_ui->exportPath->setPromptDialogFilter(tr("Metadata file (*.metadata)")); m_ui->exportPath->lineEdit()->setReadOnly(true); m_ui->exportPath->addButton(tr("Open"), this, [this]() { Core::FileUtils::showInGraphicalShell(Core::ICore::mainWindow(), m_ui->exportPath->path()); @@ -92,6 +99,7 @@ AssetExportDialog::AssetExportDialog(const Utils::FilePath &exportPath, m_ui->advancedOptions->setWidget(optionsWidget); auto optionsLayout = new QHBoxLayout(optionsWidget); optionsLayout->setContentsMargins(8, 8, 8, 8); + m_exportAssetsCheck = new QCheckBox(tr("Export assets"), this); m_exportAssetsCheck->setChecked(true); optionsLayout->addWidget(m_exportAssetsCheck); @@ -153,7 +161,12 @@ void AssetExportDialog::onExport() TaskHub::clearTasks(Constants::TASK_CATEGORY_ASSET_EXPORT); m_exportLogs->clear(); - m_assetExporter.exportQml(m_filePathModel.files(), m_ui->exportPath->filePath(), + Utils::FilePath selectedPath = m_ui->exportPath->filePath(); + Utils::FilePath exportPath = m_perComponentExportCheck->isChecked() ? + (selectedPath.isDir() ? selectedPath : selectedPath.parentDir()) : + selectedPath; + + m_assetExporter.exportQml(m_filePathModel.files(), exportPath, m_exportAssetsCheck->isChecked(), m_perComponentExportCheck->isChecked()); } diff --git a/src/plugins/qmldesigner/assetexporterplugin/assetexporter.cpp b/src/plugins/qmldesigner/assetexporterplugin/assetexporter.cpp index 7e0cf0d0843..22796c5afde 100644 --- a/src/plugins/qmldesigner/assetexporterplugin/assetexporter.cpp +++ b/src/plugins/qmldesigner/assetexporterplugin/assetexporter.cpp @@ -123,7 +123,9 @@ void AssetExporter::exportQml(const Utils::FilePaths &qmlFiles, const Utils::Fil { m_perComponentExport = perComponentExport; ExportNotification::addInfo(tr("Export root directory: %1.\nExporting assets: %2") - .arg(exportPath.toUserOutput()) + .arg(exportPath.isDir() + ? exportPath.toUserOutput() + : exportPath.parentDir().toUserOutput()) .arg(exportAssets? tr("Yes") : tr("No"))); if (m_perComponentExport) @@ -134,7 +136,8 @@ void AssetExporter::exportQml(const Utils::FilePaths &qmlFiles, const Utils::Fil m_totalFileCount = m_exportFiles.count(); m_components.clear(); m_componentUuidCache.clear(); - m_exportPath = exportPath; + m_exportPath = exportPath.isDir() ? exportPath : exportPath.parentDir(); + m_exportFile = exportPath.fileName(); m_currentState.change(ParsingState::Parsing); if (exportAssets) m_assetDumper = make_unique(); @@ -437,7 +440,7 @@ void AssetExporter::writeMetadata() const QJsonArray artboards; std::transform(m_components.cbegin(), m_components.cend(), back_inserter(artboards), [](const unique_ptr &c) {return c->json(); }); - writeFile(m_exportPath.pathAppended(projectName + ".metadata"), artboards); + writeFile(m_exportPath.pathAppended(m_exportFile), artboards); } notifyProgress(1.0); ExportNotification::addInfo(tr("Export finished.")); diff --git a/src/plugins/qmldesigner/assetexporterplugin/assetexporter.h b/src/plugins/qmldesigner/assetexporterplugin/assetexporter.h index adfc71a115b..6eac814b6a5 100644 --- a/src/plugins/qmldesigner/assetexporterplugin/assetexporter.h +++ b/src/plugins/qmldesigner/assetexporterplugin/assetexporter.h @@ -112,6 +112,7 @@ private: Utils::FilePaths m_exportFiles; unsigned int m_totalFileCount = 0; Utils::FilePath m_exportPath; + QString m_exportFile; bool m_perComponentExport = false; std::vector> m_components; QHash m_componentUuidCache; From 1b3a4e1fc65ba39682912aee5d94cd30e5b9c84c Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 8 Jun 2021 10:27:53 +0200 Subject: [PATCH 5/6] CMakePM: Clear and setup file watcher before and after backup configuration Qt Creator 4.15 will do a backup of the CMake file-api, but the file watcher that triggers a reparsing was not cleared up before the backup. This could lead to unnecesary file-api rescans. Task-number: QTCREATORBUG-25783 Change-Id: Id91379ea85c8a91e03d952c5c66b0371ebff943f Reviewed-by: Eike Ziller --- src/plugins/cmakeprojectmanager/fileapireader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/cmakeprojectmanager/fileapireader.cpp b/src/plugins/cmakeprojectmanager/fileapireader.cpp index 1171b9d5480..a4a2471073f 100644 --- a/src/plugins/cmakeprojectmanager/fileapireader.cpp +++ b/src/plugins/cmakeprojectmanager/fileapireader.cpp @@ -371,6 +371,10 @@ void FileApiReader::startCMakeState(const QStringList &configurationArguments) connect(m_cmakeProcess.get(), &CMakeProcess::finished, this, &FileApiReader::cmakeFinishedState); qCDebug(cmakeFileApiMode) << ">>>>>> Running cmake with arguments:" << configurationArguments; + // Reset watcher: + m_watcher.removeFiles(m_watcher.files()); + m_watcher.removeDirectories(m_watcher.directories()); + makeBackupConfiguration(true); writeConfigurationIntoBuildDirectory(configurationArguments); m_cmakeProcess->run(m_parameters, configurationArguments); @@ -389,6 +393,8 @@ void FileApiReader::cmakeFinishedState(int code, QProcess::ExitStatus status) if (m_lastCMakeExitCode != 0) makeBackupConfiguration(false); + FileApiParser::setupCMakeFileApi(m_parameters.workDirectory, m_watcher); + endState(FileApiParser::scanForCMakeReplyFile(m_parameters.workDirectory)); } From 80d18c1e5746f912dfeeff84cc38745446b37009 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 3 Jun 2021 12:08:16 +0200 Subject: [PATCH 6/6] CMakePM: Do backup/restore configuration for all cases When "Auto create build directories" is not checked, then the first configuration is done in /tmp, which is covered by workDirectory. Change-Id: Iad65b4776433ce296bd2561195fcf1bb6f8ace1d Reviewed-by: Eike Ziller --- src/plugins/cmakeprojectmanager/fileapireader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/fileapireader.cpp b/src/plugins/cmakeprojectmanager/fileapireader.cpp index a4a2471073f..e5172e6f6e5 100644 --- a/src/plugins/cmakeprojectmanager/fileapireader.cpp +++ b/src/plugins/cmakeprojectmanager/fileapireader.cpp @@ -312,8 +312,8 @@ void FileApiReader::endState(const QFileInfo &replyFi) void FileApiReader::makeBackupConfiguration(bool store) { - FilePath reply = m_parameters.buildDirectory.pathAppended(".cmake/api/v1/reply"); - FilePath replyPrev = m_parameters.buildDirectory.pathAppended(".cmake/api/v1/reply.prev"); + FilePath reply = m_parameters.workDirectory.pathAppended(".cmake/api/v1/reply"); + FilePath replyPrev = m_parameters.workDirectory.pathAppended(".cmake/api/v1/reply.prev"); if (!store) std::swap(reply, replyPrev); @@ -327,8 +327,8 @@ void FileApiReader::makeBackupConfiguration(bool store) } - FilePath cmakeCacheTxt = m_parameters.buildDirectory.pathAppended("CMakeCache.txt"); - FilePath cmakeCacheTxtPrev = m_parameters.buildDirectory.pathAppended("CMakeCache.txt.prev"); + FilePath cmakeCacheTxt = m_parameters.workDirectory.pathAppended("CMakeCache.txt"); + FilePath cmakeCacheTxtPrev = m_parameters.workDirectory.pathAppended("CMakeCache.txt.prev"); if (!store) std::swap(cmakeCacheTxt, cmakeCacheTxtPrev);