Merge remote-tracking branch 'origin/13.0' into qds/dev

Change-Id: I6dcba6ce7a9dec1c14dd6ad27732337c60eb7def
This commit is contained in:
Tim Jenssen
2024-05-28 15:54:15 +02:00
12 changed files with 64 additions and 40 deletions

View File

@@ -2,6 +2,15 @@ type: Group
instructions: instructions:
- type: MakeDirectory - type: MakeDirectory
directory: "{{.AgentWorkingDir}}/build/qt_temp" 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 - type: Group
instructions: instructions:
@@ -26,7 +35,7 @@ instructions:
maxTimeBetweenOutput: 360 maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to extract LLVM package, check logs." userMessageOnFailure: "Failed to extract LLVM package, check logs."
- type: ExecuteCommand - 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 maxTimeInSeconds: 36000
maxTimeBetweenOutput: 3600 maxTimeBetweenOutput: 3600
userMessageOnFailure: "Failed to run build.py, check logs." userMessageOnFailure: "Failed to run build.py, check logs."
@@ -60,7 +69,7 @@ instructions:
maxTimeBetweenOutput: 360 maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to extract LLVM package, check logs." userMessageOnFailure: "Failed to extract LLVM package, check logs."
- type: ExecuteCommand - 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 maxTimeInSeconds: 36000
maxTimeBetweenOutput: 3600 maxTimeBetweenOutput: 3600
userMessageOnFailure: "Failed to run build.py, check logs." userMessageOnFailure: "Failed to run build.py, check logs."
@@ -112,7 +121,7 @@ instructions:
maxTimeBetweenOutput: 360 maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to extract LLVM package, check logs." userMessageOnFailure: "Failed to extract LLVM package, check logs."
- type: ExecuteCommand - 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 maxTimeInSeconds: 36000
maxTimeBetweenOutput: 3600 maxTimeBetweenOutput: 3600
userMessageOnFailure: "Failed to run build.py, check logs." userMessageOnFailure: "Failed to run build.py, check logs."

View File

@@ -14,8 +14,9 @@
\title Getting Started \title Getting Started
To learn the basics of \QC, take the \e {Getting Started with Qt Creator} To learn the basics of \QC, take the
course in \l{https://www.qt.io/courses/}{Qt Learning}. \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}. For more information about installing \QC, see \l{Install \QC}.

View File

@@ -190,16 +190,17 @@ bool UnixPtyProcess::startProcess(const QString &shellPath,
m_readMasterNotify->disconnect(); m_readMasterNotify->disconnect();
}); });
QStringList varNames; QProcessEnvironment env;
for (const QString &line : std::as_const(environment)) for (const QString &envEntry : environment) {
varNames.append(line.split("=").first()); const int idx = envEntry.indexOf('=');
if (idx != -1)
QProcessEnvironment envFormat; env.insert(envEntry.left(idx), envEntry.mid(idx + 1));
for (const QString &line : std::as_const(environment)) else
envFormat.insert(line.split("=").first(), line.split("=").last()); env.insert(envEntry, QString());
}
m_shellProcess.setWorkingDirectory(workingDir); m_shellProcess.setWorkingDirectory(workingDir);
m_shellProcess.setProcessEnvironment(envFormat); m_shellProcess.setProcessEnvironment(env);
m_shellProcess.setReadChannel(QProcess::StandardOutput); m_shellProcess.setReadChannel(QProcess::StandardOutput);
m_shellProcess.start(m_shellPath, arguments); m_shellProcess.start(m_shellPath, arguments);
if (!m_shellProcess.waitForStarted()) if (!m_shellProcess.waitForStarted())

View File

