Merge "Merge remote-tracking branch 'origin/9.0'"

This commit is contained in:
The Qt Project
2022-10-12 08:21:58 +00:00
11 changed files with 36 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -155,6 +155,9 @@
(\uicontrol {Zoom In}) or \inlineimage icons/minus.png (\uicontrol {Zoom In}) or \inlineimage icons/minus.png
(\uicontrol {Zoom Out}), or press \key Ctrl++ or \key Ctrl+-. (\uicontrol {Zoom Out}), or press \key Ctrl++ or \key Ctrl+-.
To hide the output, select the \inlineimage icons/rightsidebaricon.png
(\uicontrol {Hide/Show Right Sidebar}) button or press \key {Alt+Shift+0}.
\section1 CMake Build Steps \section1 CMake Build Steps
\QC builds CMake projects by running \c {cmake . --build}, which then runs \QC builds CMake projects by running \c {cmake . --build}, which then runs

View File

@@ -284,6 +284,12 @@
supported for namespaces, classes, functions, variables, include statements, supported for namespaces, classes, functions, variables, include statements,
and macros. and macros.
To move to the type definition of a symbol, select
\uicontrol {Follow Symbol Under Cursor to Type} or press
\key {Ctrl+Shift+F2}. To follow the symbol in the next split, select
\uicontrol {Follow Symbol Under Cursor to Type in Next Split} or
press \key {Ctrl+E, Ctrl+Shift+F2}.
When the cursor is on a string literal and the string is a QRC file path, When the cursor is on a string literal and the string is a QRC file path,
following the symbol opens the specified resource file for editing in the following the symbol opens the specified resource file for editing in the
\uicontrol {Resource Browser}. \uicontrol {Resource Browser}.

View File

@@ -37,6 +37,7 @@ Thumbs.db
# qtcreator generated files # qtcreator generated files
*.pro.user* *.pro.user*
CMakeLists.txt.user*
# xemacs temporary files # xemacs temporary files
*.flc *.flc

View File

@@ -629,7 +629,7 @@ FilePathInfo FilePath::filePathInfo() const
QFileInfo fi(path()); QFileInfo fi(path());
result.fileSize = fi.size(); result.fileSize = fi.size();
result.lastModified = fi.lastModified(); result.lastModified = fi.lastModified();
result.fileFlags = (FilePathInfo::FileFlag) fi.permissions().toInt(); result.fileFlags = (FilePathInfo::FileFlag) int(fi.permissions());
if (fi.isDir()) if (fi.isDir())
result.fileFlags |= FilePathInfo::DirectoryType; result.fileFlags |= FilePathInfo::DirectoryType;

View File

