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

This commit is contained in:
The Qt Project
2022-12-07 10:53:46 +00:00
36 changed files with 353 additions and 284 deletions

View File

@@ -494,6 +494,11 @@ int main(int argc, char **argv)
qputenv("QT_ENABLE_REGEXP_JIT", "0");
}
if (Utils::HostOsInfo::isLinuxHost() && !qEnvironmentVariableIsSet("GTK_THEME"))
// Work around QTCREATORBUG-28497:
// Prevent Qt's GTK3 platform theme plugin from enforcing a dark palette
qputenv("GTK_THEME", ":light");
#if defined(QTC_FORCE_XCB)
if (Utils::HostOsInfo::isLinuxHost() && !qEnvironmentVariableIsSet("QT_QPA_PLATFORM")) {
// Enforce XCB on Linux/Gnome, if the user didn't override via QT_QPA_PLATFORM

View File

@@ -374,8 +374,10 @@ void InfoBarDisplay::update()
if (infoWidgetCloseButton)
hbox->addWidget(infoWidgetCloseButton);
} else {
infoWidgetCloseButton->setText(info.m_cancelButtonText);
hbox->addWidget(infoWidgetCloseButton);
if (infoWidgetCloseButton) {
infoWidgetCloseButton->setText(info.m_cancelButtonText);
hbox->addWidget(infoWidgetCloseButton);
}
if (infoWidgetSuppressButton)
hbox->addWidget(infoWidgetSuppressButton);
}

View File

@@ -93,7 +93,7 @@ FilterDialog::FilterDialog(const Checks &checks, QWidget *parent)
buttonBox,
}.attachTo(this);
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [&] {
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged, this, [=] {
const bool hasSelection = !m_view->selectionModel()->selectedRows().isEmpty();
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(hasSelection);
});

View File

@@ -1623,10 +1623,24 @@ bool CMakeBuildConfiguration::fromMap(const QVariantMap &map)
m_buildSystem->setInitialCMakeArguments(cmd.splitArguments());
}
d->m_clearSystemConfigureEnvironment = map.value(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY))
.toBool();
// Upgrading from Qt Creator version <9 to 9, if the build environment is set
// apply the specific values to the configure environment
auto settingsKey = [map](const QLatin1String &configureKey, const QLatin1String &buildKey) {
if (!map.contains(configureKey) && map.contains(buildKey))
return buildKey;
return configureKey;
};
const QLatin1String clearSystemEnvironmentKey
= settingsKey(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY),
QLatin1String(ProjectExplorer::Constants::CLEAR_SYSTEM_ENVIRONMENT_KEY));
const QLatin1String userEnvironmentChangesKey
= settingsKey(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY),
QLatin1String(ProjectExplorer::Constants::USER_ENVIRONMENT_CHANGES_KEY));
d->m_clearSystemConfigureEnvironment = map.value(clearSystemEnvironmentKey).toBool();
d->m_userConfigureEnvironmentChanges = EnvironmentItem::fromStringList(
map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
map.value(userEnvironmentChangesKey).toStringList());
updateAndEmitConfigureEnvironmentChanged();

View File

