summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qcolordialog.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Widgets: Improve usage of string view typesAnton Kudryavtsev2024-04-081-2/+2
| | | | | | | Use string views in QFontDialog, QColorDialog and QCommonStyle Change-Id: I22f4b4694e2d18b784aaa85aebff8d92b8f0b871 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Widgets: pass widget to QStyle::pixelMetric()Christian Ehrlicher2024-01-161-1/+1
| | | | | | | | | | | | Make sure to pass the widget to QStyle::pixelMetric() as some styles might use this (e.g. the new windows styles) to determine the correct pixel metric. Pick-to: 6.7 6.6 6.5 6.2 Task-number: QTBUG-1857 Change-Id: I5c32f5af8b284749732b610e56b4e3d8c8ed1946 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* QColorDialog: Use pmf-style connectsChristian Ehrlicher2024-01-101-36/+43
| | | | | | | | Port all string-based signal/slots connections to pmf-style connects. Pick-to: 6.7 Change-Id: If1075a5a8a4d018e060e7d18ee59c8fc4c0a5207 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QColorDialog: use std::array instead QPolygonChristian Ehrlicher2023-11-161-4/+3
| | | | | | | | Use std::array<QPoint, 5> instead a dynamic QPolygon since there is no dynamic allocation needed here. Change-Id: Iaa6fce9e0e769f2a5dd47de083208457b430f3c3 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Unify QDialog WA_WState_ExplicitShowHide handlingTor Arne Vestbø2023-10-231-5/+0
| | | | | | | | | | | | | | | | Instead of checking it inside QDialogPrivate::setVisible and its overrides, we can check it in QDialog::setVisible, up front. The logic in QDialogPrivate::setVisible related to modality that was executed prior to the WA_WState_ExplicitShowHide is now skipped in the case the WA_WState_ExplicitShowHide condition hits, but this makes sense as the modality logic has a second part at the end of the function, restoring the modality, and this part was never executed as the code was prior to this change. Change-Id: I9580e91dbc5a981c83538d765b86138afee44f14 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Include what you need: <QPointer>Marc Mutz2023-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Dialogs: clean up native dialogs when object gets destroyedVolker Hilsheimer2023-09-061-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::setVisible is virtual, and called via hide() by both the QDialog and the QWidget destructor. A dialog that becomes invisible when getting destroyed will at most execute the QDialog override. Subclassing QDialog and overriding setVisible() to update the state of the native platform dialog will not work, unless we explicitly call hide() in the respective subclass's destructor. Since e0bb9e81ab1a9d71f2893844ea82, QDialogPrivate::setVisible is also virtual, and gets called by QDialog::setVisible. So the clean solution is to move the implementation of the native dialog status update into an override of QDialogPrivate::setVisible. Add test that verifies that the transient parent of the dialog becomes inactive when the (native) dialog shows (and skip if that fails), and then becomes active again when the (native) dialog is closed through the destructor of the Q*Dialog class. The test of QFileDialog has to be skipped on Android for the same reason as the widgetlessNativeDialog. Fixes: QTBUG-116277 Pick-to: 6.6 6.5 Change-Id: Ie3f93980d8653b8d933bf70aac3ef90de606f0ef Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QColorDialog: Ignore mouse move events when no mouse button is pressedAxel Spoerl2023-07-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | mouseMoveEvent overrides in QColorLuminancePicker and QColorPicker have triggered value changes unconditionally. This happened under the assumption that the widget attribute WA_Hover is not set (which is the default behavior). In that case, mouseMoveEvents are only delivered if a button is pressed. If WA_Hover is set - e.g. by applying a style sheet - mouseMoveEvents get delivered also when no button is pressed. This leads to faulty behavior: The color and the luminance change, whenever the mouse is moved into the respective widget. Color/luminance are changed to the value representing the edge on which the mouse has left the area. This patch changes both mouseMoveEvent overrides. They return early to avoid hovering changing the colors of the luminance/color picker, but ignore() the event in case anything behind the picker needs hover. Since this is a purely graphical effect, an autotest was not added. Fixes: QTBUG-115516 Pick-to: 6.6 6.5 6.2 5.15 Change-Id: I000d113a1c81c46799cbb5197bf9acb3849e7d3b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QColorDialog: React to HSV values during manual edit instead of changeAxel Spoerl2023-07-241-1/+1
| | | | | | | | | | | | | | The existing signal connection can cause a loop and undefined behavior in the interaction between the line edit for a hex rgb color and the individual rgb values. => Change connection to textEdited, to react only on manual editing. Fixes: QTBUG-115189 Pick-to: 6.6 6.5 Change-Id: Ie3062c575652b905a8ab16edb2f5f77f8d150f36 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtWidgets: code tidies: use the 4-arg connect overloadGiuseppe D'Angelo2023-06-281-1/+1
| | | | | | | | The 3-arg connect is error-prone and makes the lifetime of the connection unclear. Change-Id: I4e518dd4a9733cc0a42b02639cce9c6136ad5afc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add flag to hide eye dropper button from QColorDialogFabio Falsini2023-06-061-10/+13
| | | | | | | | | | | | | | | | | | | | | | There are cases where this eye dropper control is useful and other cases where it is useless. In case of an application connected with graphics it's useful because it allows to select a precise color in a very simple way. But in the case of a simple app where the user only has to choose a color for, example, a graph this control is useless and risks confusing the user (this kind of control is only present in graphics software, not all "normal" users know what it is for or understand its use). This patch add a flag to hide the button. As a drive-by change, the internal screenColorPickerButton pointer is renamed to eyeDropperButton to be more consistent with the qml ColorDialog. [ChangeLog][QtWidgets][QColorDialog] Added a NoEyeDropperButton option to hide the eye dropper button. Change-Id: Ib29d5343383af97c1f488f9e33749517181aead7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QColorDialog: Support hex rgb values with and without leading #Axel Spoerl2023-03-171-11/+22
| | | | | | | | | | | | | | | | | | QColorDialog supports entering hex rgb values only with a leading #. That makes copy/paste impossible whenever the copy source has plain hex, without the leading #. This patch automatically adds a leading # character, when missing. As a drive-by, QObject::connect statements are altered to PTMF syntax, amending 9eb1b9e86ce3d1004e39e8ab7c7ecb6796d6df1a. The patch also adds an autotest for the new functionality. Fixes: QTBUG-111742 Pick-to: 6.5 Change-Id: I4ced29dc8b543457f411a3fa0ac756b550cdb09f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtWidgets: Fix errors about fields from anonymous namespaces ↵Friedemann Kleint2023-02-011-6/+18
| | | | | | | | | | | | | | | | | | (-Werror=subobject-linkage) Move types to QtPrivate, fixing errors like: error: QCalendarWidgetPrivate’ has a field QCalendarWidgetPrivate::m_model whose type uses the anonymous namespace [-Werror=subobject-linkage] The error appears in CMake Unity (Jumbo) builds apparently due to multiple anonymous namespaces per file. Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: Id678af4db5633b1b2267425c7751f1312935d5d5 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QtWidgets: Disambiguate static functions/variables and definesFriedemann Kleint2023-01-141-2/+2
| | | | | | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Properly prefixing the childWidgets() function also prevents it from cluttering static builds. Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: Idd2b1ec748f33cfae8f3213847c43b3fb0550377 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QColorDialog: Account for native dialog helper not being able to showTor Arne Vestbø2022-11-111-4/+7
| | | | | | | | | | | | | | | | | | The color dialog implementation lazily initializes the widget hierarchy, so that they are not created if we're using a native dialog. But unlike QFileDialog, which does the same, QColorDialog failed to handle the case where the native helper could not show a native dialog. We now correctly lazy initialize the widget hierarchy if the native show fails. The WA_DontShowOnScreen state management has been left out, as it needs some general refactoring. This patch doesn't fix, or regress, any logic related to WA_DontShowOnScreen. Task-number: QTBUG-108153 Change-Id: Icbd506617a2fe302bb61aab977e7c8ea4bd64878 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtWidgets: Use strcmp instead of equality operatorMate Barany2022-09-261-3/+1
| | | | | | | | | | Addressing some findings from the review of QTBUG-98434, use strcmp instead of the equality operator. This saves one strlen() per QL1SV constructor and takes L1 out of the picture. Task-number: QTBUG-103100 Change-Id: Iffe8ce4c4dd9a3ee590d4bb8a14b950241b835e2 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* add color picking support on wayland using the XDG desktop portalHarald Sitter2022-08-261-1/+18
| | | | | | | | | | | | | | | | | | On wayland applications are not trusted to perform screen grabs by default, it is however possible to let the user specifically pick the color of a pixel using the XDG desktop portal (otherwise used for sandboxing etc.). Try to use this portal on unix systems by default. To support this use case some extra abstraction is necessary as this constitutes a platformservice rather than a platform feature. To that end the QPlatformService has gained a capability system and a pure virtual helper class to facilitate asynchronous color picking. When supported the color picking capability takes precedence over the custom picking code in QColorDialog. Fixes: QTBUG-81538 Change-Id: I4acb3af11d459e9d5ebefe5abbb41e50e3ccf7f0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>
* QtWidgets: replace remaining uses of QL1String with QL1StringViewSona Kurazyan2022-05-021-2/+2
| | | | | | | Task-number: QTBUG-98434 Change-Id: If20e217e6e4fecd18c7707bf94650f5ba856893f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtWidgets: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-021-2/+4
| | | | | | Task-number: QTBUG-98434 Change-Id: I310ea8f19d73a79d985ebfb8bfbff7a02c424360 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* widgets: Disable "Pick color" in QColorDialog when unavailableFan PengCheng2022-03-241-14/+31
| | | | | | | | | | | On Wayland, you can't read screen content, so the "pick color" feature does not do anything. In cases such as these, we should detect that the platform does not support the feature and hide or disable the button. Fixes: QTBUG-101145 Change-Id: I192ca2aac78b3df5352b4dc71100b93f69dc5efb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix deprecated use of QColor::setNamedColorMårten Nordheim2022-03-171-2/+1
| | | | | | | 'Use fromString() instead.' Change-Id: I4efef147a8b0486f2664fd7fe6c35a9c82479b90 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QColorDialog: code tidiesGiuseppe D'Angelo2022-02-241-1/+1
| | | | | | | | Combine two flag-like enumerations using a bitwise OR, not a plus. Cleanup for the follow-up commits. Change-Id: Iceb05bf5ea0635d623ba9a7d145606e80b7f21f3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix Pick Screen Color with multiple monitorsFawzi Mohamed2022-01-151-1/+3
| | | | | | | | | | | QScreen::grabWindow expects screen coordinates, not global ones, use QScreen::geometry() to compute them. Fixes: QTBUG-99472 Pick-to: 6.2 6.3 Change-Id: Ic4b99577b8cb394e6cd0a2d3f554bb3ec8250afa Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Zhang Hao <zhanghao@uniontech.com>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-161-5/+5
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Remove usage of QDesktopWidget(Private) from most places in QtWidgetsVolker Hilsheimer2020-07-071-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Phase 2 of removing QDesktopWidgetVolker Hilsheimer2020-06-081-2/+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>
* Remove winrtOliver Wolff2020-06-061-1/+1
| | | | | | | | | 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>
* Reduce QDesktopWidget API to bare minimumVolker Hilsheimer2020-05-151-1/+1
| | | | | | | | | | | | | | | | | 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 deprecated members from dialog classesVolker Hilsheimer2020-04-161-28/+0
| | | | | | | 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 all QRegExp dependencies from widgetsLars Knoll2020-04-011-2/+0
| | | | | | | | | 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>
* Remove some leftovers of QRegExpValidatorLars Knoll2020-03-301-4/+0
| | | | | | | Amends dee55af0a5359bb3b57a89cf3065ffca9d8506da Change-Id: I59c02c6c289028abb86cdab1b2f2b3efdcea7821 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-02-241-1/+2
|\ | | | | | | Change-Id: Ibe5b4aa249863a54007180f3684dc5ce1b23cb7b
| * Fix wrong DPI used by QStyle::pixelMetric()Friedemann Kleint2020-02-221-1/+2
| | | | | | | | | | | | | | | | | | Pass on the option or the widget in order to ensure usage of the correct DPI for High DPI scaling. Task-number: QTBUG-82356 Change-Id: I5df903a83f88adebd143e514e2fead367d39f015 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | 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.13' into 5.14Qt Forward Merge Bot2019-10-281-2/+2
|\ | | | | | | | | | | | | Conflicts: src/corelib/serialization/qjson_p.h Change-Id: I83cea141a4de8b3998478bfded84ca9029f7a2a9
| * QColorDialog: Fix memory leak when picking screen colorsFriedemann Kleint2019-10-241-2/+2
| | | | | | | | | | | | | | | | | | Pass the dialog as parent to the event filter class in QColorDialogPrivate::_q_pickScreenColor(). Fixes: QTBUG-53469 Change-Id: I9110c19a8f49a545a0fbf7cfdb3ded70fea4dcce Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-171-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qlogging.cpp src/gui/painting/qtextureglyphcache_p.h src/gui/text/qfontengine.cpp src/widgets/widgets/qlineedit.cpp Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-121-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.pri Also required s/solid\.color/solidColor/ in a couple of places in: src/gui/painting/qpaintengine_raster.cpp Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
| | * Fix compilation with C++20Marc Mutz2019-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit capture of 'this' in [=] is deprecated in C++20. Fix by using explicit captures. Change-Id: I1633446f4670202b0d1aca938d8c27dbc0c1411e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-271-0/+3
|\| | | | | | | | | | | Change-Id: Ia279fc4a8226626041c772902a07b2f90f37b53b
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-05-271-0/+3
| |\| | | | | | | | | | Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
| | * Don't try to retranslate strings for native color dialogsTor Arne Vestbø2019-05-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the native color dialog is in use we haven't created any of the widgets and will crash when trying to update them. Change-Id: I6c43cc47359110c3b9db7cacb62581446cc6f7a3 Fixes: QTBUG-75858 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Remove usages of Q_OS_WINCEJoerg Bornemann2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This platform is history. Change-Id: Iddfab008a509f4828c321730414c8204055cf7af Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | QRegExp include cleanupSamuel Gaist2019-04-191-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp includes can be found in several files where there's not even a use of the class. This patch aims to avoid needless includes as well as follow the "include only what you use" moto. This patch removes a QRegExp include from the QStringList header which means that there is likely going to be code breaking since QStringList is used in many places and would get QRegExp in. [ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no longer includes qregexp.h. Change-Id: I32847532f16e419d4cb735ddc11a26551127e923 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace QWidget::margin() with QWidget::contentsMargins()Christian Ehrlicher2019-02-131-3/+4
| | | | | | | | | | | | | | | | Replace deprecated QWidget::margin/setMargin() calls with contentsMargin/setContentsMargins(). Change-Id: I7fe8056196d73d1be97446d40a438cd0b1a13817 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-081-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * QColorDialog: Remove flag Qt::MSWindowsFixedSizeDialogHintFriedemann Kleint2019-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The flag causes issues with High DPI scaling (the OS maintains the size in device pixels when moving across screens). It does not really make a difference (apart from the resize handle appearing) since the dialog uses QLayout::SetFixedSize. Fixes: QTBUG-73232 Change-Id: Iad08427796890582ac05758678d24e3cd707e669 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QDrag: mark QDrag::start() as deprecatedChristian Ehrlicher2019-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | QDrag::start() is deprecated since Qt4. Therefore annotate it with Q_DEPRECATED so it can be removed in Qt6. Change-Id: I5b82c482fa579f357cc67e38b86e6fe587f18ded Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>