@@ -4,6 +4,7 @@
#include "executefilter.h" #include "executefilter.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/environment.h> #include <utils/environment.h>
@@ -114,6 +115,7 @@ void ExecuteFilter::done()
{ {
QTC_ASSERT(m_process, return); QTC_ASSERT(m_process, return);
MessageManager::writeFlashing(m_process->exitMessage()); MessageManager::writeFlashing(m_process->exitMessage());
EditorManager::updateWindowTitles(); // Refresh VCS topic if needed
removeProcess(); removeProcess();
runHeadCommand(); runHeadCommand();

View File

@@ -916,11 +916,12 @@ FilePaths GitClient::unmanagedFiles(const FilePaths &filePaths) const
const CommandResult result = vcsSynchronousExec(it.key(), args, RunFlags::NoOutput); const CommandResult result = vcsSynchronousExec(it.key(), args, RunFlags::NoOutput);
if (result.result() != ProcessResult::FinishedWithSuccess) if (result.result() != ProcessResult::FinishedWithSuccess)
return filePaths; return filePaths;
const QStringList managedFilePaths const auto toAbs = [&wd](const QString &fp) { return wd.absoluteFilePath(fp); };
= transform(result.cleanedStdOut().split('\0', Qt::SkipEmptyParts), const QStringList managedFilePaths =
[&wd](const QString &fp) { return wd.absoluteFilePath(fp); }); Utils::transform(result.cleanedStdOut().split('\0', Qt::SkipEmptyParts), toAbs);
const QStringList filtered = Utils::filtered(it.value(), [&managedFilePaths, &wd](const QString &fp) { const QStringList absPaths = Utils::transform(it.value(), toAbs);
return !managedFilePaths.contains(wd.absoluteFilePath(fp)); const QStringList filtered = Utils::filtered(absPaths, [&managedFilePaths](const QString &fp) {
return !managedFilePaths.contains(fp);
}); });
res += FileUtils::toFilePathList(filtered); res += FileUtils::toFilePathList(filtered);
} }
@@ -1530,7 +1531,9 @@ bool GitClient::synchronousAdd(const FilePath &workingDirectory,
const QStringList &extraOptions) const QStringList &extraOptions)
{ {
QStringList args{"add"}; QStringList args{"add"};
args += extraOptions + files; args += extraOptions;
args += "--";
args += files;
return vcsSynchronousExec(workingDirectory, args).result() return vcsSynchronousExec(workingDirectory, args).result()
== ProcessResult::FinishedWithSuccess; == ProcessResult::FinishedWithSuccess;
} }
@@ -1542,6 +1545,7 @@ bool GitClient::synchronousDelete(const FilePath &workingDirectory,
QStringList arguments = {"rm"}; QStringList arguments = {"rm"};
if (force) if (force)
arguments << "--force"; arguments << "--force";
arguments << "--";
arguments.append(files); arguments.append(files);
return vcsSynchronousExec(workingDirectory, arguments).result() return vcsSynchronousExec(workingDirectory, arguments).result()
== ProcessResult::FinishedWithSuccess; == ProcessResult::FinishedWithSuccess;

View File

@@ -1834,7 +1834,7 @@ bool GitPluginPrivate::vcsAdd(const FilePath &filePath)
bool GitPluginPrivate::vcsDelete(const FilePath &filePath) bool GitPluginPrivate::vcsDelete(const FilePath &filePath)
{ {
return m_gitClient.synchronousDelete(filePath.parentDir().absolutePath(), true, {filePath.fileName()}); return m_gitClient.synchronousDelete(filePath.absolutePath(), true, {filePath.fileName()});
} }
bool GitPluginPrivate::vcsMove(const FilePath &from, const FilePath &to) bool GitPluginPrivate::vcsMove(const FilePath &from, const FilePath &to)

View File

@@ -60,6 +60,8 @@ void MesonProcess::handleProcessDone()
void MesonProcess::setupProcess(const Command &command, const Environment &env, void MesonProcess::setupProcess(const Command &command, const Environment &env,
const QString &projectName, bool captureStdo) const QString &projectName, bool captureStdo)
{ {
if (m_process)
m_process.release()->deleteLater();
m_process.reset(new QtcProcess); m_process.reset(new QtcProcess);
connect(m_process.get(), &QtcProcess::done, this, &MesonProcess::handleProcessDone); connect(m_process.get(), &QtcProcess::done, this, &MesonProcess::handleProcessDone);
if (!captureStdo) { if (!captureStdo) {

View File

@@ -196,19 +196,17 @@ QList<ProjectExplorer::BuildTargetInfo> MesonProjectParser::appsTargets() const
} }
return apps; return apps;
} }
bool MesonProjectParser::startParser() bool MesonProjectParser::startParser()
{ {
m_parserFutureResult = Utils::runAsync( m_parserFutureResult = Utils::runAsync(
ProjectExplorer::ProjectExplorerPlugin::sharedThreadPool(), ProjectExplorer::ProjectExplorerPlugin::sharedThreadPool(),
[process = &m_process, [processOutput = m_process.stdOut(), introType = m_introType,
introType = m_introType, buildDir = m_buildDir.toString(), srcDir = m_srcDir] {
buildDir = m_buildDir.toString(), if (introType == IntroDataType::file)
srcDir = m_srcDir]() {
if (introType == IntroDataType::file) {
return extractParserResults(srcDir, MesonInfoParser::parse(buildDir)); return extractParserResults(srcDir, MesonInfoParser::parse(buildDir));
} else { else
return extractParserResults(srcDir, MesonInfoParser::parse(process->stdOut())); return extractParserResults(srcDir, MesonInfoParser::parse(processOutput));
}
}); });
Utils::onFinished(m_parserFutureResult, this, &MesonProjectParser::update); Utils::onFinished(m_parserFutureResult, this, &MesonProjectParser::update);

View File

@@ -291,9 +291,7 @@ bool SuiteConf::ensureObjectMapExists() const
{ {
if (m_objectMapStyle != "script") { if (m_objectMapStyle != "script") {
const Utils::FilePath objectMap = objectMapPath(); const Utils::FilePath objectMap = objectMapPath();
bool ok = objectMap.parentDir().ensureWritableDir(); return objectMap.parentDir().ensureWritableDir() && objectMap.ensureExistingFile();
ok |= objectMap.ensureExistingFile();
return ok;
} }
const Utils::FilePath scripts = SquishPlugin::squishSettings()->scriptsPath(language()); const Utils::FilePath scripts = SquishPlugin::squishSettings()->scriptsPath(language());