Commit Graph

26078 Commits

Author SHA1 Message Date
Jake Petroules
13c71ac816 Fix memory leak in QStandardPaths::displayName() on Apple platforms
Task-number: QTBUG-65687
Change-Id: Ie795c8ac715e36656dabcbcdf8976d303ebaf0d1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-01-12 18:13:17 +00:00
Andre Somers
abbd26f553 Add QModelIndex::siblingAtColumn and ::siblingAtRow
Data in item models is most often organized in rows, where each column
contains an attribute of the item represented by the row. Often when
sibling is used, it is to request another piece of data from the same
row. Having a specialized version makes this easier and less awkward
to do, simplifying

auto sibling = index.sibling(index.row(), columnOfInterest);

to

auto sibling = index.siblingAtColumn(columnOfInterest);

For symmetry reasons, siblingAtRow(rowOfInterest) was also added.

Change-Id: Ib203b2cdb16154cbb2680d16fb5c6a7538f33d07
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-12 15:12:53 +00:00
Martin Smith
7157d04d6e doc: Add missing template clause in \fn command
The template clause was missing in the \fn command for
a member function of a template class.

Change-Id: Ie1a8f8372d3183f05f02e518b363a7bac735abbb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 14:49:42 +00:00
Martin Smith
56385f0f3d doc: Add missing class qualifier in \fn command
The class qualifier was missing in the \fn command for
the move copy constructor.

Change-Id: Ia3633efde155ed19ac8460d760a5248e52097ea1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 14:49:25 +00:00
Martin Smith
a61c6a7a2e doc: Add template clauses in qhostinfo.cpp
A few \fn commands were missing the template clause now
required by clang-qdoc. This update adds the template
clauses. It also changes an instance of Q_QDOC to
Q_CLANG_QDOC.

Change-Id: I2850d43d98debb80e01c36a524e0c00651a89298
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 14:49:10 +00:00
Albert Astals Cid
c45947aeef CUPS: Don't show choices that conflict with the printer installed options
Some options only make sense if the printer has installed some extensions, e.g.
we should not shown "Staple" options if the Stapler addon is not installed,
so with this change we use ppdInstallableConflict to know whether an option
should be shown to the user or not.

Change-Id: I5733e1ac8b667c26b292aeafc90a10c155b751a4
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-12 12:04:51 +00:00
Albert Astals Cid
e35878bf57 CUPS: Rework set/clearCupsOption API
Previously it was a bit awkward to use, you had to do
    QStringList cupsOptions = QCUPSSupport::cupsOptionsList(printer);
    QCUPSSupport::setCupsOption(cupsOptions, option, value);
    QCUPSSupport::setCupsOptions(printer, cupsOptions);
now you simply have to do
    QCUPSSupport::setCupsOption(printer, option, value);

Change-Id: Id31583f1ec72644791d82776debbae5583a2be54
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-12 12:04:46 +00:00
Albert Astals Cid
608301d4c8 CUPS: Enable printing arbitrary pages and page ranges
Task-number: QTBUG-1311
Change-Id: I8e09def0e0d8c1404d3ee86845d98a30c23b6485
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-12 12:04:42 +00:00
Albert Astals Cid
bf59032d70 cups: Don't show InstallableOptions in the advanced properties
According to CUPS maintainer it is recommended to not show them[1].
GTK and Libreoffice behave like that.

[1] https://lists.cups.org/pipermail/cups/2015-September/027124.html

Change-Id: I82614003490554d41e38a125d44e3a599c2e7342
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-12 12:04:41 +00:00
Albert Astals Cid
d94ccf310a Unix: Fix usability of the print properties dialog
Previous behavior:
 * Open, change setting, cancel, open again, setting was as originally (i.e. unchanged)
 * Open, change setting, accept, open, change setting, cancel, open again, the setting would be as before pressing cancel
 * Open, change setting, accept, open, press cancel without changing anything, print, the initially changed setting is not applied

New behavior:
 * Pressing cancel just cancels the changes since you opened the dialog, everything you accepted previously stays correctly selected

Change-Id: I483647504682f26d3d21c5229cc6530bf14fe519
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-01-12 12:04:35 +00:00
Tor Arne Vestbø
114f795221 logging: Break out alternative logging sinks into a well defined API
First steps towards a public API for having multiple output sinks is
to allow this internally.

We give all the different log sinks the same signature, with a bool
return value to signify if stderr has been handled.

The logic of not logging to the alternative sinks when the function
qt_logging_to_console() returns true has been moved into each sink,
so that they in the future may choose to log even when also logging
to the console, allowing multi-sink output. They must then make sure
to return true if the native logging sink has also logged to stderr.

The logic of each sink has been kept the same when it comes to the
formatting of the message. Some of these sinks should ideally use
the raw message instead of the formatted one, as they are structured
logging sinks.

Change-Id: I441d3bc1db3e16180704e00d13a40564b6f06a6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-01-12 11:50:36 +00:00
Tor Arne Vestbø
84e7b64090 logging: Clarify that QT_MESSAGE_PATTERN only applies to unstructured logging
Structured sinks such as systemd should capture each piece of information
individually, not bake it into the message via the message pattern.

Change-Id: I164c043683f123764a5445dc9faad049e25fd738
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-01-12 11:50:35 +00:00
Martin Smith
6b012a30d9 doc: Add template clause to \fn commands in qmenu.cpp
clang-qdoc requires the template clause in \fn commands
for template functions.

Change-Id: I5719f39ebca6064e6480e873a1d4f339f41df436
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 11:42:39 +00:00
Martin Smith
b426e00ebf doc: Add template clause to \fn commands in qtoolbar.cpp
clang-qdoc requires the template clause in \fn commands
for template functions.

Change-Id: I838bae74102e99b64f04960ad88f192e45d901ba
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 11:42:25 +00:00
Martin Smith
485c21dcc9 doc: Remove <CR> from \fn commands
clang fails for \fn commands that contain CR.

Change-Id: I4ece5110437cf358e408731f93993bf2d9702381
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 11:41:51 +00:00
Kai Koehne
42cb74aa81 MinGW: Remove workaround that disabled strict_c++
The workaround was needed in older versions of MinGW-w64 headers that
did disable some common functions for -std=c++1z. Anyhow, this is not
reproducable anymore with any recent MinGW-w64.

Change-Id: I8e34a2e055f8e2356696dd4fe131a757c1527574
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-12 11:41:37 +00:00
Tor Arne Vestbø
2aa9908e24 Warn when ending painting on backingstore while there's still an active painter
There's no way for the backingstore to end painting on the device by itself,
so we warn the user about what's going on. Failing to end painting on
the device will e.g. in the case of QRasterBackingStore result in having to
make a copy of the QImage data during flush.

Change-Id: I3fbac2d7a8a440fdb23197ac2d57d95bfaf9e125
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-01-12 09:41:44 +00:00
Liang Qi
c81966c39e Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev 2018-01-12 08:00:04 +00:00
Martin Smith
e6c089ae28 doc: Remove unneeded \fn commands
Removed unneeded \fn commands from two qdoc comments and
moved one of the comments to the file where its function
definition is located.

Change-Id: I4c4371f0541d2995398b0d32e1df409433061226
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-12 07:20:36 +00:00
Friedemann Kleint
9031069e12 Add more Q_FALLTHROUGH()
Silence g++ 7.X warnings.

Change-Id: Id06d06e7e3b5be2cf3934d81f1891da58dea2649
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-12 07:10:25 +00:00
Gabriel de Dietrich
cf7a4016a1 QMacStyle: Draw CE_MenuItem text using AppKit
We seem to induce QCoreTextFontEngine to draw text the
wrong way in non-native QMenu popups. Here, we just
delegate menu items' text rendering to AppKit.

