Commit Graph

37572 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
e8fd992849 Add support font-kerning CSS3 property
Change-Id: Ie3894481ded40d20091bd0103ac426c1086f943f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-12 07:16:30 +00:00
Peter Hartmann
cdbebe6280 Qt namespace: Remove comment about stylesheet propagation
This is an opt-in feature to control whether font and palette should
be propagated, and there is no reason this should be removed in Qt 6.

This has been introduced in commit
7293200ace .

Change-Id: I666c09d716bf7033953e98108da3f7711f3bc321
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Martin Koller <kollix@aon.at>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-12 06:49:53 +00:00
Oswald Buddenhagen
9f89e07d75 Bump version
Change-Id: Icf0c81067f65b922a8473f9dce4aecefadf5b32d
2018-10-11 12:59:42 +02:00
Eskil Abrahamsen Blomfeldt
d7944c2921 Remove QEXPECT_FAIL from test on macOS
The flakiness was reported for macOS 10.8 a long time ago and I
am not able to reproduce it, so lets remove the workaround for
it.

Task-number: QTBUG-32690
Change-Id: I92e64065c7480b8f4c5d1d1e6cb5fdd218a70313
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-10 08:24:01 +00:00
Alexander Volkov
1a9ebfabcd QWidgetTextControl: Get rid of dependency on QTextEditPrivate
QWidgetTextControl is a base class for controls of text widgets
and widget-specific code should be used in derived classes, so
override loadResource() in QTextEditControl.

Change-Id: I6d829ead0837419530094d19e0ca53a964413e92
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:54 +00:00
Alexander Volkov
941101bd5f Fix drawing of QGroupBox's title when check box is higher than text
Task-number: QTBUG-70623
Change-Id: I36c3b3e0250a4d2b0a2a2f03793f0eae3d868de2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:41 +00:00
Alexander Volkov
d66253665a QSideBar: take the icon size from a style
Change-Id: I9c4677b42cc920b7bb016b61b8c1fd34fe67aa30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-09 22:03:32 +00:00
Edward Welbourne
41418a92b7 Remove spurious Q_FALLTHROUGH()
Two cases with no code between them don't need a fall-through marker.
The only code in the first case is subject to #if-ery; it either
returns, without falling through, or has no code there.  Putting in an
overt Q_FALLTHROUGH() confused a rather dumb compiler ...

Change-Id: Icc034be08859cc1656401af1c62367aec302668b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-09 16:12:37 +00:00
Martin Smith
eeb6ceb192 Revert "qdoc: Add default include dirs to qdoc command line"
This reverts commit 4bdd8d4eca.

It contains an error.

Change-Id: I51052029f001b9e82c2a53de15b4ba354aafdbae
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-10-09 10:12:48 +00:00
Eskil Abrahamsen Blomfeldt
4f2e0117f9 Deprecate QFont::lastResortFamily() and QFont::lastResortFont()
These functions have not been used by the font selection algorithm
in Qt 5. Calling lastResortFamily() always gave you "helvetica"
and lastResortFont() would actually crash.

Since we cannot remove them before Qt 6, we deprecate them for now
and update the documentation to give a more accurate description
of how the font matching works in Qt 5.

Note that in the non-native QFontDialog, it tries to implement its
own font matching algorithm and therefore was calling
lastResortFamily(). Since fixing QFontDialog is not within the
scope of this patch, I have just replaced the call by "helvetica"
directly, so that it will continue to behave the same.

[ChangeLog][QtGui][Text] Deprecated QFont::lastResortFamily()
and QFont::lastResortFont() which are not in use in Qt 5 and
did not provide any useful information.

Task-number: QTBUG-60813
Change-Id: Id8fe7bfdd427292ef86bc8405de03cb466b9b62a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-10-09 06:55:42 +00:00
Qt Forward Merge Bot
69b6845edb Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I5cbfd39cf728036bbdfdeec8e8739568e0a3025b
2018-10-09 01:00:48 +02:00
Michal Lazo
e2ab24d36f Move cursor selection to start when there isn't any previous line in selection mode
Adding standard behavior for text selection, when user want to select text
and there isn't any previous line then selection will end on start

