forked from qt-creator/qt-creator
ProjectExplorer: Use FilePath for CustomExecutableRC::executable
... and clean up #includes. Change-Id: Ia9c4c1d366b633e1cd017eabd07244891ab7ca57 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -25,32 +25,10 @@
|
|||||||
|
|
||||||
#include "customexecutablerunconfiguration.h"
|
#include "customexecutablerunconfiguration.h"
|
||||||
|
|
||||||
#include "abi.h"
|
|
||||||
#include "buildconfiguration.h"
|
|
||||||
#include "devicesupport/devicemanager.h"
|
#include "devicesupport/devicemanager.h"
|
||||||
#include "environmentaspect.h"
|
|
||||||
#include "localenvironmentaspect.h"
|
#include "localenvironmentaspect.h"
|
||||||
#include "project.h"
|
|
||||||
#include "runcontrol.h"
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
|
||||||
|
|
||||||
#include <utils/detailswidget.h>
|
|
||||||
#include <utils/pathchooser.h>
|
|
||||||
#include <utils/stringutils.h>
|
|
||||||
#include <utils/variablechooser.h>
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include <QDialogButtonBox>
|
|
||||||
#include <QDir>
|
|
||||||
#include <QFormLayout>
|
|
||||||
#include <QKeyEvent>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QLineEdit>
|
|
||||||
#include <QPushButton>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
@@ -86,9 +64,9 @@ CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *targe
|
|||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CustomExecutableRunConfiguration::rawExecutable() const
|
FilePath CustomExecutableRunConfiguration::executable() const
|
||||||
{
|
{
|
||||||
return aspect<ExecutableAspect>()->executable().toString();
|
return aspect<ExecutableAspect>()->executable();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CustomExecutableRunConfiguration::isEnabled() const
|
bool CustomExecutableRunConfiguration::isEnabled() const
|
||||||
@@ -116,16 +94,15 @@ Runnable CustomExecutableRunConfiguration::runnable() const
|
|||||||
|
|
||||||
QString CustomExecutableRunConfiguration::defaultDisplayName() const
|
QString CustomExecutableRunConfiguration::defaultDisplayName() const
|
||||||
{
|
{
|
||||||
if (rawExecutable().isEmpty())
|
if (executable().isEmpty())
|
||||||
return tr("Custom Executable");
|
return tr("Custom Executable");
|
||||||
else
|
return tr("Run %1").arg(executable().toUserOutput());
|
||||||
return tr("Run %1").arg(QDir::toNativeSeparators(rawExecutable()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Tasks CustomExecutableRunConfiguration::checkForIssues() const
|
Tasks CustomExecutableRunConfiguration::checkForIssues() const
|
||||||
{
|
{
|
||||||
Tasks tasks;
|
Tasks tasks;
|
||||||
if (rawExecutable().isEmpty()) {
|
if (executable().isEmpty()) {
|
||||||
tasks << createConfigurationIssue(tr("You need to set an executable in the custom run "
|
tasks << createConfigurationIssue(tr("You need to set an executable in the custom run "
|
||||||
"configuration."));
|
"configuration."));
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,7 @@ private:
|
|||||||
Tasks checkForIssues() const override;
|
Tasks checkForIssues() const override;
|
||||||
|
|
||||||
void configurationDialogFinished();
|
void configurationDialogFinished();
|
||||||
QString rawExecutable() const;
|
Utils::FilePath executable() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CustomExecutableRunConfigurationFactory : public FixedRunConfigurationFactory
|
class CustomExecutableRunConfigurationFactory : public FixedRunConfigurationFactory
|
||||||
|
Reference in New Issue
Block a user