What's now called TestMethods::invokeTest() was apparently once called
qInvokeTestMethod(). Also, its current instance is (now) cleared by
its destructor rather than (overtly) at the end of that function.
Change-Id: I04de7ca2247dd640a398b3e4e7bf410401f3cbbf
Reviewed-by: Jason McDonald <macadder1@gmail.com>
That's what we initially did for borderless windows and we need it in order
to draw rounded corners for context menus.
Pick-to: 6.4 6.2
Fixes: QTBUG-106108
Change-Id: I6e4254b714ad7a094aa295546d5ac7fba5e21b13
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
As of 3fcdb6cb6e we now have a hidden
Window menu, which results in macOS also populating the Dock menu
with the application's windows.
But since the AppKit logic for populating the window menu happens when
the window is shown, and we create the menu after many windows have
been already shown, we had a workaround to add the shown windows
manually.
Unfortunately this workaround didn't take into account the NSWindow
excludedFromWindowsMenu property, nor did it include various other
checks that AppKit itself uses to decide if a window should be
included in the window list, resulting in adding the NSStatusBarWindow
that AppKit uses to manage the status bar items.
Instead of trying to replicate the AppKit logic, we toggle the
excludedFromWindowsMenu property back and forth, which triggers
AppKit to reevaluate the situation for each window, and add it
to the window menu if necessary.
Fixes: QTBUG-107008
Pick-to: 6.4
Change-Id: I6c7f61c1f4610fec9ce1f814fcea2b6140230602
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This reverts commit a43845b75a.
Reason for revert: As I can see from the pictures generated by the tests, the scroll bar now looks significantly worse and wrong.
Change-Id: I454b316b844839ebfc3f44633348e527e2a30f34
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
I'm not entirely sure whether this is a toolchain bug or if this is
intended. This commit ODR-uses all the static inline variables in
QOperatingSystemVersion so they are added to the list of exported
symbols in QtCore.
On Windows:
$ objdump -p bin/Qt6Core.dll | grep Windows11E
[2534] _ZN23QOperatingSystemVersion9Windows11E
On Linux:
$ eu-readelf --dyn-syms lib/libQt6Core.so | grep Windows11E
1985: 0000000000575430 16 OBJECT GNU_UNIQUE PROTECTED 18 _ZN23QOperatingSystemVersion9Windows11E@@Qt_6
Pick-to: 6.4
Change-Id: Ia317fd249bcd80dbd02c198803a3a61178c0c219
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It might not matter as far as I understand, but having it saved as BOOL
is better if it's a boolean.
Change-Id: If35485425257ca5518f0f8a49ca5353b9ac875a8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It is not necessary to disable the thread-based drm event reading
(QT_QPA_EGLFS_KMS_NO_EVENT_READER_THREAD) anymore when using screen
cloning.
Amends 8207751661 and
14bb413309
Note that this does not work when atomic commits are enabled. (i.e.
running with QT_QPA_EGLFS_KMS_ATOMIC=1 and attempting to use screens
that clone will not function as expected, regardless of which event
reading method is used - that needs a rework of how atomic requests
are handled, and is not something we are going to invest into given
that atomic is not even used by default)
Pick-to: 6.4
Fixes: QTBUG-91882
Change-Id: Iba83688c7790d7e721db3704d422034b654a8d8a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
FindWrapSystemMd4c now uses `find_package_handle_standard_args` like
all the other similar modules. This also fixes a case where CMake config
log for finding `md4c` was missing the CMAKE_MESSAGE_CONTEXT,
e.g., `[QtBase]`, which was caused by using `find_package` and let it
log outside the scope of the project, and not `QUIET`ing it.
In addition, the `CONFIG` parameter of the `find_package` was removed to
avoid unexpected issues when 3rd party package managers were used.
Change-Id: Id0bee436e8965452f9089c0e8c8793c3f1b63f02
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This patch avoids synthesizing mouse messages in the QPA for touch/pen
input, and lets the GUI do mouse event synthesis for unhandled touch/pen
events, if required, like in other platforms. This requires a workaround
to avoid breaking drag and drop with touch/pen (or making it worse). DnD
on Windows is based on the DoDragDrop() Win32 API, which does not work
with touch/pen input, which in some cases cause a DnD operation started
with touch/pen to hang until the mouse is moved. To avoid it we process
pointer messages for touch/pen and generate mouse input through
SendInput() to trigger DoDragDrop(), which then seems to work as
expected.
So now we inform QtGui that the Windows platform no longer sends
synth-mouse events after tablet events (unsetting the flag added in
f931e5e72d); this completes what was
attempted in 8ada0633cd.
Fixes: QTBUG-106368
Fixes: QTBUG-57577
Fixes: QTBUG-100788
Task-number: QTBUG-77414
Task-number: QTBUG-104594
Pick-to: 6.4 6.3 6.2
Change-Id: I46db3c74be2a95cf2d94ba930398e58dc930d2db
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
It seems the value name correction is not needed at all,
and we must not do such correction.
Amends commit 738e05a55a
Task-number: QTBUG-107794
Change-Id: I903a762aafab4b55275beb8438e6769285821567
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
We have done the same thing when calling SetProcessDpiAwareness(),
but it's also needed for SetProcessDpiAwarenessContext(), otherwise
there will always be a warning message when the user uses a manifest
file to set the DPI awareness mode for the application (which is highly
recommended by Microsoft).
Pick-to: 6.4
Change-Id: I31894d41c89581b6edd7826cb3dabad492f6c2a8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Currently we have a narrow version entry point, add a wide
version entry point as well, make them share exactly the same
implementation. The linker can choose the appropriate entry point
during linking.
The linker will always try to use wWinMain as the entry point
function if the UNICODE/_UNICODE macros are passed to it and
this will cause compilation failures without a wWinMain
implementation. This patch fixes such issue, though it usually
won't happen in most cases.
Change-Id: I7bc22d5bdc1cf35514a335a280a9f18732531b25
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Use the minimum of "len" and "size() - pos", logically we'll only ever
remove characters up-to the end of the array.
This eliminates one if branch, and d->erase() can handle all the use-cases.
After making this change I looked at QByteArray::remove() and it has
similar logic, so it should be correct™.
Change-Id: Ife6c552f8a3f3dda1d5a1da12b80a60790f3bae4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Added command line option for passing core5compat module in windeployqt
Task-number: QTBUG-104845
Pick-to: 6.2 6.4
Change-Id: I6a0e13532edac4580e03d83be79f7db4ac54e3bf
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
To make it look more natural (without outline and with proper colors).
Otherwise this thing looks bad in both Aqua and Dark themes -
can be seen if scrollbars always shown (this option is set in "General"
settings).
Tried so far:
- not to draw this element at all - gives a visible hole in the corner
- ask the horizontal bar to render its knob track a bit longer (resetting
a clip properly) - gives a weird side-effect when scrolling in Dark
mode + unfortunately outline of a track is still visible (it overlaps
the vertical bar's track).
Alas, good old hardcoded colors/alpha values as a last resort.
PE_Frame had -1,-1 adjustment, making a frame line visible in the
corner below scrollbars, giving another strange effect.
Fixes: QTBUG-106927
Change-Id: Ie0367c3bd6f40b3fa4ca6afac09f27e446fc007d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Some modules may have header files that do not pass headersclean check
under some conditions. It's nice to have an option in the
qt_internal_add_module function to disable the check for the modules of
this kind. At the moment this flag is useful for the ActiveQt module,
since it syncs and installs header files that don't belong to it.
Amends b89d63515b
Task-number: QTBUG-103196
Change-Id: I21a82d50d50bdac225ed483ab0cc50339c2a4873
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Since QtAutoDetect is called before the project, we still don't have
access to our IOS, WATCHOS, TVOS variables, and we must use
CMAKE_SYSTEM_NAME variable instead.
Pick-to: 6.4
Change-Id: I61afe216baec85b3fcd489957f4b6774134f8078
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It doesn't like 0x80 passed to a char, causing a warning
qstringconverter.cpp(196): warning C4309: 'argument': truncation of constant value
Pick-to: 6.2 6.4
Change-Id: I07ec23f3cb174fb197c3fffd17215b6f83476ebf
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Update Theme's style according to current UiMode.
New style.json file for dark mode was added (stored in separate
subdirectory 'darkUiMode/'). Theme_DeviceDefault_DayNight[0] is used for
extraction for API 29 or higher. Style is updated each time when UiMode
is changed.
[0]https://developer.android.com/reference/android/R.style#Theme_DeviceDefault_DayNight
Task-number: QTBUG-83185
Pick-to: 6.4 6.2
Change-Id: Id26059231f41761d822d494ac6c641bf3cba3322
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
In addition, I simplified some of the routines as we don't need the
extra check for them.
Task-number: QTBUG-107903
Pick-to: 6.4
Change-Id: Idaf6ab1338a54bc1a9f242fcc8400ae200174beb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Based on the discussion on logging style in the
Gerrit change for commit
5145d3899d
("a11y atspi: Support AT-SPI table cell interface"),
clean up the logging in AtSpiAdaptor a bit:
* convert uses of qCDebug to qCWarning where the
log message contained "WARNING"/"warning"
or it seems worth that severity.
* drop extra prefixes of "Qt AtSpiAdaptor:"
in the log messages, since the logging
category is already named "qt.accessibility.atspi"
and only used here
* more consistently start log messages with
uppercase letter and drop unnecessary extra spaces
The switch to qCWarning implies that these log
messages are output by default.
Change-Id: I1665a8ee8d64e4eab33a3b15906a7cb7357fd73c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It's not in 6.4.0, but realistically people who look at the docs now
will be using 6.4.(x>0).
Change-Id: If176c0daee11a6cc13d64255e398f767896f01a4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If the last pipeline had a different stencil (write) mask, that
would affect the clear. That is not ideal.
Exercised by the upcoming stenciloutline manual tests.
Pick-to: 6.4 6.2
Change-Id: I925e85a2b7fb884e5ae9ed327b4b05c9bf36484b
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
- Extending QtNative.java with access to DisplayManager and get
details about available displays
- Extending Android Platform Integration with display's list
handling
- Change QAndroidPlatformScreen to initialize itself from QJniObject
representation of an android Display object
- Move initialization of Primary display from QAndroidPlatformScreen
to QAndroidPlatformIntegration
Change-Id: I3d8f97f5cf9f81bbecc8716c25ff323097e57a15
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This amends 23780891a5 which moved the.txt
test to tets/auto/corelib/platform/android and kept the old location
mistakenly.
Pick-to: 6.4 6.2
Change-Id: If58422f9a94cfe4d6a941cc5453d8f0506057dcb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
MinGW-clang gives warning(-as-error) because the overridden function
which is there shadows the other overload, making it inaccessible.
Pick-to: 6.4 6.2
Change-Id: Ie5684b60a13d71966b9741fcfcdacbd37fe0df85
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When we say 'this feature', it can be misunderstood to mean
the subject of discussion in the immediately preceding paragraph.
Pick-to: 6.4 6.2
Fixes: QTBUG-107720
Change-Id: I726c7a591f01e59c3c36c802abeb17b51abf0777
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
A case where the accessing the clipboard is done when the application
does not have the input focus. Android does not allow access in this
case and returns null on the getPrimaryClip. This happens on some
examples like Analog Clock. Does not happen on autotests.
Fix was adding a test for null.
Fixes: QTBUG-107926
Change-Id: I685594545e5ae8102c257c033fffbcc4f20cef9a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
In bootstrap mode, we don't build qsimd.cpp and don't check for CPU
features, but specifying -maes in the compiler command-line can still
enable the AES hash support in qhash.cpp. This has probably been broken
since Qt 6.4 with commit 4be85491e0.
qhash.cpp:(.rdata$.refptr.qt_cpu_features[.refptr.qt_cpu_features]+0x0): undefined reference to `qt_cpu_features'
Pick-to: 6.4
Change-Id: I07ec23f3cb174fb197c3fffd17216241cfd1ab19
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Removes a warning in the build.
Pick-to: 6.4
Change-Id: I07ec23f3cb174fb197c3fffd17215c40b40333cb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QSystemLocale is now defined for QT_NO_SYSTEMLOCALE builds (bootstrap),
but no implementation will be present. That's just to get the enum
declarations.
Pick-to: 6.4
Change-Id: I3c79b7e08fa346988dfefffd171fa00fde8ab080
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
I don't think I understood what this does when I coded it. It wasn't
needed with the Linux kernels of the era.
[ChangeLog][QtTest] Specifying attributes with the -perfcounter command-
line option for Linux performance counters is deprecated. QtTest will
ignore the colon and any attributes listed there, though future versions
of QtTest may reintroduce attributes if needed.
Change-Id: I3c79b7e08fa346988dfefffd17202684fc2cf650
Reviewed-by: David Faure <david.faure@kdab.com>
The kernel has become more paranoid since 2013, when I originally wrote
this code. The kernel.perf_event_paranoid sysctl controls the paranoia
level[1]:
=== ==================================================================
-1 Allow use of (almost) all events by all users.
Ignore mlock limit after perf_event_mlock_kb without
``CAP_IPC_LOCK``.
>=0 Disallow ftrace function tracepoint by users without
``CAP_PERFMON``.
Disallow raw tracepoint access by users without ``CAP_PERFMON``.
>=1 Disallow CPU event access by users without ``CAP_PERFMON``.
>=2 Disallow kernel profiling by users without ``CAP_PERFMON``.
=== ==================================================================
Since the default is 2, we QBenchlib has been failing with EACCESS:
PASS : tst_MyClass::initTestCase()
QBenchmarkPerfEventsMeasurer::start: perf_event_open: Permission denied
[ChangeLog][QtTest] Fixed support of Linux performance counters for
QBENCHMARK, which used to fail with "Permission denied" errors in
default configurations. Now, QtTest will automatically fall back to
profiling only userspace, like the perf(1) tool does.
[1] https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/sysctl/kernel.rst#perf-event-paranoid
Pick-to: 5.15 6.2 6.4
Change-Id: I3c79b7e08fa346988dfefffd171f897be7794935
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Each module now identifies its actions during the configuration by a
prefix, e.g., `[QtBase]`. In addition,
- I have slightly modified some of the `message()` commands to get
a more coherent output.
- `syncqt.cpp` prints its output as WARNING if any
Change-Id: I3922d75a668d94f402068f4121751b7fcb6522b4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Just to make sure it is not broken and will not break.
Change-Id: I947f8225027d6b6744eb8b774058b7e4d923b61d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Pick-to: 6.4
Change-Id: I9504b41b743b9874fcc6324d98b66a9c5160e845
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The purpose of warming up is to get all code paths executed, so any lazy
function resolving is processed, statics are allocated, etc. There's no
reason to run it more than once -- if you're trying to train the Branch
Predictor Unit, you'd want to do it another way anyway. This is useful
when benchmarking with -iterations N, because QBenchlib currently runs
2*N iterations because of the warm up. That just wastes time.
Change-Id: I3c79b7e08fa346988dfefffd172030c889b31a1f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>