ProjectExplorer: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: I619db09a79760186b72e7662490ed1205155c1a7
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2016-01-29 16:38:37 +02:00
committed by Orgad Shaneh
parent db8b9f9463
commit 15f8bb07ed
137 changed files with 901 additions and 919 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -42,7 +42,7 @@ public:
void refresh(QFutureInterface<void> &future);
void prepareSearch(const QString &entry);
private slots:
private:
void markFilesAsOutOfDate();
};

View File

@@ -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

View File

@@ -62,10 +62,9 @@ protected:
QString label() const;
QString toolTip() const;
private slots:
private:
void handleFileListChanged();
private:
QPointer<QWidget> m_configWidget;
};

View File

@@ -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,

View File

@@ -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;
};

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -101,11 +101,10 @@ protected:
void cloneSteps(BuildConfiguration *source);
void emitEnvironmentChanged();
private slots:
private:
void handleKitUpdate();
void emitBuildDirectoryChanged();
private:
void ctor();
bool m_clearSystemEnvironment;

View File

@@ -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)

View File

@@ -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;
};

View File

@@ -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());

View File

@@ -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;

View File

@@ -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);
connect(SessionManager::instance(), SIGNAL(aboutToRemoveProject(ProjectExplorer::Project*)),
this, SLOT(aboutToRemoveProject(ProjectExplorer::Project*)));
connect(SessionManager::instance(), &SessionManager::aboutToRemoveProject,
this, &BuildManager::aboutToRemoveProject);
d->m_outputWindow = new Internal::CompileOutputWindow(cancelBuildAction);
ExtensionSystem::PluginManager::addObject(d->m_outputWindow);
@@ -138,16 +138,16 @@ BuildManager::BuildManager(QObject *parent, QAction *cancelBuildAction)
qRegisterMetaType<ProjectExplorer::BuildStep::OutputFormat>();
qRegisterMetaType<ProjectExplorer::BuildStep::OutputNewlineSetting>();
connect(d->m_taskWindow, SIGNAL(tasksChanged()),
this, SLOT(updateTaskCount()));
connect(d->m_taskWindow, &Internal::TaskWindow::tasksChanged,
this, &BuildManager::updateTaskCount);
connect(d->m_taskWindow, SIGNAL(tasksCleared()),
this,SIGNAL(tasksCleared()));
connect(d->m_taskWindow, &Internal::TaskWindow::tasksCleared,
this,&BuildManager::tasksCleared);
connect(&d->m_progressWatcher, SIGNAL(canceled()),
this, SLOT(cancel()));
connect(&d->m_progressWatcher, SIGNAL(finished()),
this, SLOT(finish()));
connect(&d->m_progressWatcher, &QFutureWatcherBase::canceled,
this, &BuildManager::cancel);
connect(&d->m_progressWatcher, &QFutureWatcherBase::finished,
this, &BuildManager::finish);
}
BuildManager *BuildManager::instance()
@@ -235,14 +235,14 @@ void BuildManager::finish()
QString time = format.toString(QLatin1String("h:mm:ss"));
if (time.startsWith(QLatin1String("0:")))
time.remove(0, 2); // Don't display zero hours
addToOutputWindow(tr("Elapsed time: %1.") .arg(time), BuildStep::MessageOutput);
m_instance->addToOutputWindow(tr("Elapsed time: %1.") .arg(time), BuildStep::MessageOutput);
QApplication::alert(ICore::mainWindow(), 3000);
}
void BuildManager::emitCancelMessage()
{
addToOutputWindow(tr("Canceled build/deployment."), BuildStep::ErrorMessageOutput);
m_instance->addToOutputWindow(tr("Canceled build/deployment."), BuildStep::ErrorMessageOutput);
}
void BuildManager::clearBuildQueue()
@@ -310,7 +310,8 @@ void BuildManager::startBuildQueue()
d->m_futureProgress = ProgressManager::addTask(d->m_progressFutureInterface->future(),
QString(), "ProjectExplorer.Task.Build",
ProgressManager::KeepOnFinish | ProgressManager::ShowInApplicationIcon);
connect(d->m_futureProgress.data(), SIGNAL(clicked()), m_instance, SLOT(showBuildResults()));
connect(d->m_futureProgress.data(), &FutureProgress::clicked,
m_instance, &BuildManager::showBuildResults);
d->m_futureProgress.data()->setWidget(new Internal::BuildProgress(d->m_taskWindow));
d->m_futureProgress.data()->setStatusBarWidget(new Internal::BuildProgress(d->m_taskWindow,
Qt::Horizontal));
@@ -344,7 +345,7 @@ void BuildManager::addToTaskWindow(const Task &task, int linkedOutputLines, int
}
void BuildManager::addToOutputWindow(const QString &string, BuildStep::OutputFormat format,
BuildStep::OutputNewlineSetting newLineSetting)
BuildStep::OutputNewlineSetting newlineSettings)
{
QString stringToWrite;
if (format == BuildStep::MessageOutput || format == BuildStep::ErrorMessageOutput) {
@@ -352,15 +353,15 @@ void BuildManager::addToOutputWindow(const QString &string, BuildStep::OutputFor
stringToWrite += QLatin1String(": ");
}
stringToWrite += string;
if (newLineSetting == BuildStep::DoAppendNewline)
if (newlineSettings == BuildStep::DoAppendNewline)
stringToWrite += QLatin1Char('\n');
d->m_outputWindow->appendText(stringToWrite, format);
}
void BuildManager::buildStepFinishedAsync()
{
disconnect(d->m_currentBuildStep, SIGNAL(finished()),
m_instance, SLOT(buildStepFinishedAsync()));
disconnect(d->m_currentBuildStep, &BuildStep::finished,
this, &BuildManager::buildStepFinishedAsync);
d->m_futureInterfaceForAysnc = QFutureInterface<bool>();
nextBuildQueue();
}
@@ -370,7 +371,7 @@ void BuildManager::nextBuildQueue()
d->m_outputWindow->flush();
if (d->m_canceling) {
d->m_canceling = false;
QTimer::singleShot(0, m_instance, SLOT(emitCancelMessage()));
QTimer::singleShot(0, m_instance, &BuildManager::emitCancelMessage);
disconnectOutput(d->m_currentBuildStep);
decrementActiveBuildSteps(d->m_currentBuildStep);
@@ -454,8 +455,8 @@ void BuildManager::nextStep()
}
if (d->m_currentBuildStep->runInGuiThread()) {
connect (d->m_currentBuildStep, SIGNAL(finished()),
m_instance, SLOT(buildStepFinishedAsync()));
connect(d->m_currentBuildStep, &BuildStep::finished,
m_instance, &BuildManager::buildStepFinishedAsync);
d->m_watcher.setFuture(d->m_futureInterfaceForAysnc.future());
d->m_currentBuildStep->run(d->m_futureInterfaceForAysnc);
} else {
@@ -492,10 +493,8 @@ bool BuildManager::buildQueueAppend(QList<BuildStep *> steps, QStringList names,
int i = 0;
for (; i < count; ++i) {
BuildStep *bs = steps.at(i);
connect(bs, SIGNAL(addTask(ProjectExplorer::Task, int, int)),
m_instance, SLOT(addToTaskWindow(ProjectExplorer::Task, int, int)));
connect(bs, SIGNAL(addOutput(QString,ProjectExplorer::BuildStep::OutputFormat,ProjectExplorer::BuildStep::OutputNewlineSetting)),
m_instance, SLOT(addToOutputWindow(QString,ProjectExplorer::BuildStep::OutputFormat,ProjectExplorer::BuildStep::OutputNewlineSetting)));
connect(bs, &BuildStep::addTask, m_instance, &BuildManager::addToTaskWindow);
connect(bs, &BuildStep::addOutput, m_instance, &BuildManager::addToOutputWindow);
if (bs->enabled()) {
init = bs->init(earlierSteps);
if (!init)
@@ -654,12 +653,8 @@ void BuildManager::decrementActiveBuildSteps(BuildStep *bs)
void BuildManager::disconnectOutput(BuildStep *bs)
{
disconnect(bs, SIGNAL(addTask(ProjectExplorer::Task, int, int)),
m_instance, SLOT(addToTaskWindow(ProjectExplorer::Task, int, int)));
disconnect(bs, SIGNAL(addOutput(QString, ProjectExplorer::BuildStep::OutputFormat,
ProjectExplorer::BuildStep::OutputNewlineSetting)),
m_instance, SLOT(addToOutputWindow(QString, ProjectExplorer::BuildStep::OutputFormat,
ProjectExplorer::BuildStep::OutputNewlineSetting)));
disconnect(bs, &BuildStep::addTask, m_instance, 0);
disconnect(bs, &BuildStep::addOutput, m_instance, 0);
}
} // namespace ProjectExplorer

View File

@@ -80,12 +80,12 @@ signals:
void taskAdded(const ProjectExplorer::Task &task);
void tasksCleared();
private slots:
private:
static void addToTaskWindow(const ProjectExplorer::Task &task, int linkedOutputLines, int skipLines);
static void addToOutputWindow(const QString &string, ProjectExplorer::BuildStep::OutputFormat,
ProjectExplorer::BuildStep::OutputNewlineSetting = BuildStep::DoAppendNewline);
static void addToOutputWindow(const QString &string, BuildStep::OutputFormat format,
BuildStep::OutputNewlineSetting newlineSettings = BuildStep::DoAppendNewline);
static void buildStepFinishedAsync();
void buildStepFinishedAsync();
static void nextBuildQueue();
static void progressChanged();
static void progressTextChanged();
@@ -94,7 +94,6 @@ private slots:
static void updateTaskCount();
static void finish();
private:
static void startBuildQueue();
static void nextStep();
static void clearBuildQueue();

View File

@@ -87,7 +87,7 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation
m_contentWidget->hide();
connect(m_taskWindow, SIGNAL(tasksChanged()), this, SLOT(updateState()));
connect(m_taskWindow.data(), &TaskWindow::tasksChanged, this, &BuildProgress::updateState);
}
void BuildProgress::updateState()

View File

@@ -42,10 +42,9 @@ class BuildProgress : public QWidget
public:
BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation = Qt::Vertical);
private slots:
private:
void updateState();
private:
QWidget *m_contentWidget;
QLabel *m_errorIcon;
QLabel *m_warningIcon;

View File

@@ -116,19 +116,19 @@ BuildSettingsWidget::BuildSettingsWidget(Target *target) :
updateAddButtonMenu();
updateBuildSettings();
connect(m_buildConfigurationComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(currentIndexChanged(int)));
connect(m_buildConfigurationComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &BuildSettingsWidget::currentIndexChanged);
connect(m_removeButton, SIGNAL(clicked()),
this, SLOT(deleteConfiguration()));
connect(m_removeButton, &QAbstractButton::clicked,
this, [this]() { deleteConfiguration(m_buildConfiguration); });
connect(m_renameButton, SIGNAL(clicked()),
this, SLOT(renameConfiguration()));
connect(m_renameButton, &QAbstractButton::clicked,
this, &BuildSettingsWidget::renameConfiguration);
connect(m_target, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
this, SLOT(updateActiveConfiguration()));
connect(m_target, &Target::activeBuildConfigurationChanged,
this, &BuildSettingsWidget::updateActiveConfiguration);
connect(m_target, SIGNAL(kitChanged()), this, SLOT(updateAddButtonMenu()));
connect(m_target, &Target::kitChanged, this, &BuildSettingsWidget::updateAddButtonMenu);
}
void BuildSettingsWidget::addSubWidget(NamedWidget *widget)
@@ -137,8 +137,8 @@ void BuildSettingsWidget::addSubWidget(NamedWidget *widget)
QLabel *label = new QLabel(this);
label->setText(widget->displayName());
connect(widget, SIGNAL(displayNameChanged(QString)),
label, SLOT(setText(QString)));
connect(widget, &NamedWidget::displayNameChanged,
label, &QLabel::setText);
QFont f = label->font();
f.setBold(true);
f.setPointSizeF(f.pointSizeF() * 1.2);
@@ -174,8 +174,9 @@ void BuildSettingsWidget::updateAddButtonMenu()
if (m_target) {
if (m_target->activeBuildConfiguration()) {
m_addButtonMenu->addAction(tr("&Clone Selected"),
this, SLOT(cloneConfiguration()));
QAction *cloneAction = m_addButtonMenu->addAction(tr("&Clone Selected"));
connect(cloneAction, &QAction::triggered,
this, [this]() { cloneConfiguration(m_buildConfiguration); });
}
IBuildConfigurationFactory *factory = IBuildConfigurationFactory::find(m_target);
if (!factory)
@@ -259,16 +260,6 @@ void BuildSettingsWidget::createConfiguration(BuildInfo *info)
info->displayName = originalDisplayName;
}
void BuildSettingsWidget::cloneConfiguration()
{
cloneConfiguration(m_buildConfiguration);
}
void BuildSettingsWidget::deleteConfiguration()
{
deleteConfiguration(m_buildConfiguration);
}
QString BuildSettingsWidget::uniqueName(const QString & name)
{
QString result = name.trimmed();

View File

@@ -55,18 +55,15 @@ public:
void addSubWidget(NamedWidget *widget);
QList<NamedWidget *> subWidgets() const;
private slots:
private:
void updateBuildSettings();
void currentIndexChanged(int index);
void cloneConfiguration();
void deleteConfiguration();
void renameConfiguration();
void updateAddButtonMenu();
void updateActiveConfiguration();
private:
void createConfiguration(BuildInfo *info);
void cloneConfiguration(BuildConfiguration *toClone);
void deleteConfiguration(BuildConfiguration *toDelete);

View File

@@ -85,7 +85,7 @@ signals:
/// Adds \p string to the compile output view, formatted in \p format
void addOutput(const QString &string, ProjectExplorer::BuildStep::OutputFormat format,
ProjectExplorer::BuildStep::OutputNewlineSetting newlineSetting = DoAppendNewline) const;
ProjectExplorer::BuildStep::OutputNewlineSetting newlineSetting = DoAppendNewline);
void finished();
@@ -142,7 +142,8 @@ public:
SimpleBuildStepConfigWidget(BuildStep *step)
: m_step(step)
{
connect(m_step, SIGNAL(displayNameChanged()), SIGNAL(updateSummary()));
connect(m_step, &ProjectConfiguration::displayNameChanged,
this, &BuildStepConfigWidget::updateSummary);
}
~SimpleBuildStepConfigWidget() {}

View File

@@ -106,10 +106,10 @@ ToolWidget::ToolWidget(QWidget *parent)
layout->addWidget(m_secondWidget);
connect(m_disableButton, SIGNAL(clicked()), this, SIGNAL(disabledClicked()));
connect(m_upButton, SIGNAL(clicked()), this, SIGNAL(upClicked()));
connect(m_downButton, SIGNAL(clicked()), this, SIGNAL(downClicked()));
connect(m_removeButton, SIGNAL(clicked()), this, SIGNAL(removeClicked()));
connect(m_disableButton, &QAbstractButton::clicked, this, &ToolWidget::disabledClicked);
connect(m_upButton, &QAbstractButton::clicked, this, &ToolWidget::upClicked);
connect(m_downButton, &QAbstractButton::clicked, this, &ToolWidget::downClicked);
connect(m_removeButton, &QAbstractButton::clicked, this, &ToolWidget::removeClicked);
}
void ToolWidget::setOpacity(qreal value)
@@ -255,14 +255,17 @@ void BuildStepListWidget::init(BuildStepList *bsl)
setupUi();
if (m_buildStepList) {
disconnect(m_buildStepList, SIGNAL(stepInserted(int)), this, SLOT(addBuildStep(int)));
disconnect(m_buildStepList, SIGNAL(stepRemoved(int)), this, SLOT(removeBuildStep(int)));
disconnect(m_buildStepList, SIGNAL(stepMoved(int,int)), this, SLOT(stepMoved(int,int)));
disconnect(m_buildStepList, &BuildStepList::stepInserted,
this, &BuildStepListWidget::addBuildStep);
disconnect(m_buildStepList, &BuildStepList::stepRemoved,
this, &BuildStepListWidget::removeBuildStep);
disconnect(m_buildStepList, &BuildStepList::stepMoved,
this, &BuildStepListWidget::stepMoved);
}
connect(bsl, SIGNAL(stepInserted(int)), this, SLOT(addBuildStep(int)));
connect(bsl, SIGNAL(stepRemoved(int)), this, SLOT(removeBuildStep(int)));
connect(bsl, SIGNAL(stepMoved(int,int)), this, SLOT(stepMoved(int,int)));
connect(bsl, &BuildStepList::stepInserted, this, &BuildStepListWidget::addBuildStep);
connect(bsl, &BuildStepList::stepRemoved, this, &BuildStepListWidget::removeBuildStep);
connect(bsl, &BuildStepList::stepMoved, this, &BuildStepListWidget::stepMoved);
qDeleteAll(m_buildStepsData);
m_buildStepsData.clear();
@@ -326,22 +329,22 @@ void BuildStepListWidget::addBuildStepWidget(int pos, BuildStep *step)
m_vbox->insertWidget(pos, s->detailsWidget);
connect(s->widget, SIGNAL(updateSummary()),
this, SLOT(updateSummary()));
connect(s->widget, SIGNAL(updateAdditionalSummary()),
this, SLOT(updateAdditionalSummary()));
connect(s->widget, &BuildStepConfigWidget::updateSummary,
this, &BuildStepListWidget::updateSummary);
connect(s->widget, &BuildStepConfigWidget::updateAdditionalSummary,
this, &BuildStepListWidget::updateAdditionalSummary);
connect(s->step, SIGNAL(enabledChanged()),
this, SLOT(updateEnabledState()));
connect(s->step, &BuildStep::enabledChanged,
this, &BuildStepListWidget::updateEnabledState);
connect(s->toolWidget, SIGNAL(disabledClicked()),
m_disableMapper, SLOT(map()));
connect(s->toolWidget, SIGNAL(upClicked()),
m_upMapper, SLOT(map()));
connect(s->toolWidget, SIGNAL(downClicked()),
m_downMapper, SLOT(map()));
connect(s->toolWidget, SIGNAL(removeClicked()),
m_removeMapper, SLOT(map()));
connect(s->toolWidget, &ToolWidget::disabledClicked,
m_disableMapper, static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
connect(s->toolWidget, &ToolWidget::upClicked,
m_upMapper, static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
connect(s->toolWidget, &ToolWidget::downClicked,
m_downMapper, static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
connect(s->toolWidget, &ToolWidget::removeClicked,
m_removeMapper, static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
}
void BuildStepListWidget::addBuildStep(int pos)
@@ -413,17 +416,17 @@ void BuildStepListWidget::setupUi()
return;
m_disableMapper = new QSignalMapper(this);
connect(m_disableMapper, SIGNAL(mapped(int)),
this, SLOT(triggerDisable(int)));
connect(m_disableMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
this, &BuildStepListWidget::triggerDisable);
m_upMapper = new QSignalMapper(this);
connect(m_upMapper, SIGNAL(mapped(int)),
this, SLOT(triggerStepMoveUp(int)));
connect(m_upMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
this, &BuildStepListWidget::triggerStepMoveUp);
m_downMapper = new QSignalMapper(this);
connect(m_downMapper, SIGNAL(mapped(int)),
this, SLOT(triggerStepMoveDown(int)));
connect(m_downMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
this, &BuildStepListWidget::triggerStepMoveDown);
m_removeMapper = new QSignalMapper(this);
connect(m_removeMapper, SIGNAL(mapped(int)),
this, SLOT(triggerRemoveBuildStep(int)));
connect(m_removeMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
this, &BuildStepListWidget::triggerRemoveBuildStep);
m_vbox = new QVBoxLayout(this);
m_vbox->setContentsMargins(0, 0, 0, 0);
@@ -446,8 +449,8 @@ void BuildStepListWidget::setupUi()
m_vbox->addLayout(hboxLayout);
connect(m_addButton->menu(), SIGNAL(aboutToShow()),
this, SLOT(updateAddBuildStepMenu()));
connect(m_addButton->menu(), &QMenu::aboutToShow,
this, &BuildStepListWidget::updateAddBuildStepMenu);
}
void BuildStepListWidget::updateBuildStepButtonsState()

View File

@@ -103,7 +103,7 @@ public:
void init(BuildStepList *bsl);
private slots:
private:
void updateAddBuildStepMenu();
void addBuildStep(int pos);
void updateSummary();
@@ -116,7 +116,6 @@ private slots:
void removeBuildStep(int pos);
void triggerDisable(int pos);
private:
void setupUi();
void updateBuildStepButtonsState();
void addBuildStepWidget(int pos, BuildStep *step);

View File

@@ -55,7 +55,7 @@ CodeStyleSettingsWidget::CodeStyleSettingsWidget(Project *project) : QWidget(),
m_ui.languageComboBox->addItem(factory->displayName());
}
connect(m_ui.languageComboBox, SIGNAL(currentIndexChanged(int)),
m_ui.stackedWidget, SLOT(setCurrentIndex(int)));
connect(m_ui.languageComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
m_ui.stackedWidget, &QStackedWidget::setCurrentIndex);
}

