Limit clones.

This commit is contained in:
Martin Rotter 2016-08-19 07:13:23 +02:00
parent 7656cbaa48
commit 7d10bcc229
3 changed files with 14 additions and 7 deletions

View File

@ -10,6 +10,7 @@ compiler:
git:
submodules: false
depth: 3
before_install:
- sudo add-apt-repository ppa:beineri/opt-qt57-trusty -y

View File

@ -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<void (WebBrowser::*)(const QString&)>(&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);

View File

@ -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.