forked from qt-creator/qt-creator
QtSupport et al: Centralize QtVersionFactory::restore
Similar to the various types of project *ConfigurationFactory Change-Id: I7b721f127c8bcc13c7db6880d36c79dd091bc037 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
#include "iosqtversion.h"
|
||||
#include "iosconstants.h"
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <proparser/profileevaluator.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
@@ -38,6 +37,7 @@ namespace Internal {
|
||||
IosQtVersionFactory::IosQtVersionFactory(QObject *parent)
|
||||
: QtSupport::QtVersionFactory(parent)
|
||||
{
|
||||
setQtVersionCreator([] { return new IosQtVersion; });
|
||||
}
|
||||
|
||||
bool IosQtVersionFactory::canRestore(const QString &type)
|
||||
@@ -45,15 +45,6 @@ bool IosQtVersionFactory::canRestore(const QString &type)
|
||||
return type == QLatin1String(Constants::IOSQT);
|
||||
}
|
||||
|
||||
QtSupport::BaseQtVersion *IosQtVersionFactory::restore(const QString &type,
|
||||
const QVariantMap &data)
|
||||
{
|
||||
QTC_ASSERT(canRestore(type), return nullptr);
|
||||
auto v = new IosQtVersion;
|
||||
v->fromMap(data);
|
||||
return v;
|
||||
}
|
||||
|
||||
int IosQtVersionFactory::priority() const
|
||||
{
|
||||
return 90;
|
||||
|
||||
Reference in New Issue
Block a user