summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qprogressdialog.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mention QChronoTimer in API docsAhmad Samir2024-03-031-4/+5
| | | | | Change-Id: Iaf9fb31994f1580b2051dbd0b1b8eef2a218aa39 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add missing full stop to briefsPaul Wicking2023-12-201-1/+1
| | | | | | | | | | | | | | QDoc generates missing full stops for briefs in certain situations. Due to how the `\brief` command works, this fails if the brief ends with a link target. As this is a corner case, add the missing full stop to the offending briefs. Task-number: QTBUG-117636 Task-number: QTBUG-117470 Change-Id: I6d9538f517cd39943ab817f45183fadd3b3a9c92 Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Include what you need: <QPointer>Marc Mutz2023-10-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | All these TUs relied on transitive includes of qpointer.h, maybe to a large extent via qevent.h, though, given that qevent.h is more or less the only public QtBase header that includes qpointer.h, something else seems to be at play here. Said qevent.h actually needs QPointer in-name-only, so a forward declaration would suffice. Prepare for qevent.h dropping the include. The algorithm I used was: If the TU mentions 'passiveGrabbers', the name of the QEvent function that returns QPointers, and the TU doesn't have qpointer.h included explicitly, include it. That may produce False Positives, but better safe than sorry. Otherwise, in src/, add an include to all source and header files which mention QPointer. Exception: if foo.h of a foo.cpp already includes it, don't include again. Task-number: QTBUG-117670 Change-Id: I3321cccdb41ce0ba6d8a709cea92427aba398254 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move pixelator example to manual testTor Arne Vestbø2023-06-301-1/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I3ce2bc269a9f77bce3dd41f0127d01091c1408f6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QProgressDialog: minor refactorAhmad Samir2023-06-051-9/+7
| | | | | Change-Id: Iba4dd1b0c3087e22e9fc0cae7fc764fbc055b089 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QProgressDialog: fix integral narrowing conversion warningsAhmad Samir2023-06-051-9/+13
| | | | | | | By porting to chrono internally. Change-Id: I49c4461be8f8eabce0b9fb186cccc3e72eb75314 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Move findfiles example into manual testsVolker Hilsheimer2023-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | The example follows bad and outdated practices: - running time consuming and I/O heavy workload in the GUI thread - calling processEvents to keep the UI responsive - showing results only at the end of a search rather than continuously Perhaps this example can be rewritten at some point to apply modern practices (at least use a thread and emit signals), but it seems to have low overall educational value. Moving it to be a manual test for now. Fixes: QTBUG-111002 Pick-to: 6.5 Change-Id: Id630fd4599096448ea4f96bcbf977b11a039796f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Remove mentioning of Fowler bookKai Köhne2022-01-171-2/+1
| | | | | | | | | It is out of print since years, and probably quite dated by now (released 1997). Pick-to: 6.3 Change-Id: I1653eb404713c15d70b8a15858e8c7d12b2e71cb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Re-layout QProgressDialog when setting the cancel buttonQiang Li2021-04-191-0/+2
| | | | | | | | | | | | | | Setting a cancel button on QProgressDialog more than once caused the layout to be invalid. The layout was only applied when the dialog resizes or the style changes, but not when a new cancel button is set. The solution is to update the layout() before showing the dialog when adopting new child widgets. Fixes: QTBUG-19983 Pick-to: 6.0 6.1 Change-Id: Id8fb1ac56e94a9bd97d4559a2e8d4835856fd7d0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add multi key bindings to QShortcutAllan Sandfeld Jensen2020-11-041-1/+0
| | | | | | | | | | | This makes it feature comparable with QAction, and makes it possible to use as a backend for QAction, and fixes a few missing alternative keybindings in qtwidgets. Change-Id: Iaefc630b96c4743fc5ef429dc841870ddd99fc64 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Member initialization and default constructor for QProgressDialogPrivateChristian Heimlich2020-10-071-29/+15
| | | | | | | | | Change QProgressDialogPrivate to use default member initializers, allowing its constructor to be explicitly defaulted since it was only used for its member initializer list. Reduces #ifdefery. Change-Id: Id3885e6d520cde47de96f3b475f6a6bba1ed001f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Group, cleanup, and consolidate QProgressDialogPrivate member variablesChristian Heimlich2020-10-051-32/+32
| | | | | | | | | Members grouped and reordered for better alignment, all booleans initialized in the constructor's member initialization list, and snake case names changed to camel case for consistency. Change-Id: Ib59ed770a3d4e307296722270cd991a9a53c72ce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add reentrancy guard for processEvents() in QProgressDialog::setValue()Christian Heimlich2020-09-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation of QProgressDialog always calls QCoreApplication::processEvents() when the user calls QProgressDialog::setValue() if the PD is modal. For most cases this is fine, but when using a Qt::WindowModal PD with setValue() connected to a signal in another thread using Qt::QueuedConnection a reentrancy issue is present if setValue() is triggered too frequently as the execution of its previous call may not have finished. If this happens too many times in a row a stack overflow will occur. Current documentation notes this potential issue but offers no way it avoid it while still using QProgressDialog (user must implement a custom dialog) without resorting to using Qt::BlockingQueuedConnection, which unnecessarily reduces performance. Introduces the boolean reentrancy guard "processingEvents" that is checked before calling QCoreApplication::processEvents() in a modal PD when setValue() is used. It is set before the first call to processEvents() and cleared after that call returns. This ensures that only one invocation of processEvents() is possible from within setValue() at a time, and thereby minimizes iterations of the main event loop and eliminates the aforementioned stack overflow condition. See - https://forum.qt.io/topic/118292/ Fixes: QTBUG-10561 Pick-to: 5.15 Change-Id: Ifa9b91cbb66881981356954ead0906bdc91fab60 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-111-7/+10
|\ | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-101-7/+10
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| | * Fix sizeHint of QProgressDialog to have enough space for window marginsVolker Hilsheimer2019-12-061-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some styles, notably QMacStyle, use different margins for widgets and for windows. For these margins to be returned correctly, we have to tell the style that we want them for a toplevel widget. This was done correctly when laying out the dialog, but not when calculating the sizeHint, leading to a default size of the dialog that was too small to fit the text. As a drive-by, change variable names in the sizeHint method to be a bit more readable. Change-Id: Ib4168c7be176fa816241ebcc5f9235db4a7f982f Fixes: QTBUG-80272 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 13bbb1d9b9411e6eb65848efa8c0d481109b8868) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-091-11/+11
|\| | | | | | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
| * | Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-1/+1
| |/ | | | | | | | | | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* / QShortcut: Properly port to the new configure systemFriedemann Kleint2019-10-251-1/+3
|/ | | | | | | | | | | | | | | Move the feature to corelib so that the QMetaType enumeration values can be properly excluded and there is no need for a dummy class. Use QT_REQUIRE_CONFIG in the headers of classes to be disabled. Add headers/source files in the .pro file depending on the configure feature in libraries and tests. Add the necessary exclusions and use QT_CONFIG. Task-number: QTBUG-76493 Change-Id: I02499ebee1a3d6d9a1e5afd02517beed5f4536b7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QtWidgets: Fix static method invocationsFriedemann Kleint2019-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | Apply fixits by Creator and results of manual search focusing on QCore/Gui/Applicaton(Private) methods and variables to prepare for splitting out some classes. Task-number: QTBUG-69478 Task-number: QTBUG-76497 Task-number: QTBUG-76493 Change-Id: Iaf468166793e0cabb514b51c827b30317bf45a2d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-211-1/+1
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
| * Documentation: Add \nullptr macro and use where applicableFriedemann Kleint2019-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt for Python users reading the documentation assume that int(0) can be passed for pointer parameters. Use the newly introduced \nullptr to disambiguate this. In a follow-up step, the \nullptr macro can be defined as None when generating the Qt for Python documentation. Task-number: PYSIDE-903 Change-Id: I3a45f87175a0668ab5f3f95f0aff409f7e3ef027 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QProgressDialog: remove unused QCursor memberChristian Ehrlicher2019-01-061-10/+0
|/ | | | | | | | | | | | | 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>
* Make overloaded function appear in assistant indexJarek Kobus2018-10-011-1/+0
| | | | | | | | | | When there are overloaded function for one class, at least one of them mustn't possess \overload command, otherwise it won't appear at all in doc index. Task-number: QTBUG-59506 Change-Id: I650a3969cb45c1a5efdfc3a654e01d113c398f16 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Convert features.progressdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-06-291-4/+0
| | | | | | | | | | Change-Id: Ic12a30480260e426f106baf7e2121889ea01db88 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Remove references to QUrlOperator (Qt3) classGatis Paeglis2017-02-041-1/+1
|/ | | | | Change-Id: I2bb9fa77a8e260d5ba75541f66597a1c8904895f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Don't use obsolete QStyle::PixelMetric enum itemsAlexander Volkov2016-03-221-9/+10
| | | | | | | | | | There is only one place in Qt Widgets where they are still present - QProgressDialogPrivate::layout(). Change-Id: I53742dd6d5a61e468a90c6a487cf2a67f89b244c Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtWidgets: use Q_UNLIKELY for every qWarning() (1)Marc Mutz2015-11-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qWarning(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. This change contains the changes to the util/, dialogs/ and widgets/ subdirs. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In QSystemTrayIcon::setVisible(), as a drive-by, I swapped the evaluation order of an &&-expression (newly wrapped in Q_UNLIKELY) to be more readable and more efficient (cheaper check first) at the same time. Change-Id: I3564c5a5deacba49d67d3989fb0b53e680c57fcb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Clean up cancel operation handling on OS XTor Arne Vestbø2015-09-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for handling cancel operations was spread out through the code base and sometimes hard-coded to only include the Escape key shortcut, missing the Command+. shortcut. We now intercept both attempts at cancel operations from the system through cancelOperation, which we forward as normal key events. A new QKeySequence::StandardKey has been added for the Cancel sequence, which maps to Escape on all platforms, and Command+. in addition for OS X. The hard-coded logic in QWidget and subclasses for dealing with closing the dialogs has been replaced with this key sequence, which allows clients to override the behavior. Note that the widget code is not wrapped in checks for QT_NO_SHORTCUT, as we don't care about keeping widgets building and working under that define. The logic in QCocoaWindow to bypass windowShouldClose when delivering IM events has been removed as we now handle that specific case by also forwarding Escape as a cancel operation. Task-number: QTBUG-47557 Task-number: QTBUG-45771 Task-number: QTBUG-44076 Change-Id: Ibe0b3a4819f8659d246a2142dd7d9cd3a826ef78 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Remove Q_DEAD_CODE_FROM_QT4_MAC sectionMorten Johan Sørvig2015-07-081-3/+0
| | | | | | | | Its not known if the call to flush() is required in Qt 5. It has been compiled out until now; remove it. Change-Id: I7033e02af8ac7ea2a357d1287e368b541d1d6776 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-031-1/+1
| | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Fix stylesheet crash.Morten Johan Sørvig2015-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Style sheets that refer to the progress bar (like "QProgressDialog[maximum='0']{}") may dereference a null-pointer during the styleHint() call in QProgressDialogPrivate::init() since the progress bar has not been created yet. Move the creation of the progress bar closer to the top of init(), before the styleHint() call. Change-Id: I31c3c1c346430fc9fe86b0977403dea0c0dc5e90 Task-number: QTBUG-43830 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | QProgressDialog: don't require setValue(0) to be called.David Faure2015-01-171-5/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | 1) everyone forgets to do so (proof: tst_qnetworkaccessmanager_and_qprogressdialog.cpp forgot too, which led to a valgrind warning, the elapsed timer was never started) 2) setValue(0) makes no sense if the progress dialog goes from 50 to 60, or any other non-zero minimum value. Fixed by starting the timer in the constructor (most code doesn't reuse progress dialogs, so this fixes the most common case), and by also starting the timer when calling setValue(minimum()) for well-behaved dialogs. setValue(0) special case kept for compatibility. Task-number: QTBUG-17427 Task-number: QTBUG-25316 [ChangeLog][Important Behavior Changes][QProgressDialog] The timer for estimating the duration of the progress dialog is now started in the constructor and in setValue(minimum()), as well as when calling setValue(0), as previously documented. Done-with: Marc Mutz <marc.mutz@kdab.com> Change-Id: Ia8f7fc677438749191b99074fc334eab652ea36f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Micro-optimize QProgressDialogPrivate::ensureSizeIsAtLeastSizeHint()Marc Mutz2014-08-061-3/+4
| | | | | | | | | | | | | | | | | | | | | QWidget::isVisible() is an inline call, but sizeHint() is a virtual function. Use QSize operations to call each one only once. Also reduces the number of q-> qualifications needed. It must be noted that this change is not entirely behavior-preserving: If sizeHint() returns a negative component, and the dialog is not visible, resize() will be called with that negative component now, instead of zero as was the case previously. I believe this is not a problem, because the way sizeHint() is currently implemented, the width cannot be less than 200 and for the height to be negative, the sum of label, bar and button size hint height would need to be negative, which is next to impossible. Change-Id: Ie8ba110e193532921eb4732a0393a377e38d7f7e Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QProgressDialog: Extract Method ↵Marc Mutz2014-08-061-15/+15
| | | | | | | | | QProgressDialogPrivate::ensureSizeIsAtLeastSizeHint() The code was used in five different places, time to centralize. Change-Id: I32338bdae247169a180f59314c50a9b855cae5f0 Reviewed-by: David Faure <david.faure@kdab.com>
* QProgressDialog: Extract Method QProgressDialogPrivate::adoptChildWidget()Marc Mutz2014-08-061-31/+19
| | | | | | | The same code was used in three methods. Collect it in one place. Change-Id: I0e3bf14474590eb99e94d240aad8158fd8fbe033 Reviewed-by: David Faure <david.faure@kdab.com>
* QProgressDialog: fix setBar() not properly adopting the new QProgressBarMarc Mutz2014-08-061-0/+8
| | | | | | | | The "adoption" code is taken from setLabel(). Task-number: QTBUG-40503 Change-Id: Id512b28eb756b4a80e5701e599e2cbdf5346ff62 Reviewed-by: David Faure <david.faure@kdab.com>
* QProgressDialog: make the cancel button retranslate on LanguageChangeMarc Mutz2014-07-301-2/+1
| | | | | | | | | | | | | | It is documented to be, and the LanguageChange event is caught and processed. However, retranslateStrings() uses QProgressDialog::setCancelButtonText(), which unconditionally sets useDefaultCancelText=true, blocking any further changes to the button text by subsequent LanguageChange events. The fix is to use extracted QProgressDialogPrivate::setCancelButtonText() which - quite intentionally - doesn't set useDefaultCancelText. Task-number: QTBUG-40504 Change-Id: I6e701deda10c454cb088c0b0778ac2d6adff574a Reviewed-by: David Faure <david.faure@kdab.com>
* QProgressDialog: Extract Method QProgressDialogPrivate::setCancelButtonText()Marc Mutz2014-07-301-7/+14
| | | | | | | | This is in preparation of a fix for the broken online-retranslatability of the cancel button. Change-Id: Ie62540766e50e1f1ec07d251cc56a2ee0745d434 Reviewed-by: David Faure <david.faure@kdab.com>
* QProgressDialog: don't crash when setting the same {bar,button,label} againMarc Mutz2014-07-301-0/+14
| | | | | | | | | | The associated test has unearthed that setBar() fails to make the new bar a child of the progress dialog. This will be fixed in a separate commit. Task-number: QTBUG-40502 Change-Id: I2d09ebb07ae6395449a4efe38a638df831eebdd7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Fix documented default value of QProgressDialog::maximumMarc Mutz2014-07-301-1/+1
| | | | | | | | Seems to have been a cut'n'paste from 'minimum'. Change-Id: Ifc3a4441809a9fc75ecac621cff59950235f6bc7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Doc: fix documentation of QProgressDialog::openJoerg Bornemann2014-03-041-1/+1
| | | | | | | | | | The slot is connected to the canceled() signal and not to the accepted() signal since the introduction of the open method. Task-number: QTBUG-37210 Change-Id: I0604c612f6054611a69876d53908bb58ec048b09 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>