summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-13 18:13:00 +0100
committerSimon Rettberg2019-03-13 18:13:00 +0100
commitaf677a1aa6164b857215afdd5551c6410aba9b13 (patch)
tree0b334460fb2ae56670492818dcd3b323194ccfb1 /src
parentAdd black/whitelisting of URLs (diff)
downloadslxbrowser-af677a1aa6164b857215afdd5551c6410aba9b13.tar.gz
slxbrowser-af677a1aa6164b857215afdd5551c6410aba9b13.tar.xz
slxbrowser-af677a1aa6164b857215afdd5551c6410aba9b13.zip
Update signal/slot connect to Qt5 style
Diffstat (limited to 'src')
-rw-r--r--src/slxbrowser.cpp13
1 files 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<QSslError>&)),
- this, SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&)));
- 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);
//