There's like three pages of this when compiling the test :)
Change-Id: I923f2c4f5eff7c709977026666cc5b2a2cbfaa72
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The reverts commit 0624c99ea3, which
fixed a GCC 9 -Wdeprecated-copy warning by adding the copy assignment
operator.
The 5.12 change 0e162315 fixed the same warning by removing the copy
ctor. The merge ef37ab99 removed the copy ctor, but kept the
assignment operator added by 0624c99e, bringing the original warning
back, but with the roles of copy ctor and assignment operator
reversed.
One has to give.
Change-Id: Ib32841df94a5ff80402a68b5fe776eb82e94136f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In a CMake regex, you need two backslashes to escape a character. The
.in file therefore needs four backslashes ...
This amends ba4fdd99ff
Fixes: QTBUG-76698
Change-Id: Ic757354ba596bf020c3ee5e90ee6d2d0fe3ba352
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- Remove virtual from functions declared as override
- Use " = default" for trivial constructors/destructors
- Remove all special functions from QTestLog
Apply Fixits by Qt Creator with some amendments.
Task-number: QTBUG-69413
Change-Id: I812b8116e5b4c927e4e5cee44e63bc705385d866
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Apply Fixits by Qt Creator with some amendments.
Task-number: QTBUG-69413
Change-Id: I620e40a277dc2b20b0ec26fc32577e66b0456bb3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Apply Fixits by Qt Creator with some amendments.
Task-number: QTBUG-69413
Change-Id: Iba0834dc89cbfc215acc5873f31fa6eeed74177d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Change-Id: Ifecb1bac475512241de9bcf195955409bb3adaff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Modified a regular expression in syncqt.pl so that the special case of
a class beginning with another class does not lead to the exclusion of
the first one. This affects the generation of the install target for
generated class headers of Qt modules. Now the expression verifies the
class names are not identical.
Fixes: QTBUG-71323
Change-Id: I210b4d4c3ed64cf189594b95b10aa0e8495a19d2
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Also fix the name mismatch between the Windows- and non-Windows
versions of loadOpenSsl(), which, presumably, were caused by having
two different return values, something easily fixed by defining a
small struct instead of using a QPair.
Some #ifdef'ery saved, and a lot of brittle deletes on early returns.
Change-Id: I77440de2f6fa51759510506ff4ef51917eb5b3ea
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When building Qt, qt_build_config.prf adds all directory variables but
DESTDIR to QMAKE_DIR_REPLACE_SANE. We must not add the content of
QMAKE_DIR_REPLACE_SANE unconditionally to QMAKE_DIR_REPLACE in order
to avoid duplicate entries.
Duplicate entries result in an interesting build folder structure like
.obj
├───debug
│ └───debug
└───release
└───release
This commit amends 274882a5.
Change-Id: Ifa8178410d82f58635babc46d43774bab522fbf8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
A declaration of fromStdVariant() was not visible to qdoc
because it was ifdef'ed out. This update ensures that qdoc
sees the declaration.
Change-Id: I4b00a895aa61175296ec80806b43311eff4f25ca
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
We need localtime_r() in several places. To have this function
declared when including time.h, _POSIX_THREAD_SAFE_FUNCTIONS must be
defined. E.g. qdatetime.cpp includes unistd.h before time.h to define
said macro.
However, this falls apart when precompiled headers are used, because
of the following include chain in qt_pch.h:
qcoreapplication.h -> qobject.h -> chrono -> time.h
This patch ensures that _POSIX_THREAD_SAFE_FUNCTIONS is defined before
including time.h in qt_pch.h by including unistd.h early.
Fixes: QTBUG-76680
Change-Id: I3875072edf37f45492f29d84fc297a9682e11db4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It's not done by toWCharArray. This caused some issues as we were using
API requiring a null-terminator. wcslen for instance was measuring the
string as being millions of characters long, causing fairly quick
crashes when appending.
Change-Id: Iedaaf9f195be22a610543ab649da92a87cb71973
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Factor out a helper template formatting the QCOMPARE failure message
delaying the formatting of the parameters with toString() and use that
for float, double, int and unsigned. This removes the need to always
format and allocate strings for the operands even in the success case,
speeding up the QColor test from 3.3s to 700ms (Windows/release).
Task-number: QTBUG-38890
Change-Id: I999484765bdaed921d3fc35f35a9fbbcd82a9704
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When accidentally running a test doing screen-grabbing
with High DPI scaling active, sizes of the obtained pixmaps
can differ due to the device pixel ratio. Add a check to make that
clearer.
[ChangeLog][QtTestLib] Comparison of QImage, QPixmap now checks for the
device pixel ratio.
Change-Id: Id8d5187e99c565c44a7bfb8b9cfb09737815fb15
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Use member initialization in private classes and repack members to
minimize padding.
Use delegating constructors and default constructors/destructors.
Task-number: QTBUG-76493
Change-Id: Iaea8880811782ee5846c128590b83c23e6fae445
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The users voted for smaller top margin while there was neither title
nor checkbox.
Task-number: QTBUG-44056
Change-Id: I5bd5cabb094c9cdec379f20e206196f1b5432182
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This reverts commit 17512d497d.
Reason for revert: force vmx instructions to Coin level B virtual
Relates to qt/qt5 84ff024609e4eca003c604294b4102e73deba8c3
Change-Id: Id87a5629a5cd6ebc18c676eae390466e280fc600
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
A glass qualifier was missing in a \fn command.
This caused clang to report an error. The class
qualifier is added by this ubdate.
Change-Id: I1c4928183f4c8eb1b28f0fde2ce659a1feb24175
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Use a scope guard to reliably mark the runnable as finished with the
manager, lest a deleted runnable lingers in the manager's
currentLookups for too long/ever.
Change-Id: I89eff49931d0428f4e75789a0a1188edb1f66220
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QChar currently is convertible from nearly every integral type. This
is bad code hygiene and should be fixed come Qt 6.
The present patch is the result of compile fixes from marking these
constructors explicit. As is clear from the distribution of fixes,
only low-level string handling code used these implicit conversions,
an indication that they're not in widespread use elsewhere.
Change-Id: Ief5336f21e6d181e03ab92893b3d13a14adc7cb0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Who knows what this may end up being good for.
Change-Id: Ib5e73b0170ebba54f87f36e75b7c407f801c52a0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I61446afa882304400d3ae8045e4f17bb7a020600
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
The QImageIOHandler::name() has been deprecated since 5.13, but its
overrides weren't. Enabled compilation of the overrides only when the
QImageIOHandler::name() is compiled.
Task-number: QTBUG-76491
Change-Id: I8fea0032427d25bb0de01be8920c723fc21f6b7a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Amends ca280bfe3b and
705e3f68df which added these enums only to
QPlatformTheme::ThemeHint but not to QPlatformIntegration::StyleHint.
Those patches did not add accessors to QStyleHints, probably because
the accessors in QStyleHints use the themeableHint() function which
takes both enums; so to have an accessor implemented this way, we need
it in both enums. But it's getting too silly, since the only platform
plugin that modifies MouseDoubleClickDistance is Android, implemented by
QAndroidPlatformTheme overriding QPlatformTheme::themeHint(), and thus
illustrating that adding the enum to QPlatformIntegration::StyleHint
is not the only way to allow a platform plugin to customize the hint.
So it seems we need a new way of writing these accessors without needing
to duplicate the enum value in QPlatformIntegration::StyleHint. The new
version of themeableHint(QPlatformTheme::ThemeHint) falls back on the
static QPlatformTheme::defaultThemeHint() accessor.
Users should at least be able to see what the default value is; and
having these getters will also provide link targets for QtQuick's
TapHandler docs.
Change-Id: I0f8560062bcd0ca5e6d580071d9fbcf3f07f625f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
These tests have not failed on the removed platforms for at least 60 days
Task-number: QTBUG-76608
Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The code contained a copy of std::any_of from a time when we couldn't rely
it's availability in all compilers. We now can, so remove the copy.
Change-Id: I356077f58ae6a48b71f2dd98a2dab4e2acf985c7
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Simplistic console application with one test for each of the two
classes. Simply tests that we receive the signal when the connection
is disrupted in some way.
This patch also exports the classes for tests/developer builds
so that we can actually link with them.
Change-Id: I8066312274350984110c3f3ad3e94854adca7c2a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Currently not available for mingw because it's missing all the
interfaces. But should start working once it has them.
Change-Id: I231e8b69e008c5300a83087fe9cd071acd0687cb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QNetworkSession has a concept of UsagePolicy which can disable
background* transfers to conserve battery or bandwidth. However, it is
only possible to change the policy through
QNetworkSessionPrivate::setUsagePolicy which currently doesn't have any
callers outside of our auto tests.
*background = transfers not initiated directly by the user, but needs
to be marked as such by the application developer.
Change-Id: I92c4abccaca040612b4795abe7c52d68a2d21749
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QNetwork{Status,Connection}Monitor isn't used for QNetworkReplyImpl yet,
so we should connect the signal until it is.
Change-Id: I40f1483608195418d43c442f46184882f64596ff
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This change will create Config.cmake files for internal modules like
AccessibilitySupport when doing static builds. They need to be
find_package()'ed and linked in when linking in certain qt plugins.
Task-number: QTBUG-38913
Task-number: QTBUG-76562
Change-Id: Ia2e446025c87df48f20bb65cfd9da6c6a4354bb1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Also reduce the pool size from 131 to 17, and use QBasicMutex
instead of recursive ones.
Change-Id: I3bf0374cce5ff2c07427070aba6128a22c9b70e4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The use of QMutexPool caused an #ifdef, because, lacking an object,
some OpenSSL function pointer was used as the address required as
input for the mutex pool. Sadly, the names of the functions differ
between OpenSSL versions, thus the need for an #ifdef.
By simply using a QBasicMutex (defined at namespace scope to evade
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79561), the #ifdef can go
away.
Another level of #ifdefs goes away because, even for
non-QT_CONFIG(thread) builds, Q*Mutex etc are defined, just as
no-ops. So we can freely use them without QT_CONFIG(thread) guard,
unlike QMutexPool.
Finally, optimize for the (common?) case of already-loaded libraries
by making symbolsResolved an atomic variable, and checking that before
taking the mutex (double-checked locking, done right).
For reasons of said GCC bug, again, the QBasicAtomic is defined at
namespace scope. And then move the other boolean there for symmetry.
Change-Id: Ic5f44871fb200e5368b9af327e4d1e852fbc586c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
That's how CommonMark specifies it. The HTML codec-guessing algorithm
was making it fall back to Latin1 in practice, which was screwing up
any Unicode characters found in the markdown source.
Change-Id: I4021adc4a68591ecfd56ef24971af53ce3e9c96d
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This allows to query all names that can be activated on the bus.
Change-Id: I8f894bf858eb18b67a074ca666ad3200ed99c373
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some compilers (hello, MSVC) do not produce literal types in Qt
because their constexpr support has been blacklisted.
Therefore, amend the check for literal types in Q_ARRAY_LITERAL:
only do the check if the compiler supports constexpr.
Change-Id: I7cffe00dde447d975aa6a7d02248df9c351508ff
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
If the filename matches, no other matching is necessary. Fontconfig
doesn't have a fast path for that, so implement one here.
Fontconfig is unlikely to add that fast path, see here:
https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/103
With -O1 builds of Qt and KDE stack, 358 fonts installed according
to KDE systemsetting, on a Ryzen 1800X, startup time of kwrite
decreases as following according to perf stat:
msec task-clock: ~480 ms to ~455 ms
cycles: ~1.73e9 to ~1.65e9
Change-Id: I630a80e4bed2647d5bbd95247005aab7d0cb0363
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>