Commit Graph

48295 Commits

Author SHA1 Message Date
Edward Welbourne
e0ff15ffd8 QCalendar: use LGPL like everything else, not GPL
Pointed out by Lars.

Change-Id: Idb8427d77b35c84eb3037703957cf7f93ea5f387
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-27 09:31:48 +02:00
Johan Klokkhammer Helsing
400fb27208 Use WAYLAND_DISPLAY and DISPLAY instead of XDG_SESSION_TYPE
XDG_SESSION_TYPE is a non-standard part of systemd, and not set if you
run a compositor from the command line, for instance.

[ChangeLog][Wayland] XDG_SESSION_TYPE is no longer used to determine which
platform plugin to use. Instead, if WAYLAND_DISPLAY is set in the environment,
wayland is used. Similarly, if DISPLAY is set, xcb is used. If both are
detected, wayland will be attempted first, then xcb.

Gnome-shell is still skipped for automatic wayland detection.

Fixes: QTBUG-75732
Change-Id: Ieed123330662dc29eafa31148a9b99ba0810de90
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-09-27 09:30:53 +02:00
Edward Welbourne
8e15b2ac5e Remove QNX/Blackberry-related qpps* files from corelib/kernel/
They appear to be no longer in use.

Task-number: QTBUG-85700
Change-Id: Id4c134b99372ccb26eead2a033d99196778c418e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-09-26 21:31:03 +02:00
Friedemann Kleint
d37b353e5d Windows Vista/XP Styles: Clean up some code
Remove public constructor of QWindowsXPStyle since it
cannot be instantiated via style factory since 5.0.
Remove overridden functions that merely call the base implementation.

Change-Id: I3b2998115c4ab65fabf3744874bc3a69a1f5e5b0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-26 20:07:59 +02:00
Friedemann Kleint
18bd226564 Fix compilation of some manual tests
- qtabletevent/device_information
- dialogs
- windowflags

Change-Id: Id3e4b2aec2a873b00dcda39fb1227b24832181ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-26 19:53:54 +02:00
Allan Sandfeld Jensen
b0b4fcd05c Preserve formats in QImage::scaled()
Do not always use the smoothScaled routine, the normal routines are
also optimized, and do not convert to alpha formats when not necessary.

Task-number: QTBUG-49719
Change-Id: I6ee9b620cc259472c419e7363357f41ce29b594a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-09-26 18:49:10 +02:00
Assam Boudjelthia
45896797c6 CMake: use ANDROID_SDK_ROOT instead of ANDROID_SDK consistently
Make the use of ANDROID_SDK_ROOT consistent.

Task-number: QTCREATORBUG-24678
Change-Id: If967bdc4d252996098fa210cf38429fe075eacb1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-26 16:43:02 +00:00
Assam Boudjelthia
5a158a9512 Android: allow Android app building to use java 8 features
Enable Gradle builds to use Java 8 features like lambda expression by
default.

Task-number: QTBUG-86282
Pick-to: 5.15
Change-Id: Ib497b8a789690fcca6e13ea4995e5966331c6c0d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-09-26 19:43:00 +03:00
Volker Hilsheimer
d26fe3c5d6 Don't error out when configuring Qt on a headless system
Configuring and building Qt should not require a running dbus session bus.
However, when building the html_docs target on a headless system, qmake bails
out with error if dbus is linked in, while only showing a warning if it's not.

This is unnecessary. We can warn in both cases, build the tests with dbus
linked in. Running the tests will fail if there is no session bus, ie.
tst_QDBusConnection_Delayed::delayedMessages fails with

QVERIFY(session.isConnected);

Pick-to: 5.15
Change-Id: Ia6b6e226398e87880449b003d28dfd76553bee2c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:36:13 +02:00
Volker Hilsheimer
c1fddbbd58 Fix qdoc warnings from references to removed APIs
Change-Id: Id41052be0878715eda4879fcd3171a30ddd5a9a7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:36:03 +02:00
Volker Hilsheimer
0ebe1708e2 Fix qdoc warnings in QStringView
Fix prototype of template member function, and fix see-also reference.

Change-Id: Ibb39925063dfeb3fd511f47a1606a0b243d4c2ef
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:35:48 +02:00
Volker Hilsheimer
02dd77fa80 Fix qdoc warning from QMetaObject
It's QMetaObject::isWritable, not isReadOnly.

