QmlProject: Move RunConfigurationFactory close to RunConfiguration

No need to have a dozen lines of code in a separate translation
unit and more in line with what others do nowadays.

Change-Id: I765535d1484805bc3005fe23bfd4992a96a80e9c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2018-04-06 14:55:56 +02:00
parent ef79078db2
commit 11336fb604
4 changed files with 20 additions and 6 deletions

View File

@@ -48,8 +48,6 @@ using namespace Core;
using namespace ProjectExplorer;
using namespace QtSupport;
using namespace QmlProjectManager::Internal;
namespace QmlProjectManager {
const char M_CURRENT_FILE[] = "CurrentFile";
@@ -146,7 +144,7 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
{
return wrapWidget(new QmlProjectRunConfigurationWidget(this));
return wrapWidget(new Internal::QmlProjectRunConfigurationWidget(this));
}
Utils::OutputFormatter *QmlProjectRunConfiguration::createOutputFormatter() const
@@ -297,4 +295,14 @@ void QmlProjectRunConfiguration::updateEnabledState()
}
}
namespace Internal {
QmlProjectRunConfigurationFactory::QmlProjectRunConfigurationFactory()
: FixedRunConfigurationFactory(QmlProjectRunConfiguration::tr("QML Scene"), false)
{
registerRunConfiguration<QmlProjectRunConfiguration>(Constants::QML_SCENE_RC_ID);
addSupportedProjectType(QmlProjectManager::Constants::QML_PROJECT_ID);
}
} // namespace Internal
} // namespace QmlProjectManager