Commit Graph

37234 Commits

Author SHA1 Message Date
Erik Verbruggen
028727c20c ASAN: Disable SSE4.1 code in qstricmp because of heap-buffer-overflow
Although it is safe to slightly overread a string (provided it doesn't
cross page boundaries), ASAN is extremely picky about this kind of
behavior. So, do not run with this vectorized code when ASAN is
enabled.

Task-number: QTBUG-70269
Change-Id: I2b59b524d608afec8985227285feab55158d7247
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-05 13:14:47 +00:00
Friedemann Kleint
42a68ee9dd Fix precompiled header detection for clang-cl
Do not unconditionally enable precompiled headers
for MSVC since clang-cl does not support it.

Task-number: QTBUG-63512
Change-Id: I95df7d3bb51647ecee8ddc3161421768313ab4a1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-03 21:10:00 +00:00
Rolf Eike Beer
a3ee0b94da QWindowsStyle: respect rectangle when drawing PE_IndicatorViewItemCheck
This is a follow-up on commit 6553921dd5,
which fixed the drawing of the surrounding rectangle when used in item
views. This one now fixes the drawing of the check mark itself, for both
item views and standalone items.

Change-Id: I14f359e9d2ef33652cc68494b7d114e61110e5e0
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-09-03 10:51:14 +00:00
Andy Shaw
69a2bc7a2a Doc: Explicitly state that QSqlTableModel only handles EditRole
Fixes: 5.12.0
Task-number: QTBUG-70234
Change-Id: I65c6aa60048182c5408dca2aa20098af363b10ec
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-09-03 10:24:09 +00:00
Samuel Gaist
fe463dd422 QSFPM: cleanup QRegularExpression includes
Add feature guard around the include in the header and remove the one
from the implementation file.

Change-Id: I8dc133cce786ead6059cc66b40a0ffb6c420096f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-09-03 09:42:58 +00:00
Kai Koehne
9273969107 Allow passing custom arguments to qmlplugindump
Add QMAKE_QMLPLUGINDUMP_FLAGS variable that allows plugins to set
qmlplugindump options like -app, -noforceqtquick.

The naming follows the example of e.g. QMAKE_LRELEASE_FLAGS.

Task-number: QTBUG-70264
Change-Id: I1d11b7f3b03fab79ab9e06188cecf31650789302
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-09-03 09:21:03 +00:00
Albert Astals Cid
8b6100d512 QStringList: add contains(QStringView) overload
Change-Id: I953e4ef3167011d0348ea482890e29478bd6f761
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-03 08:55:52 +00:00
Albert Astals Cid
64fe66e7be Add QString::compare(QStringView, CaseSensitivity)
There was a QStringView::compare(QString, CaseSensitivity) but it's
good that the symmetric also exists

Change-Id: Ic789f11d41eb8cfa393cb51c19bd1f89bb87d912
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-03 08:55:45 +00:00
Edward Welbourne
5cc5b43d0f Remove some misplaced sizeof() scalings on array sizes for new[]
Noticed during review of clang-tidy warnings.  I have searched the
source tree (using grep) and only this one file contains examples of
this mistake.

Change-Id: I3bbcec736e5a184db7251962fd3671a21ab5d238
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-09-03 08:53:46 +00:00
Sergio Martins
179c88a1a9 Rename QTimer::connectTo() to QTimer::callOnTimeout()
Some people suggested the later, so let's have a second look at it
before it's too late.

Although I was in favor of the former I'm now having second thoughts.
connectTo() is meant to only be used in classes which have a clear dominant signal,
but there are rare classes that have two (example: QAbstractButton::toggled, QAbstractButton::clicked).
QAbstractButton::connectTo() would be ambiguous if we ever wanted to add these shorthand connects
to QtWidgets

Change-Id: I198ad3326d31dcf89b9c47a299124572ee7b11b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-09-03 08:43:39 +00:00
Eskil Abrahamsen Blomfeldt
604c03f0b9 Android: Default to android-21 NDK for arm64-v8a
The earlier NDK platforms do not support 64 bit architectures, so
configure would fail with a confusing message about problems in
the environment.

[ChangeLog][Android] Default to android-21 for arm64 builds instead
of failing.

Task-number: QTBUG-70280
Change-Id: Ib9846d6deee3d453fd4a17a3ae92306482d380ba
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-03 08:42:50 +00:00
Allan Sandfeld Jensen
5d0ee89132 Fix reading 16bpc grayscale PNGs
They were incorrectly attempted to be read as Indexed8, instead use
the RGBA64 formats to read them with full accuracy.

Task-number: QTBUG-45858
Change-Id: I14fc3cb0d59fa2fc0e68fd870f3b32352c34161f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-09-03 08:24:10 +00:00
BogDan Vatra
e0213d1939 Android: Fix crash
Android doesn't like nor use RTLD_NODELETE

Tasnk-number: QTBUG-64654
Change-Id: I2d884bbf22a681cca592942eba84ba97327ba974
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-09-03 08:21:47 +00:00
Alex Blasche
c82d043de1 Bump copyright year of code generated by dbus tools
Change-Id: Ic5e2ecf672ea86e8ef70a9fa73c0535262d2e928
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-03 05:23:40 +00:00
Friedemann Kleint
e646ab2ab5 Windows code: Fix to prefer ranged-for, as clang-tidy advises
Change-Id: Id9bb21855ae832cdbbc456326226ec72b634672e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-02 16:05:39 +00:00
Jan Grulich
101cb8e5d9 Make flatpak portal support to be used also by Snap applications
Snap now uses xdg-desktop-portal for portal support. Add check for apps
running in Snap and make them use portals by default. We also should be
using different name for the platform theme used by sandboxed apps.

Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-02 14:15:38 +00:00
Friedemann Kleint
7c0884f2a2 Windows code: Fix clang-tidy warnings about else after jumps
Replace by switch() where appropriate, remove else and unindent code
or simplify the return value.

Change-Id: Ie988b9068a9579ae5a899b3765e43aad480b564e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-02 12:41:07 +00:00
Friedemann Kleint
30756f4626 qelapsedtimer_win.cpp: Fix clang-tidy warning about else after return
Remove else in nelper nanosecondsToTicks()

Change-Id: I6c5291deaeb6651f702a9c118cabcb5a7edd179e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-02 12:39:36 +00:00
Friedemann Kleint
9a15ac356c Windows code: Fix clang-tidy warnings about (private) class definitions
Add override, disable copies where appropriate and use = default
for trivial functions.

Change-Id: Ia5bc7419b1aa053c5503ea7dfaf11cb6dfafd2e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-02 12:39:12 +00:00
Andre de la Rocha
4c4a5f8c86 Windows: Check Pointer messages in MessageDebugEntry
Some Pointer Input messages are defined only for Windows 10 and new
versions of the Windows SDK and could break compilation with older
SDKs. Currently, they are not used anywhere outside of the
MessageDebugEntry debug function. Checking if they are defined before
using.

Change-Id: I5fc7bb8e52ab8aca66bb21084289ab8938938063
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-09-01 22:51:07 +00:00
Thiago Macieira
7bd79b3cff Plugins: Save some architectural requirement flags
...not just the debug flag. The information is saved outside of the CBOR
map for two reasons:

 1) removing the hack that depended on how QCborStreamWriter and
 TinyCBOR internally work, allowing for the extra parameter to be
 written directly. We wouldn't be able to use that hack anyway and would
 have needed a further, uglier hack to encode a byte whose value we
 don't know.

 2) outside the map, this information can be parsed more quickly and
 then we can discard any plugins we shouldn't actually load.

Since we're doing this for a flag, I decided to move the Qt version
there too for reason #2.

Change-Id: I61ecce6b1324410bbab4fffd153d4e5fc696d19e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-09-01 15:19:46 +00:00
Thiago Macieira
d9766ddc3d Plugins: store the metadata in CBOR instead of binary JSON
In preparation for Qt 6 deprecating the binary JSON format. Also reduces
the size of the metadata a little: for the xcb platform plugin, it went
down from 264 bytes to 138; for the jpeg image plugin, it went from 320
to 135.