This is only a workaround pending a proper fix or better
understanding of the aforementioned issue.

Change-Id: I71088ebe2a534bebca2ad396b1ea6754be093f55
Task-number: QTBUG-65653
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-11 23:37:34 +00:00
Liang Qi
f4d8cafc1b Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/3rdparty/harfbuzz-ng/src/hb-private.hh
	src/sql/doc/snippets/code/doc_src_sql-driver.cpp
	src/sql/doc/src/sql-driver.qdoc

Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
2018-01-11 18:10:41 +01:00
Liang Qi
5ba29e1672 Merge remote-tracking branch 'origin/5.9.4' into 5.9
Change-Id: Ic23e90146470d69060313628562f76a710696bab
2018-01-11 12:45:59 +01:00
Jani Heikkinen
a6514ddd33 Fix license headers
Remove usage of outdated header.LGPL21 and replace those with proper
one (header.LGPL in src, header.GPL-EXCEPT in tests)

Change-Id: Ia4d1c0d84b77f09787fe7c30670747a1fe2aff29
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-01-11 11:40:36 +00:00
Liang Qi
1759510201 Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10 2018-01-11 11:40:34 +00:00
Kai Uwe Broulik
e5b422382a QGuiApplication: Add fontChanged signal
This removes the need to install an event filter on qApp just for this.
A similar thing was done with setPalette to reduce the number of event filters
in e.g. SystemPalette and Quick Controls.

[ChangeLog][QtGui][QGuiApplication] Added fontChanged signal

Change-Id: Ifa843aa42b91ac63ab17c3b064ac0e764aac77d3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2018-01-11 10:25:05 +00:00
Friedemann Kleint
8247ce9766 SQL plugins: Fix warnings about deprecated constructor of QSqlError
Use the constructor taking a string and convert number unless
it is -1.

Change-Id: I18d1ba2c8e0d3f4af01b7955863967f75051746b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-10 21:18:26 +00:00
Alex Trotsenko
344acfb9fe QRingBuffer: replace some checks with asserts
To avoid the silent exits and potentially dangerous output values, the
caller must supply the correct parameters on input.

Change-Id: Ia9c56940adbf4ad34605a002dfc5c86b32c4658c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-10 20:21:31 +00:00
Albert Astals Cid
1df2906c75 Add override
Change-Id: Iafa8e21d7d47797c1c085aced9a0cd92179385a2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-10 16:06:55 +00:00
Paul Wicking
1623f66989 Doc: Swap unresolved variables with actual function names
Original documentation commit included unresolved link target names.
This fix replaces them with the actual OpenGL function names.

Change-Id: I36a24eb237ef35d7207f3bae0771dc96476d7b19
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-10 14:13:05 +00:00
Tor Arne Vestbø
0c5953fd4e macOS: Namespace FullScreenProperty category on NSWindow
Change-Id: I48e1bf91ebcfe10bd8b6a2df510c8b6a3e19e1d9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-10 10:03:54 +00:00
Tor Arne Vestbø
841542225b macOS: Simplify mangling of QNSPanelDelegate protocol
Change-Id: If29bc36ecab2feb4ce3372153d0d1566cdffc719
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-10 10:03:49 +00:00
Tor Arne Vestbø
3f6bc9a983 macOS: Namespace QNSWindowProtocol when building with -qtnamespace
Otherwise the protocol name might clash with existing protocols when
using Qt as a plugin, and those existing protocols may have lived in
images that since have been unloaded, causing crashes.

Change-Id: I68fbe290bcbf2fabf463647c960f686971e066dd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-10 10:03:43 +00:00
Pavol Markovic
36ddfb6cc1 macOS: Replace category methods with functions
Objective-C category methods prohibit safe unloading of dynamic
libraries / plugins statically linked to Qt. Although they can be called in
convenient way they can be replaced with standalone functions without
noticeable drawback.

Remove unused qt_validModesForFontPanel category method.
Remove empty NSStatusItem (Qt) category.

Task-number: QTBUG-59884
Change-Id: I69503a115b1177623da91c67b62d72e56f43ffcf
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-10 10:03:32 +00:00
Laszlo Agocs
e82e8b8a1f Document Q_COREAPP_STARTUP_FUNCTION is no good in static libs
Change-Id: Iaffa08332c87095a64e25e2da4ed56bfd3d0e84f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-10 09:24:21 +00:00
Rainer Keller
56e00bf6c0 qtlite: Fix compilation of QWidgetLineControl when configured with no-feature-itemviews
Task-number: QTBUG-53141
Change-Id: I00d9d7fc43a4531c9213281f529b2d0f3164a5c6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-01-10 09:08:01 +00:00
Allan Sandfeld Jensen
4c03f2b79e Fix regression in painted emoji offset
Factor out translation from the matrix applied on bitmap glyphs,
as that gets applied as position when painted.

Task-number: QTBUG-64313
Change-Id: Iab8d995c00ee02eda0896242903312d837b6d790
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 07fcfb793d)
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-01-10 07:07:13 +00:00
Thiago Macieira
73a5a93ff9 MySQL: Fix qAddPostRoutine of mysql_server_end() on Windows
The function is declared as STDCALL, so we can't add a direct function
pointer to it (calling convention doesn't match what QtCore will try to
use). Instead, add a lambda as a trampoline.

Task-number: QTBUG-65471
Change-Id: I39332e0a867442d58082fffd1504002206e5cfaf
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-10 03:17:09 +00:00
Liang Qi
9bee6712fc Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
2018-01-09 21:27:30 +01:00
Martin Storsjö
74118a4784 moc: Initialize staticMetaObject with the highest user-settable priority
The referenced static meta object for the superclass might be in a
different DLL. In this case, the whole QMetaObject can't be initialized
all via preinitialized data in the data section of the binary, but must
run code at runtime to fill in the value of the dllimported pointer.

In these cases, both GCC and MSVC initialize as much as possible statically,
while only filling in the dllimported values (QMetaObject::d::superdata)
at runtime. Clang, on the other side, initializes the whole struct
at runtime if some part of it needs runtime initialization, leaving
the struct completely uninitialized before constructors are run.

In C++, there are no guarantees for in what order constructors in
different translation units are executed. This in particular means
that there are no guarantees as to whether qRegisterWidgetsVariant()
in qwidgetsvariants.cpp runs before or after the runtime initialization
of QWidget::staticMetaObject.

With GCC and MSVC, this doesn't seem to have mattered since only the
superdata pointer of the staticMetaObject was uninitialized - everything
else was initialized, and the superdata pointer doesn't seem to be
accessed during qRegisterWidgetsVariant.

With clang, the whole staticMetaObject is uninitialized, unless the
staticMetaObject has been initialized before (and the initialization
order is undefined).

By setting a manual priority (which is a GCC extension that also
clang supports) for the staticMetaObjects, we can be sure that
these are initialized before the actual explicit constructor
invocations (without any explicit initialization priority) that
can access the staticMetaObjects.

Change-Id: I64a82f12d690528567509791bae088b6304e189b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-01-09 18:36:46 +00:00
Christian Ehrlicher
81566ca9aa QHeaderView: fix visualIndexAt() in rtl-mode
QHeaderView::visualIndexAt() did not calculate the correct position in
right-to-left mode. This lead e.g. to missing vertical grid lines in
QTableView/Widget when scrolling horizontally.

Change-Id: Ia50e5cfd7830a6ad8abd17ff79d9fbb33dc4097c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-09 17:54:43 +00:00
Christian Ehrlicher
a40e2c7d98 Avoid useless casts to/from uint
Remove some c-style casts from int to uint which were needed in Qt3 (or
earlier?) but nowadays the values are all int.

Change-Id: Iecd739c450873adf952a17f635d7fb6825537907
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-09 17:54:22 +00:00
Joachim Puhr
50deb8cf70 doc: Hints for using SAP HANA database
As the HANA ODBC driver does not provide scrollable
results per default, the connection has to be established
with a specific option.

