aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <[email protected]>2011-09-15 09:10:10 +0200
committerhjk <[email protected]>2011-09-15 10:33:56 +0200
commit8801c76a8e223b6f41a8369e75c71b67237d8d25 (patch)
tree813d0922e56bb1dbf13a4bb14a3be19dbf295619 /src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp
parent63e8b9075b3a1d502cdcbb63cb2b19e0e6208263 (diff)
Coding style: Pure virtual functions, private implementation pointers.
Change-Id: I293f8dbd4e467e866bab381841659a07e32b9d90 Reviewed-on: http://codereview.qt-project.org/4948 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp')
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp196
1 files changed, 98 insertions, 98 deletions
diff --git a/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp b/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp
index ac20f34803b..db8d8329257 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp
@@ -101,56 +101,56 @@ using namespace Internal;
RemoteLinuxRunConfigurationWidget::RemoteLinuxRunConfigurationWidget(RemoteLinuxRunConfiguration *runConfiguration,
QWidget *parent)
- : QWidget(parent), m_d(new RemoteLinuxRunConfigurationWidgetPrivate(runConfiguration))
+ : QWidget(parent), d(new RemoteLinuxRunConfigurationWidgetPrivate(runConfiguration))
{
QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(0);
addDisabledLabel(topLayout);
- topLayout->addWidget(&m_d->topWidget);
- QVBoxLayout *mainLayout = new QVBoxLayout(&m_d->topWidget);
+ topLayout->addWidget(&d->topWidget);
+ QVBoxLayout *mainLayout = new QVBoxLayout(&d->topWidget);
mainLayout->setMargin(0);
addGenericWidgets(mainLayout);
addEnvironmentWidgets(mainLayout);
- connect(m_d->runConfiguration, SIGNAL(deviceConfigurationChanged(ProjectExplorer::Target*)),
+ connect(d->runConfiguration, SIGNAL(deviceConfigurationChanged(ProjectExplorer::Target*)),
SLOT(handleCurrentDeviceConfigChanged()));
handleCurrentDeviceConfigChanged();
- connect(m_d->runConfiguration, SIGNAL(isEnabledChanged(bool)),
+ connect(d->runConfiguration, SIGNAL(isEnabledChanged(bool)),
SLOT(runConfigurationEnabledChange(bool)));
- runConfigurationEnabledChange(m_d->runConfiguration->isEnabled());
+ runConfigurationEnabledChange(d->runConfiguration->isEnabled());
}
RemoteLinuxRunConfigurationWidget::~RemoteLinuxRunConfigurationWidget()
{
- delete m_d;
+ delete d;
}
void RemoteLinuxRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout)
{
QHBoxLayout * const hl = new QHBoxLayout;
hl->addStretch();
- m_d->disabledIcon.setPixmap(QPixmap(QString::fromUtf8(":/projectexplorer/images/compile_warning.png")));
- hl->addWidget(&m_d->disabledIcon);
- m_d->disabledReason.setVisible(false);
- hl->addWidget(&m_d->disabledReason);
+ d->disabledIcon.setPixmap(QPixmap(QString::fromUtf8(":/projectexplorer/images/compile_warning.png")));
+ hl->addWidget(&d->disabledIcon);
+ d->disabledReason.setVisible(false);
+ hl->addWidget(&d->disabledReason);
hl->addStretch();
topLayout->addLayout(hl);
}
void RemoteLinuxRunConfigurationWidget::suppressQmlDebuggingOptions()
{
- m_d->debuggingLanguagesLabel.hide();
- m_d->debugCppOnlyButton.hide();
- m_d->debugQmlOnlyButton.hide();
- m_d->debugCppAndQmlButton.hide();
+ d->debuggingLanguagesLabel.hide();
+ d->debugCppOnlyButton.hide();
+ d->debugQmlOnlyButton.hide();
+ d->debugCppAndQmlButton.hide();
}
void RemoteLinuxRunConfigurationWidget::runConfigurationEnabledChange(bool enabled)
{
- m_d->topWidget.setEnabled(enabled);
- m_d->disabledIcon.setVisible(!enabled);
- m_d->disabledReason.setVisible(!enabled);
- m_d->disabledReason.setText(m_d->runConfiguration->disabledReason());
+ d->topWidget.setEnabled(enabled);
+ d->disabledIcon.setVisible(!enabled);
+ d->disabledReason.setVisible(!enabled);
+ d->disabledReason.setText(d->runConfiguration->disabledReason());
}
void RemoteLinuxRunConfigurationWidget::addGenericWidgets(QVBoxLayout *mainLayout)
@@ -162,7 +162,7 @@ void RemoteLinuxRunConfigurationWidget::addGenericWidgets(QVBoxLayout *mainLayou
QWidget * const devConfWidget = new QWidget;
QHBoxLayout * const devConfLayout = new QHBoxLayout(devConfWidget);
devConfLayout->setMargin(0);
- devConfLayout->addWidget(&m_d->devConfLabel);
+ devConfLayout->addWidget(&d->devConfLabel);
QLabel * const addDevConfLabel= new QLabel(tr("<a href=\"%1\">Manage device configurations</a>")
.arg(QLatin1String("deviceconfig")));
addDevConfLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
@@ -174,46 +174,46 @@ void RemoteLinuxRunConfigurationWidget::addGenericWidgets(QVBoxLayout *mainLayou
devConfLayout->addWidget(debuggerConfLabel);
formLayout->addRow(new QLabel(tr("Device configuration:")), devConfWidget);
- m_d->localExecutableLabel.setText(m_d->runConfiguration->localExecutableFilePath());
- formLayout->addRow(tr("Executable on host:"), &m_d->localExecutableLabel);
- formLayout->addRow(tr("Executable on device:"), &m_d->remoteExecutableLabel);
- m_d->argsLineEdit.setText(m_d->runConfiguration->arguments());
- formLayout->addRow(tr("Arguments:"), &m_d->argsLineEdit);
+ d->localExecutableLabel.setText(d->runConfiguration->localExecutableFilePath());
+ formLayout->addRow(tr("Executable on host:"), &d->localExecutableLabel);
+ formLayout->addRow(tr("Executable on device:"), &d->remoteExecutableLabel);
+ d->argsLineEdit.setText(d->runConfiguration->arguments());
+ formLayout->addRow(tr("Arguments:"), &d->argsLineEdit);
QHBoxLayout * const debugButtonsLayout = new QHBoxLayout;
- m_d->debugCppOnlyButton.setText(tr("C++ only"));
- m_d->debugQmlOnlyButton.setText(tr("QML only"));
- m_d->debugCppAndQmlButton.setText(tr("C++ and QML"));
- m_d->debuggingLanguagesLabel.setText(tr("Debugging type:"));
+ d->debugCppOnlyButton.setText(tr("C++ only"));
+ d->debugQmlOnlyButton.setText(tr("QML only"));
+ d->debugCppAndQmlButton.setText(tr("C++ and QML"));
+ d->debuggingLanguagesLabel.setText(tr("Debugging type:"));
QButtonGroup * const buttonGroup = new QButtonGroup;
- buttonGroup->addButton(&m_d->debugCppOnlyButton);
- buttonGroup->addButton(&m_d->debugQmlOnlyButton);
- buttonGroup->addButton(&m_d->debugCppAndQmlButton);
- debugButtonsLayout->addWidget(&m_d->debugCppOnlyButton);
- debugButtonsLayout->addWidget(&m_d->debugQmlOnlyButton);
- debugButtonsLayout->addWidget(&m_d->debugCppAndQmlButton);
+ buttonGroup->addButton(&d->debugCppOnlyButton);
+ buttonGroup->addButton(&d->debugQmlOnlyButton);
+ buttonGroup->addButton(&d->debugCppAndQmlButton);
+ debugButtonsLayout->addWidget(&d->debugCppOnlyButton);
+ debugButtonsLayout->addWidget(&d->debugQmlOnlyButton);
+ debugButtonsLayout->addWidget(&d->debugCppAndQmlButton);
debugButtonsLayout->addStretch(1);
- formLayout->addRow(&m_d->debuggingLanguagesLabel, debugButtonsLayout);
- if (m_d->runConfiguration->useCppDebugger()) {
- if (m_d->runConfiguration->useQmlDebugger())
- m_d->debugCppAndQmlButton.setChecked(true);
+ formLayout->addRow(&d->debuggingLanguagesLabel, debugButtonsLayout);
+ if (d->runConfiguration->useCppDebugger()) {
+ if (d->runConfiguration->useQmlDebugger())
+ d->debugCppAndQmlButton.setChecked(true);
else
- m_d->debugCppOnlyButton.setChecked(true);
+ d->debugCppOnlyButton.setChecked(true);
} else {
- m_d->debugQmlOnlyButton.setChecked(true);
+ d->debugQmlOnlyButton.setChecked(true);
}
connect(addDevConfLabel, SIGNAL(linkActivated(QString)), this,
SLOT(showDeviceConfigurationsDialog(QString)));
connect(debuggerConfLabel, SIGNAL(linkActivated(QString)), this,
SLOT(showDeviceConfigurationsDialog(QString)));
- connect(&m_d->argsLineEdit, SIGNAL(textEdited(QString)), SLOT(argumentsEdited(QString)));
- connect(&m_d->debugCppOnlyButton, SIGNAL(toggled(bool)), SLOT(handleDebuggingTypeChanged()));
- connect(&m_d->debugQmlOnlyButton, SIGNAL(toggled(bool)), SLOT(handleDebuggingTypeChanged()));
- connect(&m_d->debugCppAndQmlButton, SIGNAL(toggled(bool)), SLOT(handleDebuggingTypeChanged()));
- connect(m_d->runConfiguration, SIGNAL(targetInformationChanged()), this,
+ connect(&d->argsLineEdit, SIGNAL(textEdited(QString)), SLOT(argumentsEdited(QString)));
+ connect(&d->debugCppOnlyButton, SIGNAL(toggled(bool)), SLOT(handleDebuggingTypeChanged()));
+ connect(&d->debugQmlOnlyButton, SIGNAL(toggled(bool)), SLOT(handleDebuggingTypeChanged()));
+ connect(&d->debugCppAndQmlButton, SIGNAL(toggled(bool)), SLOT(handleDebuggingTypeChanged()));
+ connect(d->runConfiguration, SIGNAL(targetInformationChanged()), this,
SLOT(updateTargetInformation()));
- connect(m_d->runConfiguration, SIGNAL(deploySpecsChanged()), SLOT(handleDeploySpecsChanged()));
+ connect(d->runConfiguration, SIGNAL(deploySpecsChanged()), SLOT(handleDeploySpecsChanged()));
handleDeploySpecsChanged();
}
@@ -224,50 +224,50 @@ void RemoteLinuxRunConfigurationWidget::addEnvironmentWidgets(QVBoxLayout *mainL
baseEnvironmentLayout->setMargin(0);
QLabel * const label = new QLabel(tr("Base environment for this run configuration:"), this);
baseEnvironmentLayout->addWidget(label);
- m_d->baseEnvironmentComboBox.addItems(QStringList() << tr("Clean Environment")
+ d->baseEnvironmentComboBox.addItems(QStringList() << tr("Clean Environment")
<< tr("System Environment"));
- m_d->baseEnvironmentComboBox.setCurrentIndex(m_d->runConfiguration->baseEnvironmentType());
- baseEnvironmentLayout->addWidget(&m_d->baseEnvironmentComboBox);
+ d->baseEnvironmentComboBox.setCurrentIndex(d->runConfiguration->baseEnvironmentType());
+ baseEnvironmentLayout->addWidget(&d->baseEnvironmentComboBox);
- m_d->fetchEnvButton.setText(FetchEnvButtonText);
- baseEnvironmentLayout->addWidget(&m_d->fetchEnvButton);
+ d->fetchEnvButton.setText(FetchEnvButtonText);
+ baseEnvironmentLayout->addWidget(&d->fetchEnvButton);
baseEnvironmentLayout->addStretch(10);
- m_d->environmentWidget = new ProjectExplorer::EnvironmentWidget(this, baseEnvironmentWidget);
- m_d->environmentWidget->setBaseEnvironment(m_d->deviceEnvReader.deviceEnvironment());
- m_d->environmentWidget->setBaseEnvironmentText(m_d->runConfiguration->baseEnvironmentText());
- m_d->environmentWidget->setUserChanges(m_d->runConfiguration->userEnvironmentChanges());
- mainLayout->addWidget(m_d->environmentWidget);
+ d->environmentWidget = new ProjectExplorer::EnvironmentWidget(this, baseEnvironmentWidget);
+ d->environmentWidget->setBaseEnvironment(d->deviceEnvReader.deviceEnvironment());
+ d->environmentWidget->setBaseEnvironmentText(d->runConfiguration->baseEnvironmentText());
+ d->environmentWidget->setUserChanges(d->runConfiguration->userEnvironmentChanges());
+ mainLayout->addWidget(d->environmentWidget);
- connect(m_d->environmentWidget, SIGNAL(userChangesChanged()), SLOT(userChangesEdited()));
- connect(&m_d->baseEnvironmentComboBox, SIGNAL(currentIndexChanged(int)),
+ connect(d->environmentWidget, SIGNAL(userChangesChanged()), SLOT(userChangesEdited()));
+ connect(&d->baseEnvironmentComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(baseEnvironmentSelected(int)));
- connect(m_d->runConfiguration, SIGNAL(baseEnvironmentChanged()),
+ connect(d->runConfiguration, SIGNAL(baseEnvironmentChanged()),
this, SLOT(baseEnvironmentChanged()));
- connect(m_d->runConfiguration, SIGNAL(systemEnvironmentChanged()),
+ connect(d->runConfiguration, SIGNAL(systemEnvironmentChanged()),
this, SLOT(systemEnvironmentChanged()));
- connect(m_d->runConfiguration,
+ connect(d->runConfiguration,
SIGNAL(userEnvironmentChangesChanged(QList<Utils::EnvironmentItem>)),
SLOT(userEnvironmentChangesChanged(QList<Utils::EnvironmentItem>)));
- connect(&m_d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
- connect(&m_d->deviceEnvReader, SIGNAL(finished()), this, SLOT(fetchEnvironmentFinished()));
- connect(&m_d->deviceEnvReader, SIGNAL(error(QString)), SLOT(fetchEnvironmentError(QString)));
+ connect(&d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
+ connect(&d->deviceEnvReader, SIGNAL(finished()), this, SLOT(fetchEnvironmentFinished()));
+ connect(&d->deviceEnvReader, SIGNAL(error(QString)), SLOT(fetchEnvironmentError(QString)));
}
void RemoteLinuxRunConfigurationWidget::argumentsEdited(const QString &text)
{
- m_d->runConfiguration->setArguments(text);
+ d->runConfiguration->setArguments(text);
}
void RemoteLinuxRunConfigurationWidget::updateTargetInformation()
{
- m_d->localExecutableLabel
- .setText(QDir::toNativeSeparators(m_d->runConfiguration->localExecutableFilePath()));
+ d->localExecutableLabel
+ .setText(QDir::toNativeSeparators(d->runConfiguration->localExecutableFilePath()));
}
void RemoteLinuxRunConfigurationWidget::handleDeploySpecsChanged()
{
- m_d->remoteExecutableLabel.setText(m_d->runConfiguration->remoteExecutableFilePath());
+ d->remoteExecutableLabel.setText(d->runConfiguration->remoteExecutableFilePath());
}
void RemoteLinuxRunConfigurationWidget::showDeviceConfigurationsDialog(const QString &link)
@@ -283,29 +283,29 @@ void RemoteLinuxRunConfigurationWidget::showDeviceConfigurationsDialog(const QSt
void RemoteLinuxRunConfigurationWidget::handleCurrentDeviceConfigChanged()
{
- m_d->devConfLabel.setText(RemoteLinuxUtils::deviceConfigurationName(m_d->runConfiguration->deviceConfig()));
+ d->devConfLabel.setText(RemoteLinuxUtils::deviceConfigurationName(d->runConfiguration->deviceConfig()));
}
void RemoteLinuxRunConfigurationWidget::fetchEnvironment()
{
- disconnect(&m_d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
- connect(&m_d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(stopFetchEnvironment()));
- m_d->fetchEnvButton.setText(tr("Cancel Fetch Operation"));
- m_d->deviceEnvReader.start(m_d->runConfiguration->environmentPreparationCommand());
+ disconnect(&d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
+ connect(&d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(stopFetchEnvironment()));
+ d->fetchEnvButton.setText(tr("Cancel Fetch Operation"));
+ d->deviceEnvReader.start(d->runConfiguration->environmentPreparationCommand());
}
void RemoteLinuxRunConfigurationWidget::stopFetchEnvironment()
{
- m_d->deviceEnvReader.stop();
+ d->deviceEnvReader.stop();
fetchEnvironmentFinished();
}
void RemoteLinuxRunConfigurationWidget::fetchEnvironmentFinished()
{
- disconnect(&m_d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(stopFetchEnvironment()));
- connect(&m_d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
- m_d->fetchEnvButton.setText(FetchEnvButtonText);
- m_d->runConfiguration->setSystemEnvironment(m_d->deviceEnvReader.deviceEnvironment());
+ disconnect(&d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(stopFetchEnvironment()));
+ connect(&d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
+ d->fetchEnvButton.setText(FetchEnvButtonText);
+ d->runConfiguration->setSystemEnvironment(d->deviceEnvReader.deviceEnvironment());
}
void RemoteLinuxRunConfigurationWidget::fetchEnvironmentError(const QString &error)
@@ -316,48 +316,48 @@ void RemoteLinuxRunConfigurationWidget::fetchEnvironmentError(const QString &err
void RemoteLinuxRunConfigurationWidget::userChangesEdited()
{
- m_d->ignoreChange = true;
- m_d->runConfiguration->setUserEnvironmentChanges(m_d->environmentWidget->userChanges());
- m_d->ignoreChange = false;
+ d->ignoreChange = true;
+ d->runConfiguration->setUserEnvironmentChanges(d->environmentWidget->userChanges());
+ d->ignoreChange = false;
}
void RemoteLinuxRunConfigurationWidget::baseEnvironmentSelected(int index)
{
- m_d->ignoreChange = true;
- m_d->runConfiguration->setBaseEnvironmentType(RemoteLinuxRunConfiguration::BaseEnvironmentType(index));
- m_d->environmentWidget->setBaseEnvironment(m_d->runConfiguration->baseEnvironment());
- m_d->environmentWidget->setBaseEnvironmentText(m_d->runConfiguration->baseEnvironmentText());
- m_d->ignoreChange = false;
+ d->ignoreChange = true;
+ d->runConfiguration->setBaseEnvironmentType(RemoteLinuxRunConfiguration::BaseEnvironmentType(index));
+ d->environmentWidget->setBaseEnvironment(d->runConfiguration->baseEnvironment());
+ d->environmentWidget->setBaseEnvironmentText(d->runConfiguration->baseEnvironmentText());
+ d->ignoreChange = false;
}
void RemoteLinuxRunConfigurationWidget::baseEnvironmentChanged()
{
- if (m_d->ignoreChange)
+ if (d->ignoreChange)
return;
- m_d->baseEnvironmentComboBox.setCurrentIndex(m_d->runConfiguration->baseEnvironmentType());
- m_d->environmentWidget->setBaseEnvironment(m_d->runConfiguration->baseEnvironment());
- m_d->environmentWidget->setBaseEnvironmentText(m_d->runConfiguration->baseEnvironmentText());
+ d->baseEnvironmentComboBox.setCurrentIndex(d->runConfiguration->baseEnvironmentType());
+ d->environmentWidget->setBaseEnvironment(d->runConfiguration->baseEnvironment());
+ d->environmentWidget->setBaseEnvironmentText(d->runConfiguration->baseEnvironmentText());
}
void RemoteLinuxRunConfigurationWidget::systemEnvironmentChanged()
{
- m_d->environmentWidget->setBaseEnvironment(m_d->runConfiguration->systemEnvironment());
+ d->environmentWidget->setBaseEnvironment(d->runConfiguration->systemEnvironment());
}
void RemoteLinuxRunConfigurationWidget::userEnvironmentChangesChanged(const QList<Utils::EnvironmentItem> &userChanges)
{
- if (m_d->ignoreChange)
+ if (d->ignoreChange)
return;
- m_d->environmentWidget->setUserChanges(userChanges);
+ d->environmentWidget->setUserChanges(userChanges);
}
void RemoteLinuxRunConfigurationWidget::handleDebuggingTypeChanged()
{
- m_d->runConfiguration->setUseCppDebugger(m_d->debugCppOnlyButton.isChecked()
- || m_d->debugCppAndQmlButton.isChecked());
- m_d->runConfiguration->setUseQmlDebugger(m_d->debugQmlOnlyButton.isChecked()
- || m_d->debugCppAndQmlButton.isChecked());
+ d->runConfiguration->setUseCppDebugger(d->debugCppOnlyButton.isChecked()
+ || d->debugCppAndQmlButton.isChecked());
+ d->runConfiguration->setUseQmlDebugger(d->debugQmlOnlyButton.isChecked()
+ || d->debugCppAndQmlButton.isChecked());
}
} // namespace RemoteLinux