Commit fd89e858 authored by kh1's avatar kh1

Fix missing progress indicator during load.

Task-number: QTCREATORBUG-3380
parent ae83b4b7
......@@ -164,6 +164,18 @@ void HelpViewer::home()
setSource(homepage);
}
void HelpViewer::slotLoadStarted()
{
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
}
void HelpViewer::slotLoadFinished(bool ok)
{
Q_UNUSED(ok)
emit sourceChanged(source());
qApp->restoreOverrideCursor();
}
bool HelpViewer::handleForwardBackwardMouseButtons(QMouseEvent *event)
{
if (event->button() == Qt::XButton1) {
......
......@@ -127,7 +127,8 @@ protected:
private slots:
void actionChanged();
void setLoadFinished(bool ok);
void slotLoadStarted();
void slotLoadFinished(bool ok);
private:
bool eventFilter(QObject *obj, QEvent *event);
......
......@@ -72,7 +72,7 @@ HelpViewer::HelpViewer(qreal zoom, QWidget *parent)
setViewerFont(font);
connect(this, SIGNAL(sourceChanged(QUrl)), this, SIGNAL(titleChanged()));
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(slotLoadFinished(bool)));
}
HelpViewer::~HelpViewer()
......@@ -312,12 +312,6 @@ void HelpViewer::actionChanged()
// stub
}
void HelpViewer::setLoadFinished(bool ok)
{
Q_UNUSED(ok)
emit sourceChanged(source());
}
// -- private
bool HelpViewer::eventFilter(QObject *obj, QEvent *event)
......
......@@ -258,7 +258,8 @@ HelpViewer::HelpViewer(qreal zoom, QWidget *parent)
connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
SLOT(actionChanged()));
connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
connect(this, SIGNAL(loadStarted()), this, SLOT(slotLoadStarted()));
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(slotLoadFinished(bool)));
connect(this, SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged()));
connect(page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested()));
......@@ -435,12 +436,6 @@ void HelpViewer::actionChanged()
emit forwardAvailable(a->isEnabled());
}
void HelpViewer::setLoadFinished(bool ok)
{
Q_UNUSED(ok)
emit sourceChanged(source());
}
// -- private
bool HelpViewer::eventFilter(QObject *obj, QEvent *event)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment