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