[ChangeLog][QtWidgets][QWidgetTextControlPrivate] Move cursor selection to start

Task-number: QTBUG-69735
Change-Id: If222d37747772f60774f671ffdd273d63cdaf571
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-08 18:06:25 +00:00
Marc Mutz
8e5a2f63c3 Fix UB (invalid pointer comparison) in QList, QVector, QVLA
QList, QVector and QVarLengthArray check the validity of iterators
passed to member functions using isValidIterator(), which checks that
the underlying pointers are in the range [begin, end]. This check is
well-defined when the outcome is positive, ie. when the iterator is
valid. But if the iterator is not valid, and does not happen to point
into [end, begin + capacity], the comparison, which uses normal
operator<, invokes UB.

Fix by using std::less<T*>, which defines a total ordering.

Change-Id: I1e5757789b4b9779f5e3e298e7f2b2dd0b27576c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 16:18:53 +00:00
Edward Welbourne
55d640483c Update 3rdparty valgrind headers to Valgrind 3.13.0
The version we're using is at least seven years old.
Let's try staying up to date ...

Change-Id: I450a2fc37c22740fe554a81b471bf0fad340498e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 14:18:54 +00:00
Edward Welbourne
bc099f33dd Support QCborMap::operator[] taking a string literal
Use a template on the size of the char[], as suggested by Ville
Voutilainen.  This resolves ambiguity about whether such look-ups
should be done via QString or QCborValue (not that it would have made
any difference).

When we come to add mutating indexing of QCborValue, chained
dereferences like map[i][j][k] need to stay in operator[] const
throughout, to avoid detaching intermediates to create references into
them due to using the mutating operator[] on the earlier dereference's
return.  So const-qualify the QCborValue operator[] const variants at
the same time, to match those of QCborValue itself.

Change-Id: Ib1652ae9440fe3767a653afa2856b74040210e07
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 14:11:23 +00:00
Edward Welbourne
ff7f09d187 Change QCborArray to pad with invalid on inserting past end
Likewise have mutating operator[] insert an invalid entry at its
target index, if beyond the end of the array. This makes it possible
to fill an array from high index to low, for example.

Change-Id: If71699c20e2623142214ce2c11c4d6e4a120c989
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 14:11:08 +00:00
Samuel Gaist
5a52890a85 QString: documentation fixes
Change-Id: I01cb7502514224cfb340bf8b8982340c29027689
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 13:53:55 +00:00
Samuel Gaist
5271b36672 Implement QRegularExpression overload for QPlainTextEdit::find
This patch adds the missing overload for QRegularExpression to match the
QRegExp one for QPlainTextEdit.

[ChangeLog][QtWidgets][QPlainTextEdit] Added QRegularExpression find()
method overload.

Change-Id: Id156971d3fa0372712bfa8b72a55550942a767e0
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-10-08 13:53:42 +00:00
Samuel Gaist
d348363673 Implement QRegularExpression overload for QTextEdit::find
This patch adds the missing overload for QRegularExpression to match the
QRegExp one for QTextEdit.

[ChangeLog][QtWidgets][QTextEdit] Added QRegularExpression find() method
overload.

Change-Id: Ic7be224dcc59fc8d832daddd1999a713b7f04253
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-10-08 13:53:39 +00:00
Jesus Fernandez
0c82994623 Use the stack for storing objects
Theoretically, it could improve the speed. Some of the modified lines
also make the style homogeneous.

Change-Id: Iaed7b16fa75e485be0f825220c366903525448ce
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-08 13:26:41 +00:00
Christian Strømme
7f079bf9d0 Android: Update the targetSdkVersion in the manifest to 28
Change-Id: I9fe8117ed75f82638b6a03166434bf83e23f166f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-08 11:14:03 +00:00
Christian Strømme
52813712c4 Default to no style extraction on Android P when the target SDK is < 28
Applications with target SDK version lower then 28 running on a device
with version greater or equal to 28 will cause compatibility warnings,
so default to none when the extract_android_style value is set to
default.

