Commit fd89e858 authored by kh1's avatar kh1
Browse files

Fix missing progress indicator during load.

Task-number: QTCREATORBUG-3380
parent ae83b4b7
...@@ -164,6 +164,18 @@ void HelpViewer::home() ...@@ -164,6 +164,18 @@ void HelpViewer::home()
setSource(homepage); 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) bool HelpViewer::handleForwardBackwardMouseButtons(QMouseEvent *event)
{ {
if (event->button() == Qt::XButton1) { if (event->button() == Qt::XButton1) {
......
...@@ -127,7 +127,8 @@ protected: ...@@ -127,7 +127,8 @@ protected:
private slots: private slots:
void actionChanged(); void actionChanged();
void setLoadFinished(bool ok); void slotLoadStarted();
void slotLoadFinished(bool ok);
private: private:
bool eventFilter(QObject *obj, QEvent *event); bool eventFilter(QObject *obj, QEvent *event);
......
...@@ -72,7 +72,7 @@ HelpViewer::HelpViewer(qreal zoom, QWidget *parent) ...@@ -72,7 +72,7 @@ HelpViewer::HelpViewer(qreal zoom, QWidget *parent)
setViewerFont(font); setViewerFont(font);
connect(this, SIGNAL(sourceChanged(QUrl)), this, SIGNAL(titleChanged())); 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() HelpViewer::~HelpViewer()
...@@ -312,12 +312,6 @@ void HelpViewer::actionChanged() ...@@ -312,12 +312,6 @@ void HelpViewer::actionChanged()
// stub // stub
} }
void HelpViewer::setLoadFinished(bool ok)
{
Q_UNUSED(ok)
emit sourceChanged(source());
}
// -- private // -- private
bool HelpViewer::eventFilter(QObject *obj, QEvent *event) bool HelpViewer::eventFilter(QObject *obj, QEvent *event)
......
...@@ -258,7 +258,8 @@ HelpViewer::HelpViewer(qreal zoom, QWidget *parent) ...@@ -258,7 +258,8 @@ HelpViewer::HelpViewer(qreal zoom, QWidget *parent)
connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this, connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
SLOT(actionChanged())); SLOT(actionChanged()));
connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl))); 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(this, SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged()));
connect(page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested())); connect(page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested()));
...@@ -435,12 +436,6 @@ void HelpViewer::actionChanged() ...@@ -435,12 +436,6 @@ void HelpViewer::actionChanged()
emit forwardAvailable(a->isEnabled()); emit forwardAvailable(a->isEnabled());
} }
void HelpViewer::setLoadFinished(bool ok)
{
Q_UNUSED(ok)
emit sourceChanged(source());
}
// -- private // -- private
bool HelpViewer::eventFilter(QObject *obj, QEvent *event) bool HelpViewer::eventFilter(QObject *obj, QEvent *event)
......
Supports Markdown
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