diff --git a/coin/instructions/build.yaml b/coin/instructions/build.yaml index 1972965b512..6ec0fcf1711 100644 --- a/coin/instructions/build.yaml +++ b/coin/instructions/build.yaml @@ -2,6 +2,15 @@ type: Group instructions: - type: MakeDirectory directory: "{{.AgentWorkingDir}}/build/qt_temp" + - type: Group + instructions: + - type: EnvironmentVariable + variableName: QTC_TEST_OPTION + variableValue: "--with-tests" + enable_if: + condition: property + property: features + not_contains_value: DisableTests - type: Group instructions: @@ -26,7 +35,7 @@ instructions: maxTimeBetweenOutput: 360 userMessageOnFailure: "Failed to extract LLVM package, check logs." - type: ExecuteCommand - command: "python3 -u {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --elfutils-path {{.AgentWorkingDir}}/build/qt_temp/elfutils --llvm-path {{.AgentWorkingDir}}/build/qt_temp/libclang --with-tests --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache" + command: "python3 -u {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --elfutils-path {{.AgentWorkingDir}}/build/qt_temp/elfutils --llvm-path {{.AgentWorkingDir}}/build/qt_temp/libclang {{.Env.QTC_TEST_OPTION}} --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache" maxTimeInSeconds: 36000 maxTimeBetweenOutput: 3600 userMessageOnFailure: "Failed to run build.py, check logs." @@ -60,7 +69,7 @@ instructions: maxTimeBetweenOutput: 360 userMessageOnFailure: "Failed to extract LLVM package, check logs." - type: ExecuteCommand - command: "python3 -u {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --llvm-path {{.AgentWorkingDir}}/build/qt_temp/libclang --keychain-unlock-script /Users/qt/unlock-keychain.sh --with-tests --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache" + command: "python3 -u {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --llvm-path {{.AgentWorkingDir}}/build/qt_temp/libclang --keychain-unlock-script /Users/qt/unlock-keychain.sh {{.Env.QTC_TEST_OPTION}} --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache" maxTimeInSeconds: 36000 maxTimeBetweenOutput: 3600 userMessageOnFailure: "Failed to run build.py, check logs." @@ -112,7 +121,7 @@ instructions: maxTimeBetweenOutput: 360 userMessageOnFailure: "Failed to extract LLVM package, check logs." - type: ExecuteCommand - command: "python -u {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\scripts\\build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator --build {{.AgentWorkingDir}}\\qt-creator\\qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --python-path {{.AgentWorkingDir}}\\build\\qt_temp\\python --elfutils-path {{.AgentWorkingDir}}\\buid\\qt_temp\\elfutils --llvm-path {{.AgentWorkingDir}}\\build\\qt_temp\\libclang --with-tests --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache --add-config=-DWITH_SCCACHE_SUPPORT=ON" + command: "python -u {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\scripts\\build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator --build {{.AgentWorkingDir}}\\qt-creator\\qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --python-path {{.AgentWorkingDir}}\\build\\qt_temp\\python --elfutils-path {{.AgentWorkingDir}}\\buid\\qt_temp\\elfutils --llvm-path {{.AgentWorkingDir}}\\build\\qt_temp\\libclang {{.Env.QTC_TEST_OPTION}} --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache --add-config=-DWITH_SCCACHE_SUPPORT=ON" maxTimeInSeconds: 36000 maxTimeBetweenOutput: 3600 userMessageOnFailure: "Failed to run build.py, check logs." diff --git a/doc/qtcreator/src/overview/creator-only/creator-getting-started.qdoc b/doc/qtcreator/src/overview/creator-only/creator-getting-started.qdoc index b1531ae6857..e735c95adf0 100644 --- a/doc/qtcreator/src/overview/creator-only/creator-getting-started.qdoc +++ b/doc/qtcreator/src/overview/creator-only/creator-getting-started.qdoc @@ -14,8 +14,9 @@ \title Getting Started - To learn the basics of \QC, take the \e {Getting Started with Qt Creator} - course in \l{https://www.qt.io/courses/}{Qt Learning}. + To learn the basics of \QC, take the + \l{https://www.qt.io/academy/course-catalog#getting-started-with-qt-creator} + {Getting Started with Qt Creator} course in Qt Academy. For more information about installing \QC, see \l{Install \QC}. diff --git a/src/libs/3rdparty/libptyqt/unixptyprocess.cpp b/src/libs/3rdparty/libptyqt/unixptyprocess.cpp index e9ec1d590f6..d76349a49e2 100644 --- a/src/libs/3rdparty/libptyqt/unixptyprocess.cpp +++ b/src/libs/3rdparty/libptyqt/unixptyprocess.cpp @@ -190,16 +190,17 @@ bool UnixPtyProcess::startProcess(const QString &shellPath, m_readMasterNotify->disconnect(); }); - QStringList varNames; - for (const QString &line : std::as_const(environment)) - varNames.append(line.split("=").first()); - - QProcessEnvironment envFormat; - for (const QString &line : std::as_const(environment)) - envFormat.insert(line.split("=").first(), line.split("=").last()); + QProcessEnvironment env; + for (const QString &envEntry : environment) { + const int idx = envEntry.indexOf('='); + if (idx != -1) + env.insert(envEntry.left(idx), envEntry.mid(idx + 1)); + else + env.insert(envEntry, QString()); + } m_shellProcess.setWorkingDirectory(workingDir); - m_shellProcess.setProcessEnvironment(envFormat); + m_shellProcess.setProcessEnvironment(env); m_shellProcess.setReadChannel(QProcess::StandardOutput); m_shellProcess.start(m_shellPath, arguments); if (!m_shellProcess.waitForStarted()) diff --git a/src/libs/utils/execmenu.cpp b/src/libs/utils/execmenu.cpp index 13d79152953..4e463bdd6fd 100644 --- a/src/libs/utils/execmenu.cpp +++ b/src/libs/utils/execmenu.cpp @@ -44,7 +44,8 @@ QAction *execMenuAtWidget(QMenu *menu, QWidget *widget) } /*! - Adds tool tips to the menu that show the actions tool tip when hovering over an entry. + Adds tool tips to the \a menu that show the action's tool tip when hovering + over an entry. */ void addToolTipsToMenu(QMenu *menu) { diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index bd9b2620670..ac6bd5c8f63 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -261,10 +261,10 @@ void EditorManagerPlaceHolder::showEvent(QShowEvent *) */ /*! - \fn void Core::EditorManager::editorCreated(Core::IEditor *editor, const QString &fileName) + \fn void Core::EditorManager::editorCreated(Core::IEditor *editor, const Utils::FilePath &filePath) - This signal is emitted after an \a editor was created for \a fileName, but - before it was opened in an editor view. + This signal is emitted after an \a editor was created for the file at + \a filePath, but before it was opened in an editor view. */ /*! \fn void Core::EditorManager::editorOpened(Core::IEditor *editor) diff --git a/src/plugins/coreplugin/editormanager/ieditorfactory.cpp b/src/plugins/coreplugin/editormanager/ieditorfactory.cpp index 7528e12a85d..22aa24e7377 100644 --- a/src/plugins/coreplugin/editormanager/ieditorfactory.cpp +++ b/src/plugins/coreplugin/editormanager/ieditorfactory.cpp @@ -47,23 +47,23 @@ static void mimeTypeFactoryLookup(const Utils::MimeType &mimeType, \brief The IEditorFactory class creates suitable editors for documents according to their MIME type. - Whenever a user wants to edit or create a document, the EditorManager - scans all IEditorFactory instances for suitable editors. The selected - IEditorFactory is then asked to create an editor. + When a user wants to edit or create a document, the EditorManager + scans all IEditorFactory instances for suitable editors and selects one + to create an editor. Implementations should set the properties of the IEditorFactory subclass in their constructor with IEditorFactory::setId(), IEditorFactory::setDisplayName(), - IEditorFactory::setMimeTypes(), and setEditorCreator() + IEditorFactory::setMimeTypes(), and IEditorFactory::setEditorCreator(). IEditorFactory instances automatically register themselves in \QC in their constructor. - There are two varieties of editors: Internal and external. Internal editors - open within the main editing area of Qt Creator. An IEditorFactory defines - an internal editor by using the \c setEditorCreator function. External + There are two varieties of editors: internal and external. Internal editors + open within the main editing area of \QC. An IEditorFactory instance defines + an internal editor by using the setEditorCreator() function. External editors are external applications and are defined by using the - \c setEditorStarter function. They are accessible by the user using - the \uicontrol{Open With} dialog + setEditorStarter() function. The user can access them from the + \uicontrol{Open With} dialog. \sa Core::IEditor \sa Core::IDocument @@ -167,7 +167,7 @@ IEditorFactory *IEditorFactory::editorFactoryForId(const Utils::Id &id) /*! Returns all available internal and external editors for the \a mimeType in the - default order: Editor types ordered by MIME type hierarchy, internal editors + default order: editor types are ordered by MIME type hierarchy, internal editors first. */ const EditorFactories IEditorFactory::defaultEditorFactories(const MimeType &mimeType) @@ -283,9 +283,10 @@ IEditor *IEditorFactory::createEditor() const } /*! - Starts an external editor. + Opens the file at \a filePath in an external editor. - Uses the function set with setEditorStarter() to start the editor. + Returns \c true on success or \c false on failure with the error in + \a errorMessage. \sa setEditorStarter() */ @@ -299,7 +300,7 @@ bool IEditorFactory::startEditor(const FilePath &filePath, QString *errorMessage Sets the function that is used to create an editor instance in createEditor() to \a creator. - This is mutually exclusive with the use of setEditorStarter. + This is mutually exclusive with the use of setEditorStarter(). \sa createEditor() */ @@ -313,12 +314,16 @@ void IEditorFactory::setEditorCreator(const std::function &creator) } /*! - Opens the editor with \a fileName. Returns \c true on success or \c false - on failure along with the error in \a errorMessage. + \fn void Core::IEditorFactory::setEditorStarter(const std::function &starter); - This is mutually exclusive with the use of setEditorCreator. + Sets the function that is used to open a file for a given \c FilePath to + \a starter. + + The function should return \c true on success, or return \c false and set the + \c QString to an error message at failure. + + This is mutually exclusive with the use of setEditorCreator(). */ - void IEditorFactory::setEditorStarter(const std::function &starter) { QTC_CHECK(!m_starter); diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 84548d91cf4..e9fca4a225b 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -570,8 +570,6 @@ bool ICore::showWarningWithOptions(const QString &title, const QString &text, If \a scope is \c QSettings::SystemScope, only the installation settings shipped with the current version of \QC will be read. This functionality exists for internal purposes only. - - \sa settingsDatabase() */ QtcSettings *ICore::settings(QSettings::Scope scope) { diff --git a/src/plugins/coreplugin/iversioncontrol.cpp b/src/plugins/coreplugin/iversioncontrol.cpp index f70e4be492e..3ff7de5bcdd 100644 --- a/src/plugins/coreplugin/iversioncontrol.cpp +++ b/src/plugins/coreplugin/iversioncontrol.cpp @@ -143,7 +143,7 @@ QString IVersionControl::refreshTopic(const FilePath &repository) it will be used. Otherwise it will be refreshed using the items provided by \c setTopicFileTracker() and \c setTopicRefresher(). - \sa setTopicFileTracker(), setTopicRefresher(). + \sa setTopicFileTracker(), setTopicRefresher() */ QString IVersionControl::vcsTopic(const FilePath &topLevel) diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp index 5aee0ad266c..a3e17b0036c 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp @@ -768,7 +768,7 @@ FutureProgress *ProgressManager::addTask(const QFuture &future, const QStr Shows a progress indicator for task given by the QFutureInterface object \a futureInterface. The progress indicator shows the specified \a title along with the progress bar. - The progress indicator will increase monotonically with time, at \a expectedSeconds + The progress indicator will increase monotonically with time, at \a expectedDuration it will reach about 80%, and continue to increase with a decreasingly slower rate. The \a type of a task will specify a logical grouping with other diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 3d21f82ca2e..4b28cd21af8 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -407,9 +407,10 @@ void LldbEngine::handleResponse(const QString &response) const QString name = item.name(); if (name == "result") { QString msg = item["status"].data(); - if (!msg.isEmpty()) + if (!msg.isEmpty()) { msg[0] = msg.at(0).toUpper(); - showStatusMessage(msg); + showStatusMessage(msg); + } int token = item["token"].toInt(); showMessage(QString("%1^").arg(token), LogOutput); diff --git a/src/plugins/git/instantblame.cpp b/src/plugins/git/instantblame.cpp index 5921518c347..f932c78698e 100644 --- a/src/plugins/git/instantblame.cpp +++ b/src/plugins/git/instantblame.cpp @@ -166,6 +166,13 @@ void InstantBlame::setup() connect(EditorManager::instance(), &EditorManager::currentEditorChanged, this, setupBlameForEditor); + connect(EditorManager::instance(), &EditorManager::documentClosed, + this, [this](IDocument *doc) { + if (m_document != doc) + return; + disconnect(m_documentChangedConn); + m_document = nullptr; + }); } // Porcelain format of git blame output diff --git a/src/shared/qtsingleapplication/qtlocalpeer.cpp b/src/shared/qtsingleapplication/qtlocalpeer.cpp index 47dd3805bad..4bbdab4abaa 100644 --- a/src/shared/qtsingleapplication/qtlocalpeer.cpp +++ b/src/shared/qtsingleapplication/qtlocalpeer.cpp @@ -60,6 +60,7 @@ QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId) + QLatin1Char('/') + socketName + QLatin1String("-lockfile"); lockFile.reset(new QLockFile(lockName)); + lockFile->setStaleLockTime(0); } bool QtLocalPeer::isClient()