View File

@@ -76,8 +76,8 @@ public:
fontSettingsChanged();
connect(TextEditor::TextEditorSettings::instance(), SIGNAL(fontSettingsChanged(TextEditor::FontSettings)),
this, SLOT(fontSettingsChanged()));
connect(TextEditor::TextEditorSettings::instance(), &TextEditor::TextEditorSettings::fontSettingsChanged,
this, &CompileOutputTextEdit::fontSettingsChanged);
connect(Core::ICore::instance(), &Core::ICore::saveSettingsRequested,
this, &CompileOutputTextEdit::saveSettings);
@@ -100,7 +100,7 @@ public:
{
m_taskids.clear();
}
private slots:
private:
void fontSettingsChanged()
{
setBaseFont(TextEditor::TextEditorSettings::fontSettings().font());
@@ -190,8 +190,8 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
m_handler = new ShowOutputTaskHandler(this);
ExtensionSystem::PluginManager::addObject(m_handler);
connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
this, SLOT(updateWordWrapMode()));
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::settingsChanged,
this, &CompileOutputWindow::updateWordWrapMode);
updateWordWrapMode();
}

View File

@@ -81,11 +81,10 @@ public:
void flush();
private slots:
private:
void updateWordWrapMode();
void updateZoomEnabled();
private:
CompileOutputTextEdit *m_outputWindow;
QHash<unsigned int, QPair<int, int>> m_taskPositions;
ShowOutputTaskHandler * m_handler;

View File

@@ -73,10 +73,12 @@ void CurrentProjectFilter::currentProjectChanged()
if (project == m_project)
return;
if (m_project)
disconnect(m_project, SIGNAL(fileListChanged()), this, SLOT(markFilesAsOutOfDate()));
disconnect(m_project, &Project::fileListChanged,
this, &CurrentProjectFilter::markFilesAsOutOfDate);
if (project)
connect(project, SIGNAL(fileListChanged()), this, SLOT(markFilesAsOutOfDate()));
connect(project, &Project::fileListChanged,
this, &CurrentProjectFilter::markFilesAsOutOfDate);
m_project = project;
markFilesAsOutOfDate();
@@ -85,5 +87,5 @@ void CurrentProjectFilter::currentProjectChanged()
void CurrentProjectFilter::refresh(QFutureInterface<void> &future)
{
Q_UNUSED(future)
QTimer::singleShot(0, this, SLOT(markFilesAsOutOfDate()));
QTimer::singleShot(0, this, &CurrentProjectFilter::markFilesAsOutOfDate);
}

View File

@@ -46,11 +46,10 @@ public:
void refresh(QFutureInterface<void> &future);
void prepareSearch(const QString &entry);
private slots:
private:
void currentProjectChanged();
void markFilesAsOutOfDate();
private:
Project *m_project;
};

View File

@@ -55,7 +55,7 @@ protected:
QVariant additionalParameters() const;
QString label() const;
private slots:
private:
void handleProjectChanged();
void recheckEnabled();
};

View File

