QProgressDialog: remove unused QCursor member
The private member parentCursor was not populated since Qt4 times. This lead to an unexpected behavior: When QProgressDialog::reset() was called and value() was greater than 0, the cursor of the parent was set to a default-constructed QCursor. Therefore remove QProgressDialogPrivate::parentCursor. Fixes: QTBUG-72660 Change-Id: I195688300e07ddbbb7c17a9f471513c542269c2a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
0b736d91b7
commit
3456d51650
|
|
@ -47,7 +47,6 @@
|
|||
#include "qapplication.h"
|
||||
#include "qstyle.h"
|
||||
#include "qpushbutton.h"
|
||||
#include "qcursor.h"
|
||||
#include "qtimer.h"
|
||||
#include "qelapsedtimer.h"
|
||||
#include <private/qdialog_p.h>
|
||||
|
|
@ -94,9 +93,6 @@ public:
|
|||
bool cancellation_flag;
|
||||
bool setValue_called;
|
||||
QElapsedTimer starttime;
|
||||
#ifndef QT_NO_CURSOR
|
||||
QCursor parentCursor;
|
||||
#endif
|
||||
int showTime;
|
||||
bool autoClose;
|
||||
bool autoReset;
|
||||
|
|
@ -597,12 +593,6 @@ void QProgressDialog::setRange(int minimum, int maximum)
|
|||
void QProgressDialog::reset()
|
||||
{
|
||||
Q_D(QProgressDialog);
|
||||
#ifndef QT_NO_CURSOR
|
||||
if (value() >= 0) {
|
||||
if (parentWidget())
|
||||
parentWidget()->setCursor(d->parentCursor);
|
||||
}
|
||||
#endif
|
||||
if (d->autoClose || d->forceHide)
|
||||
hide();
|
||||
d->bar->reset();
|
||||
|
|
|
|||
Loading…
Reference in New Issue