Change-Id: I14751a94f61d6fffd6d56c39076c24ec4d1f88ef
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joachim Puhr <jpuhr@gmx.de>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 16:35:58 +00:00
Giuseppe D'Angelo
b3e4be2d8b Long live QAbstractItemModelTester!
AKA the model tester, living in QtTestLib now.

Underwent some significant refactoring from the original modeltester:
in particular, it will stop testing illegal indices.

[ChangeLog][QtTestLib] Added QAbstractItemModelTester, a class
to help testing item models.

Change-Id: I0e5efed7217330be11465ce3abb3590f3f2601a4
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-09 15:57:58 +00:00
Alex Trotsenko
2d260eada8 Micro-optimize QRingBuffer::free()
Change the condition to strong equal, as 'bytes' was checked against
wrong value on the start of the function.

Change-Id: I4ec4768b9fff3292af233417c4a5862d72d4eeac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-09 15:52:18 +00:00
Albert Astals Cid
c1aaa13939 Fix custom page size handling in the Unix print dialog
There were several problems that i've fixed in a single commit since they are very interwinded

 * The dialog used QPageSize::Custom for two things, the custom sizes coming from
   the printer and the "user can write whatever size they want" size. Now only
   the printer custom sizes use QPageSize::Custom and we use m_realCustomPageSizeIndex
   for the "user can write whatever size they want" one.

 * The dialog stored the QPageSize id as the combo userData, that doesn't work
   when the printer has multiple custom sizes since they all share QPageSize::Custom
   so now it stores the QPageSize itself

Task-number: QTBUG-58733
Change-Id: Ie640a07bb5e24b753db83c091c836e8af4ff126c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 15:42:33 +00:00
Albert Astals Cid
bc632bc2bf QUnixPrintWidgetPrivate::_q_printerChanged: Update state correctly
We need to update the printer output format and the current print device
when changing the printer so that if the user opens the properties dialog
for that printer it reflects correctly the selected printer.

Change-Id: Ib6767a74b74b8eebe43ff17006b6105c483a08b6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 15:42:25 +00:00
Renato Araujo Oliveira Filho
f6fd3f18d3 Validate printer duplex mode
Disable unavailable duplex options
Remove redundant option on advanced tab

Change-Id: Ie09c9ffd637b521210e3d7d4f15300792f910996
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2018-01-09 15:42:17 +00:00
Robert Szefner
ca4a76350a Small optimalization for NULL values
No need to call PQgetvalue() before PQgetisnull().

Change-Id: Ie83ee577b082dbe9d9ca2e86212a281abebdde6e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 14:13:52 +00:00
Ryan Chu
a5ad605dfe QFtp: only use fall-back password for anonymous access
The code used to fall back to anonymous login independently for username
and password; however, it should only use a fall-back password if the
username is missing or (case-insensitive) "anonymous".  When a
non-anonymous username is given without password, we should simply skip
he PASS message to FTP.

If the FTP server requests a password, in the latter case, QFtp will
signal authenticationRequired; in all cases, if the server rejects the
given credentials, QFtp signals authenticationFailed.  Either way, the
client code can then query the user for credentials as usual.

Task-number: QTBUG-25033
Change-Id: I2a4a3b2725819ab19c8a7e4baa431af539edcd8d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-09 13:31:55 +00:00
Kavindra Palaraja
6ff8d8173d Clarify behavior of setData in QListWidget, QTableWidget, and QTreeWidget
setData()'s default implementation for QListWidget, QTableWidget, and
QTreeWidget treats Qt::EditRole and Qt::DisplayRole as referring to the
same data. Used the same sentence from QStandardItem::setData for
consistency.

Task-number: QTBUG-11549
Change-Id: I41d06bdaaa8e7d4a86e24147b3d8222ad7823a6c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-09 13:22:15 +00:00
Kevin Funk
43e444d1ff CMake: qt5_add_binary_resource: re-run if needed
qt5_add_binary_resources() macro did not recompile for CMake generated
input before this patch.

Adding the input files to the DEPENDS option corrects this issue:

Task-number: QTBUG-60714
Change-Id: I0f46918c6f1079fed7ee1b21305b18ff38f863f8
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-09 13:21:46 +00:00
d3fault
43f2d43e8f Add doc explaining the gotcha when connecting a signal to qApp->exit
Change-Id: I981e4bfdf679bf755665748e9d3b389a94561e55
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-01-09 13:21:21 +00:00
Eskil Abrahamsen Blomfeldt
02557c07da Fix ZWJ and ZWNJ when fallback font is in use
When applying fallback fonts to characters that are joined by
ZWJ or ZWNJ, we also have to set the same font for the control
characters, otherwise we will split the text and the necessary
shaping will not take place. This was reported for emojis, but
will probably also happen for Indic scripts where joiners are
used predominately.

[ChangeLog][QtGui][Text] Fixed ZWJ and ZWNJ control characters
when fallback fonts are in use.

Task-number: QTBUG-65519
Change-Id: Ia37233f3319b95af68ae6053c29997eac65448e0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-01-09 12:16:57 +00:00
Eskil Abrahamsen Blomfeldt
12687ccfd5 CoreText: Order fallback fonts based on writing system support
After we stopped sanitizing the fallback font list (with change
6ca48a847a), we now need to make
sure it is ordered so that the fonts that support the writing
system in question are always tested first, otherwise we can end up
loading a lot of fonts that will never be used.

Task-number: QTBUG-65605
Change-Id: Id2a65bbff3e64e6d6e6b4f72500778ee3e811e84
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-01-09 12:17:34 +00:00
Friedemann Kleint
fcbaa8ec38 QFileSystemModel/Windows: Make file name checking case-insensitive
Introduce a special hash modeled on the one used for QFileSystemWatcher
on Windows.

Task-number: QTBUG-31103
Task-number: QTBUG-64147
Change-Id: I69ebabe841716e4957ae3fb04fa5c43d233a3552
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-09 12:01:17 +00:00
Allan Sandfeld Jensen
d196036024 Avoid providing bad pixelDeltas on X11
With libinput we now get a hardcoded resolution that is unrelated to
the hardware. So avoid using that as a real pixel delta and document
pixel deltas as being driver specific and unreliable on X11.

Task-number: QTBUG-59261
Change-Id: I9fe86d80e7ccd290ed2e4091d7eafa52cb537d34
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Marco Martin <mart@kde.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-01-09 11:53:28 +00:00
Andy Shaw
f2b802f923 Add HAVE_USLEEP define to give better performance where possible
Change-Id: I6fa68a7eac9001cabceabf846bc11e9ed1001d2c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-09 09:51:56 +00:00
Sérgio Martins
a79d9da8e0 Fix build due to missing QDebug include
The build just passes on Qt CI by chance.

Change-Id: I3bfef12b48df22fa64d92af9cd345bfc984c9923
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-09 08:04:07 +00:00
Friedemann Kleint
da3a600824 QWindowsXPStyle: Speed up level window loop in helper winId()
Rewrite the loop using QGuiApplication::allWindows() to avoid
the creation of temporary containers by
QApplication::topLevelWidgets() and expensive checks.

Task-number: QTBUG-64072
Change-Id: I56ef29b12f7bcbe274f3e00a6007d75d33f22b10
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-01-09 07:20:23 +00:00
Martin Smith
a473103734 doc: Remove undef of Q_GADGET
Someone, almost certainly this writer, undefed Q_GADGET for
qdoc, but this was a mistake that caused clang to report a
lot of errors for undefined variable. The undef of Q_GADGET
is now removed.