Note that the new value "default" was introduced to allow this kind
of changes in the future, i.e., selecting the best solution based on
some simple heuristics. Adding a new value also keep compatibility and
allows the user to explicitly set a value when needed.

Task-number: QTBUG-69810
Change-Id: I68301716767870ce6de40e45742d9c5fc263ee25
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-10-08 11:14:01 +00:00
Liang Qi
1170e707b7 Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-10-08 11:10:14 +00:00
Liang Qi
7344987c20 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
2018-10-08 10:56:25 +02:00
Qt Forward Merge Bot
b4da5c6b93 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/corelib/tools/qtimezoneprivate.cpp

Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
2018-10-08 10:00:49 +02:00
Oliver Wolff
29208fa07c winrt: Explicitly set main thread in QCoreApplication's constructor
For winrt we cannot rely on the fact, that QThread::current will be called
from the correct thread for the first time. The application's main entry
point creates a suspended thread and starts it right afterwards. At that
moment, other functionality (QLoggingRegistry for example) might have
called QThread::current, which set the wrong thread as the main thread. In
order to avoid this situation, the main thread is explicitly set in
QCoreApplication's constructor.

Task-number: QTBUG-66418
Change-Id: I8b6347357a80eb395ae758bd3d420adef0826751
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-08 05:34:28 +00:00
Alexander Volkov
05b8ba5155 QLineEdit: take the size of actions' icons from a style
The height of a line edit depends on the height of its font,
which in turn depends on DPI. So use the DPI-scaled icon size
from a style instead of hard-coded values.

Task-number: QTBUG-65627
Change-Id: Ic1f5af61b0d6346cfbc828817c4a3a39296a41ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-06 19:47:44 +00:00
Sergio Martins
7146c9075c Fix DejaVu fonts URL
http://dejavu-fonts.org is something else nowadays

Change-Id: Idb03b864fb145b016ce4ae1a2f0df02ff80280a8
Reviewed-by: Rolland Dudemaine <rolland.dudemaine@esol.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-10-06 11:10:49 +00:00
Simon Hausmann
cd3374c4ef Cleanup in eglfs device integration .pro files
There is no need to apply QMAKE_LFLAGS_NOUNDEF in a .pro file that loads
qt_module.prf or qt_plugin.prf, both of which do the same.

Change-Id: I1ec86cddb4d0991becc136f8bd50d6652c885a6b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-05 21:13:28 +00:00
Jarek Kobus
9f710b15f0 uic: Write the float and double properties in 'f' format
Make the code consistent with the DomProperty::write() method.

Task-number: QTBUG-70613
Change-Id: I622b4a019a4473823584de97304f8324f2cf0c6b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-05 20:06:03 +00:00
Allan Sandfeld Jensen
9d27aec869 Optimize gamma-table lookup on SSE2 and NEON
Speeds up gamma-corrected text rendering.

Change-Id: I38c12ff52f4601853c3f3524de2761a932111160
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-10-05 19:56:15 +00:00
Friedemann Kleint
bde6a04949 QtWidgets: Fix Qt application coming to the foreground when launching app by popup menu
Check on the application state before requesting activation.

Fixes: QTBUG-70810
Change-Id: I550137dc00209b17f4b3c033287ceef1b871ff50
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-10-05 15:10:52 +00:00
Albert Astals Cid
8ad5967793 Do not include qprintdialog in a kernel/ file
The only use is for ::tr so use QCoreApplication::translate

Automatic is not used in dialog/ anyway so there's no translation to
reuse

