aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2024-04-23 14:03:46 +0200
committerTim Jenssen <tim.jenssen@qt.io>2024-04-23 14:03:46 +0200
commit7dfa7469207f899e347dc6f2bf0c3011140a9b23 (patch)
treeab52ebd391b352af044e6168817e6e477761bd02 /src
parent2c38f9ae74816fbe193f83766071ffd2fac184c5 (diff)
parentfacd32b2e07b3d2a13f26b99ed08ccf1eb174397 (diff)
Merge remote-tracking branch 'origin/13.0' into HEAD
Diffstat (limited to 'src')
-rw-r--r--src/libs/modelinglib/qmt/diagram_scene/diagramscenemodel.cpp4
-rw-r--r--src/libs/utils/fsengine/fsengine_impl.h3
-rw-r--r--src/libs/utils/namevaluesdialog.cpp6
-rw-r--r--src/libs/utils/qtcprocess.cpp5
-rw-r--r--src/plugins/android/androidmanager.cpp2
-rw-r--r--src/plugins/android/androidsdkmanager.cpp4
-rw-r--r--src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp84
-rw-r--r--src/plugins/cmakeprojectmanager/fileapidataextractor.cpp9
-rw-r--r--src/plugins/cmakeprojectmanager/projecttreehelper.cpp17
-rw-r--r--src/plugins/cmakeprojectmanager/projecttreehelper.h6
-rw-r--r--src/plugins/debugger/debuggerrunconfigurationaspect.cpp8
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp2
-rw-r--r--src/plugins/ios/iosrunner.cpp19
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp16
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp10
-rw-r--r--src/plugins/projectexplorer/buildpropertiessettings.cpp5
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp2
-rw-r--r--src/plugins/projectexplorer/projectexplorerconstants.h2
-rw-r--r--src/plugins/saferenderer/wizards/qsrapp2_1/main.qml.tpl7
-rw-r--r--src/plugins/texteditor/TextEditor.json.in15
-rw-r--r--src/plugins/texteditor/texteditor.cpp5
m---------src/shared/qbs0
23 files changed, 152 insertions, 81 deletions
diff --git a/src/libs/modelinglib/qmt/diagram_scene/diagramscenemodel.cpp b/src/libs/modelinglib/qmt/diagram_scene/diagramscenemodel.cpp
index de8b82de20..13167f691d 100644
--- a/src/libs/modelinglib/qmt/diagram_scene/diagramscenemodel.cpp
+++ b/src/libs/modelinglib/qmt/diagram_scene/diagramscenemodel.cpp
@@ -353,7 +353,9 @@ void DiagramSceneModel::selectAllElements()
void DiagramSceneModel::selectElement(DElement *element)
{
QGraphicsItem *selectItem = m_elementToItemMap.value(element);
- for (QGraphicsItem *item : std::as_const(m_selectedItems)) {
+ // We have to create a copy since "setSelected" may modify m_selectedItems
+ const QSet<QGraphicsItem *> copy = m_selectedItems;
+ for (QGraphicsItem *item : copy) {
if (item != selectItem)
item->setSelected(false);
}
diff --git a/src/libs/utils/fsengine/fsengine_impl.h b/src/libs/utils/fsengine/fsengine_impl.h
index 00a33f227c..7a68119c83 100644
--- a/src/libs/utils/fsengine/fsengine_impl.h
+++ b/src/libs/utils/fsengine/fsengine_impl.h
@@ -53,7 +53,8 @@ public:
uint ownerId(FileOwner) const override;
QString owner(FileOwner) const override;
-#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
+ // The FileTime change in QAbstractFileEngine, in qtbase, is in since Qt 6.7.1
+#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 1)
using FileTime = QFile::FileTime;
#endif
bool setFileTime(const QDateTime &newDate, FileTime time) override;
diff --git a/src/libs/utils/namevaluesdialog.cpp b/src/libs/utils/namevaluesdialog.cpp
index 35587f8791..0b009c7568 100644
--- a/src/libs/utils/namevaluesdialog.cpp
+++ b/src/libs/utils/namevaluesdialog.cpp
@@ -45,7 +45,11 @@ signals:
void lostFocus();
private:
- void focusOutEvent(QFocusEvent *) override { emit lostFocus(); }
+ void focusOutEvent(QFocusEvent *e) override
+ {
+ QPlainTextEdit::focusOutEvent(e);
+ emit lostFocus();
+ }
};
} // namespace Internal
diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp
index b399d86b36..3f06e04fc1 100644
--- a/src/libs/utils/qtcprocess.cpp
+++ b/src/libs/utils/qtcprocess.cpp
@@ -769,6 +769,7 @@ private:
std::unique_ptr<ProcessInterfaceHandler> m_processHandler;
mutable QMutex m_mutex;
QList<ProcessInterfaceSignal *> m_signals;
+ Guard m_guard;
};
class ProcessPrivate : public QObject
@@ -961,6 +962,10 @@ GeneralProcessBlockingImpl::GeneralProcessBlockingImpl(ProcessPrivate *parent)
bool GeneralProcessBlockingImpl::waitForSignal(ProcessSignalType newSignal, QDeadlineTimer timeout)
{
+ QTC_ASSERT(!m_guard.isLocked(), qWarning("Process::waitForSignal() called recursively. "
+ "The call is being ignored."); return false);
+ GuardLocker locker(m_guard);
+
m_processHandler->setParent(nullptr);
QThread thread;
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp
index 3666762be6..5128f761a0 100644
--- a/src/plugins/android/androidmanager.cpp
+++ b/src/plugins/android/androidmanager.cpp
@@ -532,7 +532,7 @@ QString androidNameForApiLevel(int x)
case 33:
return QLatin1String("Android 13.0 (\"Tiramisu\")");
case 34:
- return QLatin1String("Android API 34");
+ return QLatin1String("Android 14.0 (\"UpsideDownCake\")");
default:
return Tr::tr("Unknown Android version. API Level: %1").arg(x);
}
diff --git a/src/plugins/android/androidsdkmanager.cpp b/src/plugins/android/androidsdkmanager.cpp
index 7ae9ce05aa..a4760b3d4a 100644
--- a/src/plugins/android/androidsdkmanager.cpp
+++ b/src/plugins/android/androidsdkmanager.cpp
@@ -126,10 +126,8 @@ static void sdkManagerCommand(const AndroidConfig &config, const QStringList &ar
bool assertionFound = false;
proc.setStdOutCallback([offset, progressQuota, &proc, &assertionFound, &promise](const QString &out) {
int progressPercent = parseProgress(out, assertionFound);
- if (assertionFound) {
+ if (assertionFound)
proc.stop();
- proc.waitForFinished();
- }
if (progressPercent != -1)
promise.setProgressValue(offset + qRound((progressPercent / 100.0) * progressQuota));
});
diff --git a/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp b/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp
index 99c40c99b6..7141903224 100644
--- a/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp
+++ b/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp
@@ -132,7 +132,7 @@ void ActivationSequenceContextProcessor::processComment()
void ActivationSequenceContextProcessor::processInclude()
{
- if (m_token.isLiteral() && !isCompletionKindStringLiteralOrSlash())
+ if (m_token.isStringLiteral() && !isCompletionKindStringLiteralOrSlash())
m_completionKind = CPlusPlus::T_EOF_SYMBOL;
}
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp
index 0ba54b60a8..25d51488f8 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp
@@ -749,14 +749,17 @@ CMakeBuildSystem::projectFileArgumentPosition(const QString &targetName, const Q
&& func.Arguments().size() > 1 && func.Arguments().front().Value == target_name;
});
- for (const auto &func : {function, targetSourcesFunc, addQmlModuleFunc}) {
+ auto setSourceFilePropFunc = findFunction(*cmakeListFile, [](const auto &func) {
+ return func.LowerCaseName() == "set_source_files_properties";
+ });
+
+ for (const auto &func : {function, targetSourcesFunc, addQmlModuleFunc, setSourceFilePropFunc}) {
if (!func.has_value())
continue;
- auto filePathArgument = Utils::findOrDefault(func->Arguments(),
- [file_name = fileName.toStdString()](
- const auto &arg) {
- return arg.Value == file_name;
- });
+ auto filePathArgument = Utils::findOrDefault(
+ func->Arguments(), [file_name = fileName.toStdString()](const auto &arg) {
+ return arg.Value == file_name;
+ });
if (!filePathArgument.Value.empty()) {
return ProjectFileArgumentPosition{filePathArgument, targetCMakeFile, fileName};
@@ -925,48 +928,59 @@ bool CMakeBuildSystem::renameFile(Node *context,
{
if (auto n = dynamic_cast<CMakeTargetNode *>(context)) {
const FilePath projDir = n->filePath().canonicalPath();
- const QString newRelPathName
- = newFilePath.canonicalPath().relativePathFrom(projDir).cleanPath().toString();
+ const FilePath newRelPath = newFilePath.canonicalPath().relativePathFrom(projDir).cleanPath();
+ const QString newRelPathName = newRelPath.toString();
+
+ // FilePath needs the file to exist on disk, the old file has already been renamed
+ const QString oldRelPathName
+ = newRelPath.parentDir().pathAppended(oldFilePath.fileName()).cleanPath().toString();
const QString targetName = n->buildKey();
const QString key
= QStringList{projDir.path(), targetName, oldFilePath.path(), newFilePath.path()}.join(
";");
- auto fileToRename = m_filesToBeRenamed.take(key);
- if (!fileToRename.cmakeFile.exists()) {
+ std::optional<CMakeBuildSystem::ProjectFileArgumentPosition> fileToRename
+ = m_filesToBeRenamed.take(key);
+ if (!fileToRename->cmakeFile.exists()) {
qCCritical(cmakeBuildSystemLog).noquote()
- << "File" << fileToRename.cmakeFile.path() << "does not exist.";
+ << "File" << fileToRename->cmakeFile.path() << "does not exist.";
return false;
}
- BaseTextEditor *editor = qobject_cast<BaseTextEditor *>(
- Core::EditorManager::openEditorAt({fileToRename.cmakeFile,
- static_cast<int>(fileToRename.argumentPosition.Line),
- static_cast<int>(fileToRename.argumentPosition.Column
- - 1)},
- Constants::CMAKE_EDITOR_ID,
- Core::EditorManager::DoNotMakeVisible));
- if (!editor) {
- qCCritical(cmakeBuildSystemLog).noquote()
- << "BaseTextEditor cannot be obtained for" << fileToRename.cmakeFile.path()
- << fileToRename.argumentPosition.Line << int(fileToRename.argumentPosition.Column);
- return false;
- }
+ do {
+ BaseTextEditor *editor = qobject_cast<BaseTextEditor *>(
+ Core::EditorManager::openEditorAt(
+ {fileToRename->cmakeFile,
+ static_cast<int>(fileToRename->argumentPosition.Line),
+ static_cast<int>(fileToRename->argumentPosition.Column - 1)},
+ Constants::CMAKE_EDITOR_ID,
+ Core::EditorManager::DoNotMakeVisible));
+ if (!editor) {
+ qCCritical(cmakeBuildSystemLog).noquote()
+ << "BaseTextEditor cannot be obtained for" << fileToRename->cmakeFile.path()
+ << fileToRename->argumentPosition.Line
+ << int(fileToRename->argumentPosition.Column);
+ return false;
+ }
- // If quotes were used for the source file, skip the starting quote
- if (fileToRename.argumentPosition.Delim == cmListFileArgument::Quoted)
- editor->setCursorPosition(editor->position() + 1);
+ // If quotes were used for the source file, skip the starting quote
+ if (fileToRename->argumentPosition.Delim == cmListFileArgument::Quoted)
+ editor->setCursorPosition(editor->position() + 1);
- if (!fileToRename.fromGlobbing)
- editor->replace(fileToRename.relativeFileName.length(), newRelPathName);
+ if (!fileToRename->fromGlobbing)
+ editor->replace(fileToRename->relativeFileName.length(), newRelPathName);
- editor->editorWidget()->autoIndent();
- if (!Core::DocumentManager::saveDocument(editor->document())) {
- qCCritical(cmakeBuildSystemLog).noquote()
- << "Changes to" << fileToRename.cmakeFile.path() << "could not be saved.";
- return false;
- }
+ editor->editorWidget()->autoIndent();
+ if (!Core::DocumentManager::saveDocument(editor->document())) {
+ qCCritical(cmakeBuildSystemLog).noquote()
+ << "Changes to" << fileToRename->cmakeFile.path() << "could not be saved.";
+ return false;
+ }
+
+ // Try the next occurrence. This can happen if set_source_file_properties is used
+ fileToRename = projectFileArgumentPosition(targetName, oldRelPathName);
+ } while (fileToRename);
return true;
}
diff --git a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp
index a3795369f7..dd7b6b5c70 100644
--- a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp
+++ b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp
@@ -633,7 +633,7 @@ static FolderNode *createSourceGroupNode(const QString &sourceGroupName,
FolderNode *existingNode = currentNode->findChildFolderNode(
[&p](const FolderNode *fn) { return fn->displayName() == p; });
if (!existingNode) {
- auto node = createCMakeVFolder(sourceDirectory, Node::DefaultFolderPriority + 5, p, true);
+ auto node = createCMakeVFolder(sourceDirectory, Node::DefaultFolderPriority + 5, p);
node->setListInProject(false);
node->setIcon([] { return Icon::fromTheme("edit-copy"); });
@@ -654,7 +654,6 @@ static void addCompileGroups(ProjectNode *targetRoot,
const FilePath &buildDirectory,
const TargetDetails &td)
{
- const bool showSourceFolders = settings().showSourceSubFolders();
const bool inSourceBuild = (sourceDirectory == buildDirectory);
QSet<FilePath> alreadyListed;
@@ -685,6 +684,9 @@ static void addCompileGroups(ProjectNode *targetRoot,
if (isPchFile(buildDirectory, sourcePath) || isUnityFile(buildDirectory, sourcePath))
node->setIsGenerated(true);
+ const bool showSourceFolders = settings().showSourceSubFolders()
+ && defaultCMakeSourceGroupFolder(td.sourceGroups[si.sourceGroup]);
+
// Where does the file node need to go?
if (showSourceFolders && sourcePath.isChildOf(buildDirectory) && !inSourceBuild) {
buildFileNodes.emplace_back(std::move(node));
@@ -696,6 +698,9 @@ static void addCompileGroups(ProjectNode *targetRoot,
}
for (size_t i = 0; i < sourceGroupFileNodes.size(); ++i) {
+ const bool showSourceFolders = settings().showSourceSubFolders()
+ && defaultCMakeSourceGroupFolder(td.sourceGroups[i]);
+
std::vector<std::unique_ptr<FileNode>> &current = sourceGroupFileNodes[i];
FolderNode *insertNode = td.sourceGroups[i] == "TREE"
? targetRoot
diff --git a/src/plugins/cmakeprojectmanager/projecttreehelper.cpp b/src/plugins/cmakeprojectmanager/projecttreehelper.cpp
index e17505095a..c25cc69378 100644
--- a/src/plugins/cmakeprojectmanager/projecttreehelper.cpp
+++ b/src/plugins/cmakeprojectmanager/projecttreehelper.cpp
@@ -18,15 +18,22 @@ using namespace ProjectExplorer;
namespace CMakeProjectManager::Internal {
+bool defaultCMakeSourceGroupFolder(const QString &displayName)
+{
+ return displayName == "Source Files" || displayName == "Header Files"
+ || displayName == "Resources" || displayName == ""
+ || displayName == "Precompile Header File" || displayName == "CMake Rules"
+ || displayName == "Object Files";
+}
+
std::unique_ptr<FolderNode> createCMakeVFolder(const Utils::FilePath &basePath,
int priority,
- const QString &displayName,
- bool sourcesOrHeaders)
+ const QString &displayName)
{
auto newFolder = std::make_unique<VirtualFolderNode>(basePath);
newFolder->setPriority(priority);
newFolder->setDisplayName(displayName);
- newFolder->setIsSourcesOrHeaders(sourcesOrHeaders);
+ newFolder->setIsSourcesOrHeaders(defaultCMakeSourceGroupFolder(displayName));
return newFolder;
}
@@ -35,14 +42,13 @@ void addCMakeVFolder(FolderNode *base,
int priority,
const QString &displayName,
std::vector<std::unique_ptr<FileNode>> &&files,
- bool sourcesOrHeaders,
bool listInProject)
{
if (files.size() == 0)
return;
FolderNode *folder = base;
if (!displayName.isEmpty()) {
- auto newFolder = createCMakeVFolder(basePath, priority, displayName, sourcesOrHeaders);
+ auto newFolder = createCMakeVFolder(basePath, priority, displayName);
folder = newFolder.get();
base->addNode(std::move(newFolder));
}
@@ -90,7 +96,6 @@ void addCMakeInputs(FolderNode *root,
10,
Tr::tr("<Other Locations>"),
removeKnownNodes(knownFiles, std::move(rootInputs)),
- /*sourcesOrHeaders=*/false,
/*listInProject=*/false);
root->addNode(std::move(cmakeVFolder));
diff --git a/src/plugins/cmakeprojectmanager/projecttreehelper.h b/src/plugins/cmakeprojectmanager/projecttreehelper.h
index bcd5500db9..35f7cf16a4 100644
--- a/src/plugins/cmakeprojectmanager/projecttreehelper.h
+++ b/src/plugins/cmakeprojectmanager/projecttreehelper.h
@@ -11,17 +11,17 @@
namespace CMakeProjectManager::Internal {
+bool defaultCMakeSourceGroupFolder(const QString &displayName);
+
std::unique_ptr<ProjectExplorer::FolderNode> createCMakeVFolder(const Utils::FilePath &basePath,
int priority,
- const QString &displayName,
- bool sourcesOrHeaders);
+ const QString &displayName);
void addCMakeVFolder(ProjectExplorer::FolderNode *base,
const Utils::FilePath &basePath,
int priority,
const QString &displayName,
std::vector<std::unique_ptr<ProjectExplorer::FileNode>> &&files,
- bool sourcesOrHeaders = false,
bool listInProject = true);
std::vector<std::unique_ptr<ProjectExplorer::FileNode>> &&removeKnownNodes(
diff --git a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
index bef91c5992..cdbedf19e1 100644
--- a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
+++ b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
@@ -100,10 +100,10 @@ DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(Target *target)
};
setSummaryText();
- connect(&m_cppAspect, &BaseAspect::changed, this, setSummaryText);
- connect(&m_qmlAspect, &BaseAspect::changed, this, setSummaryText);
- connect(&m_pythonAspect, &BaseAspect::changed, this, setSummaryText);
- connect(&m_overrideStartupAspect, &BaseAspect::changed, this, setSummaryText);
+ connect(&m_cppAspect, &BaseAspect::changed, details, setSummaryText);
+ connect(&m_qmlAspect, &BaseAspect::changed, details, setSummaryText);
+ connect(&m_pythonAspect, &BaseAspect::changed, details, setSummaryText);
+ connect(&m_overrideStartupAspect, &BaseAspect::changed, details, setSummaryText);
return details;
});
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 7a7554da9e..a84598aec0 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -999,6 +999,7 @@ bool FakeVimUserCommandsModel::setData(const QModelIndex &index,
return true;
}
+#ifdef WITH_TESTS
static void setupTest(QString *title, FakeVimHandler **handler, QWidget **edit)
{
*title = QString::fromLatin1("test.cpp");
@@ -1040,7 +1041,6 @@ static void setupTest(QString *title, FakeVimHandler **handler, QWidget **edit)
(*handler)->handleCommand("set iskeyword=@,48-57,_,192-255,a-z,A-Z");
}
-#ifdef WITH_TESTS
QObject *createFakeVimTester( void (*setupTest)(QString *, FakeVimHandler **, QWidget **) ); // in fakevim_test.cpp
#endif
diff --git a/src/plugins/ios/iosrunner.cpp b/src/plugins/ios/iosrunner.cpp
index 9e2174c80b..1999f7a899 100644
--- a/src/plugins/ios/iosrunner.cpp
+++ b/src/plugins/ios/iosrunner.cpp
@@ -60,18 +60,29 @@ using namespace Tasking;
namespace Ios::Internal {
+static QString identifierForRunControl(RunControl *runControl)
+{
+ const IosDeviceTypeAspect::Data *data = runControl->aspect<IosDeviceTypeAspect>();
+ return data ? data->deviceType.identifier : QString();
+}
+
static void stopRunningRunControl(RunControl *runControl)
{
static QMap<Id, QPointer<RunControl>> activeRunControls;
+ // clean up deleted
+ Utils::erase(activeRunControls, [](const QPointer<RunControl> &rc) { return !rc; });
+
Target *target = runControl->target();
- Id devId = DeviceKitAspect::deviceId(target->kit());
+ const Id devId = DeviceKitAspect::deviceId(target->kit());
+ const QString identifier = identifierForRunControl(runControl);
// The device can only run an application at a time, if an app is running stop it.
- if (activeRunControls.contains(devId)) {
- if (QPointer<RunControl> activeRunControl = activeRunControls[devId])
+ if (QPointer<RunControl> activeRunControl = activeRunControls[devId]) {
+ if (identifierForRunControl(activeRunControl) == identifier) {
activeRunControl->initiateStop();
- activeRunControls.remove(devId);
+ activeRunControls.remove(devId);
+ }
}
if (devId.isValid())
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index 898acaba2a..806628668f 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -391,14 +391,14 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
const CommandLine thisCommand = rc->commandLine();
const FilePath thisWorkingDirectory = rc->workingDirectory();
const Environment thisEnvironment = rc->environment();
- const auto tab = std::find_if(m_runControlTabs.begin(), m_runControlTabs.end(),
- [&](const RunControlTab &tab) {
- if (!tab.runControl || tab.runControl->isRunning() || tab.runControl->isStarting())
- return false;
- return thisCommand == tab.runControl->commandLine()
- && thisWorkingDirectory == tab.runControl->workingDirectory()
- && thisEnvironment == tab.runControl->environment();
- });
+ const auto tab = std::find_if(
+ m_runControlTabs.begin(), m_runControlTabs.end(), [&](const RunControlTab &tab) {
+ if (!tab.runControl || !tab.runControl->isStopped())
+ return false;
+ return thisCommand == tab.runControl->commandLine()
+ && thisWorkingDirectory == tab.runControl->workingDirectory()
+ && thisEnvironment == tab.runControl->environment();
+ });
if (tab != m_runControlTabs.end()) {
// Reuse this tab
if (tab->runControl)
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index f189cf0a9b..2c475f2ad7 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -617,7 +617,15 @@ FilePath BuildConfiguration::buildDirectoryFromTemplate(const FilePath &projectD
[buildType] { return buildTypeName(buildType); });
exp.registerSubProvider([kit] { return kit->macroExpander(); });
- FilePath buildDir = FilePath::fromUserInput(buildPropertiesSettings().buildDirectoryTemplate());
+ auto project = ProjectManager::projectWithProjectFilePath(mainFilePath);
+ auto environment = Environment::systemEnvironment();
+ // This adds the environment variables from the <project>.shared file
+ if (project)
+ environment.modify(project->additionalEnvironment());
+
+ FilePath buildDir = FilePath::fromUserInput(environment.value_or(
+ Constants::QTC_DEFAULT_BUILD_DIRECTORY_TEMPLATE,
+ buildPropertiesSettings().buildDirectoryTemplate()));
qCDebug(bcLog) << "build dir template:" << buildDir.toUserOutput();
buildDir = exp.expand(buildDir);
qCDebug(bcLog) << "expanded build:" << buildDir.toUserOutput();
diff --git a/src/plugins/projectexplorer/buildpropertiessettings.cpp b/src/plugins/projectexplorer/buildpropertiessettings.cpp
index c9cde2624d..5b60e6c9c1 100644
--- a/src/plugins/projectexplorer/buildpropertiessettings.cpp
+++ b/src/plugins/projectexplorer/buildpropertiessettings.cpp
@@ -8,6 +8,7 @@
#include <coreplugin/dialogs/ioptionspage.h>
+#include <utils/environment.h>
#include <utils/layoutbuilder.h>
using namespace Utils;
@@ -16,7 +17,9 @@ namespace ProjectExplorer {
static QString defaultBuildDirectoryTemplate()
{
- return "./build/%{Asciify:%{Kit:FileSystemName}-%{BuildConfig:Name}}";
+ return qtcEnvironmentVariable(
+ Constants::QTC_DEFAULT_BUILD_DIRECTORY_TEMPLATE,
+ "./build/%{Asciify:%{Kit:FileSystemName}-%{BuildConfig:Name}}");
}
BuildPropertiesSettings &buildPropertiesSettings()
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index cf82aa6e73..21741dc1cf 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -281,7 +281,7 @@ const char CLEAR_ISSUES_ON_REBUILD_SETTINGS_KEY[] = "ProjectExplorer/Settings/Cl
const char ABORT_BUILD_ALL_ON_ERROR_SETTINGS_KEY[]
= "ProjectExplorer/Settings/AbortBuildAllOnError";
const char LOW_BUILD_PRIORITY_SETTINGS_KEY[] = "ProjectExplorer/Settings/LowBuildPriority";
-const char WARN_AGAINST_NON_ASCII_BUILD_DIR_SETTINGS_KEY[] = "ProjectExplorer/Settings/LowBuildPriority";
+const char WARN_AGAINST_NON_ASCII_BUILD_DIR_SETTINGS_KEY[] = "ProjectExplorer/Settings/WarnAgainstNonAsciiBuildDir";
const char APP_ENV_CHANGES_SETTINGS_KEY[] = "ProjectExplorer/Settings/AppEnvChanges";
const char CUSTOM_PARSER_COUNT_KEY[] = "ProjectExplorer/Settings/CustomParserCount";
diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h
index 80ffefcc51..ca0fe5c9e0 100644
--- a/src/plugins/projectexplorer/projectexplorerconstants.h
+++ b/src/plugins/projectexplorer/projectexplorerconstants.h
@@ -145,6 +145,8 @@ const char CUSTOM_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.Custom";
const char DEFAULT_WORKING_DIR[] = "%{buildDir}";
const char DEFAULT_WORKING_DIR_ALTERNATE[] = "%{sourceDir}";
+const char QTC_DEFAULT_BUILD_DIRECTORY_TEMPLATE[] = "QTC_DEFAULT_BUILD_DIRECTORY_TEMPLATE";
+
// Desktop Device related ids:
const char DESKTOP_DEVICE_ID[] = "Desktop Device";
const char DESKTOP_DEVICE_TYPE[] = "Desktop";
diff --git a/src/plugins/saferenderer/wizards/qsrapp2_1/main.qml.tpl b/src/plugins/saferenderer/wizards/qsrapp2_1/main.qml.tpl
index 94fccebcb2..9f3130bbf0 100644
--- a/src/plugins/saferenderer/wizards/qsrapp2_1/main.qml.tpl
+++ b/src/plugins/saferenderer/wizards/qsrapp2_1/main.qml.tpl
@@ -1,5 +1,5 @@
-import Qt.SafeRenderer 2.0
-import QtQuick.Window 2.15
+import Qt.SafeRenderer
+import QtQuick.Window
Window {
id: window
@@ -14,13 +14,12 @@ Window {
x: 206
y: 208
width: 340
- height: 34
+ height: 40
color: "#8ae234"
fillColor: "black"
text: "Hello Qt Safe Renderer!"
font.family: "Lato"
horizontalAlignment: Text.AlignLeft
font.pixelSize: 32
- runtimeEditable: true
}
}
diff --git a/src/plugins/texteditor/TextEditor.json.in b/src/plugins/texteditor/TextEditor.json.in
index 447d9c91c6..f2b6fbbcf5 100644
--- a/src/plugins/texteditor/TextEditor.json.in
+++ b/src/plugins/texteditor/TextEditor.json.in
@@ -24,6 +24,21 @@
" <sub-class-of type='text/plain'/>",
" <glob pattern='*.dts' weight='80'/>",
" </mime-type>",
+ " <mime-type type='text/x-yacc'>",
+ " <comment>Yacc/Bison source files</comment>",
+ " <sub-class-of type='text/plain'/>",
+ " <glob pattern='*.y'/>",
+ " <glob pattern='*.yy'/>",
+ " <glob pattern='*.ypp'/>",
+ " <glob pattern='*.y++'/>",
+ " </mime-type>",
+ " <mime-type type='text/x-lex'>",
+ " <comment>Lex/Flex source files</comment>",
+ " <sub-class-of type='text/plain'/>",
+ " <glob pattern='*.l'/>",
+ " <glob pattern='*.lex'/>",
+ " <glob pattern='*.flex'/>",
+ " </mime-type>",
"</mime-info>"
]
}
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp
index 3256ee91b7..1d90c7481f 100644
--- a/src/plugins/texteditor/texteditor.cpp
+++ b/src/plugins/texteditor/texteditor.cpp
@@ -4381,7 +4381,7 @@ static QColor calcBlendColor(const QColor &baseColor, int level, int count)
if (level == count - 1)
return color90;
- const int blendFactor = level * (256 / (count - 2));
+ const int blendFactor = level * (256 / (count - 1));
return blendColors(color80, color90, blendFactor);
}
@@ -6876,8 +6876,7 @@ void TextEditorWidgetPrivate::handleBackspaceKey()
}
}
} else if (typingSettings.m_smartBackspaceBehavior == TypingSettings::BackspaceUnindents) {
- const QChar previousChar = q->document()->characterAt(pos - 1);
- if (!(previousChar == QLatin1Char(' ') || previousChar == QLatin1Char('\t'))) {
+ if (c.positionInBlock() > TabSettings::firstNonSpace(c.block().text())) {
if (cursorWithinSnippet)
c.beginEditBlock();
c.deletePreviousChar();
diff --git a/src/shared/qbs b/src/shared/qbs
-Subproject 5c88b6b11b762cf5861c9d1570df4f1f050c826
+Subproject ca74c524363d17c689bb0ec4ca39c744df8d036