forked from qt-creator/qt-creator
Fix missing progress indicator during load.
Task-number: QTCREATORBUG-3380
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user