I've had to change the signature so older versions of Qt won't try to
parse the CBOR data as Binary JSON. Unfortunately, before QJsonDocument
could get a chance to reject it, qJsonFromRawLibraryMetaData() needed to
allocate memory and that causes crashes with Qt < 5.11.2.

Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bee34e16ce347
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-01 15:19:39 +00:00
Thiago Macieira
7391662f80 Update TinyCBOR
Updated to https://github.com/thiagomacieira/tinycbor commit
1286d99bdc664de6acf7c5274702325f5a095a0f

Change-Id: I0d3cc366baaa49f3ad28fffd15428e886333bb38
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-09-01 15:19:34 +00:00
Andre de la Rocha
8ada0633cd Windows QPA: Stop synthesizing mouse events from tablet/touch
These fake mouse events should be synthesized by QtGui, not the QPA plugin,
when the tablet/touch events are not handled by the application and the
Qt::AA_SynthesizeMouseForUnhandledTouchEvents or
Qt::AA_SynthesizeMouseForUnhandledTabletEvents flags are set.

Task-number: QTBUG-47007
Task-number: QTBUG-60437
Change-Id: I4d6d5e6667d245c45a4eb4f3a94db05cf9772f52
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-09-01 14:42:49 +00:00
Lorn Potter
e59b323628 wasm: disable RasterGlSurface
QOpenGlWidget and QuickQidget do not work at this time anyway.
This also causes gl to be initialized for widget apps, so disabling this
will optimize widget apps.

We could use Qt::AA_ForceRasterWidgets as well.

Task-number: QTBUG-67797
Change-Id: I8f86a9f72e6f3d437a818b4fbe3d6f3658e17d04
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-31 19:33:17 +00:00
Tor Arne Vestbø
2664e84322 macOS: Remove support for QSurfaceFormat::StereoBuffers
The NSOpenGLPFAStereo attribute was deprecated in macOS 10.12, without
any replacement, and adding the attribute to the pixel format results
in context creation failure, so we're assuming the feature is no longer
supported an disable it wholesale on macOS.

Change-Id: I27d9f300fdaff9abe90781e3160b97f8b66121ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-08-31 12:35:47 +00:00
Tor Arne Vestbø
917c2de203 Disable tst_macnativeevents
It's almost completely blacklisted anyways, and the parts that are
not are flakey.

Change-Id: I4601d751a2963c94c62ec439dd78b874034069a0
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-31 12:35:45 +00:00
Tor Arne Vestbø
556beea4c3 macOS: Update all deprecated enums to their 10.12+ equivalents
Change-Id: I3034258da95c9c70eb6758db92967f438617f6e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-31 12:35:45 +00:00
Tor Arne Vestbø
b02fe1bfe7 Remove codepaths and checks for unsupported Apple platforms
We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3.

Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-31 12:35:45 +00:00
Morten Johan Sørvig
29c0377f07 WebAssembly for QtBase
This is the squashed diff from wip/webassembly to dev.

Done-with: Peng Wu <peng.wu@intopalo.com>
Done-with: Sami Enne <sami.enne@intopalo.com>
Done-with: Morten Johan Sørvig <morten.sorvig@qt.io>
Started-by: Andrew Knight <andrew.knight@intopalo.com>
Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-30 06:48:33 +00:00
Eskil Abrahamsen Blomfeldt
707ae5b667 Silence warning in gcc 4.9 for Android
When building with warnings are errors for Android with gcc 4.9,
it wrongfully fails on use of uninitialized variable.

Change-Id: I39c5e8413c30567fba60cbba6a8b26d537c5836e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-08-30 06:46:33 +00:00
Friedemann Kleint
64e6441d9c Windows code: Fix clang-tidy warnings about C-style casts
Replace by reinterpret_cast or const_cast, respectively.
Use auto when initializing a variable to fix Clang warnings
about repeating the type name, do minor tidying along the way,
and a few conversions of 0 or NULL to nullptr.

Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-30 06:26:44 +00:00
Friedemann Kleint
f9431f5632 Fix tst_QSizePolicy::constExpr() to compile with MSVC 15.8.1
For ControlType != QSizePolicy::DefaultType, qCountTrailingZeroBits()
is used which, MSVC 15.8.1 does not consider constexpr due to built-ins.
Exclude the check by #ifdef.

Task-number: QTBUG-69983
Change-Id: Ifc3dc3d94a804246bee1705fc8f3ac9b04ee4d32
Reviewed-by: Alexander Shevchenko <sav_ix@ukr.net>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-30 06:23:51 +00:00
Oswald Buddenhagen
999d4d5777 qmake: rework .prl filename construction
instead of trying to reverse-engineer it from the final target including
extension and possible bundle path, construct the basename explicitly.
this avoids that we mangle the filename if the actual target contains a
period for some reason.

Task-number: QTBUG-70097
Change-Id: I0bae9f010ab82e258680830250f8e28656f09d67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-30 05:30:17 +00:00
BogDan Vatra
19b12ac9c2 Update QMetaObjectBuilder::MetaObjectFlag enum
Synced QMetaObjectBuilder::MetaObjectFlag with the MetaObjectFlags enum
from qmetaobject_p.h. Also added a few comments for Qt 6.

Change-Id: Ieccd5cf8d512a6bf7256b2f4db88d45662774536
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-30 05:12:01 +00:00
BogDan Vatra
c2165f891c Allow registering constructor for a set of dynamic types
This feature is needed to register complex types (e.g. Q_GADGETS) at
runtime, using a single constructor method and added type parameter.
Without having the type id available to the Constructor it is impossible
to specialize behavior, thus requiring separate constructors for each
type. Generating these separate constructors at compile time is easy,
but not at runtime.

[ChangeLog][QMetaType] QMetaType can now register constructor for a set
of dynamic types.

Change-Id: I6071271d0e157864594dd07b4bc3a0abbeb15a44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-30 05:11:38 +00:00
Romain Pokrzywka
d02f888417 Windows QPA: Fix duplicate Pointer Touch events and missing TouchCancel
translateTouchEvent needs to filter events based on the message type
passed in msg, as Windows sends more than just down/up/update events,
it also sends enter/leave for each touch and occasionally a few more.

One of them is WM_POINTERCAPTURECHANGED which indicates a general loss
of touch input, which needs to be translated to a touch cancel event.

Ignore WM_POINTERENTER/WM_POINTERLEAVE events as they result in sending
duplicate Qt::TouchPointPressed/Qt::TouchPointReleased events otherwise.

Also avoid sending duplicate events for each additional touchpoint:
Windows already bundles all available touchpoints for a touch event
when calling GetPointerFrameTouchInfo, so we get all points at once,
but we'll still receive other events for each additional touchpoint,
resulting in reading the same bundled data again for each one and
sending duplicate events to QWindowSystemInterface.
Use SkipPointerFrameMessages() to avoid receiving the additional
events for the frame we just processed.

Finally, add raw event logging when the platform verbose level is >1.

Change-Id: I55d840285f642a00f6ffcda4a3efd7ae3985310b
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2018-08-30 04:47:04 +00:00
Christian Ehrlicher
81e298a51d QWidget: fix setTabOrder for compound widgets
When adjusting the tab order for compound widgets, it can happen that
the order is already correct. The check for this case forgot one case
which lead to a garbled focus chain.

Task-number: QTBUG-68393
Task-number: QTBUG-69619
Task-number: QTBUG-10907
Change-Id: Ic3242746bdcf3a4db6ea8daa1498381500ca116d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-30 04:25:22 +00:00
Christian Ehrlicher
9a3bdbf40a QSS/QTabBar: properly handle QTabBar::scroller
PM_TabBarScrollButtonWidth used the size of the ::scroller subcontrol
without considering that there are two QToolButtons and therefore
returned the wrong size for a single QToolButton.
QStyleSheetStyle::subElementRect() had no handling for
SE_TabBarScrollLeft/RightButton and therefore the values for the
scroller toolbuttons set via the stylesheet were never used.
Fix it by dividing the scroller width by two and add the code path to
handle SE_TabBarScrollLeft/RightButton in
QStyleSheetStyle::subElementRect

