Commit Graph

41227 Commits

Author SHA1 Message Date
Christian Ehrlicher
963941faae tst_QListView: cleanup
Cleanup QListView autotest:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations
 - use override
 - replaced QCoreApplication::processEvents with
   QTRY_VERIFY/QTRY_COMPARE

Change-Id: I38de7fb105cd70259e60e6b05de82944bee53a54
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-23 09:51:14 +02:00
Christian Ehrlicher
aa6d7dd7ee QSqlDriver: deprecate one-arg notification() signal
QSqlDriver::notifcation() signal is available in two versions since Qt4
times. They are both emitted in the corresponding places which is
useless.
Therefore deprecate the one-arg version.

[ChangeLog][QtSql][QSqlDriver] The one-arg version of
QSqlDriver::notifcation() is now deprecated.

Change-Id: Ie09aa0cc952f4d854c6fb617b37b9047a3194ee3
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-09-21 08:13:59 +02:00
Qt Forward Merge Bot
0a70723a96 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-09-21 01:00:57 +02:00
Qt Forward Merge Bot
eb5f02c5cc Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib615dbfd783c5a3cf0f130ff82965382ce5cfb5a
2019-09-21 01:00:46 +02:00
Joerg Bornemann
f155c40fdc Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-09-20 12:42:25 +02:00
Joerg Bornemann
73f880d393 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/makefile.h

Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
2019-09-20 08:20:47 +02:00
Qt Forward Merge Bot
580572f3c9 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-09-19 21:55:03 +02:00
Qt Forward Merge Bot
15dc8b1d8e Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I46ec05ade1c84e61f7f45562a218aa9ff55e2975
2019-09-19 21:54:53 +02:00
Christian Ehrlicher
6234286925 tst_QTreeView: cleanup
Cleanup QTreeView autotest:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations / replace with QTRY_foo() calls
 - use override
 - use QStyledItemDelegate

Change-Id: I0e2d023254ed9f6f5d94cebf4d4358351cc4c3e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-19 18:06:22 +02:00
Shawn Rutledge
ecc8367700 Add QScreen::virtualSiblingAt() and use it in QMenubarPrivate::popupAction
QGuiApplication::screenAt() is documented "If the point maps to more
than one set of virtual siblings, the first match is returned."
But in many cases it's possible to start from a known screen and
consider only its siblings, as when deciding where to open a QMenu
from a QMenuBar: the QMenuBar is already shown on some screen(s),
so the QMenu must be shown on a sibling from that set.  This function
should be useful in other such cases too, hence it might as well
be public API.

Task-number: QTBUG-76162
Change-Id: I83c74b40eb53f56fb285a6074a3dc2c0ea9c570b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-19 17:40:56 +02:00
Leena Miettinen
0d9f43d534 Doc: Edit QNetworkProxy::QNetworkProxy() default proxy type
Fixes: QTBUG-61771
Change-Id: Ideafe6f8f81c156e941f0548c152021b01b606a1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-19 10:18:31 +02:00
Friedemann Kleint
1ceb48c6a6 QWizard/AeroStyle: Fix condition introduced by previous fix
Set the variables within the condition introduced by
6c0e1dba40, as otherwise, the code
might not be executed.

Task-number: QTBUG-78300
Change-Id: Ia83db6fce197ebf16783f3b0c6d6fad7ebd2ba52
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-19 09:34:05 +02:00
Christian Ehrlicher
3c59080ce9 tst_QTreeWidget: cleanup
Cleanup QTreeWidget autotest:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations
 - use override

Change-Id: I2c07e95871d8725366cddd5cd098010709c8dc55
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-19 07:57:41 +02:00
Jani Heikkinen
1283ee3245 Revert "QReadWriteLock: replace (QWaitCondition, QMutex) with std::(condition_variable, mutex)"
This reverts commit 319c478603.

Reason for revert: QTBUG-78450

Change-Id: Ifaea83626296508558591d4ff207d4e0c883f841
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-09-19 04:15:04 +00:00
Morten Johan Sørvig
cd92049a95 Prevent crash in QWasmScreen::resizeMaximizedWindows()
screen() may return a null QScreen pointer during
screen initialization.

Fixes: QTBUG-78118
Change-Id: Ide26eb3f06861c38cd7ae56789dd010d4cd7e572
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-18 12:59:37 +00:00
Friedemann Kleint
6c0e1dba40 QWizard/AeroStyle: Fix crash when Qt::AA_NativeWindows is set
Prevent recursive platform window creation from the events
received during window creation (WM_POSCHANGING, etc).

