Commit Graph

37794 Commits

Author SHA1 Message Date
Tobias Hunger
b7b4af575f CMake: Simplify Feature handling
Simplify the scope handling of features by providing a function that
just pushes all QT_FEATURES into the parent scope. Use it.

Change-Id: Ic6552fe495394d73fcec6becf6852745ec2d6d59
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 15:01:58 +00:00
Tobias Hunger
da7811dc75 pro2cmake: Explicitly handle for loops
Handle for loops by ignoring them:-)

Change-Id: If4716e0615f4a0fa982281b94dbd4f70ae868fd8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:58:38 +00:00
Tobias Hunger
ead9c0b1b8 pro2cmake: Handle Statements before Scopes
This fixes among other things the unit tests.

Change-Id: If9e23735d1d52cf49dc1f03749129fd726e8dea5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:58:12 +00:00
Tobias Hunger
187c466d9a pro2cmake.py: Improve debugging off included files
Change-Id: I1007a5134a3d3e9ca7e5d3cd9b23ad64f76602be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:57:48 +00:00
Tobias Hunger
41eabf01c4 pro2cmake.py: Make handling of TEMPLATE more robust
Change-Id: I43b6dac3984b66585408c9fb91ae28c5b134fe40
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:57:40 +00:00
Tobias Hunger
96ddd79b03 CMake: Handle '-' better in pro2cmake
Do not fail on tests/benchmarks/benchmark.pro.

Change-Id: I0ffdf9d38ea6fa73856f33d44c5a428c9cab9107
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:56:23 +00:00
Tobias Hunger
f3cf1a6856 CMake: Improve handling of qtHaveModule in pro2cmake script
Map "qtHaveModule(foo)" in qmake to "TARGET Qt::Foo" in cmake.

Change-Id: I63c251f0f2dfd2e95adc996a83b528e9b4e9636e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:55:59 +00:00
Tobias Hunger
5869195a9a CMake: put linebreaks into module path setup
Change-Id: I68a1bbfd9f936a408e304fdae47fb42f72d6db46
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:55:20 +00:00
Tobias Hunger
3b74e0cc0b QtFeature: (Re-)evaluate QT_FEATURES based on cached values
(Re-)evaluate QT_FEATURE_* based on the corresponding cache values
named FEATURE_*.

Change-Id: I57e76af90221937e45979a6d0c366923983ca7d5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:55:04 +00:00
Tobias Hunger
86098596ca QtFeature: Prefix temporary values with _
This gets makes it easier to see the QT_FEATURE_foo variables;-)

Change-Id: Ide9354d90eecdb15d6d5cec7c2bfb9cee348fb29
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:54:56 +00:00
Tobias Hunger
ec510d0ebc Store QT_FEATUREs that are not emitted
Store QT_FEATUREs that are not emitted, but do not show them in the UI. Also separate
out the UI (FEATURE_foo) from the internal CMake value (QT_FEATURE_foo). This does
break the overriding of settings, but that did not work well before either. This
will be fixed in follow-up patches.

Remove fallout: xkbcommon_system was now evaluated where it was not before. Remove
it as that is always the case now.

Change-Id: I2d303827a1cc9afeef93ad73285a2043ddaa9766
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:54:48 +00:00
Tobias Hunger
465da04bcb Build and test QtConcurrent
Change-Id: I2d4b64d3e9b2cb22c67ce462155e73b5d600fb32
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:50:17 +00:00
Tobias Hunger
f43667a6a1 Tests: Use TARGET over features to decide which tests to run
Change-Id: I57642907c2e8e5e1424c5b70a905a2b26b93df88
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:50:07 +00:00
Tobias Hunger
60d7331f93 Build qlalr
Change-Id: I81d69e6f79027f0811174db261c4d9e071852606
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:57 +00:00
Tobias Hunger
0ec6b3049b Add linuxaccessibility support
Change-Id: I6766756e58cadf2d3f13331f4a453123ea575c6f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:49 +00:00
Tobias Hunger
b102b41be7 Add ATSPI2 library support
Change-Id: I304ba2b9df65008340b698eb3a74dc3b4abfb826
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:38 +00:00
Tobias Hunger
b5aaea7998 Support dbus adaptors and interfaces
Change-Id: I06ffff19574bbb8df79adabfcc447acff09d7ecf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:30 +00:00
Tobias Hunger
e3f047f1cd Build qdbusxml2cpp and qdbuscpp2xml
Change-Id: Ic14eb1d3608608d00836b216969acb4ed017b678
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:20 +00:00
Tobias Hunger
6456d9e14a Rerun configurejson2cmake after rebase on top of newer dev
Change-Id: I1af79e5c87bb17e9145f817d2488c6d24531a2fc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:12 +00:00
Tobias Hunger
6ae0821a09 configurejson2cmake: Sort library map
Change-Id: Ifb8aa5f1583592a9eb71a93973f17d9714628953
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:03 +00:00
Tobias Hunger
8cea61e14d QtPostProcess: Fix generation of *Depends header files
Normalize Qt module names before trying to match them. Deduplicate the
names while at it.