@@ -96,14 +96,24 @@ Internal::PresetsData CMakeProject::combinePresets(Internal::PresetsData &cmakeP
for (const auto &p : presets)
presetsHash.insert(p.name, p);
auto resolveInherits = [](const auto &presetsHash, auto &presetsList) {
auto resolveInherits = [](auto &presetsHash, auto &presetsList) {
Utils::sort(presetsList, [](const auto &left, const auto &right) {
if (left.inherits) {
if (left.inherits.value().contains(right.name))
return false;
}
return true;
});
for (auto &p : presetsList) {
if (!p.inherits)
continue;
for (const QString &inheritFromName : p.inherits.value())
if (presetsHash.contains(inheritFromName))
for (const QString &inheritFromName : p.inherits.value()) {
if (presetsHash.contains(inheritFromName)) {
p.inheritFrom(presetsHash[inheritFromName]);
presetsHash[p.name] = p;
}
}
}
};

View File

@@ -164,8 +164,8 @@ void CompilationDatabaseTests::testFilterArguments()
{"RELATIVE_PLUGIN_PATH", "\"../lib/qtcreator/plugins\""},
{"QT_CREATOR", "1"}}));
QCOMPARE(testData.fileKind, CppEditor::ProjectFile::Kind::CXXSource);
QCOMPARE(testData.sysRoot.toString(), HostOsInfo::isWindowsHost() ? QString("C:\\sysroot\\embedded")
: QString("/opt/sysroot/embedded"));
QCOMPARE(testData.sysRoot.toUserOutput(), HostOsInfo::isWindowsHost()
? QString("C:\\sysroot\\embedded") : QString("/opt/sysroot/embedded"));
}
static QString kCmakeCommand

View File

@@ -752,7 +752,7 @@ void ExternalToolConfig::showInfoForItem(const QModelIndex &index)
static FilePath getUserFilePath(const QString &proposalFileName)
{
const FilePath resourceDir(ICore::userResourcePath());
const FilePath externalToolsDir = resourceDir / "externalTools";
const FilePath externalToolsDir = resourceDir / "externaltools";
if (!externalToolsDir.isDir())
externalToolsDir.createDir();

View File

@@ -79,7 +79,7 @@ int DocumentModelPrivate::rowCount(const QModelIndex &parent) const
return 0;
}
void DocumentModelPrivate::addEntry(DocumentModel::Entry *entry)
DocumentModel::Entry *DocumentModelPrivate::addEntry(DocumentModel::Entry *entry)
{
const Utils::FilePath filePath = entry->filePath();
@@ -95,9 +95,8 @@ void DocumentModelPrivate::addEntry(DocumentModel::Entry *entry)
this, [this, document = previousEntry->document] { itemChanged(document); });
}
delete entry;
entry = nullptr;
disambiguateDisplayNames(previousEntry);
return;
return nullptr;
}
auto positions = positionEntry(m_entries, entry);
@@ -115,6 +114,7 @@ void DocumentModelPrivate::addEntry(DocumentModel::Entry *entry)
itemChanged(document);
});
endInsertRows();
return entry;
}
bool DocumentModelPrivate::disambiguateDisplayNames(DocumentModel::Entry *entry)
@@ -411,8 +411,7 @@ DocumentModel::Entry *DocumentModelPrivate::addSuspendedDocument(const FilePath
entry->document->setPreferredDisplayName(displayName);
entry->document->setId(id);
entry->isSuspended = true;
d->addEntry(entry);
return entry;
return d->addEntry(entry);
}
DocumentModel::Entry *DocumentModelPrivate::firstSuspendedEntry()

View File

@@ -33,7 +33,7 @@ public:
Qt::DropActions supportedDragActions() const override;
QStringList mimeTypes() const override;
void addEntry(DocumentModel::Entry *entry);
DocumentModel::Entry *addEntry(DocumentModel::Entry *entry);
void removeDocument(int idx);
std::optional<int> indexOfFilePath(const Utils::FilePath &filePath) const;

View File