Change-Id: I39fb09443110b60bbcb16cf350f38c1eac773d8a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-09 06:40:21 +00:00
Martin Smith
49e2746e16 doc: Correct clang parsing errors in qvariant.h
Some old uses of Q_QDOC to prevent the old qdoc C++ parser
from seeing declarations it didn't need to see were preventing
clang from seeing declarations it did need to see. These have
been removed, and some internal documentation has been added to
account for some declarations that suddenly became public but
should not be seen in the Qt API.

Change-Id: Iccf423e5cf8767f0a271150ab59bea54cf90ac46
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-09 06:40:14 +00:00
Martin Smith
32c942ce85 doc: Move use of Q_CLANG_QDOC that caused compile-time assert
It caused a compile-time assert in clang that should not have occurred.
It is now moved passed the assert macro.

Change-Id: I8311992617de7837ca4604fcc3e5afb17dcda65d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-09 06:40:05 +00:00
Martin Smith
643290e49b doc: Remove Q_QDOC declarations that are no longer needed
clang-qdoc understands Q_OBJECT, so it sees the declarations
that appear there.

Change-Id: I669be13af59269a0e108e0988d9b4f7779274c7c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-09 06:39:54 +00:00
Martin Smith
986b275c51 doc: Remove unnecessary #ifndef Q_QDOC
It was used to prevent qdoc from seeing the entire include
file, but clang qdoc needs to see it.

Change-Id: Ib8dbcdcd68f2003f4dd89ed6a5c9e1b65bc1c67c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-09 06:39:43 +00:00
Martin Smith
61f4820c13 doc: Remove unnecessary qdoc declaration hack
A special declaration for qdoc was no longer needed.

Change-Id: Ib3486be5c016d57cf09ef89fc8df29045fef0577
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-09 06:39:21 +00:00
Martin Smith
0fd0059a13 doc: Correct qdoc warnings in qobject.cpp and qmetatype.cpp
clang required adding template clauses to a few \fn commands.
There were also a few cases where Q_QDOC was changed to Q_CLANG_QDOC
and a few cases where special declarations for qdoc were removed in
favor of the actual declarations.

Unfortunately, a few qdoc warnings remain unfixed for classes
QObject and QMetaType, but these might be caused by minor bugs
in clang-qdoc itself, so they will be fixed there.

Change-Id: Ib586628cb6d2aa9cf4bcad303b5af09b412a7e57
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-08 19:10:50 +00:00
Jan Grulich
beeb748b2c Fix support for flatpak FileChooser portal
Properly parse filters. First captured substring in QRegularExpression
is at index 1, with index 0 you access the full captured string.

Change-Id: I68b6e314171536a08c606e5acd0f7211c1c3c254
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-08 18:41:04 +00:00
Eskil Abrahamsen Blomfeldt
6ca48a847a Fix fallback fonts for non-common writing system
When we request fallback fonts, we cannot discriminate the fonts
based on the writing system support. This is especially important
since common script is now merged with other scripts, meaning that
a common script character will always go through the fallback
mechanism when not supported by the main font. When drawing
for instance a string of Devanagari characters on macOS, we would
get a list of 33 fallback fonts, but almost all of them would be
the default Devanagari font, since none of the other fallbacks
would support that script. Meaning that we would just check the
same font over and over, which makes no sense. The fallback list
has been retrieved specifically for the given script, so we do
not need to consider that when fetching the fonts.

For most of the common set, we will not have noticed the bug,
because at least one of the writing system-specific fallbacks will
have had support for latin characters as well. But when trying to
mix emojis and some non-common script, we would get a box in
place of the emoji, which had been adopted to the main script and
would only be looked for in the fonts supporting this.

Note that this exposed an issue with the QRawFont test on some
systems. When the sample text contained a space, it would
be possible to get a fallback font for this character, since
we now effectively support fallbacks. This is not the correct
behavior, but it is unrelated to this fix, and it was not what
the QRawFont::unsupportedWritingSystem() test was written to
check. I have therefore removed the space from the sample text
to make the test pass, and will make a separate task of fixing
the issue of merging fonts for whitespace characters.

[ChangeLog][QtGui][Text] Fixed a bug where mixing different
writing systems with emojis could lead to missing glyphs.

Task-number: QTBUG-61882
Change-Id: I00f6043bb01af1f2277723ccf643034aebf3e18f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-01-08 12:28:28 +00:00
Johan Klokkhammer Helsing
923dd4fe8f Add a tech preview eglfs device integration for VSP2 composition
This creates a new device integration for eglfs, eglfs_kms_vsp2, that's very
similar to eglfs_kms_gbm, but includes an extra step for doing VSP2 hardware
compositing.

The main Qt content is drawn to double buffered off-screen GBM buffers which
are converted using drmPrimeHandleToFD so we get DMA buffer file descriptors
that can be used by the VSP2 blending hardware. The blending hardware writes to
double buffered DRM dumb buffers, which are flipped with drmModePageFlip.

Communicating with the VSP2 is done using the Video4Linux2 (V4L2) streaming
API. There are two steps in creating abstractions for this. First, there is the
QLinuxMedia class that consists of a Qt style wrapper for V4L2 without anything
VSP2 specific. Second, there is QVsp2BlendingDevice which hides some of the
streaming details of the VSP2 and has some level of error recovery. Both
classes include a fair bit of logging and error reporting.

The patch is written with Wayland compositors in mind, but should work for
other use cases as well.

This is just the basic support to make compositing work, additional features
may be added in subsequent patches, i.e:

- Auto-detect VSP2 (-feature-vsp2 currently needs to be explicitly enabled).
- Support for setting the alpha value of a layer.
- Support clipping layers.
- Support for scaling layers.
- Support for other output formats than RGBA32.
- Hardware cursor support.
- Support foreign layers below the main Qt layer.
- Support for memory mapped and user pointer buffer types (currently only DMA
  buffers are supported).

Change-Id: I1917d2dbdbaeded0d9c021baaa799d56afe1a9bd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-01-08 11:51:43 +00:00
Ulf Hermann
8e72f51257 XCB: Undef KeyPress and KeyRelease also when not using xinput2
The defines come from X.h here, which is included via Xutil.h.

Change-Id: I19887424cff28567fcbb1c352b42bb9d750b1928
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-01-08 11:43:11 +00:00
Andy Shaw
3e58f2b090 sqlite: Bind duplicated named placeholders correctly
sqlite will reuse the index for bound parameters when the named
placeholder is duplicated so we only need to call bind one time for each
placeholder. Therefore we need to have just one instance of each value
when doing the bind.

Task-number: QTBUG-65150
Change-Id: I75c4bcc4563e43c180a59a7a4cbb770dbe994642
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-01-08 10:13:10 +00:00
Giuseppe D'Angelo
69496d4e22 Introduce QAbstractItemModel::checkIndex()
When implementing a custom model there's the habit, in each and every
function that takes a QModelIndex, to carefully checking the index
passed by the caller. This index is checked for "legality" (*): does the
index belong to this model, is the index pointing to an existing row and
column, and so on.  These checks are hand-rolled and, as such, slightly
different and possibly incomplete (i.e. wrong) every time.

What's worse, these checks are implemented via "ordinary" code (if
statements). However, passing an illegal index to a QAIM function is a
precondition violation, and as such does not (and must not) be
checked in ordinary conditions, as it triggers undefined behavior. On
the other hand, while debugging a custom model or a custom hierarchy
of (proxy) models, having such checks in place can be a significant
aid.

Enter checkIndex(): a debugging helper for QAbstractItemModel and its
subclasses. checkIndex() centralizes the checks for legality of a
given index. User code is free to assert on it, or have some other
fallback mechanism in case a check fails.

(*) Using "legality" here instead of "validity" in order to avoid
confusion between QModelIndex::isValid() and what checkIndex() really
does.

