diff options
author | hjk <hjk@qt.io> | 2023-07-21 18:23:50 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-07-24 06:31:51 +0000 |
commit | 1c4f9733659521ae7bdf24ef6e48a956ef2ab373 (patch) | |
tree | 5a41e158afdabbfa3e66cdb87c2914e9b728d539 /src/plugins/nim | |
parent | a263d3de89f54382a1ef9f30d678e7c15a052f85 (diff) |
ProjectExplorer: Replace the fromMap error return value
... by some out-of-band mechanism, keeping previous functionality.
The driving reason is to get the same fromMap signature as in the
AspectContainer base, however, the whole mechanism seems rather useless:
There are only a few places that actually ever could report errors,
in those places "moving on" looks ok, too, and these few places
are not conceptually different than a lot others.
Removal of this (new) mechanism is left for later.
Change-Id: Ibe7a0456bc3b84a84e942231f14446e783372d76
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/nim')
4 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/nim/project/nimblebuildconfiguration.cpp b/src/plugins/nim/project/nimblebuildconfiguration.cpp index 0f13a643aa..3a19847498 100644 --- a/src/plugins/nim/project/nimblebuildconfiguration.cpp +++ b/src/plugins/nim/project/nimblebuildconfiguration.cpp @@ -37,10 +37,10 @@ BuildConfiguration::BuildType NimbleBuildConfiguration::buildType() const return m_buildType; } -bool NimbleBuildConfiguration::fromMap(const QVariantMap &map) +void NimbleBuildConfiguration::fromMap(const QVariantMap &map) { m_buildType = static_cast<BuildType>(map[Constants::C_NIMBLEBUILDCONFIGURATION_BUILDTYPE].toInt()); - return BuildConfiguration::fromMap(map); + BuildConfiguration::fromMap(map); } void NimbleBuildConfiguration::toMap(QVariantMap &map) const diff --git a/src/plugins/nim/project/nimblebuildconfiguration.h b/src/plugins/nim/project/nimblebuildconfiguration.h index 1a575ac6f0..236ea3a15c 100644 --- a/src/plugins/nim/project/nimblebuildconfiguration.h +++ b/src/plugins/nim/project/nimblebuildconfiguration.h @@ -18,7 +18,7 @@ class NimbleBuildConfiguration : public ProjectExplorer::BuildConfiguration BuildType buildType() const override; - bool fromMap(const QVariantMap &map) override; + void fromMap(const QVariantMap &map) override; void toMap(QVariantMap &map) const override; private: diff --git a/src/plugins/nim/project/nimcompilerbuildstep.cpp b/src/plugins/nim/project/nimcompilerbuildstep.cpp index 49b7760c95..9e941e6893 100644 --- a/src/plugins/nim/project/nimcompilerbuildstep.cpp +++ b/src/plugins/nim/project/nimcompilerbuildstep.cpp @@ -121,13 +121,12 @@ QWidget *NimCompilerBuildStep::createConfigWidget() return widget; } -bool NimCompilerBuildStep::fromMap(const QVariantMap &map) +void NimCompilerBuildStep::fromMap(const QVariantMap &map) { AbstractProcessStep::fromMap(map); m_userCompilerOptions = map[Constants::C_NIMCOMPILERBUILDSTEP_USERCOMPILEROPTIONS].toString().split('|'); m_defaultOptions = static_cast<DefaultBuildOptions>(map[Constants::C_NIMCOMPILERBUILDSTEP_DEFAULTBUILDOPTIONS].toInt()); m_targetNimFile = FilePath::fromString(map[Constants::C_NIMCOMPILERBUILDSTEP_TARGETNIMFILE].toString()); - return true; } void NimCompilerBuildStep::toMap(QVariantMap &map) const diff --git a/src/plugins/nim/project/nimcompilerbuildstep.h b/src/plugins/nim/project/nimcompilerbuildstep.h index 41985166b3..fdd902af53 100644 --- a/src/plugins/nim/project/nimcompilerbuildstep.h +++ b/src/plugins/nim/project/nimcompilerbuildstep.h @@ -26,7 +26,7 @@ private: void setupOutputFormatter(Utils::OutputFormatter *formatter) override; QWidget *createConfigWidget() override; - bool fromMap(const QVariantMap &map) override; + void fromMap(const QVariantMap &map) override; void toMap(QVariantMap &map) const override; void updateTargetNimFile(); |