forked from qt-creator/qt-creator
Avoid signal overloading
Choose a different name for them. Change-Id: Ie2cc2c85dca72b7f7ff84c95fb0abd0a0e99a63d Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -164,11 +164,11 @@ WorkspaceDialog::WorkspaceDialog(DockManager *manager, QWidget *parent)
|
|||||||
m_ui.workspaceView,
|
m_ui.workspaceView,
|
||||||
&WorkspaceView::resetCurrentWorkspace);
|
&WorkspaceView::resetCurrentWorkspace);
|
||||||
connect(m_ui.workspaceView,
|
connect(m_ui.workspaceView,
|
||||||
&WorkspaceView::activated,
|
&WorkspaceView::workspaceActivated,
|
||||||
m_ui.workspaceView,
|
m_ui.workspaceView,
|
||||||
&WorkspaceView::switchToCurrentWorkspace);
|
&WorkspaceView::switchToCurrentWorkspace);
|
||||||
connect(m_ui.workspaceView,
|
connect(m_ui.workspaceView,
|
||||||
&WorkspaceView::selected,
|
&WorkspaceView::workspacesSelected,
|
||||||
this,
|
this,
|
||||||
&WorkspaceDialog::updateActions);
|
&WorkspaceDialog::updateActions);
|
||||||
connect(m_ui.btImport,
|
connect(m_ui.btImport,
|
||||||
|
@@ -101,10 +101,10 @@ WorkspaceView::WorkspaceView(QWidget *parent)
|
|||||||
selectionModel()->select(firstRow, QItemSelectionModel::QItemSelectionModel::SelectCurrent);
|
selectionModel()->select(firstRow, QItemSelectionModel::QItemSelectionModel::SelectCurrent);
|
||||||
|
|
||||||
connect(this, &Utils::TreeView::activated, [this](const QModelIndex &index) {
|
connect(this, &Utils::TreeView::activated, [this](const QModelIndex &index) {
|
||||||
emit activated(m_workspaceModel.workspaceAt(index.row()));
|
emit workspaceActivated(m_workspaceModel.workspaceAt(index.row()));
|
||||||
});
|
});
|
||||||
connect(selectionModel(), &QItemSelectionModel::selectionChanged, [this] {
|
connect(selectionModel(), &QItemSelectionModel::selectionChanged, [this] {
|
||||||
emit selected(selectedWorkspaces());
|
emit workspacesSelected(selectedWorkspaces());
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(&m_workspaceModel,
|
connect(&m_workspaceModel,
|
||||||
|
@@ -71,8 +71,8 @@ public:
|
|||||||
QStringList selectedWorkspaces() const;
|
QStringList selectedWorkspaces() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void activated(const QString &workspace);
|
void workspaceActivated(const QString &workspace);
|
||||||
void selected(const QStringList &workspaces);
|
void workspacesSelected(const QStringList &workspaces);
|
||||||
void workspaceSwitched();
|
void workspaceSwitched();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -1002,7 +1002,7 @@ void ConsoleProcess::emitError(QProcess::ProcessError err, const QString &errorS
|
|||||||
{
|
{
|
||||||
d->m_error = err;
|
d->m_error = err;
|
||||||
d->m_errorString = errorString;
|
d->m_errorString = errorString;
|
||||||
emit error(err);
|
emit errorOccurred(err);
|
||||||
emit processError(errorString);
|
emit processError(errorString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -107,7 +107,7 @@ public:
|
|||||||
const Utils::Environment &env);
|
const Utils::Environment &env);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void error(QProcess::ProcessError error);
|
void errorOccurred(QProcess::ProcessError error);
|
||||||
void processError(const QString &errorString);
|
void processError(const QString &errorString);
|
||||||
|
|
||||||
// These reflect the state of the actual client process
|
// These reflect the state of the actual client process
|
||||||
|
@@ -102,7 +102,7 @@ GitSubmitEditor::GitSubmitEditor() :
|
|||||||
VcsBaseSubmitEditor(new GitSubmitEditorWidget)
|
VcsBaseSubmitEditor(new GitSubmitEditorWidget)
|
||||||
{
|
{
|
||||||
connect(this, &VcsBaseSubmitEditor::diffSelectedRows, this, &GitSubmitEditor::slotDiffSelected);
|
connect(this, &VcsBaseSubmitEditor::diffSelectedRows, this, &GitSubmitEditor::slotDiffSelected);
|
||||||
connect(submitEditorWidget(), &GitSubmitEditorWidget::show, this, &GitSubmitEditor::showCommit);
|
connect(submitEditorWidget(), &GitSubmitEditorWidget::showRequested, this, &GitSubmitEditor::showCommit);
|
||||||
connect(GitPlugin::versionControl(), &Core::IVersionControl::repositoryChanged,
|
connect(GitPlugin::versionControl(), &Core::IVersionControl::repositoryChanged,
|
||||||
this, &GitSubmitEditor::forceUpdateFileModel);
|
this, &GitSubmitEditor::forceUpdateFileModel);
|
||||||
connect(&m_fetchWatcher, &QFutureWatcher<CommitDataFetchResult>::finished,
|
connect(&m_fetchWatcher, &QFutureWatcher<CommitDataFetchResult>::finished,
|
||||||
|
@@ -101,7 +101,7 @@ void GitSubmitEditorWidget::initialize(CommitType commitType,
|
|||||||
logChangeGroupBox->setLayout(logChangeLayout);
|
logChangeGroupBox->setLayout(logChangeLayout);
|
||||||
m_logChangeWidget = new LogChangeWidget;
|
m_logChangeWidget = new LogChangeWidget;
|
||||||
m_logChangeWidget->init(repository);
|
m_logChangeWidget->init(repository);
|
||||||
connect(m_logChangeWidget, &LogChangeWidget::commitActivated, this, &GitSubmitEditorWidget::show);
|
connect(m_logChangeWidget, &LogChangeWidget::commitActivated, this, &GitSubmitEditorWidget::showRequested);
|
||||||
logChangeLayout->addWidget(m_logChangeWidget);
|
logChangeLayout->addWidget(m_logChangeWidget);
|
||||||
insertLeftWidget(logChangeGroupBox);
|
insertLeftWidget(logChangeGroupBox);
|
||||||
m_gitSubmitPanelUi.editGroup->hide();
|
m_gitSubmitPanelUi.editGroup->hide();
|
||||||
|
@@ -76,7 +76,7 @@ protected:
|
|||||||
QString commitName() const override;
|
QString commitName() const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void show(const QString &commit);
|
void showRequested(const QString &commit);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void authorInformationChanged();
|
void authorInformationChanged();
|
||||||
|
@@ -152,7 +152,7 @@ ApplicationLauncherPrivate::ApplicationLauncherPrivate(ApplicationLauncher *pare
|
|||||||
this, &ApplicationLauncherPrivate::localConsoleProcessError);
|
this, &ApplicationLauncherPrivate::localConsoleProcessError);
|
||||||
connect(&m_consoleProcess, &ConsoleProcess::processStopped,
|
connect(&m_consoleProcess, &ConsoleProcess::processStopped,
|
||||||
this, &ApplicationLauncherPrivate::localProcessDone);
|
this, &ApplicationLauncherPrivate::localProcessDone);
|
||||||
connect(&m_consoleProcess, QOverload<QProcess::ProcessError>::of(&ConsoleProcess::error),
|
connect(&m_consoleProcess, &ConsoleProcess::errorOccurred,
|
||||||
q, &ApplicationLauncher::error);
|
q, &ApplicationLauncher::error);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
@@ -195,7 +195,7 @@ void SshDeviceProcess::handleConnected()
|
|||||||
d->process->requestX11Forwarding(display);
|
d->process->requestX11Forwarding(display);
|
||||||
if (runInTerminal()) {
|
if (runInTerminal()) {
|
||||||
d->process->requestTerminal();
|
d->process->requestTerminal();
|
||||||
connect(&d->consoleProcess, QOverload<QProcess::ProcessError>::of(&ConsoleProcess::error),
|
connect(&d->consoleProcess, &ConsoleProcess::errorOccurred,
|
||||||
this, &DeviceProcess::error);
|
this, &DeviceProcess::error);
|
||||||
connect(&d->consoleProcess, &ConsoleProcess::processStarted,
|
connect(&d->consoleProcess, &ConsoleProcess::processStarted,
|
||||||
this, &SshDeviceProcess::handleProcessStarted);
|
this, &SshDeviceProcess::handleProcessStarted);
|
||||||
|
@@ -138,10 +138,10 @@ SessionDialog::SessionDialog(QWidget *parent) : QDialog(parent)
|
|||||||
m_ui.sessionView, &SessionView::switchToCurrentSession);
|
m_ui.sessionView, &SessionView::switchToCurrentSession);
|
||||||
connect(m_ui.btRename, &QAbstractButton::clicked,
|
connect(m_ui.btRename, &QAbstractButton::clicked,
|
||||||
m_ui.sessionView, &SessionView::renameCurrentSession);
|
m_ui.sessionView, &SessionView::renameCurrentSession);
|
||||||
connect(m_ui.sessionView, &SessionView::activated,
|
connect(m_ui.sessionView, &SessionView::sessionActivated,
|
||||||
m_ui.sessionView, &SessionView::switchToCurrentSession);
|
m_ui.sessionView, &SessionView::switchToCurrentSession);
|
||||||
|
|
||||||
connect(m_ui.sessionView, &SessionView::selected,
|
connect(m_ui.sessionView, &SessionView::sessionsSelected,
|
||||||
this, &SessionDialog::updateActions);
|
this, &SessionDialog::updateActions);
|
||||||
connect(m_ui.sessionView, &SessionView::sessionSwitched,
|
connect(m_ui.sessionView, &SessionView::sessionSwitched,
|
||||||
this, &QDialog::reject);
|
this, &QDialog::reject);
|
||||||
|
@@ -77,10 +77,10 @@ SessionView::SessionView(QWidget *parent)
|
|||||||
SelectCurrent);
|
SelectCurrent);
|
||||||
|
|
||||||
connect(this, &Utils::TreeView::activated, [this](const QModelIndex &index){
|
connect(this, &Utils::TreeView::activated, [this](const QModelIndex &index){
|
||||||
emit activated(m_sessionModel.sessionAt(index.row()));
|
emit sessionActivated(m_sessionModel.sessionAt(index.row()));
|
||||||
});
|
});
|
||||||
connect(selectionModel(), &QItemSelectionModel::selectionChanged, [this] {
|
connect(selectionModel(), &QItemSelectionModel::selectionChanged, [this] {
|
||||||
emit selected(selectedSessions());
|
emit sessionsSelected(selectedSessions());
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(&m_sessionModel, &SessionModel::sessionSwitched,
|
connect(&m_sessionModel, &SessionModel::sessionSwitched,
|
||||||
|
@@ -52,8 +52,8 @@ public:
|
|||||||
void selectSession(const QString &sessionName);
|
void selectSession(const QString &sessionName);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void activated(const QString &session);
|
void sessionActivated(const QString &session);
|
||||||
void selected(const QStringList &sessions);
|
void sessionsSelected(const QStringList &sessions);
|
||||||
void sessionSwitched();
|
void sessionSwitched();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user