Saves a lot of manual toArray() and toObject() calls when the
JSON structure is usually known anyways. Read only access for now.
Change-Id: I5fd787144198e0443e4da285a11ce2597b66f99f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
All code paths leading up to this line unconditionally dereference the pointer,
so it cannot be nullptr.
Remove the check. It only confuses readers of the code and probably will trigger
warnings with tomorrow's compilers.
Change-Id: I31a643738e951da9c04f0091645016276b047761
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QTimeZone("UTC") should be valid, as "UTC" appears in the list of
availableTimeZoneIds(), and tst_QTimeZone::dataStreamTest() constructs
timezones like this, which are considered valid.
The internal representation of a QTimeZone("UTC") as created by
QTimeZone::QTimeZone(const QByteArray &ianaId) is a QUtcTimeZonePrivate
which isValid(), so the containing QTimeZone isValid() too.
When QTimeZone is serialized into a QDataStream, it calls
tz.d->serialize(ds) which is QUtcTimeZonePrivate::serialize. This
writes QStringLiteral("OffsetFromUtc") followed by the IANA ID and
the offset (etc.) to the datastream.
When QTimeZone is deserialized it looks for this marker string, and if
present, it passed all of the parameters to the QTimeZone constructor
(not just the name). However, that constructor does not support standard
IANA timezones (only custom ones), and when it detects that the supplied
IANA ID is actually listed in availableTimeZoneIds(), it leaves the
pointer to the QTimeZonePrivate uninitialized (NULL), which leaves
the QTimeZone invalid (isValid() returns false).
Thus, a valid timezone which was serialized and then deserialized has
become invalid. This also affects serialization of QDateTimes with
timezones.
Fixed by calling the name-only constructor first, which works (only) for
IANA standard timezones and leaves the QTimeZone invalid (isValid()
returns false) otherwise. In which case, we can call the many-argument
contructor to create a custom timezone with the same offset as the one
which was originally serialized.
[ChangeLog][QtCore][QTimeZone] Fixed sending IANA standard UTC-offset
QTimeZones through QDataStream, which previously came out invalid after
deserialization.
Task-number: QTBUG-60595
Change-Id: Id9c47e8bda701faae4d800e012afb6db545b2fe9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
'accel' is 'str.toLower()' and as such may have a different size, so don't
use str.size() to index into 'accel'.
Change-Id: I6a140ded45ecedd811b9618e1facb63d522eb235
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Replace all checks for DEFINES in windows.pri by proper
configure system checks as they no longer seem to work.
Task-number: QTBUG-61192
Change-Id: I625c9de0812fd376d06eacb065d3a32a499b6b00
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
As QAbstractSocket::readData does and as the documentation of QIODevice says
"this function returns -1 in those cases (that is, reading on a closed
socket..."
Change-Id: I1e64673f6a6d792a640bd6cb28b2bb5a0f18dc36
Reviewed-by: Aleix Pol
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: Id6533c8a444854f6215f6e47000875ef9751905b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Otherwise the mismatched device pixel ratio will lead to incorrectly
offset blitting.
Task-number: QTBUG-59017
Change-Id: Iccbe9cd9704bccbceda4c8dafe87435b68b5cf3e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Commit d56c6cf7a4 was incorrect. It was a
nice try, but on a 64-bit Mac machine (x86_64 CPU), it returned
hw.cputype = 7, which is CPU_TYPE_X86. CPU_TYPE_X86_64 is only used in
Mach-O slices for fat binaries and does not reflect hw.cputype.
Task-number: QTBUG-61205
Change-Id: Ia3e896da908f42939148fffd14c54b3050b8e64b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
qformlayout.cpp:1982:14: error: ‘role’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
The variable role is never used uninitialized because the access is
protected by the check for row != -1. The only condition under which
QFormLayout::getItemPosition will leave role unset is if it sets row to
-1. Since row == -1 ←→ col == -1 ←→ storageIndex == -1, we can simply
change the variable that we check here and the warning goes away.
Change-Id: Ia3e896da908f42939148fffd14c4ace6e40a808e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
By avoiding unneeded nested QPainters.
Crash was:
ASSERT: "s" in file /data/sources/qt/qt5/qtbase/src/gui/painting/qpaintengine_raster.cpp, line 2239
s was nullptr because the inner QPainter had called updateState(0), which is then dereferenced by the outer QPainter.
Task-number: QTBUG-61036
Change-Id: I7aad648f805f1abac4d38dfbefa2292da8b52af4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The hang happend when using QtAndroidPrivate::requestPermissions before
the QApplication::exec. Android UI calls "sendRequestPermissionsResult"
which was blocking until the event is delivered, but the qt main loop is
blocked and waits for the main surface to be created by the Android UI
thread which is already blocked.
With this patch sendRequestPermissionsResult won't block for the result
to be delivered.
Change-Id: I48ada65fe9ea63471ab46d8a9d839ba1b91d17b3
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Because of inverted test logic, this function would always return an
empty list.
Task-number: QTBUG-61048
Change-Id: If1529f2c567069ab4b672f309268b4edaf84c42f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
We can't rely on virtual dispatch in the destructor.
Task-number: QTBUG-61140
Change-Id: Ib1026caf126095778c24254775cb5a0bfecf3a38
Reviewed-by: Fabian Vogt
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Gets rid of debug output when they are used, which is more common now
that we use it for unpremultiplied ARGB32.
Task-number: QTBUG-60549
Change-Id: I14b2eb34d1d08612916e2b69b188f33dbe1b525c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Normaly, in C++ It's not valid to define a keyword, but it turns out that some
system header do, so we just silently accept it.
[ChangeLog][moc] moc no longer errors out if a C++ keyword is #define'ed
Task-number: QTBUG-61204
Change-Id: Ia4d3ff9c77b6ff261b6140c220cfb81bd13f1d6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Adds a function to return the native socket descriptor. It allows
threaded or forked applications to reuse a previously created socket.
[ChangeLog][QtNetwork][QLocalServer] Added a function to retrieve
the socket descriptor.
Task-number: QTBUG-55043
Change-Id: I556e97000d2c02ad2bdd636984de6c7564381c6a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Documents the returned type of values depending on the platform.
Change-Id: I0659ae8a0a4c5aafd368a25564eca29973702b1e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The ctor that everyone would want to use was marked as \internal,
probably because of the SFINAE expression appearing in its signature.
Move the SFINAE to the template argument list, which QDoc hides from
the user, and drop the \internal. While at it, drop the home-grown
std::is_same re-implementation and use the real deal.
Change-Id: Ia357fe65f94e10ac9eeccb3490aa8b3e68114cbb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It seems this change is preventing us to integrate qt5.git in '5.9'
This reverts commit c3030d7163.
Task-number: QTBUG-61204
Change-Id: Id98afaa23be0a8dd6f2c54a899f46542c65436aa
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This change introduces a new SH_Widget_Animation_Duration style hint
that applications can query instead of manually hardcoding the duration
of an animation.
As default value we use 200, which is the value that was already used in
QWidgetAnimator. A value equal to 0 means that the animations will be
disabled. This also implies that the SH_Widget_Animate style hint is
superseded and can be deprecated.
The new style hint is configurable with style sheets.
[ChangeLog][QtWidgets][Styles] Added SH_Widget_Animation_Duration style
hint which deprecates SH_Widget_Animate.
Change-Id: Ic3f5e4f7145a89697f28666aeaecabb1f3c5c96f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Clang's definition of the __EXCEPTIONS macro is inconsistent across
platforms. When compiling for Darwin, Clang 3.6 and newer will set the
token when exceptions are enabled in either C++ or ObjC. This change
adds the reliable check described in the Clang 3.6 release notes to
ensure that QT_NO_EXCEPTIONS is defined when required.
The check requires the use of the Clang-specific __has_feature()
syntax for which a new proxy macro QT_HAS_FEATURE(x) is added in
qcompilerdetection.h
Task-number: QTBUG-61034
Change-Id: Ie7b482dfa1a4a5b700a6b97562c26b626be1fc04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Analysis proves this is a false positive:
qarraydataops.h:69:17: error: ‘void* memset(void*, int, size_t)’: specified size between 18446744056529682436 and
18446744065119617024 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
Change-Id: I7814054a102a407d876ffffd14b6ab0be9e222fc
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Caught by Clang 4:
error: variable 'k' is incremented both in the loop header and in the loop body [-Werror,-Wfor-loop-analysis]
But we don't want to change behavior unless we can prove that it's wrong
or that there's a way to refactor this without changing it.
Change-Id: Iecee112b0cd96bec8d975430a74ca548ee2f470f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
... when platform plugins are using compatibility APIs.
Even though QPA is not a public API and does not promise source/binary
compatibility, we still try to not break things when possible. Eventually
deprectated APIs will be dropped (e.g between major Qt versions). Having
deprecation warnings here would help maintainers to notice API changes even
before their code stops compiling due to removed QPA APIs. This will also
ensure that we won't forget to remove compatibility APIs.
Change-Id: If13786eb7d42a595708ace00b2ddea5209df18db
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This class in unused in qtbase since Qt 5.6.1.
The only outside usage was in qtserialport, which got its own copy of
QWinOverlappedIoNotifier in commit qtserialport/65dba188.
Change-Id: I7668e67a1cc49c4418c66141784b180cd5f9d479
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Drawing directly using GDI32 can produce colors that are invalid in the
premultiplied alpha format which is used for the backing store. Exclude part
ids which are known to be opaque.
Task-number: QTBUG-60571
Change-Id: I0863d030acf79f317f5e82a5ee954c9cb507c449
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
On iOS QSslConfiguration always has an empty list of system CA certificates.
Calling SecTrustSetAnchorCertificatesOnly(.., TRUE) on iOS results in
SecTrustEvaluate failing to verify a valid certificate, since there
are no 'anchors' at all. We can use SecTrustSetAnchorCerificatesOnly(.. TRUE)
on macOS only, where we do extract/copy system certificates using
SecTrustSettingsCopyCertificates and save them in a QSslConfiguration's
list.
Task-number: QTBUG-61053
Change-Id: I70d4e46273d78414baaac8531273def707c3eebc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Instead of defering one more time by emitting the signal, we can add
the data to the list of available data/pending datagrams. For TCP
readNotification can be invoked directly so that emission of the
readyRead signal is tightly coupled to the availability of new data.
For UDP sockets calling readNotification directly stops handling of
more data and thus cannot be done.
With the old approach it was possible, that the last bit of TCP data
was lost, because the socket was closed while the data was still being
processed/transferred from the worker to the engine.
Task-number: QTBUG-61078
Change-Id: I9330b87876be853d310dc9e8e817ab344939d5dd
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The body of an if statement should not be on the same line
as the condition.
Change-Id: I45614e16d8f0f860824daff9f7b5ba7776535d99
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This is the pattern used throughout the rest of the uic codebase,
and is both more efficient (one lookup instead of two with an
additional contains() call) and will allow porting to another
container.
In writeSpacerItem(), also gently optimize string handling.
Change-Id: I20c7914089a699d2161d648b16d938e3a001ace3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
89870a35bd introduced an
usage of std::free without including cstdlib.
Change-Id: I9b7ae1caf90bf22aae99cc0407347350c83181a2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
It was added by d605883 and become unused after 5f39a0e.
The patch that added this macro used it only in one place,
which rarely is a good reason for introducing a macro.
Change-Id: If7065956fc79daf9b2d535527beaa42dbe0243a2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
It is unused and it duplicates QXcbConnection::threadedEventHandling():
bool supportsThreadedRendering() const { return m_reader->isRunning(); }
bool threadedEventHandling() const { return m_reader->isRunning(); }
"threadedEventHandling" is more appropriate name by looking at the body
of the function.
Change-Id: I99733e9c1ddb3ff75444d61d28eca54dcd6b0418
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The new implementation of CE_ProgressBarContents in
QMacStyle uses NSProgressIndicator, which is noticeably
heavier than the previously used HITheme API. Setting
the animation frame rate to 20 fps improves things
significantly compared to the default 30 fps, but
Cocoa seems to update the animation at 15 fps for
indeterminate NSProgressIndicator. Going down to 12
or 10 fps may be an option in the future, but it's
not compatible with NSProgressIndicator.
Change-Id: Ie1e18d7d78d1bd7ea38a12d715a6a7db0e175a29
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
We use NSProgressIndicator in a similar fashion as we do
with NSScroller for transient scrollers.
Also changed the signature of QCocoaDrawRectBlock.
Change-Id: I0fef8e327494fb557af2c2bab2aafa57c2e69564
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Add additional code paths to map the index passed by QCompleter in its
activated() signal in case when QCompleter's model isn't the same as
QComboBox's one.
Task-number: QTBUG-52027
Change-Id: I1d74037fccbe19962bb7f242aa7b1c2441aa5d54
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The qt_gradient_argb32 routine optimizes linear gradients with the solid
blend routines that is ARGB32PM only. If the gradient is not solid, it
will not get unpremultipled on write like it should for ARGB32.
Covered by lancelot, but the change is less than 5%.
Change-Id: Id99f2fa125cc091f3b5b29ec2d06618785d628fa
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Various editorial fixes. Also, in 5.9 QStringLiteral does
not fall back to fromUtf8 any longer, but guarantees
a compile-time construction.
Change-Id: Ida4698cf8e32a6e3de97b2c16b997fc9630c9db9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
... from widget class descriptions.
Use one screenshot from Windows instead.
The styles change and the screenshots become outdated very fast, so
it is easier to update just one screenshot now and then. The styles
can still be seen in the style gallery topics.
The image files will be removed in a follow-up commit after all
references to them have been removed.
Change-Id: Id326c141f4884a2e4f67a4fe8681d8c65f8b24ba
Reviewed-by: Martin Smith <martin.smith@qt.io>
Similar on how it is done for Windows desktop we also use the given
style hint when building the list of fallbacks a font family.
Change-Id: I71378581d07f20ebe5bf0bc757bba919cc70e118
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The documentation says that it's equivalent to
qgetenv(varName).toInt()
But the implementation wasn't. QByteArray::toInt() verifies that the
entire string was consumed, so QByteArray("1a").toInt() == 0, but
qstrtoll alone doesn't. That is, qstrtoll("1a", ...) == 1.
The implementation also detected the base, a behavior I kept. Instead, I
updated the documentation.
Change-Id: I0031aa609e714ae983c3fffd14676ea6061a9268
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This method now returns -1 by default, due to commit 6255cb893d
which mistakenly replaced -1 with Qt::IgnoreAction (0x0).
As a result, dropping is forbidden in a number of applications
(I detected this in zanshin).
Change-Id: I4922451216e08d5d3fe36f8ba87364a361b691bf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The change has been found to break Ctrl+C/V shortcuts when
using a Russian keyboard layout.
This reverts commit c6ecbd4762.
Task-number: QTBUG-61086
Change-Id: I0dce708b1a65b08ea10317d723c38b0414cbac7f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
make qtConfLibrary_psqlEnv() fall back to qtConfLibrary_inline() if
$PSQL_LIBS is not set.
Task-number: QTBUG-59521
Change-Id: Ie293e8bfaa3e113ede166243b345833973cc66f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Qt Quick Controls 2 needs configurable and toolable fonts for the
upcoming image-based style. Exposing these enums to the meta object
system allows the font weights, styles, etc. being specified as
enum value string names.
Change-Id: I024793656dd1af3a47d4edb5e27563a13c3b4c08
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This forces the API not to wait for synchronous I/O from the filesystems
and get the information, but instead just use the cached information
directly. It's a good idea if we have an unresponsive FS, like NFS with
an unreachable server.
Task-number: QTBUG-61096
Change-Id: Iddeeffb6f4ad4a2894a2fffd14c32f6e90664a63
Reviewed-by: Tobias C. Berner
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QSslCertificate used SSL without checking if SSL is available.
This patch adds such checks to the constructors.
Change-Id: Iea298aded5966641327e22e41ad4665a3d0ec5d3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fixup of commit b4995eb749.
We can't call QWidgetPrivate::get(w) on a deleted QWidget, because of
the call to the member function QWidget::d_func. We can however call
QObjectPrivate::get since we still are in the QObject destructor.
tst_qstackedlayout now pass without ubsan Warnings.
Change-Id: I4e839a97ddbd1cf21435a8fca76523b98a1f7d9b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Unifies the usage of modern C++ keywords with the previous commit.
Change-Id: I2dbcf3774634cbd3a24eb1cac58f34bae241cfea
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Because we obviously don't support Microsoft's extensions in C++. This
is required because some MS headers have code that isn't proper C++,
like iso646.h:
#if !defined(__cplusplus) || defined(_MSC_EXTENSIONS)
#define and &&
Do not pass /Za to MSVC to generate moc_predefs.h, because this option
is incompatible with compiler options like /fp:fast that may be
user-specified.
This reverts commit e1a70ce4 and re-fixes the issue similarly to commit
d72ac3f3.
Task-number: QTBUG-58391
Change-Id: I5c0143283afed09f98200806c87259c039c00ae1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
In the referenced bug report, dismissing a QFileDialog while the
Qt Virtual Keyboard was in use would result in a crash.
Dismissing a file dialog created with
e.g. QFileDialog::getOpenFileName() causes it to eventually be
destroyed. When this happens, it starts deleting its children. Each
child widget's destructor calls clearFocus(). In clearFocus(), there is
a block of code that emits QWindow::focusChanged(), passing the result
of focusObject() called on that widget's window.
QWidgetWindow::focusObject() could end up using itself as a fallback
focus object if it had no other focus objects (e.g. children) to use
instead, even though it was in the process of being destroyed; as were
all of its children. The Qt Virtual Keyboard plugin would then try to
use the focus object, even though it was in an invalid state.
To fix this problem, we return early from QWidgetWindow::focusObject()
if the window is in the process of being destroyed.
Task-number: QTBUG-57193
Change-Id: I137cf9415812ce2e0419c0afe8076ce150f248cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Move the entity's name into the Entity struct and use a QStringView
into Entity::name as the hash key, instead of a QString.
This avoids having to create a QString from QStringRefs every time an
entity is looked up.
Only costs 280B in text size on optimized GCC 6.1 Linux AMD64 builds.
Change-Id: I8dbd04c90c1ff684b794685025204abc89f68a84
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This change adds USB mouse handling support for INTEGRITY
Change-Id: I8a2a51c8c3578898e90dd5bbb01f6aed6c64e2a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Nikola Velinov <nvelinov@ghs.com>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Tero Alamaki <tero.alamaki@qt.io>
When registering a QGestureRecognizer, we create a prototype QGesture
to ask for it's QGesture::type(). Instead of a manual delete, use a
QScopedPointer to hold it.
Change-Id: I5cf1ad95864265b7d465b6344751acfb19a16800
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
... in an associative container.
This is more efficient (one lookup instead of two).
Change-Id: I07f1ffebb9b27714c0694658366f750752ea438c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
In FreeType 2.8.0 FT_LOAD_TARGET_LCD is now a variant of
FT_LOAD_TARGET_LIGHT instead of of FT_LOAD_TARGET_NORMAL. This means
requesting it will get us light hinting.
See https://sourceforge.net/projects/freetype/files/freetype2/2.8
We should just avoid using it all together since we request the LCD
mode separately anyway with FT_RENDER_MODE later.
Change-Id: I9ea2e39a6e9ba25ba11604a194e552fe4240a127
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The image format alpha8 is neither premultiplied nor non-premultiplied,
but premultiplied being the default, it is better to claim that to
avoid it trigging any special handling of unpremultiplied semi-
transparent formats.
Change-Id: I4af28bca472cd97ab6867bf12c4a202005577bb4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
MinGW with win32 threads might not have _GLIBCXX_HAS_GTHREADS, so it
needs to be checked.
Amends change 597d4ff796.
Change-Id: I5c91d1dd3967c4922ced315b475d653b8b102ad6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
QWindow uses device independent geometry while QXcb and QPlatform
classes do not.
When QXcbWindow::create is called we have no guarantee that the correct
screen has been set in QWindow so the code
attempts to check if "currentScreen" matches "actualscreen". To perform
that operation though we need to convert
the units from "Device independent" to "native pixels" that we do by
calling QPlatformWindow::windowGeometry which
calls QHighDpiScaling::toNativePixels which requires the correct screen
to be already set.
So basically we have a cyclic dependency, to get the correct screen we
require the correct screen to be already set.
To fix this we can:
1-Remove the dependency (Look for the actual screen using device
independent pixels)
This will imply adding code in QXcb to use
QPlatformScreen::deviceIndependentGeometry to lookup the screen up
2-Make sure the Screen is set before calling QXcbWindow::create
This patch implements the first approach that allows us to keep the
changes within the QXcb backend which seems to be the only one affected.
Task-number: QTBUG-53813
Change-Id: I6dc955d63e17c3b3421f3a1a9e0d841e508b2e5c
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
QSqlQueryModel::roleNames was exposing the default QAbstractItemModel
roles. Only "display" role makes sense because it's a read-only model
and it is not providing any other data information.
[ChangeLog][Important Behavior Changes] The names of the roles
returned by QSqlQueryModel::roleNames now only include a name for the
Qt::DisplayRole. Previously all the roles names of QSqlQueryModel
were returned.
Task-number: QTBUG-60857
Change-Id: Ib18aa0e7083a828648767d700c5af05b6aa84f4f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This is a followup to 77a8e90cdd which
didn't handle the case where no columns had been moved.
visualIndices and logicalIndices are empty until initializeIndexMapping()
is called, in which case appending is wrong.
As a result, visualIndex(i) would return -1 for the values over
those added by read(), and an assert would happen at painting time.
The fix is to leave visualIndices and logicalIndices empty if
they are empty already, leaving it to initializeIndexMapping()
to fill them later if necessary (e.g. when moving a column).
Task-number: QTBUG-60837
Change-Id: Ia7e4b9d3122647984acd434dfaa0400df319d065
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
On macOS if an application is no longer active then it will cause any
tool windows to hide until the application is active again. For
applications that did not want this behavior and thus wanted the tool
window to stay visible, the WA_MacAlwaysShowToolWindow flag is
available.
In order to ensure that this flag is respected, the tool window needs
to have its level changed when the application active status changes.
Once it is no longer active the window needs to be seen as a normal
window, and when it is active then it needs to be set to be a window
that is always on top to get the right behavior.
Due to various bugs in AppKit we need to explicitly order windows
in front during this process, which requires us to then iterate the
windows in back-to-front order. For macOS versions < 10.12 there is
no way to get an ordered list of windows, so we fall back to using
the window creation order.
Task-number: QTBUG-57581
Change-Id: If20b4698616707685f83b1378f87593f8169c8c6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When drawing the branches in a QTreeView, it should use hasFocus() to
determine if it is the active widget or not. This is how it checks when
styling the other aspects of the treeview, so the branches should be
done in line with this.
Change-Id: Id721401424ad95e9fc7ffbdc991e53b5f7feac01
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
When the mouse is moved over a header section then if there is a status
tip then this should be sent as an event like it would for a typical
QAbstractItemView.
Also adds a test for the StatusTipRole for the QTreeView itself as well as
the header.
Task-number: QTBUG-2066
Change-Id: Iaef8d91f1bd621c2463cde2dff4b2291fb037975
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Limitation is that the signal needs to be parameter-less
[ChangeLog][moc] moc now supports NOTIFY signals of parent classes in Q_PROPERTY
Change-Id: Iad64c96c3ec65d4be8ad9ff1a9f889938ab9bf45
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
[ChangeLog][Third-Party Code] Sqlite was updated to version 3.16.2.
Change-Id: Ib3e9c3a7021760e3cfa6dbd44f67b9da4abbe367
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Move the objects out of the data structure to avoid needless copies.
Change-Id: I1a69fccc431e040b229d6ea9ded0e041c208c861
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Same as with receiving data, the "newConnection callback" might be
triggered late and cause a crash if it accesses data of a destroyed
object. By moving the handling of this callback to a worker without
much logic we can prevent these late callbacks from doing any harm.
The signals are no longer connected and thus do not trigger any
problems.
Change-Id: Ic61584f12a46506abe12d7b21403d0c0970c0aae
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
One was setting FramelessWindowHint, the other didn't.
Settle on setting it.
[ChangeLog][QtWidgets][QSplashScreen] All constructors now implicitly
set Qt::FramelessWindowHint, not just the (pixmap, flags) one.
Change-Id: I5e3919acac80bf31c2c61fbade938ff319a6cea9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QList::erase(it) is a linear operation. Calling it in a loop
constitutes quadratic behavior.
Fix by using the erase-remove idiom.
Write a generic function object QtFunctionObjects::IsNotValid, instead
of a lambda, because I am building up a collection of such function
objects in my tree, to be submitted any time now™, so this will reduce
the churn once that gets merged. Wrap it in the unnamed namespace to
avoid ODR violations in case this pattern repeats.
Replace an existing erase-remove idiom's isNotValid lambda function
with the new function object.
Change-Id: I4f0af04e7b201eb168e79beeda332eee3c6f33c3
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Method parse() was passing down its default value argument to various
methods that expected an argument reflecting what's been parsed thus
far. Pass them what they expected ! Most are fairly insensitive to
the details at present, but the zone parsing I intend to add needs to
know the right date to compute its offset.
This makes it necessary to work out a sensible date and time to use,
from the fragments seen so far, using the default value to fill in
gaps but deviating from it wherever it conflicts with the actual
values seen.
Change-Id: I76750fcd92c1bdcad15c7dd4d8002cb90cec94ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Save unnecessary premultiply and unpremultiplication when converting
from an unpremultiplied format like ARGB32 to any opaque format like
RGB32 or RGB16.
Change-Id: I73f58200ff5c62fb07910e6f2b1c29b7e254d327
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
a6b34517e introduced this code as a workaround for stale QCocoaWindow
pointers during event delivery, but these days QCocoaWindow is a
QObject and guarded by QPointer. Disassembly of AppKit also shows that
the view is removed for us, so there's no need to do it explicitly,
especially as this causes two distinct event callbacks from AppKit
for what should be one atomic operation.
Task-number: QTBUG-42059
Change-Id: I212c894adf6aee51256ceff03c9821a995c2a63d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
abde2a59c6 introduced this code on the basis that setContentView
does not remove the view from its superview, but disassembly of
AppKit shows that it does. Since commit 52767b8ee7 we also
ensure that the previous NSWindow has its contentView property
cleared, so this workaround is no longer needed.
Task-number: QTBUG-39628
Change-Id: I21e179263d006f3af1f8a55e9e2f7e8eeab2a632
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The function never returns nullptr, so return the matrix by value.
Change-Id: I7c1eeb43b9693866049763565b575348ddd35548
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
... as suggested by a code comment.
This avoids the external bookkeeping using a QSet, and will allow, in
Qt 6, when we can port QWizardPage to the NVI idiom, maintaining the
bit as part of the initialize and cleanup functions directly.
Change-Id: I25a4dbf4c42f2c0286aa1a72ab9c59463d44c5df
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Apart from being more efficient to construct and test, for the
expected very small number of entries, the example code itself shows
that a sorted vector is much more useful than an unordered set.
Change-Id: Ic5e38df0176ac4be08eac6a89c2e1cabab2a9020
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If you keep around QTextLines referring to the previous contents of
the layout, you can experience crashes when using these after the
layout has been cleared. Since QTextLine is a value type, this is
not very obvious in the API, so we should at least give a warning
in the docs.
Task-number: QTBUG-60804
Change-Id: I81b2b640eec5f62b0af1e878aadd9fa23654ec18
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Our OpenSSL backend allows missing symbols and in general protected
from possible related failures. Unfortunately, for OpenSSL 1.1 this
means not only missing symbols (removed functions), but new incompatible
opaque data-structures and our 1.0 code trying to use them and probably
accessing some data-members via macros - we end up in UB and crashes.
SSLeay, which returns a version number, was removed in 1.1. A failure
to resolve this symbol we consider as a version mismatch and we make
'supportsSsl' to return false.
Task-number: QTCREATORBUG-18137
Change-Id: I5cd270f9c61a729105149779ee7277816f9467d7
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Having special code paths defeats the purpose of QT_STRICT_ITERATORS
and is ugly.
Change-Id: Ie0bdbf1a9639a0903bcd020f526629ab2e69883b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The events may come from QPA, as spontaneous events, or from other parts
of Qt, as non-spontaneous events. We should keep the state of the original
event.
Introduces QCoreApplication::forwardEvent() as a wrapper around the
opaquely named notifyInternal2. Ideally this would be the behavior of
sendEvent, with an enum argument to override the flag, but that ship
has sailed.
Change-Id: Ib0209f2b99744bd10590c63239ee7a97b60be4fd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QNSView instances check the _q_platform_MacDontOverrideCtrlLMB
window property along with the QT_MAC_DONT_OVERRIDE_CTRL_LMB
environment variable during creation.
Change-Id: Id6457fccdce2dff1fa83448dd2bc4d2757a87e9d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Combining libEGL and libGLESv2 into QtANGLE cannot be the default
any longer, as the change was binary incompatible. We just had to
return to previous behavior temporarily to be able to fix
qtlocation.
This reverts commit 97ab65076e30d8cd0cbe6bdbdb51d1dc2c0ff7e7.
Task-number: QTBUG-60795
Change-Id: I3095cb5f9da30e2d873d9a186cfbc5aee3fb10b2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Running:
tst_qapplication focusMouseClick touchEventPropagation
produced:
FAIL! : tst_QApplication::touchEventPropagation() 'window.seenMouseEvent' returned FALSE. ()
since QGuiApplicationPrivate::mouse_buttons was not cleared
when destroying and re-instantiating QGuiApplication.
Add more initialization and clear screen list on exit.
Change-Id: I0d814852c362d4a86f1ff5d6a94ab00d32ed30b9
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: Ib3a5b071f1cc66992969a85a092f8111e57dea44
Task-number: QTBUG-60786
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 7da9fa2890)
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This reverts commit ac0184d608. That
commit added the use of qHash in qt_safe_ftok, which made ftok even more
unsafe than previously. Since the algorithm in qHash can change across
Qt versions, we need a stable algorithm instead.
[ChangeLog][Important Behavior Changes] Reverted a change that caused Qt
5.6 through 5.8 not to connect to QSystemSemaphore and QSharedMemory
created by running applications using Qt earlier than
5.6. Unfortunately, this means that Qt 5.9 will not connect to 5.6-5.8.
Task-number: QTBUG-60771
Change-Id: Ibc3472e1c11d46358357fffd14bf51aeb48ef2c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Docs say that we have to explicitly call [super layout] from the overriding
-layout. On macOS < 10.12 missing -layout call results in a noisy debug
message.
Task-number: QTBUG-58699
Change-Id: I58ce442f1e3640a6b1ec32774078e2385d73f085
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Corresponds to the similar function QPainterPath::intersects() and is
faster than calculating the intersection and then checking if it is
empty.
Change-Id: I694bb2206ed330a456a41d4118a952a68177b7a2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
While QAbstractSocket is already changed in a way that winrt only
connects to host names and does not do IP lookups, http connections
still do a lookup to check, whether to use IPv4 or IPv6. As this
information is not needed on winrt anyways and hostnames are to be
preferred over IP addresses on winrt (automatic lookup & proxy handling
internally), we skip the lookup for http as well.
Task-number: QTBUG-59989
Change-Id: Ibc11f5ac07faf23e7af508fd20ee4880b24f79a8
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
As qtlocation's mapboxgl plugin links to QtANGLE if dynamic opengl is
used, we have to keep the combined library being the default until
qtlocation is fixed.
As soon as the qtlocation fix has landed in 5.9.0 this change should be
reverted.
Task-number: QTBUG-60795
Change-Id: I0781695e085a28a8971a6245a352413c0f779025
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This reverts commit daeb334039.
The commit was causing race conditions, and random failures in CI.
Task-number: QTBUG-60792
Change-Id: I6e49b733965632a1a268f0e88809794098465ec0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QPainterPath could in certain cases where sub-path points were on the
border of a rect fail to calculate intersects() correctly.
The patch adds handling of such cases by looking if end points cross in
or out of the rect. Other cases are already caught.
Task-number: QTBUG-31551
Change-Id: I6284da8ff8646d4636702923a76362302dde5767
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
An embedded view does not have a QCocoaWindow parent, but that doesn't
mean it's a top level.
Improved debug logging to make issues related to this code easier to
spot in the future.
Change-Id: I15b5acdd8d7112600618465a3b65b64fddc306f7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The auto-default button part must remain, but the pulsating
animation logic can go. Same for the pressed button logic.
Change-Id: I0e9a755f86601780a219296fbc02a1eb2b703aea
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
To avoid a compiler warning due to a wrong Apple api, a wrong
workaround was introduced. This caused the hide of the shortcuts as
expects but the visual space reserved for shortcuts was still visible
as at top with a height of ~55pixels.
While this is not important because the default virtual keyboard
is always shown, it become a problem when one want to introduce his own
virtual keyboard (UIResponder.inputView) with no shortcuts bar.
This fix really hide the shortcuts bar.
Task-number: QTBUG-60812
Change-Id: I0da44dfc3fda15af3351543c0a05aac973b899b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Also mark as shared-come-qt6,
[ChangeLog][QtNetwork][QHostInfo] Added swap() and move operator.
Change-Id: I8f422868f0487a37aeba3bc74685dc4912e9b3a4
Coverity-Id: 168204
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
... using the same qt_trimmed(), qTrimmed(), Q..::trimmed() split we've
been using for all other out-of-line string-view member functions to
avoid forcing string-view objects onto the stack for the passing of 'this'.
In the test, had to fix nullness not being propagated from a QByteArray
to the QLatin1String constructed from it. Probably worth fixing in
QLatin1String(QByteArray), too.
[ChangeLog][QtCore] Added qTrimmed() free functions.
[ChangeLog][QtCore][QLatin1String] Added trimmed() function.
Change-Id: I73c18ef87e203f30f7552c10dd5c84223bcfae0e
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is often more natural than (ptr, len), and I need it in the
implementation of QLatin1String::trimmed().
[ChangeLog][QtCore][QLatin1String] Added a constructor taking two
pointers, complementing the constructor that takes a pointer and a
length.
Change-Id: I0606fa0e3f820af1c3c1e261a340e5a941443e4f
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is often more natural than (ptr, len), and I need it in the
implementation of QStringView::trimmed().
Change-Id: I1d99b5ddaf76eee0582150b0233ef6ce9c37d25d
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Necessary to support C++17's [[nodiscard]] attribute, which needs to
be placed at the beginning of a function declaration.
Change-Id: I31494d13c7be558e86378782ab8684ef2956730b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... to {setButtonState,buttonState,m_buttonState}. This is more
consistent with the naming from XCB events:
xcb_button_press_event_t->state
xcb_button_release_event_t->state
xcb_motion_notify_event_t->state
Change-Id: I51ebb858defbdfee4a2009922178f0e58658e6b6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This is one of the main use cases for QDirIterator, but it wasn't
obvious enough that it's possible.
Change-Id: Idae11cfe75dd0e16f1a960bba2470b1695d11241
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Emulation of non-logical coordinate mode gradients was implemented by
essentially 3 x 2 repetitions of the same manipulation of the QBrush
transform. Avoid the code duplication by extracting a common method.
Add lancelot test scripts that excersizes these code paths.
Change-Id: I7baa921923231ef9e83e443dba996b82b32ad1e7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
No need to have two enums for the exact same purpose.
qmacstyle auto-test updated as well.
Change-Id: Ia601648191e39c0cbbaa7477143441005ae063c2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
We probably changed how rounding is done between CGRect
and QRect coordinates, but we expect more things to change
in the near future.
Change-Id: If961849c46edc5fcfee9aef2acda57f386b2928b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Prospectively helps to fix Qt::WindowStaysOnTopHint not working reliably
on Windows by preventing HWND_TOPMOST being cleared in raise().
Task-number: QTBUG-50271
Change-Id: I88f916a1cf8a2082236360b9eab874ad22b85762
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The platform window is cleared in detachFromPlatformWindow, just like the
delegate, but the platform window may be cleared due to other reasons as
well, so use that as a guard before calling functions on the pw.
Change-Id: Ie0773182073d4932b2bca8bc0fc8af24b8895a9d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
when the dbus tools are bootstrapped (which is the case in x-builds and
when above feature is disabled), they are built asynchronously to the
corelib module. but as qdbusxml2cpp's project file needs to check the
need for bootstrapping, it needs corelib's configuration. so pull it in
explicitly.
Change-Id: I559c7590a3eba8d3f8a03c44fe3a6d56f1c56db0
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The table is woefully outdated. Instead of shipping stale documentation
I think it's better to just reference the generic API for this.
Change-Id: I619113ab5140ccf65b774e69e836b27001bb0a18
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Add a comment, to describe the relation of
QObjectPrivate::currentChildBeingDeleted and
QObjectData::isDeletingChildren, given that this field is defined
in an entirely other file on a base-class, making it severely
non-obvious to the reader.
Task-number: QTBUG-57714
Change-Id: I7b8b24693c4ccc6192e9f9f34f951202b7fdddb0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Link to ApplicationServices since that's where this function
is located. Whether this framework may be removed with Carbon
is unknown at the moment. It does remove an obscure dependency
nonetheless.
Change-Id: If6514f70ca434298f1c88457adac51d38a1afa22
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
We use the NSColor system/developer palette instead of
HITheme brushes.
Change-Id: I11b34c7049ca98057eaeca5a0d0b8f64dbe3e5ab
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
As Qt applications using OpenGL are linked against these libs, merging
them into QtANGLE by default (780105f906)
was a binary incompatible change. This change restores the default
behavior to the one before given change.
If the user wants the libraries to be merged, he can pass
combined-angle-lib to configure.
Task-number: QTBUG-60373
Change-Id: Iedbd3f2ce9284fdde924cfae8d915d6d5fef00db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It's possible that some code executes after QDBusConnectionManager is
destroyed and still tries to access QtDBus. Protect against such
crashes.
Change-Id: I87e17314d8b24ae983b1fffd1453c13fbd3cf48e
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This allows us to get rid of two Q_GLOBAL_STATIC in QtDBus, which means
fewer opportunities for screwing up the order of destruction. And since
QDBusConnectionManager now ensures that the types are initialized, we
don't need to re-initialize them everywhere.
The Q_GLOBAL_STATIC for QDBusConnectionManager ensures the proper
thread-safe locking, so we don't need to lock for every type that we're
trying to register. This should make things faster.
But as a side-effect, trying to register a D-Bus metatype will cause the
QDBusConnectionManager thread to start too.
Change-Id: Ifea6e497f11a461db432ffff1449a4e535234485
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QWidget has its own setVisible() code that needs to
be run in order to correctly transition widget visibility.
It is desirable to be able to show and hide (native)
widgets also from the QWindow side, for example from
the platform plugin, or from generic QWindow handling
code in QtGui.
Add a new virtual QWindowPrivate::setVisible() and
move the QWindow visibility implementation there.
Subclasses can now override this function to add custom
code.
Make QWidgetPrivate::show/hide_sys() call the QWindowPrivate
setVisible implementation instead of the QWindow setVisible
public API.
Change-Id: I082f174b100659e1221d5898b490f8a9f498abdf
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This fixes shared library builds of Qt on iOS and tvOS.
Change-Id: I29d4c7e779e51b1adc19ca9dc18bc46a45a60093
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
This commit fixes two bugs:
1) Two ranges should not be merged if they are of different columns.
The old code would have merged (0,0) with (1, 1). Tranforming a selection
of just two indexes in a rectangle of four indexes.
2) The QItemSelectionRange appended had wrong column and worked only for
indexes of the first column. For example if 'tl' was (0, 1) than br was (0, 1)
so the QItemSelectionRange would have be ((0,1), (0, 1-1)) so ((0,1), (0,0)).
This QItemSelectionRange is invalid because topLeft columns is greater than
bottomRight column. The fix take in consideration the bottomRight column.
Task-number: QTBUG-58871
Change-Id: I591ef0bcc63926f24a7b1ced002af9b7737a4b6e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
With the right guards for isContentView() we can use m_view.window
directly. The only instances left of m_nsWindow are during window
creation, which will be removed in a followup.
Message send syntax for reading or writing Objective-C properties
has been replaced with dot syntax where appropriate.
Change-Id: I86925753612516625c93ea5bbedc98a3ddd8fec4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
And unify all of them to use regular pointer check syntax, to stay
consistent with other uses of non-smart pointers.
Change-Id: Ic55d7a16f2010120aaa8eac5b2df8189490671a2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
... and update the unittest accordingly.
Compared to the 1.8 release there is one change in freedesktop.org.xml,
the magic for application/x-java-keystore was changed from host32 to
big32, as done upstream, see https://bugs.freedesktop.org/show_bug.cgi?id=99328
Task-number: QTBUG-60608
Change-Id: I47de71c9396cfc3eabc884d5679c73a3e4850a17
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Due to the text blend routines being used by ARGB32 and due to another
bug on invalid premultiplied buffers, we need to keep using the naive
blend on non-opaque pixels for now.
Task-number: QTBUG-60562
Task-number: QTBUG-60571
Change-Id: Idfbb2c2e24dd840189c4fbed4e167f03bbc6ca8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Some AMD cards have been reported to not update otherwise.
Task-number: QTBUG-60527
Change-Id: I84d57a57eb2b76fb31255ae42b79b96ab7b257c9
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The m_nsWindow member both indicates whether or not the QCocoaWindow
represents the content view of a NSWindow, and provides access to that
NSWindow. The former is better expressed through isContentView(), which
allows us to then replace m_nsWindow entirely in a followup with access
though m_view.window, removing the need to cache the NSWindow.
Change-Id: I6e7de4b6d64b29fc9023222be045254f18be28cd
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Any objects directly or indirectly autoreleased in main(), before we start
the event loop, will never be released, as there are no pools present yet.
This includes all resources allocated during application and window setup,
unless those function have local pools. Ideally that setup code would be
called from within the runloop callstack, where there is a pool present,
but that requires a new main/startup-API for Qt.
To aid in debugging object ownership and hierarchies within Qt, we set up
our own root level pool tied to QApplication, which ensures that most objects
autoreleased in main() will eventually be released and have their dealloc
methods called.
The feature can be disabled by setting an environment variable:
QT_DISABLE_ROOT_LEVEL_AUTORELEASE_POOL=1
Combined with OBJC_DEBUG_MISSING_POOLS=YES, this allows breaking on the
function objc_autoreleaseNoPool to weed out codepaths in Qt that should
have local pools.
Change-Id: Id02e1edaaaeaa04c53862d7228e519214c99ab51
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
ProtocolInvalidOperationError are meant for actual replies from the
server indicating that the operation is not valid (HTTP 400 Bad
Request).
Change-Id: I9ad33fff8b634979bdbafffd14bbc57e4b21d6bf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The QMimeType class can be quite useful to graphical QML applications,
especially on the desktop.
[ChangeLog][QtCore][QMimeType] Add Q_GADGET, so that QML applications
can make use of QMimeType's properties and methods.
Change-Id: I03e6e82062558a72f5b97e65bbddfc4b7470e735
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jeremy Katz <jeremy@panix.com>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The operator double() and operator long double() members of qfloat16
are causing cast ambiguities. This removes them, leaving only
operator float() which seems to be adequate.
Also, additional arithmetic operator tests were added which without
this removal fail to compile.
Change-Id: Id52a101b318fd754969b3de13c1e528d0aac2387
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They're deprecated since C++11 and removed in C++17.
Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clients don't (or shouldn't) care if a selection clipboard is supported
for instance. They should just try to use it. There's nothing they can
usefully do if the platform doesn't offer a selection clipboard (like
Mac).
Change-Id: I0adb79766807806a4754353b48e33ed8acf9100a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The definitions of size_t and ptrdiff_t ([support.types.layout] p2 and
p3 respectively) do not specify that they need to be as big as a
pointer. They just need to be big enough to hold the size of the largest
object and the biggest array subscript, respectively, the platform
supports (e.g., 16-bit DOS would have them as 16-bit in all memory
models, except huge).
But we depend on them actually being the size of a pointer in many
places, such as in QArrayData::offset, that stores the linear distance
from the end of the structure to the beginning of the data, wherever it
is in memory.
It's also a good idea to verify that qptrdiff and qssize_t are the same
type.
Change-Id: I9ad33fff8b634979bdbafffd14bbd1223afc58e8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QRingBuffer::read() implements the same loop.
Change-Id: I480fe07e2400dfaee560f22bdbf07d6cdd013eb2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This patch implements an iterator that returns a pair containing both the
key and the value of an entry in QHash/QMap.
[ChangeLog][QtCore][Containers] Added an stl-like iterator to go through
QHash/QMap returning both the key and the value of the element pointed to.
That lets QHash/QMap interoperate better with stl's algorithms like
std::set_union.
Change-Id: Idbf8a8581510b3493648c34ab04c556de9fa4aa7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This variable was introducing during Qt 5.0 Q{Gui}Application
refactoring days (2011 or even before) and since then has been
used interchangeably with QGuiApplicationPrivate::mouse_buttons.
This patch removes the duplicate member variable as it is
redundant and could be a source of potential errors.
Initially I was thinking that ::buttons might be used for
the purpose of QTestLib, but it is not. QTestLib delivers
mouse events directly via qApp->notify() (mouse button state
is update via QGuiApplicationPrivate::mouse_buttons from notify()),
or via window system interface QWindowSystemInterface::handleMouseEvent
(which goes through QGuiApplication::processMouseEvent).
Looking at QGuiApplication, it is clear that ::buttons
and ::mouse_buttons always have the same value, as there
is only one assignment to these members in QGuiApplication:
mouse_buttons = buttons = e->buttons;
And there are no other places that would assign to
QGuiApplicationPrivate::buttons.
Change-Id: Ib60d366bf056a98b15bb4538a569693e7bd022e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QLocaleData::unsLongLongToString uses qulltoa, which will allocate a
zero-length QArrayData. Then with padding a single 0 was put in a
QString, which gets prepended to the result. By taking care of this
special case, we can now also fast-path the common case where base=10
and no flags nor precision was provided.
Change-Id: Ia893b0ea4c77634c24e7cef5aafb06d0ef44c507
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The existing QHash::operator== does not work when the same
keys appear in different order between the two hashes being compared.
However, relying on iteration order on a QHash is (as usual) a bad
idea and one should never do it.
Task-number: QTBUG-60395
Change-Id: Ifb39a6779230e26bbd6fdba82ccc0247b9cdc6ed
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Compilation and link times in CPU seconds with GCC 7, using precompiled
headers (not including moc, rcc, uic, etc. steps or headersclean):
Before After
Debug -O0 198,1 180,3
Debug -Og 240,7 229,2
Release -O3 267,1 249,2
Release LTO 239,4 229,8
QtCore required a little manual adjusting because some files are
bootstrapped into moc itself and into qmake.
Change-Id: I84e363d735b443cb9beefffd14b8b57c10e7da36
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
There's no need to derive. This fixes the build with MSVC 2017 under
/permissive-. I don't know what was wrong (ICC, Clang and GCC don't
complain), but it must be related to "Lookup members in dependent base"
in [1].
[1] https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance
Change-Id: I9ad33fff8b634979bdbafffd14bb8016f5dc98b3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This part has not been implemented before.
Also replace deprecated android.text.ClipboardManager with modern
android.content.ClipboardManager.
Task-number: QTBUG-58548
Change-Id: I190208042af8a6c87ed391c6c72f3f51e58dfad3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Replace the "hard-coded" fusion_arrow.png with qt_fusion_draw_arrow()
that scales appropriately on high DPI screens.
Task-number: QTBUG-40277
Change-Id: I2c4a134de757a39d7744977bd41accff69810521
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The sub-menu arrow indicator is still tiny. The Fusion style uses
a pre-made pixmap (fusion_arrow.png) for drawing the various arrow
indicators for sub-menus, spinboxes, combo boxes, scrollbars etc.
This will be addressed in a separate patch.
Task-number: QTBUG-40277
Change-Id: Id82c564340854e922b3b5f5bcf038ec535ed6cf4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Change-Id: I26e8c5caca31e842adc7a09151b6de2cc17698ed
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Retrieve and parse EDID blob.
Return screen product information from EDID.
[ChangeLog][Platform Specific Changes][Linux/XCB] Add screen product
information from EDID.
Change-Id: Ic54429cdc90c41342c37511bcaebce95c175f517
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When calculating what to trim in trimmed_helper_positions(), first
trim the end, then the front.
This way, a string that consists of just whitespace will remain
anchored at its front, and we do not run into the memmove case in
trimmed_helper_inplace, which, even though there's zero elements to
move, still calls a potentially-out-of-line function (memmove()).
Change-Id: I7024ffa1f7ae2effb9c5166ec8f30a42b8d51079
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Many QMenu related functions end up calling sizeHint() which
does call updateActionRects(). Since we try not to update the
action rects if no action has changed, we must be careful to
call it the first time with the right screen geometry. Other-
wise, multi-display setups may get the action rects based on
the wrong display.
In QMenu::popup(), this can be solved by using the position
passed as argument. Incidentally, we were already computing
the right display geometry in the same function, only a bit
later. The updated position around an eventual push button
menu should not change the screen onto which the menu popup
will be displayed.
Tested with the multiscreen-menus manual test.
Change-Id: Id7fc24be6908b4a9d24b8b9c8b8006efe45d69be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
qtbase/src/gui/vulkan/qvulkanwindow.cpp:1882:42: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
VkClearColorValue clearColor = { 0.0f, 0.0f, 0.0f, 1.0f };
^~~~~~~~~~~~~~~~~~~~~~
{ }
1 error generated.
VkClearColorValue is a union, so it wants to be clear that we are
initializing only one of the union's members, apparently.
(Even though initing more than one wouldn't make sense.)
Change-Id: Id4afa3ddc1b4ce7e24e681fb93c0ee9083c41e08
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
We can't depend on QT_HAS_INCLUDE for such an important functionality in
QtQml, so detect at configure time.
alloca() is not a POSIX function (it apparently first appeared in
Version 32V AT&T UNIX), so the actual header that defines it varies from
system to system. Clearly, if alloca.h exists, that's the one, so we try
it first. On most other systems that don't define it, it's in stdlib.h.
The only exception is Windows, where it's actually defined in malloc.h.
Task-number: QTBUG-59700
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4b2b389a4684e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It was added to support qAsConst(). When <type_traits> became mandatory,
porting qAsConst() to std::add_const was forgotten.
Change-Id: Ifb9b54d12554ce19dca4664642a8644f49aeb6af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Even if a callback type is not automatically re-enabled, callbacks are
implicitly enabled when the source has been added to the run loop.
In this case, calling CFSocketEnableCallBacks() could produce an extra
notification if there is a pending event in the queue.
The bug is quite unstable and completely depends on the internal OS
delays. So, it can't be tested inside Qt.
Task-number: QTBUG-59930
Change-Id: I751b8b8cf99cb86b80055f2214a42a638f01abe4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The problem was introduced in Qt 5.7.
Task-number: QTBUG-60297
Change-Id: I46265b24e104e08fe5b8026e5441514a438582c9
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
It's an iterator, not a const_iterator. Let QDoc figure out the correct one.
Change-Id: I7ddd1568adbf811b801c170794465ba14ceed05e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Return an empty size if no suitable entry found to avoid mismatch with
the returned pixmap()'s size (the QIconEngine::actualSize() returns the
originally requested size).
Change-Id: Ia278719a54392b62c5f9fc0529476baba5cd7df0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
There were still two cases where spurious notifications would be
possible:
- user calls hasPendingDatagrams()/pendingDatagramSize() on UDP
socket somewhere outside the slot connected to readyRead()
signal (::WSARecvFrom posts FD_READ notification, even if
a notification for incoming datagram already exists in the
message queue);
- a socket was registered to receive several types of event and
WM_QT_ACTIVATENOTIFIERS message is located between the
different events for this socket in the queue.
Provided patch ensures that the message queue is synchronized with
the Qt event processing mechanism and adds a way to detect spurious
notifications inside the window procedure.
Task-number: QTBUG-58214
Change-Id: I49609dace601f300de09875ff1653617efabd72f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
complements commit c5e687895d
added missing noexcept (void)StoredMemberFunctionCall specialization
to disambiguate template selection.
Without these specializations, StoredFunctorPointerCall was a better
match, which led to compilation failure
Task-number: QTBUG-58142
Change-Id: Ibd41057d9a497f057a895d73277902e90300ed7a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Significantly reduces the number of objects left to rot in the root pool,
which is only drained on application shutdown.
Change-Id: Iad7520ab083715416d95413a63474b9153f22fb5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
So that any objects autoreleased during application initialization are
released. Otherwise they will end up in the root level pool and only
be released when the application exits and the application goes out
of scope.
Change-Id: If02d24fd70098f9b4b1b0ea3218e0a15e438b9db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Otherwise dashed polygons will not be closed when stroked like they
are documented to be.
Task-number: QTBUG-60397
Change-Id: I58e9e3a06af157f9a2789ccab640c9da75867962
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
When handling WM_NCCALCSIZE in a global filter, the associated platform
window needs to be assigned to platformWindowPtr so that its frame
margins can be updated on return.
See also 3035400f36, which introduced the
platformWindowPtr out parameter for this purpose.
[ChangeLog][Platform Specific Changes][Windows] Fixed frameMargins for
WM_NCCALCSIZE when handled inside with QAbstractNativeEventFilter.
Change-Id: I7827b81d30a5c80dad591206a88712169dea0108
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Cleans up the rgb32 text-blending functions, so they now follow the
new pattern used in the new generic text-blending functions. This
also means they can now handle gamma-corrected blending on top of
transparent destination pixels instead of falling back to naive
blending.
Task-number: QTBUG-60469
Change-Id: I154ba513ff99c0cefab8fa12f4ed43fcd6563a6a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Retrieve and parse EDID blob.
Return screen product information from EDID.
[ChangeLog][QPA][eglfs][kms] Add screen product information from EDID.
Change-Id: I766999afd9298e82f6147fdeba5d14757bfb4b03
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When the tabbar styling was improved in change
175f33ed85 it changed
PM_TabBarBaseHeight to 21 which is incorrect as this value represents
the spacing between the tab pages and the tabbar. In macOS style
there is no space so this should be set to 0.
Task-number: QTBUG-60307
Change-Id: I2ce39ff2fc924d2d83843fab78b311153b4ee08f
Reviewed-by: Oleg Yadrov <oleg.yadrov@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Add a support library to parse EDID that will be used by platform
plugins.
In order to tell the screen manufacturer from the identifier, the
parsers reads /usr/share/hwdata/pnp.ids or, if it's missing, uses
a lookup table previously generated from that file with a Python script.
Change-Id: Ie021eb68be91f06dc0da54445f88e3533f78d23e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If the user calls QLocalSocket::setReadBufferSize() with a value less
than the current size of the pipe buffer, startAsyncRead() would call
ReadFileEx() with invalid parameters:
ReadFileEx(handle, nullptr, some_big_value, ...);
Change-Id: I3d153e3ec34f8038dc001c1c896aeceb666a8979
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In some cases, we'd want such value to come from the
platform theme, but we'd need new API for this.
Change-Id: Ic7053fa17ac8b2f207db031095c4e4aefae000c2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Tablet events compression has been missing since commit
60cd1c6775 in 5.6.1, and there's
no way to bring the old behavior back. Since tablet events are
not taken into account by AA_CompressHighFrequencyEvents on
purpose, we introduce this new flag.
This new flag is conditional to AA_CompressHighFrequencyEvents
being set in order for it to be effective.
[ChangeLog][QtCore][Tablet support] If the application attribute
AA_CompressTabletEvents is set in addition to AA_CompressHighFrequencyEvents,
even the QTabletEvents will be compressed (only on the X11 platform so far).
AA_CompressHighFrequencyEvents does not enable compression of tablet events
by itself, because paint applications typically need to process
all possible tablet events in order to draw the smoothest curves.
Change-Id: Ie7434ab4f9a4c64f2626c75e661cfd0d6cd22896
Task-number: QTBUG-44964
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Better than going half way and not quite finishing, and nicer results.
Change-Id: If6bf005182534f6fbfc13544d4190d3e54a272e9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This allows the use of move-only function objects
Task-number: QTBUG-60339
Change-Id: If3595fca338cf7f3039eb566cc02e4e73cd04c86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If vaoHelper is not valid the vao variable was being initializated with
a random value.
Change-Id: I44962841baeb1a1cff3124d6126e19c791feaea3
Coverity-Id: 171484
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Fix a few lingering doc references to the old classes.
Task-number: QTBUG-59815
Change-Id: Ia6b406485260c943b018422aaeb8e22ca4406e81
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
... as this would require us to remove usage of QAbstractEventDispatcher::flush
from Qt source code as well. We can not do this already in Qt 5.9 as there are
few event dispatchers in Qt that actually do override the ::flush (with non empty
bodies). Removing this code could result in behavior changes (not very likely) for
some user code. This method will be removed in Qt6.
Instead mark it with a well known "### Qt{Version}" comment.
This patch amends 41eefd7. The warning was:
qcoreapplication.cpp: In static member function ‘static void QCoreApplication::flush()’:
qcoreapplication.cpp:733:48: warning: ‘virtual void QAbstractEventDispatcher::flush()’ is deprecated [-Wdeprecated-declarations]
self->d_func()->eventDispatcher->flush();
Change-Id: I48a1c68b84ff93268956205e1205e6d4b5d48664
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Following the established pattern of implementing non-mutating string
algorithms as free functions over views with a public qFoo() and a
static qt_foo() split, add qStartsWith() and qEndsWith(), calling the
existing qt_{starts,ends}_with_impl() templates.
[ChangeLog][QtCore][QStringAlgorithms] Added qStartsWith(),
qEndsWith().
Change-Id: Ic95c2a9c13883a99f1a96319083fb249f20de5f1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also mark as shared-come-qt6 and add member-swap.
[ChangeLog][QtSql][QSqlError] Added swap().
Coverity-Id: 168223
Change-Id: Iaad4dee383900b9d11856e860b0647780a81a505
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>