Change-Id: I5821c34fe5904cf9e9b986ac3ae4af2b248466b7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:48:55 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +00:00
Tobias Hunger
345e6b0213 Set qlogging test helper executable name via define
In the cmake port the helper executable may have a different name.

Change-Id: I0af68e73253c7f0e6680ca6f10a6ae25e336e923
2018-10-24 15:18:44 +02:00
Martin Smith
5ea233ca67 doc: Remove indistinguishable declaration
QTimer contains a template member function callOnTimeout(), which accepts
a variable number of arguments. Because it is difficult to document such
a general function, several specific declarations were added under the
guard Q_CLANG_QDOC that represent the typical ways this function is used.
They are easier to document because they have specific signatures.

Unfortunately, the clang parser recognizes two of them as being the same,
so this change removes one of the two. It also adjusts the documentation
of the remaining one so that it indicates both uses.

Change-Id: Ifa7bed9093bd1491b7bfe154990864454885c003
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-10-23 15:08:00 +00:00
Ryan Chu
0107b695f0 Make sure docker machine is both created and running before test
Before reading the configuration of a docker machine, the machine shall
be created and started. Otherwise, the docker command will complain
about "cannot connect to the Docker daemon".

If the docker machine has not been created, the make check will be
immediately terminated, and then print the error message. If its status
is not running, the machine will be turned on by a start command.

Change-Id: I7f4c322e7bdf29e4e4203e0e1bbc2e5c8cf677be
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-10-23 05:26:31 +00:00
Ivan Komissarov
17f4adfe18 Use std::unique_ptr for memory management in QMimeDataBasePrivate
This change simplifies memory management as long as it doesn't requires
manuall calls to qDeleteAll and manual deleting/nulling pointers.