Change-Id: I47a0b07a1969740f67c081dade3720890077361e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:35:44 +02:00
Volker Hilsheimer
aa62ee3f9a Fix qdoc warning: QTextBoundaryFinder
Change-Id: Iec38f33519f05b046d6995d6f7eef1557fd5f209
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:35:40 +02:00
Volker Hilsheimer
77d57706ff Fix qdoc warnings: QTextStream manipulators are in the Qt namespace
Change-Id: I55c0c6454e27e0a002021a73f6c1cf8d8ed4d6af
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:35:37 +02:00
Volker Hilsheimer
756104d5e1 Fix some qdoc warnings for QString/View/Tokenizer
Use correct member function prototype, which requires the template declaration.
Remove see-alsos that don't exist.
Document parameters for qTokenize.

Still lots of warnings from QStringTokenizer, due to the inheritance structure
of that template class and the declarations of nested types in undocumented
base classes.

Also, qdoc doesn't seem to recognize training this-lvalue/this-rvalue
declarations for overloads, and considers the second toContainer documentations
to override the first.

Change-Id: Iadf967d3328ddda52b6f66786836853bddeda79b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:35:29 +02:00
Volker Hilsheimer
c2be134d15 Fix some qdoc warnings for QAnyStringView
Change-Id: I62f05fea897effff22e5031f02661c01b2e3c45f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-09-26 14:35:21 +02:00
Julien Schueller
cc6677a6c7 Fix -Wmaybe-uninitialized warnings
Fixes few of these, for example:
qurlrecode.cpp:308:19: warning: 'ucs4' may be used uninitialized in this function [-Wmaybe-uninitialized]
*output++ = ucs4;

Change-Id: Iaf09fa854102c76b51e6e18556c5ef20212e57cf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-26 11:40:21 +02:00
Alexandru Croitor
151323b94b CMake: Add $import_prefix/include as an include path for each Qt module
To support finding Qt headers of modules installed into a different
prefix than the main one, add the $import_prefix/include path as a
public include path for each built Qt module. With this, includes like
 #include <QtNetworkAuth/QOAuth2AuthorizationCodeFlow> will work.

The macOS framework case is handled automagically by CMake, which
ends up passing '-iframework $import_prefix/lib'.

Change-Id: I02ce9cacf157aab9721c1d6073a377607c5b89c7
Fixes: QTBUG-86881
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-26 11:25:20 +02:00
Toni Saario
19d2e61f87 Respect abort testing on failure flag
On regular commits we do not want to waste time running all test if
there is failures.

Change-Id: I050d191058293f4311268169eb26754349930129
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-25 23:31:02 +03:00
Robert Loehning
74146e0102 Avoid heap-buffer-overflow
[ChangeLog][QOutlineMapper] Avoid heap-buffer-overflow

Fixes: oss-fuzz-24615
Pick-to: 5.12 5.15
Change-Id: Ia67e1fb830850d04f068d8b5c009687f3deff156
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-09-25 18:00:49 +00:00
Alexander Volkov
a51b7844ca Stylesheet example: Get rid of auto-connection slots
Change-Id: I55d89cf33e5f9c8aef3a3dfbbdcd212415d35bcb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-09-25 18:04:06 +03:00
Alexander Volkov
065c4021ad xcb: Avoid BadMatch error when creating non-OpenGL window
The Xorg Server requires colormap when creating a window if
the window's parent either has a different visual or has no
colormap. To simplify logic and avoid extra requests, create
a new window with colormap unconditionally.

Pick-to: 5.15
Change-Id: I21a53f9146ae0a03b38bb3a07c8a478043a2eb89
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-09-25 18:03:56 +03:00
Joerg Bornemann
893ee16352 CMake: Fix build of Release user projects against RelWithDebInfo Qt
Building a user project in Release configuration against a Qt built with
CMAKE_CONFIGURATION_TYPES=RelWithDebInfo;Debug led to the user project
being linked against the Debug Qt libraries. This is especially painful
with MSVC where debug and release runtimes are incompatible.

We now create *AdditionalTargetInfo.cmake files along the
exported *Targets.cmake files that set the IMPORT_*_<CONFIG> properties
to the values of the release config Qt was built with.

User projects built with an unknown
configuration (CMAKE_BUILD_TYPE=ArbitraryName) will link against a
release Qt. This can be controlled by setting the variable
QT_DEFAULT_IMPORT_CONFIGURATION to, for example, DEBUG in the user
project.

Fixes: QTBUG-86743
Change-Id: I12c4b065a9845c7317f6acddab46b649f2732c9e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-25 17:02:52 +02:00
Volker Hilsheimer
1e7a52005b QStaticPlugin: Reorder class members
Address ### Qt6 comment.

