Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2017-09-20 11:14:48 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2017-10-05 23:01:35 +0300
commit7aca2352be51701b0f1bdcc3b20e2215af14cb93 (patch)
tree4b715524859fffe94d4004da8f4c2341edc9eb3a /src/gui/logbrowser.cpp
parent3143b32aa5494f1a9a391216a5acf6b39cacf29b (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/logbrowser.cpp')
-rw-r--r--src/gui/logbrowser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/logbrowser.cpp b/src/gui/logbrowser.cpp
index 41b526a3c..a7303b0f0 100644
--- a/src/gui/logbrowser.cpp
+++ b/src/gui/logbrowser.cpp
@@ -76,7 +76,7 @@ LogBrowser::LogBrowser(QWidget *parent)
// find button
QPushButton *findBtn = new QPushButton;
findBtn->setText(tr("&Find"));
- connect(findBtn, SIGNAL(clicked()), this, SLOT(slotFind()));
+ connect(findBtn, &QAbstractButton::clicked, this, &LogBrowser::slotFind);
toolLayout->addWidget(findBtn);
// stretch
@@ -87,12 +87,12 @@ LogBrowser::LogBrowser(QWidget *parent)
// Debug logging
_logDebugCheckBox = new QCheckBox(tr("&Capture debug messages") + " ");
- connect(_logDebugCheckBox, SIGNAL(stateChanged(int)), SLOT(slotDebugCheckStateChanged(int)));
+ connect(_logDebugCheckBox, &QCheckBox::stateChanged, this, &LogBrowser::slotDebugCheckStateChanged);
toolLayout->addWidget(_logDebugCheckBox);
QDialogButtonBox *btnbox = new QDialogButtonBox;
QPushButton *closeBtn = btnbox->addButton(QDialogButtonBox::Close);
- connect(closeBtn, SIGNAL(clicked()), this, SLOT(close()));
+ connect(closeBtn, &QAbstractButton::clicked, this, &QWidget::close);
mainLayout->addWidget(btnbox);
@@ -101,14 +101,14 @@ LogBrowser::LogBrowser(QWidget *parent)
_clearBtn->setText(tr("Clear"));
_clearBtn->setToolTip(tr("Clear the log display."));
btnbox->addButton(_clearBtn, QDialogButtonBox::ActionRole);
- connect(_clearBtn, SIGNAL(clicked()), this, SLOT(slotClearLog()));
+ connect(_clearBtn, &QAbstractButton::clicked, this, &LogBrowser::slotClearLog);
// save Button
_saveBtn = new QPushButton;
_saveBtn->setText(tr("S&ave"));
_saveBtn->setToolTip(tr("Save the log file to a file on disk for debugging."));
btnbox->addButton(_saveBtn, QDialogButtonBox::ActionRole);
- connect(_saveBtn, SIGNAL(clicked()), this, SLOT(slotSave()));
+ connect(_saveBtn, &QAbstractButton::clicked, this, &LogBrowser::slotSave);
setLayout(mainLayout);
@@ -116,11 +116,11 @@ LogBrowser::LogBrowser(QWidget *parent)
Logger::instance()->setLogWindowActivated(true);
// Direct connection for log coming from this thread, and queued for the one in a different thread
- connect(Logger::instance(), SIGNAL(logWindowLog(QString)), this, SLOT(slotNewLog(QString)), Qt::AutoConnection);
+ connect(Logger::instance(), &Logger::logWindowLog, this, &LogBrowser::slotNewLog, Qt::AutoConnection);
QAction *showLogWindow = new QAction(this);
showLogWindow->setShortcut(QKeySequence("F12"));
- connect(showLogWindow, SIGNAL(triggered()), SLOT(close()));
+ connect(showLogWindow, &QAction::triggered, this, &QWidget::close);
addAction(showLogWindow);
ConfigFile cfg;