[ChangeLog][QtCore][QAbstractItemModel] Added
QAbstractItemModel::checkIndex(), a debugging function for
QAbstractItemModel subclasses.

Change-Id: I1eea0586b1ac3ededdbfbf46759145022dc5ad86
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-08 09:41:53 +00:00
Marc Mutz
9c53f4d33a QStringBuilder: add support for QStringView
[ChangeLog][QtCore][QStringBuilder] Added support for QStringView.

Change-Id: I5b6803397b107ef69d198a935b3ba4339ac95087
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-08 09:41:43 +00:00
Marc Mutz
641e010cc7 QStringBuilder: add support for char16_t{,*,[]}
[ChangeLog][QtCore][QStringBuilder] Added support for char16_t
characters and strings.

Change-Id: Iee727f07226f2a326ae0df28d44930336cd8f71e
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-08 09:41:38 +00:00
Robert Szefner
6d0c8825f9 QPSQL: Add support for multiple result sets
This change adds support for multiple result sets in PostgreSQL.

[Important Behavior Changes] The QPSQL driver now supports multiple
result sets. Since QPSQL previously did not support multiple result
sets, there may be some compatibility issues with the existing code
that executed several queries as one and were expecting to get
the results of the last one. In this case use QSqlQuery::nextResult()
to move to the last result set.

[ChangeLog][QtSql][QPSQL] Added support for multiple result sets

Change-Id: I2bfc91f512c4dac83116f3aa42833839a6da084c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-08 09:10:10 +00:00
Eskil Abrahamsen Blomfeldt
cf35bc21c0 Hide EUDC font better when it is available
In ff2ae36551 we added support for
the End User Defined Characters font when it is available, and
it was added as the first fallback font to avoid being overridden
by a symbol font.

An unintended side effect was that we would also override the
default fonts for the selected style hint, so in e.g. the textedit
example, all the text would default to EUDC. We now add it after
the default style hint font instead. We also mark it as a
private font family, since it should not be shown in the font
combo box as a selectable font, but should only be used automatically
as fallback for PUA characters.

Task-number: QTBUG-65308
Change-Id: Id2ffd058a9f1d660cf2b9b1383ba1fdb10dcc97e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-01-08 07:58:33 +00:00
Andy Shaw
b4869b8e93 Cocoa: Make AA_MacDontSwapCtrlMeta work
Task-number: QTBUG-22775
Task-number: QTBUG-51293
Change-Id: If615426001a1ea482f854f49cbae33ca1c954e9a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-01-08 07:18:01 +00:00
Friedemann Kleint
b096c53d59 QtCore: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs.

Task-number: QTBUG-51673
Change-Id: I211703189ff12f827d94914093369736b6e65d4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-08 04:52:43 +00:00
David Edmundson
78f234d5dd Send NET_WM_SYNC on swapBuffers when using EGL
If a user is using EGL on X, we need to reply to sync requests in the
same way that we do in the GLX backend.

Change-Id: I950de284685dc0ead896688c434828ab1b9c673f
Reviewed-by: Aleix Pol
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-01-07 21:45:05 +00:00
Liang Qi
24fba6744c Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp

Change-Id: Ib6dd965a7eb6f59103e276b3407739147ecd37b2
2018-01-07 14:47:19 +01:00
Anton Kudryavtsev
79d3351855 QMenuBar: Add overloads of addAction() using Qt 5 signals and slots
[ChangeLog][QtWidgets][QMenuBar] Add overloads of addAction() using Qt 5 signals and slots

Change-Id: Ief21974213b80111f0ca87df490eb72dd6b9c9b9
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-01-06 18:48:54 +00:00
Robert Szefner
f99d2b21b8 QPSQL: Add support for forward-only queries
With this change, it is possible to significantly reduce memory
consumption of applications that fetch large result sets from databases.
The implementation is based on the new functionality called "single-row
mode" that was introduced in PostgreSQL version 9.2:

https://www.postgresql.org/docs/9.2/static/libpq-async.html

It also uses asynchronous commands PQsendQuery(), PQgetResult():

https://www.postgresql.org/docs/9.2/static/libpq-single-row-mode.html

[ChangeLog][QtSql][QPSQL] Added support for forward-only queries (requires
libpq version 9.2 or later)

[Important Behavior Changes] The QPSQL driver now supports forward-only
queries. To use this feature, you must build QPSQL plugin with PostreSQL
client library version 9.2 or later. See the Qt SQL documentation for
more information about QPSQL limitations of forward-only queries
(sql-driver.html).

[Important Behavior Changes] If you build the QPSQL plugin with PostgreSQL
version 9.2 or later, then you must distribute your application with
libpq version 9.2 or later. Otherwise, the QPSQL plugin will fail to load.

Task-number: QTBUG-63714
Change-Id: I15db8c8fd664f2a1f719329f5d113511fa69010c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-06 08:24:32 +00:00
Christian Ehrlicher
b739b3a040 QSqlRecord: (re)speedup indexOf(const QString& name)
While adding the possibility to access values for QSqlRecord with
decorated field names (table.field), some string-allocations were added
which created a remarkable slowdown. Replace the QString allocations
with QStringRef avoids those allocations and restores the speed for
normal operations (apart from on QString::indexOf() call and some
integer comparisons)

Task-number: QTBUG-65226
Change-Id: I9e458523891421abce9e4a7ed931fec000dcbe76
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-06 05:17:28 +00:00
Christian Ehrlicher
3ed91da499 QStyledItemDelegate: adjust editor geometry also in LTR-mode
The editor geometry was adjusted to a proper size in RTL-mode, but not
in LTR-mode. To fix this inconsistency, the geometry is now also
adjusted in LTR-mode to make sure the editor has enough space for the
min/max values for the given datatype.

Task-number: QTBUG-37433
Change-Id: Iff41e854f2fa2104ab5c589d24780facc3ed5815
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-06 05:17:13 +00:00
Christian Ehrlicher
20604ea554 QHeaderView: respect min/maximumSectionSize property
QHeaderView::resizeSection() did not check if the given section size is
inside the min/max property bounds.
Also on calling setMin/MaximumSectionSize() the current section sizes
were not checked if they are inside the new given bounds.
This is a small behavior change when a user is setting the section size
via resizeSection() without respecting the min/maxSectionSizes.

Task-number: QTBUG-64173
Change-Id: Ia9c9eebf058d60c776ab5f8f8336642013ec553f
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-01-06 05:17:00 +00:00
Martin Smith
1c0ac8c4b8 doc: Correct remaining qdoc warnings in qdeadlinetimer.cpp
clang required adding template clauses to \fn commands and in one
instance, removing a formal parameter name from a \fn command. An
instance of Q_QDOC was changed to Q_CLANG_QDOC in the include file.

Change-Id: Ic7dab56705043d2db8578dfc002d2f41b927f756
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-06 00:26:31 +00:00
Martin Smith
dd3f7c5f2b doc: Correct remaining qdoc warnings in qchar.h and qchar.cpp
Several enum values had to be given \value statements, and a
member function only visible for Windows had to become visible
to clang-qdoc.

Change-Id: I47fbbcf9c5e4333abd13a041ce8fee2c13f9541d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-06 00:26:15 +00:00
Martin Smith
66a0fecfae doc: Correct remaining qdoc warnings in QStringView
Added missing template clause to \fn commands required by clang-qdoc.
Changed a few Q_QDOC macros to Q_CLANG_QDOC.

Change-Id: I20e6855b13df6384b471fc2bb5de27b0e3b44d1b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-05 20:22:13 +00:00
Martin Smith
81e4d039a9 doc: Correct remaining qdoc warnings in qstring.cpp
Added missing template clause to \fn commands required by clang-qdoc.
Removed several obsolete \sa targets. Added a few missing return types
to \fn commands.