@@ -39,16 +39,24 @@ CustomParserConfigDialog::CustomParserConfigDialog(QDialog *parent) :
{
ui->setupUi(this);
connect(ui->errorPattern, SIGNAL(textChanged(QString)), this, SLOT(changed()));
connect(ui->errorOutputMessage, SIGNAL(textChanged(QString)), this, SLOT(changed()));
connect(ui->errorFileNameCap, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(ui->errorLineNumberCap, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(ui->errorMessageCap, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(ui->warningPattern, SIGNAL(textChanged(QString)), this, SLOT(changed()));
connect(ui->warningOutputMessage, SIGNAL(textChanged(QString)), this, SLOT(changed()));
connect(ui->warningFileNameCap, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(ui->warningLineNumberCap, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(ui->warningMessageCap, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(ui->errorPattern, &QLineEdit::textChanged, this, &CustomParserConfigDialog::changed);
connect(ui->errorOutputMessage, &QLineEdit::textChanged,
this, &CustomParserConfigDialog::changed);
connect(ui->errorFileNameCap, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &CustomParserConfigDialog::changed);
connect(ui->errorLineNumberCap, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &CustomParserConfigDialog::changed);
connect(ui->errorMessageCap, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &CustomParserConfigDialog::changed);
connect(ui->warningPattern, &QLineEdit::textChanged, this, &CustomParserConfigDialog::changed);
connect(ui->warningOutputMessage, &QLineEdit::textChanged,
this, &CustomParserConfigDialog::changed);
connect(ui->warningFileNameCap, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &CustomParserConfigDialog::changed);
connect(ui->warningLineNumberCap, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &CustomParserConfigDialog::changed);
connect(ui->warningMessageCap, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &CustomParserConfigDialog::changed);
changed();
m_dirty = false;

View File

@@ -77,10 +77,9 @@ public:
bool isDirty() const;
private slots:
private:
void changed();
private:
bool checkPattern(QLineEdit *pattern, const QString &outputText,
QString *errorMessage, QRegularExpressionMatch *match);

View File

@@ -528,17 +528,19 @@ CustomToolChainConfigWidget::CustomToolChainConfigWidget(CustomToolChain *tc) :
m_predefinedDetails->updateSummaryText();
m_headerDetails->updateSummaryText();
connect(m_compilerCommand, SIGNAL(rawPathChanged(QString)), this, SIGNAL(dirty()));
connect(m_makeCommand, SIGNAL(rawPathChanged(QString)), this, SIGNAL(dirty()));
connect(m_abiWidget, SIGNAL(abiChanged()), this, SIGNAL(dirty()));
connect(m_predefinedMacros, SIGNAL(textChanged()), this, SLOT(updateSummaries()));
connect(m_headerPaths, SIGNAL(textChanged()), this, SLOT(updateSummaries()));
connect(m_cxx11Flags, SIGNAL(textChanged(QString)), this, SIGNAL(dirty()));
connect(m_mkspecs, SIGNAL(textChanged(QString)), this, SIGNAL(dirty()));
connect(m_errorParserComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(errorParserChanged(int)));
connect(m_customParserSettingsButton, SIGNAL(clicked()),
this, SLOT(openCustomParserSettingsDialog()));
connect(m_compilerCommand, &PathChooser::rawPathChanged, this, &ToolChainConfigWidget::dirty);
connect(m_makeCommand, &PathChooser::rawPathChanged, this, &ToolChainConfigWidget::dirty);
connect(m_abiWidget, &AbiWidget::abiChanged, this, &ToolChainConfigWidget::dirty);
connect(m_predefinedMacros, &QPlainTextEdit::textChanged,
this, &CustomToolChainConfigWidget::updateSummaries);
connect(m_headerPaths, &QPlainTextEdit::textChanged,
this, &CustomToolChainConfigWidget::updateSummaries);
connect(m_cxx11Flags, &QLineEdit::textChanged, this, &ToolChainConfigWidget::dirty);
connect(m_mkspecs, &QLineEdit::textChanged, this, &ToolChainConfigWidget::dirty);
connect(m_errorParserComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &CustomToolChainConfigWidget::errorParserChanged);
connect(m_customParserSettingsButton, &QAbstractButton::clicked,
this, &CustomToolChainConfigWidget::openCustomParserSettingsDialog);
errorParserChanged(m_errorParserComboBox->currentIndex());
}

View File

@@ -169,7 +169,7 @@ class CustomToolChainConfigWidget : public ToolChainConfigWidget
public:
CustomToolChainConfigWidget(CustomToolChain *);
private slots:
private:
void updateSummaries();
void errorParserChanged(int index);
void openCustomParserSettingsDialog();

View File

@@ -146,7 +146,7 @@ protected:
void initProjectWizardDialog(BaseProjectWizardDialog *w, const QString &defaultPath,
const QList<QWizardPage *> &extensionPages) const;
private slots:
private:
void projectParametersChanged(const QString &project, const QString &path);
};

View File

@@ -213,7 +213,7 @@ QWidget *CustomWizardFieldPage::registerComboBox(const QString &fieldName,
} while (false);
registerField(fieldName, combo, "text", SIGNAL(text4Changed(QString)));
// Connect to completeChanged() for derived classes that reimplement isComplete()
connect(combo, SIGNAL(text4Changed(QString)), SIGNAL(completeChanged()));
connect(combo, &TextFieldComboBox::text4Changed, this, &QWizardPage::completeChanged);
return combo;
} // QComboBox
@@ -227,7 +227,7 @@ QWidget *CustomWizardFieldPage::registerTextEdit(const QString &fieldName,
textEdit->setAcceptRichText(acceptRichText);
// Connect to completeChanged() for derived classes that reimplement isComplete()
registerField(fieldName, textEdit, "plainText", SIGNAL(textChanged()));
connect(textEdit, SIGNAL(textChanged()), SIGNAL(completeChanged()));
connect(textEdit, &QTextEdit::textChanged, this, &QWizardPage::completeChanged);
const QString defaultText = field.controlAttributes.value(QLatin1String("defaulttext"));
m_textEdits.push_back(TextEditData(textEdit, defaultText));
return textEdit;
@@ -254,7 +254,7 @@ QWidget *CustomWizardFieldPage::registerPathChooser(const QString &fieldName,
registerField(fieldName, pathChooser, "path", SIGNAL(rawPathChanged(QString)));
// Connect to completeChanged() for derived classes that reimplement isComplete()
connect(pathChooser, SIGNAL(rawPathChanged(QString)), SIGNAL(completeChanged()));
connect(pathChooser, &PathChooser::rawPathChanged, this, &QWizardPage::completeChanged);
const QString defaultText = field.controlAttributes.value(QLatin1String("defaulttext"));
m_pathChoosers.push_back(PathChooserData(pathChooser, defaultText));
return pathChooser;
@@ -277,7 +277,7 @@ QWidget *CustomWizardFieldPage::registerCheckBox(const QString &fieldName,
checkBox->setFalseText(falseTextIt.value());
registerField(fieldName, checkBox, "text", SIGNAL(textChanged(QString)));
// Connect to completeChanged() for derived classes that reimplement isComplete()
connect(checkBox, SIGNAL(textChanged(QString)), SIGNAL(completeChanged()));
connect(checkBox, &TextFieldCheckBox::textChanged, this, &QWizardPage::completeChanged);
return checkBox;
}
@@ -296,7 +296,7 @@ QWidget *CustomWizardFieldPage::registerLineEdit(const QString &fieldName,
}
registerField(fieldName, lineEdit, "text", SIGNAL(textEdited(QString)));
// Connect to completeChanged() for derived classes that reimplement isComplete()
connect(lineEdit, SIGNAL(textEdited(QString)), SIGNAL(completeChanged()));
connect(lineEdit, &QLineEdit::textEdited, this, &QWizardPage::completeChanged);
const QString defaultText = field.controlAttributes.value(QLatin1String("defaulttext"));
const QString placeholderText = field.controlAttributes.value(QLatin1String("placeholdertext"));
@@ -434,7 +434,7 @@ CustomWizardPage::CustomWizardPage(const QSharedPointer<CustomWizardContext> &ct
{
m_pathChooser->setHistoryCompleter(QLatin1String("PE.ProjectDir.History"));
addRow(tr("Path:"), m_pathChooser);
connect(m_pathChooser, SIGNAL(validChanged(bool)), this, SIGNAL(completeChanged()));
connect(m_pathChooser, &PathChooser::validChanged, this, &QWizardPage::completeChanged);
}
QString CustomWizardPage::path() const

View File

@@ -57,14 +57,14 @@ DeployConfigurationModel::DeployConfigurationModel(Target *target, QObject *pare
m_deployConfigurations = m_target->deployConfigurations();
Utils::sort(m_deployConfigurations, DeployConfigurationComparer());
connect(target, SIGNAL(addedDeployConfiguration(ProjectExplorer::DeployConfiguration*)),
this, SLOT(addedDeployConfiguration(ProjectExplorer::DeployConfiguration*)));
connect(target, SIGNAL(removedDeployConfiguration(ProjectExplorer::DeployConfiguration*)),
this, SLOT(removedDeployConfiguration(ProjectExplorer::DeployConfiguration*)));
connect(target, &Target::addedDeployConfiguration,
this, &DeployConfigurationModel::addedDeployConfiguration);
connect(target, &Target::removedDeployConfiguration,
this, &DeployConfigurationModel::removedDeployConfiguration);
foreach (DeployConfiguration *dc, m_deployConfigurations)
connect(dc, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
connect(dc, &ProjectConfiguration::displayNameChanged,
this, &DeployConfigurationModel::displayNameChanged);
}
int DeployConfigurationModel::rowCount(const QModelIndex &parent) const
@@ -168,8 +168,8 @@ void DeployConfigurationModel::addedDeployConfiguration(DeployConfiguration *dc)
m_deployConfigurations.insert(i, dc);
endInsertRows();
connect(dc, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
connect(dc, &ProjectConfiguration::displayNameChanged,
this, &DeployConfigurationModel::displayNameChanged);
}
void DeployConfigurationModel::removedDeployConfiguration(DeployConfiguration *dc)

View File

@@ -47,11 +47,10 @@ public:
DeployConfiguration *deployConfigurationAt(int i);
DeployConfiguration *deployConfigurationFor(const QModelIndex &idx);
QModelIndex indexFor(DeployConfiguration *rc);
private slots:
private:
void addedDeployConfiguration(ProjectExplorer::DeployConfiguration*);
void removedDeployConfiguration(ProjectExplorer::DeployConfiguration*);
void displayNameChanged();
private:
Target *m_target;
QList<DeployConfiguration *> m_deployConfigurations;
};

View File

@@ -55,7 +55,8 @@ DeploymentDataView::DeploymentDataView(Target *target, QWidget *parent) :
d->target = target;
connect(target, SIGNAL(deploymentDataChanged()), SLOT(updateDeploymentDataModel()));
connect(target, &Target::deploymentDataChanged,
this, &DeploymentDataView::updateDeploymentDataModel);
updateDeploymentDataModel();
}

View File

@@ -42,10 +42,9 @@ public:
explicit DeploymentDataView(Target *target, QWidget *parent = 0);
~DeploymentDataView();
private slots:
private:
void updateDeploymentDataModel();
private:
Internal::DeploymentDataViewPrivate * const d;
};

View File

@@ -41,8 +41,8 @@ DesktopDeviceConfigurationWidget::DesktopDeviceConfigurationWidget(const IDevice
m_ui(new Ui::DesktopDeviceConfigurationWidget)
{
m_ui->setupUi(this);
connect(m_ui->freePortsLineEdit, SIGNAL(textChanged(QString)),
SLOT(updateFreePorts()));
connect(m_ui->freePortsLineEdit, &QLineEdit::textChanged,
this, &DesktopDeviceConfigurationWidget::updateFreePorts);
initGui();
}

View File

@@ -40,10 +40,9 @@ public:
void updateDeviceFromUi();
private slots:
private:
void updateFreePorts();
private:
void initGui();
private:

View File

@@ -56,9 +56,10 @@ DeviceFactorySelectionDialog::DeviceFactorySelectionDialog(QWidget *parent) :
}
}
connect(ui->listWidget, SIGNAL(itemSelectionChanged()), SLOT(handleItemSelectionChanged()));
connect(ui->listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
SLOT(handleItemDoubleClicked()));
connect(ui->listWidget, &QListWidget::itemSelectionChanged,
this, &DeviceFactorySelectionDialog::handleItemSelectionChanged);
connect(ui->listWidget, &QListWidget::itemDoubleClicked,
this, &DeviceFactorySelectionDialog::handleItemDoubleClicked);
handleItemSelectionChanged();
}

View File

@@ -46,8 +46,8 @@ public:
Core::Id selectedId() const;
private:
Q_SLOT void handleItemSelectionChanged();
Q_SLOT void handleItemDoubleClicked();
void handleItemSelectionChanged();
void handleItemDoubleClicked();
Ui::DeviceFactorySelectionDialog *ui;
};

View File

@@ -354,7 +354,7 @@ DeviceManager::DeviceManager(bool isInstance) : d(new DeviceManagerPrivate)
if (!d->hostKeyDatabase->load(keyFilePath, &error))
Core::MessageManager::write(error);
}
connect(Core::ICore::instance(), SIGNAL(saveSettingsRequested()), SLOT(save()));
connect(Core::ICore::instance(), &Core::ICore::saveSettingsRequested, this, &DeviceManager::save);
}
}
@@ -478,11 +478,11 @@ void ProjectExplorerPlugin::testDeviceManager()
QVERIFY(!mgr->find(dev->id()));
const int oldDeviceCount = mgr->deviceCount();
QSignalSpy deviceAddedSpy(mgr, SIGNAL(deviceAdded(Core::Id)));
QSignalSpy deviceRemovedSpy(mgr, SIGNAL(deviceRemoved(Core::Id)));
QSignalSpy deviceUpdatedSpy(mgr, SIGNAL(deviceUpdated(Core::Id)));
QSignalSpy deviceListReplacedSpy(mgr, SIGNAL(deviceListReplaced()));
QSignalSpy updatedSpy(mgr, SIGNAL(updated()));
QSignalSpy deviceAddedSpy(mgr, &DeviceManager::deviceAdded);
QSignalSpy deviceRemovedSpy(mgr, &DeviceManager::deviceRemoved);
QSignalSpy deviceUpdatedSpy(mgr, &DeviceManager::deviceUpdated);
QSignalSpy deviceListReplacedSpy(mgr, &DeviceManager::deviceListReplaced);
QSignalSpy updatedSpy(mgr, &DeviceManager::updated);
mgr->addDevice(dev);
QCOMPARE(mgr->deviceCount(), oldDeviceCount + 1);

View File

@@ -79,10 +79,9 @@ signals:
void devicesLoaded(); // Emitted once load() is done
private slots:
private:
void save();
private:
DeviceManager(bool isInstance = true);
void load();

View File

@@ -48,10 +48,14 @@ DeviceManagerModel::DeviceManagerModel(const DeviceManager *deviceManager, QObje
{
d->deviceManager = deviceManager;
handleDeviceListChanged();
connect(deviceManager, SIGNAL(deviceAdded(Core::Id)), SLOT(handleDeviceAdded(Core::Id)));
connect(deviceManager, SIGNAL(deviceRemoved(Core::Id)), SLOT(handleDeviceRemoved(Core::Id)));
connect(deviceManager, SIGNAL(deviceUpdated(Core::Id)), SLOT(handleDeviceUpdated(Core::Id)));
connect(deviceManager, SIGNAL(deviceListReplaced()), SLOT(handleDeviceListChanged()));
connect(deviceManager, &DeviceManager::deviceAdded,
this, &DeviceManagerModel::handleDeviceAdded);
connect(deviceManager, &DeviceManager::deviceRemoved,
this, &DeviceManagerModel::handleDeviceRemoved);
connect(deviceManager, &DeviceManager::deviceUpdated,
this, &DeviceManagerModel::handleDeviceUpdated);
connect(deviceManager, &DeviceManager::deviceListReplaced,
this, &DeviceManagerModel::handleDeviceListChanged);
}
DeviceManagerModel::~DeviceManagerModel()

View File

@@ -54,13 +54,12 @@ public:
void updateDevice(Core::Id id);
private slots:
private:
void handleDeviceAdded(Core::Id id);
void handleDeviceRemoved(Core::Id id);
void handleDeviceUpdated(Core::Id id);
void handleDeviceListChanged();
private:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
bool matchesTypeFilter(const IDevice::ConstPtr &dev) const;

View File

@@ -89,9 +89,8 @@ class DeviceProcessesDialogPrivate : public QObject
Q_OBJECT
public:
DeviceProcessesDialogPrivate(KitChooser *chooser, QWidget *parent);
DeviceProcessesDialogPrivate(KitChooser *chooser, QDialog *parent);
public slots:
void setDevice(const IDevice::ConstPtr &device);
void updateProcessList();
void updateDevice();
@@ -102,8 +101,7 @@ public slots:
void updateButtons();
DeviceProcessItem selectedProcess() const;
public:
QWidget *q;
QDialog *q;
DeviceProcessList *processList;
ProcessListFilterModel proxyModel;
QLabel *kitLabel;
@@ -118,7 +116,7 @@ public:
QDialogButtonBox *buttonBox;
};
DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, QWidget *parent)
DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, QDialog *parent)
: q(parent)
, kitLabel(new QLabel(DeviceProcessesDialog::tr("Kit:"), parent))
, kitChooser(chooser)
@@ -187,17 +185,24 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
proxyModel.setFilterRegExp(processFilterLineEdit->text());
connect(processFilterLineEdit, SIGNAL(textChanged(QString)),
&proxyModel, SLOT(setFilterRegExp(QString)));
connect(processFilterLineEdit,
static_cast<void (FancyLineEdit::*)(const QString &)>(&FancyLineEdit::textChanged),
&proxyModel,
static_cast<void (ProcessListFilterModel::*)(const QString &)>(
&ProcessListFilterModel::setFilterRegExp));
connect(procView->selectionModel(),
SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
SLOT(updateButtons()));
connect(updateListButton, SIGNAL(clicked()), SLOT(updateProcessList()));
connect(kitChooser, SIGNAL(currentIndexChanged(int)), SLOT(updateDevice()));
connect(killProcessButton, SIGNAL(clicked()), SLOT(killProcess()));
connect(&proxyModel, SIGNAL(layoutChanged()), SLOT(handleProcessListUpdated()));
connect(buttonBox, SIGNAL(accepted()), q, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
&QItemSelectionModel::selectionChanged,
this, &DeviceProcessesDialogPrivate::updateButtons);
connect(updateListButton, &QAbstractButton::clicked,
this, &DeviceProcessesDialogPrivate::updateProcessList);
connect(kitChooser, &KitChooser::currentIndexChanged,
this, &DeviceProcessesDialogPrivate::updateDevice);
connect(killProcessButton, &QAbstractButton::clicked,
this, &DeviceProcessesDialogPrivate::killProcess);
connect(&proxyModel, &QAbstractItemModel::layoutChanged,
this, &DeviceProcessesDialogPrivate::handleProcessListUpdated);
connect(buttonBox, &QDialogButtonBox::accepted, q, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, q, &QDialog::reject);
QWidget::setTabOrder(kitChooser, processFilterLineEdit);
QWidget::setTabOrder(processFilterLineEdit, procView);
@@ -216,12 +221,12 @@ void DeviceProcessesDialogPrivate::setDevice(const IDevice::ConstPtr &device)
QTC_ASSERT(processList, return);
proxyModel.setSourceModel(processList);
connect(processList, SIGNAL(error(QString)),
SLOT(handleRemoteError(QString)));
connect(processList, SIGNAL(processListUpdated()),
SLOT(handleProcessListUpdated()));
connect(processList, SIGNAL(processKilled()),
SLOT(handleProcessKilled()), Qt::QueuedConnection);
connect(processList, &DeviceProcessList::error,
this, &DeviceProcessesDialogPrivate::handleRemoteError);
connect(processList, &DeviceProcessList::processListUpdated,
this, &DeviceProcessesDialogPrivate::handleProcessListUpdated);
connect(processList, &DeviceProcessList::processKilled,
this, &DeviceProcessesDialogPrivate::handleProcessKilled, Qt::QueuedConnection);
updateButtons();
updateProcessList();
@@ -329,8 +334,8 @@ void DeviceProcessesDialog::addAcceptButton(const QString &label)
{
d->acceptButton = new QPushButton(label);
d->buttonBox->addButton(d->acceptButton, QDialogButtonBox::AcceptRole);
connect(d->procView, SIGNAL(activated(QModelIndex)),
d->acceptButton, SLOT(click()));
connect(d->procView, &QAbstractItemView::activated,
d->acceptButton, &QAbstractButton::click);
d->buttonBox->addButton(QDialogButtonBox::Cancel);
}