@@ -720,7 +720,9 @@ void ICore::raiseWindow(QWidget *widget)
if (!widget)
return;
QWidget *window = widget->window();
if (window && window == m_mainwindow) {
if (!window)
return;
if (window == m_mainwindow) {
m_mainwindow->raiseWindow();
} else {
window->raise();

View File

@@ -356,8 +356,8 @@ void CppCodeStylePreferencesWidget::setCodeStyle(CppCodeStylePreferences *codeSt
slotCurrentPreferencesChanged(currentPreferences);
});
setTabSettings(m_preferences->tabSettings());
setCodeStyleSettings(m_preferences->codeStyleSettings(), false);
setTabSettings(m_preferences->currentTabSettings());
setCodeStyleSettings(m_preferences->currentCodeStyleSettings(), false);
slotCurrentPreferencesChanged(m_preferences->currentPreferences(), false);
updatePreview();

View File

@@ -12,7 +12,6 @@
#include "cppeditordocument.h"
#include "cppeditorwidget.h"
#include "cppfilesettingspage.h"
#include "cpphighlighter.h"
#include "cppincludehierarchy.h"
#include "cppmodelmanager.h"
#include "cppoutline.h"
@@ -260,42 +259,6 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
connect(openInNextSplitAction, &QAction::triggered,
this, [] { CppModelManager::switchHeaderSource(true); });
QAction * const showPreprocessedAction = new QAction(tr("Show Preprocessed Source"), this);
command = ActionManager::registerAction(showPreprocessedAction,
Constants::SHOW_PREPROCESSED_FILE, context);
mcpptools->addAction(command);
connect(showPreprocessedAction, &QAction::triggered,
this, [] { CppModelManager::showPreprocessedFile(false); });
QAction * const showPreprocessedInSplitAction = new QAction
(tr("Show Preprocessed Source in Next Split"), this);
command = ActionManager::registerAction(showPreprocessedInSplitAction,
Constants::SHOW_PREPROCESSED_FILE_SPLIT, context);
mcpptools->addAction(command);
connect(showPreprocessedInSplitAction, &QAction::triggered,
this, [] { CppModelManager::showPreprocessedFile(true); });
QAction * const findUnusedFunctionsAction = new QAction(tr("Find Unused Functions"), this);
command = ActionManager::registerAction(findUnusedFunctionsAction,
"CppTools.FindUnusedFunctions");
mcpptools->addAction(command);
connect(findUnusedFunctionsAction, &QAction::triggered,
this, [] { CppModelManager::findUnusedFunctions({}); });
QAction * const findUnusedFunctionsInSubProjectAction
= new QAction(tr("Find Unused C/C++ Functions"), this);
command = ActionManager::registerAction(findUnusedFunctionsInSubProjectAction,
"CppTools.FindUnusedFunctionsInSubProject");
for (ActionContainer * const projectContextMenu : {
ActionManager::actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT),
ActionManager::actionContainer(ProjectExplorer::Constants::M_PROJECTCONTEXT)}) {
projectContextMenu->addSeparator(ProjectExplorer::Constants::G_PROJECT_TREE);
projectContextMenu->addAction(command, ProjectExplorer::Constants::G_PROJECT_TREE);
}
connect(findUnusedFunctionsInSubProjectAction, &QAction::triggered, this, [] {
if (const Node * const node = ProjectTree::currentNode(); node && node->asFolderNode())
CppModelManager::findUnusedFunctions(node->directory());
});
MacroExpander *expander = globalMacroExpander();
expander->registerVariable("Cpp:LicenseTemplate",
tr("The license template."),
@@ -336,9 +299,6 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
touchBar->addAction(cmd, Core::Constants::G_TOUCHBAR_NAVIGATION);
cmd = ActionManager::command(Constants::SHOW_PREPROCESSED_FILE);
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
cmd = ActionManager::command(TextEditor::Constants::FOLLOW_SYMBOL_UNDER_CURSOR);
cmd->setTouchBarText(tr("Follow", "text on macOS touch bar"));
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
@@ -418,6 +378,44 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
cppToolsMenu->addAction(cmd);
QAction * const showPreprocessedAction = new QAction(tr("Show Preprocessed Source"), this);
command = ActionManager::registerAction(showPreprocessedAction,
Constants::SHOW_PREPROCESSED_FILE, context);
mcpptools->addAction(command);
contextMenu->addAction(command, Constants::G_CONTEXT_FIRST);
connect(showPreprocessedAction, &QAction::triggered,
this, [] { CppModelManager::showPreprocessedFile(false); });
QAction * const showPreprocessedInSplitAction = new QAction
(tr("Show Preprocessed Source in Next Split"), this);
command = ActionManager::registerAction(showPreprocessedInSplitAction,
Constants::SHOW_PREPROCESSED_FILE_SPLIT, context);
mcpptools->addAction(command);
connect(showPreprocessedInSplitAction, &QAction::triggered,
this, [] { CppModelManager::showPreprocessedFile(true); });
QAction *const findUnusedFunctionsAction = new QAction(tr("Find Unused Functions"), this);
command = ActionManager::registerAction(findUnusedFunctionsAction,
"CppTools.FindUnusedFunctions");
mcpptools->addAction(command);
connect(findUnusedFunctionsAction, &QAction::triggered, this, [] {
CppModelManager::findUnusedFunctions({});
});
QAction *const findUnusedFunctionsInSubProjectAction
= new QAction(tr("Find Unused C/C++ Functions"), this);
command = ActionManager::registerAction(findUnusedFunctionsInSubProjectAction,
"CppTools.FindUnusedFunctionsInSubProject");
for (ActionContainer *const projectContextMenu :
{ActionManager::actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT),
ActionManager::actionContainer(ProjectExplorer::Constants::M_PROJECTCONTEXT)}) {
projectContextMenu->addSeparator(ProjectExplorer::Constants::G_PROJECT_TREE);
projectContextMenu->addAction(command, ProjectExplorer::Constants::G_PROJECT_TREE);
}
connect(findUnusedFunctionsInSubProjectAction, &QAction::triggered, this, [] {
if (const Node *const node = ProjectTree::currentNode(); node && node->asFolderNode())
CppModelManager::findUnusedFunctions(node->directory());
});
d->m_openTypeHierarchyAction = new QAction(tr("Open Type Hierarchy"), this);
cmd = ActionManager::registerAction(d->m_openTypeHierarchyAction, Constants::OPEN_TYPE_HIERARCHY, context);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+T") : tr("Ctrl+Shift+T")));