Fixes: QTBUG-78300
Change-Id: Ie2bb4308af645c30e556666589e2dd08f14d4035
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2019-09-18 11:49:55 +02:00
Joerg Bornemann
20d8186c24 Fix passing FREETYPE_LIBS and friends to configure
On systems where the pkg-config source fails, configure falls back to
a library source of the type 'freetype'. This ignored variables like
FREETYPE_LIBS users can pass to configure.

The qtConfLibrary_freetype function now diverts to
qtConfLibrary_inline which handles all those variables.

Change-Id: Icef70deb130ce6d2de1520af4344ccccd677f287
Fixes: QTBUG-77643
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-18 11:07:25 +02:00
Joerg Bornemann
392931662d Fix qtConfLibrary_freetype's include paths
The variable QMAKE_DEFAULT_INCDIRS was misspelled, which means we
never really looked for freetype in the default paths.

Change-Id: I20c35a783505678169ecb642927f74b339e55b68
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-18 11:07:17 +02:00
Thorbjørn Lund Martsum
57e8fe86bd QStyleSheet: Resolve the rule font before it is used
The styleSheet font cannot know about e.g dpi or other settings
(e.g from the current screen) so we should resolve font settings
from the original font. This patch ensures that the stylesheet
font is resolved with a relevant font before it is used.

This likely fixes many dual/triple screen issues.

[ChangeLog][QtWidgets][QStyle] Style sheets now only
use the part of the stylesheet font that it knows
about. The remaining will be resolved/inherited from
the context.

Fixes:  QTBUG-77502
Change-Id: I3b1f821e1be9707506a6c1d1e93f76eeac4007e0
Reviewed-by: Morten Kristensen <me@mortens.dev>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit b68ade8282)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-18 08:47:46 +02:00
Friedemann Kleint
a96c4b3aab QHighDPI: Fix wrong conversion for native child windows
Do not try to find a screen for native child coordinates.

Fixes: QTBUG-78158
Change-Id: I78ba814929f4db3dfd7dd43c09f7c7642222f4fb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-18 08:29:23 +02:00
Morten Johan Sørvig
3278eae577 wasm: recreate backing store texture with valid gl context
The compositor context is not current during the resize()
call, but will be during updateTexture().

Change-Id: I29c2e06aa251b564b5d622dc9380ec994e15aab0
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-09-18 08:29:06 +02:00
Simon Hausmann
4d289edb14 Disable debug-and-release builds for MinGW
The requirement to separate debug and release DLLs on Windows stems from
the Visual Studio C run-time library appearing in two different variants
(debug and release) and not mixing well. It's possible to perform builds
without optimzations and with debug symbols while linking against the
release version of the C run-time, but at the same time the debug
version of the run-time brings other developer visible advantages.

MinGW on the other hand does not have this distinction, does not ship
with separate DLLS and does also not require the VS C runtime library.
Therefore we do not need this separation for MinGW, which means that our
packages can be reduced in size and application developers wishing to
debug their applications do not have to use debug builds of the Qt
libraries or run into Qt internal debug code.

Task-number: QTBUG-78445
Change-Id: Idf588606091298dc44262c4c89e689df18d34747
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-09-18 06:28:16 +00:00
Joerg Bornemann
90779d96ad Ignore non-existent .ui file dependencies
Commit 80dea664 broke .ui files with global includes that are not part
of the project, because we blindly added every file path that falls
out of 'uic -d' as dependency.

Introduce the extra compiler CONFIG flag dep_existing_only to bring
back the old behavior that ignores non-existent dependencies and set
it for uic.

Change-Id: I6eaa82817c932a98ebac6d08115a9815d4b9dd21
Fixes: QTBUG-78144
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:46 +02:00
Joerg Bornemann
1456b8091a Make it possible to undefine NDEBUG for nmake and VS projects
For nmake and VS projects we added the NDEBUG define for the release
configuration unconditionally within the qmake generators. To undefine
it, users had to use a nasty work-around.

Now, define NDEBUG within the MSVC mkspecs. In order to do that we
introduce the DEFINES_RELEASE and DEFINES_DEBUG variables that are
merged into DEFINES in default_pre.prf.

Users can unset NDEBUG by writing
    DEFINES -= NDEBUG
in their .pro file.

Note that DEFINES_RELEASE and DEFINES_DEBUG are merged in
default_pre.prf in order to give extra compilers (like moc) the chance
to see the fully resolved DEFINES variable. This is different from the
QMAKE_CFLAGS_(DEBUG|RELEASE) variables that get merged in default_post.prf.

