summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Code style fixYuhang Zhao2020-01-041-16/+14
| | | | | | | | Amends commit a0eb51c3870d90c06966dbfbe26b114f39103b60 Change-Id: Ida0bf55cb9a056607181241dd84522a010c40890 Reviewed-by: Federico Guerinoni <guerinoni@micro-systems.it> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove QOpenGLTexture dependency from QTextureFileDataJohan Klokkhammer Helsing2020-01-031-11/+1
| | | | | | | | Just print the hex value of the format. Task-number: QTBUG-74409 Change-Id: I0441eda050735325f7686532b17ef765f71bec9b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* MSVC: Fix integer conversion warnings in containersFriedemann Kleint2020-01-036-9/+9
| | | | | | | | | | | | Add some casts, fixing warnings like: src/corelib/text/qbytearray.h(490): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data src/corelib/text/qstring.h(1045): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data src/corelib/tools/qarraydatapointer.h(80): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data src/corelib/tools/qarraydatapointer.h(75): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data src/corelib/text/qbytearray.h(490): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data Change-Id: I221db4d5b660224f0fc1869248802c496db1b91c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPalette: fix debug stream operatorVitaly Fanaskov2020-01-031-26/+50
| | | | | | | | | Current implementation takes both color group and color role into account. Code readability is also improved. Fixes: QTBUG-78544 Change-Id: Ibfa925f3e4cb0be89915607eee142926e05000b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QPalette::isBrushSetVitaly Fanaskov2020-01-025-44/+87
| | | | | | | | | | | The previous implementation did not take into account different color groups in resolve mask. It led to some issues when resolving a palette or checking whether a brush is set or not. Task-number: QTBUG-78544 Change-Id: I9b67b2c444eb62c022643022a874dc400005e6ee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Long live QFlatMap!Joerg Bornemann2020-01-022-0/+983
| | | | | | | | | | Add a light-weight associative container, API-wise very similar to QMap, that's based on two sorted continuous containers (QVector by default). The class is internal for now. Change-Id: Ife12576c4abb39a3ea2acb0a1ba0faca91b3a4c5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QBitArray: Add method to get int valueFederico Guerinoni2019-12-202-0/+36
| | | | | | | | | | | | It is useful to use an array of bit as an integer value. I add also a prarameter to set endianness when converting value to UInt32. [ChangeLog][QtCore][QBitArray] Added toUInt32() to return the bit array's value as a uint32_t. Change-Id: I9d8c7a33f11e7ce94cb67aa9a50b11fa42d56168 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPalette::setBrush: remove a workaround for PlaceholderTextVitaly Fanaskov2019-12-181-26/+7
| | | | | | | | | This partially reverts ebd3a13b807c6af2684b42d3912549caf7ef82aa removing the part that was intended to be removed in Qt 6. Task-number: QTBUG-78544 Change-Id: I4b7eb922c46e44411717f80234fad8ad7dd09aef Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Basic QImage cleanupAllan Sandfeld Jensen2019-12-184-303/+1
| | | | | | | Remove deprecated methods and do marked TODOs for Qt6. Change-Id: I905743cf909776c6433616b3a7c3b544d75f2afe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Avoid asan errorsLars Knoll2019-12-161-1/+1
| | | | | | | | | The SSE code can read slightly outside the bounds of the string. This is ok, as it's limited to 16 byte boundaries and thus can't cause a segfault. But it does cause a crash with asan. Change-Id: Id6e4a550579dc6228f365357773b392ecfd41471 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Convert QString to use QArrayDataPointerLars Knoll2019-12-166-220/+149
| | | | | | | | | | | | We're now using the same infrastructure for QVector, QString and QByteArray. This should also make it easier to remove the shared null in a follow-up change. Change-Id: I3aae9cf7912845cfca8e8150e9e82aa3673e3756 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* Remove a bunch of code maked for removalOlivier Goffart2019-12-142-12/+2
| | | | | Change-Id: I1bda415433b748a1b8408ef3b890a6de3e51b3ba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QOpenGLWidget from QtWidgets to QtOpenGLJohan Klokkhammer Helsing2019-12-124-10/+11
| | | | | | Task-number: QTBUG-74409 Change-Id: I98a4f8a9e1d439bfdc24eb2910385273cedecd29 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QOpenGLTimerQuery to from QtGui to QtOpenGLJohan Klokkhammer Helsing2019-12-125-13/+18
| | | | | | Task-number: QTBUG-74409 Change-Id: Ic8ef0a814700b2ed76b661d560907ad498334231 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Convert date-time faithfully in QDateTimeEdit::setDateTime()Edward Welbourne2019-12-122-4/+30
| | | | | | | | | | | | | | | | | | | Previously, setDateTime() was documented to ignore the new date-time's time-spec. It used the date and time (determined using that timespec) with the QDateTimeEdit's configured spec. It is debatable whether that really counts as ignoring its time-spec. All the same, that's what it did. Fixing it is a behavior change. Added tests. [ChangeLog][QtWidgets][QDateTimeEdit] QDateTimeEdit::setDateTime() now converts the new datetime to the QDateTimeEdit's time-spec, rather than combining its date and time (determined using the time spec it came with) with the QDateTimeEdit's date and time. Fixes: QTBUG-71181 Change-Id: Ibf0bd87723c3957ca00a2199d51d992032ef57ee Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2019-12-1175-356/+693
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-1175-356/+693
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| | * rhi: gl: Handle struct and array of struct uniformsLaszlo Agocs2019-12-102-13/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have intentionally limited support for advanced things like arrays in a uniform block. There is one very common case however: a one dimensional array of a struct. Typical example for Qt Quick 3D: struct LightSource { vec4 position; ... }; layout (std140, binding = 1) uniform cbBufferLights { int uNumLights; LightSource lights[MAX_NUM_LIGHTS]; }; With GLSL (uniform blocks disabled) this gets turned into two structs where one has a 'lights' member that is an array of the other struct. Teach the OpenGL backend of QRhi how to handle this. This makes the QRhi port of Qt Quick3D functional with the OpenGL backend as well. Change-Id: I6a09b93276794f7ecdd38f5bfbd3491a9ef58146 Fixes: QTBUG-80628 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * rhi: gl: Destructure mat3 correctlyLaszlo Agocs2019-12-101-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | As per std140 packing rules. Change-Id: I85663d36a9fa617ea387e8f201677471b2ebd948 Fixes: QTBUG-80655 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Liang Qi2019-12-1066-332/+585
| | |\
| | | * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-1066-332/+585
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| | | | * Windows QPA: Export "checkable" info for menu items through UI AutomationAndre de la Rocha2019-12-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to allow screen readers to say checked/unchecked for checkable menu items, this information has to be provided through UI Automation. Checkable menu items should implement the "Toggle" UI Automation pattern. The "checkable" state must also be supported by QAccessibleMenuItem, which is being added by a separated change. Task-number: QTBUG-80551 Change-Id: I661668310d1b6b4701d0c0efdb1dcfd15d0db729 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * Add "checkable" state to accessible menu itemAndre de la Rocha2019-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The information about whether a menu item may be checked is necessary to allow the platform code (in particular, Windows UI Automation layer) to make this information available to screen readers. Task-number: QTBUG-80551 Change-Id: Ibfcc4f2da1ebc68e7dc5df2cd46bbfc0a177da12 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | | * Don't wrap feature detection macros with QT_HAS_FOO() variantsTor Arne Vestbø2019-12-1026-87/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using wrappers for these macros is problematic when for example passing the -frewrite-includes flag to preprocess sources before shipping off to distcc or Icecream. It will also start producing warnings when compilers implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example https://reviews.llvm.org/D49091 Both https://clang.llvm.org/docs/LanguageExtensions.html and the SD-6 document at https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations recommend defining '__has_foo(x) 0' as a fallback for compilers without the macros, so that's what we go for. Change-Id: I0298cd3b4a6ff6618821e34642a5ddd6728be767 Reviewed-by: Alex Richardson <arichardson.kde@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * Fix QPushButton style sheet style for overlay (content) imageEirik Aavitsland2019-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike comparable widgets like QLabel or QFrame, QPushButton would not render a content image specified in the stylesheet, unless a border style was also specified. Fix by explicitly rendering the content image, if set, in the native-border codepath also. Although the doc warns about the QPushButton border style having to be set in order for the background styling to take effect (since the native border painting otherwise hides it), the previous behavior does seem unexpected. Fixes: QTBUG-72029 Change-Id: I8b979b010515dab4dcf2f00344a187c87eeec096 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | | | * Convert some uses of QStringRef to QStringViewEdward Welbourne2019-12-091-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There remain QStringRef uses where QString::splitRef() is used. Requires converting some .count()s to .size()s, as QStringView lacks count(); and some .toInt()s need to be handled by QLocale::c(). Change-Id: If9a49e063d217671ea9335a82e4bf977b7b48be0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * Prefer QDate::startOfDay() over QDateTime(const QDate &)Edward Welbourne2019-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latter can be invalid if midnight is skipped by a spring-forward. Change-Id: Ibf98d165557229f19622774ebf9a27bb0911c7a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * QAbstractItemView: add a note about ToolTipRole in dataChanged()Christian Ehrlicher2019-12-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt::ToolTipRole is not honored by dataChanged() which may be a little bit surprising. Therefore add a small note about this behavior. Fixes: QTBUG-78726 Change-Id: Ic4361f55e55ab59d5bae2fdb98907a62055604c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | | * QPushButton: fix icon + text layouting in RTL modeChristian Ehrlicher2019-12-092-64/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fusion style did not properly handle the text layouting for a QPushButton in RTL mode. Also the menu indicator was not adjusted in this case. Fix it by calling the base class implementation as QCommonStyle does it mostly right. Since Fusion does not handle State_On or State_Sunken but QCommonStyle does, explicitly mask them out. Fixes: QTBUG-80083 Change-Id: Ide7bf997b4f4a5b61fcb8ea4a1a152122daef1e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * Move the tooltip out of the way of very large mouse cursorsVolker Hilsheimer2019-12-097-15/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users that have large mouse pointers configured in their settings can not see tooltips, as they are obscured by the pointer. Native applications on Windows and macOS have the same problem, which includes the tooltips for the minimize/maximize/close controls in the window frame of e.g. Explorer. Introduce QPlatformCursor::size that returns a value that is based on the user's settings, or a default value. We can then use that value to move the tooltip out of the way. On Windows, the calculation of the cursor size is based on experimenting with the settings, which are in logical independent pixels. The placement of the tooltip attempts to keep existing behavior, and to not end up with a tooltip that's very far away from the tip of the arrow even for very large mouse cursors. [ChangeLog][QtWidgets][QToolTip] Make sure that the tooltip is not obscured by very large mouse pointers on Windows and macOS. Change-Id: I8e13b7a166bfe8b59cef4765c950f90fefeaef9d Fixes: QTBUG-79627 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * Doc: Clarify ownership of added menu for QMenuBar::addMenu(QMenu *)Alexander Volkov2019-12-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaafba9557ece36607c86d5be4fbb5e4ac2e459d3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | | * Avoid crash in menu that was previously shown as submenuAlexander Volkov2019-12-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reset sloppyState for the previous submenu, so that if it will be shown as a menu, it will not use an incorrect pointer. Fixes: QTBUG-80528 Change-Id: If2ba8c3a664983ee76eb90d2c9a8096e2bd0a4e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * QWidget: React to platform surface being created or destroyedTor Arne Vestbø2019-12-091-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform window may create or destroy its surface from other entry points than the QWidget API, in which case QWidget needs to sync up its own state to match. In particular WA_WState_Created and the winId needs to be recomputed. Fixes: QTBUG-69289 Fixes: QTBUG-77350 Change-Id: I769e58ead3c2efcf8c451c363108848feade9388 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | | | * Register the screen pulse eventJames McDonnell2019-12-092-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Future versions of QNX will, by default, require the use of registered events. Currently, event registration is supported but optional. Change-Id: Ie45484d5ca9fa832a28ccf08cb1764cf24262dcc Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
| | | | * rhi: metal: Do not fail pipeline creation upon compiler warningsLaszlo Agocs2019-12-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I39384de56d74cf9f1d345a5d395cc07030c6a2ab Fixes: QTBUG-80629 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | | | * Fix crash on debug output of null QColorSpaceAllan Sandfeld Jensen2019-12-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7d1d20d7dc2c5ac10dbe8d0a0b4111e8198bfabf Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | | | * PSQL: set correct empty QVariant in QPSQLResult::record()Christian Ehrlicher2019-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the QSqlField used to retrieve the data is reused in the loop, the default empty value of the QSqlField is not set for all except the first field since it was implicitly set by QSqlField::setType() only when the value is invalid. Therefore we have to call QSqlField::setValue() directly. Change-Id: I1d3abe4e3c46f6378f9ff25529a79bbe33bb7b74 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | | | * Fix updating the text cursor position after editingSona Kurazyan2019-12-062-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases when editing the text (for example when removing the selected text, or pasting a text block) the text cursor position is updated, but its visual x position is not updated. This causes the next cursor movements to start from a wrong position. Force the update for those cases. Fixes: QTBUG-78479 Change-Id: Ia496be62beec58660f5e1695e5aafae09c79684e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | | | * Tell the truth about QDateTimeEdit's range-of-values propertiesEdward Welbourne2019-12-061-85/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were factual errors. Important details were omitted. The \sa blocks were haphazard and cluttered. Change-Id: I76ceb00830c36699c48529b64808844faf09391e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | | * Allow lower-case for the T and Z in ISO 8601 date formatEdward Welbourne2019-12-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cite RFC 3339 as basis for allowing a space in place of the T, too. The RFC mentions that ISO 8601 accepts t and z for T and Z, so test for them case-insensitively. Add a test for this. Change-Id: Iba700c8d74d485df154d27300aab7b1958e1ccef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * Fix handling of trailing space at the end of an ISO date-timeEdward Welbourne2019-12-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If milliseconds were followed by a space, the space was included in the count of "digits" read as the fractional part; since we read (up to) four digits (so that we round correctly if extras are given), a harmless apce could cause scaling down by too large a power of ten. Since QString::toInt() ignores leading space, we were also allowing interior space at the start of the milliseconds, which we should not, so catch that at the same time. Added tests, including one for the rounding that's the reason for reading the extra digit, when present. Fixes: QTBUG-80445 Change-Id: I606b29a94818a101f45c8b59a0f5d1f78893d78f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * QTimeZonePrivate: remove some Q_LIKELY markersEdward Welbourne2019-12-061-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the relevant conditions are indeed likely, we don't want to push the less likely branch into hard-to-load pages; they're not anomalous conditions, merely ones with lower probability. Change-Id: Icc12a921d38d8c398cd832964e9d57d7648698b2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * Fix crash when a date-time has an invalid time-zoneEdward Welbourne2019-12-062-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDateTime is a friend of QTimeZone, so can access its internals; but it must check the zone is valid before doing so. Expanded tst_QDateTime::invalid() and made it data-driven to catch the failure cases. Commented on a test-case that caught a mistake in my first attempt at this, and on QDateTimeParser's surprising reliance on a quirk of QDateTime::toMSecsSinceEpoch()'s behavior. Fixes: QTBUG-80146 Change-Id: I24856e19ff9bf402152d17d71f83be84e366faad Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | | | * 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>
| | | | * Doc: Update info about building testsLeena Miettinen2019-12-062-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63987 Change-Id: I4b6e8f35afc9d3ca10b393a0305bbb51bf81ec26 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | | * Item views: do not clip items horizontally in dragging iconEirik Aavitsland2019-12-062-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dragging icon is created from the visible items in the selection. It would be clipped to the parts visible in the viewport. That meant that items on the edge could be rendered illegible, even though they were part of what was being dragged. Fix by dropping the horizontal clipping to the viewport. Items fully outside the viewport are already filtered away, so this should at most make a difference to the bottom and/or top items in the set. Keep the vertical clipping, since items may easily be very wide, so an unclipped icon would be unwieldy. Done-With: Sona Kurazyan <sona.kurazyan@qt.io> Fixes: QTBUG-77336 Change-Id: I2d29cb0ca69c1058635106aa0c67e9f7e140d1cd Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | | | * Copy formatting attributes when cloning an empty QTextDocumentSona Kurazyan2019-12-051-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cloning a QTextDocument, the text fragment of the original document is copied into the new one, which results into copying also the formatting attributes. However, when the text document is empty, the corresponding text fragment is also empty, so nothing is copied. If we want to transfer the formatting attributes for an empty document, we need to set them explicitly. Fixes: QTBUG-80399 Change-Id: I382cd0821723436120af47c06ec7bfa849636307 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | | | * QCborValue: fix replacing of elements with byte data with ones withoutThiago Macieira2019-12-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We forgot to reset the flags when replacing the element, so we ended up with an integer with HasByteData after: testMap[0] = QStringLiteral("value"); testMap[0] = 42; Fixes: QTBUG-80342 Change-Id: Ia2aa807ffa8a4c798425fffd15dabfa066ea84b0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | | | * Windows QPA: Fix tray geometry not updatingFriedemann Kleint2019-12-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application does not update its screens when there are no windows on which a WM_DPICHANGE could be received. Add a check for it to the tray window procedure and trigger an update from there if no top levels are present. Fixes: QTBUG-79248 Change-Id: I0b1c4db560662ecf2b473304942da373be6fdc73 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * macOS: Improve QCocoaGLContext loggingTor Arne Vestbø2019-12-052-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I27d0abe0eb5b0f0ba64b8787b430484c48b131c0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>