View File

@@ -93,7 +93,8 @@ DeviceSettingsWidget::DeviceSettingsWidget(QWidget *parent)
m_configWidget(0)
{
initGui();
connect(m_deviceManager, SIGNAL(deviceUpdated(Core::Id)), SLOT(handleDeviceUpdated(Core::Id)));
connect(m_deviceManager, &DeviceManager::deviceUpdated,
this, &DeviceSettingsWidget::handleDeviceUpdated);
}
DeviceSettingsWidget::~DeviceSettingsWidget()
@@ -122,11 +123,11 @@ void DeviceSettingsWidget::initGui()
lastIndex = 0;
if (lastIndex < m_ui->configurationComboBox->count())
m_ui->configurationComboBox->setCurrentIndex(lastIndex);
connect(m_ui->configurationComboBox, SIGNAL(currentIndexChanged(int)),
SLOT(currentDeviceChanged(int)));
connect(m_ui->configurationComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &DeviceSettingsWidget::currentDeviceChanged);
currentDeviceChanged(currentIndex());
connect(m_ui->defaultDeviceButton, SIGNAL(clicked()),
SLOT(setDefaultDevice()));
connect(m_ui->defaultDeviceButton, &QAbstractButton::clicked,
this, &DeviceSettingsWidget::setDefaultDevice);
}
void DeviceSettingsWidget::addDevice()
@@ -280,14 +281,15 @@ void DeviceSettingsWidget::currentDeviceChanged(int index)
if (device->hasDeviceTester()) {
QPushButton * const button = new QPushButton(tr("Test"));
m_additionalActionButtons << button;
connect(button, SIGNAL(clicked()), SLOT(testDevice()));
connect(button, &QAbstractButton::clicked, this, &DeviceSettingsWidget::testDevice);
m_ui->buttonsLayout->insertWidget(m_ui->buttonsLayout->count() - 1, button);
}
if (device->canCreateProcessModel()) {
QPushButton * const button = new QPushButton(tr("Show Running Processes..."));
m_additionalActionButtons << button;
connect(button, SIGNAL(clicked()), SLOT(handleProcessListRequested()));
connect(button, &QAbstractButton::clicked,
this, &DeviceSettingsWidget::handleProcessListRequested);
m_ui->buttonsLayout->insertWidget(m_ui->buttonsLayout->count() - 1, button);
}

View File

@@ -55,10 +55,12 @@ DeviceTestDialog::DeviceTestDialog(const IDevice::ConstPtr &deviceConfiguration,
d->ui.setupUi(this);
d->deviceTester->setParent(this);
connect(d->deviceTester, SIGNAL(progressMessage(QString)), SLOT(handleProgressMessage(QString)));
connect(d->deviceTester, SIGNAL(errorMessage(QString)), SLOT(handleErrorMessage(QString)));
connect(d->deviceTester, SIGNAL(finished(ProjectExplorer::DeviceTester::TestResult)),
SLOT(handleTestFinished(ProjectExplorer::DeviceTester::TestResult)));
connect(d->deviceTester, &DeviceTester::progressMessage,
this, &DeviceTestDialog::handleProgressMessage);
connect(d->deviceTester, &DeviceTester::errorMessage,
this, &DeviceTestDialog::handleErrorMessage);
connect(d->deviceTester, &DeviceTester::finished,
this, &DeviceTestDialog::handleTestFinished);
d->deviceTester->testDevice(deviceConfiguration);
}

View File

@@ -43,12 +43,11 @@ public:
void reject();
private slots:
private:
void handleProgressMessage(const QString &message);
void handleErrorMessage(const QString &message);
void handleTestFinished(ProjectExplorer::DeviceTester::TestResult result);
private:
void addText(const QString &text, const QString &color, bool bold);
class DeviceTestDialogPrivate;

View File

@@ -69,12 +69,14 @@ void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device)
d->device = device;
d->connection = QSsh::acquireConnection(device->sshParameters());
connect(d->connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
connect(d->connection, &SshConnection::error,
this, &DeviceUsedPortsGatherer::handleConnectionError);
if (d->connection->state() == SshConnection::Connected) {
handleConnectionEstablished();
return;
}
connect(d->connection, SIGNAL(connected()), SLOT(handleConnectionEstablished()));
connect(d->connection, &SshConnection::connected,
this, &DeviceUsedPortsGatherer::handleConnectionEstablished);
if (d->connection->state() == SshConnection::Unconnected)
d->connection->connectToHost();
}
@@ -86,9 +88,9 @@ void DeviceUsedPortsGatherer::handleConnectionEstablished()
const QByteArray commandLine = d->device->portsGatheringMethod()->commandLine(protocol);
d->process = d->connection->createRemoteProcess(commandLine);
connect(d->process.data(), SIGNAL(closed(int)), SLOT(handleProcessClosed(int)));
connect(d->process.data(), SIGNAL(readyReadStandardOutput()), SLOT(handleRemoteStdOut()));
connect(d->process.data(), SIGNAL(readyReadStandardError()), SLOT(handleRemoteStdErr()));
connect(d->process.data(), &SshRemoteProcess::closed, this, &DeviceUsedPortsGatherer::handleProcessClosed);
connect(d->process.data(), &SshRemoteProcess::readyReadStandardOutput, this, &DeviceUsedPortsGatherer::handleRemoteStdOut);
connect(d->process.data(), &SshRemoteProcess::readyReadStandardError, this, &DeviceUsedPortsGatherer::handleRemoteStdErr);
d->process->start();
}

View File

@@ -50,14 +50,13 @@ signals:
void error(const QString &errMsg);
void portListReady();
private slots:
private:
void handleConnectionEstablished();
void handleConnectionError();
void handleProcessClosed(int exitStatus);
void handleRemoteStdOut();
void handleRemoteStdErr();
private:
void setupUsedPorts();
Internal::DeviceUsedPortsGathererPrivate * const d;

View File

@@ -235,8 +235,8 @@ QList<DeviceProcessItem> LocalProcessList::getLocalProcesses()
void LocalProcessList::doKillProcess(const DeviceProcessItem &process)
{
DeviceProcessSignalOperation::Ptr signalOperation = device()->signalOperation();
connect(signalOperation.data(), SIGNAL(finished(QString)),
SLOT(reportDelayedKillStatus(QString)));
connect(signalOperation.data(), &DeviceProcessSignalOperation::finished,
this, &LocalProcessList::reportDelayedKillStatus);
signalOperation->killProcess(process.pid);
}
@@ -255,7 +255,7 @@ void LocalProcessList::handleUpdate()
void LocalProcessList::doUpdate()
{
QTimer::singleShot(0, this, SLOT(handleUpdate()));
QTimer::singleShot(0, this, &LocalProcessList::handleUpdate);
}
void LocalProcessList::reportDelayedKillStatus(const QString &errorMessage)

View File

@@ -51,11 +51,10 @@ private:
void doUpdate();
void doKillProcess(const DeviceProcessItem &process);
private slots:
private:
void handleUpdate();
void reportDelayedKillStatus(const QString &errorMessage);
private:
const qint64 m_myPid;
};

View File