Change-Id: I0c993e87f46384a0f09d83c9b5e96de5366f1eb9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-05 15:02:32 +00:00
Albert Astals Cid
591d1fd28a ppmhandler: Fix undefined overflow behavior
image/qppmhandler.cpp:260:53: runtime error: signed integer overflow: 44444444 * 255 cannot be represented in type 'int'
    #0 0x4cbc8a in read_pbm_body(QIODevice*, char, int, int, int, QImage*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:260:53
    #1 0x4ca3d8 in QPpmHandler::read(QImage*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:514:10
    #2 0x4b238d in QImageReader::read(QImage*) /src/qt/qtbase/src/gui/image/qimagereader.cpp:1253:22
    #3 0x4b1b61 in QImageReader::read() /src/qt/qtbase/src/gui/image/qimagereader.cpp:1201:12
    #4 0x486f66 in QImage::fromData(unsigned char const*, int, char const*) /src/qt/qtbase/src/gui/image/qimage.cpp:3624:37
    #5 0x486cd8 in QImage::loadFromData(unsigned char const*, int, char const*) /src/qt/qtbase/src/gui/image/qimage.cpp:3590:13
    #6 0x434b2e in LLVMFuzzerTestOneInput /src/qimage_fuzzer.cc:28:7
    #7 0x44b167 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:570:15
    #8 0x44a535 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:479:3
    #9 0x44c428 in fuzzer::Fuzzer::MutateAndTestOne() /src/libfuzzer/FuzzerLoop.cpp:707:19
    #10 0x44d1b5 in fuzzer::Fuzzer::Loop(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) /src/libfuzzer/FuzzerLoop.cpp:838:5
    #11 0x440a29 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:764:6
    #12 0x434bf8 in main /src/libfuzzer/FuzzerMain.cpp:20:10
    #13 0x7fe01697282f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #14 0x409bb8 in _start (/out/qimage_fuzzer+0x409bb8)

Change-Id: Ibc5df6db52639f12319910b927f6443d927206d8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-05 15:02:30 +00:00
Albert Astals Cid
63e0c3e1b5 qppmhandler: Fix undefined overflow behavior
image/qppmhandler.cpp:77:25: runtime error: signed integer overflow: 10 * 300000000 cannot be represented in type 'int'
    #0 0x4cecb5 in read_pbm_int(QIODevice*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:77:25
    #1 0x4cb1ac in read_pbm_body(QIODevice*, char, int, int, int, QImage*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:271:29
    #2 0x4ca3d8 in QPpmHandler::read(QImage*) /src/qt/qtbase/src/gui/image/qppmhandler.cpp:509:10
    #3 0x4b238d in QImageReader::read(QImage*) /src/qt/qtbase/src/gui/image/qimagereader.cpp:1253:22
    #4 0x4b1b61 in QImageReader::read() /src/qt/qtbase/src/gui/image/qimagereader.cpp:1201:12
    #5 0x486f66 in QImage::fromData(unsigned char const*, int, char const*) /src/qt/qtbase/src/gui/image/qimage.cpp:3624:37
    #6 0x486cd8 in QImage::loadFromData(unsigned char const*, int, char const*) /src/qt/qtbase/src/gui/image/qimage.cpp:3590:13
    #7 0x434b2e in LLVMFuzzerTestOneInput /src/qimage_fuzzer.cc:28:7
    #8 0x44b167 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:570:15
    #9 0x44a535 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:479:3
    #10 0x44c428 in fuzzer::Fuzzer::MutateAndTestOne() /src/libfuzzer/FuzzerLoop.cpp:707:19
    #11 0x44d1b5 in fuzzer::Fuzzer::Loop(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) /src/libfuzzer/FuzzerLoop.cpp:838:5
    #12 0x440a29 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:764:6
    #13 0x434bf8 in main /src/libfuzzer/FuzzerMain.cpp:20:10
    #14 0x7fba939a082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #15 0x409bb8 in _start (/out/qimage_fuzzer+0x409bb8)

