Fix #895 by adapting to Qt5 and cleaning up properly
authorSoeren Apel <soeren@apelpie.net>
Wed, 24 May 2017 21:50:37 +0000 (23:50 +0200)
committerSoeren Apel <soeren@apelpie.net>
Fri, 26 May 2017 17:36:04 +0000 (19:36 +0200)
commitf7449c50675c7e9cc152bb367b3850f3c6310228
treef272193805ed8b8539e830b46b66b2b9d835f4d5
parente0ddc2a408e3b667ca8e15d8482ecdcb03d46d30
Fix #895 by adapting to Qt5 and cleaning up properly

Relevant Qt commit:
https://codereview.qt-project.org/#/c/72637/
"QProgressDialog: don't require setValue(0) to be called."

"Fixed by starting the timer in the constructor (most code doesn't reuse
progress dialogs, so this fixes the most common case)"

This messes us up because we're (ab-)using the dialog
in a non-standard way.

https://bugreports.qt.io/browse/QTBUG-47042
"QProgressDialog is designed to show itself automatically, based
on an internal estimate for the duration of the operation and the
minimumDuration property. You never call show() or exec() on it
manually. You're also not supposed to keep it around when it's not
used. In 5.4, the only way to start the internal duration estimation
was to call setValue(0). But we noticed that many people didn't call
setValue(0)"

Workaround here:
https://bugreports.qt.io/browse/QTBUG-47042

"As a workaround I added the line m_progressDlg->reset(); in the main
window constructor in order to get the same behavior as in former
versions."
pv/dialogs/storeprogress.cpp