2015-10-11 23:26:31 +05:30
|
|
|
#pragma once
|
2015-02-12 00:26:55 +05:30
|
|
|
#include "BaseInstance.h"
|
|
|
|
|
|
|
|
class NullInstance: public BaseInstance
|
|
|
|
{
|
2018-12-23 05:35:11 +05:30
|
|
|
Q_OBJECT
|
2015-02-12 00:26:55 +05:30
|
|
|
public:
|
2018-07-15 18:21:05 +05:30
|
|
|
NullInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString& rootDir)
|
|
|
|
:BaseInstance(globalSettings, settings, rootDir)
|
|
|
|
{
|
|
|
|
setVersionBroken(true);
|
|
|
|
}
|
|
|
|
virtual ~NullInstance() {};
|
|
|
|
virtual void saveNow() override
|
|
|
|
{
|
|
|
|
}
|
|
|
|
virtual QString getStatusbarDescription() override
|
|
|
|
{
|
|
|
|
return tr("Unknown instance type");
|
|
|
|
};
|
|
|
|
virtual QSet< QString > traits() const override
|
|
|
|
{
|
|
|
|
return {};
|
|
|
|
};
|
|
|
|
virtual QString instanceConfigFolder() const override
|
|
|
|
{
|
|
|
|
return instanceRoot();
|
|
|
|
};
|
|
|
|
virtual std::shared_ptr<LaunchTask> createLaunchTask(AuthSessionPtr) override
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
virtual shared_qobject_ptr< Task > createUpdateTask(Net::Mode mode) override
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
virtual QProcessEnvironment createEnvironment() override
|
|
|
|
{
|
|
|
|
return QProcessEnvironment();
|
|
|
|
}
|
|
|
|
virtual QMap<QString, QString> getVariables() const override
|
|
|
|
{
|
|
|
|
return QMap<QString, QString>();
|
|
|
|
}
|
|
|
|
virtual IPathMatcher::Ptr getLogFileMatcher() override
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
virtual QString getLogFileRoot() override
|
|
|
|
{
|
|
|
|
return instanceRoot();
|
|
|
|
}
|
|
|
|
virtual QString typeName() const override
|
|
|
|
{
|
|
|
|
return "Null";
|
|
|
|
}
|
|
|
|
bool canExport() const override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
bool canEdit() const override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
bool canLaunch() const override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
QStringList verboseDescription(AuthSessionPtr session) override
|
|
|
|
{
|
|
|
|
QStringList out;
|
|
|
|
out << "Null instance - placeholder.";
|
|
|
|
return out;
|
|
|
|
}
|
2015-02-12 00:26:55 +05:30
|
|
|
};
|