From 3456d516504c70226934826393284b1eb6d9c35d Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 23 Dec 2018 14:24:20 +0100 Subject: 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 Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/qprogressdialog.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp index 4bf78e2115..854043e48f 100644 --- a/src/widgets/dialogs/qprogressdialog.cpp +++ b/src/widgets/dialogs/qprogressdialog.cpp @@ -47,7 +47,6 @@ #include "qapplication.h" #include "qstyle.h" #include "qpushbutton.h" -#include "qcursor.h" #include "qtimer.h" #include "qelapsedtimer.h" #include @@ -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(); -- cgit v1.2.3