View File

@@ -2871,6 +2871,56 @@ static void formatCdbBreakPointResponse(int modelId, const QString &responseId,
str << '\n';
}
// Helper to retrieve an int child from GDBMI
static inline std::optional<int> gdbmiChildToInt(const GdbMi &parent, const char *childName)
{
const GdbMi childBA = parent[childName];
if (childBA.isValid()) {
bool ok;
const int v = childBA.data().toInt(&ok);
if (ok)
return v;
}
return std::nullopt;
}
// Helper to retrieve an bool child from GDBMI
static inline std::optional<bool> gdbmiChildToBool(const GdbMi &parent, const char *childName)
{
const GdbMi childBA = parent[childName];
return childBA.isValid() ? std::make_optional(childBA.data() == "true") : std::nullopt;
}
// Parse extension command listing breakpoints.
// Note that not all fields are returned, since file, line, function are encoded
// in the expression (that is in addition deleted on resolving for a bp-type breakpoint).
BreakpointParameters CdbEngine::parseBreakPoint(const GdbMi &gdbmi)
{
BreakpointParameters result;
result.enabled = gdbmiChildToBool(gdbmi, "enabled").value_or(result.enabled);
result.pending = gdbmiChildToBool(gdbmi, "deferred").value_or(result.pending);
const GdbMi moduleG = gdbmi["module"];
if (moduleG.isValid())
result.module = moduleG.data();
const GdbMi sourceFileName = gdbmi["srcfile"];
if (sourceFileName.isValid()) {
NormalizedSourceFileName mappedFile = sourceMapNormalizeFileNameFromDebugger(
sourceFileName.data());
result.fileName = Utils::FilePath::fromUserInput(mappedFile.fileName);
const GdbMi lineNumber = gdbmi["srcline"];
if (lineNumber.isValid())
result.lineNumber = lineNumber.data().toULongLong(nullptr, 0);
}
const GdbMi addressG = gdbmi["address"];
if (addressG.isValid())
result.address = addressG.data().toULongLong(nullptr, 0);
if (const std::optional<int> ignoreCount = gdbmiChildToInt(gdbmi, "passcount"))
result.ignoreCount = *ignoreCount - 1;
result.threadSpec = gdbmiChildToInt(gdbmi, "thread").value_or(result.threadSpec);
return result;
}
void CdbEngine::handleBreakPoints(const DebuggerResponse &response)
{
if (debugBreakpoints) {
@@ -2896,8 +2946,7 @@ void CdbEngine::handleBreakPoints(const DebuggerResponse &response)
for (const GdbMi &breakPointG : response.data) {
// Might not be valid if there is not id
const QString responseId = breakPointG["id"].data();
BreakpointParameters reportedResponse;
parseBreakPoint(breakPointG, &reportedResponse);
BreakpointParameters reportedResponse = parseBreakPoint(breakPointG);
if (debugBreakpoints)
qDebug(" Parsed %s: pending=%d %s\n", qPrintable(responseId),
reportedResponse.pending,

View File

@@ -168,6 +168,7 @@ private:
unsigned parseStackTrace(const GdbMi &data, bool sourceStepInto);
void mergeStartParametersSourcePathMap();
void checkQtSdkPdbFiles(const QString &module);
BreakpointParameters parseBreakPoint(const GdbMi &gdbmi);
const QString m_tokenPrefix;
void handleSetupFailure(const QString &errorMessage);

View File

@@ -189,64 +189,6 @@ QString cdbClearBreakpointCommand(const Breakpoint &bp)
return "bc " + QString::number(firstBreakPoint) + '-' + QString::number(lastBreakPoint);
}
// Helper to retrieve an int child from GDBMI
static inline bool gdbmiChildToInt(const GdbMi &parent, const char *childName, int *target)
{
const GdbMi childBA = parent[childName];
if (childBA.isValid()) {
bool ok;
const int v = childBA.data().toInt(&ok);
if (ok) {
*target = v;
return true;
}
}
return false;
}
// Helper to retrieve an bool child from GDBMI
static inline bool gdbmiChildToBool(const GdbMi &parent, const char *childName, bool *target)
{
const GdbMi childBA = parent[childName];
if (childBA.isValid()) {
*target = childBA.data() == "true";
return true;
}
return false;
}
// Parse extension command listing breakpoints.
// Note that not all fields are returned, since file, line, function are encoded
// in the expression (that is in addition deleted on resolving for a bp-type breakpoint).
void parseBreakPoint(const GdbMi &gdbmi, BreakpointParameters *r,
QString *expression /* = 0 */)
{
gdbmiChildToBool(gdbmi, "enabled", &(r->enabled));
gdbmiChildToBool(gdbmi, "deferred", &(r->pending));
const GdbMi moduleG = gdbmi["module"];
if (moduleG.isValid())
r->module = moduleG.data();
const GdbMi sourceFileName = gdbmi["srcfile"];
if (sourceFileName.isValid()) {
r->fileName = Utils::FilePath::fromUserInput(
Utils::FileUtils::normalizedPathName(sourceFileName.data()));
const GdbMi lineNumber = gdbmi["srcline"];
if (lineNumber.isValid())
r->lineNumber = lineNumber.data().toULongLong(nullptr, 0);
}
if (expression) {
const GdbMi expressionG = gdbmi["expression"];
if (expressionG.isValid())
*expression = expressionG.data();
}
const GdbMi addressG = gdbmi["address"];
if (addressG.isValid())
r->address = addressG.data().toULongLong(nullptr, 0);
if (gdbmiChildToInt(gdbmi, "passcount", &(r->ignoreCount)))
r->ignoreCount--;
gdbmiChildToInt(gdbmi, "thread", &(r->threadSpec));
}
QString cdbWriteMemoryCommand(quint64 addr, const QByteArray &data)
{
QString cmd;

View File

@@ -38,10 +38,6 @@ QString cdbAddBreakpointCommand(const BreakpointParameters &d,
const QList<QPair<QString, QString> > &sourcePathMapping,
const QString &responseId = QString());
QString cdbClearBreakpointCommand(const Breakpoint &bp);
// Parse extension command listing breakpoints.
// Note that not all fields are returned, since file, line, function are encoded
// in the expression (that is in addition deleted on resolving for a bp-type breakpoint).
void parseBreakPoint(const GdbMi &gdbmi, BreakpointParameters *r, QString *expression = nullptr);
// Write memory (f ...).
QString cdbWriteMemoryCommand(quint64 addr, const QByteArray &data);

View File

@@ -249,8 +249,18 @@ void DebuggerKitAspect::fix(Kit *k)
setup(k);
return;
}
const Abi tcAbi = ToolChainKitAspect::targetAbi(k);
if (item->matchTarget(tcAbi) != DebuggerItem::DoesNotMatch)
Abi kitAbi;
if (ToolChainKitAspect::toolChains(k).isEmpty()) {
if (DeviceTypeKitAspect::deviceTypeId(k)
!= ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
return;
}
kitAbi = Abi(Abi::UnknownArchitecture, Abi::hostAbi().os());
} else {
kitAbi = ToolChainKitAspect::targetAbi(k);
}
if (item->matchTarget(kitAbi) != DebuggerItem::DoesNotMatch)
return;
k->setValue(DebuggerKitAspect::id(), QVariant());
setup(k);

View File

@@ -419,7 +419,7 @@ void LanguageClientManager::openDocumentWithClient(TextEditor::TextDocument *doc
client->openDocument(document);
else
client->activateDocument(document);
} else if (Core::EditorManager::currentEditor()->document() == document) {
} else if (Core::EditorManager::currentDocument() == document) {
TextEditor::IOutlineWidgetFactory::updateOutline();
}
}

View File

@@ -63,7 +63,7 @@ constexpr auto armgcc_mimxrt1050_evk_freertos_json = R"(
"id": "ARMGCC_CMAKE_TOOLCHAIN_FILE",
"cmakeVar": "CMAKE_TOOLCHAIN_FILE",
"type": "file",
"defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake",
"defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake",
"visible": false,
"optional": false
}

View File

@@ -63,7 +63,7 @@ constexpr auto armgcc_mimxrt1064_evk_freertos_json = R"(
"id": "ARMGCC_CMAKE_TOOLCHAIN_FILE",
"cmakeVar": "CMAKE_TOOLCHAIN_FILE",
"type": "file",
"defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake",
"defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake",
"visible": false,
"optional": false
}

