summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
* Move QFileSystemModel into QtGuiVolker Hilsheimer2020-08-2511-3372/+14
| | | | | | | | | | | | | | This requires a QAbstractFileIconProvider in QtGui, as the standard QFileIconProvider depends on QStyle, and cannot be moved out of QtWidgets. QAbstractFileIconProvider returns strings for file types, but returns no icons yet. Support for a default icon set might be added in a follow-up commit. Change-Id: Ib9d095cd612fdcf04db62f2e40709fcffe3dc2b7 Fixes: QTBUG-66177 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QAutoPointer: port to explicit operator boolGiuseppe D'Angelo2020-08-231-3/+1
| | | | | Change-Id: Ic8ec02d7225e884bfd98d93398502a8b8b825da8 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix a number of qdoc warningsFriedemann Kleint2020-08-201-6/+0
| | | | | | | | | | | - Remove obsolete functions and enumeration values - Remove QObject * parameter from QMetaProperty accessors - Fix renamed enumerations in QSsl - Fix list items to be \li - Fix function signatures and variable names Change-Id: I37c7e6bf2c8ff92bc7b82620bae0a27796f866ab Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QFileSystemModel: don't display a modal messagebox on errorVolker Hilsheimer2020-08-191-23/+2
| | | | | | | | | | | A model is the wrong place to display a modal dialog when a call to setData failed. The call returns false already, and the caller can handle the error appropriately, presumably knowing best what failed and how to present the user with options. Task-number: QTBUG-66177 Change-Id: I069209d51a577177bc278aeb08a92c95029dc962 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QFileSystemModel: use the QFileInfo from the model as much as possibleVolker Hilsheimer2020-08-121-9/+19
| | | | | | | | | | If the file system already stores a QFileInfo, then it will have the information cached, which avoids costly roundtrips to the file system. Task-number: QTBUG-41373 Change-Id: I830a39fe0e20ebf07abde4438a87f7572f608d66 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QFileDialog: fix warning message when navigating to "My Computer"Volker Hilsheimer2020-08-121-4/+5
| | | | | | | | | | | | | | | | The mapping between model indexes, QUrl, and QDir in QFileDialog resulted in QFileSystemEngine methods being called on empty strings, which results in a warning from QFileSystemEngine. When QFileDialog gets an empty string as the new path, then we know that it's the "My Computer" location, so handle that case separately. This makes sure we don't call any QFileSystemEngine methods with an empty string. Change-Id: I421d3d76b053379c216c41a72fb783d1bad176cb Pick-to: 5.15 Fixes: QTBUG-67866 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QFileDialog: reduce number of times a file is stat'edVolker Hilsheimer2020-08-122-76/+65
| | | | | | | | | | | | | | | | | | When opening a QFileDialog with an initial directory that lives on a disconnected network drive, repeatedly testing that directory consumes a significant amount of time during which the UI is blocked. To reduce the amount of file accesses, refactor the initialization code to allow sharing of a QFileInfo for the default case of operating on a local and absolute file system. This reduces the amount of stat calls significantly during startup time, and in case of a disconnected network shaves of 10-15 seconds of blocked UI, if Windows has already noticed that the file system is disconnected. Pick-to: 5.15 Fixes: QTBUG-6039 Change-Id: Ie082e447db214033291455bef2087cd05f366806 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix build with mingw gcc 9 and -Wsuggest-overrideKai Koehne2020-08-101-1/+1
| | | | | Change-Id: I780b0761a7f6b19022116b738efa7aca1378b715 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Long Live QMap as a refcounted std::map!Giuseppe D'Angelo2020-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and QMultiMap as std::multimap. Just use the implementation from the STL; we can't really claim that our code is much better than STL's, or does things any differently (de facto they're both red-black trees). Decouple QMultiMap from QMap, by making it NOT inherit from QMap any longer. This completes the deprecation started in 5.15: QMap now does not store duplicated keys any more. Something to establish is where to put the QExplictlySharedDataPointer replcement that is in there as an ad-hoc solution. There's a number of patches in-flight by Marc that try to introduce the same (or very similar) functionality. Miscellanea changes to the Q(Multi)Map code itself: * consistently use size_type instead of int; * pass iterators by value; * drop QT_STRICT_ITERATORS; * iterators implictly convert to const_iterators, and APIs take const_iterators; * iterators are just bidirectional and not random access; * added noexcept where it makes sense; * "inline" dropped (churn); * qMapLessThanKey dropped (undocumented, 0 hits in Qt, 1 hit in KDE); * operator== on Q(Multi)Map requires operator== on the key type (we're checking for equality, not equivalence!). Very few breakages occur in qtbase. [ChangeLog][Potentially Source-Incompatible Changes] QMap does not support multiple equivalent keys any more. Any related functionality has been removed from QMap, following the deprecation that happened in Qt 5.15. Use QMultiMap for this use case. [ChangeLog][Potentially Source-Incompatible Changes] QMap and QMultiMap iterators random-access API have been removed. Note that the iterators have always been just bidirectional; moving an iterator by N positions can still be achieved using std::next or std::advance, at the same cost as before (O(N)). [ChangeLog][Potentially Source-Incompatible Changes] QMultiMap does not inherit from QMap any more. Amongst other things, this means that iterators on a QMultiMap now belong to the QMultiMap class (and not to the QMap class); new Java iterators have been added. Change-Id: I5a0fe9b020f92c21b37065a1defff783b5d2b7a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFileSystemModel: make sure files are stat'ed in the worker threadVolker Hilsheimer2020-07-311-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | QFileInfoGatherer creates QFileInfo objects in the worker thread to offload the work from the UI thread, but it never calls any methods on the QFileInfo objects that would trigger a stat'ing of the files. For large directories on remote file system, that easily results in the UI thread being blocked for a very long time. Add a private 'stat' method to QFileInfo which allows forcing it to stat all attributes from the worker thread, and make QFileInfoGatherer a friend so that it can call the function from the worker thread. This way, QFileSystemModel can access the cached data for each QFileInfo object, without having to touch the file system from the UI thread. Also reduce the amount of signal emissions for drive information, batch all drives (which can safely be assumed to be at most a two digit figure) into a single emission instead. Change-Id: Ifdcae150406187db9984d0fec9add93597b5f85b Fixes: QTBUG-41373 Pick-to: 5.15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Windows QPA: Move some internal functions to the new interfaceFriedemann Kleint2020-07-281-5/+3
| | | | | | | | | | | | | Move createMessageWindow(), the GPU detection for qtdiag and the async expose setting (used by Active Qt) from QWindowsNativeInterface to QWindowsApplication. Remove unused registerWindowClass() and use logFontToQFont() directly from the font database. Task-number: QTBUG-83252 Change-Id: I9c72351970b47457d08125557c2580016c66e586 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Move window properties to the new interfacesFriedemann Kleint2020-07-241-6/+6
| | | | | | | | Affects the custom margin used by QWizard. Task-number: QTBUG-83252 Change-Id: Iffda043f106282f682e119ec955fa2b2eb0f259e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QWizard/Windows: Fix deprecation warnings about old mouse event APIFriedemann Kleint2020-07-171-3/+10
| | | | | | | | | | | | Fix: src/widgets/dialogs/qwizard_win.cpp:515 C4996: 'QMouseEvent::globalX': Use globalPosition() src/widgets/dialogs/qwizard_win.cpp:529 C4996: 'QMouseEvent::globalX': Use globalPosition() src/widgets/dialogs/qwizard_win.cpp:544 C4996: 'QMouseEvent::globalX': Use globalPosition() and add missing High DPI scaling for the native event on this occasion. Change-Id: Ib9a8ab0b3419fa0435eba38401b91c445acdb7bf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Replace use of deprecated Q_OS_MACX in favor of Q_OS_MACOSTor Arne Vestbø2020-07-081-5/+5
| | | | | Change-Id: I1059d56f67be28a4cc1a66b744e81df6d0b5d00d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-072-9/+9
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove usage of QDesktopWidget(Private) from most places in QtWidgetsVolker Hilsheimer2020-07-074-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call QGuiApplication and QScreen APIs directly to get geometries, and make use of QScreen::grabWindow grabbing the screen it's called on when called with WId == 0. This assumes that QGuiApplication::screen and QWidget::screen never return nullptr, which is already assumed in other places. In QSplashScreen, simplify the code to operate on the screen of the QSplashScreen itself. Remove the case that handles a QDesktopWidget parent - QSplashScreen doesn't have a constructor that takes a QWidget* parent anymore. In the QEffect implementation, we can rely on the widget pointer not being nullptr (it's tested in the free functions client code uses). Includes a few drive-by changes to coding style and logic in qtooltip.cpp, where the tip label placement now prefers the screen of the widget the label is created for, and uses the position only as a fallback. What remains is the special handling of QDesktopWidget and the Qt::Desktop type in QWidget and QApplication. Change-Id: I30b67bab8ae82ddfcc7bbbec3c10f6e935b74f06 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Use QList instead of QVector in widgetsJarek Kobus2020-07-029-28/+34
| | | | | | Task-number: QTBUG-84469 Change-Id: I3007734f8e4f164ece9dd8850ef007cbef9e12ef Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Remove leftover QT_WARNING_POPTor Arne Vestbø2020-06-291-1/+0
| | | | | | | Amends ab1e0961d4718fb5e36e22c3b70dd98e776e0edd. Change-Id: I460d650e70dc5635cb377569aa976f11fc206d63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QFileDialog: remove deprecated mode QFileDialog::DirectoryOnlyChristian Ehrlicher2020-06-262-53/+7
| | | | | Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-192-6/+6
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port QtWidgets from QStringRef to QStringViewLars Knoll2020-06-101-5/+5
| | | | | Change-Id: Ibe348e7aea838ab8c2d628bb43709c867a506637 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Phase 2 of removing QDesktopWidgetVolker Hilsheimer2020-06-085-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove QDestopWidget public header, simplify the implementation that maintains a Qt::Desktop type QWidget for each QScreen, and turn QWidget's initial target screen into a QScreen pointer. QApplication::desktop() now takes an optional QScreen pointer, and returns a QWidget pointer, so that applications and widgets can get access to the root widget for a specific screen without having to resort to private APIs. QDesktopWidgetPrivate implementations to look up a screen for an index, widget, or point are now all inline functions that thinly wrap QGuiApplication::screens/screenAt calls. We should consider adding those as convenience APIs to QScreen instead. Note that QWidget::screen is assumed to return a valid pointer; there is code that handles the case that it returns nullptr (but also code that trusts that it never is nullptr), so this needs to be defined, verified with tests, and asserted. We can then simplify the code further. Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-081-14/+14
| | | | | | | Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QAbstractItemModel: remove deprecated setRoleNames()Christian Ehrlicher2020-06-072-6/+15
| | | | | | | Remove setRoleNames() and all its now unneeded helper functions. Change-Id: I0a83751aace35700655d4cc7c79278325994cbdd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove winrtOliver Wolff2020-06-065-14/+9
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove the deprecated QDirModelVolker Hilsheimer2020-06-041-4/+3
| | | | | | | | | QFileSystemModel is the documented replacement. It uses threads to populate the model, which QDirModel doesn't. Change-Id: I7818ecd8f849eb566ac176612f382e17a0471c47 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-05-181-5/+2
|\ | | | | | | | | | | | | Conflicts: src/corelib/text/qbytearray.cpp Change-Id: I63706409464d31391012bacdadfd1f6300509787
| * Revert "note QFileDialog::setNameFilters() is not supported on Android"Assam Boudjelthia2020-05-121-5/+2
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 9802b93cc76de8a033a9806383c1631f36225931. The commit dbaf62033af3fdd7998c108246d0d96416595605 allows using nameFilters on Android platforms. Task-number: QTBUG-83089 Change-Id: I7b57cd0423c41e7527ce7a650626b602ea9b587d Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Reduce QDesktopWidget API to bare minimumVolker Hilsheimer2020-05-153-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The class is documented as obsolete, and the majority of APIs is marked as deprecated. In this first phase, remove all explicitly deprecated APIs and trivial implementations. The test case is complete removed; what's left when code that uses any of those deprecated methods is removed is not testing anything meaningful. For some methods, there is no practical replacement using QScreen yet, and QDesktopWidget is still used in QWidget internals. Those require refactoring to only use QScreen before the rest can be removed. Change-Id: I8f7c968ec566820077221d37b817843758d51d49 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove dead code from src/widgetsVolker Hilsheimer2020-05-114-36/+0
| | | | | | | | | | | | | | | | Code that's removed via QT_VERSION(6, 0, 0) check is already no longer compiled. Change-Id: I70865f330a6260ac2e9cf2770d599a5b6f7bb7d4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Add a QRegularExpression::fromWildcard() convenience methodLars Knoll2020-05-061-4/+2
| | | | | | | | | | | | | | | | | | Simplify constructing QRegularExpression objects from a glob pattern. Change-Id: I06f60b1dfea3da969e2474dedd44b6ca5d456d7d Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | QFileDialog: fix enumeration mismatchGiuseppe D'Angelo2020-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | To define a shortcut a Qt::ArrowType enum value was getting mixed with a keyboard modifier. An actual mistake spotted by blocking mixed-enum operations! Change-Id: I4df56ee411599937c243288e8518b5c1df446397 Pick-To: 5.15 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-041-0/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
| * note QFileDialog::setNameFilters() is not supported on AndroidAssam Boudjelthia2020-04-231-0/+6
| | | | | | | | | | | | Task-number: QTBUG-83089 Change-Id: I134917476548f9756a14975be6b1b20312a8ca40 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Remove deprecated members from QtWidgets/kernel classesVolker Hilsheimer2020-04-161-1/+1
| | | | | | | | | | | | | | | | Cleaning up those that are trivial to remove because they have direct replacements. Change-Id: Ie8ac02c3d6273110f1f11e17fdeae496bc66321f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Remove deprecated members from dialog classesVolker Hilsheimer2020-04-168-378/+4
| | | | | | | | | | | | | | And a few cleanups of out-dated comments and dead code. Change-Id: I59c6b9129a21b8953626cb63c3ebbf9b6c49a657 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Remove deprecated QWizard memberVolker Hilsheimer2020-04-162-13/+0
| | | | | | | | | | Change-Id: If6a0125ab9eba5f1b5040adb2e087003b45f5b3d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QApplication: remove obsolete globalStrut functionalityVolker Hilsheimer2020-04-101-4/+2
| | | | | | | | | | | | Change-Id: If56873f86f5291264cac720f8db7dbd4db756f49 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Change qHash() to work with size_t instead of uintLars Knoll2020-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-085-41/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * macOS: Remove all use of deprecated Q_OS_OSX defineTor Arne Vestbø2020-04-031-1/+1
| | | | | | | | | | Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Use correct deprecation macro, and add \since to new member functionVolker Hilsheimer2020-04-022-3/+3
| | | | | | | | | | Change-Id: Ib9e88855c708f1fe2402d78c55ff08812d86e035 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Fix deprecation warnings for QInputDialog::getDouble()Lars Knoll2020-03-262-37/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The way this was done didn't really make sense. The change added an overload with one additional argument. The deprecation warning would have now forced everybody to explicitly specify all arguments to avoid the warning. Instead, keep both overloads in 5.15, but document them as one method. Remove the old version in Qt6 and move the default arguments to the new version. Change-Id: I738d4d1b99cdf30db53acf14382a00cac74aa10a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Remove all QRegExp dependencies from widgetsLars Knoll2020-04-012-6/+4
| | | | | | | | | | | | | | | | | | QRegExp is deprecated in Qt6 and will get moved to the Qt 5 compat library. As such we need to remove all API and usages of QRegExp in Qt. Change-Id: I33fb56701d3d7c577f98a304c1d4e6f626fcb397 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Get rid of QRegExp usage in qfiledialogLars Knoll2020-03-301-8/+13
| | | | | | | | | | | | | | | | and replace with QRegularExpression Change-Id: Ic692fc0ea24da84dd4b6bb4c8a846c0fcc62c3cb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | Remove some leftovers of QRegExpValidatorLars Knoll2020-03-301-4/+0
| | | | | | | | | | | | | | Amends dee55af0a5359bb3b57a89cf3065ffca9d8506da Change-Id: I59c02c6c289028abb86cdab1b2f2b3efdcea7821 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | Remove QGuiAction again and split QAction implementation up insteadVolker Hilsheimer2020-03-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Duplicating the number of classes is a high price to pay to be able to have some QAction functionality behave differently, or be only available in widgets applications. Instead, declare the entire API in QtGui in QAction* classes, and delegate the implementation of QtWidgets specific functionality to the private. The creation of the private is then delegated to the Q(Gui)ApplicationPrivate instance through a virtual factory function. Change some public APIs that are primarily useful for specialized tools such as Designer to operate on QObject* rather than QWidget*. APIs that depend on QtWidgets types have been turned into inline template functions, so that they are instantiated only at the caller side, where we can expect the respective types to be fully defined. This way, we only need to forward declare a few classes in the header, and don't need to generate any additional code for e.g. language bindings. Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-181-1/+1
|\| | | | | | | Change-Id: Ia79c2457f20f3428ef1b4358c1094e8dc1bbc33e
| * Header-review: add Q_DECL_DEPRECATED_X macro to deprecated methodVolker Hilsheimer2020-03-171-1/+1
| | | | | | | | | | Change-Id: I486d479b2e07042b397869aab117f44e65539f1e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix compilation with -no-feature-regularexpressionEskil Abrahamsen Blomfeldt2020-03-171-0/+4
| | | | | | | | | | | | | | | | | | This -no-feature has probably not been tested for a while and seems to have rotted a bit, both some unprotected uses and some warnings on unused parameters. Change-Id: Ie20a06c78d3b4c36860dab49d6615eaa8ffc9077 Reviewed-by: Lars Knoll <lars.knoll@qt.io>