Change-Id: Id0dc563d0b1e74ae33939d90d4b39999020cd7ce
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-10-22 16:24:40 +00:00
Edward Welbourne
6c543879a3 Avoid races on TZ in environment via tzset() calls
POSIX specifies that tzset() consults environment variable TZ and
modifies some globals; it also specifies mktime(), localtime() and
strftime() to behave as if they called tzset().  Fortunately, we only
call strftime() from a test and only call localtime() when not
threaded.  Provide wrappers for tzset() and mktime() that share the
lock used by our environment-access code, to prevent races on the
environment (and tzset()'s globals) when we call them.

In the process, re-use tst_QDateTime's TimeZoneRollback in its older
test systemTimeZoneChange() and presume that this can now be tested
cross-platform, since TimeZoneRollback is used in another test where
this works.

Fixes: QTBUG-71030
Change-Id: I79f559b8857ea2803e73501008bf0d7158c6731f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-22 10:07:01 +00:00
Christian Ehrlicher
a7518a11b6 Mark deprecated functions with QT_DEPRECATED
QWidget::isEnabledToTLW() and QApplication::setKeypadNavigationEnabled()
are deprecated for a long time but not marked as deprecated. Therefore
add QT_DEPRECATED and guard them with QT_DEPRECATED_SINCE(5, 13).

Change-Id: I12a76597aaad71025e4b7ad251dd67be55f8f966
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2018-10-21 06:44:20 +00:00
Christian Ehrlicher
54e74c515c Itemviews: mark some functions as deprecated
Mark some long deprecated functions as deprecated so they can be removed
with Qt6.

Change-Id: I2ccd21c829c954b6a3662799070682dbe71fd693
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
2018-10-21 06:43:43 +00:00
Frederik Gladhorn
64f6169f61 Warn when setting a completer on non-editable QComboBox
This is not valid, but was confusing before and would be silently ignored,
warn instead.

Fixes: QTBUG-50583
Change-Id: If78c4a5ef96c76e1d5116a1bd24e5c289ff74cc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-19 08:11:27 +00:00
Frederik Gladhorn
f5962d05d3 Remove skip from tst_QWidget::updateWhileMinimized
This test works for me with KWin and is blacklisted on most linux platforms.
Let's try to remove the blacklisting next.
Using qWait right in front of the QTRY_VERIFY does not add any value.

Task-number: QTBUG-26424
Change-Id: I2dcd5fb3f3cbb64e190c777231b791d1ad9dd704
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-19 08:11:11 +00:00
Ryan Chu
c99b8a3f41 Docker-based test servers for network-related Qt autotests on macOS
There is no docker bridge on macOS. Docker document recommends using
port mapping to connect to a container; but it causes a port conflict
if the user is running a service that binds the same port on the host.
An alternative solution is to deploy the docker environment into
VirtualBox and use the host network option.

Task-number: QTQAINFRA-2293
Change-Id: I05dc65c5f8b4be7a1b1874a4ec7c034cc68679ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-10-18 19:22:46 +00:00
Ryan Chu
0d4d06647a Use environment variable to configure the interfaces of a Dante server
The internal and external keywords in the server configuration are used
to specify the network interface (IP address) that the Dante server
should bind to. Because docker-compose allows a container to join more
than one network (by adding multiple entries under the top level
networks key to a docker-compose file), the default server
configuration (danted.conf) shall be updated in accordance with the
settings in the docker-compose file.

The user can pass the setting of a docker-compose file to containers by
adding environment variables in the docker-compose file. After the
container gets created, the danted.sh script uses the input environment
variables to overwrite the default value of internal and external
interfaces before starting the Dante server.

environment:
    - danted_internal=eth1
    - danted_external=eth1
    - danted_auth_internal=eth1
    - danted_auth_external=eth1

Change-Id: I7c65cdd136ba5dac387bee5e22e1f4335e960101
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-10-18 13:18:29 +00:00
Christian Ehrlicher
aaae027435 Qt Style Sheets: fix range of hue in hsl/hsv functions
The hue parameter in hsl/hsv was treated the same way as a the other
parameters although it's range is from 0-359 and not from 0-255.
Fix it by extending the maximum range for the first parameter when
parsing a color value given in hsv or hsl.

[ChangeLog][QtGui][CSS] Fix the range of the hue parameter when parsing
a color given in hsl or hsv

Fixes: QTBUG-70897
Change-Id: I9ffa65a89c0abcca62bae35777ca1cbde3375180
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-18 06:36:28 +00:00
Christian Ehrlicher
d65631daa4 Qt Style Sheets: add support for hsl(a) colors
The Qt stylesheets color property did not support hsl or hsla although
CSS 2.1 does support it. Since QColor natively supports this color model
only the color parsing needed to be adjusted.
This also adds some stricter checks for a valid css color definition and
prints a warning about the issue.

[ChangeLog][QtGui][CSS] Added support for hsl/hsla colors

Fixes: QTBUG-58804
Change-Id: Ief65a36a7e0ed0d705dc1fe5a8658e8d07fe9a13
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-18 06:36:23 +00:00
Frederik Gladhorn
4afd9234c2 Let QApplication emit paletteChanged
Only QGuiApplication would emit the signal. Untangling the duplicate
code is rather non-trivial, so left alone for now.

Fixes: QTBUG-71186
Change-Id: I4021e3b9ff39718562f4fa3a03c092436b559e9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-17 14:47:16 +00:00
Frederik Gladhorn
ccb396b401 tst_QStyleSheetStyle: use QString() instead of ""
Change-Id: I3bb375108b57059c4fb4f10342f532e20e78c152
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-17 14:47:14 +00:00
Mikhail Svetkin
b472e73b02 qdbuserror: Use qOffsetStringArray instead of script generated code
Change-Id: I2498702bcf4706cb717a7481cf6f81ceebb29ae8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-16 18:32:18 +00:00
Martin Smith
0014d81b19 doc: Revert to documenting the actual functions
A few member functions of QCborValue and QCborValueRef were given special
declarations for qdoc to see so that they could be documented as a single
function, but because clang is now used to parse c++, the special declarations
caused parsing errors.

The declarations for qdoc are removed in this update, but the functions are
still documented with a single comment by grouping the \fn commands for the
similar functions together in the single comment.

Change-Id: If97ee2f2bfcd045d2259a4375b31b8884eeb1072
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-10-16 15:55:26 +00:00
Anton Kudryavtsev
5ab9451846 QPixmapFilter: some cleanup
Use unique_ptr instead of plain array. No need to call 'delete'.

Change-Id: Ia77f4f209b1fd83391428d8b82b7acbba48781b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-16 15:27:34 +00:00
Frederik Gladhorn
eb4d39ada0 Remove separation of headers into two lists
This doesn't add any value and just complicates things.

Change-Id: I3a011174e330f212eda99371d2806517ceec45d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-16 14:42:44 +00:00
Mårten Nordheim
13d86d692f Ssl: move _q_makePkcs12 into shared file
It's needed to generate a pkcs12/pfx bundle from our
certificate chains which are then imported into a certificate
store in Schannel and then passed to various Schannel API.

Change-Id: Idb88f42f2aa15eb91c52404ee6c57bf43e983379
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-16 10:45:48 +00:00
Mårten Nordheim
1859a76090 tst_QSslSocket: deduplicate datatags and don't cast to int
Some of the enums were cast to int on comparison. That just makes it
harder to know what the values were.

And verifyClientCertificate had 4 cases which were named the same as 4
others.

Change-Id: I09e8e346a6f416236a92073cf9a8f349938d37ef
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-16 10:45:41 +00:00
Liang Qi
af6d4d0687 Bring QTestPrivate::checkBlackLists() back
This change partially reverts 641eb4a965.

Task-number: QTBUG-71141
Change-Id: I423332cc89db4b8137e71fdd57798039d429d0d2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-10-15 17:30:57 +00:00
Joni Poikelin
d88c65a532 Qt 6: Change QMainWindow::toolBarArea to take const pointer instead
toolBarArea took non-const even though const would have been enough.
In the public API do this for Qt 6.

Fixes: QTBUG-45953
Change-Id: Ic99f4dd5a7f344d49d046e3b084b68120f8de3c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-15 12:30:04 +00:00
Simon Hausmann
c9aeb73fd1 Fix build with no-cast-from-ascii
Change-Id: I720ceb4e511c914b924c473470f65b5b248f682a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-14 09:19:18 +00:00
Simon Hausmann
38ead1f24f Fix build without PCH
These inclusions are necessary when compiling without pre-compiled headers.

Change-Id: I4345ad3f6882046e4b8f2ba9d315299e280c9f18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-13 18:34:51 +00:00
Christian Ehrlicher
daba850df8 QTreeView: small optimization in verticalOffset()
When the scroll mode is ScrollPerItem and uniformRowHeights is not set,
the offset has to be calculated by iterating over all items.
Optimize the loop by calculating the last item before the loop instead
of checking at every iteration.

Task-number: QTBUG-61763
Change-Id: I1d4439fe0fc3f32194f5f368c0486e793048d965
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
2018-10-13 10:51:31 +00:00
Christian Ehrlicher
2672a9a767 QWidget: set brushOrigin in paintBackground() only when really needed
When painting the background for a QAbstractScrollArea, the brushOrigin
was calculated for every brush type although it was not needed. Since
this can be very time consuming (e.g for a QTreeView with non-uniform
row sizes) it should be avoided when possible.
Therefore check if the brush is a texture and skip the calculation if
it is not the case. Also do not restore the old brushOrigin since the
painter is not used at all afterwards.

Task-number: QTBUG-61763
Change-Id: I66cbe1b796cb5cad4c78e656fb86d199d8e4bde9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-13 10:51:26 +00:00
Qt Forward Merge Bot
fedcaf0256 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I2715ee7c694e5579bcedc7bab0ae68e79d5fd0b6
2018-10-13 00:07:20 +02:00