summaryrefslogtreecommitdiff
path: root/src/plugins/qtsupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qtsupport')
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp8
-rw-r--r--src/plugins/qtsupport/customexecutableconfigurationwidget.cpp217
-rw-r--r--src/plugins/qtsupport/customexecutableconfigurationwidget.h93
-rw-r--r--src/plugins/qtsupport/customexecutablerunconfiguration.cpp424
-rw-r--r--src/plugins/qtsupport/customexecutablerunconfiguration.h155
-rw-r--r--src/plugins/qtsupport/debugginghelper.cpp122
-rw-r--r--src/plugins/qtsupport/debugginghelper.h61
-rw-r--r--src/plugins/qtsupport/debugginghelperbuildtask.cpp2
-rw-r--r--src/plugins/qtsupport/qtsupport.pro6
-rw-r--r--src/plugins/qtsupport/qtsupport.qbs6
-rw-r--r--src/plugins/qtsupport/qtsupportplugin.cpp3
-rw-r--r--src/plugins/qtsupport/qtversionmanager.cpp6
12 files changed, 1094 insertions, 9 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index c496fe9bbc..bfff9efcf2 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -39,11 +39,11 @@
#include "profilereader.h"
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/toolchain.h>
-#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/gnumakeparser.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchainmanager.h>
+#include <qtsupport/debugginghelper.h>
#include <qtsupport/qtsupportconstants.h>
#include <utils/persistentsettings.h>
@@ -795,7 +795,7 @@ void BaseQtVersion::updateVersionInfo() const
const QString qtInstallBins = m_versionInfo.value(installBinsKey);
const QString qtHeaderData = m_versionInfo.value(installHeadersKey);
if (!qtInstallData.isEmpty()) {
- m_hasDebuggingHelper = !ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData).isEmpty();
+ m_hasDebuggingHelper = !QtSupport::DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData).isEmpty();
m_hasQmlDump
= !QmlDumpTool::toolForQtPaths(qtInstallData, qtInstallBins, qtHeaderData, false).isEmpty()
|| !QmlDumpTool::toolForQtPaths(qtInstallData, qtInstallBins, qtHeaderData, true).isEmpty();
@@ -964,7 +964,7 @@ QString BaseQtVersion::gdbDebuggingHelperLibrary() const
QString qtInstallData = versionInfo().value(QLatin1String("QT_INSTALL_DATA"));
if (qtInstallData.isEmpty())
return QString();
- return ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
+ return QtSupport::DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
}
QString BaseQtVersion::qmlDumpTool(bool debugVersion) const
@@ -998,7 +998,7 @@ QStringList BaseQtVersion::debuggingHelperLibraryLocations() const
QString qtInstallData = versionInfo().value(QLatin1String("QT_INSTALL_DATA"));
if (qtInstallData.isEmpty())
return QStringList();
- return ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
+ return QtSupport::DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
}
bool BaseQtVersion::supportsBinaryDebuggingHelper() const
diff --git a/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp b/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp
new file mode 100644
index 0000000000..c907a8d4ec
--- /dev/null
+++ b/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp
@@ -0,0 +1,217 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#include "customexecutableconfigurationwidget.h"
+#include "customexecutablerunconfiguration.h"
+
+#include <projectexplorer/target.h>
+#include <projectexplorer/project.h>
+#include <projectexplorer/environmentwidget.h>
+#include <coreplugin/helpmanager.h>
+#include <utils/detailswidget.h>
+#include <utils/environment.h>
+#include <utils/pathchooser.h>
+
+#include <QCheckBox>
+#include <QComboBox>
+#include <QFormLayout>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+
+
+namespace QtSupport {
+namespace Internal {
+
+CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc)
+ : m_ignoreChange(false), m_runConfiguration(rc)
+{
+ QFormLayout *layout = new QFormLayout;
+ layout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
+ layout->setMargin(0);
+
+ m_executableChooser = new Utils::PathChooser(this);
+ m_executableChooser->setExpectedKind(Utils::PathChooser::Command);
+ m_executableChooser->setEnvironment(rc->environment());
+ layout->addRow(tr("Executable:"), m_executableChooser);
+
+ m_commandLineArgumentsLineEdit = new QLineEdit(this);
+ m_commandLineArgumentsLineEdit->setMinimumWidth(200); // this shouldn't be fixed here...
+ layout->addRow(tr("Arguments:"), m_commandLineArgumentsLineEdit);
+
+ m_workingDirectory = new Utils::PathChooser(this);
+ m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory);
+ m_workingDirectory->setBaseDirectory(rc->target()->project()->projectDirectory());
+ m_workingDirectory->setEnvironment(rc->environment());
+ layout->addRow(tr("Working directory:"), m_workingDirectory);
+
+ m_useTerminalCheck = new QCheckBox(tr("Run in &terminal"), this);
+ layout->addRow(QString(), m_useTerminalCheck);
+
+ QVBoxLayout *vbox = new QVBoxLayout(this);
+ vbox->setMargin(0);
+
+ m_detailsContainer = new Utils::DetailsWidget(this);
+ m_detailsContainer->setState(Utils::DetailsWidget::NoSummary);
+ vbox->addWidget(m_detailsContainer);
+
+ QWidget *detailsWidget = new QWidget(m_detailsContainer);
+ m_detailsContainer->setWidget(detailsWidget);
+ detailsWidget->setLayout(layout);
+
+ QLabel *environmentLabel = new QLabel(this);
+ environmentLabel->setText(tr("Run Environment"));
+ QFont f = environmentLabel->font();
+ f.setBold(true);
+ f.setPointSizeF(f.pointSizeF() *1.2);
+ environmentLabel->setFont(f);
+ vbox->addWidget(environmentLabel);
+
+ QWidget *baseEnvironmentWidget = new QWidget;
+ QHBoxLayout *baseEnvironmentLayout = new QHBoxLayout(baseEnvironmentWidget);
+ baseEnvironmentLayout->setMargin(0);
+ QLabel *label = new QLabel(tr("Base environment for this run configuration:"), this);
+ baseEnvironmentLayout->addWidget(label);
+ m_baseEnvironmentComboBox = new QComboBox(this);
+ m_baseEnvironmentComboBox->addItems(QStringList()
+ << tr("Clean Environment")
+ << tr("System Environment")
+ << tr("Build Environment"));
+ m_baseEnvironmentComboBox->setCurrentIndex(rc->baseEnvironmentBase());
+ connect(m_baseEnvironmentComboBox, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(baseEnvironmentSelected(int)));
+ baseEnvironmentLayout->addWidget(m_baseEnvironmentComboBox);
+ baseEnvironmentLayout->addStretch(10);
+
+ m_environmentWidget = new ProjectExplorer::EnvironmentWidget(this, baseEnvironmentWidget);
+ m_environmentWidget->setBaseEnvironment(rc->baseEnvironment());
+ m_environmentWidget->setBaseEnvironmentText(rc->baseEnvironmentText());
+ m_environmentWidget->setUserChanges(rc->userEnvironmentChanges());
+ vbox->addWidget(m_environmentWidget);
+
+ changed();
+
+ connect(m_executableChooser, SIGNAL(changed(QString)),
+ this, SLOT(executableEdited()));
+ connect(m_commandLineArgumentsLineEdit, SIGNAL(textEdited(QString)),
+ this, SLOT(argumentsEdited(QString)));
+ connect(m_workingDirectory, SIGNAL(changed(QString)),
+ this, SLOT(workingDirectoryEdited()));
+ connect(m_useTerminalCheck, SIGNAL(toggled(bool)),
+ this, SLOT(termToggled(bool)));
+
+ connect(m_runConfiguration, SIGNAL(changed()), this, SLOT(changed()));
+
+ connect(m_environmentWidget, SIGNAL(userChangesChanged()),
+ this, SLOT(userChangesChanged()));
+
+ connect(m_runConfiguration, SIGNAL(baseEnvironmentChanged()),
+ this, SLOT(baseEnvironmentChanged()));
+ connect(m_runConfiguration, SIGNAL(userEnvironmentChangesChanged(QList<Utils::EnvironmentItem>)),
+ this, SLOT(userEnvironmentChangesChanged()));
+}
+
+void CustomExecutableConfigurationWidget::userChangesChanged()
+{
+ m_runConfiguration->setUserEnvironmentChanges(m_environmentWidget->userChanges());
+}
+
+void CustomExecutableConfigurationWidget::baseEnvironmentSelected(int index)
+{
+ m_ignoreChange = true;
+ m_runConfiguration->setBaseEnvironmentBase(CustomExecutableRunConfiguration::BaseEnvironmentBase(index));
+
+ m_environmentWidget->setBaseEnvironment(m_runConfiguration->baseEnvironment());
+ m_environmentWidget->setBaseEnvironmentText(m_runConfiguration->baseEnvironmentText());
+ m_ignoreChange = false;
+}
+
+void CustomExecutableConfigurationWidget::baseEnvironmentChanged()
+{
+ if (m_ignoreChange)
+ return;
+
+ int index = CustomExecutableRunConfiguration::BaseEnvironmentBase(
+ m_runConfiguration->baseEnvironmentBase());
+ m_baseEnvironmentComboBox->setCurrentIndex(index);
+ m_environmentWidget->setBaseEnvironment(m_runConfiguration->baseEnvironment());
+ m_environmentWidget->setBaseEnvironmentText(m_runConfiguration->baseEnvironmentText());
+}
+
+void CustomExecutableConfigurationWidget::userEnvironmentChangesChanged()
+{
+ m_environmentWidget->setUserChanges(m_runConfiguration->userEnvironmentChanges());
+}
+
+
+void CustomExecutableConfigurationWidget::executableEdited()
+{
+ m_ignoreChange = true;
+ m_runConfiguration->setExecutable(m_executableChooser->rawPath());
+ m_ignoreChange = false;
+}
+void CustomExecutableConfigurationWidget::argumentsEdited(const QString &arguments)
+{
+ m_ignoreChange = true;
+ m_runConfiguration->setCommandLineArguments(arguments);
+ m_ignoreChange = false;
+}
+void CustomExecutableConfigurationWidget::workingDirectoryEdited()
+{
+ m_ignoreChange = true;
+ m_runConfiguration->setBaseWorkingDirectory(m_workingDirectory->rawPath());
+ m_ignoreChange = false;
+}
+
+void CustomExecutableConfigurationWidget::termToggled(bool on)
+{
+ m_ignoreChange = true;
+ m_runConfiguration->setRunMode(on ? ProjectExplorer::LocalApplicationRunConfiguration::Console
+ : ProjectExplorer::LocalApplicationRunConfiguration::Gui);
+ m_ignoreChange = false;
+}
+
+void CustomExecutableConfigurationWidget::changed()
+{
+ // We triggered the change, don't update us
+ if (m_ignoreChange)
+ return;
+
+ m_executableChooser->setPath(m_runConfiguration->rawExecutable());
+ m_commandLineArgumentsLineEdit->setText(m_runConfiguration->rawCommandLineArguments());
+ m_workingDirectory->setPath(m_runConfiguration->baseWorkingDirectory());
+ m_useTerminalCheck->setChecked(m_runConfiguration->runMode()
+ == ProjectExplorer::LocalApplicationRunConfiguration::Console);
+}
+
+} // namespace Internal
+} // namespace QtSupport
diff --git a/src/plugins/qtsupport/customexecutableconfigurationwidget.h b/src/plugins/qtsupport/customexecutableconfigurationwidget.h
new file mode 100644
index 0000000000..95faf74543
--- /dev/null
+++ b/src/plugins/qtsupport/customexecutableconfigurationwidget.h
@@ -0,0 +1,93 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#ifndef CUSTOMEXECUTABLECONFIGURATIONWIDGET_H
+#define CUSTOMEXECUTABLECONFIGURATIONWIDGET_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QLineEdit;
+class QComboBox;
+class QLabel;
+class QAbstractButton;
+QT_END_NAMESPACE
+
+namespace Utils {
+class DetailsWidget;
+class PathChooser;
+}
+
+namespace ProjectExplorer { class EnvironmentWidget; }
+namespace QtSupport {
+class CustomExecutableRunConfiguration;
+
+namespace Internal {
+
+class CustomExecutableConfigurationWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc);
+
+private slots:
+ void changed();
+
+ void executableEdited();
+ void argumentsEdited(const QString &arguments);
+ void workingDirectoryEdited();
+ void termToggled(bool);
+
+ void userChangesChanged();
+ void baseEnvironmentChanged();
+ void userEnvironmentChangesChanged();
+ void baseEnvironmentSelected(int index);
+
+private:
+ bool m_ignoreChange;
+ CustomExecutableRunConfiguration *m_runConfiguration;
+ Utils::PathChooser *m_executableChooser;
+ QLineEdit *m_userName;
+ QLineEdit *m_commandLineArgumentsLineEdit;
+ Utils::PathChooser *m_workingDirectory;
+ QCheckBox *m_useTerminalCheck;
+ ProjectExplorer::EnvironmentWidget *m_environmentWidget;
+ QComboBox *m_baseEnvironmentComboBox;
+ Utils::DetailsWidget *m_detailsContainer;
+};
+
+} // namespace Internal
+} // namespace QtSupport
+
+#endif // CUSTOMEXECUTABLECONFIGURATIONWIDGET_H
diff --git a/src/plugins/qtsupport/customexecutablerunconfiguration.cpp b/src/plugins/qtsupport/customexecutablerunconfiguration.cpp
new file mode 100644
index 0000000000..ddd678155c
--- /dev/null
+++ b/src/plugins/qtsupport/customexecutablerunconfiguration.cpp
@@ -0,0 +1,424 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#include "customexecutablerunconfiguration.h"
+#include "customexecutableconfigurationwidget.h"
+#include "debugginghelper.h"
+
+#include <projectexplorer/buildconfiguration.h>
+#include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/target.h>
+#include <projectexplorer/abi.h>
+
+#include <coreplugin/icore.h>
+
+#include <utils/qtcprocess.h>
+#include <utils/stringutils.h>
+
+#include <QDialog>
+#include <QDialogButtonBox>
+#include <QLabel>
+#include <QMainWindow>
+#include <QVBoxLayout>
+
+#include <QDir>
+
+using namespace QtSupport;
+using namespace QtSupport::Internal;
+
+namespace {
+const char * const CUSTOM_EXECUTABLE_ID("ProjectExplorer.CustomExecutableRunConfiguration");
+
+const char * const EXECUTABLE_KEY("ProjectExplorer.CustomExecutableRunConfiguration.Executable");
+const char * const ARGUMENTS_KEY("ProjectExplorer.CustomExecutableRunConfiguration.Arguments");
+const char * const WORKING_DIRECTORY_KEY("ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory");
+const char * const USE_TERMINAL_KEY("ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal");
+const char * const USER_ENVIRONMENT_CHANGES_KEY("ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges");
+const char * const BASE_ENVIRONMENT_BASE_KEY("ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase");
+}
+
+void CustomExecutableRunConfiguration::ctor()
+{
+ setDefaultDisplayName(defaultDisplayName());
+
+ connect(target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
+ this, SLOT(activeBuildConfigurationChanged()));
+
+ m_lastActiveBuildConfiguration = activeBuildConfiguration();
+
+ if (m_lastActiveBuildConfiguration) {
+ connect(m_lastActiveBuildConfiguration, SIGNAL(environmentChanged()),
+ this, SIGNAL(baseEnvironmentChanged()));
+ }
+}
+
+CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(ProjectExplorer::Target *parent) :
+ ProjectExplorer::LocalApplicationRunConfiguration(parent, Core::Id(CUSTOM_EXECUTABLE_ID)),
+ m_workingDirectory(QLatin1String(ProjectExplorer::Constants::DEFAULT_WORKING_DIR)),
+ m_runMode(Gui),
+ m_baseEnvironmentBase(CustomExecutableRunConfiguration::BuildEnvironmentBase)
+{
+ ctor();
+}
+
+CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(ProjectExplorer::Target *parent,
+ CustomExecutableRunConfiguration *source) :
+ ProjectExplorer::LocalApplicationRunConfiguration(parent, source),
+ m_executable(source->m_executable),
+ m_workingDirectory(source->m_workingDirectory),
+ m_cmdArguments(source->m_cmdArguments),
+ m_runMode(source->m_runMode),
+ m_userEnvironmentChanges(source->m_userEnvironmentChanges),
+ m_baseEnvironmentBase(source->m_baseEnvironmentBase)
+{
+ ctor();
+}
+
+// Note: Qt4Project deletes all empty customexecrunconfigs for which isConfigured() == false.
+CustomExecutableRunConfiguration::~CustomExecutableRunConfiguration()
+{
+}
+
+void CustomExecutableRunConfiguration::activeBuildConfigurationChanged()
+{
+ if (m_lastActiveBuildConfiguration) {
+ disconnect(m_lastActiveBuildConfiguration, SIGNAL(environmentChanged()),
+ this, SIGNAL(baseEnvironmentChanged()));
+ }
+ m_lastActiveBuildConfiguration = activeBuildConfiguration();
+ if (m_lastActiveBuildConfiguration) {
+ connect(m_lastActiveBuildConfiguration, SIGNAL(environmentChanged()),
+ this, SIGNAL(baseEnvironmentChanged()));
+ }
+}
+
+QString CustomExecutableRunConfiguration::executable() const
+{
+ Utils::Environment env = environment();
+ QString exec = env.searchInPath(Utils::expandMacros(m_executable, macroExpander()),
+ QStringList() << workingDirectory());
+
+ if (exec.isEmpty() || !QFileInfo(exec).exists()) {
+ // Oh the executable doesn't exists, ask the user.
+ CustomExecutableRunConfiguration *that = const_cast<CustomExecutableRunConfiguration *>(this);
+ QWidget *confWidget = that->createConfigurationWidget();
+ confWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ QDialog dialog(Core::ICore::mainWindow());
+ dialog.setWindowTitle(displayName());
+ dialog.setWindowFlags(dialog.windowFlags() & ~Qt::WindowContextHelpButtonHint);
+ dialog.setLayout(new QVBoxLayout());
+ QLabel *label = new QLabel(tr("Could not find the executable, please specify one."));
+ label->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ dialog.layout()->addWidget(label);
+ dialog.layout()->addWidget(confWidget);
+ QDialogButtonBox *dbb = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ connect(dbb, SIGNAL(accepted()), &dialog, SLOT(accept()));
+ connect(dbb, SIGNAL(rejected()), &dialog, SLOT(reject()));
+ dialog.layout()->addWidget(dbb);
+ dialog.layout()->setSizeConstraint(QLayout::SetMinAndMaxSize);
+
+ QString oldExecutable = m_executable;
+ QString oldWorkingDirectory = m_workingDirectory;
+ QString oldCmdArguments = m_cmdArguments;
+
+ if (dialog.exec() == QDialog::Accepted) {
+ return executable();
+ } else {
+ // Restore values changed by the configuration widget.
+ if (that->m_executable != oldExecutable
+ || that->m_workingDirectory != oldWorkingDirectory
+ || that->m_cmdArguments != oldCmdArguments) {
+ that->m_executable = oldExecutable;
+ that->m_workingDirectory = oldWorkingDirectory;
+ that->m_cmdArguments = oldCmdArguments;
+ emit that->changed();
+ }
+ return QString();
+ }
+ }
+ return QDir::cleanPath(exec);
+}
+
+QString CustomExecutableRunConfiguration::rawExecutable() const
+{
+ return m_executable;
+}
+
+bool CustomExecutableRunConfiguration::isConfigured() const
+{
+ return !m_executable.isEmpty();
+}
+
+ProjectExplorer::LocalApplicationRunConfiguration::RunMode CustomExecutableRunConfiguration::runMode() const
+{
+ return m_runMode;
+}
+
+QString CustomExecutableRunConfiguration::workingDirectory() const
+{
+ return QDir::cleanPath(environment().expandVariables(
+ Utils::expandMacros(baseWorkingDirectory(), macroExpander())));
+}
+
+QString CustomExecutableRunConfiguration::baseWorkingDirectory() const
+{
+ return m_workingDirectory;
+}
+
+
+QString CustomExecutableRunConfiguration::commandLineArguments() const
+{
+ return Utils::QtcProcess::expandMacros(m_cmdArguments, macroExpander());
+}
+
+QString CustomExecutableRunConfiguration::rawCommandLineArguments() const
+{
+ return m_cmdArguments;
+}
+
+QString CustomExecutableRunConfiguration::baseEnvironmentText() const
+{
+ if (m_baseEnvironmentBase == CustomExecutableRunConfiguration::CleanEnvironmentBase) {
+ return tr("Clean Environment");
+ } else if (m_baseEnvironmentBase == CustomExecutableRunConfiguration::SystemEnvironmentBase) {
+ return tr("System Environment");
+ } else if (m_baseEnvironmentBase == CustomExecutableRunConfiguration::BuildEnvironmentBase) {
+ return tr("Build Environment");
+ }
+ return QString();
+}
+
+Utils::Environment CustomExecutableRunConfiguration::baseEnvironment() const
+{
+ Utils::Environment env;
+ if (m_baseEnvironmentBase == CustomExecutableRunConfiguration::CleanEnvironmentBase) {
+ // Nothing
+ } else if (m_baseEnvironmentBase == CustomExecutableRunConfiguration::SystemEnvironmentBase) {
+ env = Utils::Environment::systemEnvironment();
+ } else if (m_baseEnvironmentBase == CustomExecutableRunConfiguration::BuildEnvironmentBase) {
+ if (activeBuildConfiguration())
+ env = activeBuildConfiguration()->environment();
+ }
+ return env;
+}
+
+void CustomExecutableRunConfiguration::setBaseEnvironmentBase(BaseEnvironmentBase env)
+{
+ if (m_baseEnvironmentBase == env)
+ return;
+ m_baseEnvironmentBase = env;
+ emit baseEnvironmentChanged();
+}
+
+CustomExecutableRunConfiguration::BaseEnvironmentBase CustomExecutableRunConfiguration::baseEnvironmentBase() const
+{
+ return m_baseEnvironmentBase;
+}
+
+Utils::Environment CustomExecutableRunConfiguration::environment() const
+{
+ Utils::Environment env = baseEnvironment();
+ env.modify(userEnvironmentChanges());
+ return env;
+}
+
+QList<Utils::EnvironmentItem> CustomExecutableRunConfiguration::userEnvironmentChanges() const
+{
+ return m_userEnvironmentChanges;
+}
+
+void CustomExecutableRunConfiguration::setUserEnvironmentChanges(const QList<Utils::EnvironmentItem> &diff)
+{
+ if (m_userEnvironmentChanges != diff) {
+ m_userEnvironmentChanges = diff;
+ emit userEnvironmentChangesChanged(diff);
+ }
+}
+
+QString CustomExecutableRunConfiguration::defaultDisplayName() const
+{
+ if (m_executable.isEmpty())
+ return tr("Custom Executable");
+ else
+ return tr("Run %1").arg(QDir::toNativeSeparators(m_executable));
+}
+
+QVariantMap CustomExecutableRunConfiguration::toMap() const
+{
+ QVariantMap map(LocalApplicationRunConfiguration::toMap());
+ map.insert(QLatin1String(EXECUTABLE_KEY), m_executable);
+ map.insert(QLatin1String(ARGUMENTS_KEY), m_cmdArguments);
+ map.insert(QLatin1String(WORKING_DIRECTORY_KEY), m_workingDirectory);
+ map.insert(QLatin1String(USE_TERMINAL_KEY), m_runMode == Console);
+ map.insert(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY), Utils::EnvironmentItem::toStringList(m_userEnvironmentChanges));
+ map.insert(QLatin1String(BASE_ENVIRONMENT_BASE_KEY), static_cast<int>(m_baseEnvironmentBase));
+ return map;
+}
+
+bool CustomExecutableRunConfiguration::fromMap(const QVariantMap &map)
+{
+ m_executable = map.value(QLatin1String(EXECUTABLE_KEY)).toString();
+ m_cmdArguments = map.value(QLatin1String(ARGUMENTS_KEY)).toString();
+ m_workingDirectory = map.value(QLatin1String(WORKING_DIRECTORY_KEY)).toString();
+ m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY)).toBool() ? Console : Gui;
+ m_userEnvironmentChanges = Utils::EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
+ m_baseEnvironmentBase = static_cast<BaseEnvironmentBase>(map.value(QLatin1String(BASE_ENVIRONMENT_BASE_KEY), static_cast<int>(CustomExecutableRunConfiguration::BuildEnvironmentBase)).toInt());
+
+ setDefaultDisplayName(defaultDisplayName());
+ return LocalApplicationRunConfiguration::fromMap(map);
+}
+
+void CustomExecutableRunConfiguration::setExecutable(const QString &executable)
+{
+ if (executable == m_executable)
+ return;
+ m_executable = executable;
+ setDefaultDisplayName(defaultDisplayName());
+ emit changed();
+}
+
+void CustomExecutableRunConfiguration::setCommandLineArguments(const QString &commandLineArguments)
+{
+ m_cmdArguments = commandLineArguments;
+ emit changed();
+}
+
+void CustomExecutableRunConfiguration::setBaseWorkingDirectory(const QString &workingDirectory)
+{
+ m_workingDirectory = workingDirectory;
+ emit changed();
+}
+
+void CustomExecutableRunConfiguration::setRunMode(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode)
+{
+ m_runMode = runMode;
+ emit changed();
+}
+
+QWidget *CustomExecutableRunConfiguration::createConfigurationWidget()
+{
+ return new CustomExecutableConfigurationWidget(this);
+}
+
+QString CustomExecutableRunConfiguration::dumperLibrary() const
+{
+ Utils::FileName qmakePath = DebuggingHelperLibrary::findSystemQt(environment());
+ QString qtInstallData = DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
+ return DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
+}
+
+QStringList CustomExecutableRunConfiguration::dumperLibraryLocations() const
+{
+ Utils::FileName qmakePath = DebuggingHelperLibrary::findSystemQt(environment());
+ QString qtInstallData = DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
+ return DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
+}
+
+ProjectExplorer::Abi CustomExecutableRunConfiguration::abi() const
+{
+ return ProjectExplorer::Abi(); // return an invalid ABI: We do not know what we will end up running!
+}
+
+// Factory
+
+CustomExecutableRunConfigurationFactory::CustomExecutableRunConfigurationFactory(QObject *parent) :
+ ProjectExplorer::IRunConfigurationFactory(parent)
+{
+}
+
+CustomExecutableRunConfigurationFactory::~CustomExecutableRunConfigurationFactory()
+{
+
+}
+
+bool CustomExecutableRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent,
+ const Core::Id id) const
+{
+ Q_UNUSED(parent);
+ return id == Core::Id(CUSTOM_EXECUTABLE_ID);
+}
+
+ProjectExplorer::RunConfiguration *
+CustomExecutableRunConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
+{
+ if (!canCreate(parent, id))
+ return 0;
+
+ return new CustomExecutableRunConfiguration(parent);
+}
+
+bool CustomExecutableRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent,
+ const QVariantMap &map) const
+{
+ Core::Id id(ProjectExplorer::idFromMap(map));
+ return canCreate(parent, id);
+}
+
+ProjectExplorer::RunConfiguration *
+CustomExecutableRunConfigurationFactory::restore(ProjectExplorer::Target *parent, const QVariantMap &map)
+{
+ if (!canRestore(parent, map))
+ return 0;
+ CustomExecutableRunConfiguration *rc(new CustomExecutableRunConfiguration(parent));
+ if (rc->fromMap(map))
+ return rc;
+ delete rc;
+ return 0;
+}
+
+bool CustomExecutableRunConfigurationFactory::canClone(ProjectExplorer::Target *parent,
+ ProjectExplorer::RunConfiguration *source) const
+{
+ return canCreate(parent, source->id());
+}
+
+ProjectExplorer::RunConfiguration *
+CustomExecutableRunConfigurationFactory::clone(ProjectExplorer::Target *parent,
+ ProjectExplorer::RunConfiguration *source)
+{
+ if (!canClone(parent, source))
+ return 0;
+ return new CustomExecutableRunConfiguration(parent, static_cast<CustomExecutableRunConfiguration*>(source));
+}
+
+QList<Core::Id> CustomExecutableRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
+{
+ Q_UNUSED(parent)
+ return QList<Core::Id>() << Core::Id(CUSTOM_EXECUTABLE_ID);
+}
+
+QString CustomExecutableRunConfigurationFactory::displayNameForId(const Core::Id id) const
+{
+ if (id == Core::Id(CUSTOM_EXECUTABLE_ID))
+ return tr("Custom Executable");
+ return QString();
+}
diff --git a/src/plugins/qtsupport/customexecutablerunconfiguration.h b/src/plugins/qtsupport/customexecutablerunconfiguration.h
new file mode 100644
index 0000000000..17542ba38b
--- /dev/null
+++ b/src/plugins/qtsupport/customexecutablerunconfiguration.h
@@ -0,0 +1,155 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#ifndef CUSTOMEXECUTABLERUNCONFIGURATION_H
+#define CUSTOMEXECUTABLERUNCONFIGURATION_H
+
+#include "qtsupport_global.h"
+
+#include <projectexplorer/applicationrunconfiguration.h>
+
+#include <utils/environment.h>
+
+#include <QVariantMap>
+
+namespace ProjectExplorer { class Target; }
+
+namespace QtSupport {
+namespace Internal { class CustomExecutableConfigurationWidget; }
+
+class CustomExecutableRunConfigurationFactory;
+
+class QTSUPPORT_EXPORT CustomExecutableRunConfiguration : public ProjectExplorer::LocalApplicationRunConfiguration
+{
+ Q_OBJECT
+ // the configuration widget needs to setExecutable setWorkingDirectory and setCommandLineArguments
+ friend class Internal::CustomExecutableConfigurationWidget;
+ friend class CustomExecutableRunConfigurationFactory;
+
+public:
+ explicit CustomExecutableRunConfiguration(ProjectExplorer::Target *parent);
+ ~CustomExecutableRunConfiguration();
+
+ /**
+ * Returns the executable, looks in the environment for it and might even
+ * ask the user if none is specified
+ */
+ QString executable() const;
+
+ /** Returns whether this runconfiguration ever was configured with a executable
+ */
+ bool isConfigured() const;
+
+ RunMode runMode() const;
+ QString workingDirectory() const;
+ QString commandLineArguments() const;
+ Utils::Environment environment() const;
+
+ QWidget *createConfigurationWidget();
+ QString dumperLibrary() const;
+ QStringList dumperLibraryLocations() const;
+
+ ProjectExplorer::Abi abi() const;
+
+ QVariantMap toMap() const;
+
+signals:
+ void changed();
+
+ void baseEnvironmentChanged();
+ void userEnvironmentChangesChanged(const QList<Utils::EnvironmentItem> &diff);
+
+private slots:
+ void activeBuildConfigurationChanged();
+
+protected:
+ CustomExecutableRunConfiguration(ProjectExplorer::Target *parent,
+ CustomExecutableRunConfiguration *source);
+ virtual bool fromMap(const QVariantMap &map);
+ QString defaultDisplayName() const;
+
+private:
+ void ctor();
+
+ enum BaseEnvironmentBase { CleanEnvironmentBase = 0,
+ SystemEnvironmentBase = 1,
+ BuildEnvironmentBase = 2};
+ void setBaseEnvironmentBase(BaseEnvironmentBase env);
+ BaseEnvironmentBase baseEnvironmentBase() const;
+ Utils::Environment baseEnvironment() const;
+ QString baseEnvironmentText() const;
+ void setUserEnvironmentChanges(const QList<Utils::EnvironmentItem> &diff);
+ QList<Utils::EnvironmentItem> userEnvironmentChanges() const;
+
+ void setExecutable(const QString &executable);
+ QString rawExecutable() const;
+ void setCommandLineArguments(const QString &commandLineArguments);
+ QString rawCommandLineArguments() const;
+ void setBaseWorkingDirectory(const QString &workingDirectory);
+ QString baseWorkingDirectory() const;
+ void setUserName(const QString &name);
+ void setRunMode(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode);
+
+ QString m_executable;
+ QString m_workingDirectory;
+ QString m_cmdArguments;
+ RunMode m_runMode;
+ bool m_userSetName;
+ QString m_userName;
+ QList<Utils::EnvironmentItem> m_userEnvironmentChanges;
+ BaseEnvironmentBase m_baseEnvironmentBase;
+ ProjectExplorer::BuildConfiguration *m_lastActiveBuildConfiguration;
+};
+
+class CustomExecutableRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory
+{
+ Q_OBJECT
+
+public:
+ explicit CustomExecutableRunConfigurationFactory(QObject *parent = 0);
+ ~CustomExecutableRunConfigurationFactory();
+
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
+
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
+ bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
+ ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
+ bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *product) const;
+ ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent,
+ ProjectExplorer::RunConfiguration *source);
+};
+
+} // namespace QtSupport
+
+#endif // CUSTOMEXECUTABLERUNCONFIGURATION_H
diff --git a/src/plugins/qtsupport/debugginghelper.cpp b/src/plugins/qtsupport/debugginghelper.cpp
new file mode 100644
index 0000000000..250e755708
--- /dev/null
+++ b/src/plugins/qtsupport/debugginghelper.cpp
@@ -0,0 +1,122 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#include "debugginghelper.h"
+
+#include <coreplugin/icore.h>
+
+#include <utils/synchronousprocess.h>
+
+#include <QFileInfo>
+#include <QCoreApplication>
+#include <QHash>
+#include <QProcess>
+#include <QDir>
+#include <QDateTime>
+#include <QStringList>
+
+#include <QDesktopServices>
+
+using namespace QtSupport;
+
+static inline QStringList validBinaryFilenames()
+{
+ return QStringList()
+ << QLatin1String("debug/dumper.dll")
+ << QLatin1String("libdumper.dylib")
+ << QLatin1String("libdumper.so");
+}
+
+QStringList DebuggingHelperLibrary::debuggingHelperLibraryDirectories(const QString &qtInstallData)
+{
+ const QChar slash = QLatin1Char('/');
+ const uint hash = qHash(qtInstallData);
+ QStringList directories;
+ directories
+ << (qtInstallData + QLatin1String("/qtc-debugging-helper/"))
+ << QDir::cleanPath((QCoreApplication::applicationDirPath() + QLatin1String("/../qtc-debugging-helper/") + QString::number(hash))) + slash
+ << (QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QLatin1String("/qtc-debugging-helper/") + QString::number(hash)) + slash;
+ return directories;
+}
+
+static QString sourcePath()
+{
+ return Core::ICore::resourcePath() + QLatin1String("/dumper/");
+}
+
+static QStringList sourceFileNames()
+{
+ return QStringList()
+ << QLatin1String("dumper.cpp") << QLatin1String("dumper_p.h")
+ << QLatin1String("dumper.h") << QLatin1String("dumper.pro")
+ << QLatin1String("LICENSE.LGPL") << QLatin1String("LGPL_EXCEPTION.TXT");
+}
+
+QString DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(const QString &qtInstallData)
+{
+ if (!Core::ICore::instance())
+ return QString();
+
+ const QStringList directories = DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
+ const QStringList binFilenames = validBinaryFilenames();
+
+ return byInstallDataHelper(sourcePath(), sourceFileNames(), directories, binFilenames, false);
+}
+
+QString DebuggingHelperLibrary::copy(const QString &qtInstallData,
+ QString *errorMessage)
+{
+ // Locations to try:
+ // $QTDIR/qtc-debugging-helper
+ // $APPLICATION-DIR/qtc-debugging-helper/$hash
+ // $USERDIR/qtc-debugging-helper/$hash
+ const QStringList directories = DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
+
+ // Try to find a writeable directory.
+ foreach(const QString &directory, directories)
+ if (copyFiles(sourcePath(), sourceFileNames(), directory, errorMessage)) {
+ errorMessage->clear();
+ return directory;
+ }
+ *errorMessage = QCoreApplication::translate("ProjectExplorer::DebuggingHelperLibrary",
+ "The debugger helpers could not be built in any of the directories:\n- %1\n\nReason: %2")
+ .arg(directories.join(QLatin1String("\n- ")), *errorMessage);
+ return QString();
+}
+
+bool DebuggingHelperLibrary::build(BuildHelperArguments arguments, QString *log, QString *errorMessage)
+{
+ arguments.proFilename = QLatin1String("dumper.pro");
+ arguments.helperName = QCoreApplication::translate("ProjectExplorer::DebuggingHelperLibrary",
+ "GDB helper");
+ return buildHelper(arguments, log, errorMessage);
+}
diff --git a/src/plugins/qtsupport/debugginghelper.h b/src/plugins/qtsupport/debugginghelper.h
new file mode 100644
index 0000000000..e2b0001467
--- /dev/null
+++ b/src/plugins/qtsupport/debugginghelper.h
@@ -0,0 +1,61 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#ifndef DEBUGGINGHELPER_H
+#define DEBUGGINGHELPER_H
+
+#include "qtsupport_global.h"
+
+#include <utils/buildablehelperlibrary.h>
+
+#include <QString>
+
+QT_FORWARD_DECLARE_CLASS(QStringList)
+
+namespace QtSupport {
+
+class QTSUPPORT_EXPORT DebuggingHelperLibrary : public Utils::BuildableHelperLibrary
+{
+public:
+ static QString debuggingHelperLibraryByInstallData(const QString &qtInstallData);
+ static QStringList debuggingHelperLibraryDirectories(const QString &qtInstallData);
+
+ // Build the helpers and return the output log/errormessage.
+ static bool build(BuildHelperArguments arguments, QString *log, QString *errorMessage);
+
+ // Copy the source files to a target location and return the chosen target location.
+ static QString copy(const QString &qtInstallData, QString *errorMessage);
+
+};
+} // namespace QtSupport
+
+#endif // DEBUGGINGHELPER_H
diff --git a/src/plugins/qtsupport/debugginghelperbuildtask.cpp b/src/plugins/qtsupport/debugginghelperbuildtask.cpp
index eccf0d37d0..bf7c7ae1f9 100644
--- a/src/plugins/qtsupport/debugginghelperbuildtask.cpp
+++ b/src/plugins/qtsupport/debugginghelperbuildtask.cpp
@@ -31,6 +31,7 @@
**************************************************************************/
#include "debugginghelperbuildtask.h"
+#include "debugginghelper.h"
#include "qmldumptool.h"
#include "qmlobservertool.h"
#include "qmldebugginglibrary.h"
@@ -40,7 +41,6 @@
#include <projectexplorer/abi.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/toolchain.h>
-#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/abi.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/qtsupport/qtsupport.pro b/src/plugins/qtsupport/qtsupport.pro
index 383c154a42..e225359e54 100644
--- a/src/plugins/qtsupport/qtsupport.pro
+++ b/src/plugins/qtsupport/qtsupport.pro
@@ -26,6 +26,9 @@ HEADERS += \
qmlobservertool.h \
qmldebugginglibrary.h \
qtoptionspage.h \
+ customexecutablerunconfiguration.h \
+ customexecutableconfigurationwidget.h \
+ debugginghelper.h \
debugginghelperbuildtask.h \
qtsupportconstants.h \
profilereader.h \
@@ -44,6 +47,9 @@ SOURCES += \
qmlobservertool.cpp \
qmldebugginglibrary.cpp \
qtoptionspage.cpp \
+ customexecutablerunconfiguration.cpp \
+ customexecutableconfigurationwidget.cpp \
+ debugginghelper.cpp \
debugginghelperbuildtask.cpp \
profilereader.cpp \
qtparser.cpp \
diff --git a/src/plugins/qtsupport/qtsupport.qbs b/src/plugins/qtsupport/qtsupport.qbs
index 69151a700b..04ffb0989d 100644
--- a/src/plugins/qtsupport/qtsupport.qbs
+++ b/src/plugins/qtsupport/qtsupport.qbs
@@ -47,6 +47,8 @@ QtcPlugin {
"qtversioninfo.ui",
"qtversionmanager.ui",
"baseqtversion.h",
+ "debugginghelper.cpp",
+ "debugginghelper.h",
"debugginghelper.ui",
"debugginghelperbuildtask.h",
"exampleslistmodel.h",
@@ -70,6 +72,10 @@ QtcPlugin {
"screenshotcropper.h",
"showbuildlog.ui",
"baseqtversion.cpp",
+ "customexecutableconfigurationwidget.cpp",
+ "customexecutableconfigurationwidget.h",
+ "customexecutablerunconfiguration.cpp",
+ "customexecutablerunconfiguration.h",
"debugginghelperbuildtask.cpp",
"exampleslistmodel.cpp",
"gettingstartedwelcomepage.cpp",
diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp
index 1ba5aa29ed..d1f0872196 100644
--- a/src/plugins/qtsupport/qtsupportplugin.cpp
+++ b/src/plugins/qtsupport/qtsupportplugin.cpp
@@ -32,6 +32,7 @@
#include "qtsupportplugin.h"
+#include "customexecutablerunconfiguration.h"
#include "qtoptionspage.h"
#include "qtversionmanager.h"
@@ -74,6 +75,8 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
GettingStartedWelcomePage *gettingStartedWelcomePage = new GettingStartedWelcomePage;
addAutoReleasedObject(gettingStartedWelcomePage);
+ addAutoReleasedObject(new CustomExecutableRunConfigurationFactory);
+
return true;
}
diff --git a/src/plugins/qtsupport/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp
index b70b7c4fa8..c5988bc251 100644
--- a/src/plugins/qtsupport/qtversionmanager.cpp
+++ b/src/plugins/qtsupport/qtversionmanager.cpp
@@ -36,12 +36,12 @@
#include "qtsupportconstants.h"
-#include <projectexplorer/debugginghelper.h>
// only for legay restore
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/gcctoolchain.h>
+#include <qtsupport/debugginghelper.h>
#include <coreplugin/icore.h>
#include <coreplugin/helpmanager.h>
@@ -69,8 +69,6 @@
using namespace QtSupport;
using namespace QtSupport::Internal;
-using ProjectExplorer::DebuggingHelperLibrary;
-
static const char QTVERSION_DATA_KEY[] = "QtVersion.";
static const char QTVERSION_TYPE_KEY[] = "QtVersion.Type";
static const char QTVERSION_COUNT_KEY[] = "QtVersion.Count";
@@ -413,7 +411,7 @@ void QtVersionManager::saveQtVersions()
void QtVersionManager::findSystemQt()
{
- Utils::FileName systemQMakePath = ProjectExplorer::DebuggingHelperLibrary::findSystemQt(Utils::Environment::systemEnvironment());
+ Utils::FileName systemQMakePath = QtSupport::DebuggingHelperLibrary::findSystemQt(Utils::Environment::systemEnvironment());
if (systemQMakePath.isNull())
return;