Set AA_UseHighDpiPixmaps.
Task-number: QTBUG-52622
Change-Id: Ic4373a9c94952f50bc1ad36bcc0dec850efc124a
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The naïve approach used for layer-backing in the past caused a detach
of the backingstore QImage on each beginPaint, since the image was
assigned to the layer via a CGImageRef that participated in the
QImage implicit sharing (and had to, so we couldn't get around that).
We now use IOSurfaces, wrapped in a QPlatformGraphicsBuffer abstraction.
The surfaces can be assigned to the layer's content the same way images
could, but allows us to reason more closely about whether or a buffer
is in use, and increases the chance that we will have a zero-copy path
to the screen.
Unless the window has requested a surface format with single buffering
we use a dynamic swap chain of buffers. In most situations there will
be two buffers in play, one assigned to the layer and one ready to
paint to, but during resize and some other situations the buffers
will grow temporarily to accommodate the increased back-pressure.
Since QBackingStore is documented as having single-buffer behavior,
we take care to persist content between the buffers before every
swap. By doing this before swapping, instead of before each paint,
we can avoid preserving areas that will be painted to anyways, and
will in many situations (such as blinking cursors e.g.) end up not
persisting anything.
The RasterGL surface case is handled by reading out the buffer data
and doing a manual texture upload. In the future we can support
direct texture access via CGLTexImageIOSurface2D, but this requires
QPlatformBackingStore::composeAndFlush to learn how to support other
targets than GL_TEXTURE_2D, as CGLTexImageIOSurface2D only works with
GL_TEXTURE_RECTANGLE_ARB targets.
Fixes: QTBUG-48763
Fixes: QTBUG-72360
Fixes: QTBUG-71162
Change-Id: Ica12f69b244e54d0fd31c929730d15657c286af8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The editor geometry was adjusted in RTL but not in LTR mode before
Qt5.11. 3ed91da499 fixed this but now all
editors are shown with their default size instead adjusting to the item
width. This works in most cases but fails for small column widths and
e.g. a QDoubleSpinBox. Therefore adjust the size policy for the editors
so their default size is ignored and therefore the column width is used.
Don't do this for a QDateTimeEdit since this makes no sense to only show
a cut of part of the editor.
Fixes: QTBUG-74327
Change-Id: Ie526155571bf24a2d8f38e988d8b2af4bfcc92ba
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since faff43348b the min/maxSectionSize is
respected when setting the current/default section size programatically.
This is not honored when writing out the properties and therefore the
default section size is not correctly set when it's smaller then the
default minimum section size.
Therefore make sure to set min/maxSectionSize property before all other
properties.
Fixes: QTBUG-74352
Change-Id: I8f9ede3e90b7c9c65f8440953b00e1d9d6006d38
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
In commit ec97be5585 an invisible frame calculation was added for
Windows 10 that fixes QWidget::move(0,0) for main windows and dialogs.
But because e.g. Qt::ToolTip windows do not have a window frame, the
invisible margin calculation causes them to pop-up in the wrong
position (off by a few pixels).
[ChangeLog][Windows] Fixed QToolTip pop-ups and QComboBox animation
pop-ups being off by a few pixels on Windows 10.
Fixes: QTBUG-74062
Change-Id: I218e8409a250a8b81ecd1d409b597ebd01fb255f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Split up the code detecting the GPUs into small helpers. Add a
QDirect3D9Handle class providing Direct3D9 functionality, add
GpuDescription::detectAll() and add a QVariantList "gpuList" property to the
native interface.
Task-number: QTBUG-50371
Task-number: QTBUG-65882
Change-Id: I8673542d327837babc2ad8f507da76e8ff5524ea
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
xcb_timestamp_t is a 32-bit unsigned value in miliseconds, so it
wraps after 49.7 days. When it happens, QXcbConnection::m_time stops
updating and copy & paste in an application would not work until the
application is restarted. This patch detects the timer wrap and
allows m_time to wrap too. The fix was verified in KDE desktop with
applications running for 51 days.
Fixes: QTBUG-65145
Change-Id: I328c4179c1b1f71914adda6f9a0ca3991a7e808e
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
If the QT_IM_MODULE environment variable is set, then it loads the
IM module accordingly, otherwise it is using the PPS one, if it is
available.
Task-number: QTBUG-54576
Change-Id: Icb8b474805053d8297029096365783c2cabc2cbc
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 8a7c373f8e)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We've so far made our public API match the TinyCBOR error codes, so the
conversion is trivial. Having the two functions allows us to change
that, if it becomes necessary.
It also effectively concentrates the Coverity warning about mixed enums
in a single pair of functions.
>>> CID 190307: Incorrect expression (MIXED_ENUMS)
>>> Mixing enum types "CborError" and "QCborError::Code" for "err".
Change-Id: Ifbadc62ac2d04a9a8952fffd1589e739c7a5b745
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
FBOs cannot be shared. Streamline the remainder of the sentence.
Change-Id: I654b23f86f4ee4ea2ca8e71958464d9f55394297
Reviewed-by: Martin Smith <martin.smith@qt.io>
The simplified style needs to work for both light and dark themes
in Qt Creator's help system. Background and text colors are already
applied according to the active theme, this commit removes the rest
of the hardcoded element colors that do not look good with a dark
theme.
Task-number: QTBUG-49417
Task-number: QTBUG-69327
Change-Id: Ib5ebe2755e98ca120f0500ab82713a37ec7199bd
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Previous blacklisting 5c4e5032b5 only
covered RHEL 6.6 and RHEL 7.4. The problem however exists in all
6.x and 7.x distros as they have the same openssl.
This however leaves us the problem with future RHEL 8. This will
keep blacklisting these tests there as well. We need a way to blacklist
versions with a wildcard so that we could say RHEL-7.*
Task-number: QTBUG-46203
Change-Id: I2cc52ba2eac949214ecaa02e19d9e623d5befc49
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: I6e61a18697b95d9e3f534d1d71ebf32fdff4a04f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
e0e1c7ec2d amazingly both removed and inverted key parts of the
logic for tracking the background state of the application.
Fixes: QTBUG-74272
Change-Id: I9a9e8720f32e8228d27ee6b6a1fb35e5f7b7cedc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QLatin1String + QByteArray + QLatin1String + QString should not be supported.
That the compiler let us get away with this is distressing.
Exposed by Anton Kudryavtsev's workon extending QString's operator+ support.
Change-Id: I0adfaa87e48335928acb680da49e9173639af614
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Commit 25133a1b77 fixed the item view text
layouting correctly in a technical way. For a vertically aligned text
which does not fit into the given rect it is not user-friendly to show
some parts of the text. It is better to display the start of it and show
an elide marker in the last visible line.
Fixes: QTBUG-73721
Change-Id: Ia7453133ea0a229b24196467168c8371585c4d8f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Fix QOverload<void>::of(), causing
../../../../include/QtCore/../../src/corelib/global/qglobal.h: In instantiation of ‘struct QConstOverload<void>’:
Q_DECL_CONSTEXPR auto operator()(R (T::*ptr)(Args...) const) const Q_DECL_NOTHROW -> decltype(ptr)
and add a missing .pro-file.
Change-Id: I19597adc33f2323a9f7dea9ee5ce94546f0e8f12
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Fix:
gestures.cpp:46:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
gestures.cpp:47:5: note: here
gestures.cpp:48:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
gestures.cpp:52:5: note: here
main.cpp: In function 'QByteArray windowsVersionToString(QSysInfo::WinVersion)':
main.cpp:40:12: warning: enumeration value 'WV_CE' not handled in switch [-Wswitch]
...
main.cpp: In function 'QByteArray macVersionToString(QSysInfo::MacVersion)':
main.cpp:68:12: warning: enumeration value 'MV_10_12' not handled in switch [-Wswitch]
...
widget.cpp: In member function 'CustomItem* Widget::checkedItem() const':
widget.cpp:238:12: warning: 'item' may be used uninitialized in this function [-Wmaybe-uninitialized]
Change-Id: I434784e86d127e56b92663cb45eba7d60d8f8eaf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
As explained in the inline comment we don't actually have a
protocol handler until we're done encrypting when we use SSL, but we
would still retry the connection if an error occurred between
"connected" and "encrypted". This would then lead us to fail an assert
that checked if a protocol handler had been set
Fixes: QTBUG-47822
Change-Id: If7f4ef4f70e72b764f492e7ced5a9349b3a421d2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
CompreString(Ex|) can fail, e.g. if it doesn't like the flags given.
Report such failure and treat compared values as equal rather than
whichever is first being less.
Fixes: QTBUG-74209
Change-Id: If8fa962f9e14ee43cc423a09a67bc58259a24794
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
On macOS, and most probably some X11 window managers, the parent/child
relationship of the dialog is not possible to propagate to the platform,
and the only determining factor of whether or not the windows stack on
top of each other is the modal state of the window.
Task-number: QTBUG-34767
Change-Id: I8b4b4910e3f905c44e577544fc347dbded373848
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
We always have to check the return value of xcb_get_property(),
but this code did not do it. These xcb functions do not check
for validity of the pointer, so we have to make sure that we pass-in
something valid:
void *
xcb_get_property_value (const xcb_get_property_reply_t *R)
{
return (void *) (R + 1);
}
int
xcb_get_property_value_length (const xcb_get_property_reply_t *R)
{
return (R->value_len * (R->format / 8));
}
Fixes: QTBUG-74067
Change-Id: Iabbc81e6079d96c7314d16dd78783de07f9ad629
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
We were potentially adding the Apple test logger multiple times, and we
didn't consider whether the existing loggers were logging to file or not
when circumventing them.
We now don't use the Apple logger if it would touch stderr and some other
logger is using stdout. In the case of no explicit logger being specified
on the command line, we allow the Apple logger to take priority over the
default plain test logger.
Change-Id: I31bbec4f4b3ab84ba9a2be35e8e5db08fee071a7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Removes useless indirection and builds on existing primitives in Qt.
Change-Id: I9fe50b21f5f77fc02566d5f5ff04c3e94c830e81
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Just gift it to QDBusUnixFileDescriptor.
Change-Id: Ifa822ecdaaa241968ed7fffd158799041653cf78
Reviewed-by: Jan Grulich <jgrulich@redhat.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
For some reason, it may be missing with SNAP.
Fixes: QTBUG-74112
Change-Id: Ifa822ecdaaa241968ed7fffd1587966cbd30dcbd
Reviewed-by: Jan Grulich <jgrulich@redhat.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Style fixes, modern Objective-C usage, and use of convenience APIs.
Change-Id: I04801b0b5f0d2213b4bcf1b0158fc32e57432d28
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Since 5.12.1 the library name provided is an absolute path. We need to
take the case into account, otherwise it just fails to build if the
target is used.
Fixes QTBUG-72903
Change-Id: I96407e5fe1831487da77cbe7b24b64dae59b22ff
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Otherwise we can end up in an infinite loop of splitting the curve and
then discarding the half of the new curve, etc.
Fixes: QTBUG-74172
Change-Id: I1984b7fd33cd98f65866f1c57c6ab20114615803
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
If open() fails then we should make sure we do not try to write to it
and just return 0 in that case.
Change-Id: I2980b65766b322efed6708fb10cc27567174dc37
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This would only ever put the first 16k into the buffer that gets read,
so this 16k would get repeated until the size of the download.
Task-number: QTBUG-74123
Change-Id: Ia53bedf6a8754d9fd83fd0ab62866cfa5af5cc1a
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This allows QtDeclarative examples to build.
Change-Id: Icd20304f76f8ba15c94eaf01b9fcd7b151b16146
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
'accept' breaks the order, making the static table unsorted and thus
std::lower_bound cannot find it and we always index it in a dynamic
table. Also, make this static table accessible to auto-test.
Plus fix some warnings quite annoyingly visible in qt-creator.
Fixes: QTBUG-74161
Change-Id: I47410f2ef974ac92797c9804aa55cb5c36a436c4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Some directories that depend on QtGui were being included without the
appropriate check for qtHaveModule(gui).
Change-Id: I7c348c74464d44cbd35a027f188f8a23bb2021d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Commit 2327944d added the QMAKE_DEFAULT_LIBDIRS to the library search
paths without taking care that explicit library search paths should be
inserted before system search paths.
Copy the behavior of the UnixMakefileGenerator, esp. of commits
5bc9541e and e185f343.
Fixes: QTBUG-73959
Change-Id: I7e951f432bb5f71ce4bcdb18b7102b4380441181
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
The older BGRA extension is more likely to have stable driver support.
Fixes: QTBUG-74150
Change-Id: If321b3024fbdeb9e199880744b9ee915b3b2bf6c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Change-Id: I4ff67028823d62ed67bf4303a58bee127bd76501
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When such modules aren't following the libQt5Foo.so naming convention,
the generated CMake files would be incorrect.
Change-Id: I57908f7466bff7a05f19271ccd495849476bdf38
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>