The directory must be prepended by = to denote the sysroot.
This amends commit 797f686e.
Change-Id: Ib85c0abc58fce3504ecccef0e223b2618ac9149a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
We must use the same two-level replacements like for .prl files.
This amends commit d5071a40.
Change-Id: Iea065d01dee61cf2d1ff78640d045c3c76db9ac8
Fixes: QTBUG-76625
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Converts from OpenGL formats to Vulkan formats.
There are commented out lines for the formats in QOpenGLTexture::TextureFormat
for which it was hard to find an unambiguous mapping to vkFormat.
Task-number: QTBUG-75108
Change-Id: I06a7fd8df7d98cef314410ffd79ca9cff6599357
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit b21b07877a)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
See comment in qnumeric_p.h:convertDoubleTo for details.
Change-Id: Ifcd13f7f67995af6a60e50ccabe843a855be04ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Calls like
QHighDpi::fromNativePixels(point, window)
would return device independent coordinates outside any
screen in cases where the window is spanning multiple
screens and the native point was not on the main screen.
Correct this by looking up the correct screen and use
its scale factor and origin when scaling coordinates.
Task-number: QTBUG-73231
Change-Id: I01a3a42f42121b8d9f4ced2bb0fb023d6ae6bfe7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Using QImage allows creating the style before the application has
been created, and is the more modern API.
No changes to the documentation needed.
Change-Id: Ifa0e5fa1113802fca18fbd45bb3c0a5ba1dbfeab
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Fix most clang warnings about override, nullptr, range-based for loops.
Change-Id: Id47e57adb63a38e2f397a31511b788a2432c97cf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The completer popup has focus, making QShortcut direct to it's window
rather than to the window the completer belongs to. As QShortcut handles
the case for Tool windows that have a parent, but doens't do the same
for popups. And they shouldn't be treated the same way, as a context
menu popup for a e.g. text edit should in fact block the text edit's
shortcuts while open.
However, the completer popup is special, in that it explicitly makes the
widget completes for its focusProxy, which is what we can use to fix
this issue.
Change-Id: Ie7177d39668b3af14a1d9e0ee5d93eca9c67c8af
Fixes: QTBUG-4485
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This saves us lots of .toQString() and .toQStringList() typing when
qDebug()'ing qmake code.
Change-Id: I037e5e1816f2dcb6a20dec4c275f3d886f155ad5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
'make clean' removed the import libs for DLLs which makes them quite
unusable. Move the import lib removal to the 'distclean' target.
Fixes: QTBUG-51977
Change-Id: I727d520435f88a83a7fb14cb0ad81f8fe7c6d61b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
... in case the submenu is set from a slot, attached to the aboutToShow()
signal. Normally, with a 'statically' pre-populated menu, we set 'submenu'
property on a menu item from 'updateItem' callback in our menu delegate.
After that, AppKit calls our delegate's willOpen call back and this is
where we emit 'aboutToShow'. Unfortunately, if an application tries to
create a nested menu 'dynamically' at this point, it never becomes 'submenu'
of the item, since 'updateItem' was already handled at this point.
We catch this case in QCocoaMenuItem and call setAttachedItem if needed.
Fixes: QTBUG-76060
Change-Id: I676bf1d8529b9ddbfc90e4dff422b39668b7a5fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
81e298a51d fixed a case where the focus
chain was screwed up when the order was already correct. This worked
correctly in most cases but not when the next focus widget of the first
one had Qt::NoFocus.
The optimization check if lastFocusChildOfFirst is the same as second is
thrown away since it now does not longer screw up the focus chain and
the save would only be four pointer assignments.
Fixes: QTBUG-75388
Task-number: QTBUG-10907
Task-number: QTBUG-68393
Task-number: QTBUG-69619
Change-Id: I581ed532156c34ea970123afd063194aab016304
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Explain why there are two accessor functions for the global statics,
and use the global statics directly inside qapplication.cpp for
consistency.
Change-Id: Ibf3952052c1d0e780a8aab220a72f05af0c070a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
initSystemPalette() already takes care of this.
Change-Id: I6521763a74ec3ec629d9fcf05aa2a7cd71a7f26d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
initSystemPalette() already calls this when there's a platform theme, which
is the only case where initializeWidgetPaletteHash will have an effect.
Change-Id: I814ea2bb17ef40aee769f2c36f8ef4296cfca020
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Only uses a single place and avoids following the init logic through
multiple layers when trying to debug it.
Change-Id: I8fc119385edf407f69fb5431dc6584288022a7fe
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The code was added in 2005, ifdefed out already, and never used.
Change-Id: Ic5d070dd031665a4429739278851b50646694bf9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QMacStyle polishes QMdiSubWindows to have autoFillBackground set to
false. If the QMdiSubWindow's widget also doesn't fill the background
(like QLabel), then nobody fills the window in a tabbed QMdiArea, and
the other subwindows show through.
This change makes sure that all pixels are painted in that situations,
using the styled frame.
Fixes: QTBUG-76214
Change-Id: Iae025d15d36a8bc0d0c5838ac43c9d54944bcc83
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QSslSocket (OpenSSL backend) does not use mutex/locks during
a handshake, so we re-enable previously skipped tests.
This reverts commit 8c87a1402c.
Change-Id: I994b085f016f0eb18b3ba439a7041ea08cd3577b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This is to support rare setups involving an X11 server with multiple
independent displays ("zaphod heads" on which the DISPLAY env var
is different), possibly with multiple outputs forming a virtual desktop
on each display.
QMenu::popup() has been assuming that it should show on the screen where
the mouse cursor is. That's good most of the time; but with multiple
independent screens, QGuiApplication::screenAt(pos) cannot tell us which
screen to use (it's ambiguous), but rather will choose the first screen
that _could_ contain that position (as documented). In the example in
QTBUG-76162, the QMenu has been constructed with a QDesktopScreenWidget
as its parent specifically for the purpose of telling it which screen to
pop up on; so we need to respect that. But QWidgetPrivate::init() sets
the QObject::parent() to null (because the widget isn't actually shown
as a child of the QDesktopScreenWidget), and QWidgetPrivate::create_sys()
sets initialScreenIndex back to -1 to provide freedom to change the
screen later; so QMenu has to remember the screen index for itself.
QMenuBarPrivate::popupAction() searches the siblings of the screen on
which the menubar is claiming to be (rather than all screens on all
displays), to find the screen containing the point at the middle of the
bottom edge of the clicked menubar item. It then sets initialScreenIndex
so that QMenu::popup() will respect it rather than trying to decide for
itself.
Fixes: QTBUG-76162
Change-Id: I7a8f8e7aa2e9cf5340d446dc12726369ebe2589a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
GNOME indicates DPI modes by setting high DPI values in Xft.DPI, so
we need to use the forced DPI setting instead of the real DPI, as basis
for QPA pixel density.
Change-Id: I6f25636383b16b89a3d5fe4c904afd079fe001aa
Fixes: QTBUG-74836
Task-number: QTBUG-65424
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Converting an out-of-range FP to integer is UB. See comment in
qnumeric_p.h.
Change-Id: Ief874765cd7b43798de3fffd15a9bfe2c5fbbc01
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This is the worst fix ever, adding one more qWait. The test has been
updated in the 5.13 branch, so there a different fix will be needed. For
now this is in line with the rest of the code.
This test is currently one of the worst offenders when it comes to flaky
tests.
Task-number: QTBUG-64639
Change-Id: Ia1e71cc948997408b9658839013c9ad098111033
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
When our QSslSocketBackendPrivate (OpenSSL backend) was developed,
the ancient versions of OpenSSL did not have an API needed to pass
an application-specific data into verification callback. Thus the
developers resorted to the use of global variables (a list with errors)
and locks. Some of our auto-tests use QNAM and in-process server.
Whenever the client (essentially qhttpthreadeddelegate) and the server
live in different threads, any use of 'https' is dead-lock prone,
which recent events demonstrated and which were previously observed
but not understood properly (rare occasions, not always easy to
reproduce). Now we fix this for good by removing locking.
There are two places (in 5.12) where these locks are needed:
1. Before calling SSL_connect/SSL_accept (handshake) - here
we reuse the same trick we do in PSK callback ('SSL' has
an external data set, and it's 'this', meaning an object
of type QSslSocketBackendPrivate).
2. The static member function 'verify', here we do not have
'SSL', but we have our temporary 'X509_STORE', to which
we can directly attach an external data - a pointer to
a vector to collect verification errors.
Note, this change assumes that OpenSSL Qt is build/linked
against is at least of version 1.0.1 - we set external data
on SSL unconditionally (no version checks).
Fixes: QTBUG-76157
Change-Id: I05c98e77dfd5fb0c2c260fb6c463732facf53ffc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We read the data into the iterator from the system, but then recreate
the QStorageInfo object based on the rootPath, and then stat, discarding
the data in the iterator.
We can overwrite the data with the information in the iterator, which
partially fixes the issue. Volume information that can only be retrieved
by stat'ing the root path, such as size information, will only be
correct for one of the entries.
Change-Id: Ie98590876d6a5f525af009f4ff5d595cbc308b3f
Fixes: QTBUG-63209
Reviewed-by: Andrius Štikonas <andrius@stikonas.eu>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Normal sources are built using $(CXX), which is defined in the makefile,
but can be overridden. We should do the same lazy evaluation of the
compiler for headers.
Change-Id: Ic548786bd18ed8fb7eb0b58a527615ab19000323
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This palette isn't usually used, and the platform theme's palette is
preferred, but if a client asks for the standard palette (e.g. as
used in the styles example) we should try to report a palette that
gives the system look.
Change-Id: Ie5e58c890c13c716a9e9b5093b954a737e550dee
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
With Web Engine, QQuickWidget or similar, the code can hit on the offscreen
window, when its handle is null. Add a check.
Amends 3af7b27917.
Fixes: QTBUG-76440
Change-Id: I123633d18386efd3dbfb22aad6072e4f0877a62e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
On Linux this role is needed to make desktop notifications work.
There is no equivalent for Windows, iOS or macOS. On these platforms the
role will have no effect.
Fixes: QTBUG-76333
Change-Id: I4ef3b3321f7a0e2c09c1ce432a668428d14c52b7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
m_requestedSize is already scaled by the QtGui scale
factor (e.g. as set by QT_SCALE_FACTOR). Multiplying
by QWindow::devicePixelRatio() then applies this factor
again.
Use QPlatformWindow::devicePixelRatio() instead, which
returns the platform scale factor.
Change-Id: I133e99d84f4718215fda9ef0cf81a113b51db2c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since e9e16c7464 running webengine application you can get
warning "Attribute Qt::AA_ShareOpenGLContexts must be set before
QCoreApplication is created."
WebEngine set shared open gl context on qt_call_pre_routines, so
when QCoreApplicationPrivate init() runs.
Fixes: QTBUG-76391
Change-Id: I5fc146ed70054b0c1597fe06615cea2d7a8969d8
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The window shadow rendered by AppKit is based on the shape/content of the
NSWindow surface. If the backingstore is partially transparent, we need
to invalidate the window shadow after each resize (and subsequent flush)
of the backingstore.
Change-Id: I451370af5a8c0c25faea26beb3faa2483a33a5cf
Fixes: QTBUG-74560
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Instead of using the address of a function pointer, we name-mangle window
classes by using an UUID.
This fixes a real-world problem with multiple Qt instances where for some
reasons the window function appears to be mapped to the same address.
Change-Id: Id27e8d7aa17a4db9c14559224395f49d3ecd8d78
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QTBUG-66380 introduced a behavior change drawing a checkable menu item
with an icon. After this path the checkmark and icon was drawn.
Revert this regression so the stylesheet style matches the behavior of
all other styles. A checkable item should have two different icons
(QIcon::On and QIcon::Off).
Fixes: QTBUG-74655
Task-number: QTBUG-66380
Change-Id: I32ac2f397087a1c3d5d07400372109703c00c1ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
If the QMAKE_CXXFLAGS already had -ffat-lto-objects, the *= wouldn't add
it it again, after our "-flto -fno-fat-lto-objects", which meant the
last one would stand.
Change-Id: Ic9cfa6256b5045caa6e6fffd15a7f6cda7aaa837
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
We need one scale() function for each type: the scale factor can be
inverted by the caller for the fromNative case. Add a generic
templated implementation which will handle simple types. Add add
specialization functions for compound types that don't have
operator*(), as well as for position types (e.g. QPoint) which account
for the origin.
There's no need for fromNativePixels() and toNativePixels() overloads
for each type; replace with generic implementations which call
scale(). Do the same thing for fromNativeLocalPosition().
Some user code is calling fromNative()/toNative() directly, so leave a
definition of those functions around for now. Also leave a couple of
one-off scaling functions which do not fit the pattern.
Also fix “narrowing conversion scaleFactor to int” warning for the
QMargins scale function.
Change-Id: Ia67accbb670a80dc1747c2e264b97aab75b1251b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
User input events will be queued if processEvents()
is called with the ExcludeUserInputEvents flag. User
code then expect that the queued events will be sent
when the corresponding exec() call returns.
We were sending queued user input event at the beginning
of processEvents(). However, the cocoa event dispatcher
also has a mode where it makes a blocking call to
[NSApp run], in which case processEvents() never returns
during event processing. This means we don’t get to call
the queued-event-sending code.
Factor out the queued-event-sending code to a new
sendQueuedUserInputEvents() function. Call it from
postedEventsSourceCallback() to make sure the queue
is emptied after the ExcludeUserInputEvents processEvents()
call is done.
Task-number: QTBUG-69687
Change-Id: I4ff554ef4d39a69356736c33a650886b56bfdb4c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>