Change-Id: I9ad78afc4ea9c5c8b7530aa17013abe91202e84b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-10-05 15:02:27 +00:00
Timur Pocheptsov
e7e8b02728 QCocoaWindow - close the underlying NSWindow before releasing it
Normally, when deleting a widget, setVisible(false) calls -orderOut:
and then ~QCocoaWindow will call -release, as a result the window
will disappear from the screen and will be deallocated. But -orderOut:
has no effect on minimized/iconified window. As a result, a 'zombie'
window still can be seen on screen, while all Qt-thingies already
deleted/dead. The similar behavior can be reproduced with a native
NSWindow where we do not call -orderOut:/-close and only call -release.
To fix this - we call -close.

Task-number: QTBUG-70794
Change-Id: Iee8e1fc98018885f1f6e9628d966843d21ac7d38
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-10-05 14:17:00 +00:00
Sergio Martins
92f42caff1 Fix ICE on QNX 6.6
qabstractitemmodeltester.cpp:223:31: internal compiler error: in expand_expr_real_1, at expr.c:9170

Change-Id: I098c1bdf706512c91c649205f4675de0ca374227
Reviewed-by: David Faure <david.faure@kdab.com>
2018-10-05 11:30:42 +00:00
Johan Klokkhammer Helsing
a8148e5157 waylandscanner: use --include-core-only
In order to ship our own version of wayland.xml protocol code we need
to get rid of all includes of system versions of
wayland-client-protocol.h and wayland-server-portocol.h.

These were unfortunately included by wayland-client.h and
wayland-server.h and now can't be removed because of compatibility
issues. To solve this, wayland-client-core.h and wayland-server-core.h
can be included instead, which don't include any generated protocol
code. Again, due to compatibility concerns, wayland-scanner does not use
these versions unless invoked with --include-core-only, which is what
this patch fixes.

Task-number: QTBUG-70553
Change-Id: Icf7c870bd4d5bf891628cbddce2a9de3dda50164
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2018-10-05 08:15:38 +00:00
Martin Smith
4bdd8d4eca qdoc: Add default include dirs to qdoc command line
This change applies to darwin. It adds each include path in the
QMAKE_DEFAULT_INCDIRS variable to the qdoc command line with the -I
flag for both the prepare and the generate phase. These include paths
provide access to the standard c++ and c headers, which clang needs
to see. This change should work on all platforms, but it increased
the qdoc warning count on the linuxsystem where it was tested, so
now it only applies to darwin.

Change-Id: I16e2e0d744e2cf68743dc12d39155dda2ece1536
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-10-05 05:15:06 +00:00
Christian Ehrlicher
2bd6f5e8d1 QTreeView: adjust documentation of key bindings
The documentation for key bindings was a little bit unclear for key
asterisk. Also sync the names of the left and right key was not
consistent (Left/RightArrow - Left/Right)

Change-Id: Icee0821880fcc3ebc2ade939cf80127ebf0976ad
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-04 18:50:41 +00:00
Leena Miettinen
04aeffbe8f Doc: Describe behavior of QSslConfiguration::caCertificates() on iOS
In iOS, the system certificates cannot be accessed, so this function
will return an empty list for the default configuration.

Task-number: QTBUG-60407
Change-Id: I0d691a0dd5e6367594e71c7ebccfbdc866d4a3f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-04 13:26:50 +00:00
Christian Ehrlicher
559c94ea43 Unblacklist tst_QSplitter::replaceWidget(visible, not collapsed) for Linux
52f1692b84 introduced a possible fix for
this flaky test. Therefore unblacklist them to see if the change really
fixed the issue.

Task-number: QTBUG-64639
Change-Id: I759d66aac7641505487e88254d16750e87c97350
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-04 09:48:54 +00:00
Christian Ehrlicher
3e59a88e89 QAbstractScrollArea: fix sizeHint when widget is not visible
QTable/QTreeView did not follow the documentation and returned
their needed size with scrollbars within viewportSizeHint().
Then sizeHint() also took the size of the scrollbars into account
when the policy was set to ScrollBarAlwaysOn.
This lead to different results when the widget was shown/hidden and/or
the scrollbar was visible or not.
Fix it by only adding the additional size when the scrollbars are
really visible. Also use header->isHidden() instead of isVisible() in
QTreeView the same way it is done in QTableView.

