diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-09-20 11:14:48 +0300 |
---|---|---|
committer | Olivier Goffart <olivier@woboq.com> | 2017-09-21 15:05:39 +0300 |
commit | ff4213b59f223b60e87e70af2db6201986f76df8 (patch) | |
tree | 98398cd1a1014b9ef1c47457b9139ccf3a546ace /src/gui/issueswidget.cpp | |
parent | c4e51247d833d4f08df7036fe4a7823a6f6e0ff6 (diff) |
Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.
This commit only contains calls that were automatically converted with clazy.
Diffstat (limited to 'src/gui/issueswidget.cpp')
-rw-r--r-- | src/gui/issueswidget.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/issueswidget.cpp b/src/gui/issueswidget.cpp index 40f2822b7..267098541 100644 --- a/src/gui/issueswidget.cpp +++ b/src/gui/issueswidget.cpp @@ -44,30 +44,30 @@ IssuesWidget::IssuesWidget(QWidget *parent) { _ui->setupUi(this); - connect(ProgressDispatcher::instance(), SIGNAL(progressInfo(QString, ProgressInfo)), - this, SLOT(slotProgressInfo(QString, ProgressInfo))); - connect(ProgressDispatcher::instance(), SIGNAL(itemCompleted(QString, SyncFileItemPtr)), - this, SLOT(slotItemCompleted(QString, SyncFileItemPtr))); + connect(ProgressDispatcher::instance(), &ProgressDispatcher::progressInfo, + this, &IssuesWidget::slotProgressInfo); + connect(ProgressDispatcher::instance(), &ProgressDispatcher::itemCompleted, + this, &IssuesWidget::slotItemCompleted); connect(ProgressDispatcher::instance(), &ProgressDispatcher::syncError, this, &IssuesWidget::addError); - connect(_ui->_treeWidget, SIGNAL(itemActivated(QTreeWidgetItem *, int)), SLOT(slotOpenFile(QTreeWidgetItem *, int))); - connect(_ui->copyIssuesButton, SIGNAL(clicked()), SIGNAL(copyToClipboard())); + connect(_ui->_treeWidget, &QTreeWidget::itemActivated, this, &IssuesWidget::slotOpenFile); + connect(_ui->copyIssuesButton, &QAbstractButton::clicked, this, &IssuesWidget::copyToClipboard); - connect(_ui->showIgnores, SIGNAL(toggled(bool)), SLOT(slotRefreshIssues())); - connect(_ui->showWarnings, SIGNAL(toggled(bool)), SLOT(slotRefreshIssues())); + connect(_ui->showIgnores, &QAbstractButton::toggled, this, &IssuesWidget::slotRefreshIssues); + connect(_ui->showWarnings, &QAbstractButton::toggled, this, &IssuesWidget::slotRefreshIssues); connect(_ui->filterAccount, SIGNAL(currentIndexChanged(int)), SLOT(slotRefreshIssues())); connect(_ui->filterAccount, SIGNAL(currentIndexChanged(int)), SLOT(slotUpdateFolderFilters())); connect(_ui->filterFolder, SIGNAL(currentIndexChanged(int)), SLOT(slotRefreshIssues())); for (auto account : AccountManager::instance()->accounts()) { slotAccountAdded(account.data()); } - connect(AccountManager::instance(), SIGNAL(accountAdded(AccountState *)), - SLOT(slotAccountAdded(AccountState *))); - connect(AccountManager::instance(), SIGNAL(accountRemoved(AccountState *)), - SLOT(slotAccountRemoved(AccountState *))); - connect(FolderMan::instance(), SIGNAL(folderListChanged(Folder::Map)), - SLOT(slotUpdateFolderFilters())); + connect(AccountManager::instance(), &AccountManager::accountAdded, + this, &IssuesWidget::slotAccountAdded); + connect(AccountManager::instance(), &AccountManager::accountRemoved, + this, &IssuesWidget::slotAccountRemoved); + connect(FolderMan::instance(), &FolderMan::folderListChanged, + this, &IssuesWidget::slotUpdateFolderFilters); // Adjust copyToClipboard() when making changes here! |