Fixes: QTBUG-78071
Change-Id: I381770a1d2f974fbae9b09a2254e3f2fc7842b68
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:38 +02:00
Joerg Bornemann
983cfc773d Fix Vulkan SDK detection for MinGW cross-compilation
We must not set QMAKE_INCDIR_VULKAN if the Vulkan SDK is installed in
some default include directory. MinGW's std headers rely on
#include_next, which will break if we mess with the order of default
include paths.

Fixes: QTBUG-76660
Change-Id: I5ee0fc4c328ff88b979a8c1c010472b3883dff8d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:26 +02:00
Fabian Kosmale
cdb7d013cb QGraphicsScene: register ItemIndexMethod enum for property
Fixes: QTBUG-57903
Change-Id: I2b2725bceb5189dd21102bbacb10e9775740cf5d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-18 07:54:18 +02:00
Laszlo Agocs
6096f9d0d5 Another load() -> loadRelaxed()
Change-Id: Iab74325da3bd0a22c1f69856b038d0b5615e4e63
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-09-18 00:23:13 +02:00
Christian Ehrlicher
cb54c16584 Cleanup QtWidgets (widgets) examples
Cleanup QtWidgets widgets examples:
 - use member-init (clang-tidy)
 - fix includes/don't include QtWidgets globally
 - include own header first
 - use nullptr (clang-tidy)
 - avoid c-style casts
 - use QVector instead QList

Change-Id: Ib56bb507eb2ef885f1ddc664050d3c7af92adb70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-17 23:05:23 +02:00
Shawn Rutledge
7db335a77e Add back QWheelEvent position() and globalPosition() docs
Change 7d29807296 removed the docs for
the obsolete pos() and globalPos() accessors, but the text should have
been reused to document their replacements.

Change-Id: If4d64e0f07666a99d9a0a4f0de9fca42d3acf0f8
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2019-09-17 23:05:19 +02:00
Shawn Rutledge
217dd1b3b0 Mark stationary touch points as updated if pressure or velocity changes
This is to inform Qt Quick when a stationary touchpoint is delivered
that it is because of a changed property. Qt Quick still needs to avoid
delivering item-customized events (with only the touch points that occur
inside the item) that contain only stationary touch points without
changed properties. To be able to check this private flag,
QQuickPointerTouchEvent needs to be a friend.

Task-number: QTBUG-77142
Change-Id: I6ee0dffbbeca9e513c77227b757252e2eec6a4ef
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-17 21:05:16 +00:00
Cristian Adam
ff8e7fd7d3 Enable debug plugin check for MinGW / Unix in debug_and_release mode
In the case when the Qt build is debug_and_release the debug plugin
check should be enabled, otherwise the mixture of Qt debug and Qt
release libraries will cause crashes (e.g. QTBUG-77431)

Task-number: QTBUG-78445
Change-Id: Ice0b03e63ddad893334a0e1a4ede1f6ace83007b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-17 21:05:12 +00:00
Nils Jeisecke
4a240bb67e QTextDocument: Fix device scaling for QTextFrameFormat margins, padding and border
Those values must be scaled to device coordinates - otherwise borders,
margins etc. will be too small when rendered on high dpi devices
(printers etc.).

This change will add the scaling to those values.

QTextDocument::print applies 2cm margins to the root frame of a
unpaginated QTextDocument. Those margins were previously scaled to
device coordinates in order to give the correct result. But because
scaling is now done inside QTextDocumentLayout that scaling must be
removed and pixel values based on qt_defaultDpi are provided instead.

Fixes: QTBUG-78318
Change-Id: I6fe6dcc25f846341f6a2fe5df2f54baea473fdfd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-09-17 23:05:09 +02:00
Shawn Rutledge
15e1c15986 evdevtouch: Add fallback definition of ABS_MT_PRESSURE; fix alignment
Fixes: QTBUG-78298
Change-Id: Ib6acb1fdca551a84aba5dec2f28cf784a212692c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-17 15:30:43 +02:00
Friedemann Kleint
2dd781df87 Windows QPA: Fix missing resize when changing the scale factor
Do not suppress the resize event caused by the handling of
WM_DPICHANGED unless the screen really changed.

Fixes: QTBUG-76510
Change-Id: I8b9ae41ad7deb863c1633ec5901bc04304b2165c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-17 15:19:18 +02:00
Marc Mutz
e0cad1aab5 QTestLib: modernize and stream-line WatchDog
... by porting from (QWaitCondition,QMutex) to std::{condition_variable,
mutex} and making the code more accessible by introducing explicit
states.

