Commit 03cf8c4b authored by Kai Koehne's avatar Kai Koehne

QmlProject: Rename QmlRunControl to QmlProjectRunControl

It's just easier if all the classes related with the QmlProject file format
start with the same prefix.
parent 0812e92d
......@@ -78,7 +78,7 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
addAutoReleasedObject(manager);
addAutoReleasedObject(new Internal::QmlProjectRunConfigurationFactory);
addAutoReleasedObject(new Internal::QmlRunControlFactory);
addAutoReleasedObject(new Internal::QmlProjectRunControlFactory);
addAutoReleasedObject(new QmlProjectApplicationWizard);
addAutoReleasedObject(new QmlProjectTargetFactory);
......
......@@ -66,7 +66,7 @@ using namespace ProjectExplorer;
namespace QmlProjectManager {
namespace Internal {
QmlRunControl::QmlRunControl(QmlProjectRunConfiguration *runConfiguration, QString mode)
QmlProjectRunControl::QmlProjectRunControl(QmlProjectRunConfiguration *runConfiguration, QString mode)
: RunControl(runConfiguration, mode)
{
m_applicationLauncher.setEnvironment(runConfiguration->environment());
......@@ -87,12 +87,12 @@ QmlRunControl::QmlRunControl(QmlProjectRunConfiguration *runConfiguration, QStri
this, SLOT(slotBringApplicationToForeground(qint64)));
}
QmlRunControl::~QmlRunControl()
QmlProjectRunControl::~QmlProjectRunControl()
{
stop();
}
void QmlRunControl::start()
void QmlProjectRunControl::start()
{
m_applicationLauncher.start(ApplicationLauncher::Gui, m_executable,
m_commandLineArguments);
......@@ -103,33 +103,33 @@ void QmlRunControl::start()
appendMessage(msg, Utils::NormalMessageFormat);
}
RunControl::StopResult QmlRunControl::stop()
RunControl::StopResult QmlProjectRunControl::stop()
{
m_applicationLauncher.stop();
return StoppedSynchronously;
}
bool QmlRunControl::isRunning() const
bool QmlProjectRunControl::isRunning() const
{
return m_applicationLauncher.isRunning();
}
QIcon QmlRunControl::icon() const
QIcon QmlProjectRunControl::icon() const
{
return QIcon(ProjectExplorer::Constants::ICON_RUN_SMALL);
}
void QmlRunControl::slotBringApplicationToForeground(qint64 pid)
void QmlProjectRunControl::slotBringApplicationToForeground(qint64 pid)
{
bringApplicationToForeground(pid);
}
void QmlRunControl::slotAppendMessage(const QString &line, Utils::OutputFormat format)
void QmlProjectRunControl::slotAppendMessage(const QString &line, Utils::OutputFormat format)
{
appendMessage(line, format);
}
void QmlRunControl::processExited(int exitCode)
void QmlProjectRunControl::processExited(int exitCode)
{
QString msg = tr("%1 exited with code %2\n")
.arg(QDir::toNativeSeparators(m_executable)).arg(exitCode);
......@@ -137,16 +137,16 @@ void QmlRunControl::processExited(int exitCode)
emit finished();
}
QmlRunControlFactory::QmlRunControlFactory(QObject *parent)
QmlProjectRunControlFactory::QmlProjectRunControlFactory(QObject *parent)
: IRunControlFactory(parent)
{
}
QmlRunControlFactory::~QmlRunControlFactory()
QmlProjectRunControlFactory::~QmlProjectRunControlFactory()
{
}
bool QmlRunControlFactory::canRun(RunConfiguration *runConfiguration,
bool QmlProjectRunControlFactory::canRun(RunConfiguration *runConfiguration,
const QString &mode) const
{
QmlProjectRunConfiguration *config =
......@@ -169,7 +169,7 @@ bool QmlRunControlFactory::canRun(RunConfiguration *runConfiguration,
return false;
}
RunControl *QmlRunControlFactory::create(RunConfiguration *runConfiguration,
RunControl *QmlProjectRunControlFactory::create(RunConfiguration *runConfiguration,
const QString &mode)
{
QTC_ASSERT(canRun(runConfiguration, mode), return 0);
......@@ -177,24 +177,24 @@ RunControl *QmlRunControlFactory::create(RunConfiguration *runConfiguration,
QmlProjectRunConfiguration *config = qobject_cast<QmlProjectRunConfiguration *>(runConfiguration);
RunControl *runControl = 0;
if (mode == ProjectExplorer::Constants::RUNMODE)
runControl = new QmlRunControl(config, mode);
runControl = new QmlProjectRunControl(config, mode);
else if (mode == Debugger::Constants::DEBUGMODE)
runControl = createDebugRunControl(config);
return runControl;
}
QString QmlRunControlFactory::displayName() const
QString QmlProjectRunControlFactory::displayName() const
{
return tr("Run");
}
ProjectExplorer::RunConfigWidget *QmlRunControlFactory::createConfigurationWidget(RunConfiguration *runConfiguration)
ProjectExplorer::RunConfigWidget *QmlProjectRunControlFactory::createConfigurationWidget(RunConfiguration *runConfiguration)
{
Q_UNUSED(runConfiguration)
return 0;
}
RunControl *QmlRunControlFactory::createDebugRunControl(QmlProjectRunConfiguration *runConfig)
RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConfiguration *runConfig)
{
Debugger::DebuggerStartParameters params;
params.startMode = Debugger::StartInternal;
......@@ -217,7 +217,7 @@ RunControl *QmlRunControlFactory::createDebugRunControl(QmlProjectRunConfigurati
return Debugger::DebuggerPlugin::createDebugger(params, runConfig);
}
void QmlRunControlFactory::showQmlObserverToolWarning()
void QmlProjectRunControlFactory::showQmlObserverToolWarning()
{
QMessageBox dialog(QApplication::activeWindow());
QPushButton *qtPref = dialog.addButton(tr("Open Qt4 Options"),
......
......@@ -42,12 +42,12 @@ class QmlProjectRunConfiguration;
namespace Internal {
class QmlRunControl : public ProjectExplorer::RunControl
class QmlProjectRunControl : public ProjectExplorer::RunControl
{
Q_OBJECT
public:
explicit QmlRunControl(QmlProjectRunConfiguration *runConfiguration, QString mode);
virtual ~QmlRunControl ();
explicit QmlProjectRunControl(QmlProjectRunConfiguration *runConfiguration, QString mode);
virtual ~QmlProjectRunControl ();
// RunControl
virtual void start();
......@@ -67,11 +67,11 @@ private:
QString m_commandLineArguments;
};
class QmlRunControlFactory : public ProjectExplorer::IRunControlFactory {
class QmlProjectRunControlFactory : public ProjectExplorer::IRunControlFactory {
Q_OBJECT
public:
explicit QmlRunControlFactory(QObject *parent = 0);
virtual ~QmlRunControlFactory();
explicit QmlProjectRunControlFactory(QObject *parent = 0);
virtual ~QmlProjectRunControlFactory();
// IRunControlFactory
virtual bool canRun(ProjectExplorer::RunConfiguration *runConfiguration, const QString &mode) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment