Commit Graph

34832 Commits

Author SHA1 Message Date
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
Rainer Keller
b03133231b qtlite: Skip building examples when configured with no-feature-udpsocket
Compiling the default examples should be possible without compile errors.

Task-number: QTBUG-46857
Change-Id: Ie323798df09cdbebc67eb617a7e0ec4c66cb2357
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-01-11 12:37:50 +00: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
Liang Qi
d51dde6c67 Blacklist tst_QNetworkInterface::localAddress(linklocal-ipv4) in ci
To unblock qt5 5.10->dev merge.

Task-number: QTBUG-65667
Change-Id: Iffd3648913efb52ad5be9dc5310a9f836fab3de1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-01-10 21:26:20 +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
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
André Klitzing
e56eb33cf8 Enable brainpool curves in qsslkey tests
Change-Id: Ibdc0a045e0b0469bfb4dc362e3bc3e6b7940d783
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-01-10 13:25:25 +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
Giuseppe D'Angelo
ff25a7ec05 QAbstractItemModelTester: fix the autotests
Move the modeltest autotest in the right place, and fix the
other autotests that were using it to use the version now in QtTestLib.

Change-Id: Ic6838945f616d580f357c872ce0956c341be3b16
Reviewed-by: David Faure <david.faure@kdab.com>
2018-01-09 21:12:58 +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
Mårten Nordheim
21c9b6fc58 QSsl* tests: Ensure trailing slash on directory path
Then we don't need to add a leading slash. (minor clean-up)

Change-Id: I86af224841009fda838e7cb89d47d324963328c9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-09 08:52:46 +00:00
Mårten Nordheim
a5c58d503d Revert "Adapt the QSsl* tests to use the resource system"
This reverts commit e1600c1a73.

The commit missed the fact that TESTDATA exists. Which supports
wildcards and then can automatically pick up new files when added (as
long as they match a wildcard) and then you don't need to maintain a
giant qrc file.

Change-Id: Ie31fadb5ef6e8dfe6105f4f9764292f78cffb512
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-09 08:52:41 +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
Jani Heikkinen
907a99f65b Fix license headers
Old header.LGPL21 header was used at some files. Replase those with
new header.LGPL one

Remove old header.LGPL21

Task-number: QTBUG-57147
Change-Id: I650e39024ed4876bba27e954c7d61fdb025b46ef
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-01-09 07:47:20 +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
Orgad Shaneh
af1a179cc8 qmake: Introduce precompile_header_c for MSVC
MSVC requires that the C PCH file is compiled (as an object) and linked if
any C file is found, and the same for C++.

Most qmake projects are C++.

If a C++ project has a precompiled header, it is typically of C++ type, and
cannot be compiled as C (for example, it contains or includes classes).

Since there is no easy way to conditionally build the C PCH file only if C
files are found in the project (as done for g++), we need a setting that is
disabled by default.

This amends 30331afda1.

[ChangeLog][Tools][qmake] Introduced precompile_header_c CONFIG option for
MSVC to enable precompiled header for C sources.

Task-number: QTBUG-65103
Change-Id: Id9688a35ee7d9b5e4f5a846b81986cb674bc5f4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-08 15:02:21 +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