Commit a32b69ac authored by hjk's avatar hjk
Browse files

Analyzer: Merge duplicated display name members



ProjectExplorer::RunControl::m_displayName exists, no need to
shadow it with Analyzer::AnalyzerRunControl::m_displayName

Change-Id: Iccbae658ca49c3fa2965a34a1bdf7c4a3bbd4073
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 6e28e7f0
......@@ -53,7 +53,7 @@ AnalyzerRunControl::AnalyzerRunControl(RunConfiguration *runConfiguration, Core:
setIcon(Icons::ANALYZER_CONTROL_START);
if (runConfiguration) {
m_displayName = runConfiguration->displayName();
setDisplayName(runConfiguration->displayName());
if (auto aspect = runConfiguration->extraAspect<WorkingDirectoryAspect>())
m_workingDirectory = aspect->workingDirectory().toString();
if (m_workingDirectory.isEmpty())
......@@ -118,16 +118,6 @@ bool AnalyzerRunControl::isRunning() const
return m_isRunning;
}
QString AnalyzerRunControl::displayName() const
{
return m_displayName;
}
void AnalyzerRunControl::setDisplayName(const QString &displayName)
{
m_displayName = displayName;
}
void AnalyzerRunControl::setWorkingDirectory(const QString &workingDirectory)
{
m_workingDirectory = workingDirectory;
......
......@@ -29,7 +29,6 @@
#include "analyzerstartparameters.h"
#include <projectexplorer/applicationlauncher.h>
#include <projectexplorer/runconfiguration.h>
#include <utils/outputformat.h>
......@@ -69,9 +68,7 @@ public:
void start();
StopResult stop();
bool isRunning() const;
QString displayName() const;
void setDisplayName(const QString &displayName);
QString workingDirectory() const;
void setWorkingDirectory(const QString &workingDirectory);
......@@ -93,7 +90,6 @@ protected:
bool m_isRunning;
private:
QString m_displayName; // Default to runConfig->displayName, unless overridden by setDisplayName
QString m_workingDirectory;
};
} // namespace Analyzer
......
......@@ -556,6 +556,11 @@ QString RunControl::displayName() const
return m_displayName;
}
void RunControl::setDisplayName(const QString &displayName)
{
m_displayName = displayName;
}
void RunControl::setIcon(const Utils::Icon &icon)
{
m_icon = icon;
......
......@@ -350,9 +350,11 @@ public:
virtual bool promptToStop(bool *optionalPrompt = 0) const;
virtual StopResult stop() = 0;
virtual bool isRunning() const = 0;
virtual QString displayName() const;
virtual bool supportsReRunning() const { return true; }
virtual QString displayName() const;
void setDisplayName(const QString &displayName);
void setIcon(const Utils::Icon &icon);
Utils::Icon icon() const;
......
Supports Markdown
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