Also changed a } to ] in a \fn command in qrandom.cpp.

Change-Id: I0f004a1e57507ff5fb035e822ca8b1baa7faad9b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-05 20:22:01 +00:00
Martin Smith
4d3c55aa31 doc: Correct remaining qdoc warnings in qstack.cpp
Added missing template clause to \fn commands required by clang-qdoc.

Change-Id: Id2cb480a0780025276639c38f595cb21264bd8cb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-05 20:21:49 +00:00
Martin Smith
d72705c96d doc: Correct remaining qdoc warnings in a few files
Added missing template clause to \fn commands required by clang-qdoc
in qsharedpointer.cpp, qscopedpointer.cpp, and qstringbuilder.cpp.

Change-Id: Ifca5b81db96e678a53e40080d351c69f14db604a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-05 20:21:37 +00:00
Gabriel de Dietrich
1e75dcf251 QStyleHelper: Use palette cache key in pixmap key
This reverts commit d7bcdc3a44.

Now that QPalette::setBrush() is a bit smarter (see
c564779c07), we can be
confident the palette's cache key won't change so often.
Therefore, we can use it again as part of every pixmap's
cache key.

Change-Id: I5cab2296a937f9149c7745291e0442eea24f4e9d
Task-number: QTBUG-65475
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-05 17:43:50 +00:00
Martin Smith
698fa094b3 doc: Correct remaining qdoc warnings in qscopedvaluerollback.cpp
Added missing template clause to \fn commands required by clang-qdoc.

Change-Id: Ia7bc899153cccedc28e5083d658f427d322acab7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-05 16:03:47 +00:00
Friedemann Kleint
53fae41e42 QWindowsXPStyle: Remove unused code
Fixes a deprecation warning about QDesktopWidget::screenGeometry().

Change-Id: Ib56b2d3f62ddca60d84b4f626571b5e444304804
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-01-05 15:46:32 +00:00
Albert Astals Cid
5e2f583a67 CUPS: Fix conflict handling
The previous code assumed that ppdMarkOption returning non zero (i.e. it has conflicts)
also meant that the option wasn't applied at the ppd level, but it actually is.

What we need to do is after calling ppdMarkOption parse the tree again looking
to see if any option is conflicting and mark it as such in the UI.

Change-Id: I836f1902d14dc8c176bb06776471cbf4ed11786f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-05 15:38:35 +00:00
Andy Shaw
5e9e4ccdc3 Add an option to scroll the QComboBox on macOS with the mouse wheel
Since there may be some applications that want to make their comboboxes
scrollable or not with the mouse wheel then a style hint is added to
make this toggable. It defaults to true for all platforms except macOS
to keep it in line with existing behavior.

[ChangeLog][QtWidgets][QStyle] Added SH_ComboBox_AllowWheelScrolling as
a style hint to enable/disable the use of the mouse wheel in a QComboBox.
This defaults to true in all styles except the macOS one so there is no
change in existing behavior.

Task-number: QTBUG-53094
Change-Id: I6eb61e1990bfc79e3b3ea82d7b91ee39096fa077
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2018-01-05 15:01:43 +00:00
Oswald Buddenhagen
2226f01d74 qlalr: fix description
amends 710875efde.

Change-Id: Ia5e9dd6f3b080b876e4dc1eb99f2b43d73999c04
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-01-05 10:32:20 +00:00
Mårten Nordheim
da81b01df8 Change use of qDebug to qCDebug
Task-number: QTBUG-65532
Change-Id: I8b6b8f04f5f6b63eb3c80f140710c8c05291986a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-01-05 09:37:57 +00:00
Friedemann Kleint
bef0db36ac QtPrintSupport: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs.

Task-number: QTBUG-51673
Change-Id: Ib87b2559d0d04fcfa70cabd134ac6936a3c2a261
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-05 08:32:21 +00:00
Thorbjørn Lund Martsum
d5a11a0ec2 Revert "QTreeView: Make sure QHeaderView is notified on layoutChanged()"
It caused some sorting issues.
This reverts commit 93dabeba9d.

Change-Id: Ie8c7f2d47885be6626ddb6284474a78dcf09cf33
Task-number: QTBUG-65478
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-05 08:22:30 +00:00
Allan Sandfeld Jensen
7e9460306b Update qurltlds_p.h
It has been a while and it is supposed to be updated at every release.

[ChangeLog][Third-Party Code] Updated top level domain-list from Mozilla

Change-Id: Ifd3e5fe33166e793908b3ce28d29a507b483dd8a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-01-05 08:22:23 +00:00
Oliver Wolff
9f2ce7e2f6 winrt: Remove -qdevel and -qdebug from command line parameters
These options are used by winrtrunner/Qt Creator to control logging
and debugging behavior and should not influence applications.
Without this change applications that use
QCommandLineParser::process have to explicitly remove these values
from the arguments list or the application will exit with an
"unknown option" error when run from Qt Creator.

As winrt applications do not natively support command line arguments,
breaking the use case of having these values as valid command line
options is acceptable.

[ChangeLog][qtmain][winrt] -qdevel and -qdebug are removed from the
command line arguments and not passed to the application.

Change-Id: I60e5565148fd3dd0155b946607fdf5042139d2e1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-01-05 07:37:20 +00:00
Martin Storsjö
f663c83f9d harfbuzz: Fix building for win64 with clang
Clang errors out on casting from a pointer to a smaller integer
type.

This is an adapted backport of a newer upstream harfbuzz
commit, 03b7a221f701a9b003890878e730ad175c3fdd86.

Change-Id: I0de62d90008021aed6acf4e946ce1d346f9aac8c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-01-05 07:34:23 +00:00
Friedemann Kleint
874c3e3c05 Direct2D: Replace class Direct2DVersion by QVersionNumber
Change-Id: Iad8c659a301c6d71b26964d84a67a51352712218
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-01-04 20:25:10 +00:00
Friedemann Kleint
3439f523b8 QtDBus: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs.

Task-number: QTBUG-51673
Change-Id: I0c0ba4e914a1f3b7a324c68c59544a5074f7b075
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-04 20:24:09 +00:00
Friedemann Kleint
98a3502fa5 QtSql: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs.

Task-number: QTBUG-51673
Change-Id: I1d0f89784f8fb698828e11ce39086501971f1756
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-04 20:23:54 +00:00
Friedemann Kleint
c9539f340e QtWidgets: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs.

Task-number: QTBUG-51673
Change-Id: I2ba95bde2b8bbcca1833dc14c344b9a14394bc1d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-04 20:23:40 +00:00
Frank Richter
3edcd9420e Support legacy X11 keymaps
Not all X server vendors support the XKB protocol. Furthermore,
while X.org seems to use keycodes that match the usual keyboard
scancodes, other vendors may not do so. This means that using an
XKB keymap suitable for an X.org server results in garbled input
with servers for other vendors.
Both of these issues are addressed by using the core keycode
information as a fallback.

[ChangeLog][X11] Fall back to X11 core keycode information
if an XKB keymap could not be determined through the connection.

Task-number: QTBUG-44938
Change-Id: I64568aa31113d5a3fd90f70c63320a497db21477
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-01-04 19:47:53 +00:00
Gabriel de Dietrich
c564779c07 Make QPalette::setBrush() check before detaching
Setting the same brush on the same group and role should
not detach nor alter the result of QPalette::isCopyOf().

Task-number: QTBUG-56743
Change-Id: Ic2d0dd757d703b01e8c5d835a8c124b3317653f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-04 18:59:35 +00:00
Liang Qi
79dfc08437 Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: I644cd82b0d952b7d139e0228bf5017f147db77e7
2018-01-04 19:49:26 +01:00
Liang Qi
4ef667d200 Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I3fa5c9e216201bdf7da260c395f65d7fb95cba0b
2018-01-04 17:24:18 +01:00
Albert Astals Cid
6efbd4381a CUPS: Fix advanced options cancel of the print properties dialog
When the user changes the advanced settings we call
setProperty PDPK_PpdOption so if the user cancels we
need to set them back to what they were originally

