forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -144,14 +144,13 @@ void MesonBuildConfiguration::toMap(QVariantMap &map) const
|
||||
map[Constants::BuildConfiguration::PARAMETERS_KEY] = m_parameters;
|
||||
}
|
||||
|
||||
bool MesonBuildConfiguration::fromMap(const QVariantMap &map)
|
||||
void MesonBuildConfiguration::fromMap(const QVariantMap &map)
|
||||
{
|
||||
auto res = ProjectExplorer::BuildConfiguration::fromMap(map);
|
||||
ProjectExplorer::BuildConfiguration::fromMap(map);
|
||||
m_buildSystem = new MesonBuildSystem{this};
|
||||
m_buildType = mesonBuildType(
|
||||
map.value(Constants::BuildConfiguration::BUILD_TYPE_KEY).toString());
|
||||
m_parameters = map.value(Constants::BuildConfiguration::PARAMETERS_KEY).toString();
|
||||
return res;
|
||||
}
|
||||
|
||||
class MesonBuildSettingsWidget : public NamedWidget
|
||||
|
||||
@@ -31,7 +31,8 @@ signals:
|
||||
|
||||
private:
|
||||
void toMap(QVariantMap &map) const override;
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
|
||||
MesonBuildType m_buildType;
|
||||
ProjectExplorer::NamedWidget *createConfigWidget() final;
|
||||
MesonBuildSystem *m_buildSystem = nullptr;
|
||||
|
||||
@@ -206,7 +206,7 @@ void NinjaBuildStep::toMap(QVariantMap &map) const
|
||||
map.insert(TOOL_ARGUMENTS_KEY, m_commandArgs);
|
||||
}
|
||||
|
||||
bool NinjaBuildStep::fromMap(const QVariantMap &map)
|
||||
void NinjaBuildStep::fromMap(const QVariantMap &map)
|
||||
{
|
||||
m_targetName = map.value(TARGETS_KEY).toString();
|
||||
m_commandArgs = map.value(TOOL_ARGUMENTS_KEY).toString();
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
Q_SIGNAL void commandChanged();
|
||||
|
||||
void toMap(QVariantMap &map) const override;
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
|
||||
private:
|
||||
void update(bool parsingSuccessful);
|
||||
|
||||
Reference in New Issue
Block a user