@@ -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) void addToolTipsToMenu(QMenu *menu)
{ {

View File

@@ -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 This signal is emitted after an \a editor was created for the file at
before it was opened in an editor view. \a filePath, but before it was opened in an editor view.
*/ */
/*! /*!
\fn void Core::EditorManager::editorOpened(Core::IEditor *editor) \fn void Core::EditorManager::editorOpened(Core::IEditor *editor)

View File

@@ -47,23 +47,23 @@ static void mimeTypeFactoryLookup(const Utils::MimeType &mimeType,
\brief The IEditorFactory class creates suitable editors for documents \brief The IEditorFactory class creates suitable editors for documents
according to their MIME type. according to their MIME type.
Whenever a user wants to edit or create a document, the EditorManager When a user wants to edit or create a document, the EditorManager
scans all IEditorFactory instances for suitable editors. The selected scans all IEditorFactory instances for suitable editors and selects one
IEditorFactory is then asked to create an editor. to create an editor.
Implementations should set the properties of the IEditorFactory subclass in Implementations should set the properties of the IEditorFactory subclass in
their constructor with IEditorFactory::setId(), IEditorFactory::setDisplayName(), 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 IEditorFactory instances automatically register themselves in \QC in their
constructor. constructor.
There are two varieties of editors: Internal and external. Internal editors There are two varieties of editors: internal and external. Internal editors
open within the main editing area of Qt Creator. An IEditorFactory defines open within the main editing area of \QC. An IEditorFactory instance defines
an internal editor by using the \c setEditorCreator function. External an internal editor by using the setEditorCreator() function. External
editors are external applications and are defined by using the editors are external applications and are defined by using the
\c setEditorStarter function. They are accessible by the user using setEditorStarter() function. The user can access them from the
the \uicontrol{Open With} dialog \uicontrol{Open With} dialog.
\sa Core::IEditor \sa Core::IEditor
\sa Core::IDocument \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 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. first.
*/ */
const EditorFactories IEditorFactory::defaultEditorFactories(const MimeType &mimeType) 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() \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 Sets the function that is used to create an editor instance in
createEditor() to \a creator. createEditor() to \a creator.
This is mutually exclusive with the use of setEditorStarter. This is mutually exclusive with the use of setEditorStarter().
\sa createEditor() \sa createEditor()
*/ */
@@ -313,12 +314,16 @@ void IEditorFactory::setEditorCreator(const std::function<IEditor *()> &creator)
} }
/*! /*!
Opens the editor with \a fileName. Returns \c true on success or \c false \fn void Core::IEditorFactory::setEditorStarter(const std::function<bool(const Utils::FilePath &, QString *)> &starter);
on failure along with the error in \a errorMessage.
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<bool(const FilePath &, QString *)> &starter) void IEditorFactory::setEditorStarter(const std::function<bool(const FilePath &, QString *)> &starter)
{ {
QTC_CHECK(!m_starter); QTC_CHECK(!m_starter);

View File

@@ -570,8 +570,6 @@ bool ICore::showWarningWithOptions(const QString &title, const QString &text,
If \a scope is \c QSettings::SystemScope, only the installation settings If \a scope is \c QSettings::SystemScope, only the installation settings
shipped with the current version of \QC will be read. This shipped with the current version of \QC will be read. This
functionality exists for internal purposes only. functionality exists for internal purposes only.
\sa settingsDatabase()
*/ */
QtcSettings *ICore::settings(QSettings::Scope scope) QtcSettings *ICore::settings(QSettings::Scope scope)
{ {

View File

@@ -143,7 +143,7 @@ QString IVersionControl::refreshTopic(const FilePath &repository)
it will be used. Otherwise it will be refreshed using the items provided by it will be used. Otherwise it will be refreshed using the items provided by
\c setTopicFileTracker() and \c setTopicRefresher(). \c setTopicFileTracker() and \c setTopicRefresher().
\sa setTopicFileTracker(), setTopicRefresher(). \sa setTopicFileTracker(), setTopicRefresher()
*/ */
QString IVersionControl::vcsTopic(const FilePath &topLevel) QString IVersionControl::vcsTopic(const FilePath &topLevel)

View File

@@ -768,7 +768,7 @@ FutureProgress *ProgressManager::addTask(const QFuture<void> &future, const QStr
Shows a progress indicator for task given by the QFutureInterface object Shows a progress indicator for task given by the QFutureInterface object
\a futureInterface. \a futureInterface.
The progress indicator shows the specified \a title along with the progress bar. 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. 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 The \a type of a task will specify a logical grouping with other

View File

@@ -407,9 +407,10 @@ void LldbEngine::handleResponse(const QString &response)
const QString name = item.name(); const QString name = item.name();
if (name == "result") { if (name == "result") {
QString msg = item["status"].data(); QString msg = item["status"].data();
if (!msg.isEmpty()) if (!msg.isEmpty()) {
msg[0] = msg.at(0).toUpper(); msg[0] = msg.at(0).toUpper();
showStatusMessage(msg); showStatusMessage(msg);
}
int token = item["token"].toInt(); int token = item["token"].toInt();
showMessage(QString("%1^").arg(token), LogOutput); showMessage(QString("%1^").arg(token), LogOutput);

View File

@@ -166,6 +166,13 @@ void InstantBlame::setup()
connect(EditorManager::instance(), &EditorManager::currentEditorChanged, connect(EditorManager::instance(), &EditorManager::currentEditorChanged,
this, setupBlameForEditor); 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 // Porcelain format of git blame output

View File

@@ -60,6 +60,7 @@ QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId)
+ QLatin1Char('/') + socketName + QLatin1Char('/') + socketName
+ QLatin1String("-lockfile"); + QLatin1String("-lockfile");
lockFile.reset(new QLockFile(lockName)); lockFile.reset(new QLockFile(lockName));
lockFile->setStaleLockTime(0);
} }
bool QtLocalPeer::isClient() bool QtLocalPeer::isClient()