This patch was originally starting out to just replace QWaitCondition
with std::condition_variable, which is faster and more compact, and
the patch still does that, too. The focus, however, has shifted
towards improving the accessibility of the code, in particular its
states and the transitions between them.

Due to the way QWaitCondition prevents spurious wakeups, this code
could use its QWaitCondition as a semaphore, e.g. where it was calling
wait() in the ctor to be released only when the thread it started has
entered run(). That makes the code unnecessarily hard to follow.

Fix by introducing an enum Expectation which tells what the watch-dog
is currently waiting for, and unmistakably determines the state the
watch-dog is in: ThreadStart, TestFunctionStart, ... The timeout value
is now selected based on the Expectation value, so the timeout is no
longer serving as the implicit state, either.

Also port the defaultTimeout() function to return a
std::chrono::milliseconds directly. Elsewhere in Qt, we guard against
lack of <chrono>, so this unguarded use will also serve as a guide to
see whether all supported platforms now, eight Qt releases after we
formally require C++11 for Qt usage, provide it. Without <chrono>,
there's no timed waiting in the standard library.

Change-Id: If97b601c4090a2a2926fa58c903cfe3ec2656324
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-17 10:33:05 +00:00
Qt Forward Merge Bot
35cdcddd60 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-09-17 01:00:26 +02:00
Qt Forward Merge Bot
73bce0411d Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4d7f0e35f4a6ccb6d5494f947fd82fc276feadd3
2019-09-17 01:00:15 +02:00
Edward Welbourne
b26ac46c59 Add support for UTC[+-]\d+(:\d+){,2} time zone IDs
We presently only support the UTC-based offset timezones that are
listed in the CLDR; and it doesn't make sense to list more than these
in the list of available zones. However, if someone sets their TZ
environment variable to a conformant UTC-offset string, we should make
sense of it even if CLDR doesn't mention it. Only do so as final
fall-back, as backends may handle the givne name better (some such IDs
appear in the windows-compatibility list, for example).

Added tests for the new UTC-offset time-zone names.
Removed one test that relied on them not being supported.

[ChangeLog][QtCore][QTimeZone] The constructor can now handle general
UTC-offset zone names. The reported id() of such a zone shall be in
canonical form, so might not match the ID passed to the constructor.

Fixes: QTBUG-77738
Change-Id: I9a0aa68281a345c4717915c8a8fbc2978490d0aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-16 17:06:28 +02:00
Edward Welbourne
1f60e587e7 Move some time-zone validity tests to where they belong
In tst_QTimeZone::isTimeZoneIdAvailable(), a block of tests of
QTimeZonePrivate::isValidId() overlapped with what
tst_QTimeZone::isValidId_data() tests; so move out of the former and
adapt to use by the latter. At the same time, check that each
allegedly available zone *is* available enough that we can create it
and it's valid.

Change-Id: I3f7c8e2e3fbfb201747c7b769d691d7f17fc6b2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-16 17:06:03 +02:00
Edward Welbourne
6cee284001 Fix mis-handling of actual TLD in qIsEffectiveTLD()
If the domain passed down is an actual TLD that's the subject of a *
rule, e.g. "ck" subject to *.ck, then we were finding no dot in it and
concluding that it couldn't be the subject of a * rule.

Added a test for the specific .ck case and commented on where we could
get some canonical test data that I tripped over while researching
this. Cross-reference the cookie-jar test from the QUrl test, too.

Fixes: QTBUG-78097
Change-Id: Id858a9dae22e6b306a68df3fc199e0160f537159
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-16 17:05:09 +02:00
Edward Welbourne
da3c2cc6a8 Reflow documentation after indentation change
Combining this with the indentation would be counted as mixing space
changes with non-space changes, so they're separate.

Change-Id: Iac57050717b1c4c86a253866c9a6cd5ea7add8f7
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-16 17:00:47 +02:00
Edward Welbourne
0cd134ed13 Standardize indentation of calendar code's documentation
There was a haphazard mix of 4-space and 2-space indents.
Use four spaces throughout.
This commit includes no reflow (which is needed), as the inanity-bot
will complain about the mixing of space changes with "non-space"
changes if I do that.