[ChangeLog][QtWidgets][QAbstractScrollArea] QTableView/QTreeView are
now reporting their viewportSizeHint() correctly taking into account
its scroll bars visibility and visibilityPolicy.

Task-number: QTBUG-69120
Change-Id: If50959a9f7429275e3e33122644c978fb64972ba
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-04 09:48:40 +00:00
Morten Johan Sørvig
d7e274a446 StyleSheetStyle: Load @Nx images
Perform a @Nx image file lookup when loading pixmaps.

Make drawBackgroundImage() handle high-dpi pixmaps,
here the layout calculations needs to be in device-
independent pixels

Fixes: QTBUG-36825
Change-Id: I61e6f53c59f61f3bd88c34a036349e51e8c8ad92
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2018-10-04 07:01:05 +00:00
Timur Pocheptsov
0cae5a4c4b Cocoa integration: fix incorrect keyboard mapping
When switching between different input sources, we have to update layouts.

Task-number: QTBUG-50865
Change-Id: I0c23c19b79a2102dcc533822b0f861c387582c6c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-10-04 07:00:39 +00:00
Ulf Hermann
28c831fa13 QCocoaKeyMapper: Properly initialize all members and reset on update
Previously some of the members would have random initial values. Also,
on updateKeyboard() if we don't find usable uchrData, we should just
reset keyboard_layout_format and keyboard_mode, rather than keep the
previous values.

Task-number: QTBUG-50865
Change-Id: I1297fa55bb1593dd549d0bc122713d5d98f7b1fc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-10-04 07:00:30 +00:00
Ulf Hermann
21355b3630 QGraphicsScene: Make focusing on touchBegin optional
Usually we focus in when we receive a click or equivalent.
QGraphicsScene by default also transfers the focus when you start a
touch on a trackpad or similar. Most of the time this also generates a
synthetic mouse click, so people don't necessary notice. However, at
least on macOS you can configure this behavior. With focusOnTouch
switched off, QGraphicsScene behaves as one would expect on macOS.

Fixes: QTBUG-59442
Change-Id: Ib87112640eef6b77892ad2490d80eedd055e6dce
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-10-04 07:00:21 +00:00
David Faure
80cc6bcec4 QIcon::addFile: don't use QMimeDatabase for every PNG being loaded
Commit 710ff392d9 introduced this fallback code for the case where the
extension was empty. Let's make it happen only in that case, so that the
much more common case of "foo.png" doesn't go through
iconEngineFromSuffix twice, nor through QMimeDatabase (which has to load
and parse an XML file in order to determine preferredSuffix(),
unfortunately).

Found using heaptrack.

Change-Id: Iab6b71e1fa23916029c9e2ba25447a12d70f88a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-04 01:07:00 +00:00
Christian Ehrlicher
4f4a33196d QStyleSheetStyle: use specified font property from css for QMenu
A font property specified in the css was used while drawing the QMenu
action text but not within sizeFromContents() which results in a wrong
size of the menu rect used for drawing.
Fix it by mimic the rect calculation from
QMenuPrivate::updateActionRects().

Fixes: QTBUG-70648
Change-Id: I5cf4f8b679c69197437393965c0bc6326f1c6c3a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-03 19:36:31 +00:00
Christian Ehrlicher
f46c9f67ba SQLite: enable json1 extension
This patch enabled json1 support for sqlite3 by defining
SQLITE_ENABLE_JSON1

[ChangeLog][QtSql][SQLite] Enable the json1-extension for
the SQLite3 plugin

Task-number: QTBUG-63498
Change-Id: Iaf1069ff1396c573125a5a3f490c0df5df560468
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-03 19:36:26 +00:00