Task-number: QTBUG-85700
Change-Id: I31b65a76662b3dcdfa1400a3747c2e3c730b5ee3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-25 17:02:51 +02:00
Volker Hilsheimer
51e138b695 Remove traces of QObject::trUtf8 from documentation
... and from the duplicated Q_DECLARE_TR_FUNCTION macro for QXmlStream.
We expect source code to be utf8 encoded in Qt 6, so the function is gone.

Change-Id: Ie25329a54e709dc92a22893ad5ab023852300d81
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-25 17:02:41 +02:00
Laszlo Agocs
7f3b62324e rhi: Switch command lists to QVLA
Change-Id: Ic163533eee973f0ee2f3e2efe25390caa57dd659
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-09-25 14:59:14 +00:00
Laszlo Agocs
63e54fbdfe rhi: gl: get rid of a wrapper QByteArray where a raw ptr suffices
This is a visible performance increase actually, given this is on a quite
hot chode path.

Change-Id: I165bfa0d4e490f80078551efb4bf2fe8e72d3596
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-09-25 16:59:00 +02:00
Laszlo Agocs
80091e0a0f rhi: Skip comparing to this in isCompatible tests
Change-Id: Ie1855f992315f6e02986016a254127cec0ac94c8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-09-25 16:58:59 +02:00
Laszlo Agocs
89f7389494 rhi: gl: d3d: Do not use QByteArray where there is no point
The real benefit in practice is getting rid of profilers going wild
about QByteArray::begin() and similar. The actual perf. gain is
fairly small.

Change-Id: I25e4c762f303b41f0aaf914bc62751f3265d3cf8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-09-25 16:58:46 +02:00
Volker Hilsheimer
cc5287a0a9 Fix qdoc warning and typo in QMetaSequence
There is no parameter called value in removeValueAtBeing/End.

Change-Id: Ife91d2014ea35ea636e9cfb1c815424e5f4ef7a6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-25 13:15:50 +02:00
Laszlo Agocs
8059632fbd rhi: Drop the zeroing out of resource binding structs
This has a non-insignificant cost (since the size is at least 260 bytes)
in renderers that construct a lot of these objects per frame. After
changing the qHash implementation to be lighter we no longer rely on
qHashBits, so zeroing it is not essential anymore. Remove it.

Change-Id: If1fbd8dfd46fb3f0e9ea5a3c4794d24b8aeac1ba
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-25 09:24:42 +02:00
Laszlo Agocs
60871b4fdf rhi: vulkan: Fix mipmap generation for cubemaps
Change-Id: Ia1aab06214be802aaabc97ffefa28947e11148e3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-25 09:24:25 +02:00
Assam Boudjelthia
342a8f29ea CMake: fix minor line indentation
Pick-to: 5.15
Change-Id: I1f064ecb38fcd6b0a59f3eaeb079cabbb7a8029f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-25 10:14:07 +03:00
Cristian Adam
d9d137c8f3 CMake Build: Fix iOS build with PCH and CMake 3.18.3
If a target inherits precompile headers from a different target
that has more languages enabled (CXX, OBJCXX), the target will
depend on PCH artifacts for a language that is not actually
present.

Change-Id: I230f16ee59f2c524a30d41a487093343272722d1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-25 08:59:42 +02:00
Mårten Nordheim
8bcab6d43f qt_add_plugin: Get CLASS_NAME as a one value parameter, add TYPE
I accidentally made the CLASS_NAME a multi-value parameter when adding
it.

Add a TYPE argument, which was likely intended to be there since it is
already used in an android branch.

Change-Id: Ic44dbbaeebc6863a984a7c2effbc00c3c2796b0b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-25 08:59:34 +02:00
Joerg Bornemann
3bbe97b444 CMake: Expose XKB::XKB as public dependency of Qt::GuiPrivate
Headers of xkbcommon are used in private headers, and consumers of
Qt::GuiPrivate should automatically link against XKB::XKB.

Change-Id: I99c67b5f291f64b529aed1499a00a215b5db3be2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-25 08:59:26 +02:00
Ulf Hermann
6b8ee60d8a tst_qmetacontainer: Remove non-existing typeflags.bin from build system
Change-Id: Icb1668493447e478f539016f330fe58c79dde454
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-09-25 08:50:11 +02:00
Allan Sandfeld Jensen
d3643d9690 Use c++20 when available at compile time
Also std::end is constexpr where std::next sometimes isn't always with
sanitizers active.

Change-Id: Ibe4c11eb4945fb286247e841b6a7f6cc3ff1eaa6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-09-25 08:18:03 +02:00
Kai Koehne
01697c5f9b .gitignore: Qt Creator files cleanup
Move Qt Creator files to a common section, like for the other
IDE's. While at it, fix CMakeLists.txt.user*.

