forked from qt-creator/qt-creator
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:
@@ -10,7 +10,6 @@ HEADERS += qmlproject.h \
|
||||
qmlprojectconstants.h \
|
||||
qmlprojectnodes.h \
|
||||
qmlprojectrunconfiguration.h \
|
||||
qmlprojectrunconfigurationfactory.h \
|
||||
qmlprojectmanager_global.h \
|
||||
qmlprojectmanagerconstants.h \
|
||||
qmlprojectrunconfigurationwidget.h
|
||||
@@ -20,7 +19,6 @@ SOURCES += qmlproject.cpp \
|
||||
qmlprojectplugin.cpp \
|
||||
qmlprojectnodes.cpp \
|
||||
qmlprojectrunconfiguration.cpp \
|
||||
qmlprojectrunconfigurationfactory.cpp \
|
||||
qmlprojectrunconfigurationwidget.cpp
|
||||
|
||||
RESOURCES += qmlproject.qrc
|
||||
|
@@ -23,7 +23,6 @@ QtcPlugin {
|
||||
"qmlprojectnodes.cpp", "qmlprojectnodes.h",
|
||||
"qmlprojectplugin.cpp", "qmlprojectplugin.h",
|
||||
"qmlprojectrunconfiguration.cpp", "qmlprojectrunconfiguration.h",
|
||||
"qmlprojectrunconfigurationfactory.cpp", "qmlprojectrunconfigurationfactory.h",
|
||||
"qmlprojectrunconfigurationwidget.cpp", "qmlprojectrunconfigurationwidget.h"
|
||||
]
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -86,4 +86,13 @@ private:
|
||||
QString m_qmlViewerArgs;
|
||||
};
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class QmlProjectRunConfigurationFactory : public ProjectExplorer::FixedRunConfigurationFactory
|
||||
{
|
||||
public:
|
||||
QmlProjectRunConfigurationFactory();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmlProjectManager
|
||||
|
Reference in New Issue
Block a user