Change-Id: Idd0cb413fb1e68dd28cf66f7f66f7e0afb38393e
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-01-04 13:01:17 +00:00
Albert Astals Cid
030d815eb8 Refactor QPPDOptionsModel a bit
Make the members private and add getters
Make some other functions also private
Move setCupsOptionsFromItems from QPrintPropertiesDialog to QPPDOptionsModel

Change-Id: Ibb555a6e6be53550f30c159c3ad611d55e2a767a
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-01-04 12:54:53 +00:00
Martin Smith
8700c4dba7 doc: Correct remaining qdoc warnings in qfsfileengine.cpp
Removed a dupicate qdoc comment.

Change-Id: I43214c63bda3dd3ff398b173472306955f8a72b7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:51:51 +00:00
Martin Smith
68c432f90c doc: Correct qdoc warning in QVariantAnimation
Added missing template clause to a template friend function
of class QVariantAnimation.

Change-Id: Ia96dcbb1dad1f6678642564a55991445d0b6ba0e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:51:36 +00:00
Martin Smith
38cfda3c82 doc: Correct remaining qdoc warnings in qmetaobject.cpp
clang required adding template clauses to a few \fn commands.

Change-Id: I4e875f719ed58901d227fb0e6b80d4551f3b6e89
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:51:23 +00:00
Martin Smith
0a383146c5 doc: Correct remaining qdoc warnings in qvariant.cpp
clang required adding template clauses to several \fn commands.

Change-Id: I1ee9855c626b41e499392c05160df01daa5c0618
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:51:09 +00:00
Martin Smith
c2b4681493 doc: Correct remaining qdoc warnings in qtimer.cpp
clang required adding template clauses to a several \fn commands.
There was also a case where Q_QDOC was changed to Q_CLANG_QDOC
in qtimer.h

Change-Id: I1184e507a3fa719fe5049ade80e5da24f52ac851
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:50:55 +00:00
Martin Smith
58a47ccfe5 doc: Correct remaining qdoc warnings in qmutex.cpp
clang required adding template clauses to a few \fn commands.
|| defined(Q_CLANG_QDOC) was also added in qmutex.h.

Change-Id: I7e61f460a8f8f15032094fb35c02f73721a5eb8a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:50:42 +00:00
Martin Smith
9e005c9401 doc: Correct remaining qdoc warning in qsignaltransition.cpp
clang required adding template clause to a \fn command.

Change-Id: Ie95a1db90adcc9f6b10a7d2943af574c3b0ce2e2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:50:29 +00:00
Martin Smith
69ad098d17 doc: Correct remaining qdoc warning in qstate.cpp
clang required adding template clause to a \fn command.

Change-Id: Icbe0557f7fa67ba211df5cfbc68baa6cf737d7b1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:50:16 +00:00
Martin Smith
5211f785ff doc: Correct remaining qdoc warnings in qbytearraymatcher.cpp
clang required adding template clauses to a few \fn commands.

Change-Id: I5877c7bebd6a8a7b2630addb656d32e6f2043cf1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:50:04 +00:00
Allan Sandfeld Jensen
f95fbca5f3 Add AVX2 optimized versions of the most basic RGB64 compositions
Speeds up RGB30 and ARGB32-unpremul painting.

Change-Id: I419afdf5c26ceffc0f7557b8f196035056178c9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-04 12:50:01 +00:00
Martin Smith
8ba8efb839 doc: Correct remaining qdoc warnings in qthreadstorage.cpp
clang required adding template clauses to a few \fn commands.

Change-Id: I9972f793b05f423456878514eeaaa19baf8a9785
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:49:49 +00:00
Martin Smith
b09ad740f6 doc: Correct remaining qdoc warnings in qqueue.cpp
Added missing template clause to \fn commands required by clang-qdoc.

Change-Id: I53fe0b2c862cb053119ceab543dacbc4b20466df
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:49:36 +00:00
Martin Smith
8c322c0b2c doc: Correct remaining qdoc warnings in qhash.cpp
Added template clause to several qHash() functions and
created a \typedef comment for QHash::const_key_value_iterator.

Change-Id: Id56191f69bf9f36e606101e46bf1dfa528d88e09
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:49:23 +00:00
Martin Smith
03b226135f doc: Remove duplicate qdoc comments in qiterator.qdoc
The incorrect ones had been removed already, but they
reappeared after a branch merge, I think. This update
removes the old ones again.

Change-Id: Ief971819651fa3517f374d9f226c68bf7f015cb0
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-04 12:49:10 +00:00
Martin Storsjö
2873b1bdf0 windows: Link to libversion.a with a lowercase name
MinGW's headers and libraries are lowercase, and MSVC is generally
run on a case-insensitive file system. Referring to libraries with
a lowercase name is more compatible.

This fixes cross-building using MinGW, and matches a similar
change for headers in dfaa32a945.

Change-Id: I728376f239a23c700416643cae98e271bbcdff32
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-04 09:03:10 +00:00
Jake Petroules
175d691fa3 Fix the iOS/tvOS platform plugin build on tvOS
This fixes a regression from ba44cdae38.

Task-number: QTBUG-65516
Change-Id: I989b075d3f96170660042349437e4a6a4a115cf9
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-01-04 06:45:23 +00:00
Gatis Paeglis
209d8f10e4 xcb: fix and optimize QXcbConnection::xi2SetMouseGrabEnabled
What was broken:

- m_xiGrab on successful ungrab (XIUngrabDevice) was never set to 'false'.
Which means that we would unnecessarily call XIAllowTouchEvents, even when
we are not grabbing (this did not have any apparent side effects).

What was non optimal:

- Redundant XIQueryDevice calls. XIQueryDevice with XIAllMasterDevices flag
already returns all required devices. Calling XIQueryDevice for every id again
does not make sense.

- Querying for master pointer info on every grab is unnecessary. Simply cache
ids of master devices whenever hierarchy changes.

What remains to be investigated some time later (or never):

The original and the re-factored code grabs all master pointer devices. Not
sure if that is the expected behavior on MPX (Multi-pointer X) systems. Could
there be two context menus, each dismissed separately? MPX concept was introduced
in XI2.0, but testing shows that this setup is not very well supported even on
modern desktop environments. Tested on Ubuntu 16.04, where multiple pointers is
enough for crashing a terminal. Also AFAIK there isn't any bug reports about
broken MPX support in Qt.

Change-Id: I53f99c6efd44abc43a0985e15cff8aae7ebba8f1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-01-03 09:24:28 +00:00
Christian Ehrlicher
2dedf75819 QTreeWidget: fix visualItemRect()
QTreeWidget::visualItemRect() returned an invalid QRect when a column
was moved and then hidden (or the other way round). The reason was that
the logical index returned by QHeaderView::logicalIndexAt() was again
passed to QHeaderView::logicalIndex() to create the QModelIndexes needed
for QTreeView::visualRect()

Task-number: QTBUG-28733
Change-Id: I8676f21bcab8c05c2260b85d483902f18cbf3e24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-01-03 07:53:41 +00:00
Christian Ehrlicher
a13a0024d6 QToolButton: adjust menu indicator in RTL-mode
The menu indicator was not adjusted in RTL-Mode to be on the left side
of the text. Use visualRect() to adjust the rectangle before drawing
the PE_IndicatorArrowDown.

Task-number: QTBUG-50084
Change-Id: I20129499f111d06637c98ede23b4635a3fc34a6c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-03 07:53:33 +00:00
Christian Ehrlicher
fb58845d8f QItemViews: Add ability to show QJsonValue::Bool/Double
Q(Tree|Table|List)View was able to display a simple
QJsonValue::String, but not QJsonValue::Bool/Double. This
is an inconsistent behavior which is fixed with this patch.

