When scrolling to the bottom of the view, if there are expanded items
then it should call canFetchMore/fetchMore up the chain until it
finds one with more items that can possibly be retrieved.
This brings it in line with the QAbstractItemView implementation
which would call canFetchMore on the root index, therefore we
go up the chain to the root to see if anything before that can be fetched.
[ChangeLog][QtWidgets][QTreeView] QTreeView now calls canFetchMore and
fetchMore when the bottom of the QTreeView is scrolled to.
Task-number: QTBUG-48725
Change-Id: I2b2145684bb34c8c317bfce4a0ef14f243a64719
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
clang-qdoc must be compilable using the bootstrap library,
but clang-qdoc uses QTemporaryDir, which is not there. This
change adds it.
This also required changing some camelcase includes to their
lower case equivalents.
Change-Id: I8d03864f56e4bf474c3fdcde5e744ed31fea7fc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
[ChangeLog][QtGui] It's now possible to retrieve the screen
at a given point via QGuiApplication::screenAt().
Change-Id: Ic09514ec731d8cce5d453833e98fcd118a70600e
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Amends cab060631
Task-number: QTBUG-62995
Change-Id: I374153ec34abad0585d2bcab0f699b42600be6ef
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
If an application has more than one menubar, for instance, one for each
mainwindow it has visible then once one is deleted it needs to ensure
the application menu items are updated as appropriate.
To do this the resetting of the known menu items is extended to cover
all the application specific ones so that they can all be updated
correctly.
Task-number: QTBUG-62193
Change-Id: I61f46a4745f4e40b9283d40fa5a7473f2721c354
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
If a dead key occurs as a result of pressing a key combination then
characters will have 0 length, but charactersIgnoringModifiers will
have a valid character in it. This enables key combinations such as
ALT+E to be used as a shortcut with an English keyboard even though
pressing ALT+E will give a dead key while doing normal text input.
Task-number: QTBUG-57933
Change-Id: I52fe9edacefe7298a96af5430831f805626bacd2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The cgl convenience module does not exist anymore.
Task-number: QTBUG-63081
Change-Id: Ifda69ba4384258e0ba67b2badd1eb79026908e32
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QMacAutoReleasePool is backed by an NSAutoreleasePool, which documents that
"you should always drain an autorelease pool in the same context (invocation
of a method or function, or body of a loop) that it was created".
This means allocating QMacAutoReleasePool on the heap is not a supported
use-case, but unfortunately we can't detect it on construction time.
Instead we detect whether or not the associated NSAutoreleasePool has been
drained, and prevent a double-drain of the pool.
Change-Id: Ifd7380a06152e9e742d2e199476ed3adab326d9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Tying the pool to the lifetime of QCoreApplication becomes a problem when
the application is allocated on the heap, for example when Qt is used to
create plugins, as NSAutoreleasePool should be allocated and drained in
the same context, typically a function scope.
The feature is disabled for now, until we can find a better way to
achieve the same thing.
Change-Id: I600587df62a8cc7caded5172ad914c0e04d794d9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Tests should not use QCursor to emulate mouse move, see QCursor::setPos() docs.
The flakiness of the test on XCB is not surprising when the test queries geometry
even before the window has been shown. With the re-factored version I could not
reproduce flakiness anymore.
Removed Q_OS_MAC and closed QTBUG-26274 as test passes on macOS from which I
assume that the underlying issue has been fixed.
Removed Q_OS_QNX ifdef as test does not rely on QCursor anymore.
This patch also fixes the issues on minimal / offscreen platform plugins.
QCursor::setPos() is evil for auto test purposes.
Note:
We intentionally use QTest::mouseMove(QWindow *window, ..), not the QWidget overload.
The QWindow version gets routed through QWSI, which ensures that all necessary events
are generated as expect. In QWidget code path this is currently disabled by
QTEST_QPA_MOUSE_HANDLING.
Change-Id: I285c26cff09e3f2750f8c2abbb1f46c8f7be984a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This removes the pre-dexed JAR files activated by the absence of the
bundled_jar_file CONFIG option, as versions of Android >= 5 no longer
support this deployment mechanism.
Now, the "bundled" JARs simply become normal JARs containing class
files, and are neither activated by a bundled_jar_file CONFIG entry nor
do they have a -bundled suffix in the file's base name.
Task-number: QTBUG-62995
Change-Id: I3fa6819259be365b7a697f7db1d1d01a94032395
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
macOS doesn't use different colors for alternate rows
between blue and graphite themes. It's always the same
light gray, as seen on Finder, and we're already getting
it right.
Change-Id: Ic9ff1712ed90728bcc7613d9fe9eeb7a9c90f59b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This provides proper support for proxy styles wanting to
override only parts of QSlider.
Change-Id: Ica1e87c42c8d793708c388cb19f11105c0fc97ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This one uses a hybrid approach. Standalone NSSliderCell has
proven to be quite useless. However, we can access the cell
of a properly configured NSSlider. Then, the cell can be to
render all the QSlider parts as well as getting their rects.
Change-Id: Idedad3e6d80e70631b01125596ed24dae5fde6c7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Speeds up the test from approximately 770ms to 180ms.
Change-Id: I2e5479fd5190b841b44d4a66380d27b1c3b55162
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The sources were already added conditionally in the project file since
179fe5981f.
Change-Id: I0baaec2e772f3e596d311c1973b9745aa2b80423
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QUrlInfo is used only by the FTP implementation, so it uses the same
conditionals.
Change-Id: Ia15abf44d2a538e90b792a31c65926cc9e16aecf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
One of those routines could recurse back. This was a pre-existing
problem for Pre-Pre routines, but commit a92ee2518fdbd77fcbe3f8ef4f412aa
made qAddPostRoutine also use the same mutex.
Task-number: QTBUG-63008
Change-Id: I38341f8155354cc4a776fffd14e17a037d25475f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
As QLocalSocket keeps incoming data in the inner socket object, we
can implement the outer's skip() by simply calling the inner's. This
avoids the slow read()-based code path provided by the base class.
Change-Id: I66547601ebad1b4acf168475bebd81fbeef969f8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It has been there since the first commit 6d70e543aa
of VNC platform plugin, and it has never actually been used.
Change-Id: I6a9c4e6a27de042e18650fa88728a1849a99b094
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Default scroll increment on other platforms (e.g. XCB, Windows) is 120.
With libinput it was 15 * 120 = 1800, which results in non-smooth scolling
experience. This patch also replaces deprecated versions of
QWindowSystemInterface::handleWheelEvent().
Change-Id: I363f13a2922fd871a93dbd1bd611778fa18f6122
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
I guess this signal pattern was copy-pasted from evdev input integration
code, where we use similar signals in combination with QDeviceDiscovery.
In libinput, device notifications are delivered via libinput APIs, so
these signals are not necessary. In evdev we do some logging from
slots that are connected to these signals. In libinput this is handled
via libinput_log_set_handler. As we can see, we can simply drop this code.
Change-Id: I50b519784e89b59ceeb3cf296780705fe98a8cbf
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This results in less boilerplate code, among other benefits that
come with functor-based connections. Simple expressions have been
converted to use lambda.
Change-Id: I6887980524027eada24beed95e6f9ba43f0fc8d5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This gives the user a much clearer understanding of which part of the
test caused the warning.
Old warning:
WARNING: tst_controls::Default::Dial::test_linearInputMode(mouse) Mouse event occurs outside of target window.
New warning:
WARNING: tst_controls::Default::Dial::test_linearInputMode(mouse) Mouse event at 501, 179 occurs outside of target window (450x450).
Change-Id: I2943d79bab5a808e9b5b721758db216b91a07bbd
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It causes artifacts when moving the windows between monitors.
Amends e8ecde99df.
Task-number: QTBUG-53255
Task-number: QTBUG-62901
Change-Id: Ia8b0f760370887a75efa05bc9736075afebfe069
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Bail out of cleanup() when run 2nd time.
Task-number: QTBUG-60626
Change-Id: I8a9be2fcfb0e8a5584ce8ed7952affff24bd2a33
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Enabled via configure --ccache, or CONFIG += ccache in 3rd party
projects.
Ensures that we use the right sloppiness and other ccache options
during compilation.
Task-number: QTBUG-31034
Change-Id: I696b3d3f0398873a29b93d1bc2b4d4e06ef23dc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Attempting to switch /dev/dri/cardX to /dev/dri/renderDY is futile
on its own now since many output-related drm operations fail and we
eventually crash.
Add a new headless mode that skips the real screen stuff and registers
a fairly dummy, headless screen, does not bother with the mouse cursor,
and disallows rendering to the screen via a QWindow (while keeping the
actual rendering still fully functional).
Such applications will not need any special privileges and will run even
if there is a DRM master (X11, Wayland compositor) active.
For example the configuration can look like this:
{
"device": "/dev/dri/renderD128",
"headless": "1024x768"
}
After this applications have two choices to perform offscreen
rendering:
1. Use an ordinary window (and its default framebuffer, meaning the
gbm_surface), e.g. a QOpenGLWindow subclass
MyOpenGLWindow w;
w.show(); // will not actually show on screen
w.grabFramebuffer().save("output.png");
Note that there is no vsync-based throttling. Also note that windows are
still sized to match the screen size, hence the need for specifying a size
in the headless property.
2. Or the typical offscreen approach with an extra FBO
QOffscreenSurface s;
s.setFormat(ctx.format());
s.create();
ctx.makeCurrent(&s0;
QOpenGLFramebufferObject fbo(1024, 768);
fbo.bind();
ctx.functions()->glClearColor(1, 0, 0, 1);
ctx.functions()->glClear(GL_COLOR_BUFFER_BIT);
fbo.toImage().save("output.png");
ctx.doneCurrent();
Task-number: QTBUG-62262
Change-Id: Ic1dbfa2b27b223bd5ef8ba36b665f0f61abf4f06
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
{
"device": "/dev/dri/card0",
"outputs": [
{ "name": "HDMI1", "mode": "1920x1080" },
{ "name": "DP1", "mode": "1920x1080", "clones": "HDMI1" }
]
}
Here, assuming the QScreen for DP1 is unused and the resolution is the same,
DP1 will simply mirror whatever is on HDMI1.
The plane-based mouse cursor is not currently supported. Same goes for any
form of scaling since this simply scans out the same framebuffer on all
target CRTCs.
Task-number: QTBUG-62262
Change-Id: I391be204264284a1bff752ebc2a1dbe5c8592013
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The backing store was assigned the sRGB color profile
as an unintended side effect of the QImage -> CGImage
conversion function refactoring in ac899f6d. This
caused Core Graphics to add a color convert step, which
in some cases caused performance issues.
Restore fast, previous behavior by assigning the target
display color profile to the backing store image.
Color correctness is still a goal, but we’ll add API
for it and make it opt-in.
Task-number: QTBUG-61384
Change-Id: Ia36d29404c64d8030a100f6a71816d84e484308b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>