@@ -68,7 +68,7 @@ SshDeviceProcess::SshDeviceProcess(const IDevice::ConstPtr &device, QObject *par
d->connection = 0;
d->state = SshDeviceProcessPrivate::Inactive;
setSshServerSupportsSignals(false);
connect(&d->killTimer, SIGNAL(timeout()), SLOT(handleKillOperationTimeout()));
connect(&d->killTimer, &QTimer::timeout, this, &SshDeviceProcess::handleKillOperationTimeout);
}
SshDeviceProcess::~SshDeviceProcess()
@@ -87,12 +87,15 @@ void SshDeviceProcess::start(const Runnable &runnable)
d->exitCode = -1;
d->runnable = runnable.as<StandardRunnable>();
d->connection = QSsh::acquireConnection(device()->sshParameters());
connect(d->connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
connect(d->connection, SIGNAL(disconnected()), SLOT(handleDisconnected()));
connect(d->connection, &QSsh::SshConnection::error,
this, &SshDeviceProcess::handleConnectionError);
connect(d->connection, &QSsh::SshConnection::disconnected,
this, &SshDeviceProcess::handleDisconnected);
if (d->connection->state() == QSsh::SshConnection::Connected) {
handleConnected();
} else {
connect(d->connection, SIGNAL(connected()), SLOT(handleConnected()));
connect(d->connection, &QSsh::SshConnection::connected,
this, &SshDeviceProcess::handleConnected);
if (d->connection->state() == QSsh::SshConnection::Unconnected)
d->connection->connectToHost();
}
@@ -171,10 +174,10 @@ void SshDeviceProcess::handleConnected()
d->setState(SshDeviceProcessPrivate::Connected);
d->process = d->connection->createRemoteProcess(fullCommandLine(d->runnable).toUtf8());
connect(d->process.data(), SIGNAL(started()), SLOT(handleProcessStarted()));
connect(d->process.data(), SIGNAL(closed(int)), SLOT(handleProcessFinished(int)));
connect(d->process.data(), SIGNAL(readyReadStandardOutput()), SLOT(handleStdout()));
connect(d->process.data(), SIGNAL(readyReadStandardError()), SLOT(handleStderr()));
connect(d->process.data(), &QSsh::SshRemoteProcess::started, this, &SshDeviceProcess::handleProcessStarted);
connect(d->process.data(), &QSsh::SshRemoteProcess::closed, this, &SshDeviceProcess::handleProcessFinished);
connect(d->process.data(), &QSsh::SshRemoteProcess::readyReadStandardOutput, this, &SshDeviceProcess::handleStdout);
connect(d->process.data(), &QSsh::SshRemoteProcess::readyReadStandardError, this, &SshDeviceProcess::handleStderr);
d->process->clearEnvironment();
const Utils::Environment env = d->runnable.environment;
@@ -302,8 +305,8 @@ void SshDeviceProcess::SshDeviceProcessPrivate::doSignal(QSsh::SshRemoteProcess:
if (killOperation) // We are already in the process of killing the app.
return;
killOperation = signalOperation;
connect(signalOperation.data(), SIGNAL(finished(QString)), q,
SLOT(handleKillOperationFinished(QString)));
connect(signalOperation.data(), &DeviceProcessSignalOperation::finished, q,
&SshDeviceProcess::handleKillOperationFinished);
killTimer.start(5000);
signalOperation->killProcess(runnable.executable);
}

View File

@@ -57,7 +57,7 @@ public:
// Default is "false" due to OpenSSH not implementing this feature for some reason.
void setSshServerSupportsSignals(bool signalsSupported);
private slots:
private:
void handleConnected();
void handleConnectionError();
void handleDisconnected();
@@ -68,7 +68,6 @@ private slots:
void handleKillOperationFinished(const QString &errorMessage);
void handleKillOperationTimeout();
private:
virtual QString fullCommandLine(const StandardRunnable &runnable) const;
class SshDeviceProcessPrivate;

View File

@@ -53,8 +53,10 @@ SshDeviceProcessList::~SshDeviceProcessList()
void SshDeviceProcessList::doUpdate()
{
connect(&d->process, SIGNAL(connectionError()), SLOT(handleConnectionError()));
connect(&d->process, SIGNAL(processClosed(int)), SLOT(handleListProcessFinished(int)));
connect(&d->process, &SshRemoteProcessRunner::connectionError,
this, &SshDeviceProcessList::handleConnectionError);
connect(&d->process, &SshRemoteProcessRunner::processClosed,
this, &SshDeviceProcessList::handleListProcessFinished);
d->process.run(listProcessesCommandLine().toUtf8(), device()->sshParameters());
}
@@ -62,8 +64,8 @@ void SshDeviceProcessList::doKillProcess(const DeviceProcessItem &process)
{
d->signalOperation = device()->signalOperation();
QTC_ASSERT(d->signalOperation, return);
connect(d->signalOperation.data(), SIGNAL(finished(QString)),
SLOT(handleKillProcessFinished(QString)));
connect(d->signalOperation.data(), &DeviceProcessSignalOperation::finished,
this, &SshDeviceProcessList::handleKillProcessFinished);
d->signalOperation->killProcess(process.pid);
}

View File

@@ -37,12 +37,11 @@ public:
explicit SshDeviceProcessList(const IDevice::ConstPtr &device, QObject *parent = 0);
~SshDeviceProcessList();
private slots:
private:
void handleConnectionError();
void handleListProcessFinished(int exitStatus);
void handleKillProcessFinished(const QString &errorString);
private:
virtual QString listProcessesCommandLine() const = 0;
virtual QList<DeviceProcessItem> buildProcessList(const QString &listProcessesReply) const = 0;

View File

@@ -114,8 +114,8 @@ EditorConfiguration::EditorConfiguration() : d(new EditorConfigurationPrivate)
// if setCurrentDelegate is 0 values are read from *this prefs
d->m_defaultCodeStyle->setCurrentDelegate(TextEditorSettings::codeStyle());
connect(SessionManager::instance(), SIGNAL(aboutToRemoveProject(ProjectExplorer::Project*)),
this, SLOT(slotAboutToRemoveProject(ProjectExplorer::Project*)));
connect(SessionManager::instance(), &SessionManager::aboutToRemoveProject,
this, &EditorConfiguration::slotAboutToRemoveProject);
}
EditorConfiguration::~EditorConfiguration()
@@ -285,30 +285,31 @@ void EditorConfiguration::setUseGlobalSettings(bool use)
}
}
static void switchSettings_helper(const QObject *newSender, const QObject *oldSender,
template<typename New, typename Old>
static void switchSettings_helper(const New *newSender, const Old *oldSender,
TextEditorWidget *widget)
{
QObject::disconnect(oldSender, SIGNAL(marginSettingsChanged(TextEditor::MarginSettings)),
widget, SLOT(setMarginSettings(TextEditor::MarginSettings)));
QObject::disconnect(oldSender, SIGNAL(typingSettingsChanged(TextEditor::TypingSettings)),
widget, SLOT(setTypingSettings(TextEditor::TypingSettings)));
QObject::disconnect(oldSender, SIGNAL(storageSettingsChanged(TextEditor::StorageSettings)),
widget, SLOT(setStorageSettings(TextEditor::StorageSettings)));
QObject::disconnect(oldSender, SIGNAL(behaviorSettingsChanged(TextEditor::BehaviorSettings)),
widget, SLOT(setBehaviorSettings(TextEditor::BehaviorSettings)));
QObject::disconnect(oldSender, SIGNAL(extraEncodingSettingsChanged(TextEditor::ExtraEncodingSettings)),
widget, SLOT(setExtraEncodingSettings(TextEditor::ExtraEncodingSettings)));
QObject::disconnect(oldSender, &Old::marginSettingsChanged,
widget, &TextEditorWidget::setMarginSettings);
QObject::disconnect(oldSender, &Old::typingSettingsChanged,
widget, &TextEditorWidget::setTypingSettings);
QObject::disconnect(oldSender, &Old::storageSettingsChanged,
widget, &TextEditorWidget::setStorageSettings);
QObject::disconnect(oldSender, &Old::behaviorSettingsChanged,
widget, &TextEditorWidget::setBehaviorSettings);
QObject::disconnect(oldSender, &Old::extraEncodingSettingsChanged,
widget, &TextEditorWidget::setExtraEncodingSettings);
QObject::connect(newSender, SIGNAL(marginSettingsChanged(TextEditor::MarginSettings)),
widget, SLOT(setMarginSettings(TextEditor::MarginSettings)));
QObject::connect(newSender, SIGNAL(typingSettingsChanged(TextEditor::TypingSettings)),
widget, SLOT(setTypingSettings(TextEditor::TypingSettings)));
QObject::connect(newSender, SIGNAL(storageSettingsChanged(TextEditor::StorageSettings)),
widget, SLOT(setStorageSettings(TextEditor::StorageSettings)));
QObject::connect(newSender, SIGNAL(behaviorSettingsChanged(TextEditor::BehaviorSettings)),
widget, SLOT(setBehaviorSettings(TextEditor::BehaviorSettings)));
QObject::connect(newSender, SIGNAL(extraEncodingSettingsChanged(TextEditor::ExtraEncodingSettings)),
widget, SLOT(setExtraEncodingSettings(TextEditor::ExtraEncodingSettings)));
QObject::connect(newSender, &New::marginSettingsChanged,
widget, &TextEditorWidget::setMarginSettings);
QObject::connect(newSender, &New::typingSettingsChanged,
widget, &TextEditorWidget::setTypingSettings);
QObject::connect(newSender, &New::storageSettingsChanged,
widget, &TextEditorWidget::setStorageSettings);
QObject::connect(newSender, &New::behaviorSettingsChanged,
widget, &TextEditorWidget::setBehaviorSettings);
QObject::connect(newSender, &New::extraEncodingSettingsChanged,
widget, &TextEditorWidget::setExtraEncodingSettings);
}
void EditorConfiguration::switchSettings(TextEditorWidget *widget) const

View File

@@ -85,15 +85,6 @@ public:
QVariantMap toMap() const;
void fromMap(const QVariantMap &map);
signals:
void typingSettingsChanged(const TextEditor::TypingSettings &);
void storageSettingsChanged(const TextEditor::StorageSettings &);
void behaviorSettingsChanged(const TextEditor::BehaviorSettings &);
void extraEncodingSettingsChanged(const TextEditor::ExtraEncodingSettings &);
void marginSettingsChanged(const TextEditor::MarginSettings &);
private slots:
void setTypingSettings(const TextEditor::TypingSettings &settings);
void setStorageSettings(const TextEditor::StorageSettings &settings);
void setBehaviorSettings(const TextEditor::BehaviorSettings &settings);
@@ -106,6 +97,14 @@ private slots:
void setTextCodec(QTextCodec *textCodec);
void slotAboutToRemoveProject(ProjectExplorer::Project *project);
signals:
void typingSettingsChanged(const TextEditor::TypingSettings &);
void storageSettingsChanged(const TextEditor::StorageSettings &);
void behaviorSettingsChanged(const TextEditor::BehaviorSettings &);
void extraEncodingSettingsChanged(const TextEditor::ExtraEncodingSettings &);
void marginSettingsChanged(const TextEditor::MarginSettings &);
private:
void switchSettings(TextEditor::TextEditorWidget *baseTextEditor) const;

View File

@@ -42,23 +42,27 @@ EditorSettingsWidget::EditorSettingsWidget(Project *project) : QWidget(), m_proj
globalSettingsActivated(config->useGlobalSettings() ? 0 : 1);
connect(m_ui.globalSelector, SIGNAL(activated(int)),
this, SLOT(globalSettingsActivated(int)));
connect(m_ui.restoreButton, SIGNAL(clicked()), this, SLOT(restoreDefaultValues()));
connect(m_ui.showWrapColumn, SIGNAL(toggled(bool)), config, SLOT(setShowWrapColumn(bool)));
connect(m_ui.wrapColumn, SIGNAL(valueChanged(int)), config, SLOT(setWrapColumn(int)));
connect(m_ui.globalSelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &EditorSettingsWidget::globalSettingsActivated);
connect(m_ui.restoreButton, &QAbstractButton::clicked,
this, &EditorSettingsWidget::restoreDefaultValues);
connect(m_ui.behaviorSettingsWidget, SIGNAL(typingSettingsChanged(TextEditor::TypingSettings)),
config, SLOT(setTypingSettings(TextEditor::TypingSettings)));
connect(m_ui.behaviorSettingsWidget, SIGNAL(storageSettingsChanged(TextEditor::StorageSettings)),
config, SLOT(setStorageSettings(TextEditor::StorageSettings)));
connect(m_ui.behaviorSettingsWidget, SIGNAL(behaviorSettingsChanged(TextEditor::BehaviorSettings)),
config, SLOT(setBehaviorSettings(TextEditor::BehaviorSettings)));
connect(m_ui.behaviorSettingsWidget, SIGNAL(extraEncodingSettingsChanged(TextEditor::ExtraEncodingSettings)),
config, SLOT(setExtraEncodingSettings(TextEditor::ExtraEncodingSettings)));
connect(m_ui.behaviorSettingsWidget, SIGNAL(textCodecChanged(QTextCodec*)),
config, SLOT(setTextCodec(QTextCodec*)));
connect(m_ui.showWrapColumn, &QAbstractButton::toggled,
config, &EditorConfiguration::setShowWrapColumn);
connect(m_ui.wrapColumn, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
config, &EditorConfiguration::setWrapColumn);
connect(m_ui.behaviorSettingsWidget, &TextEditor::BehaviorSettingsWidget::typingSettingsChanged,
config, &EditorConfiguration::setTypingSettings);
connect(m_ui.behaviorSettingsWidget, &TextEditor::BehaviorSettingsWidget::storageSettingsChanged,
config, &EditorConfiguration::setStorageSettings);
connect(m_ui.behaviorSettingsWidget, &TextEditor::BehaviorSettingsWidget::behaviorSettingsChanged,
config, &EditorConfiguration::setBehaviorSettings);
connect(m_ui.behaviorSettingsWidget, &TextEditor::BehaviorSettingsWidget::extraEncodingSettingsChanged,
config, &EditorConfiguration::setExtraEncodingSettings);
connect(m_ui.behaviorSettingsWidget, &TextEditor::BehaviorSettingsWidget::textCodecChanged,
config, &EditorConfiguration::setTextCodec);
}
void EditorSettingsWidget::settingsToUi(const EditorConfiguration *config)

View File

@@ -40,11 +40,10 @@ class EditorSettingsWidget : public QWidget
public:
EditorSettingsWidget(Project *project);
private slots:
private:
void globalSettingsActivated(int index);
void restoreDefaultValues();
private:
void settingsToUi(const EditorConfiguration *config);
Ui::EditorSettingsPropertiesPage m_ui;

View File

@@ -73,8 +73,8 @@ EnvironmentAspectWidget::EnvironmentAspectWidget(EnvironmentAspect *aspect, QWid
if (m_baseEnvironmentComboBox->count() == 1)
m_baseEnvironmentComboBox->setEnabled(false);
connect(m_baseEnvironmentComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(baseEnvironmentSelected(int)));
connect(m_baseEnvironmentComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &EnvironmentAspectWidget::baseEnvironmentSelected);
baseLayout->addWidget(m_baseEnvironmentComboBox);
baseLayout->addStretch(10);
@@ -88,14 +88,15 @@ EnvironmentAspectWidget::EnvironmentAspectWidget(EnvironmentAspect *aspect, QWid
m_environmentWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
topLayout->addWidget(m_environmentWidget);
connect(m_environmentWidget, SIGNAL(userChangesChanged()),
this, SLOT(userChangesEdited()));
connect(m_environmentWidget, &EnvironmentWidget::userChangesChanged,
this, &EnvironmentAspectWidget::userChangesEdited);
connect(m_aspect, SIGNAL(baseEnvironmentChanged()), this, SLOT(changeBaseEnvironment()));
connect(m_aspect, SIGNAL(userEnvironmentChangesChanged(QList<Utils::EnvironmentItem>)),
this, SLOT(changeUserChanges(QList<Utils::EnvironmentItem>)));
connect(m_aspect, SIGNAL(environmentChanged()),
this, SLOT(environmentChanged()));
connect(m_aspect, &EnvironmentAspect::baseEnvironmentChanged,
this, &EnvironmentAspectWidget::changeBaseEnvironment);
connect(m_aspect, &EnvironmentAspect::userEnvironmentChangesChanged,
this, &EnvironmentAspectWidget::changeUserChanges);
connect(m_aspect, &EnvironmentAspect::environmentChanged,
this, &EnvironmentAspectWidget::environmentChanged);
}
QString EnvironmentAspectWidget::displayName() const

View File

@@ -58,14 +58,13 @@ public:
QWidget *additionalWidget() const;
private slots:
private:
void baseEnvironmentSelected(int idx);
void changeBaseEnvironment();
void userChangesEdited();
void changeUserChanges(QList<Utils::EnvironmentItem> changes);
void environmentChanged();
private:
EnvironmentAspect *m_aspect;
bool m_ignoreChange;

View File

@@ -106,8 +106,8 @@ EnvironmentItemsDialog::EnvironmentItemsDialog(QWidget *parent) :
d->m_editor = new EnvironmentItemsWidget(this);
QDialogButtonBox *box = new QDialogButtonBox(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
connect(box, SIGNAL(accepted()), this, SLOT(accept()));
connect(box, SIGNAL(rejected()), this, SLOT(reject()));
connect(box, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(box, &QDialogButtonBox::rejected, this, &QDialog::reject);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(d->m_editor);
layout->addWidget(box);

View File

@@ -135,13 +135,13 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, QWidget *additionalDetails
: QWidget(parent), d(new EnvironmentWidgetPrivate)
{
d->m_model = new Utils::EnvironmentModel();
connect(d->m_model, SIGNAL(userChangesChanged()),
this, SIGNAL(userChangesChanged()));
connect(d->m_model, SIGNAL(modelReset()),
this, SLOT(invalidateCurrentIndex()));
connect(d->m_model, &Utils::EnvironmentModel::userChangesChanged,
this, &EnvironmentWidget::userChangesChanged);
connect(d->m_model, &QAbstractItemModel::modelReset,
this, &EnvironmentWidget::invalidateCurrentIndex);
connect(d->m_model, SIGNAL(focusIndex(QModelIndex)),
this, SLOT(focusIndex(QModelIndex)));
connect(d->m_model, &Utils::EnvironmentModel::focusIndex,
this, &EnvironmentWidget::focusIndex);
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setContentsMargins(0, 0, 0, 0);
@@ -205,26 +205,27 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, QWidget *additionalDetails
vbox->addWidget(d->m_detailsContainer);
connect(d->m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(updateButtons()));
connect(d->m_model, &QAbstractItemModel::dataChanged,
this, &EnvironmentWidget::updateButtons);
connect(d->m_editButton, SIGNAL(clicked(bool)),
this, SLOT(editEnvironmentButtonClicked()));
connect(d->m_addButton, SIGNAL(clicked(bool)),
this, SLOT(addEnvironmentButtonClicked()));
connect(d->m_resetButton, SIGNAL(clicked(bool)),
this, SLOT(removeEnvironmentButtonClicked()));
connect(d->m_unsetButton, SIGNAL(clicked(bool)),
this, SLOT(unsetEnvironmentButtonClicked()));
connect(d->m_batchEditButton, SIGNAL(clicked(bool)),
this, SLOT(batchEditEnvironmentButtonClicked()));
connect(d->m_environmentView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(environmentCurrentIndexChanged(QModelIndex)));
connect(d->m_editButton, &QAbstractButton::clicked,
this, &EnvironmentWidget::editEnvironmentButtonClicked);
connect(d->m_addButton, &QAbstractButton::clicked,
this, &EnvironmentWidget::addEnvironmentButtonClicked);
connect(d->m_resetButton, &QAbstractButton::clicked,
this, &EnvironmentWidget::removeEnvironmentButtonClicked);
connect(d->m_unsetButton, &QAbstractButton::clicked,
this, &EnvironmentWidget::unsetEnvironmentButtonClicked);
connect(d->m_batchEditButton, &QAbstractButton::clicked,
this, &EnvironmentWidget::batchEditEnvironmentButtonClicked);
connect(d->m_environmentView->selectionModel(), &QItemSelectionModel::currentChanged,
this, &EnvironmentWidget::environmentCurrentIndexChanged);
connect(d->m_detailsContainer, SIGNAL(linkActivated(QString)),
this, SLOT(linkActivated(QString)));
connect(d->m_detailsContainer, &Utils::DetailsWidget::linkActivated,
this, &EnvironmentWidget::linkActivated);
connect(d->m_model, SIGNAL(userChangesChanged()), this, SLOT(updateSummaryText()));
connect(d->m_model, &Utils::EnvironmentModel::userChangesChanged,
this, &EnvironmentWidget::updateSummaryText);
}
EnvironmentWidget::~EnvironmentWidget()

View File

@@ -70,7 +70,7 @@ signals:
void userChangesChanged();
void detailsVisibleChanged(bool visible);
private slots:
private:
void editEnvironmentButtonClicked();
void addEnvironmentButtonClicked();
void removeEnvironmentButtonClicked();
@@ -83,7 +83,6 @@ private slots:
void updateButtons();
void linkActivated(const QString &link);
private:
EnvironmentWidgetPrivate *d;
};

View File

@@ -168,12 +168,14 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
setAutoSynchronization(true);
// connections
connect(m_listView, SIGNAL(activated(QModelIndex)),
this, SLOT(slotOpenItem(QModelIndex)));
connect(m_filterHiddenFilesAction, SIGNAL(toggled(bool)), this, SLOT(setHiddenFilesFilter(bool)));
connect(m_toggleSync, SIGNAL(clicked(bool)), this, SLOT(toggleAutoSynchronization()));
connect(m_filterModel, SIGNAL(layoutChanged()),
this, SLOT(ensureCurrentIndex()));
connect(m_listView, &QAbstractItemView::activated,
this, &FolderNavigationWidget::slotOpenItem);
connect(m_filterHiddenFilesAction, &QAction::toggled,
this, &FolderNavigationWidget::setHiddenFilesFilter);
connect(m_toggleSync, &QAbstractButton::clicked,
this, &FolderNavigationWidget::toggleAutoSynchronization);
connect(m_filterModel, &QAbstractItemModel::layoutChanged,
this, &FolderNavigationWidget::ensureCurrentIndex);
}
void FolderNavigationWidget::toggleAutoSynchronization()

View File

@@ -58,7 +58,7 @@ public slots:
void setAutoSynchronization(bool sync);
void toggleAutoSynchronization();
private slots:
private:
void setCurrentFile(Core::IEditor *editor);
void slotOpenItem(const QModelIndex &viewIndex);
void setHiddenFilesFilter(bool filter);

View File

@@ -882,10 +882,13 @@ GccToolChainConfigWidget::GccToolChainConfigWidget(GccToolChain *tc) :
setFromToolchain();
connect(m_compilerCommand, SIGNAL(rawPathChanged(QString)), this, SLOT(handleCompilerCommandChange()));
connect(m_platformCodeGenFlagsLineEdit, SIGNAL(editingFinished()), this, SLOT(handlePlatformCodeGenFlagsChange()));
connect(m_platformLinkerFlagsLineEdit, SIGNAL(editingFinished()), this, SLOT(handlePlatformLinkerFlagsChange()));
connect(m_abiWidget, SIGNAL(abiChanged()), this, SIGNAL(dirty()));
connect(m_compilerCommand, &PathChooser::rawPathChanged,
this, &GccToolChainConfigWidget::handleCompilerCommandChange);
connect(m_platformCodeGenFlagsLineEdit, &QLineEdit::editingFinished,
this, &GccToolChainConfigWidget::handlePlatformCodeGenFlagsChange);
connect(m_platformLinkerFlagsLineEdit, &QLineEdit::editingFinished,
this, &GccToolChainConfigWidget::handlePlatformLinkerFlagsChange);
connect(m_abiWidget, &AbiWidget::abiChanged, this, &ToolChainConfigWidget::dirty);
}
void GccToolChainConfigWidget::applyImpl()