Task-number: QTBUG-65082
Change-Id: I22c2fe2890f11e283cae4f7ea947aa67ff36f367
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-03 07:53:26 +00:00
Lars Knoll
41b4e154d6 Update Text segmentation and line break data to Unicode 10.0
Also adjusted the text segmentation and line break algorithms
so that they can handle the new data, and pass the test suite.

Change-Id: Ib727fd80003e34e96458d7a681996de3fa3691e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-01-03 07:47:26 +00:00
Lars Knoll
8bfabb34de Update most Unicode data to version 10.0
The text segmentation data is not being updated in this change,
as it requires additional code changes. Updating those will
come in a follow-up commit.

Change-Id: I5d6b6bc96044e8dd0c25cf6f79756e7f68bf6e7c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-01-03 07:46:31 +00:00
Lars Knoll
2b2b9c9962 Update QString::isRightToLeft() to take directional hints into account
Make sure we properly handle both directional embeddings as well as
directional isolates to determine the direction of the string.

According to the latest version of the Unicode bidi algorithm,
parts of the string contained inside an directional isolate is
to be ignored when determining the paragraph direction. Embedding
markers themselves are to be ignored as well, but not the characters
inside an explicit directional embedding or override.

This is also some required pre-work to get our BiDi algorithm
updated to the latest version of the standard.

Move the implementation to QStringView and implement the methods
in QString and QStringRef through that implementation.

Task-number: QTBUG-57743
Change-Id: I7f24e09198e22d6359c6534c9ae40a904e94c46e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-01-03 07:46:20 +00:00
Thiago Macieira
624a186295 Correct "developer-build" in QtTest black list features
Q_AUTOTEST_EXPORT is *always* defined.

Change-Id: I39332e0a867442d58082fffd150560a6042056fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-02 21:48:42 +00:00
Thiago Macieira
9464b7aa93 Update MSVC versions because 2017 is 19.11 too (and 19.12)
So invert the list and let "msvc-2017" be the latest, at least until we
know about a different version.

Change-Id: I39332e0a867442d58082fffd1504c316e27f51d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-02 21:48:35 +00:00
Christian Ehrlicher
631c64582e QTreeView: Fix QTreeViewPrivate::itemAtCoordinate()
QTreeViewPrivate::itemAtCoordinate() did not calculate the correct item when
non-uniformRowHeights is enabled and vertical scroll mode is ScrollPerPixel.
This results e.g. in an activation of the item above when the click happens
on the very first pixel line of an item. Another, more problematic effect was
that once a drop happened on the very first line of an item,
QAbstractItemViewPrivate::dropOn() calculated the root as the drop index
because the visualRect of the calculated item is compared with the drop
position which did not match.

Task-number: QTBUG-57538
Change-Id: If89571bf0fb76fc01d60ba7139f1d985b49d70db
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-01-02 19:35:47 +00:00
Shawn Rutledge
4f76c2dbad Cocoa: make "Send correct mouse buttons for tablets" optional
Add an env variable QT_MAC_TABLET_IGNORE_BUTTON_MAPPING which, if set,
reverts to the old behavior.

The issues that it fixes are:
1) With a Genius tablet, it's not possible to generate a middle-click
at all, regardless of preferences, unless you set this variable
2) With a Wacom mouse (passive mouse used with an Intuos 3), the
side-buttons (normally mapped to forward and back buttons) do not
work unless you set this variable

[ChangeLog][macOS][Tablet support] If you have changed
the button mapping of your Wacom tablet in System Preferences,
it will be respected in Qt applications.  To revert to the
old behavior, set the environment variable
QT_MAC_TABLET_IGNORE_BUTTON_MAPPING

Task-number: QTBUG-57487
Task-number: QTBUG-54160
Change-Id: I0a1c9c6550e4dfe6ee2daa2d993f22691430826c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-02 14:47:05 +00:00
Simon Hausmann
997dd020c1 Fix source code file permissions
Fix permissions after commit ffc8409aa5 -
our source files are not executable.

Change-Id: Idc5103704256b6f73857b645c323492beaabe879
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-02 14:46:47 +00:00
Martin Smith
f28ef0eca9 doc: Correct remaining qdoc warnings in QRandomGenerator
Due to the integration of clang in qdoc, several qdoc warnings
appeared for class QRandomGenerator. This update corrects all
the remaining qdoc warnings.

Change-Id: I92fe9f7d9cb193e145ee8ad0e7198625b9a5bf7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-02 14:17:38 +00:00
Friedemann Kleint
15adf3a652 QtGui/Windows: Fix restoring of changed cursor in restoreOverrideCursor()
Unconditionally apply window cursors restoreOverrideCursor() also for
platforms with override cursor capability in case
a cursor was changed while the override cursor was active.
Amends b05d1c2ebf.

Task-number: QTBUG-65001
Change-Id: I7fd38a27dcf045f2fb48a16abb484342feaab5df
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-01-02 10:07:45 +00:00
Liang Qi
9de26a630f Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev 2018-01-02 09:32:37 +00:00
David Faure
bb6f0a5291 QMimeDatabase: only export var for unittests if QT_BUILD_INTERNAL
Change-Id: I7fa25b64cf39667c8cea95431f68baab623c8a2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-02 09:31:37 +00:00
David Faure
739611221c Add QHeaderView::setFirstSectionMovable(), useful for flat treeviews
QTreeView makes columns movable except for the first one
(since Qt 5.0, see commit e0fc088c0c). This is indeed best
for actual trees, but not when using QTreeView as a flat
multi-column list (with no "root decoration"). Then it should
be possible to move the first column.

[ChangeLog][QtWidgets][QHeaderView] Flat treeviews can now allow
the user to move the first column (like in Qt 4.x) using the new
method QHeaderView::setFirstSectionMovable().

Change-Id: I6b5025e40850bf5c4c373124ee81f657f3f09d29
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-01-02 09:31:11 +00:00
Lars Knoll
0f315adf91 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	.qmake.conf
	sc/corelib/io/qfsfileengine_p.h
	src/corelib/io/qstorageinfo_unix.cpp
	src/platformsupport/eglconvenience/qeglpbuffer_p.h
	src/platformsupport/input/libinput/qlibinputkeyboard.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/ios/qiosscreen.h
	src/plugins/platforms/ios/qioswindow.h
	src/plugins/platforms/ios/quiview.mm
	src/printsupport/dialogs/qpagesetupdialog_unix_p.h
	src/printsupport/dialogs/qprintpreviewdialog.cpp
	src/printsupport/widgets/qcupsjobwidget_p.h
	src/widgets/widgets/qmenu.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
2018-01-02 09:58:44 +01:00
Andy Shaw
a899e45495 DB2: Pass on the native error codes to QSqlError
Since DB2 can potentially have more than one error code, we need to join
these together using ';' as a separator.

Task-number: QTBUG-142
Change-Id: Idd376df84a8e3ae4c05b4722b4d0020fa4f3edad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-02 08:51:06 +00:00
Andy Shaw
9b361f0e90 Return an invalid QSqlDatabase when accessing from another thread
QSqlDatabase objects can only be used in the thread that the connection
was opened for. So if the driver was created already then we check if
the thread is correct. If it is not then we output a warning and return
an invalid QSqlDatabase.

[ChangeLog][QtSql][QSqlDatabase] QSqlDatabase::database() will return
an invalid QSqlDatabase if the calling thread does not own the requested
QSqlDatabase.

Task-number: QTBUG-216
Change-Id: Ib5a25aa62129e3925f9819109af05961e5178bc5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-02 08:49:40 +00:00