Change-Id: If55ab035da02d0770471e77ecfe00eb168a3da15
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-16 17:00:25 +02:00
Friedemann Kleint
3a0c325bfd Brush up tst_QGraphicsItem
- Add window titles
- Introduce nullptr
- Remove unneeded C-style casts in QCOMPARE
- Replace remaining C-style casts
- Use range-based for
- Fix static invocation
- Fix class structure, add override, use member initialization
- Use Qt 5 connection syntax
- Streamline some code
- Replace some QList by QVector

Task-number: QTBUG-76497
Change-Id: I4338e2b7d397b5c4c59373b63beabd2ca1130571
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-09-16 13:21:19 +02:00
Martin Smith
01ce9c05a3 doc: Remove ifndef Q_QDOC
qdoc needs to see these declarations now because... clang.

Change-Id: I93264125db5bcea6adb1a4636e5459ec80702de1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-16 13:15:36 +02:00
Tor Arne Vestbø
7f0faddf9f CoreText: Modernize style hint fallback lookup
The DefaultFontFallbacks.plist system file that we used for looking up
style fallbacks does not exists in macOS 10.15, nor did it ever exists
on iOS. Instead of relying on this file, we hard-code a set of default
families, that we then look up the fallbacks for.

The result of QFont::defaultFamily() on macOS is now:

  QFont::Helvetica --> "Helvetica"
  QFont::Times --> "Times New Roman"
  QFont::Courier --> "American Typewriter"
  QFont::OldEnglish --> ""
  QFont::System --> "Lucida Grande"
  QFont::AnyStyle --> "Lucida Grande"
  QFont::Cursive --> "Apple Chancery"
  QFont::Monospace --> "Menlo"
  QFont::Fantasy --> "Zapfino"

And on iOS:

  QFont::Helvetica --> "Helvetica"
  QFont::Times --> "Times New Roman"
  QFont::Courier --> "American Typewriter"
  QFont::OldEnglish --> ""
  QFont::System --> "Helvetica"
  QFont::AnyStyle --> "Helvetica"
  QFont::Cursive --> ""
  QFont::Monospace --> "Menlo"
  QFont::Fantasy --> "Zapfino"

Fixes: QTBUG-78240
Change-Id: Ie9bc13c9c1031d89f024199e4736a046c568a48d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-16 11:26:07 +02:00
Friedemann Kleint
d20bacbb4c tst_QWidget::translucentWidget(): Pass with High DPI scaling enabled
Since 9c8d1ca18b, the test would fail
when High DPI scaling is enabled:

FAIL!  : tst_QWidget::translucentWidget() Compared QImages differ in device pixel ratio.
   Actual   (actual): 2
   Expected (expected): 1
.\tst_qwidget.cpp(8913) : failure location

Set the device pixel ratio on the expected pixmap to fix this.

Change-Id: I517495931c2c6b1f49125bb4b5836e304bdbf545
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-16 10:48:52 +02:00
Friedemann Kleint
9c76b82885 Windows style: Fix size of controls in multimonitor-setups with scaling disabled
The function calculating a correction for the size of
windows metrics depending on screen would bail out when high
DPI scaling was disabled. This is wrong since the correction
is also needed in that case, delete the clause.

Task-number: QTBUG-64890
Change-Id: Idef22e18fc616a211ccac48400490fc52393a338
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-16 10:48:38 +02:00
Friedemann Kleint
7252251768 Brush up the Windows styles
- use range-based for loops where possible
- use nullptr
- use member initialization
- remove a lot of C-style casts
- use override
- fix some signedness warnings
- add some missing break statements

Task-number: QTBUG-76493
Change-Id: Ica6ed65ec29e958406e54d816b8a679ed81bd177
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-16 10:48:07 +02:00
Christian Ehrlicher
e2431b619d QPSQL: Fix crash when a prepared statement is deleted after the db was removed
When a prepared statement is still alive after the database was removed
with QSqlDatabase::removeDatabase(), the cleanup routine is trying to
access the driver which is no longer alive which results in a crash.
Fix it by checking if the driver is still alive similar to
5f66486cc2.

Fixes: QTBUG-43889
Change-Id: Ib466a76d014e32c055d203bda15b075ad3dff3d9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
2019-09-16 10:04:18 +02:00
Giuseppe D'Angelo
5f3bbd0cf0 Revert "Revert "Deprecate QAtomic::load() / store()""
This reverts commit 5859f7d0d9.

Reason for revert: the blocker for qtdeclarative has been merged
(in qtdeclarative/c060f6e765a2f155b38158f2ed73eac4aad37e02).

Change-Id: Ie69cb1567417173f543e88f659658fe03ba28830
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-09-16 01:39:42 +02:00