View File

@@ -77,12 +77,12 @@ class GccToolChainConfigWidget : public ToolChainConfigWidget
public:
GccToolChainConfigWidget(GccToolChain *);
static QStringList splitString(const QString &s);
private slots:
private:
void handleCompilerCommandChange();
void handlePlatformCodeGenFlagsChange();
void handlePlatformLinkerFlagsChange();
private:
void applyImpl();
void discardImpl() { setFromToolchain(); }
bool isDirtyImpl() const;

View File

@@ -405,8 +405,8 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing()
OutputParserTester testbench;
GnuMakeParser *childParser = new GnuMakeParser;
GnuMakeParserTester *tester = new GnuMakeParserTester(childParser);
connect(&testbench, SIGNAL(aboutToDeleteParser()),
tester, SLOT(parserIsAboutToBeDeleted()));
connect(&testbench, &OutputParserTester::aboutToDeleteParser,
tester, &GnuMakeParserTester::parserIsAboutToBeDeleted);
testbench.appendOutputParser(childParser);
QFETCH(QStringList, extraSearchDirs);

View File

@@ -49,7 +49,6 @@ public:
bool hasFatalErrors() const;
public slots:
void taskAdded(const ProjectExplorer::Task &task, int linkedLines, int skippedLines);
private:
@@ -78,12 +77,10 @@ class GnuMakeParserTester : public QObject
public:
explicit GnuMakeParserTester(GnuMakeParser *parser, QObject *parent = 0);
void parserIsAboutToBeDeleted();
QStringList directories;
GnuMakeParser *parser;
public slots:
void parserIsAboutToBeDeleted();
};
#endif

View File

@@ -59,7 +59,7 @@ ImportWidget::ImportWidget(QWidget *parent) :
QPushButton *importButton = new QPushButton(tr("Import"), widget);
layout->addWidget(importButton);
connect(importButton, SIGNAL(clicked()), this, SLOT(handleImportRequest()));
connect(importButton, &QAbstractButton::clicked, this, &ImportWidget::handleImportRequest);
detailsWidget->setWidget(widget);
}

View File

@@ -49,10 +49,9 @@ public:
signals:
void importFrom(const Utils::FileName &dir);
private slots:
private:
void handleImportRequest();
private:
Utils::PathChooser *m_pathChooser;
};

View File

@@ -138,8 +138,10 @@ void IOutputParser::appendOutputParser(IOutputParser *parser)
}
m_parser = parser;
connect(parser, &IOutputParser::addOutput, this, &IOutputParser::outputAdded, Qt::DirectConnection);
connect(parser, &IOutputParser::addTask, this, &IOutputParser::taskAdded, Qt::DirectConnection);
connect(parser, &IOutputParser::addOutput,
this, &IOutputParser::outputAdded, Qt::DirectConnection);
connect(parser, &IOutputParser::addTask,
this, &IOutputParser::taskAdded, Qt::DirectConnection);
}
IOutputParser *IOutputParser::takeOutputParserChain()
@@ -161,8 +163,10 @@ void IOutputParser::setChildParser(IOutputParser *parser)
if (m_parser != parser)
delete m_parser;
m_parser = parser;
connect(parser, &IOutputParser::addOutput, this, &IOutputParser::outputAdded, Qt::DirectConnection);
connect(parser, &IOutputParser::addTask, this, &IOutputParser::taskAdded, Qt::DirectConnection);
connect(parser, &IOutputParser::addOutput,
this, &IOutputParser::outputAdded, Qt::DirectConnection);
connect(parser, &IOutputParser::addTask,
this, &IOutputParser::taskAdded, Qt::DirectConnection);
}
void IOutputParser::stdOutput(const QString &line)

View File

@@ -197,7 +197,8 @@ JournaldWatcher::JournaldWatcher()
if (!d->setup())
d->teardown();
else
connect(d->m_notifier, &QSocketNotifier::activated, m_instance, &JournaldWatcher::handleEntry);
connect(d->m_notifier, &QSocketNotifier::activated,
m_instance, &JournaldWatcher::handleEntry);
m_instance->handleEntry(); // advance to the end of file...
}

View File

@@ -62,10 +62,9 @@ public:
static QVector<ConditionalFeature> parseFeatures(const QVariant &data,
QString *errorMessage = 0);
private slots:
private:
void setupProjectFiles(const JsonWizard::GeneratorFiles &files);
private:
QString m_unexpandedProjectPath;
QVector<ConditionalFeature> m_requiredFeatures;

View File

@@ -114,11 +114,10 @@ public slots:
void accept() override;
void reject() override;
private slots:
private:
void handleNewPages(int pageId);
void handleError(const QString &message);
private:
QString stringify(const QVariant &v) const override;
QString evaluate(const QVariant &v) const override ;
void openFiles(const GeneratorFiles &files);

View File

@@ -57,10 +57,12 @@ KitChooser::KitChooser(QWidget *parent) :
layout->addWidget(m_manageButton);
setFocusProxy(m_manageButton);
connect(m_chooser, SIGNAL(currentIndexChanged(int)), SLOT(onCurrentIndexChanged(int)));
connect(m_chooser, SIGNAL(activated(int)), SIGNAL(activated(int)));
connect(m_manageButton, SIGNAL(clicked()), SLOT(onManageButtonClicked()));
connect(KitManager::instance(), SIGNAL(kitsChanged()), SLOT(populate()));
connect(m_chooser, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &KitChooser::onCurrentIndexChanged);
connect(m_chooser, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &KitChooser::activated);
connect(m_manageButton, &QAbstractButton::clicked, this, &KitChooser::onManageButtonClicked);
connect(KitManager::instance(), &KitManager::kitsChanged, this, &KitChooser::populate);
}
void KitChooser::onManageButtonClicked()

View File

@@ -66,17 +66,16 @@ signals:
public slots:
void populate();
private slots:
void onCurrentIndexChanged(int index);
void onManageButtonClicked();
protected:
virtual QString kitText(const Kit *k) const;
virtual QString kitToolTip(Kit *k) const;
private:
KitMatcher m_kitMatcher;
void onCurrentIndexChanged(int index);
void onManageButtonClicked();
Kit *kitAt(int index) const;
KitMatcher m_kitMatcher;
QComboBox *m_chooser;
QPushButton *m_manageButton;
};

View File

@@ -118,8 +118,8 @@ ToolChainKitInformation::ToolChainKitInformation()
setId(ToolChainKitInformation::id());
setPriority(30000);
connect(KitManager::instance(), SIGNAL(kitsLoaded()),
this, SLOT(kitsWereLoaded()));
connect(KitManager::instance(), &KitManager::kitsLoaded,
this, &ToolChainKitInformation::kitsWereLoaded);
}
QVariant ToolChainKitInformation::defaultValue(Kit *k) const
@@ -251,10 +251,10 @@ void ToolChainKitInformation::kitsWereLoaded()
foreach (Kit *k, KitManager::kits())
fix(k);
connect(ToolChainManager::instance(), SIGNAL(toolChainRemoved(ProjectExplorer::ToolChain*)),
this, SLOT(toolChainRemoved(ProjectExplorer::ToolChain*)));
connect(ToolChainManager::instance(), SIGNAL(toolChainUpdated(ProjectExplorer::ToolChain*)),
this, SLOT(toolChainUpdated(ProjectExplorer::ToolChain*)));
connect(ToolChainManager::instance(), &ToolChainManager::toolChainRemoved,
this, &ToolChainKitInformation::toolChainRemoved);
connect(ToolChainManager::instance(), &ToolChainManager::toolChainUpdated,
this, &ToolChainKitInformation::toolChainUpdated);
}
void ToolChainKitInformation::toolChainUpdated(ToolChain *tc)
@@ -360,8 +360,8 @@ DeviceKitInformation::DeviceKitInformation()
setId(DeviceKitInformation::id());
setPriority(32000);
connect(KitManager::instance(), SIGNAL(kitsLoaded()),
this, SLOT(kitsWereLoaded()));
connect(KitManager::instance(), &KitManager::kitsLoaded,
this, &DeviceKitInformation::kitsWereLoaded);
}
QVariant DeviceKitInformation::defaultValue(Kit *k) const
@@ -488,15 +488,15 @@ void DeviceKitInformation::kitsWereLoaded()
fix(k);
DeviceManager *dm = DeviceManager::instance();
connect(dm, SIGNAL(deviceListReplaced()), this, SLOT(devicesChanged()));
connect(dm, SIGNAL(deviceAdded(Core::Id)), this, SLOT(devicesChanged()));
connect(dm, SIGNAL(deviceRemoved(Core::Id)), this, SLOT(devicesChanged()));
connect(dm, SIGNAL(deviceUpdated(Core::Id)), this, SLOT(deviceUpdated(Core::Id)));
connect(dm, &DeviceManager::deviceListReplaced, this, &DeviceKitInformation::devicesChanged);
connect(dm, &DeviceManager::deviceAdded, this, &DeviceKitInformation::devicesChanged);
connect(dm, &DeviceManager::deviceRemoved, this, &DeviceKitInformation::devicesChanged);
connect(dm, &DeviceManager::deviceUpdated, this, &DeviceKitInformation::deviceUpdated);
connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
this, SLOT(kitUpdated(ProjectExplorer::Kit*)));
connect(KitManager::instance(), SIGNAL(unmanagedKitUpdated(ProjectExplorer::Kit*)),
this, SLOT(kitUpdated(ProjectExplorer::Kit*)));
connect(KitManager::instance(), &KitManager::kitUpdated,
this, &DeviceKitInformation::kitUpdated);
connect(KitManager::instance(), &KitManager::unmanagedKitUpdated,
this, &DeviceKitInformation::kitUpdated);
}
void DeviceKitInformation::deviceUpdated(Core::Id id)

View File

@@ -97,7 +97,7 @@ public:
static QString msgNoToolChainInTarget();
private slots:
private:
void kitsWereLoaded();
void toolChainUpdated(ProjectExplorer::ToolChain *tc);
void toolChainRemoved(ProjectExplorer::ToolChain *tc);
@@ -163,7 +163,7 @@ public:
static void setDevice(Kit *k, IDevice::ConstPtr dev);
static void setDeviceId(Kit *k, Core::Id dataId);
private slots:
private:
void kitsWereLoaded();
void deviceUpdated(Core::Id dataId);
void devicesChanged();

View File

@@ -151,8 +151,7 @@ public:
static QList<Kit *> sortKits(const QList<Kit *> kits); // Avoid sorting whenever possible!
public slots:
void saveKits();
static void saveKits();
signals:
void kitAdded(ProjectExplorer::Kit *);

View File

