forked from qt-creator/qt-creator
Use Utils::Storage instead of QVariantMap in a few places
Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -583,7 +583,7 @@ void BaseAspect::saveToMap(QVariantMap &data, const QVariant &value,
|
||||
/*!
|
||||
Retrieves the internal value of this BaseAspect from the QVariantMap \a map.
|
||||
*/
|
||||
void BaseAspect::fromMap(const QVariantMap &map)
|
||||
void BaseAspect::fromMap(const Storage &map)
|
||||
{
|
||||
if (settingsKey().isEmpty())
|
||||
return;
|
||||
@@ -594,7 +594,7 @@ void BaseAspect::fromMap(const QVariantMap &map)
|
||||
/*!
|
||||
Stores the internal value of this BaseAspect into the QVariantMap \a map.
|
||||
*/
|
||||
void BaseAspect::toMap(QVariantMap &map) const
|
||||
void BaseAspect::toMap(Storage &map) const
|
||||
{
|
||||
if (settingsKey().isEmpty())
|
||||
return;
|
||||
@@ -692,13 +692,13 @@ public:
|
||||
class CheckableAspectImplementation
|
||||
{
|
||||
public:
|
||||
void fromMap(const QVariantMap &map)
|
||||
void fromMap(const Storage &map)
|
||||
{
|
||||
if (m_checked)
|
||||
m_checked->fromMap(map);
|
||||
}
|
||||
|
||||
void toMap(QVariantMap &map)
|
||||
void toMap(Storage &map)
|
||||
{
|
||||
if (m_checked)
|
||||
m_checked->toMap(map);
|
||||
@@ -921,7 +921,7 @@ void StringAspect::setValueAcceptor(StringAspect::ValueAcceptor &&acceptor)
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
void StringAspect::fromMap(const QVariantMap &map)
|
||||
void StringAspect::fromMap(const Storage &map)
|
||||
{
|
||||
if (!settingsKey().isEmpty())
|
||||
setValue(map.value(settingsKey(), defaultValue()).toString(), BeQuiet);
|
||||
@@ -931,7 +931,7 @@ void StringAspect::fromMap(const QVariantMap &map)
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
void StringAspect::toMap(QVariantMap &map) const
|
||||
void StringAspect::toMap(Storage &map) const
|
||||
{
|
||||
saveToMap(map, value(), defaultValue(), settingsKey());
|
||||
d->m_checkerImpl.toMap(map);
|
||||
@@ -1440,7 +1440,7 @@ void FilePathAspect::addToLayout(Layouting::LayoutItem &parent)
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
void FilePathAspect::fromMap(const QVariantMap &map)
|
||||
void FilePathAspect::fromMap(const Storage &map)
|
||||
{
|
||||
if (!settingsKey().isEmpty())
|
||||
setValue(map.value(settingsKey(), defaultValue()).toString(), BeQuiet);
|
||||
@@ -1450,7 +1450,7 @@ void FilePathAspect::fromMap(const QVariantMap &map)
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
void FilePathAspect::toMap(QVariantMap &map) const
|
||||
void FilePathAspect::toMap(Storage &map) const
|
||||
{
|
||||
saveToMap(map, value(), defaultValue(), settingsKey());
|
||||
d->m_checkerImpl.toMap(map);
|
||||
@@ -2514,7 +2514,7 @@ const QList<BaseAspect *> &AspectContainer::aspects() const
|
||||
return d->m_items;
|
||||
}
|
||||
|
||||
void AspectContainer::fromMap(const QVariantMap &map)
|
||||
void AspectContainer::fromMap(const Storage &map)
|
||||
{
|
||||
for (BaseAspect *aspect : std::as_const(d->m_items))
|
||||
aspect->fromMap(map);
|
||||
@@ -2523,7 +2523,7 @@ void AspectContainer::fromMap(const QVariantMap &map)
|
||||
|
||||
}
|
||||
|
||||
void AspectContainer::toMap(QVariantMap &map) const
|
||||
void AspectContainer::toMap(Storage &map) const
|
||||
{
|
||||
for (BaseAspect *aspect : std::as_const(d->m_items))
|
||||
aspect->toMap(map);
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include "infolabel.h"
|
||||
#include "macroexpander.h"
|
||||
#include "pathchooser.h"
|
||||
#include "storage.h"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
@@ -100,9 +101,9 @@ public:
|
||||
|
||||
AspectContainer *container() const;
|
||||
|
||||
virtual void fromMap(const QVariantMap &map);
|
||||
virtual void toMap(QVariantMap &map) const;
|
||||
virtual void toActiveMap(QVariantMap &map) const { toMap(map); }
|
||||
virtual void fromMap(const Utils::Storage &map);
|
||||
virtual void toMap(Utils::Storage &map) const;
|
||||
virtual void toActiveMap(Utils::Storage &map) const { toMap(map); }
|
||||
|
||||
virtual void addToLayout(Layouting::LayoutItem &parent);
|
||||
|
||||
@@ -557,8 +558,8 @@ public:
|
||||
};
|
||||
void setDisplayStyle(DisplayStyle style);
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
signals:
|
||||
void validChanged(bool validState);
|
||||
@@ -626,8 +627,8 @@ public:
|
||||
|
||||
void addToLayout(Layouting::LayoutItem &parent) override;
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
signals:
|
||||
void validChanged(bool validState);
|
||||
@@ -831,8 +832,8 @@ public:
|
||||
void registerAspect(BaseAspect *aspect, bool takeOwnership = false);
|
||||
void registerAspects(const AspectContainer &aspects);
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
void readSettings() override;
|
||||
void writeSettings() const override;
|
||||
|
@@ -35,13 +35,13 @@ bool DisplayName::usesDefaultValue() const
|
||||
return m_value.isEmpty();
|
||||
}
|
||||
|
||||
void DisplayName::toMap(QVariantMap &map, const QString &key) const
|
||||
void DisplayName::toMap(Storage &map, const QString &key) const
|
||||
{
|
||||
if (m_forceSerialization || !usesDefaultValue())
|
||||
map.insert(key, m_value);
|
||||
}
|
||||
|
||||
void DisplayName::fromMap(const QVariantMap &map, const QString &key)
|
||||
void DisplayName::fromMap(const Storage &map, const QString &key)
|
||||
{
|
||||
m_value = map.value(key).toString();
|
||||
}
|
||||
|
@@ -3,10 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "utils_global.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QVariantMap>
|
||||
#include "storage.h"
|
||||
|
||||
namespace Utils {
|
||||
|
||||
@@ -24,8 +21,8 @@ public:
|
||||
bool usesDefaultValue() const;
|
||||
void forceSerialization() { m_forceSerialization = true; }
|
||||
|
||||
void toMap(QVariantMap &map, const QString &key) const;
|
||||
void fromMap(const QVariantMap &map, const QString &key);
|
||||
void toMap(Utils::Storage &map, const Key &key) const;
|
||||
void fromMap(const Utils::Storage &map, const Key &key);
|
||||
|
||||
private:
|
||||
QString m_value;
|
||||
|
@@ -879,7 +879,7 @@ void AndroidBuildApkStep::updateBuildToolsVersionInJsonFile()
|
||||
}
|
||||
}
|
||||
|
||||
void AndroidBuildApkStep::fromMap(const QVariantMap &map)
|
||||
void AndroidBuildApkStep::fromMap(const Storage &map)
|
||||
{
|
||||
m_keystorePath = FilePath::fromSettings(map.value(KeystoreLocationKey));
|
||||
m_signPackage = false; // don't restore this
|
||||
@@ -893,7 +893,7 @@ void AndroidBuildApkStep::fromMap(const QVariantMap &map)
|
||||
ProjectExplorer::BuildStep::fromMap(map);
|
||||
}
|
||||
|
||||
void AndroidBuildApkStep::toMap(QVariantMap &map) const
|
||||
void AndroidBuildApkStep::toMap(Storage &map) const
|
||||
{
|
||||
ProjectExplorer::AbstractProcessStep::toMap(map);
|
||||
map.insert(KeystoreLocationKey, m_keystorePath.toSettings());
|
||||
|
@@ -23,8 +23,8 @@ class AndroidBuildApkStep : public ProjectExplorer::AbstractProcessStep
|
||||
public:
|
||||
AndroidBuildApkStep(ProjectExplorer::BuildStepList *bc, Utils::Id id);
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
// signing
|
||||
Utils::FilePath keystorePath() const;
|
||||
|
@@ -214,7 +214,7 @@ void AndroidDevice::addActionsIfNotFound()
|
||||
}
|
||||
}
|
||||
|
||||
void AndroidDevice::fromMap(const QVariantMap &map)
|
||||
void AndroidDevice::fromMap(const Storage &map)
|
||||
{
|
||||
IDevice::fromMap(map);
|
||||
initAvdSettings();
|
||||
|
@@ -55,7 +55,7 @@ public:
|
||||
QString openGLStatus() const;
|
||||
|
||||
protected:
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
void fromMap(const Utils::Storage &map) final;
|
||||
|
||||
private:
|
||||
void addActionsIfNotFound();
|
||||
|
@@ -32,13 +32,13 @@ public:
|
||||
: StringAspect(container)
|
||||
{}
|
||||
|
||||
void fromMap(const QVariantMap &map) final
|
||||
void fromMap(const Storage &map) final
|
||||
{
|
||||
// Pre Qt Creator 5.0 hack: Reads QStringList as QString
|
||||
setValue(map.value(settingsKey()).toStringList().join('\n'));
|
||||
}
|
||||
|
||||
void toMap(QVariantMap &map) const final
|
||||
void toMap(Storage &map) const final
|
||||
{
|
||||
// Pre Qt Creator 5.0 hack: Writes QString as QStringList
|
||||
map.insert(settingsKey(), value().split('\n'));
|
||||
|
@@ -183,7 +183,7 @@ void AndroidSdkDownloader::downloadAndExtractSdk()
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(storage),
|
||||
Tasking::Storage(storage),
|
||||
NetworkQueryTask(onQuerySetup, onQueryDone, onQueryError),
|
||||
UnarchiverTask(onUnarchiveSetup, onUnarchiverDone, onUnarchiverError)
|
||||
};
|
||||
|
@@ -101,7 +101,7 @@ void AndroidToolChain::addToEnvironment(Environment &env) const
|
||||
env.set(QLatin1String("ANDROID_SDK_ROOT"), config.sdkLocation().toUserOutput());
|
||||
}
|
||||
|
||||
void AndroidToolChain::fromMap(const QVariantMap &data)
|
||||
void AndroidToolChain::fromMap(const Storage &data)
|
||||
{
|
||||
ClangToolChain::fromMap(data);
|
||||
if (hasError())
|
||||
|
@@ -22,7 +22,7 @@ public:
|
||||
|
||||
QStringList suggestedMkspecList() const override;
|
||||
Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
|
||||
void fromMap(const QVariantMap &data) override;
|
||||
void fromMap(const Utils::Storage &data) override;
|
||||
|
||||
void setNdkLocation(const Utils::FilePath &ndkLocation);
|
||||
Utils::FilePath ndkLocation() const;
|
||||
|
@@ -143,7 +143,7 @@ QVariantMap JLSSettings::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
void JLSSettings::fromMap(const QVariantMap &map)
|
||||
void JLSSettings::fromMap(const Storage &map)
|
||||
{
|
||||
StdIOSettings::fromMap(map);
|
||||
m_languageServer = FilePath::fromSettings(map[languageServerKey]);
|
||||
|
@@ -16,8 +16,8 @@ public:
|
||||
bool applyFromSettingsWidget(QWidget *widget) final;
|
||||
QWidget *createSettingsWidget(QWidget *parent) const final;
|
||||
bool isValid() const final;
|
||||
QVariantMap toMap() const final;
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
Utils::Storage toMap() const final;
|
||||
void fromMap(const Utils::Storage &map) final;
|
||||
LanguageClient::BaseSettings *copy() const final;
|
||||
LanguageClient::Client *createClient(LanguageClient::BaseClientInterface *interface) const final;
|
||||
LanguageClient::BaseClientInterface *createInterface(
|
||||
|
@@ -446,7 +446,7 @@ void TestRunner::runTestsHelper()
|
||||
};
|
||||
const Group group {
|
||||
finishAllAndDone,
|
||||
Storage(storage),
|
||||
Tasking::Storage(storage),
|
||||
onGroupSetup(onSetup),
|
||||
ProcessTask(onProcessSetup, onProcessDone, onProcessDone)
|
||||
};
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace BareMetal::Internal {
|
||||
|
||||
@@ -62,7 +63,7 @@ void BareMetalDevice::unregisterDebugServerProvider(IDebugServerProvider *provid
|
||||
m_debugServerProviderId.clear();
|
||||
}
|
||||
|
||||
void BareMetalDevice::fromMap(const QVariantMap &map)
|
||||
void BareMetalDevice::fromMap(const Storage &map)
|
||||
{
|
||||
IDevice::fromMap(map);
|
||||
QString providerId = map.value(debugServerProviderIdKeyC).toString();
|
||||
|
@@ -31,8 +31,8 @@ public:
|
||||
void unregisterDebugServerProvider(IDebugServerProvider *provider);
|
||||
|
||||
protected:
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
QVariantMap toMap() const final;
|
||||
void fromMap(const Utils::Storage &map) final;
|
||||
Utils::Storage toMap() const final;
|
||||
|
||||
private:
|
||||
BareMetalDevice();
|
||||
|
@@ -74,8 +74,8 @@ private:
|
||||
class EBlinkGdbServerProvider final : public GdbServerProvider
|
||||
{
|
||||
public:
|
||||
void toMap(QVariantMap &data) const final;
|
||||
void fromMap(const QVariantMap &data) final;
|
||||
void toMap(Storage &data) const final;
|
||||
void fromMap(const Storage &data) final;
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const final;
|
||||
|
||||
@@ -215,7 +215,7 @@ bool EBlinkGdbServerProvider::isValid() const
|
||||
}
|
||||
}
|
||||
|
||||
void EBlinkGdbServerProvider::toMap(QVariantMap &data) const
|
||||
void EBlinkGdbServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
GdbServerProvider::toMap(data);
|
||||
data.insert(executableFileKeyC, m_executableFile.toSettings());
|
||||
@@ -231,7 +231,7 @@ void EBlinkGdbServerProvider::toMap(QVariantMap &data) const
|
||||
data.insert(gdbNotUseCacheC, m_gdbNotUseCache);
|
||||
}
|
||||
|
||||
void EBlinkGdbServerProvider::fromMap(const QVariantMap &data)
|
||||
void EBlinkGdbServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
GdbServerProvider::fromMap(data);
|
||||
m_executableFile = FilePath::fromSettings(data.value(executableFileKeyC));
|
||||
|
@@ -120,7 +120,7 @@ bool GdbServerProvider::operator==(const IDebugServerProvider &other) const
|
||||
&& m_useExtendedRemote == p->m_useExtendedRemote;
|
||||
}
|
||||
|
||||
void GdbServerProvider::toMap(QVariantMap &data) const
|
||||
void GdbServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
IDebugServerProvider::toMap(data);
|
||||
data.insert(startupModeKeyC, m_startupMode);
|
||||
@@ -179,7 +179,7 @@ RunWorker *GdbServerProvider::targetRunner(RunControl *runControl) const
|
||||
return new GdbServerProviderRunner(runControl, command());
|
||||
}
|
||||
|
||||
void GdbServerProvider::fromMap(const QVariantMap &data)
|
||||
void GdbServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
IDebugServerProvider::fromMap(data);
|
||||
m_startupMode = static_cast<StartupMode>(data.value(startupModeKeyC).toInt());
|
||||
|
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const override;
|
||||
|
||||
void toMap(QVariantMap &data) const override;
|
||||
void toMap(Utils::Storage &data) const override;
|
||||
|
||||
virtual Utils::CommandLine command() const;
|
||||
|
||||
@@ -55,7 +55,7 @@ protected:
|
||||
void setResetCommands(const QString &);
|
||||
void setUseExtendedRemote(bool);
|
||||
|
||||
void fromMap(const QVariantMap &data) override;
|
||||
void fromMap(const Utils::Storage &data) override;
|
||||
|
||||
StartupMode m_startupMode = StartupOnNetwork;
|
||||
Utils::FilePath m_peripheralDescriptionFile;
|
||||
|
@@ -81,8 +81,8 @@ private:
|
||||
class JLinkGdbServerProvider final : public GdbServerProvider
|
||||
{
|
||||
public:
|
||||
void toMap(QVariantMap &data) const final;
|
||||
void fromMap(const QVariantMap &data) final;
|
||||
void toMap(Storage &data) const final;
|
||||
void fromMap(const Storage &data) final;
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const final;
|
||||
|
||||
@@ -194,7 +194,7 @@ bool JLinkGdbServerProvider::isValid() const
|
||||
return true;
|
||||
}
|
||||
|
||||
void JLinkGdbServerProvider::toMap(QVariantMap &data) const
|
||||
void JLinkGdbServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
GdbServerProvider::toMap(data);
|
||||
data.insert(executableFileKeyC, m_executableFile.toSettings());
|
||||
@@ -206,7 +206,7 @@ void JLinkGdbServerProvider::toMap(QVariantMap &data) const
|
||||
data.insert(additionalArgumentsKeyC, m_additionalArguments);
|
||||
}
|
||||
|
||||
void JLinkGdbServerProvider::fromMap(const QVariantMap &data)
|
||||
void JLinkGdbServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
GdbServerProvider::fromMap(data);
|
||||
m_executableFile = FilePath::fromSettings(data.value(executableFileKeyC));
|
||||
|
@@ -57,8 +57,8 @@ private:
|
||||
class OpenOcdGdbServerProvider final : public GdbServerProvider
|
||||
{
|
||||
public:
|
||||
void toMap(QVariantMap &data) const final;
|
||||
void fromMap(const QVariantMap &data) final;
|
||||
void toMap(Storage &data) const final;
|
||||
void fromMap(const Storage &data) final;
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const final;
|
||||
|
||||
@@ -180,7 +180,7 @@ bool OpenOcdGdbServerProvider::isValid() const
|
||||
return true;
|
||||
}
|
||||
|
||||
void OpenOcdGdbServerProvider::toMap(QVariantMap &data) const
|
||||
void OpenOcdGdbServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
GdbServerProvider::toMap(data);
|
||||
data.insert(executableFileKeyC, m_executableFile.toSettings());
|
||||
@@ -189,7 +189,7 @@ void OpenOcdGdbServerProvider::toMap(QVariantMap &data) const
|
||||
data.insert(additionalArgumentsKeyC, m_additionalArguments);
|
||||
}
|
||||
|
||||
void OpenOcdGdbServerProvider::fromMap(const QVariantMap &data)
|
||||
void OpenOcdGdbServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
GdbServerProvider::fromMap(data);
|
||||
m_executableFile = FilePath::fromSettings(data.value(executableFileKeyC));
|
||||
|
@@ -67,8 +67,8 @@ private:
|
||||
class StLinkUtilGdbServerProvider final : public GdbServerProvider
|
||||
{
|
||||
public:
|
||||
void toMap(QVariantMap &data) const final;
|
||||
void fromMap(const QVariantMap &data) final;
|
||||
void toMap(Storage &data) const final;
|
||||
void fromMap(const Storage &data) final;
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const final;
|
||||
|
||||
@@ -177,7 +177,7 @@ bool StLinkUtilGdbServerProvider::isValid() const
|
||||
return true;
|
||||
}
|
||||
|
||||
void StLinkUtilGdbServerProvider::toMap(QVariantMap &data) const
|
||||
void StLinkUtilGdbServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
GdbServerProvider::toMap(data);
|
||||
data.insert(executableFileKeyC, m_executableFile.toSettings());
|
||||
@@ -188,7 +188,7 @@ void StLinkUtilGdbServerProvider::toMap(QVariantMap &data) const
|
||||
data.insert(connectUnderResetKeyC, m_connectUnderReset);
|
||||
}
|
||||
|
||||
void StLinkUtilGdbServerProvider::fromMap(const QVariantMap &data)
|
||||
void StLinkUtilGdbServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
GdbServerProvider::fromMap(data);
|
||||
m_executableFile = FilePath::fromSettings(data.value(executableFileKeyC));
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
Speed speed = Speed::Speed_1MHz;
|
||||
|
||||
QVariantMap toMap() const;
|
||||
bool fromMap(const QVariantMap &data);
|
||||
bool fromMap(const Storage &data);
|
||||
bool operator==(const JLinkUvscAdapterOptions &other) const;
|
||||
};
|
||||
|
||||
@@ -130,7 +130,7 @@ QVariantMap JLinkUvscAdapterOptions::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
bool JLinkUvscAdapterOptions::fromMap(const QVariantMap &data)
|
||||
bool JLinkUvscAdapterOptions::fromMap(const Storage &data)
|
||||
{
|
||||
port = static_cast<Port>(data.value(adapterPortKeyC, SWD).toInt());
|
||||
speed = static_cast<Speed>(data.value(adapterSpeedKeyC, Speed_1MHz).toInt());
|
||||
@@ -147,8 +147,8 @@ bool JLinkUvscAdapterOptions::operator==(const JLinkUvscAdapterOptions &other) c
|
||||
class JLinkUvscServerProvider final : public UvscServerProvider
|
||||
{
|
||||
public:
|
||||
void toMap(QVariantMap &data) const final;
|
||||
void fromMap(const QVariantMap &data) final;
|
||||
void toMap(Storage &data) const final;
|
||||
void fromMap(const Storage &data) final;
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const final;
|
||||
Utils::FilePath optionsFilePath(Debugger::DebuggerRunTool *runTool,
|
||||
@@ -240,13 +240,13 @@ JLinkUvscServerProvider::JLinkUvscServerProvider()
|
||||
setSupportedDrivers({"Segger\\JL2CM3.dll"});
|
||||
}
|
||||
|
||||
void JLinkUvscServerProvider::toMap(QVariantMap &data) const
|
||||
void JLinkUvscServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
UvscServerProvider::toMap(data);
|
||||
data.insert(adapterOptionsKeyC, m_adapterOpts.toMap());
|
||||
}
|
||||
|
||||
void JLinkUvscServerProvider::fromMap(const QVariantMap &data)
|
||||
void JLinkUvscServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
UvscServerProvider::fromMap(data);
|
||||
m_adapterOpts.fromMap(data.value(adapterOptionsKeyC).toMap());
|
||||
|
@@ -63,13 +63,13 @@ SimulatorUvscServerProvider::SimulatorUvscServerProvider()
|
||||
setDriverSelection(defaultSimulatorDriverSelection());
|
||||
}
|
||||
|
||||
void SimulatorUvscServerProvider::toMap(QVariantMap &data) const
|
||||
void SimulatorUvscServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
UvscServerProvider::toMap(data);
|
||||
data.insert(limitSpeedKeyC, m_limitSpeed);
|
||||
}
|
||||
|
||||
void SimulatorUvscServerProvider::fromMap(const QVariantMap &data)
|
||||
void SimulatorUvscServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
UvscServerProvider::fromMap(data);
|
||||
m_limitSpeed = data.value(limitSpeedKeyC).toBool();
|
||||
|
@@ -16,8 +16,8 @@ namespace BareMetal::Internal {
|
||||
class SimulatorUvscServerProvider final : public UvscServerProvider
|
||||
{
|
||||
public:
|
||||
void toMap(QVariantMap &data) const final;
|
||||
void fromMap(const QVariantMap &data) final;
|
||||
void toMap(Utils::Storage &data) const final;
|
||||
void fromMap(const Utils::Storage &data) final;
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const final;
|
||||
bool isSimulator() const final { return true; }
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
Speed speed = Speed::Speed_4MHz;
|
||||
|
||||
QVariantMap toMap() const;
|
||||
bool fromMap(const QVariantMap &data);
|
||||
bool fromMap(const Storage &data);
|
||||
bool operator==(const StLinkUvscAdapterOptions &other) const;
|
||||
};
|
||||
|
||||
@@ -86,8 +86,8 @@ static QString buildDllRegistryName(const DeviceSelection &device,
|
||||
class StLinkUvscServerProvider final : public UvscServerProvider
|
||||
{
|
||||
public:
|
||||
void toMap(QVariantMap &data) const final;
|
||||
void fromMap(const QVariantMap &data) final;
|
||||
void toMap(Storage &data) const final;
|
||||
void fromMap(const Storage &data) final;
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const final;
|
||||
Utils::FilePath optionsFilePath(Debugger::DebuggerRunTool *runTool,
|
||||
@@ -134,7 +134,7 @@ QVariantMap StLinkUvscAdapterOptions::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
bool StLinkUvscAdapterOptions::fromMap(const QVariantMap &data)
|
||||
bool StLinkUvscAdapterOptions::fromMap(const Storage &data)
|
||||
{
|
||||
port = static_cast<Port>(data.value(adapterPortKeyC, SWD).toInt());
|
||||
speed = static_cast<Speed>(data.value(adapterSpeedKeyC, Speed_4MHz).toInt());
|
||||
@@ -200,13 +200,13 @@ StLinkUvscServerProvider::StLinkUvscServerProvider()
|
||||
setSupportedDrivers({"STLink\\ST-LINKIII-KEIL_SWO.dll"});
|
||||
}
|
||||
|
||||
void StLinkUvscServerProvider::toMap(QVariantMap &data) const
|
||||
void StLinkUvscServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
UvscServerProvider::toMap(data);
|
||||
data.insert(adapterOptionsKeyC, m_adapterOpts.toMap());
|
||||
}
|
||||
|
||||
void StLinkUvscServerProvider::fromMap(const QVariantMap &data)
|
||||
void StLinkUvscServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
UvscServerProvider::fromMap(data);
|
||||
m_adapterOpts.fromMap(data.value(adapterOptionsKeyC).toMap());
|
||||
|
@@ -147,7 +147,7 @@ FilePath UvscServerProvider::buildOptionsFilePath(DebuggerRunTool *runTool) cons
|
||||
return path;
|
||||
}
|
||||
|
||||
void UvscServerProvider::toMap(QVariantMap &data) const
|
||||
void UvscServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
IDebugServerProvider::toMap(data);
|
||||
data.insert(toolsIniKeyC, m_toolsIniFile.toSettings());
|
||||
@@ -219,7 +219,7 @@ ProjectExplorer::RunWorker *UvscServerProvider::targetRunner(RunControl *runCont
|
||||
return new UvscServerProviderRunner(runControl, r);
|
||||
}
|
||||
|
||||
void UvscServerProvider::fromMap(const QVariantMap &data)
|
||||
void UvscServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
IDebugServerProvider::fromMap(data);
|
||||
m_toolsIniFile = FilePath::fromSettings(data.value(toolsIniKeyC));
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
bool operator==(const IDebugServerProvider &other) const override;
|
||||
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
bool aboutToRun(Debugger::DebuggerRunTool *runTool, QString &errorMessage) const final;
|
||||
ProjectExplorer::RunWorker *targetRunner(ProjectExplorer::RunControl *runControl) const final;
|
||||
@@ -69,7 +69,7 @@ protected:
|
||||
Utils::FilePath buildProjectFilePath(Debugger::DebuggerRunTool *runTool) const;
|
||||
Utils::FilePath buildOptionsFilePath(Debugger::DebuggerRunTool *runTool) const;
|
||||
|
||||
void fromMap(const QVariantMap &data) override;
|
||||
void fromMap(const Utils::Storage &data) override;
|
||||
|
||||
// uVision specific stuff.
|
||||
virtual Utils::FilePath projectFilePath(Debugger::DebuggerRunTool *runTool,
|
||||
|
@@ -102,7 +102,7 @@ QVariantMap DeviceSelection::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
void DeviceSelection::fromMap(const QVariantMap &map)
|
||||
void DeviceSelection::fromMap(const Storage &map)
|
||||
{
|
||||
// Software package.
|
||||
package.desc = map.value(packageDescrKeyC).toString();
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <utils/basetreeview.h>
|
||||
#include <utils/treemodel.h>
|
||||
#include <utils/storage.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QComboBox;
|
||||
@@ -71,8 +72,8 @@ public:
|
||||
Algorithms algorithms;
|
||||
int algorithmIndex = 0;
|
||||
|
||||
QVariantMap toMap() const;
|
||||
void fromMap(const QVariantMap &map);
|
||||
Utils::Storage toMap() const;
|
||||
void fromMap(const Utils::Storage &map);
|
||||
bool operator==(const DeviceSelection &other) const;
|
||||
};
|
||||
|
||||
|
@@ -33,7 +33,7 @@ QVariantMap DriverSelection::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
void DriverSelection::fromMap(const QVariantMap &map)
|
||||
void DriverSelection::fromMap(const Storage &map)
|
||||
{
|
||||
index = map.value(driverIndexKeyC).toInt();
|
||||
cpuDllIndex = map.value(driverCpuDllIndexKeyC).toInt();
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <utils/basetreeview.h>
|
||||
#include <utils/treemodel.h>
|
||||
#include <utils/storage.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QComboBox;
|
||||
@@ -23,8 +24,8 @@ public:
|
||||
int index = 0;
|
||||
int cpuDllIndex = 0;
|
||||
|
||||
QVariantMap toMap() const;
|
||||
void fromMap(const QVariantMap &map);
|
||||
Utils::Storage toMap() const;
|
||||
void fromMap(const Utils::Storage &map);
|
||||
|
||||
bool operator==(const DriverSelection &other) const;
|
||||
};
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
using namespace Debugger;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace BareMetal::Internal {
|
||||
|
||||
@@ -137,7 +138,7 @@ IDebugServerProviderConfigWidget *IDebugServerProvider::configurationWidget() co
|
||||
return m_configurationWidgetCreator();
|
||||
}
|
||||
|
||||
void IDebugServerProvider::toMap(QVariantMap &data) const
|
||||
void IDebugServerProvider::toMap(Storage &data) const
|
||||
{
|
||||
data.insert(idKeyC, m_id);
|
||||
data.insert(displayNameKeyC, m_displayName);
|
||||
@@ -166,7 +167,7 @@ void IDebugServerProvider::resetId()
|
||||
m_id = createId(m_id);
|
||||
}
|
||||
|
||||
void IDebugServerProvider::fromMap(const QVariantMap &data)
|
||||
void IDebugServerProvider::fromMap(const Storage &data)
|
||||
{
|
||||
m_id = data.value(idKeyC).toString();
|
||||
m_displayName = data.value(displayNameKeyC).toString();
|
||||
|
@@ -4,12 +4,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <debugger/debuggerconstants.h>
|
||||
#include <projectexplorer/abi.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <projectexplorer/abi.h>
|
||||
|
||||
#include <utils/filepath.h>
|
||||
#include <utils/storage.h>
|
||||
|
||||
#include <QSet>
|
||||
#include <QVariantMap>
|
||||
#include <QUrl>
|
||||
#include <QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@@ -65,8 +67,8 @@ public:
|
||||
void setConfigurationWidgetCreator
|
||||
(const std::function<IDebugServerProviderConfigWidget *()> &configurationWidgetCreator);
|
||||
|
||||
virtual void toMap(QVariantMap &data) const;
|
||||
virtual void fromMap(const QVariantMap &data);
|
||||
virtual void toMap(Utils::Storage &data) const;
|
||||
virtual void fromMap(const Utils::Storage &data);
|
||||
|
||||
virtual bool aboutToRun(Debugger::DebuggerRunTool *runTool,
|
||||
QString &errorMessage) const = 0;
|
||||
|
@@ -137,7 +137,7 @@ QString QdbDevice::serialNumber() const
|
||||
return m_serialNumber;
|
||||
}
|
||||
|
||||
void QdbDevice::fromMap(const QVariantMap &map)
|
||||
void QdbDevice::fromMap(const Storage &map)
|
||||
{
|
||||
ProjectExplorer::IDevice::fromMap(map);
|
||||
setSerialNumber(map.value("Qdb.SerialNumber").toString());
|
||||
|
@@ -26,8 +26,8 @@ public:
|
||||
void setupDefaultNetworkSettings(const QString &host);
|
||||
|
||||
protected:
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
QVariantMap toMap() const final;
|
||||
void fromMap(const Utils::Storage &map) final;
|
||||
Utils::Storage toMap() const final;
|
||||
|
||||
private:
|
||||
QdbDevice();
|
||||
|
@@ -192,7 +192,7 @@ LocatorMatcherTask currentDocumentMatcher()
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(resultStorage),
|
||||
Tasking::Storage(resultStorage),
|
||||
CurrentDocumentSymbolsRequestTask(onQuerySetup, onQueryDone),
|
||||
AsyncTask<void>(onFilterSetup)
|
||||
};
|
||||
|
@@ -813,7 +813,7 @@ Group ClangTool::runRecipe(const RunSettings &runSettings,
|
||||
NormalMessageFormat);
|
||||
};
|
||||
|
||||
topTasks.append(Group { Storage(storage), TaskTreeTask(onTreeSetup, onTreeDone) });
|
||||
topTasks.append(Group { Tasking::Storage(storage), TaskTreeTask(onTreeSetup, onTreeDone) });
|
||||
return {topTasks};
|
||||
}
|
||||
|
||||
|
@@ -219,7 +219,7 @@ GroupItem clangToolTask(const AnalyzeInputData &input,
|
||||
|
||||
const Group group {
|
||||
finishAllAndDone,
|
||||
Storage(storage),
|
||||
Tasking::Storage(storage),
|
||||
onGroupSetup(onSetup),
|
||||
Group {
|
||||
sequential,
|
||||
|
@@ -41,7 +41,7 @@ RunSettings::RunSettings()
|
||||
{
|
||||
}
|
||||
|
||||
void RunSettings::fromMap(const QVariantMap &map, const QString &prefix)
|
||||
void RunSettings::fromMap(const Storage &map, const QString &prefix)
|
||||
{
|
||||
m_diagnosticConfigId = Id::fromSetting(map.value(prefix + diagnosticConfigIdKey));
|
||||
m_parallelJobs = map.value(prefix + parallelJobsKey).toInt();
|
||||
@@ -50,7 +50,7 @@ void RunSettings::fromMap(const QVariantMap &map, const QString &prefix)
|
||||
m_analyzeOpenFiles = map.value(prefix + analyzeOpenFilesKey).toBool();
|
||||
}
|
||||
|
||||
void RunSettings::toMap(QVariantMap &map, const QString &prefix) const
|
||||
void RunSettings::toMap(Storage &map, const QString &prefix) const
|
||||
{
|
||||
map.insert(prefix + diagnosticConfigIdKey, m_diagnosticConfigId.toSetting());
|
||||
map.insert(prefix + parallelJobsKey, m_parallelJobs);
|
||||
|
@@ -26,8 +26,8 @@ class RunSettings
|
||||
public:
|
||||
RunSettings();
|
||||
|
||||
void fromMap(const QVariantMap &map, const QString &prefix = QString());
|
||||
void toMap(QVariantMap &map, const QString &prefix = QString()) const;
|
||||
void fromMap(const Utils::Storage &map, const QString &prefix = QString());
|
||||
void toMap(Utils::Storage &map, const QString &prefix = QString()) const;
|
||||
|
||||
Utils::Id diagnosticConfigId() const;
|
||||
void setDiagnosticConfigId(const Utils::Id &id) { m_diagnosticConfigId = id; }
|
||||
|
@@ -2139,14 +2139,14 @@ void InitialCMakeArgumentsAspect::setCMakeConfiguration(const CMakeConfig &confi
|
||||
ci.isInitial = true;
|
||||
}
|
||||
|
||||
void InitialCMakeArgumentsAspect::fromMap(const QVariantMap &map)
|
||||
void InitialCMakeArgumentsAspect::fromMap(const Storage &map)
|
||||
{
|
||||
const QString value = map.value(settingsKey(), defaultValue()).toString();
|
||||
QStringList additionalArguments;
|
||||
setAllValues(value, additionalArguments);
|
||||
}
|
||||
|
||||
void InitialCMakeArgumentsAspect::toMap(QVariantMap &map) const
|
||||
void InitialCMakeArgumentsAspect::toMap(Storage &map) const
|
||||
{
|
||||
saveToMap(map, allValues().join('\n'), defaultValue(), settingsKey());
|
||||
}
|
||||
@@ -2231,7 +2231,7 @@ ConfigureEnvironmentAspect::ConfigureEnvironmentAspect(AspectContainer *containe
|
||||
});
|
||||
}
|
||||
|
||||
void ConfigureEnvironmentAspect::fromMap(const QVariantMap &map)
|
||||
void ConfigureEnvironmentAspect::fromMap(const Storage &map)
|
||||
{
|
||||
// Match the key values from Qt Creator 9.0.0/1 to the ones from EnvironmentAspect
|
||||
const bool cleanSystemEnvironment = map.value(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY))
|
||||
@@ -2249,7 +2249,7 @@ void ConfigureEnvironmentAspect::fromMap(const QVariantMap &map)
|
||||
ProjectExplorer::EnvironmentAspect::fromMap(tmpMap);
|
||||
}
|
||||
|
||||
void ConfigureEnvironmentAspect::toMap(QVariantMap &map) const
|
||||
void ConfigureEnvironmentAspect::toMap(Storage &map) const
|
||||
{
|
||||
QVariantMap tmpMap;
|
||||
ProjectExplorer::EnvironmentAspect::toMap(tmpMap);
|
||||
|
@@ -31,8 +31,8 @@ public:
|
||||
void setAllValues(const QString &values, QStringList &additionalArguments);
|
||||
void setCMakeConfiguration(const CMakeConfig &config);
|
||||
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
void toMap(QVariantMap &map) const final;
|
||||
void fromMap(const Utils::Storage &map) final;
|
||||
void toMap(Utils::Storage &map) const final;
|
||||
|
||||
private:
|
||||
CMakeConfig m_cmakeConfiguration;
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
ConfigureEnvironmentAspect(Utils::AspectContainer *container,
|
||||
ProjectExplorer::BuildConfiguration *buildConfig);
|
||||
|
||||
void fromMap(const QVariantMap &map);
|
||||
void toMap(QVariantMap &map) const;
|
||||
void fromMap(const Utils::Storage &map);
|
||||
void toMap(Utils::Storage &map) const;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -273,7 +273,7 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) :
|
||||
this, &CMakeBuildStep::updateBuildTargetsModel);
|
||||
}
|
||||
|
||||
void CMakeBuildStep::toMap(QVariantMap &map) const
|
||||
void CMakeBuildStep::toMap(Utils::Storage &map) const
|
||||
{
|
||||
CMakeAbstractProcessStep::toMap(map);
|
||||
map.insert(BUILD_TARGETS_KEY, m_buildTargets);
|
||||
@@ -282,7 +282,7 @@ void CMakeBuildStep::toMap(QVariantMap &map) const
|
||||
map.insert(QLatin1String(BUILD_PRESET_KEY), m_buildPreset);
|
||||
}
|
||||
|
||||
void CMakeBuildStep::fromMap(const QVariantMap &map)
|
||||
void CMakeBuildStep::fromMap(const Utils::Storage &map)
|
||||
{
|
||||
setBuildTargets(map.value(BUILD_TARGETS_KEY).toStringList());
|
||||
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
bool buildsBuildTarget(const QString &target) const;
|
||||
void setBuildsBuildTarget(const QString &target, bool on);
|
||||
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
QString cleanTarget() const;
|
||||
QString allTarget() const ;
|
||||
@@ -83,7 +83,7 @@ signals:
|
||||
private:
|
||||
Utils::CommandLine cmakeCommand() const;
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
|
||||
bool init() override;
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
|
@@ -7,8 +7,9 @@
|
||||
|
||||
#include <texteditor/codeassist/keywordscompletionassist.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/filepath.h>
|
||||
#include <utils/id.h>
|
||||
#include <utils/storage.h>
|
||||
|
||||
#include <optional>
|
||||
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
bool isValid() const;
|
||||
|
||||
Utils::Id id() const { return m_id; }
|
||||
QVariantMap toMap () const;
|
||||
Utils::Storage toMap () const;
|
||||
|
||||
void setAutorun(bool autoRun) { m_isAutoRun = autoRun; }
|
||||
|
||||
|
@@ -558,7 +558,7 @@ QVariantMap ClangdSettings::Data::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
void ClangdSettings::Data::fromMap(const QVariantMap &map)
|
||||
void ClangdSettings::Data::fromMap(const Storage &map)
|
||||
{
|
||||
useClangd = map.value(useClangdKey(), true).toBool();
|
||||
executableFilePath = FilePath::fromString(map.value(clangdPathKey()).toString());
|
||||
|
@@ -7,8 +7,9 @@
|
||||
#include "cppeditor_global.h"
|
||||
|
||||
#include <utils/clangutils.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/filepath.h>
|
||||
#include <utils/id.h>
|
||||
#include <utils/storage.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
@@ -93,8 +94,8 @@ public:
|
||||
class CPPEDITOR_EXPORT Data
|
||||
{
|
||||
public:
|
||||
QVariantMap toMap() const;
|
||||
void fromMap(const QVariantMap &map);
|
||||
Utils::Storage toMap() const;
|
||||
void fromMap(const Utils::Storage &map);
|
||||
|
||||
friend bool operator==(const Data &s1, const Data &s2)
|
||||
{
|
||||
|
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "cppcodestylepreferences.h"
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
namespace CppEditor {
|
||||
|
||||
CppCodeStylePreferences::CppCodeStylePreferences(QObject *parent) :
|
||||
@@ -78,7 +80,7 @@ QVariantMap CppCodeStylePreferences::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
void CppCodeStylePreferences::fromMap(const QVariantMap &map)
|
||||
void CppCodeStylePreferences::fromMap(const Storage &map)
|
||||
{
|
||||
ICodeStylePreferences::fromMap(map);
|
||||
if (!currentDelegate())
|
||||
|
@@ -25,8 +25,8 @@ public:
|
||||
// tracks parent hierarchy until currentParentSettings is null
|
||||
CppCodeStyleSettings currentCodeStyleSettings() const;
|
||||
|
||||
QVariantMap toMap() const override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
Utils::Storage toMap() const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
|
||||
public slots:
|
||||
void setCodeStyleSettings(const CppCodeStyleSettings &data);
|
||||
|
@@ -40,6 +40,8 @@ static const char extraPaddingForConditionsIfConfusingAlignKey[] = "ExtraPadding
|
||||
static const char alignAssignmentsKey[] = "AlignAssignments";
|
||||
static const char shortGetterNameKey[] = "ShortGetterName";
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
namespace CppEditor {
|
||||
|
||||
// ------------------ CppCodeStyleSettingsWidget
|
||||
@@ -73,7 +75,7 @@ QVariantMap CppCodeStyleSettings::toMap() const
|
||||
};
|
||||
}
|
||||
|
||||
void CppCodeStyleSettings::fromMap(const QVariantMap &map)
|
||||
void CppCodeStyleSettings::fromMap(const Storage &map)
|
||||
{
|
||||
indentBlockBraces = map.value(indentBlockBracesKey, indentBlockBraces).toBool();
|
||||
indentBlockBody = map.value(indentBlockBodyKey, indentBlockBody).toBool();
|
||||
|
@@ -5,9 +5,7 @@
|
||||
|
||||
#include "cppeditor_global.h"
|
||||
|
||||
#include <QVariantMap>
|
||||
|
||||
#include <optional>
|
||||
#include <utils/storage.h>
|
||||
|
||||
namespace CPlusPlus { class Overview; }
|
||||
namespace TextEditor { class TabSettings; }
|
||||
@@ -66,8 +64,8 @@ public:
|
||||
bool forceFormatting = false;
|
||||
#endif
|
||||
|
||||
QVariantMap toMap() const;
|
||||
void fromMap(const QVariantMap &map);
|
||||
Utils::Storage toMap() const;
|
||||
void fromMap(const Utils::Storage &map);
|
||||
|
||||
bool equals(const CppCodeStyleSettings &rhs) const;
|
||||
bool operator==(const CppCodeStyleSettings &s) const { return equals(s); }
|
||||
|
@@ -90,7 +90,7 @@ void CppProjectUpdater::update(const ProjectUpdateInfo &projectUpdateInfo,
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(storage),
|
||||
Tasking::Storage(storage),
|
||||
Group(tasks),
|
||||
onGroupDone(onDone),
|
||||
onGroupError(onError)
|
||||
|
@@ -22,8 +22,8 @@ public:
|
||||
explicit SourcePathMapAspect(Utils::AspectContainer *container);
|
||||
~SourcePathMapAspect() override;
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
void addToLayout(Layouting::LayoutItem &parent) override;
|
||||
|
||||
|
@@ -10,10 +10,9 @@
|
||||
|
||||
#include <utils/filepath.h>
|
||||
#include <utils/environment.h>
|
||||
#include <utils/storage.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
|
||||
namespace Debugger {
|
||||
|
||||
@@ -38,7 +37,7 @@ public:
|
||||
bool isValid() const;
|
||||
QString engineTypeName() const;
|
||||
|
||||
QVariantMap toMap() const;
|
||||
Utils::Storage toMap() const;
|
||||
|
||||
QVariant id() const { return m_id; }
|
||||
|
||||
|
@@ -211,7 +211,7 @@ int DebuggerRunConfigurationAspect::portsUsedByDebugger() const
|
||||
return ports;
|
||||
}
|
||||
|
||||
void DebuggerRunConfigurationAspect::toMap(QVariantMap &map) const
|
||||
void DebuggerRunConfigurationAspect::toMap(Storage &map) const
|
||||
{
|
||||
m_cppAspect->toMap(map);
|
||||
m_qmlAspect->toMap(map);
|
||||
@@ -223,7 +223,7 @@ void DebuggerRunConfigurationAspect::toMap(QVariantMap &map) const
|
||||
map.insert("RunConfiguration.UseQmlDebuggerAuto", m_qmlAspect->value() == TriState::Default);
|
||||
}
|
||||
|
||||
void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
|
||||
void DebuggerRunConfigurationAspect::fromMap(const Storage &map)
|
||||
{
|
||||
m_cppAspect->fromMap(map);
|
||||
m_qmlAspect->fromMap(map);
|
||||
|
@@ -17,8 +17,8 @@ public:
|
||||
DebuggerRunConfigurationAspect(ProjectExplorer::Target *target);
|
||||
~DebuggerRunConfigurationAspect();
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
bool useCppDebugger() const;
|
||||
bool useQmlDebugger() const;
|
||||
|
@@ -452,12 +452,12 @@ SourcePathMapAspect::~SourcePathMapAspect()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void SourcePathMapAspect::fromMap(const QVariantMap &)
|
||||
void SourcePathMapAspect::fromMap(const Storage &)
|
||||
{
|
||||
QTC_CHECK(false); // This is only used via read/writeSettings
|
||||
}
|
||||
|
||||
void SourcePathMapAspect::toMap(QVariantMap &) const
|
||||
void SourcePathMapAspect::toMap(Storage &) const
|
||||
{
|
||||
QTC_CHECK(false);
|
||||
}
|
||||
|
@@ -778,7 +778,7 @@ const char DockerDeviceKeepEntryPoint[] = "DockerDeviceKeepEntryPoint";
|
||||
const char DockerDeviceEnableLldbFlags[] = "DockerDeviceEnableLldbFlags";
|
||||
const char DockerDeviceClangDExecutable[] = "DockerDeviceClangDExecutable";
|
||||
|
||||
void DockerDevice::fromMap(const QVariantMap &map)
|
||||
void DockerDevice::fromMap(const Storage &map)
|
||||
{
|
||||
ProjectExplorer::IDevice::fromMap(map);
|
||||
DockerDeviceData data;
|
||||
|
@@ -99,8 +99,8 @@ public:
|
||||
std::optional<Utils::FilePath> clangdExecutable() const override;
|
||||
|
||||
protected:
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
QVariantMap toMap() const final;
|
||||
void fromMap(const Utils::Storage &map) final;
|
||||
Utils::Storage toMap() const final;
|
||||
|
||||
private:
|
||||
void aboutToBeRemoved() const final;
|
||||
|
@@ -619,7 +619,7 @@ void GenericBuildSystem::removeFiles(const FilePaths &filesToRemove)
|
||||
}
|
||||
}
|
||||
|
||||
Project::RestoreResult GenericProject::fromMap(const QVariantMap &map, QString *errorMessage)
|
||||
Project::RestoreResult GenericProject::fromMap(const Storage &map, QString *errorMessage)
|
||||
{
|
||||
const RestoreResult result = Project::fromMap(map, errorMessage);
|
||||
if (result != RestoreResult::Ok)
|
||||
|
@@ -19,7 +19,7 @@ public:
|
||||
void removeFilesTriggered(const Utils::FilePaths &filesToRemove);
|
||||
|
||||
private:
|
||||
RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) final;
|
||||
RestoreResult fromMap(const Utils::Storage &map, QString *errorMessage) final;
|
||||
ProjectExplorer::DeploymentKnowledge deploymentKnowledge() const final;
|
||||
void configureAsExampleProject(ProjectExplorer::Kit *kit) override;
|
||||
};
|
||||
|
@@ -560,7 +560,7 @@ TaskTree *BranchView::onFastForwardMerge(const std::function<void()> &callback)
|
||||
});
|
||||
|
||||
const Group root {
|
||||
Storage(storage),
|
||||
Tasking::Storage(storage),
|
||||
parallel,
|
||||
ProcessTask(setupMergeBase, onMergeBaseDone),
|
||||
topRevisionProc,
|
||||
|
@@ -248,7 +248,7 @@ GitDiffEditorController::GitDiffEditorController(IDocument *document,
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(diffInputStorage),
|
||||
Tasking::Storage(diffInputStorage),
|
||||
ProcessTask(setupDiff, onDiffDone),
|
||||
postProcessTask(diffInputStorage)
|
||||
};
|
||||
@@ -333,8 +333,8 @@ FileListDiffController::FileListDiffController(IDocument *document, const QStrin
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(storage),
|
||||
Storage(diffInputStorage),
|
||||
Tasking::Storage(storage),
|
||||
Tasking::Storage(diffInputStorage),
|
||||
Group {
|
||||
parallel,
|
||||
continueOnDone,
|
||||
@@ -529,8 +529,8 @@ ShowController::ShowController(IDocument *document, const QString &id)
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(storage),
|
||||
Storage(diffInputStorage),
|
||||
Tasking::Storage(storage),
|
||||
Tasking::Storage(diffInputStorage),
|
||||
parallel,
|
||||
onGroupSetup([this] { setStartupFile(VcsBase::source(this->document()).toString()); }),
|
||||
Group {
|
||||
|
@@ -17,7 +17,7 @@ QString CommandBuilder::displayName() const
|
||||
return Tr::tr("Custom Command");
|
||||
}
|
||||
|
||||
void CommandBuilder::fromMap(const QVariantMap &map)
|
||||
void CommandBuilder::fromMap(const Storage &map)
|
||||
{
|
||||
m_command = FilePath::fromSettings(map.value(QString(CUSTOMCOMMANDBUILDER_COMMAND).arg(id())));
|
||||
m_args = map.value(QString(CUSTOMCOMMANDBUILDER_ARGS).arg(id())).toString();
|
||||
|
@@ -20,7 +20,7 @@ public:
|
||||
virtual QString id() const { return "CustomCommandBuilder"; }
|
||||
virtual QString displayName() const;
|
||||
|
||||
virtual void fromMap(const QVariantMap &map);
|
||||
virtual void fromMap(const Utils::Storage &map);
|
||||
virtual void toMap(QVariantMap *map) const;
|
||||
|
||||
virtual Utils::FilePath defaultCommand() const { return {}; }
|
||||
|
@@ -159,7 +159,7 @@ void CommandBuilderAspect::addToLayout(Layouting::LayoutItem &parent)
|
||||
updateGui();
|
||||
}
|
||||
|
||||
void CommandBuilderAspect::fromMap(const QVariantMap &map)
|
||||
void CommandBuilderAspect::fromMap(const Storage &map)
|
||||
{
|
||||
d->m_loadedFromMap = true;
|
||||
|
||||
@@ -171,7 +171,7 @@ void CommandBuilderAspect::fromMap(const QVariantMap &map)
|
||||
updateGui();
|
||||
}
|
||||
|
||||
void CommandBuilderAspect::toMap(QVariantMap &map) const
|
||||
void CommandBuilderAspect::toMap(Storage &map) const
|
||||
{
|
||||
map[IncrediBuild::Constants::INCREDIBUILD_BUILDSTEP_TYPE]
|
||||
= QVariant(IncrediBuild::Constants::BUILDCONSOLE_BUILDSTEP_ID);
|
||||
|
@@ -24,8 +24,8 @@ public:
|
||||
|
||||
private:
|
||||
void addToLayout(Layouting::LayoutItem &parent) final;
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
void toMap(QVariantMap &map) const final;
|
||||
void fromMap(const Utils::Storage &map) final;
|
||||
void toMap(Utils::Storage &map) const final;
|
||||
|
||||
void updateGui();
|
||||
|
||||
|
@@ -376,7 +376,7 @@ public:
|
||||
|
||||
private:
|
||||
QList<NamedWidget *> createSubConfigWidgets() override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void fromMap(const Storage &map) override;
|
||||
|
||||
void updateQmakeCommand();
|
||||
|
||||
@@ -414,7 +414,7 @@ QList<NamedWidget *> IosQmakeBuildConfiguration::createSubConfigWidgets()
|
||||
return subConfigWidgets;
|
||||
}
|
||||
|
||||
void IosQmakeBuildConfiguration::fromMap(const QVariantMap &map)
|
||||
void IosQmakeBuildConfiguration::fromMap(const Storage &map)
|
||||
{
|
||||
QmakeBuildConfiguration::fromMap(map);
|
||||
if (!hasError())
|
||||
|
@@ -56,8 +56,8 @@ private:
|
||||
|
||||
bool init() final;
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) final;
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
void toMap(QVariantMap &map) const final;
|
||||
void fromMap(const Storage &map) final;
|
||||
void toMap(Storage &map) const final;
|
||||
|
||||
QStringList m_baseBuildArguments;
|
||||
QStringList m_extraArguments;
|
||||
@@ -166,7 +166,7 @@ void IosBuildStep::setupOutputFormatter(OutputFormatter *formatter)
|
||||
AbstractProcessStep::setupOutputFormatter(formatter);
|
||||
}
|
||||
|
||||
void IosBuildStep::toMap(QVariantMap &map) const
|
||||
void IosBuildStep::toMap(Storage &map) const
|
||||
{
|
||||
AbstractProcessStep::toMap(map);
|
||||
|
||||
@@ -177,7 +177,7 @@ void IosBuildStep::toMap(QVariantMap &map) const
|
||||
map.insert(CLEAN_KEY, stepList()->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
|
||||
}
|
||||
|
||||
void IosBuildStep::fromMap(const QVariantMap &map)
|
||||
void IosBuildStep::fromMap(const Storage &map)
|
||||
{
|
||||
QVariant bArgs = map.value(BUILD_ARGUMENTS_KEY);
|
||||
m_baseBuildArguments = bArgs.toStringList();
|
||||
|
@@ -20,8 +20,6 @@
|
||||
#include <QFormLayout>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <QVariant>
|
||||
#include <QVariantMap>
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include <IOKit/IOKitLib.h>
|
||||
@@ -42,6 +40,7 @@
|
||||
#include <exception>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace {
|
||||
static Q_LOGGING_CATEGORY(detectLog, "qtc.ios.deviceDetect", QtWarningMsg)
|
||||
@@ -127,7 +126,7 @@ IDeviceWidget *IosDevice::createWidget()
|
||||
return new IosDeviceInfoWidget(sharedFromThis());
|
||||
}
|
||||
|
||||
void IosDevice::fromMap(const QVariantMap &map)
|
||||
void IosDevice::fromMap(const Storage &map)
|
||||
{
|
||||
IDevice::fromMap(map);
|
||||
|
||||
|
@@ -40,8 +40,8 @@ public:
|
||||
static QString name();
|
||||
|
||||
protected:
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
QVariantMap toMap() const final;
|
||||
void fromMap(const Utils::Storage &map) final;
|
||||
Utils::Storage toMap() const final;
|
||||
|
||||
friend class IosDeviceFactory;
|
||||
friend class Ios::Internal::IosDeviceManager;
|
||||
|
@@ -59,8 +59,8 @@ public:
|
||||
|
||||
private:
|
||||
void setupOutputFormatter(OutputFormatter *formatter) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(Storage &map) const override;
|
||||
void fromMap(const Storage &map) override;
|
||||
|
||||
QStringList defaultCleanCmdList() const;
|
||||
QStringList defaultCmdList() const;
|
||||
@@ -83,7 +83,7 @@ IosDsymBuildStep::IosDsymBuildStep(BuildStepList *parent, Id id) :
|
||||
setIgnoreReturnValue(m_clean);
|
||||
}
|
||||
|
||||
void IosDsymBuildStep::toMap(QVariantMap &map) const
|
||||
void IosDsymBuildStep::toMap(Storage &map) const
|
||||
{
|
||||
AbstractProcessStep::toMap(map);
|
||||
|
||||
@@ -95,7 +95,7 @@ void IosDsymBuildStep::toMap(QVariantMap &map) const
|
||||
map.insert(id().withSuffix(COMMAND_PARTIAL_KEY).toString(), command().toSettings());
|
||||
}
|
||||
|
||||
void IosDsymBuildStep::fromMap(const QVariantMap &map)
|
||||
void IosDsymBuildStep::fromMap(const Storage &map)
|
||||
{
|
||||
QVariant bArgs = map.value(id().withSuffix(ARGUMENTS_PARTIAL_KEY).toString());
|
||||
m_arguments = bArgs.toStringList();
|
||||
|
@@ -206,7 +206,7 @@ FilePath IosRunConfiguration::localExecutable() const
|
||||
return bundleDirectory().pathAppended(applicationName());
|
||||
}
|
||||
|
||||
void IosDeviceTypeAspect::fromMap(const QVariantMap &map)
|
||||
void IosDeviceTypeAspect::fromMap(const Storage &map)
|
||||
{
|
||||
bool deviceTypeIsInt;
|
||||
map.value(deviceTypeKey).toInt(&deviceTypeIsInt);
|
||||
@@ -216,7 +216,7 @@ void IosDeviceTypeAspect::fromMap(const QVariantMap &map)
|
||||
m_runConfiguration->update();
|
||||
}
|
||||
|
||||
void IosDeviceTypeAspect::toMap(QVariantMap &map) const
|
||||
void IosDeviceTypeAspect::toMap(Storage &map) const
|
||||
{
|
||||
map.insert(deviceTypeKey, deviceType().toMap());
|
||||
}
|
||||
|
@@ -27,8 +27,8 @@ public:
|
||||
explicit IosDeviceTypeAspect(Utils::AspectContainer *container,
|
||||
IosRunConfiguration *runConfiguration);
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
void addToLayout(Layouting::LayoutItem &parent) override;
|
||||
|
||||
IosDeviceType deviceType() const;
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include <QMapIterator>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Ios::Internal {
|
||||
|
||||
@@ -72,7 +73,7 @@ IosDeviceType::IosDeviceType(IosDeviceType::Type type, const QString &identifier
|
||||
type(type), identifier(identifier), displayName(displayName)
|
||||
{ }
|
||||
|
||||
bool IosDeviceType::fromMap(const QVariantMap &map)
|
||||
bool IosDeviceType::fromMap(const Storage &map)
|
||||
{
|
||||
bool validType;
|
||||
displayName = map.value(iosDeviceTypeDisplayNameKey, QVariant()).toString();
|
||||
|
@@ -25,8 +25,8 @@ public:
|
||||
IosDeviceType(Type type = IosDevice, const QString &identifier = QString(),
|
||||
const QString &displayName = QString());
|
||||
|
||||
bool fromMap(const QVariantMap &map);
|
||||
QVariantMap toMap() const;
|
||||
bool fromMap(const Utils::Storage &map);
|
||||
Utils::Storage toMap() const;
|
||||
|
||||
bool operator ==(const IosDeviceType &o) const;
|
||||
bool operator !=(const IosDeviceType &o) const { return !(*this == o); }
|
||||
|
@@ -66,6 +66,8 @@ constexpr char typedClientsKey[] = "typedClients";
|
||||
constexpr char outlineSortedKey[] = "outlineSorted";
|
||||
constexpr char mimeType[] = "application/language.client.setting";
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
namespace LanguageClient {
|
||||
|
||||
class LanguageClientSettingsModel : public QAbstractListModel
|
||||
@@ -576,7 +578,7 @@ QVariantMap BaseSettings::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
void BaseSettings::fromMap(const QVariantMap &map)
|
||||
void BaseSettings::fromMap(const Storage &map)
|
||||
{
|
||||
m_name = map[nameKey].toString();
|
||||
m_id = map.value(idKey, QUuid::createUuid().toString()).toString();
|
||||
@@ -720,7 +722,7 @@ QVariantMap StdIOSettings::toMap() const
|
||||
return map;
|
||||
}
|
||||
|
||||
void StdIOSettings::fromMap(const QVariantMap &map)
|
||||
void StdIOSettings::fromMap(const Storage &map)
|
||||
{
|
||||
BaseSettings::fromMap(map);
|
||||
m_executable = Utils::FilePath::fromSettings(map[executableKey]);
|
||||
|
@@ -79,8 +79,8 @@ public:
|
||||
virtual bool isValid() const;
|
||||
Client *createClient() const;
|
||||
Client *createClient(ProjectExplorer::Project *project) const;
|
||||
virtual QVariantMap toMap() const;
|
||||
virtual void fromMap(const QVariantMap &map);
|
||||
virtual Utils::Storage toMap() const;
|
||||
virtual void fromMap(const Utils::Storage &map);
|
||||
|
||||
protected:
|
||||
virtual BaseClientInterface *createInterface(ProjectExplorer::Project *) const;
|
||||
@@ -108,8 +108,8 @@ public:
|
||||
QWidget *createSettingsWidget(QWidget *parent = nullptr) const override;
|
||||
BaseSettings *copy() const override { return new StdIOSettings(*this); }
|
||||
bool isValid() const override;
|
||||
QVariantMap toMap() const override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
Utils::Storage toMap() const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
QString arguments() const;
|
||||
Utils::CommandLine command() const;
|
||||
|
||||
|
@@ -76,7 +76,7 @@ LocatorMatcherTask locatorMatcher(Client *client, int maxResultCount,
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(resultStorage),
|
||||
Tasking::Storage(resultStorage),
|
||||
ClientWorkspaceSymbolRequestTask(onQuerySetup, onQueryDone),
|
||||
AsyncTask<void>(onFilterSetup)
|
||||
};
|
||||
@@ -135,7 +135,7 @@ LocatorMatcherTask currentDocumentMatcher()
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(resultStorage),
|
||||
Tasking::Storage(resultStorage),
|
||||
CurrentDocumentSymbolsRequestTask(onQuerySetup, onQueryDone),
|
||||
AsyncTask<void>(onFilterSetup)
|
||||
};
|
||||
|
@@ -64,7 +64,7 @@ MercurialDiffEditorController::MercurialDiffEditorController(IDocument *document
|
||||
};
|
||||
|
||||
const Group root {
|
||||
Storage(diffInputStorage),
|
||||
Tasking::Storage(diffInputStorage),
|
||||
ProcessTask(setupDiff, onDiffDone),
|
||||
postProcessTask(diffInputStorage)
|
||||
};
|
||||
|
@@ -137,14 +137,14 @@ void MesonBuildConfiguration::setParameters(const QString ¶ms)
|
||||
emit parametersChanged();
|
||||
}
|
||||
|
||||
void MesonBuildConfiguration::toMap(QVariantMap &map) const
|
||||
void MesonBuildConfiguration::toMap(Storage &map) const
|
||||
{
|
||||
ProjectExplorer::BuildConfiguration::toMap(map);
|
||||
map[Constants::BuildConfiguration::BUILD_TYPE_KEY] = mesonBuildTypeName(m_buildType);
|
||||
map[Constants::BuildConfiguration::PARAMETERS_KEY] = m_parameters;
|
||||
}
|
||||
|
||||
void MesonBuildConfiguration::fromMap(const QVariantMap &map)
|
||||
void MesonBuildConfiguration::fromMap(const Storage &map)
|
||||
{
|
||||
ProjectExplorer::BuildConfiguration::fromMap(map);
|
||||
m_buildSystem = new MesonBuildSystem{this};
|
||||
|
@@ -30,8 +30,8 @@ signals:
|
||||
void parametersChanged();
|
||||
|
||||
private:
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
|
||||
MesonBuildType m_buildType;
|
||||
ProjectExplorer::NamedWidget *createConfigWidget() final;
|
||||
|
@@ -199,14 +199,14 @@ void NinjaBuildStep::setCommandArgs(const QString &args)
|
||||
m_commandArgs = args.trimmed();
|
||||
}
|
||||
|
||||
void NinjaBuildStep::toMap(QVariantMap &map) const
|
||||
void NinjaBuildStep::toMap(Storage &map) const
|
||||
{
|
||||
AbstractProcessStep::toMap(map);
|
||||
map.insert(TARGETS_KEY, m_targetName);
|
||||
map.insert(TOOL_ARGUMENTS_KEY, m_commandArgs);
|
||||
}
|
||||
|
||||
void NinjaBuildStep::fromMap(const QVariantMap &map)
|
||||
void NinjaBuildStep::fromMap(const Storage &map)
|
||||
{
|
||||
m_targetName = map.value(TARGETS_KEY).toString();
|
||||
m_commandArgs = map.value(TOOL_ARGUMENTS_KEY).toString();
|
||||
|
@@ -26,8 +26,8 @@ public:
|
||||
Q_SIGNAL void targetListChanged();
|
||||
Q_SIGNAL void commandChanged();
|
||||
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
|
||||
private:
|
||||
void update(bool parsingSuccessful);
|
||||
|
@@ -37,13 +37,13 @@ BuildConfiguration::BuildType NimbleBuildConfiguration::buildType() const
|
||||
return m_buildType;
|
||||
}
|
||||
|
||||
void NimbleBuildConfiguration::fromMap(const QVariantMap &map)
|
||||
void NimbleBuildConfiguration::fromMap(const Storage &map)
|
||||
{
|
||||
m_buildType = static_cast<BuildType>(map[Constants::C_NIMBLEBUILDCONFIGURATION_BUILDTYPE].toInt());
|
||||
BuildConfiguration::fromMap(map);
|
||||
}
|
||||
|
||||
void NimbleBuildConfiguration::toMap(QVariantMap &map) const
|
||||
void NimbleBuildConfiguration::toMap(Storage &map) const
|
||||
{
|
||||
BuildConfiguration::toMap(map);
|
||||
map[Constants::C_NIMBLEBUILDCONFIGURATION_BUILDTYPE] = buildType();
|
||||
|
@@ -18,8 +18,8 @@ class NimbleBuildConfiguration : public ProjectExplorer::BuildConfiguration
|
||||
|
||||
BuildType buildType() const override;
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
private:
|
||||
void setBuildType(BuildType buildType);
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Nim {
|
||||
|
||||
@@ -26,13 +27,13 @@ NimbleProject::NimbleProject(const Utils::FilePath &fileName)
|
||||
setBuildSystemCreator([] (Target *t) { return new NimbleBuildSystem(t); });
|
||||
}
|
||||
|
||||
void NimbleProject::toMap(QVariantMap &map) const
|
||||
void NimbleProject::toMap(Storage &map) const
|
||||
{
|
||||
Project::toMap(map);
|
||||
map[Constants::C_NIMPROJECT_EXCLUDEDFILES] = m_excludedFiles;
|
||||
}
|
||||
|
||||
Project::RestoreResult NimbleProject::fromMap(const QVariantMap &map, QString *errorMessage)
|
||||
Project::RestoreResult NimbleProject::fromMap(const Storage &map, QString *errorMessage)
|
||||
{
|
||||
auto result = Project::fromMap(map, errorMessage);
|
||||
m_excludedFiles = map.value(Constants::C_NIMPROJECT_EXCLUDEDFILES).toStringList();
|
||||
|
@@ -16,14 +16,14 @@ public:
|
||||
NimbleProject(const Utils::FilePath &filename);
|
||||
|
||||
// Keep for compatibility with Qt Creator 4.10
|
||||
void toMap(QVariantMap &map) const final;
|
||||
void toMap(Utils::Storage &map) const final;
|
||||
|
||||
QStringList excludedFiles() const;
|
||||
void setExcludedFiles(const QStringList &excludedFiles);
|
||||
|
||||
protected:
|
||||
// Keep for compatibility with Qt Creator 4.10
|
||||
RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) final;
|
||||
RestoreResult fromMap(const Utils::Storage &map, QString *errorMessage) final;
|
||||
|
||||
QStringList m_excludedFiles;
|
||||
};
|
||||
|
@@ -121,7 +121,7 @@ QWidget *NimCompilerBuildStep::createConfigWidget()
|
||||
return widget;
|
||||
}
|
||||
|
||||
void NimCompilerBuildStep::fromMap(const QVariantMap &map)
|
||||
void NimCompilerBuildStep::fromMap(const Storage &map)
|
||||
{
|
||||
AbstractProcessStep::fromMap(map);
|
||||
m_userCompilerOptions = map[Constants::C_NIMCOMPILERBUILDSTEP_USERCOMPILEROPTIONS].toString().split('|');
|
||||
@@ -129,7 +129,7 @@ void NimCompilerBuildStep::fromMap(const QVariantMap &map)
|
||||
m_targetNimFile = FilePath::fromString(map[Constants::C_NIMCOMPILERBUILDSTEP_TARGETNIMFILE].toString());
|
||||
}
|
||||
|
||||
void NimCompilerBuildStep::toMap(QVariantMap &map) const
|
||||
void NimCompilerBuildStep::toMap(Storage &map) const
|
||||
{
|
||||
AbstractProcessStep::toMap(map);
|
||||
map[Constants::C_NIMCOMPILERBUILDSTEP_USERCOMPILEROPTIONS] = m_userCompilerOptions.join('|');
|
||||
|
@@ -26,8 +26,8 @@ private:
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
QWidget *createConfigWidget() override;
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
void updateTargetNimFile();
|
||||
Utils::CommandLine commandLine();
|
||||
|
@@ -27,14 +27,14 @@ public:
|
||||
Tasks projectIssues(const Kit *k) const final;
|
||||
|
||||
// Keep for compatibility with Qt Creator 4.10
|
||||
void toMap(QVariantMap &map) const final;
|
||||
void toMap(Storage &map) const final;
|
||||
|
||||
QStringList excludedFiles() const;
|
||||
void setExcludedFiles(const QStringList &excludedFiles);
|
||||
|
||||
protected:
|
||||
// Keep for compatibility with Qt Creator 4.10
|
||||
RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) final;
|
||||
RestoreResult fromMap(const Storage &map, QString *errorMessage) final;
|
||||
|
||||
QStringList m_excludedFiles;
|
||||
};
|
||||
@@ -63,13 +63,13 @@ Tasks NimProject::projectIssues(const Kit *k) const
|
||||
return result;
|
||||
}
|
||||
|
||||
void NimProject::toMap(QVariantMap &map) const
|
||||
void NimProject::toMap(Storage &map) const
|
||||
{
|
||||
Project::toMap(map);
|
||||
map[Constants::C_NIMPROJECT_EXCLUDEDFILES] = m_excludedFiles;
|
||||
}
|
||||
|
||||
Project::RestoreResult NimProject::fromMap(const QVariantMap &map, QString *errorMessage)
|
||||
Project::RestoreResult NimProject::fromMap(const Storage &map, QString *errorMessage)
|
||||
{
|
||||
auto result = Project::fromMap(map, errorMessage);
|
||||
m_excludedFiles = map.value(Constants::C_NIMPROJECT_EXCLUDEDFILES).toStringList();
|
||||
|
@@ -89,7 +89,7 @@ QString NimToolChain::compilerVersion() const
|
||||
std::get<2>(m_version));
|
||||
}
|
||||
|
||||
void NimToolChain::fromMap(const QVariantMap &data)
|
||||
void NimToolChain::fromMap(const Storage &data)
|
||||
{
|
||||
ToolChain::fromMap(data);
|
||||
if (hasError())
|
||||
|
@@ -26,7 +26,7 @@ public:
|
||||
QList<Utils::OutputLineParser *> createOutputParsers() const final;
|
||||
std::unique_ptr<ProjectExplorer::ToolChainConfigWidget> createConfigurationWidget() final;
|
||||
|
||||
void fromMap(const QVariantMap &data) final;
|
||||
void fromMap(const Utils::Storage &data) final;
|
||||
|
||||
static bool parseVersion(const Utils::FilePath &path, std::tuple<int, int, int> &version);
|
||||
|
||||
|
@@ -87,7 +87,7 @@ void BuildDirectoryAspect::setProblem(const QString &description)
|
||||
updateProblemLabel();
|
||||
}
|
||||
|
||||
void BuildDirectoryAspect::toMap(QVariantMap &map) const
|
||||
void BuildDirectoryAspect::toMap(Storage &map) const
|
||||
{
|
||||
FilePathAspect::toMap(map);
|
||||
if (!d->sourceDir.isEmpty()) {
|
||||
@@ -96,7 +96,7 @@ void BuildDirectoryAspect::toMap(QVariantMap &map) const
|
||||
}
|
||||
}
|
||||
|
||||
void BuildDirectoryAspect::fromMap(const QVariantMap &map)
|
||||
void BuildDirectoryAspect::fromMap(const Storage &map)
|
||||
{
|
||||
FilePathAspect::fromMap(map);
|
||||
if (!d->sourceDir.isEmpty()) {
|
||||
|
@@ -28,8 +28,8 @@ public:
|
||||
static Utils::FilePath fixupDir(const Utils::FilePath &dir);
|
||||
|
||||
private:
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
|
||||
void updateProblemLabel();
|
||||
|
||||
|
@@ -372,7 +372,7 @@ void BuildConfiguration::appendInitialCleanStep(Utils::Id id)
|
||||
d->m_initialCleanSteps.append(id);
|
||||
}
|
||||
|
||||
void BuildConfiguration::toMap(QVariantMap &map) const
|
||||
void BuildConfiguration::toMap(Storage &map) const
|
||||
{
|
||||
ProjectConfiguration::toMap(map);
|
||||
|
||||
@@ -388,7 +388,7 @@ void BuildConfiguration::toMap(QVariantMap &map) const
|
||||
map.insert(CUSTOM_PARSERS_KEY, transform(d->m_customParsers,&Utils::Id::toSetting));
|
||||
}
|
||||
|
||||
void BuildConfiguration::fromMap(const QVariantMap &map)
|
||||
void BuildConfiguration::fromMap(const Storage &map)
|
||||
{
|
||||
d->m_clearSystemEnvironment = map.value(QLatin1String(Constants::CLEAR_SYSTEM_ENVIRONMENT_KEY))
|
||||
.toBool();
|
||||
|
@@ -68,8 +68,8 @@ public:
|
||||
void appendInitialBuildStep(Utils::Id id);
|
||||
void appendInitialCleanStep(Utils::Id id);
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
void fromMap(const Utils::Storage &map) override;
|
||||
void toMap(Utils::Storage &map) const override;
|
||||
|
||||
bool isEnabled() const;
|
||||
QString disabledReason() const;
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
|
||||
BuildConfiguration *create(Target *parent, const BuildInfo &info) const;
|
||||
|
||||
static BuildConfiguration *restore(Target *parent, const QVariantMap &map);
|
||||
static BuildConfiguration *restore(Target *parent, const Utils::Storage &map);
|
||||
static BuildConfiguration *clone(Target *parent, const BuildConfiguration *source);
|
||||
|
||||
static BuildConfigurationFactory *find(const Kit *k, const Utils::FilePath &projectPath);
|
||||
|
@@ -126,13 +126,13 @@ QWidget *BuildStep::createConfigWidget()
|
||||
return widget;
|
||||
}
|
||||
|
||||
void BuildStep::fromMap(const QVariantMap &map)
|
||||
void BuildStep::fromMap(const Storage &map)
|
||||
{
|
||||
m_enabled = map.value(buildStepEnabledKey, true).toBool();
|
||||
ProjectConfiguration::fromMap(map);
|
||||
}
|
||||
|
||||
void BuildStep::toMap(QVariantMap &map) const
|
||||
void BuildStep::toMap(Storage &map) const
|
||||
{
|
||||
ProjectConfiguration::toMap(map);
|
||||
map.insert(buildStepEnabledKey, m_enabled);
|
||||
@@ -397,7 +397,7 @@ BuildStep *BuildStepFactory::create(BuildStepList *parent)
|
||||
return step;
|
||||
}
|
||||
|
||||
BuildStep *BuildStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
|
||||
BuildStep *BuildStepFactory::restore(BuildStepList *parent, const Storage &map)
|
||||
{
|
||||
BuildStep *bs = create(parent);
|
||||
if (!bs)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user