Change-Id: I978c5698204c35ef8f14d2261e7875160484d0e6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-25 07:50:15 +02:00
Andreas Buhr
1c883682ee git: ignore CLion configuration files
modify .gitignore file to ignore the '.idea' directory created by CLion.

Change-Id: I63ca2fc8e3710ebcb08e99c7ad89d3bd57721dbd
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-09-25 07:50:10 +02:00
Kai Koehne
f7ee1bfe6b Doc: Update CMake snippets to Qt 6
Change-Id: I53021781a25c141db5d5fc6771192cd8d6ed732a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-25 07:50:02 +02:00
Allan Sandfeld Jensen
c2be9180b7 Replace Q_REQUIRED_RESULT with [[nodiscard]]
It was already used many places directly making the code inconsistent.

Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-25 07:10:45 +02:00
Andy Shaw
31a1b3280c Fusion: Don't add unnecessarily extra padding for a groupbox
If there is not a title or an indicator for a groupbox, then there is no
reason to add extra padding for it when placing the contents of the
groupbox. So this accounts for when one or the other is not set so that
the space is used more evenly.

Fixes: QTBUG-86411
Change-Id: I536798b57e1195c5a13218f1f82431c4e91f6852
Pick-to: 5.15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-25 07:08:47 +02:00
Christoph Schleifenbaum
34b4dc11d9 QFontEngine: Do not call getSfntTable with uninitalized value
On FreeType font engine this results in a call to FT_Load_Sfnt_Table
with a pointer to an uninitialized value passed in as FT_ULong* length,
crashing. Instead initialize value to 0.

Change-Id: I50d6df3b2296a05640d939e862bc50adb0fec921
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit e041f54596)
2020-09-25 05:03:26 +00:00
Joerg Bornemann
dae078e521 CMake: Export 3rdparty dependency find_package calls of private modules
Consider a Qt module with a 3rdparty library target in
PRIVATE_MODULE_INTERFACE, e.g. XKB::XKB in Qt6::GuiPrivate. Consumers of
GuiPrivate automatically depend on XKB::XKB. In order to do that they
must find_package(XKB ...). As all find_package calls for GuiPrivate are
in the same place as the ones for Gui, this package must be marked as
optional. Otherwise all consumers of Qt6::Gui would have to have the
xkbcommon package installed too.

This patch exports find_package calls for every 3rdparty public
dependency of private modules and marks them as optional.

Change-Id: Ia1eeb09c29927fb6634ef08b477684ed6f123267
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-25 06:58:55 +02:00
Shawn Rutledge
1783b048fd Get rid of QMutableEventPoint::stationaryWithModifiedProperty
Omitting stationary points from touch events is such a marginal
optimization that this code probably isn't worth maintaining.
It wasn't implemented correctly this time either, according to the
tst_QQuickMultiPointTouchArea::stationaryTouchWithChangingPressure()
test.

[ChangeLog][QtGui][QPointerEvent] We no longer attempt to avoid
delivery of stationary points within QTouchEvent: every pressed point
is now included in every TouchUpdate event.

Task-number: QTBUG-77142
Change-Id: If1fd666fb3057a17e0dffdd7ca7138693126b02b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-25 06:51:32 +02:00
Friedemann Kleint
aa5f2bf836 qwaitcondition_win.cpp: Fix deprecation warning about QMutex::isRecursive()
Remove the check since a QMutex can no longer be recursive, fixing:
qwaitcondition_win.cpp:164:28: warning: 'bool QMutex::isRecursive() const' is deprecated: Use QRecursiveMutex instead of a recursive QMutex [-Wdeprecated-declarations]

Task-number: QTBUG-85700
Change-Id: Ic1631c1e671cf3234b5823d6d20121d746304c8e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-25 04:40:13 +00:00
Wang ChunLin
789d487cb0 fix QComboBox currentText return placeholderText
If it does not add item,the currentText should return empty string

Fixes: QTBUG-86580
Pick-to: 5.15
Change-Id: I54c3a8b7ececfb1e62bcd7ac592feccaff3f8b48
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-25 10:52:27 +08:00
Wang ChunLin
75ca70288c fix qcombobox code style
modify some code style

Fixes: QTBUG-86793
Change-Id: I263bda1bd16dd34129ea5ae8948ad3eeaf833f3a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-25 10:52:02 +08:00
Volker Hilsheimer
ca6ac03845 Fix some qdoc warnings: undocumented parameters
Change-Id: I5d37f620caccbd1445c99a602b71779bdedd37d3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-25 04:42:27 +02:00