@@ -83,7 +83,8 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) :
Q_ASSERT(fileSystemFriendlyNameRegexp.isValid());
m_fileSystemFriendlyNameLineEdit->setValidator(new QRegularExpressionValidator(fileSystemFriendlyNameRegexp, m_fileSystemFriendlyNameLineEdit));
m_layout->addWidget(m_fileSystemFriendlyNameLineEdit, 1, WidgetColumn);
connect(m_fileSystemFriendlyNameLineEdit, &QLineEdit::textChanged, this, &KitManagerConfigWidget::setFileSystemFriendlyName);
connect(m_fileSystemFriendlyNameLineEdit, &QLineEdit::textChanged,
this, &KitManagerConfigWidget::setFileSystemFriendlyName);
QWidget *inner = new QWidget;
inner->setLayout(m_layout);

View File

@@ -74,14 +74,13 @@ signals:
void dirty();
void isAutoDetectedChanged();
private slots:
private:
void setIcon();
void setDisplayName();
void setFileSystemFriendlyName();
void workingCopyWasUpdated(ProjectExplorer::Kit *k);
void kitWasUpdated(ProjectExplorer::Kit *k);
private:
enum LayoutColumns {
LabelColumn,
WidgetColumn,

View File

@@ -43,7 +43,6 @@ public:
QString baseEnvironmentDisplayName(int base) const;
Utils::Environment baseEnvironment() const;
public slots:
void buildEnvironmentHasChanged();
private:

View File

@@ -230,17 +230,17 @@ int ListWidget::padding()
ProjectListWidget::ProjectListWidget(QWidget *parent)
: ListWidget(parent), m_ignoreIndexChange(false)
{
QObject *sessionManager = SessionManager::instance();
connect(sessionManager, SIGNAL(projectAdded(ProjectExplorer::Project*)),
this, SLOT(addProject(ProjectExplorer::Project*)));
connect(sessionManager, SIGNAL(aboutToRemoveProject(ProjectExplorer::Project*)),
this, SLOT(removeProject(ProjectExplorer::Project*)));
connect(sessionManager, SIGNAL(startupProjectChanged(ProjectExplorer::Project*)),
this, SLOT(changeStartupProject(ProjectExplorer::Project*)));
connect(sessionManager, SIGNAL(projectDisplayNameChanged(ProjectExplorer::Project*)),
this, SLOT(projectDisplayNameChanged(ProjectExplorer::Project*)));
connect(this, SIGNAL(currentRowChanged(int)),
this, SLOT(setProject(int)));
SessionManager *sessionManager = SessionManager::instance();
connect(sessionManager, &SessionManager::projectAdded,
this, &ProjectListWidget::addProject);
connect(sessionManager, &SessionManager::aboutToRemoveProject,
this, &ProjectListWidget::removeProject);
connect(sessionManager, &SessionManager::startupProjectChanged,
this, &ProjectListWidget::changeStartupProject);
connect(sessionManager, &SessionManager::projectDisplayNameChanged,
this, &ProjectListWidget::projectDisplayNameChanged);
connect(this, &QListWidget::currentRowChanged,
this, &ProjectListWidget::setProject);
}
QListWidgetItem *ProjectListWidget::itemForProject(Project *project)
@@ -397,8 +397,8 @@ void ProjectListWidget::changeStartupProject(Project *project)
GenericListWidget::GenericListWidget(QWidget *parent)
: ListWidget(parent), m_ignoreIndexChange(false)
{
connect(this, SIGNAL(currentRowChanged(int)),
this, SLOT(rowChanged(int)));
connect(this, &QListWidget::currentRowChanged,
this, &GenericListWidget::rowChanged);
}
void GenericListWidget::setProjectConfigurations(const QList<ProjectConfiguration *> &list, ProjectConfiguration *active)
@@ -407,8 +407,8 @@ void GenericListWidget::setProjectConfigurations(const QList<ProjectConfiguratio
clear();
for (int i = 0; i < count(); ++i) {
ProjectConfiguration *p = item(i)->data(Qt::UserRole).value<ProjectConfiguration *>();
disconnect(p, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
disconnect(p, &ProjectConfiguration::displayNameChanged,
this, &GenericListWidget::displayNameChanged);
}
QFontMetrics fn(font());
@@ -447,8 +447,8 @@ void GenericListWidget::addProjectConfiguration(ProjectConfiguration *pc)
}
insertItem(pos, lwi);
connect(pc, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
connect(pc, &ProjectConfiguration::displayNameChanged,
this, &GenericListWidget::displayNameChanged);
QFontMetrics fn(font());
int width = fn.width(pc->displayName()) + padding();
@@ -460,8 +460,8 @@ void GenericListWidget::addProjectConfiguration(ProjectConfiguration *pc)
void GenericListWidget::removeProjectConfiguration(ProjectConfiguration *pc)
{
m_ignoreIndexChange = true;
disconnect(pc, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
disconnect(pc, &ProjectConfiguration::displayNameChanged,
this, &GenericListWidget::displayNameChanged);
delete itemForProjectConfiguration(pc);
QFontMetrics fn(font());
@@ -698,32 +698,32 @@ MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorActi
if (startup)
activeTargetChanged(startup->activeTarget());
connect(m_summaryLabel, SIGNAL(linkActivated(QString)),
this, SLOT(switchToProjectsMode()));
connect(m_summaryLabel, &QLabel::linkActivated,
this, &MiniProjectTargetSelector::switchToProjectsMode);
QObject *sessionManager = SessionManager::instance();
connect(sessionManager, SIGNAL(startupProjectChanged(ProjectExplorer::Project*)),
this, SLOT(changeStartupProject(ProjectExplorer::Project*)));
SessionManager *sessionManager = SessionManager::instance();
connect(sessionManager, &SessionManager::startupProjectChanged,
this, &MiniProjectTargetSelector::changeStartupProject);
connect(sessionManager, SIGNAL(projectAdded(ProjectExplorer::Project*)),
this, SLOT(projectAdded(ProjectExplorer::Project*)));
connect(sessionManager, SIGNAL(projectRemoved(ProjectExplorer::Project*)),
this, SLOT(projectRemoved(ProjectExplorer::Project*)));
connect(sessionManager, SIGNAL(projectDisplayNameChanged(ProjectExplorer::Project*)),
this, SLOT(updateActionAndSummary()));
connect(sessionManager, &SessionManager::projectAdded,
this, &MiniProjectTargetSelector::projectAdded);
connect(sessionManager, &SessionManager::projectRemoved,
this, &MiniProjectTargetSelector::projectRemoved);
connect(sessionManager, &SessionManager::projectDisplayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
// for icon changes:
connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
this, SLOT(kitChanged(ProjectExplorer::Kit*)));
connect(ProjectExplorer::KitManager::instance(), &KitManager::kitUpdated,
this, &MiniProjectTargetSelector::kitChanged);
connect(m_listWidgets[TARGET], SIGNAL(changeActiveProjectConfiguration(ProjectExplorer::ProjectConfiguration*)),
this, SLOT(setActiveTarget(ProjectExplorer::ProjectConfiguration*)));
connect(m_listWidgets[BUILD], SIGNAL(changeActiveProjectConfiguration(ProjectExplorer::ProjectConfiguration*)),
this, SLOT(setActiveBuildConfiguration(ProjectExplorer::ProjectConfiguration*)));
connect(m_listWidgets[DEPLOY], SIGNAL(changeActiveProjectConfiguration(ProjectExplorer::ProjectConfiguration*)),
this, SLOT(setActiveDeployConfiguration(ProjectExplorer::ProjectConfiguration*)));
connect(m_listWidgets[RUN], SIGNAL(changeActiveProjectConfiguration(ProjectExplorer::ProjectConfiguration*)),
this, SLOT(setActiveRunConfiguration(ProjectExplorer::ProjectConfiguration*)));
connect(m_listWidgets[TARGET], &GenericListWidget::changeActiveProjectConfiguration,
this, &MiniProjectTargetSelector::setActiveTarget);
connect(m_listWidgets[BUILD], &GenericListWidget::changeActiveProjectConfiguration,
this, &MiniProjectTargetSelector::setActiveBuildConfiguration);
connect(m_listWidgets[DEPLOY], &GenericListWidget::changeActiveProjectConfiguration,
this, &MiniProjectTargetSelector::setActiveDeployConfiguration);
connect(m_listWidgets[RUN], &GenericListWidget::changeActiveProjectConfiguration,
this, &MiniProjectTargetSelector::setActiveRunConfiguration);
}
bool MiniProjectTargetSelector::event(QEvent *event)
@@ -983,11 +983,11 @@ void MiniProjectTargetSelector::setActiveRunConfiguration(ProjectConfiguration *
void MiniProjectTargetSelector::projectAdded(Project *project)
{
connect(project, SIGNAL(addedTarget(ProjectExplorer::Target*)),
this, SLOT(slotAddedTarget(ProjectExplorer::Target*)));
connect(project, &Project::addedTarget,
this, &MiniProjectTargetSelector::slotAddedTarget);
connect(project, SIGNAL(removedTarget(ProjectExplorer::Target*)),
this, SLOT(slotRemovedTarget(ProjectExplorer::Target*)));
connect(project, &Project::removedTarget,
this, &MiniProjectTargetSelector::slotRemovedTarget);
foreach (Target *t, project->targets())
addedTarget(t);
@@ -1001,11 +1001,11 @@ void MiniProjectTargetSelector::projectAdded(Project *project)
void MiniProjectTargetSelector::projectRemoved(Project *project)
{
disconnect(project, SIGNAL(addedTarget(ProjectExplorer::Target*)),
this, SLOT(slotAddedTarget(ProjectExplorer::Target*)));
disconnect(project, &Project::addedTarget,
this, &MiniProjectTargetSelector::slotAddedTarget);
disconnect(project, SIGNAL(removedTarget(ProjectExplorer::Target*)),
this, SLOT(slotRemovedTarget(ProjectExplorer::Target*)));
disconnect(project, &Project::removedTarget,
this, &MiniProjectTargetSelector::slotRemovedTarget);
foreach (Target *t, project->targets())
removedTarget(t);
@@ -1019,20 +1019,20 @@ void MiniProjectTargetSelector::projectRemoved(Project *project)
void MiniProjectTargetSelector::addedTarget(Target *target)
{
connect(target, SIGNAL(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(slotAddedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
connect(target, SIGNAL(removedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(slotRemovedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
connect(target, &Target::addedBuildConfiguration,
this, &MiniProjectTargetSelector::slotAddedBuildConfiguration);
connect(target, &Target::removedBuildConfiguration,
this, &MiniProjectTargetSelector::slotRemovedBuildConfiguration);
connect(target, SIGNAL(addedDeployConfiguration(ProjectExplorer::DeployConfiguration*)),
this, SLOT(slotAddedDeployConfiguration(ProjectExplorer::DeployConfiguration*)));
connect(target, SIGNAL(removedDeployConfiguration(ProjectExplorer::DeployConfiguration*)),
this, SLOT(slotRemovedDeployConfiguration(ProjectExplorer::DeployConfiguration*)));
connect(target, &Target::addedDeployConfiguration,
this, &MiniProjectTargetSelector::slotAddedDeployConfiguration);
connect(target, &Target::removedDeployConfiguration,
this, &MiniProjectTargetSelector::slotRemovedDeployConfiguration);
connect(target, SIGNAL(addedRunConfiguration(ProjectExplorer::RunConfiguration*)),
this, SLOT(slotAddedRunConfiguration(ProjectExplorer::RunConfiguration*)));
connect(target, SIGNAL(removedRunConfiguration(ProjectExplorer::RunConfiguration*)),
this, SLOT(slotRemovedRunConfiguration(ProjectExplorer::RunConfiguration*)));
connect(target, &Target::addedRunConfiguration,
this, &MiniProjectTargetSelector::slotAddedRunConfiguration);
connect(target, &Target::removedRunConfiguration,
this, &MiniProjectTargetSelector::slotRemovedRunConfiguration);
if (target->project() == m_project)
m_listWidgets[TARGET]->addProjectConfiguration(target);
@@ -1056,20 +1056,20 @@ void MiniProjectTargetSelector::slotAddedTarget(Target *target)
void MiniProjectTargetSelector::removedTarget(Target *target)
{
disconnect(target, SIGNAL(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(slotAddedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
disconnect(target, SIGNAL(removedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(slotRemovedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
disconnect(target, &Target::addedBuildConfiguration,
this, &MiniProjectTargetSelector::slotAddedBuildConfiguration);
disconnect(target, &Target::removedBuildConfiguration,
this, &MiniProjectTargetSelector::slotRemovedBuildConfiguration);
disconnect(target, SIGNAL(addedDeployConfiguration(ProjectExplorer::DeployConfiguration*)),
this, SLOT(slotAddedDeployConfiguration(ProjectExplorer::DeployConfiguration*)));
disconnect(target, SIGNAL(removedDeployConfiguration(ProjectExplorer::DeployConfiguration*)),
this, SLOT(slotRemovedDeployConfiguration(ProjectExplorer::DeployConfiguration*)));
disconnect(target, &Target::addedDeployConfiguration,
this, &MiniProjectTargetSelector::slotAddedDeployConfiguration);
disconnect(target, &Target::removedDeployConfiguration,
this, &MiniProjectTargetSelector::slotRemovedDeployConfiguration);
disconnect(target, SIGNAL(addedRunConfiguration(ProjectExplorer::RunConfiguration*)),
this, SLOT(slotAddedRunConfiguration(ProjectExplorer::RunConfiguration*)));
disconnect(target, SIGNAL(removedRunConfiguration(ProjectExplorer::RunConfiguration*)),
this, SLOT(slotRemovedRunConfiguration(ProjectExplorer::RunConfiguration*)));
disconnect(target, &Target::addedRunConfiguration,
this, &MiniProjectTargetSelector::slotAddedRunConfiguration);
disconnect(target, &Target::removedRunConfiguration,
this, &MiniProjectTargetSelector::slotRemovedRunConfiguration);
if (target->project() == m_project)
m_listWidgets[TARGET]->removeProjectConfiguration(target);
@@ -1241,13 +1241,13 @@ void MiniProjectTargetSelector::updateRunListVisible()
void MiniProjectTargetSelector::changeStartupProject(Project *project)
{
if (m_project) {
disconnect(m_project, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
this, SLOT(activeTargetChanged(ProjectExplorer::Target*)));
disconnect(m_project, &Project::activeTargetChanged,
this, &MiniProjectTargetSelector::activeTargetChanged);
}
m_project = project;
if (m_project) {
connect(m_project, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
this, SLOT(activeTargetChanged(ProjectExplorer::Target*)));
connect(m_project, &Project::activeTargetChanged,
this, &MiniProjectTargetSelector::activeTargetChanged);
activeTargetChanged(m_project->activeTarget());
} else {
activeTargetChanged(0);
@@ -1268,18 +1268,18 @@ void MiniProjectTargetSelector::changeStartupProject(Project *project)
void MiniProjectTargetSelector::activeTargetChanged(Target *target)
{
if (m_target) {
disconnect(m_target, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_target, SIGNAL(toolTipChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_target, SIGNAL(iconChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_target, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
this, SLOT(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)));
disconnect(m_target, SIGNAL(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)),
this, SLOT(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)));
disconnect(m_target, SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
this, SLOT(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)));
disconnect(m_target, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
disconnect(m_target, &Target::toolTipChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
disconnect(m_target, &Target::iconChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
disconnect(m_target, &Target::activeBuildConfigurationChanged,
this, &MiniProjectTargetSelector::activeBuildConfigurationChanged);
disconnect(m_target, &Target::activeDeployConfigurationChanged,
this, &MiniProjectTargetSelector::activeDeployConfigurationChanged);
disconnect(m_target, &Target::activeRunConfigurationChanged,
this, &MiniProjectTargetSelector::activeRunConfigurationChanged);
}
m_target = target;
@@ -1289,15 +1289,15 @@ void MiniProjectTargetSelector::activeTargetChanged(Target *target)
m_listWidgets[TARGET]->setActiveProjectConfiguration(m_target);
if (m_buildConfiguration)
disconnect(m_buildConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_buildConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
if (m_deployConfiguration)
disconnect(m_deployConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_deployConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
if (m_runConfiguration)
disconnect(m_runConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_runConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
if (m_target) {
QList<ProjectConfiguration *> bl;
@@ -1317,29 +1317,29 @@ void MiniProjectTargetSelector::activeTargetChanged(Target *target)
m_buildConfiguration = m_target->activeBuildConfiguration();
if (m_buildConfiguration)
connect(m_buildConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_buildConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
m_deployConfiguration = m_target->activeDeployConfiguration();
if (m_deployConfiguration)
connect(m_deployConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_deployConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
m_runConfiguration = m_target->activeRunConfiguration();
if (m_runConfiguration)
connect(m_runConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_runConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
connect(m_target, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_target, SIGNAL(toolTipChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_target, SIGNAL(iconChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_target, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
this, SLOT(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)));
connect(m_target, SIGNAL(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)),
this, SLOT(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)));
connect(m_target, SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
this, SLOT(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)));
connect(m_target, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
connect(m_target, &Target::toolTipChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
connect(m_target, &Target::iconChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
connect(m_target, &Target::activeBuildConfigurationChanged,
this, &MiniProjectTargetSelector::activeBuildConfigurationChanged);
connect(m_target, &Target::activeDeployConfigurationChanged,
this, &MiniProjectTargetSelector::activeDeployConfigurationChanged);
connect(m_target, &Target::activeRunConfigurationChanged,
this, &MiniProjectTargetSelector::activeRunConfigurationChanged);
} else {
m_listWidgets[BUILD]->setProjectConfigurations(QList<ProjectConfiguration *>(), 0);
m_listWidgets[DEPLOY]->setProjectConfigurations(QList<ProjectConfiguration *>(), 0);
@@ -1360,12 +1360,12 @@ void MiniProjectTargetSelector::kitChanged(Kit *k)
void MiniProjectTargetSelector::activeBuildConfigurationChanged(BuildConfiguration *bc)
{
if (m_buildConfiguration)
disconnect(m_buildConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_buildConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
m_buildConfiguration = bc;
if (m_buildConfiguration)
connect(m_buildConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_buildConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
m_listWidgets[BUILD]->setActiveProjectConfiguration(bc);
updateActionAndSummary();
}
@@ -1373,12 +1373,12 @@ void MiniProjectTargetSelector::activeBuildConfigurationChanged(BuildConfigurati
void MiniProjectTargetSelector::activeDeployConfigurationChanged(DeployConfiguration *dc)
{
if (m_deployConfiguration)
disconnect(m_deployConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_deployConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
m_deployConfiguration = dc;
if (m_deployConfiguration)
connect(m_deployConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_deployConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
m_listWidgets[DEPLOY]->setActiveProjectConfiguration(dc);
updateActionAndSummary();
}
@@ -1386,12 +1386,12 @@ void MiniProjectTargetSelector::activeDeployConfigurationChanged(DeployConfigura
void MiniProjectTargetSelector::activeRunConfigurationChanged(RunConfiguration *rc)
{
if (m_runConfiguration)
disconnect(m_runConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
disconnect(m_runConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
m_runConfiguration = rc;
if (m_runConfiguration)
connect(m_runConfiguration, SIGNAL(displayNameChanged()),
this, SLOT(updateActionAndSummary()));
connect(m_runConfiguration, &ProjectConfiguration::displayNameChanged,
this, &MiniProjectTargetSelector::updateActionAndSummary);
m_listWidgets[RUN]->setActiveProjectConfiguration(rc);
updateActionAndSummary();
}
@@ -1472,7 +1472,7 @@ void MiniProjectTargetSelector::delayedHide()
QDateTime current = QDateTime::currentDateTime();
if (m_earliestHidetime > current) {
// schedule for later
QTimer::singleShot(current.msecsTo(m_earliestHidetime) + 50, this, SLOT(delayedHide()));
QTimer::singleShot(current.msecsTo(m_earliestHidetime) + 50, this, &MiniProjectTargetSelector::delayedHide);
} else {
hide();
}

View File

@@ -73,13 +73,12 @@ class ProjectListWidget : public ListWidget
Q_OBJECT
public:
explicit ProjectListWidget(QWidget *parent = 0);
private slots:
private:
void addProject(ProjectExplorer::Project *project);
void removeProject(ProjectExplorer::Project *project);
void projectDisplayNameChanged(ProjectExplorer::Project *project);
void changeStartupProject(ProjectExplorer::Project *project);
void setProject(int index);
private:
QListWidgetItem *itemForProject(Project *project);
QString fullName(Project *project);
bool m_ignoreIndexChange;
@@ -92,13 +91,11 @@ public:
explicit KitAreaWidget(QWidget *parent = 0);
~KitAreaWidget();
public slots:
void setKit(ProjectExplorer::Kit *k);
private slots:
private:
void updateKit(ProjectExplorer::Kit *k);
private:
QGridLayout *m_layout;
Kit *m_kit;
QList<KitConfigWidget *> m_widgets;
@@ -117,10 +114,9 @@ public:
void setActiveProjectConfiguration(ProjectConfiguration *active);
void addProjectConfiguration(ProjectConfiguration *pc);
void removeProjectConfiguration(ProjectConfiguration *pc);
private slots:
private:
void rowChanged(int index);
void displayNameChanged();
private:
QListWidgetItem *itemForProjectConfiguration(ProjectConfiguration *pc);
bool m_ignoreIndexChange;
};
@@ -136,11 +132,11 @@ public:
void keyPressEvent(QKeyEvent *ke);
void keyReleaseEvent(QKeyEvent *ke);
bool event(QEvent *event);
public slots:
void toggleVisible();
void nextOrShow();
private slots:
private:
void projectAdded(ProjectExplorer::Project *project);
void projectRemoved(ProjectExplorer::Project *project);
void slotAddedTarget(ProjectExplorer::Target *target);
@@ -167,7 +163,6 @@ private slots:
void delayedHide();
void updateActionAndSummary();
void switchToProjectsMode();
private:
void addedTarget(Target *target);
void removedTarget(Target *target);
void addedBuildConfiguration(BuildConfiguration* bc);

View File

@@ -68,11 +68,10 @@ public:
signals:
void aboutToDeleteParser();
private slots:
private:
void outputAdded(const QString &string, ProjectExplorer::BuildStep::OutputFormat format);
void taskAdded(const ProjectExplorer::Task &task, int linkedLines, int skipLines);
private:
void reset();
bool m_debug;

View File

@@ -237,13 +237,13 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step)
updateDetails();
connect(m_ui.command, SIGNAL(rawPathChanged(QString)),
this, SLOT(commandLineEditTextEdited()));
connect(m_ui.workingDirectory, SIGNAL(rawPathChanged(QString)),
this, SLOT(workingDirectoryLineEditTextEdited()));
connect(m_ui.command, &Utils::PathChooser::rawPathChanged,
this, &ProcessStepConfigWidget::commandLineEditTextEdited);
connect(m_ui.workingDirectory, &Utils::PathChooser::rawPathChanged,
this, &ProcessStepConfigWidget::workingDirectoryLineEditTextEdited);
connect(m_ui.commandArgumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(commandArgumentsLineEditTextEdited()));
connect(m_ui.commandArgumentsLineEdit, &QLineEdit::textEdited,
this, &ProcessStepConfigWidget::commandArgumentsLineEditTextEdited);
}
void ProcessStepConfigWidget::updateDetails()

View File

@@ -93,11 +93,10 @@ public:
ProcessStepConfigWidget(ProcessStep *step);
virtual QString displayName() const;
virtual QString summaryText() const;
private slots:
private:
void commandLineEditTextEdited();
void workingDirectoryLineEditTextEdited();
void commandArgumentsLineEditTextEdited();
private:
void updateDetails();
ProcessStep *m_step;
Ui::ProcessStepWidget m_ui;

View File

@@ -1087,13 +1087,15 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd->m_projectSelectorAction->setEnabled(false);
QWidget *mainWindow = ICore::mainWindow();
dd->m_targetSelector = new MiniProjectTargetSelector(dd->m_projectSelectorAction, mainWindow);
connect(dd->m_projectSelectorAction, &QAction::triggered, dd->m_targetSelector, &QWidget::show);
connect(dd->m_projectSelectorAction, &QAction::triggered,
dd->m_targetSelector, &QWidget::show);
ModeManager::addProjectSelector(dd->m_projectSelectorAction);
dd->m_projectSelectorActionMenu = new QAction(this);
dd->m_projectSelectorActionMenu->setEnabled(false);
dd->m_projectSelectorActionMenu->setText(tr("Open Build and Run Kit Selector..."));
connect(dd->m_projectSelectorActionMenu, &QAction::triggered, dd->m_targetSelector,
connect(dd->m_projectSelectorActionMenu, &QAction::triggered,
dd->m_targetSelector,
&MiniProjectTargetSelector::toggleVisible);
cmd = ActionManager::registerAction(dd->m_projectSelectorActionMenu, Constants::SELECTTARGET);
mbuild->addAction(cmd, Constants::G_BUILD_RUN);
@@ -1932,7 +1934,7 @@ void ProjectExplorerPluginPrivate::restoreSession()
connect(dd->m_welcomePage, &ProjectWelcomePage::requestProject,
m_instance, &ProjectExplorerPlugin::openProjectWelcomePage);
dd->m_arguments = arguments;
QTimer::singleShot(0, m_instance, SLOT(restoreSession2()));
QTimer::singleShot(0, m_instance, &ProjectExplorerPlugin::restoreSession2);
updateActions();
}
@@ -2949,7 +2951,8 @@ void ProjectExplorerPluginPrivate::updateRecentProjectMenu()
menu->addSeparator();
QAction *action = menu->addAction(QCoreApplication::translate(
"Core", Core::Constants::TR_CLEAR_MENU));
connect(action, &QAction::triggered, this, &ProjectExplorerPluginPrivate::clearRecentProjects);
connect(action, &QAction::triggered,
this, &ProjectExplorerPluginPrivate::clearRecentProjects);
}
emit m_instance->recentProjectsChanged();
}
@@ -2978,7 +2981,8 @@ void ProjectExplorerPluginPrivate::invalidateProject(Project *project)
if (debug)
qDebug() << "ProjectExplorerPlugin::invalidateProject" << project->displayName();
disconnect(project, &Project::fileListChanged, m_instance, &ProjectExplorerPlugin::fileListChanged);
disconnect(project, &Project::fileListChanged,
m_instance, &ProjectExplorerPlugin::fileListChanged);
updateActions();
}

View File

@@ -62,6 +62,8 @@ class PROJECTEXPLORER_EXPORT ProjectExplorerPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "ProjectExplorer.json")
friend class ProjectExplorerPluginPrivate;
public:
ProjectExplorerPlugin();
~ProjectExplorerPlugin();
@@ -110,7 +112,7 @@ public:
static OpenProjectResult openProject(const QString &fileName);
static OpenProjectResult openProjects(const QStringList &fileNames);
static void showOpenProjectError(const OpenProjectResult &result);
Q_SLOT void openProjectWelcomePage(const QString &fileName);
static void openProjectWelcomePage(const QString &fileName);
static void unloadProject(Project *project);
static bool saveModifiedFiles();
@@ -157,8 +159,7 @@ public:
static QThreadPool *sharedThreadPool();
private:
static bool coreAboutToClose();
static void openOpenProjectDialog();
signals:
void runControlStarted(ProjectExplorer::RunControl *rc);
@@ -175,11 +176,9 @@ signals:
void updateRunActions();
public slots:
static void openOpenProjectDialog();
private slots:
void restoreSession2();
private:
static bool coreAboutToClose();
static void restoreSession2();
#ifdef WITH_TESTS
void testAnsiFilterOutputParser_data();

View File

@@ -47,10 +47,12 @@ ProjectExplorerSettingsWidget::ProjectExplorerSettingsWidget(QWidget *parent) :
m_ui.directoryButtonGroup->setId(m_ui.currentDirectoryRadioButton, UseCurrentDirectory);
m_ui.directoryButtonGroup->setId(m_ui.directoryRadioButton, UseProjectDirectory);
connect(m_ui.directoryButtonGroup, SIGNAL(buttonClicked(int)),
this, SLOT(slotDirectoryButtonGroupChanged()));
connect(m_ui.resetButton, SIGNAL(clicked()), this, SLOT(resetDefaultBuildDirectory()));
connect(m_ui.buildDirectoryEdit, SIGNAL(textChanged(QString)), this, SLOT(updateResetButton()));
connect(m_ui.directoryButtonGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
this, &ProjectExplorerSettingsWidget::slotDirectoryButtonGroupChanged);
connect(m_ui.resetButton, &QAbstractButton::clicked,
this, &ProjectExplorerSettingsWidget::resetDefaultBuildDirectory);
connect(m_ui.buildDirectoryEdit, &QLineEdit::textChanged,
this, &ProjectExplorerSettingsWidget::updateResetButton);
auto chooser = new Core::VariableChooser(this);
chooser->addSupportedWidget(m_ui.buildDirectoryEdit);

Some files were not shown because too many files have changed in this diff Show More