Commit 15f8bb07 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

ProjectExplorer: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: I619db09a79760186b72e7662490ed1205155c1a7
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent db8b9f94
......@@ -80,14 +80,16 @@ AbiWidget::AbiWidget(QWidget *parent) :
d->m_abi->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
d->m_abi->setMinimumContentsLength(4);
layout->addWidget(d->m_abi);
connect(d->m_abi, SIGNAL(currentIndexChanged(int)), this, SLOT(modeChanged()));
connect(d->m_abi, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &AbiWidget::modeChanged);
d->m_architectureComboBox = new QComboBox(this);
layout->addWidget(d->m_architectureComboBox);
for (int i = 0; i <= static_cast<int>(Abi::UnknownArchitecture); ++i)
d->m_architectureComboBox->addItem(Abi::toString(static_cast<Abi::Architecture>(i)), i);
d->m_architectureComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownArchitecture));
connect(d->m_architectureComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(customAbiChanged()));
connect(d->m_architectureComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &AbiWidget::customAbiChanged);
QLabel *separator1 = new QLabel(this);
separator1->setText(QLatin1String("-"));
......@@ -99,7 +101,8 @@ AbiWidget::AbiWidget(QWidget *parent) :
for (int i = 0; i <= static_cast<int>(Abi::UnknownOS); ++i)
d->m_osComboBox->addItem(Abi::toString(static_cast<Abi::OS>(i)), i);
d->m_osComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownOS));
connect(d->m_osComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(osChanged()));
connect(d->m_osComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &AbiWidget::osChanged);
QLabel *separator2 = new QLabel(this);
separator2->setText(QLatin1String("-"));
......@@ -108,7 +111,8 @@ AbiWidget::AbiWidget(QWidget *parent) :
d->m_osFlavorComboBox = new QComboBox(this);
layout->addWidget(d->m_osFlavorComboBox);
connect(d->m_osFlavorComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(customAbiChanged()));
connect(d->m_osFlavorComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &AbiWidget::customAbiChanged);
QLabel *separator3 = new QLabel(this);
separator3->setText(QLatin1String("-"));
......@@ -120,7 +124,8 @@ AbiWidget::AbiWidget(QWidget *parent) :
for (int i = 0; i <= static_cast<int>(Abi::UnknownFormat); ++i)
d->m_binaryFormatComboBox->addItem(Abi::toString(static_cast<Abi::BinaryFormat>(i)), i);
d->m_binaryFormatComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownFormat));
connect(d->m_binaryFormatComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(customAbiChanged()));
connect(d->m_binaryFormatComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &AbiWidget::customAbiChanged);
QLabel *separator4 = new QLabel(this);
separator4->setText(QLatin1String("-"));
......@@ -134,7 +139,8 @@ AbiWidget::AbiWidget(QWidget *parent) :
d->m_wordWidthComboBox->addItem(Abi::toString(64), 64);
d->m_wordWidthComboBox->addItem(Abi::toString(0), 0);
d->m_wordWidthComboBox->setCurrentIndex(2);
connect(d->m_wordWidthComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(customAbiChanged()));
connect(d->m_wordWidthComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &AbiWidget::customAbiChanged);
layout->setStretchFactor(d->m_abi, 1);
......
......@@ -55,12 +55,11 @@ public:
signals:
void abiChanged();
private slots:
private:
void osChanged();
void modeChanged();
void customAbiChanged();
private:
void setCustomAbi(const Abi &a);
Internal::AbiWidgetPrivate *const d;
......
......@@ -213,13 +213,13 @@ void AbstractProcessStep::run(QFutureInterface<bool> &fi)
m_process->setWorkingDirectory(wd.absolutePath());
m_process->setEnvironment(m_param.environment());
connect(m_process, SIGNAL(readyReadStandardOutput()),
this, SLOT(processReadyReadStdOutput()));
connect(m_process, SIGNAL(readyReadStandardError()),
this, SLOT(processReadyReadStdError()));
connect(m_process, &QProcess::readyReadStandardOutput,
this, &AbstractProcessStep::processReadyReadStdOutput);
connect(m_process, &QProcess::readyReadStandardError,
this, &AbstractProcessStep::processReadyReadStdError);
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(slotProcessFinished(int,QProcess::ExitStatus)));
connect(m_process, static_cast<void (QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
this, &AbstractProcessStep::slotProcessFinished);
m_process->setCommand(effectiveCommand, m_param.effectiveArguments());
m_process->start();
......@@ -234,7 +234,7 @@ void AbstractProcessStep::run(QFutureInterface<bool> &fi)
processStarted();
m_timer = new QTimer();
connect(m_timer, SIGNAL(timeout()), this, SLOT(checkForCancel()));
connect(m_timer, &QTimer::timeout, this, &AbstractProcessStep::checkForCancel);
m_timer->start(500);
m_killProcess = false;
}
......
......@@ -77,7 +77,7 @@ protected:
QFutureInterface<bool> *futureInterface() const;
private slots:
private:
void processReadyReadStdOutput();
void processReadyReadStdError();
void slotProcessFinished(int, QProcess::ExitStatus);
......@@ -89,7 +89,6 @@ private slots:
void outputAdded(const QString &string, BuildStep::OutputFormat format);
private:
QTimer *m_timer;
QFutureInterface<bool> *m_futureInterface;
ProcessParameters m_param;
......
......@@ -44,8 +44,8 @@ AllProjectsFilter::AllProjectsFilter()
setShortcutString(QString(QLatin1Char('a')));
setIncludedByDefault(true);
connect(ProjectExplorerPlugin::instance(), SIGNAL(fileListChanged()),
this, SLOT(markFilesAsOutOfDate()));
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::fileListChanged,
this, &AllProjectsFilter::markFilesAsOutOfDate);
}
void AllProjectsFilter::markFilesAsOutOfDate()
......@@ -69,5 +69,5 @@ void AllProjectsFilter::prepareSearch(const QString &entry)
void AllProjectsFilter::refresh(QFutureInterface<void> &future)
{
Q_UNUSED(future)
QTimer::singleShot(0, this, SLOT(markFilesAsOutOfDate()));
QTimer::singleShot(0, this, &AllProjectsFilter::markFilesAsOutOfDate);
}
......@@ -42,7 +42,7 @@ public:
void refresh(QFutureInterface<void> &future);
void prepareSearch(const QString &entry);
private slots:
private:
void markFilesAsOutOfDate();
};
......
......@@ -49,7 +49,8 @@ using namespace TextEditor;
AllProjectsFind::AllProjectsFind()
: m_configWidget(0)
{
connect(ProjectExplorerPlugin::instance(), SIGNAL(fileListChanged()), this, SLOT(handleFileListChanged()));
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::fileListChanged,
this, &AllProjectsFind::handleFileListChanged);
}
QString AllProjectsFind::id() const
......
......@@ -62,10 +62,9 @@ protected:
QString label() const;
QString toolTip() const;
private slots:
private:
void handleFileListChanged();
private:
QPointer<QWidget> m_configWidget;
};
......
......@@ -92,37 +92,38 @@ ApplicationLauncher::ApplicationLauncher(QObject *parent)
d->m_guiProcess.setReadChannelMode(QProcess::MergedChannels);
} else {
d->m_guiProcess.setReadChannelMode(QProcess::SeparateChannels);
connect(&d->m_guiProcess, SIGNAL(readyReadStandardError()),
this, SLOT(readStandardError()));
connect(&d->m_guiProcess, &QProcess::readyReadStandardError,
this, &ApplicationLauncher::readStandardError);
}
connect(&d->m_guiProcess, SIGNAL(readyReadStandardOutput()),
this, SLOT(readStandardOutput()));
connect(&d->m_guiProcess, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(guiProcessError()));
connect(&d->m_guiProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(processDone(int,QProcess::ExitStatus)));
connect(&d->m_guiProcess, SIGNAL(started()),
this, SLOT(bringToForeground()));
connect(&d->m_guiProcess, SIGNAL(error(QProcess::ProcessError)),
this, SIGNAL(error(QProcess::ProcessError)));
connect(&d->m_guiProcess, &QProcess::readyReadStandardOutput,
this, &ApplicationLauncher::readStandardOutput);
connect(&d->m_guiProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &ApplicationLauncher::guiProcessError);
connect(&d->m_guiProcess, static_cast<void (QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
this, &ApplicationLauncher::processDone);
connect(&d->m_guiProcess, &QProcess::started,
this, &ApplicationLauncher::bringToForeground);
connect(&d->m_guiProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &ApplicationLauncher::error);
#ifdef Q_OS_UNIX
d->m_consoleProcess.setSettings(Core::ICore::settings());
#endif
connect(&d->m_consoleProcess, SIGNAL(processStarted()),
this, SIGNAL(processStarted()));
connect(&d->m_consoleProcess, SIGNAL(processError(QString)),
this, SLOT(consoleProcessError(QString)));
connect(&d->m_consoleProcess, SIGNAL(processStopped(int,QProcess::ExitStatus)),
this, SLOT(processDone(int,QProcess::ExitStatus)));
connect(&d->m_consoleProcess, SIGNAL(error(QProcess::ProcessError)),
this, SIGNAL(error(QProcess::ProcessError)));
connect(&d->m_consoleProcess, &Utils::ConsoleProcess::processStarted,
this, &ApplicationLauncher::processStarted);
connect(&d->m_consoleProcess, &Utils::ConsoleProcess::processError,
this, &ApplicationLauncher::consoleProcessError);
connect(&d->m_consoleProcess, &Utils::ConsoleProcess::processStopped,
this, &ApplicationLauncher::processDone);
connect(&d->m_consoleProcess,
static_cast<void (Utils::ConsoleProcess::*)(QProcess::ProcessError)>(&Utils::ConsoleProcess::error),
this, &ApplicationLauncher::error);
#ifdef Q_OS_WIN
connect(WinDebugInterface::instance(), SIGNAL(cannotRetrieveDebugOutput()),
this, SLOT(cannotRetrieveDebugOutput()));
connect(WinDebugInterface::instance(), SIGNAL(debugOutput(qint64,QString)),
this, SLOT(checkDebugOutput(qint64,QString)), Qt::BlockingQueuedConnection);
connect(WinDebugInterface::instance(), &WinDebugInterface::cannotRetrieveDebugOutput,
this, &ApplicationLauncher::cannotRetrieveDebugOutput);
connect(WinDebugInterface::instance(), &WinDebugInterface::debugOutput,
this, &ApplicationLauncher::checkDebugOutput, Qt::BlockingQueuedConnection);
#endif
#ifdef WITH_JOURNALD
connect(JournaldWatcher::instance(), &JournaldWatcher::journaldOutput,
......
......@@ -69,7 +69,7 @@ signals:
void bringToForegroundRequested(qint64 pid);
void error(QProcess::ProcessError error);
private slots:
private:
void guiProcessError();
void consoleProcessError(const QString &error);
void readStandardOutput();
......@@ -81,7 +81,6 @@ private slots:
void processDone(int, QProcess::ExitStatus);
void bringToForeground();
private:
ApplicationLauncherPrivate *d;
};
......
......@@ -90,9 +90,8 @@ signals:
void contextMenuRequested(const QPoint &pos, const int index);
protected:
bool eventFilter(QObject *object, QEvent *event);
private slots:
void slotContextMenuRequested(const QPoint &pos);
private:
void slotContextMenuRequested(const QPoint &pos);
int m_tabIndexForMiddleClick;
};
......@@ -104,8 +103,8 @@ TabWidget::TabWidget(QWidget *parent)
{
tabBar()->installEventFilter(this);
setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(slotContextMenuRequested(QPoint)));
connect(this, &QWidget::customContextMenuRequested,
this, &TabWidget::slotContextMenuRequested);
}
bool TabWidget::eventFilter(QObject *object, QEvent *event)
......@@ -163,8 +162,8 @@ AppOutputPane::AppOutputPane() :
m_reRunButton->setToolTip(tr("Re-run this run-configuration"));
m_reRunButton->setAutoRaise(true);
m_reRunButton->setEnabled(false);
connect(m_reRunButton, SIGNAL(clicked()),
this, SLOT(reRunRunControl()));
connect(m_reRunButton, &QAbstractButton::clicked,
this, &AppOutputPane::reRunRunControl);
// Stop
m_stopAction->setIcon(Icons::STOP_SMALL.icon());
......@@ -176,8 +175,8 @@ AppOutputPane::AppOutputPane() :
m_stopButton->setDefaultAction(cmd->action());
m_stopButton->setAutoRaise(true);
connect(m_stopAction, SIGNAL(triggered()),
this, SLOT(stopRunControl()));
connect(m_stopAction, &QAction::triggered,
this, &AppOutputPane::stopRunControl);
// Attach
m_attachButton->setToolTip(msgAttachDebuggerTooltip());
......@@ -185,8 +184,8 @@ AppOutputPane::AppOutputPane() :
m_attachButton->setIcon(Core::Icons::DEBUG_START_SMALL.icon());
m_attachButton->setAutoRaise(true);
connect(m_attachButton, SIGNAL(clicked()),
this, SLOT(attachToRunControl()));
connect(m_attachButton, &QAbstractButton::clicked,
this, &AppOutputPane::attachToRunControl);
m_zoomInButton->setToolTip(tr("Increase Font Size"));
m_zoomInButton->setIcon(Core::Icons::PLUS.icon());
......@@ -209,11 +208,13 @@ AppOutputPane::AppOutputPane() :
m_tabWidget->setDocumentMode(true);
m_tabWidget->setTabsClosable(true);
m_tabWidget->setMovable(true);
connect(m_tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
connect(m_tabWidget, &QTabWidget::tabCloseRequested,
this, [this](int index) { closeTab(index); });
layout->addWidget(m_tabWidget);
connect(m_tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
connect(m_tabWidget, SIGNAL(contextMenuRequested(QPoint,int)), this, SLOT(contextMenuRequested(QPoint,int)));
connect(m_tabWidget, &QTabWidget::currentChanged, this, &AppOutputPane::tabChanged);
connect(m_tabWidget, &TabWidget::contextMenuRequested,
this, &AppOutputPane::contextMenuRequested);
m_mainWidget->setLayout(layout);
......@@ -223,10 +224,10 @@ AppOutputPane::AppOutputPane() :
connect(TextEditor::TextEditorSettings::instance(), &TextEditor::TextEditorSettings::behaviorSettingsChanged,
this, &AppOutputPane::updateBehaviorSettings);
connect(SessionManager::instance(), SIGNAL(aboutToUnloadSession(QString)),
this, SLOT(aboutToUnloadSession()));
connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
this, SLOT(updateFromSettings()));
connect(SessionManager::instance(), &SessionManager::aboutToUnloadSession,
this, &AppOutputPane::aboutToUnloadSession);
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::settingsChanged,
this, &AppOutputPane::updateFromSettings);
#ifdef Q_OS_WIN
connect(this, &AppOutputPane::allRunControlsFinished,
......@@ -381,14 +382,15 @@ void AppOutputPane::updateBehaviorSettings()
void AppOutputPane::createNewOutputWindow(RunControl *rc)
{
connect(rc, SIGNAL(started()),
this, SLOT(slotRunControlStarted()));
connect(rc, SIGNAL(finished()),
this, SLOT(slotRunControlFinished()));
connect(rc, SIGNAL(applicationProcessHandleChanged()),
this, SLOT(enableButtons()));
connect(rc, SIGNAL(appendMessage(ProjectExplorer::RunControl*,QString,Utils::OutputFormat)),
this, SLOT(appendMessage(ProjectExplorer::RunControl*,QString,Utils::OutputFormat)));
connect(rc, &RunControl::started,
this, &AppOutputPane::slotRunControlStarted);
connect(rc, &RunControl::finished,
this, &AppOutputPane::slotRunControlFinished);
connect(rc, &RunControl::applicationProcessHandleChanged,
this, &AppOutputPane::enableDefaultButtons);
connect(rc, static_cast<void (RunControl::*)(
ProjectExplorer::RunControl *, const QString &, Utils::OutputFormat)>(&RunControl::appendMessage),
this, &AppOutputPane::appendMessage);
Utils::OutputFormatter *formatter = rc->outputFormatter();
......@@ -536,11 +538,6 @@ QList<RunControl *> AppOutputPane::allRunControls() const
});
}
bool AppOutputPane::closeTab(int index)
{
return closeTab(index, CloseTabWithPrompt);
}
bool AppOutputPane::closeTab(int tabIndex, CloseTabMode closeTabMode)
{
int index = indexOf(m_tabWidget->widget(tabIndex));
......@@ -605,7 +602,7 @@ void AppOutputPane::projectRemoved()
tabChanged(m_tabWidget->currentIndex());
}
void AppOutputPane::enableButtons()
void AppOutputPane::enableDefaultButtons()
{
const RunControl *rc = currentRunControl();
const bool isRunning = rc && rc->isRunning();
......@@ -663,7 +660,7 @@ void AppOutputPane::tabChanged(int i)
const RunControl *rc = m_runControlTabs.at(index).runControl;
enableButtons(rc, rc->isRunning());
} else {
enableButtons();
enableDefaultButtons();
}
}
......@@ -695,8 +692,7 @@ void AppOutputPane::slotRunControlStarted()
void AppOutputPane::slotRunControlFinished()
{
RunControl *rc = qobject_cast<RunControl *>(sender());
QMetaObject::invokeMethod(this, "slotRunControlFinished2", Qt::QueuedConnection,
Q_ARG(ProjectExplorer::RunControl *, rc));
QTimer::singleShot(0, this, [this, rc]() { slotRunControlFinished2(rc); });
rc->outputFormatter()->flush();
}
......
......@@ -101,11 +101,10 @@ public slots:
void appendMessage(ProjectExplorer::RunControl *rc, const QString &out,
Utils::OutputFormat format);
private slots:
private:
void reRunRunControl();
void stopRunControl();
void attachToRunControl();
bool closeTab(int index);
void tabChanged(int);
void contextMenuRequested(const QPoint &pos, int index);
void slotRunControlStarted();
......@@ -114,12 +113,11 @@ private slots:
void aboutToUnloadSession();
void updateFromSettings();
void enableButtons();
void enableDefaultButtons();
void zoomIn();
void zoomOut();
private:
void enableButtons(const RunControl *rc, bool isRunning);
struct RunControlTab {
......@@ -133,7 +131,7 @@ private:
};
bool isRunning() const;
bool closeTab(int index, CloseTabMode cm);
bool closeTab(int index, CloseTabMode cm = CloseTabWithPrompt);
bool optionallyPromptToStop(RunControl *runControl);
int indexOf(const RunControl *) const;
......
......@@ -67,9 +67,10 @@ BuildConfiguration::BuildConfiguration(Target *target, Core::Id id) :
emitEnvironmentChanged();
connect(target, SIGNAL(kitChanged()),
this, SLOT(handleKitUpdate()));
connect(this, SIGNAL(environmentChanged()), this, SLOT(emitBuildDirectoryChanged()));
connect(target, &Target::kitChanged,
this, &BuildConfiguration::handleKitUpdate);
connect(this, &BuildConfiguration::environmentChanged,
this, &BuildConfiguration::emitBuildDirectoryChanged);
ctor();
}
......@@ -87,8 +88,8 @@ BuildConfiguration::BuildConfiguration(Target *target, BuildConfiguration *sourc
emitEnvironmentChanged();
connect(target, SIGNAL(kitChanged()),
this, SLOT(handleKitUpdate()));
connect(target, &Target::kitChanged,
this, &BuildConfiguration::handleKitUpdate);
ctor();
}
......
......@@ -101,11 +101,10 @@ protected:
void cloneSteps(BuildConfiguration *source);
void emitEnvironmentChanged();
private slots:
private:
void handleKitUpdate();
void emitBuildDirectoryChanged();
private:
void ctor();
bool m_clearSystemEnvironment;
......
......@@ -59,14 +59,14 @@ BuildConfigurationModel::BuildConfigurationModel(Target *target, QObject *parent
m_buildConfigurations = m_target->buildConfigurations();
Utils::sort(m_buildConfigurations, BuildConfigurationComparer());
connect(target, SIGNAL(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
connect(target, SIGNAL(removedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(removedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
connect(target, &Target::addedBuildConfiguration,
this, &BuildConfigurationModel::addedBuildConfiguration);
connect(target, &Target::removedBuildConfiguration,
this, &BuildConfigurationModel::removedBuildConfiguration);
foreach (BuildConfiguration *bc, m_buildConfigurations)
connect(bc, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
connect(bc, &ProjectConfiguration::displayNameChanged,
this, &BuildConfigurationModel::displayNameChanged);
}
int BuildConfigurationModel::rowCount(const QModelIndex &parent) const
......@@ -171,8 +171,8 @@ void BuildConfigurationModel::addedBuildConfiguration(BuildConfiguration *bc)
endInsertRows();
connect(bc, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
connect(bc, &ProjectConfiguration::displayNameChanged,
this, &BuildConfigurationModel::displayNameChanged);
}
void BuildConfigurationModel::removedBuildConfiguration(BuildConfiguration *bc)
......
......@@ -46,11 +46,10 @@ public:
BuildConfiguration *buildConfigurationAt(int i);
BuildConfiguration *buildConfigurationFor(const QModelIndex &idx);
QModelIndex indexFor(BuildConfiguration *rc);
private slots:
private:
void addedBuildConfiguration(ProjectExplorer::BuildConfiguration*);
void removedBuildConfiguration(ProjectExplorer::BuildConfiguration*);
void displayNameChanged();
private:
Target *m_target;
QList<BuildConfiguration *> m_buildConfigurations;
};
......
......@@ -46,15 +46,15 @@ BuildEnvironmentWidget::BuildEnvironmentWidget(BuildConfiguration *bc)
m_buildEnvironmentWidget = new EnvironmentWidget(this, m_clearSystemEnvironmentCheckBox);
vbox->addWidget(m_buildEnvironmentWidget);
connect(m_buildEnvironmentWidget, SIGNAL(userChangesChanged()),
this, SLOT(environmentModelUserChangesChanged()));
connect(m_clearSystemEnvironmentCheckBox, SIGNAL(toggled(bool)),
this, SLOT(clearSystemEnvironmentCheckBoxClicked(bool)));
connect(m_buildEnvironmentWidget, &EnvironmentWidget::userChangesChanged,
this, &BuildEnvironmentWidget::environmentModelUserChangesChanged);
connect(m_clearSystemEnvironmentCheckBox, &QAbstractButton::toggled,
this, &BuildEnvironmentWidget::clearSystemEnvironmentCheckBoxClicked);
m_buildConfiguration = bc;
connect(m_buildConfiguration->target(), SIGNAL(environmentChanged()),
this, SLOT(environmentChanged()));
connect(m_buildConfiguration->target(), &Target::environmentChanged,
this, &BuildEnvironmentWidget::environmentChanged);
m_clearSystemEnvironmentCheckBox->setChecked(!m_buildConfiguration->useSystemEnvironment());
m_buildEnvironmentWidget->setBaseEnvironment(m_buildConfiguration->baseEnvironment());
......
......@@ -44,12 +44,11 @@ class PROJECTEXPLORER_EXPORT BuildEnvironmentWidget : public NamedWidget
public:
BuildEnvironmentWidget(BuildConfiguration *bc);
private slots:
private:
void environmentModelUserChangesChanged();
void clearSystemEnvironmentCheckBoxClicked(bool checked);
void environmentChanged();
private:
EnvironmentWidget *m_buildEnvironmentWidget;
QCheckBox *m_clearSystemEnvironmentCheckBox;
BuildConfiguration *m_buildConfiguration;
......
......@@ -116,18 +116,18 @@ BuildManager::BuildManager(QObject *parent, QAction *cancelBuildAction)
m_instance = this;
d = new BuildManagerPrivate;
connect(&d->m_watcher, SIGNAL(finished()),
this, SLOT(nextBuildQueue()), Qt::QueuedConnection);
connect(&d->m_watcher, &QFutureWatcherBase::finished,
this, &BuildManager::nextBuildQueue, Qt::QueuedConnection);
connect(&d->m_watcher, SIGNAL(progressValueChanged(int)),
this, SLOT(progressChanged()));
connect(&d->m_watcher, SIGNAL(progressTextChanged(QString)),
this, SLOT(progressTextChanged()));
connect(&d->m_watcher, SIGNAL(progressRangeChanged(int,int)),
this, SLOT(progressChanged()));
connect(&d->m_watcher, &QFutureWatcherBase::progressValueChanged,
this, &BuildManager::progressChanged);
connect(&d->m_watcher, &QFutureWatcherBase::progressTextChanged,
this, &BuildManager::progressTextChanged);
connect(&d->m_watcher, &QFutureWatcherBase::progressRangeChanged,
this, &BuildManager::progressChanged);