From af677a1aa6164b857215afdd5551c6410aba9b13 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 13 Mar 2019 18:13:00 +0100 Subject: Update signal/slot connect to Qt5 style --- src/slxbrowser.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/slxbrowser.cpp b/src/slxbrowser.cpp index 5ffe281..c56d5da 100644 --- a/src/slxbrowser.cpp +++ b/src/slxbrowser.cpp @@ -38,11 +38,11 @@ SLXbrowser::SLXbrowser(BrowserSettings settings) this->setCentralWidget(w); _reset.setSingleShot(true); - connect(&_reset, SIGNAL(timeout()), this, SLOT(reloadInitial())); + connect(&_reset, &QTimer::timeout, this, &SLXbrowser::reloadInitial); - connect(_browser, SIGNAL(loadStarted()), this, SLOT(loadStarted())); - connect(_browser, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); - connect(_browser, SIGNAL(loadProgress(int)), this, SLOT(loadProgress(int))); + connect(_browser, &WebView::loadStarted, this, &SLXbrowser::loadStarted); + connect(_browser, &WebView::loadFinished, this, &SLXbrowser::loadFinished); + connect(_browser, &WebView::loadProgress, this, &SLXbrowser::loadProgress); // QWebPage *page = _browser->page(); QNetworkAccessManager *nam; @@ -55,9 +55,8 @@ SLXbrowser::SLXbrowser(BrowserSettings settings) } nam = new SlxNetworkAccessManager(urlListToRegExp(_settings.urlList), _settings.isWhitelist); } - connect(nam, SIGNAL(sslErrors(QNetworkReply*, const QList&)), - this, SLOT(sslErrors(QNetworkReply*, const QList&))); - connect(nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))); + connect(nam, &QNetworkAccessManager::sslErrors, this, &SLXbrowser::sslErrors); + connect(nam, &QNetworkAccessManager::finished, this, &SLXbrowser::requestFinished); page->setNetworkAccessManager(nam); page->mainFrame()->load(_settings.url); // -- cgit v1.2.3-55-g7522