diff --git a/.travis.yml b/.travis.yml index 279a1aae5..e466742a1 100755 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ compiler: git: submodules: false + depth: 3 before_install: - sudo add-apt-repository ppa:beineri/opt-qt57-trusty -y diff --git a/src/gui/webbrowser.cpp b/src/gui/webbrowser.cpp index e7f740c1d..c9abb4584 100755 --- a/src/gui/webbrowser.cpp +++ b/src/gui/webbrowser.cpp @@ -37,19 +37,20 @@ void WebBrowser::createConnections() { connect(m_webView, &WebViewer::messageStatusChangeRequested, this, &WebBrowser::receiveMessageStatusChangeRequest); - connect(m_txtLocation,SIGNAL(submitted(QString)), this, SLOT(loadUrl(QString))); - connect(m_webView, SIGNAL(urlChanged(QUrl)), this, SLOT(updateUrl(QUrl))); + connect(m_txtLocation, &LocationLineEdit::submitted, + this, static_cast(&WebBrowser::loadUrl)); + connect(m_webView, &WebViewer::urlChanged, this, &WebBrowser::updateUrl); // Change location textbox status according to webpage status. - connect(m_webView, SIGNAL(loadStarted()), this, SLOT(onLoadingStarted())); - connect(m_webView, SIGNAL(loadProgress(int)), this, SLOT(onLoadingProgress(int))); - connect(m_webView, SIGNAL(loadFinished(bool)), this, SLOT(onLoadingFinished(bool))); + connect(m_webView, &WebViewer::loadStarted, this, &WebBrowser::onLoadingStarted); + connect(m_webView, &WebViewer::loadProgress, this, &WebBrowser::onLoadingProgress); + connect(m_webView, &WebViewer::loadFinished, this, &WebBrowser::onLoadingFinished); // Forward title/icon changes. - connect(m_webView, SIGNAL(titleChanged(QString)), this, SLOT(onTitleChanged(QString))); + connect(m_webView, &WebViewer::titleChanged, this, &WebBrowser::onTitleChanged); #if QT_VERSION >= 0x050700 - connect(m_webView, SIGNAL(iconChanged(QIcon)), this, SLOT(onIconChanged(QIcon))); + connect(m_webView, &WebViewer::iconChanged, this, &WebBrowser::onIconChanged); #endif } @@ -184,9 +185,11 @@ void WebBrowser::onTitleChanged(const QString &new_title) { } } +#if QT_VERSION >= 0x050700 void WebBrowser::onIconChanged(const QIcon &icon) { emit iconChanged(m_index, icon); } +#endif void WebBrowser::initializeLayout() { m_toolBar->setFloatable(false); diff --git a/src/gui/webbrowser.h b/src/gui/webbrowser.h index dff36d707..46d1d5550 100755 --- a/src/gui/webbrowser.h +++ b/src/gui/webbrowser.h @@ -82,7 +82,10 @@ class WebBrowser : public TabContent { void receiveMessageStatusChangeRequest(int message_id, WebPage::MessageStatusChange change); void onTitleChanged(const QString &new_title); + +#if QT_VERSION >= 0x050700 void onIconChanged(const QIcon &icon); +#endif signals: // Title/icon is changed.