Commit Graph

28045 Commits

Author SHA1 Message Date
Albert Astals Cid
810c5be5be Fix xcb platform linking when compiling the nativepainting code
Change-Id: I9bc435d27bf4abf1ff4cbfebb981ab701a5d17ec
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:28:05 +00:00
Albert Astals Cid
c2511b629a Fix xlib compile test
Change-Id: Ib7d58484ef2bd0f38d3954940e7e527b4f848c4b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:27:55 +00:00
Albert Astals Cid
487adb4d7d Add devicediscovery and fbconvenience
Generated by pro2cmake.py

Change-Id: I405430c622824aab9a7bf6839b2271a494856c24
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:27:45 +00:00
Albert Astals Cid
2ce3f440f9 Allow passing libraries to qt_config_compile_test
Fixes cxx11_future and ipc_posix tests

Change-Id: I0f3a7b1a0452724c07198a87c2fc25344e7451eb
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 09:26:08 +00:00
Albert Astals Cid
bb0deccf19 cmake: Make sure moc/rcc/uic are built when needed
This way you can run cmake, go directly into src/widgets
and it will build moc and rcc before QtCore (because they are needed
there) and uic before QtWidgets but not before QtCore because
it's not used there.

Without this it would get stuck creating the mocs since cmake
is not expecting the moc executable to just not be there

Change-Id: Ibcb6057bfab7a4bf823544e8f7bd128ea93d1986
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-07 09:12:55 +00:00
Albert Astals Cid
6d51f69bbf cmake: Build src/plugins/imageformats
Change-Id: I4bf09c50eebf71255590e9b17e637ce621d3cd40
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:27:27 +00:00
Albert Astals Cid
70419e31f9 cmake: Fix build of xcb platform plugin when vulkan is available
Change-Id: I79760aa0cb08752cfc20aabc1a890f60c91c9dfd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:27:11 +00:00
Albert Astals Cid
773999816e cmake: glib changed name to glib2
Change-Id: I4a86bd3b01e1fe307e9802182df943245a7fce4c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:26:21 +00:00
Tobias Hunger
af285274b6 CMake: Find common frameworks on apple in one place
Change-Id: I38bc631568b438970465a7616464e2b998a74607
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-31 08:55:32 +00:00
Albert Astals Cid
5e339a0f97 cmake: Add trivial FindLibproxy.cmake
And fix link to it

Change-Id: Ie4f29a35a83d19ab83933faf3bcd7d62cffa68b8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-29 15:07:54 +00:00
Liang Qi
4bb44a17f6 CMake: fix build for QtNetwork on macOS
Change-Id: I32e4550d67e9d72b56de4aafaddec5e2f80792b8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-29 09:30:44 +00:00
Tobias Hunger
e2ff9e3b99 CMake: Introduce Q_OBJECT qdoc macro
CMake's moc file scanning is rather primitive: It will run moc on any
file containing a line that starts with Q_OBJECT (and similar macros).

We have four files in QtBase that contain such a macro at the start
of the line in a qdoc comment. These four files were excluded from
automatic moc handling by cmake, which is not ideal, since this will
silently fail when somebody actually adds a Q_OBJECT macro in code.

This patch introduces a macro Q_OBJECT for qdoc. This macro will be
replaced with Q_OBJECT in the generated documentation.  While not nice,
at least a failure to use \Q_OBJECT is noticeable: Moc will warn about
the file.

Change-Id: I829893c1166eee306fe30058d4ea0256affd45ea
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-25 14:33:26 +00:00
Tobias Hunger
6a1ee4de07 CMake: Store Qt features in CMake Cache
This is less self-contained than what we have, but significantly speeds
up cmake configure/generate runs.

This patch also warns when a feature is already defined.

Change-Id: I8cab63e208ba98756b47d362a39b462f5ec55e20
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 16:16:55 +00:00
Tobias Hunger
4f26758978 CMake: Introduce Qt::GlobalConfig to hold the global features
This simplifies the handling of features a bit as it removes the special
code to store two sets of features in Qt::Core.

Change-Id: I536d41cfc76a02af054e3cfbad6bda50b1e9e49a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 08:33:27 +00:00
Mikhail Svetkin
7bc03bca71 CMake: Use WrapRt instead of rt
Change-Id: I98f50a5ee7c3f1707589214df816ed03e0cfa249
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-09 14:24:23 +00:00
Tobias Hunger
99315c2129 CMake: Build PrintSupport module and tests
Change-Id: I7ac14f5214619f547af7221d213ac7e338a05bfc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:05:14 +00:00
Tobias Hunger
e57a94cbd8 CMake: Use AUTOMOC/AUTOUIC/AUTORCC
Change-Id: I0235ca4f227623e5937348b4b010637921dbf154
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:04:59 +00:00
Tobias Hunger
42d6e5c5fa CMake: Simplify
* Only import features once
* Move Core specific code into its CMakeLists.txt file
* More consistently use target names like "Core" to
  refer to "Qt modules". We tend to require either "Core"
  or "QtCore" in places, which I find confusing.

Change-Id: Id54161bc5468412750cb9eb7eeb15de3812e8a09
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:00:21 +00:00
Tobias Hunger
3a8d8344e5 CMake: Merge qt_internal_module_include_dir and qt_internal_module_info
... and fix the fallout of this change. It results in more targets being
passed overall (instead of a strange mix of targets and module names),
so this is a good thing(TM).

Change-Id: I1c4326b80e2c6675356587879ec8471ef7249a50
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:00:11 +00:00
Tobias Hunger
3acebfe6eb CMake: Add support to find LTTng-ust
CMake comes with a Find module for this, so use it in src/corelib/configure.cmake

Change-Id: I8f4abcb32fb10513d67c3c959310eefaf7b56d3d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:25:15 +00:00
Tobias Hunger
eb2ece3c59 CMake: Add FindSlog2
Add FindSlog2 and use it in src/corelib/configure.cmake.

Change-Id: I7e6a696a49df568a41ed1224228ab608db2dbb0e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:24:55 +00:00
Tobias Hunger
38f1a10b6f CMake: Improve handling of the different kinds of iconv
Improve conditions/enable/disable conditions for iconv related features.

These are detected a bit different from what qmake does, so adapt to that.

Change-Id: I7b3e4baf05dc324507f370d7f651a62f29e42a98
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:24:35 +00:00
Tobias Hunger
e11522726b CMake: Add FindPPS and use it in src/corelib/configure.cmake
Find the PPS library and use the result PPS_FOUND in configure.cmake where
needed.

Change-Id: I08d3ace421278dc0ae5c3128d4234e6bca906c05
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:24:17 +00:00
Tobias Hunger
bebbb41030 CMake: Find librt
Change-Id: Ibc39ba7a385146cd0428b78e12a793f0ddbfae91
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-06 15:24:07 +00:00
Mikhail Svetkin
da3c73ad13 CMake: cocoa disable printsupport features
cmake have not built printsupport yet.

Change-Id: I635b4678bbf0b659750e7f6b842834e084b6f3a5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-06 14:33:58 +00:00
Tobias Hunger
806595c5b6 Add Sql build and tests
Change-Id: I9bf7d61a65950eafcfe6b3ea9c437e353ff7b2ed
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 15:45:54 +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
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
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
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
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
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
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
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
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