void DeclarativeWebContainer::setLoadProgress(int loadProgress) { if (m_loadProgress != loadProgress) { m_loadProgress = loadProgress; emit loadProgressChanged(); } }
void QWebView::onLoadProgressChanged(int progress) { if (m_progress == progress) return; m_progress = progress; Q_EMIT loadProgressChanged(); }
bool DeclarativeWebContainer::activatePage(int tabId, bool force, int parentId) { if (!m_model) { return false; } m_webPages->initialize(this, m_webPageComponent.data()); if ((m_model->loaded() || force) && tabId > 0 && m_webPages->initialized()) { WebPageActivationData activationData = m_webPages->page(tabId, parentId); setWebPage(activationData.webPage); // Reset always height so that orentation change is taken into account. m_webPage->forceChrome(false); m_webPage->setChrome(true); connect(m_webPage, SIGNAL(imeNotification(int,bool,int,int,QString)), this, SLOT(imeNotificationChanged(int,bool,int,int,QString)), Qt::UniqueConnection); connect(m_webPage, SIGNAL(windowCloseRequested()), this, SLOT(closeWindow()), Qt::UniqueConnection); connect(m_webPage, SIGNAL(urlChanged()), this, SLOT(onPageUrlChanged()), Qt::UniqueConnection); connect(m_webPage, SIGNAL(loadingChanged()), this, SLOT(updateLoading()), Qt::UniqueConnection); connect(m_webPage, SIGNAL(loadProgressChanged()), this, SLOT(updateLoadProgress()), Qt::UniqueConnection); connect(m_webPage, SIGNAL(titleChanged()), this, SLOT(onPageTitleChanged()), Qt::UniqueConnection); connect(m_webPage, SIGNAL(domContentLoadedChanged()), this, SLOT(sendVkbOpenCompositionMetrics()), Qt::UniqueConnection); connect(m_webPage, SIGNAL(backgroundChanged()), this, SIGNAL(backgroundChanged()), Qt::UniqueConnection); return activationData.activated; }