View File

@@ -63,7 +63,7 @@ constexpr auto armgcc_mimxrt1170_evk_freertos_json = R"(
"id": "ARMGCC_CMAKE_TOOLCHAIN_FILE",
"cmakeVar": "CMAKE_TOOLCHAIN_FILE",
"type": "file",
"defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake",
"defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake",
"visible": false,
"optional": false
}

View File

@@ -62,7 +62,7 @@ constexpr auto armgcc_stm32f769i_discovery_freertos_json = R"(
"id": "ARMGCC_CMAKE_TOOLCHAIN_FILE",
"cmakeVar": "CMAKE_TOOLCHAIN_FILE",
"type": "file",
"defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake",
"defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake",
"visible": false,
"optional": false
}

View File

@@ -62,7 +62,7 @@ constexpr auto armgcc_stm32h750b_discovery_baremetal_json = R"(
"id": "ARMGCC_CMAKE_TOOLCHAIN_FILE",
"cmakeVar": "CMAKE_TOOLCHAIN_FILE",
"type": "file",
"defaultValue": "%{Qul_ROOT}//lib/cmake/Qul/toolchain/armgcc.cmake",
"defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/armgcc.cmake",
"visible": false,
"optional": false
}

View File

@@ -14,6 +14,7 @@ namespace PerfProfiler {
class PERFPROFILER_EXPORT PerfRunConfigurationAspect :
public ProjectExplorer::GlobalOrProjectAspect
{
Q_OBJECT
public:
PerfRunConfigurationAspect(ProjectExplorer::Target *target);
};

View File

@@ -46,8 +46,6 @@ using namespace Utils;
const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount";
const char BUILD_STEP_LIST_PREFIX[] = "ProjectExplorer.BuildConfiguration.BuildStepList.";
const char CLEAR_SYSTEM_ENVIRONMENT_KEY[] = "ProjectExplorer.BuildConfiguration.ClearSystemEnvironment";
const char USER_ENVIRONMENT_CHANGES_KEY[] = "ProjectExplorer.BuildConfiguration.UserEnvironmentChanges";
const char CUSTOM_PARSERS_KEY[] = "ProjectExplorer.BuildConfiguration.CustomParsers";
const char PARSE_STD_OUT_KEY[] = "ProjectExplorer.BuildConfiguration.ParseStandardOutput";
@@ -378,8 +376,9 @@ QVariantMap BuildConfiguration::toMap() const
{
QVariantMap map = ProjectConfiguration::toMap();
map.insert(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY), d->m_clearSystemEnvironment);
map.insert(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY), EnvironmentItem::toStringList(d->m_userEnvironmentChanges));
map.insert(QLatin1String(Constants::CLEAR_SYSTEM_ENVIRONMENT_KEY), d->m_clearSystemEnvironment);
map.insert(QLatin1String(Constants::USER_ENVIRONMENT_CHANGES_KEY),
EnvironmentItem::toStringList(d->m_userEnvironmentChanges));
map.insert(QLatin1String(BUILD_STEP_LIST_COUNT), 2);
map.insert(QLatin1String(BUILD_STEP_LIST_PREFIX) + QString::number(0), d->m_buildSteps.toMap());
@@ -393,8 +392,10 @@ QVariantMap BuildConfiguration::toMap() const
bool BuildConfiguration::fromMap(const QVariantMap &map)
{
d->m_clearSystemEnvironment = map.value(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY)).toBool();
d->m_userEnvironmentChanges = EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
d->m_clearSystemEnvironment = map.value(QLatin1String(Constants::CLEAR_SYSTEM_ENVIRONMENT_KEY))
.toBool();
d->m_userEnvironmentChanges = EnvironmentItem::fromStringList(
map.value(QLatin1String(Constants::USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
updateCacheAndEmitEnvironmentChanged();

View File

@@ -220,6 +220,8 @@ const char SETTINGS_MENU_HIDE_BUILD[] = "Menu/HideBuild";
const char SETTINGS_MENU_HIDE_DEBUG[] = "Menu/HideDebug";
const char SETTINGS_MENU_HIDE_ANALYZE[] = "Menu/HideAnalyze";
const char SESSION_TASKFILE_KEY[] = "TaskList.File";
const char CLEAR_SYSTEM_ENVIRONMENT_KEY[] = "ProjectExplorer.BuildConfiguration.ClearSystemEnvironment";
const char USER_ENVIRONMENT_CHANGES_KEY[] = "ProjectExplorer.BuildConfiguration.UserEnvironmentChanges";
// UI texts
PROJECTEXPLORER_EXPORT QString msgAutoDetected();

View File

@@ -92,7 +92,7 @@ void SquishXmlOutputHandler::mergeResultFiles(const Utils::FilePaths &reportFile
// and finally write test tag (case name) - the prolog tag (for test case)
// will be written outside the if
const QXmlStreamAttributes testAttributes = reader.attributes();
QXmlStreamReader::TokenType token;
QXmlStreamReader::TokenType token = QXmlStreamReader::NoToken;
while (!reader.atEnd()) {
token = reader.readNext();
if (token != QXmlStreamReader::Characters)

View File

@@ -5889,7 +5889,7 @@ void TextEditorWidget::extraAreaMouseEvent(QMouseEvent *e)
{
QTextCursor cursor = cursorForPosition(QPoint(0, e->pos().y()));
int markWidth;
int markWidth = 0;
extraAreaWidth(&markWidth);
const bool inMarkArea = e->pos().x() <= markWidth && e->pos().x() >= 0;