this function discards all values that come from a specific file. it
will be needed for configure bootstrapping, but is too obscure to
document it for general use.
Change-Id: I62c18aeb1847712e33d0599dbb0b90ffa1722438
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- port Q_FOREACH to C++11 range-for
- port use of inefficient QLists to QVector
- port from QSharedPointer to auto variables except where the
payload is returned from a function (there ported to
QSharedPointer::create())
Fixes errors pointed out by my tree's static checks.
In sslErrors(), fixed an unwanted double-detach problem by
adding a strategic qAsConst().
Change-Id: I8148e23b73337f6f1a721e009f2974536d8447cc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Introduce new entity: class Http2::Frame with accessors like
payloadSize/type/flags/streamID etc. (they actually read
/interpret raw bytes from a frame's buffer) instead of
duplicating this functionality in reader/writer classes.
Delete defaulted members and remove explicitly defined
move ctors/operators (not needed actually).
Update auto-test ('HTTP/2 server') to use these new classes.
Change-Id: Ie3516efbd095704e212142eef9e792323678ccfa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Q_NAMESPACE is useful to add Q_ENUM_NS/Q_ENUMS, Q_FLAG_NS/Q_FLAGS and
Q_CLASSINFO to a namespace.
[ChangeLog] Added Q_NAMESPACE which can be used to add Q_ENUM_NS/
Q_ENUMS, Q_FLAG_NS/Q_FLAGS and Q_CLASSINFO to a namespace
Task-number: QTBUG-54981
Change-Id: Ic61b972794063e77134681fb347d6c4acddcdb44
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Use the new qtConfig macro in all pro/pri files.
This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.
Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
this migrates the cases where the build system already made (some) use
of variables (possibly) set by configure.
Change-Id: I43a08caed481d5f887a3a40821e71a4797760e7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The test is blacklisted already for Ubuntu 14.04, and needs to be
blacklisted for Ubuntu 16.04 too.
Task-number: QTBUG-46116
Change-Id: Ic321a4fd13e00c653e6c387d8a159832173b2eb3
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Since headersFrame is a reference to a vector's element, clearing this
vector before accessing headersFrame.flags is not a good idea, must be
done later.
Change-Id: I80eee0761ac1cad580e979be9371ec7588a694ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- add Q_DECLARE_TYPEINFO for types held in Qt containers (incl. QVariant)
- port Q_FOREACH to C++11 range-for
- port uses of inefficient QLists to QVector
Fixes errors pointed out by my tree's static checks.
Change-Id: I7176b4b12ed47ed23166857bd127c459ea2a48d5
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The only difference between the sample widget sets was:
- widgets << new QLabel("TESTING TESTING");
+ widgets << new QLabel("<b>TESTING TESTING</b>");
I chose the latter, because it's the more complex example
and neither the hoverColors nor focusColors tests suggest
the boldness of the text matters.
Part of port away from Q_FOREACH.
Change-Id: I9a928de4e781b96ad00a8c9515977c35ebfa6c24
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
These tests use helpers, which are not supported on UIKit platforms.
Change-Id: I51447754dba2cd2547be05c3767e4ff3b6b5a671
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Cap height is an important metric of font, in particular it is
required to make decent implementation of "initial-letter"
CSS property in QtWebKit.
Note that some fonts lack cap height metadata, so we need to
fall back to measuring H letter height.
Change-Id: Icf69d92159d070889085e20d31f2e397d796d940
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
- port Q_FOREACH to C++11 range-for
(incl. one case of iterating over QHash::keys())
- port uses of inefficient QLists to QVector
- add Q_DECLARE_TYPEINFO for types held in Qt containers
Fixes errors pointed out by my tree's static checks.
Change-Id: I30eb432528fa3008240b5c217d5f2f9ddc3679be
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
We require Q_COMPILER_RVALUE_REFS and _VARIADIC_TEMPLATES since Qt 5.7,
so remove the non-variadic version which anyway has zero test coverage.
Also drop #include <utility>, as that is included from qglobal.h already,
and drop QSKIP from test.
Change-Id: I1fc7f7068eac80ad6fd85e1d8f6d33c5c7bb67db
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
If an entire font family is condensed or stretched and we match by
family name, the default stretch factor of 100 will make the font
engine try to synthesize it back to medium stretched font.
The existing code is already made to deal with a stretch of 0 that is
no longer used. This patch reintroduces 0 stretch to indicate no
specific stretch has been requested. Specifically setting stretch to
100 on a QFont will introduce the old behavior.
[ChangeLog][QtGui][QFont] The default value of QFont::stretch() is
now 0 to indicate any default stretch is acceptable.
Task-number: QTBUG-48043
Change-Id: I574747f980fd4f9893df828818aae99a07b41623
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Recently enabled cleartext fails to build with QT_NO_SSL - fix
test and QNAM.
Change-Id: I467edab8e4eb5113715ad2d3b3022e0d8c027de8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
It's like QElapsedTimer, but marks a time in the future instead.
[ChangeLog][QtCore] Added QDeadlineTimer, a counterpart to
QElapsedTimer, used to mark a time point in the future (a deadline) and
determine whether such a deadline has passed.
Change-Id: Ifea6e497f11a461db432ffff144921f7fbc1d1d3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- add missing \since 5.8 on free functions
- fix \relates of qHash to point to QSslDHP, not QHash, which is in another module
- API fix: use named instead of unnamed ctors
- share code between ctors
- API fix: add inline move ctor (for now, this requires using a naked d pointer,
which isn't much of a problem, since the class is immutable).
Change-Id: Ic30f9c3c03b8a3798e0676e38991ead85c587214
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change the occurrences where the Mac platform
is discussed to use a macro \macos, which expands to 'macOS'. This
helps with adapting to future renaming.
Update the instructions on mac-specific Q_OS_* macro usage.
Add a \target for the old 'Qt for OS X' topic to keep links working
for other documentation modules that try to link with the old name.
Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Simply allocate objects on the stack instead of the heap.
Change-Id: Ic047d78e49668878821cce1c8ab599a8551b6476
Reviewed-by: David Faure <david.faure@kdab.com>
In QStringListModel, the display and the edit roles are synonyms,
so when one is changed, the other changes with it. However, in
setData() we only emitted a vector with just the role that was
passed in by the user.
Fix by always passing both roles, regardless of which one was used
to set the data.
Change-Id: I498e7cb33796fae266901817b01ad85d861d4bb4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Don't try to locate the text by coordinates at the edge of the text but
simply aim at the center vertically _and_ horizontally.
Task-number: QTBUG-52991
Change-Id: Ia9e84fc5d12491840e739c4eea730fe13058f3c7
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
(Move QT_FORWARD_DECLARE_CG to qglobal.h)
This function converts to CGImage for supported formats. This
is done by creating a CGImageRef that reuses the QImage data.
The CGImage and QImage ref counting systems are bridged, implemented
by using CGDataProvider that holds a copy of the QImage.
Unlike the previous internal implementation this public version
does not implicitly convert unsupported formats to ARGB32_Premultiplied.
See included documentation for the complete description.
Change-Id: Ie3984a7a8331e02a6f1c42943caaf76854e93538
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
HTTP/2 does not require TLS connection, it can work in a cleartext mode.
Plus at the moment only OpenSSL backend allows HTTP/2 negotiation
via ALPN/NPN (and none of our CI configurations with OpenSSL supports
these extensions, rendering HTTP/2 auto-test useless). This patch
implements cleartext HTTP/2 ('h2c') in 'direct' mode - this is
allowed if a client has a prior knowledge that HTTP/2 is supported by
a server.
Change-Id: I4978775e9732c40bc77f549b83bb4a5d1761887e
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The deleteLater() call wasn't reliably reached when tests fail,
so use a QScopedPointer with QScopedPointerDeleteLater deleter.
Change-Id: Ica73bc73c2a0ac1e9b77e4804f2aedcad9b662a0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
The test no longer writes to SRCDIR, so don't try to remove
generated files from there, either.
Amends bb5570082e.
Change-Id: I1d5df88b1865f3dbd914ec71147de61e173f2f4e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
one of the effects of CONFIG+=x11 is LIBS+=$$QMAKE_LIBS_X11, so it's
positively pointless for project files to do the same.
Change-Id: I4085acd6254401897b34e131c2cb57f1f76a3638
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
don't refer to non-existent feature 'OdfWriter', and test these
classes if we have a developer build.
Change-Id: I59b0d4bbba4958ed3bd76f504cd8b493dbd7f877
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
QStyle was created but never removed
Change-Id: I55011377afd475af28e4ce2cf657e435dd37c96a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Update due to behavior differences between win32 and winrt.
Change-Id: I39532de98c25cd67da49cbb20d42dccc803f1805
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The adoptedThreads test never spawned any thread causing a test error
later on. Hence add a winrt version using __beginthreadex which exists
for that platform.
Change-Id: I04f980218713df20cb41d804d732e0c99b958489
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Otherwise we can fail to stretch the last section when adding new
sections.
Task-number: QTBUG-52446
Change-Id: I7eb5267ac500bf4246e57c3e3a43268bb65ef1f7
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
QDBusConnection::connect() behaves like QObject::connect with a
connection type of Qt::UniqueConnection | Qt::QueuedConnection. So
return false if it's already connected.
[ChangeLog][QtDBus][QDBusConnection] Fixed a bug that would cause
QDBusConnection::connect() to return true if a slot was already
connected to the same D-Bus signal. QtDBus does not support multiple
connections.
Change-Id: I87e17314d8b24ae983b1fffd1453aef5a7c9ad0b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
this is useful when an adequate message has already been emitted by
other means, like various built-ins do.
Change-Id: I092771f55969fad8b214204d666327664727c572
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- port Q_FOREACH to C++11 range-for
- port uses of inefficient QLists to QVector
Fixes errors pointed out by my tree's static checks.
Change-Id: Ica50f44d862f635df06cb8f09ce506b9d30fdfc5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
There's no sharing, and the use of QSharedPointer(T*)
triggers my tree's static analyzer.
Easiest fix is to port to QScopedPointer, which is the
correct smart pointer to begin with.
Change-Id: I105c1a334c3d6712a475600c8394b0bebc420677
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- port Q_FOREACH to C++11 range-for
(except in the Q_FOREACH tests :)
- port uses of inefficient QLists to QVector
- include QTest, not QtTest
Fixes some errors pointed out by my tree's static checks.
Change-Id: Ibb21a280537af74dda5679ec7c75d59477b6de55
Reviewed-by: David Faure <david.faure@kdab.com>
- port uses of dynamic containers with static content to constexpr
C arrays
Fixes errors pointed out by my tree's static checks.
Change-Id: I5e1cafa6e428500afae0d653ce48a7fb465c19ed
Reviewed-by: David Faure <david.faure@kdab.com>
Commit 4a40c717f3 optimized
QString::compare_helper(QChar*, int, char*, int), but got
the case wrong where the rhs is null, but the lhs is empty,
not null (which is the case even with a null QString, as
QString().constData() != nullptr). The correct result in
this case is 0, since in Qt empty and null strings compare
equal.
Fix by checking the length of lhs, not its pointer.
Task-number: QTBUG-55154
Change-Id: I3ec2cd25d9bdca90cf3f5568a875b1e52c779979
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Both were mapped to QVariant() before. Instead, use a null pointer
QVariant for a null JSON value.
[ChangeLog][QtCore][QJsonValue] QJsonValue(Null).toVariant() now returns
a QVariant of type QMetaType::Nullptr instead of an invalid QVariant.
Task-number: QTBUG-43077
Change-Id: Ife611f418583dbff542210bc8c5cd65201212a6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>