Task-number: QTBUG-69653
Change-Id: I1adfe6333f3183bba621bbbb4d10969920c6cd46
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-30 04:25:19 +00:00
Shawn Rutledge
d2c05b0c85 Tablet example: paint only the changed areas of the canvas
This improves performance significantly.

Change-Id: I9a8782148ce03a2bc85759c4e8c1eecb37467cf6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-30 04:12:01 +00:00
Ryan Chu
09f59271e6 Postpone testing docker images and files until running 'make check'
To avoid bothering the user who just wants to build all the test cases
in qtbase. It is better to move the docker related testing to the check
target. Then, it won't break the build procedure and force users to
finish test server provisioning in advance.

Change-Id: I2c4212297342c3eec7bcbebff9f991b7346d9503
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e798e8a03b)
2018-08-30 04:06:51 +00:00
Allan Sandfeld Jensen
384fc28b90 Fix out of buffer access in qt_qimageScaleRgba64_up_xy
Avoid reading a pixel outside the image even if we multiply the result
by 0. This mirrors a similar old fix in the the 32bit scaling path.

Change-Id: I7860bc808dc46dbc94918672e99c81b56d4a1d27
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-29 23:18:07 +00:00
Tor Arne Vestbø
825e1a0506 Add missing dependencies for tst_macnativeevents
Change-Id: I5578b78a90588117339562b65884b7bc46770647
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-08-29 02:47:47 +00:00
Tor Arne Vestbø
ed92be5007 Add missing dependencies for tst_qmacautoreleasepool
Change-Id: Idf94d419526f02e89608b1d105a0858bceabbba1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-08-29 02:47:45 +00:00
Oswald Buddenhagen
a25ee4c1ce darwin: fix tst_qsettings deps
the test uses CoreFoundation api directly, so it must link it
explicitly.

amends 6c8f32388b.

Change-Id: I76b7d8ab41d6a66138eb45bd0f067cfee8e96cb8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-29 02:47:41 +00:00
Oswald Buddenhagen
fa6bab9c58 darwin: fix tst_qimage deps
the test uses CoreGraphics api directly, so it must link it explicitly.

amends b0abe20d4.

Change-Id: I734bfbedff56df731c1e528670f686565b63f3b5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-29 02:47:39 +00:00
Joni Jäntti
546eb7b947 Blacklist tst_Gestures on Ubuntu 18.04
These autotests are not currently working with the Ubuntu 18.04
platform being introduced to the CI.

Task-number: QTBUG-70227
Task-number: QTBUG-70226
Task-number: QTBUG-70224
Task-number: QTBUG-70223
Task-number: QTBUG-70209
Change-Id: Ibe7cafd37763d7d305d8c3d9ec17bc6339db744a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-28 16:30:28 +00:00
Christian Ehrlicher
ee5573c6fb QSqlQuery: Specify documentation of named placeholders
Named placeholders can only contain characters in the range of
[a-zA-Z0-9_] but this was not documented anywhere.

Task-number: QTBUG-69775
Change-Id: I5c4eff7674b1fc04cef60e7d7f44cd87414ffbe9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-08-28 16:10:47 +00:00
Christian Ehrlicher
d18444fbff Handle device pixel ratio in QHeaderView::setupSectionIndicator
The device pixel ratio was not applied to the section indicator pixmap
which made it look blurry on HighDPI screens.

Task-number: QTBUG-70084
Change-Id: I8b07b2ffc51781c2d2d89484b8618173f0692fe4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-28 16:10:43 +00:00
Andy Shaw
28702cb239 Initialize the QSqlQuery to be invalid when creating a sql model
When QSqlQueryModel or QSqlTableModel is created it will create a
QSqlQuery which defaults to using the default QSqlDatabase connection.

If this connection belongs to another thread then it will throw a
warning as this is not safe to use. Since the QSqlQuery is always
recreated when a query is set, the instance which is a member of
the class can effectively be invalid until a new one is set.

Task-number: QTBUG-69213
Change-Id: I68a5dd59fe62788f531d59a0680da11b118ee383
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-28 16:10:30 +00:00