Commit 7853297f authored by hjk's avatar hjk Committed by hjk

runconfig: consolidate createConfigurationWidget implementations

Most derived classes used essentially identical 'return 0;'
implementations. Use a base class implementation doing that instead.

Change-Id: I99727ac2230a5d9f168b4b0eb5927f8efff44e64
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent b2f6c722
......@@ -190,11 +190,5 @@ QString AndroidRunControlFactory::displayName() const
return tr("Run on Android device/emulator");
}
RunConfigWidget *AndroidRunControlFactory::createConfigurationWidget(RunConfiguration *config)
{
Q_UNUSED(config)
return 0;
}
} // namespace Internal
} // namespace Qt4ProjectManager
......@@ -80,7 +80,6 @@ public:
~AndroidRunControlFactory();
QString displayName() const;
RunConfigWidget *createConfigurationWidget(RunConfiguration *runConfiguration);
bool canRun(RunConfiguration *runConfiguration,
ProjectExplorer::RunMode mode) const;
......
......@@ -191,11 +191,5 @@ QString MaemoRunControlFactory::displayName() const
return tr("Run on device");
}
RunConfigWidget *MaemoRunControlFactory::createConfigurationWidget(RunConfiguration *config)
{
Q_UNUSED(config)
return 0;
}
} // namespace Internal
} // namespace Madde
......@@ -78,7 +78,6 @@ public:
~MaemoRunControlFactory();
QString displayName() const;
RunConfigWidget *createConfigurationWidget(RunConfiguration *runConfiguration);
bool canRun(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode) const;
RunControl *create(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode);
......
......@@ -73,12 +73,6 @@ RunControl *LocalApplicationRunControlFactory::create(RunConfiguration *runConfi
return new LocalApplicationRunControl(localRunConfiguration, mode);
}
RunConfigWidget *LocalApplicationRunControlFactory::createConfigurationWidget(RunConfiguration *runConfiguration)
{
Q_UNUSED(runConfiguration)
return 0;
}
// ApplicationRunControl
LocalApplicationRunControl::LocalApplicationRunControl(LocalApplicationRunConfiguration *rc, RunMode mode)
......
......@@ -51,7 +51,6 @@ public:
virtual bool canRun(RunConfiguration *runConfiguration, RunMode mode) const;
virtual QString displayName() const;
virtual RunControl* create(RunConfiguration *runConfiguration, RunMode mode);
virtual RunConfigWidget *createConfigurationWidget(RunConfiguration *runConfiguration);
};
class LocalApplicationRunControl : public RunControl
......
......@@ -574,6 +574,11 @@ IRunConfigurationAspect *IRunControlFactory::createRunConfigurationAspect()
return 0;
}
RunConfigWidget *IRunControlFactory::createConfigurationWidget(RunConfiguration *)
{
return 0;
}
/*!
\class ProjectExplorer::RunControl
\brief Each instance of this class represents one item that is run.
......
......@@ -235,7 +235,7 @@ public:
virtual QString displayName() const = 0;
virtual IRunConfigurationAspect *createRunConfigurationAspect();
virtual RunConfigWidget *createConfigurationWidget(RunConfiguration *runConfiguration) = 0;
virtual RunConfigWidget *createConfigurationWidget(RunConfiguration *runConfiguration);
};
class PROJECTEXPLORER_EXPORT RunConfigWidget
......
......@@ -196,12 +196,6 @@ QString QmlProjectRunControlFactory::displayName() const
return tr("Run");
}
ProjectExplorer::RunConfigWidget *QmlProjectRunControlFactory::createConfigurationWidget(RunConfiguration *runConfiguration)
{
Q_UNUSED(runConfiguration)
return 0;
}
RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConfiguration *runConfig)
{
Debugger::DebuggerStartParameters params;
......
......@@ -81,8 +81,6 @@ public:
virtual bool canRun(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode) const;
virtual ProjectExplorer::RunControl *create(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode);
virtual QString displayName() const;
virtual ProjectExplorer::RunConfigWidget *createConfigurationWidget(ProjectExplorer::RunConfiguration
*runConfiguration);
private:
ProjectExplorer::RunControl *createDebugRunControl(QmlProjectRunConfiguration *runConfig);
......
......@@ -246,8 +246,3 @@ QString S60DeviceDebugRunControlFactory::displayName() const
{
return S60DeviceDebugRunControl::tr("Debug on Device");
}
ProjectExplorer::RunConfigWidget *S60DeviceDebugRunControlFactory::createConfigurationWidget(RunConfiguration* /*runConfiguration */)
{
return 0;
}
......@@ -78,7 +78,6 @@ public:
ProjectExplorer::RunControl* create(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode);
QString displayName() const;
ProjectExplorer::RunConfigWidget *createConfigurationWidget(ProjectExplorer::RunConfiguration * /*runConfiguration */);
};
} // namespace Internal
......
......@@ -97,10 +97,6 @@ public:
return m_name;
}
ProjectExplorer::RunConfigWidget *createConfigurationWidget(ProjectExplorer::RunConfiguration *) {
return 0;
}
private:
const ProjectExplorer::RunMode m_mode;
const QString m_name;
......
......@@ -76,9 +76,3 @@ QString S60RunControlFactory::displayName() const
{
return m_name;
}
ProjectExplorer::RunConfigWidget *S60RunControlFactory::createConfigurationWidget(RunConfiguration *runConfiguration)
{
Q_UNUSED(runConfiguration);
return 0;
}
......@@ -53,8 +53,6 @@ public:
QString displayName() const;
ProjectExplorer::RunConfigWidget *createConfigurationWidget(ProjectExplorer::RunConfiguration *runConfiguration);
private:
const ProjectExplorer::RunMode m_mode;
const QString m_name;
......
......@@ -101,11 +101,5 @@ QString RemoteLinuxRunControlFactory::displayName() const
return tr("Run on remote Linux device");
}
RunConfigWidget *RemoteLinuxRunControlFactory::createConfigurationWidget(RunConfiguration *config)
{
Q_UNUSED(config)
return 0;
}
} // namespace Internal
} // namespace RemoteLinux
......@@ -44,7 +44,6 @@ public:
~RemoteLinuxRunControlFactory();
QString displayName() const;
ProjectExplorer::RunConfigWidget *createConfigurationWidget(ProjectExplorer::RunConfiguration *runConfiguration);
bool canRun(ProjectExplorer::RunConfiguration *runConfiguration,
ProjectExplorer::RunMode 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