Change container of spanningIndexes from QVector to QSet to speedup
the isFirstColumnSpanned/setFirstColumnSpanned. The order of the indexes
in the container is not needed and therefore QSet can be used here.
This also simplifies the code a little bit.
Task-number: QTBUG-66714
Change-Id: I1692ca1df751b2b8d26b607faf60ff2b94f6f964
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QItemDelegate::textRectangle did not adjust the width when the item
had a decoration or a checkbox. This lead to a too big width used for
the layouting and therefore sometimes the calculated height was too
small.
This was already done for QCommonStylePrivate::viewItemSize which is
used by QStyledItemDelegate before.
[ChangeLog][QtWidgets][QItemDelegate] fix text height calculation
when the item has a decoration or checkbox
Task-number: QTBUG-16134
Change-Id: I14c47c3f2d8cc0a0b6ec2b2999e70fda213887ae
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Whitelist tests that pass locally and that have been
blacklisted since the BLACKLIST was introduced in
2015 (in commit a8dda3b8).
Change-Id: I777b490313ebaa6c8c8daee168487d350179a5e6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The test has been flaky on top of QEMU. The test is clearly a sort of manually
rolled benchmark, not a regular autotest. Remove the test and replace it with a
benchmark in QObjectBenchmark.
Task-number: QTBUG-66823
Task-number: QTBUG-66216
Change-Id: I7a48293023f32141eed6fea50fbb63af18933a8f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Since we made the NSMenu delegate a singleton we could not rely
on it to have enough information to implement worksWhenModal.
At the same time as the delegate change, we derived NSMenu into
QCocoaNSMenu. This allows us to extend the menu functionality
and, in this case, serve as target for the Cocoa menu items.
We also refactor setting the item's target/action.
Manually tested against menurama and bigmenucreator tests, the
test-case for QTBUG-17291, and the richtext/textedit example.
Change-Id: I222241f71db82611711b23d4a8c6122a741370ae
Task-number: QTBUG-66676
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
To have a stable base for creating temporary files it's useful to have
the temporary path be not just cleaned, but also the canonical path, so
that any symlinks are resolved. This is e.g. the case on macOS, where
/tmp is symlinked to /private/tmp.
Fixes tests that compare paths, e.g:
FAIL! : tst_QDir::current(startup) Compared values are not the same
Actual (newCurrent.absolutePath()): "/private/var/folders/51/hhvngbjd36vbn1ncklb73g2h0000gn/T/tst_qdir-FACBOE"
Expected (currentDir) : "/var/folders/51/hhvngbjd36vbn1ncklb73g2h0000gn/T/tst_qdir-FACBOE"
[ChangeLog][QtCore] QDir::tempPath() now reports the canonical path
of the temporary directory, with any symlinks removed.
Change-Id: I20df9076c9869227f32740b196fd7ffb8b1b9ced
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
They were forgotten when the overloads for append()/push_back() were
added in Qt 5.6
[ChangeLog][QtCore][QVarLengthArray] Added missing rvalue overload of
operator+=() and operator<<()
[ChangeLog][QtCore][QVector] Added missing rvalue overload of
operator+=() and operator<<()
Change-Id: I20fedfba2bf282773bd1f9cf2c8ec06f05896a7d
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Rearrange QSqlFieldPrivate members to only need 64Byte instead 72 in
an 64bit environment.
Change-Id: I620c18aca06a11b7ab4bd8e99b377b9d823da7f4
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When QStandardItem::insertRows/Columns is called with an empty list
or an insert count of 0, do not assert but return false.
Task-number: QTBUG-66491
Change-Id: I328598e08584fb9b0a35075458bfeb31c57ebfee
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since Qt 5.4 the QTabBar can be automatically hidden when it has less
then 2 tabs. Therefore the sizeHint should not consider the tabbars
size when the tabbar is hidden.
Task-number: QTBUG-64715
Change-Id: I2f248f88d9070de5354f7344c7628a78442ab499
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Postgresql needs a special value for nan and +/- inf. This was
considered during insert but not during select.
Also remove some pre-c++11 inf/nan - handling and replace it with
Qt equivalents.
Change-Id: I044ca58e9cf673f4b100b05a0d8e25c8a9c29ec5
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
On Apple OSes, both compilers and linkers are given an absolute path.
For consistency, the same should be done with the C linkers.
The change is also a convenience to the MacPorts project,
which actively discourages ambiguous compiler names.
(https://trac.macports.org/wiki/UsingTheRightCompiler).
Change-Id: Ic1885aed825340696e9fde766788eebf51de3ff6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The privately exported qt_logging_to_console() function has been renamed
to shouldLogToStderr, and exported in the QtPrivate namespace for QtTestLib.
[ChangeLog][Important behavior changes][Logging (including qDebug and
qWarning)] The QT_LOGGING_TO_CONSOLE environment variable has been
deprecated. Use the more specific QT_ASSUME_STDERR_HAS_CONSOLE or
QT_FORCE_STDERR_LOGGING, depending on your usecase.
Change-Id: Ie29228eeac3b700c3de94fee022d5d66d9b5c210
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The simple scaling that only samples every input pixel once, can be
used with downscaling < 2x as well if we just handle the case where the
input can't be in the intermediate buffer.
At the same time the handling of the intermediate buffer has been moved
out of simple scale helper functions so the code can be shared and the
AVX2 optimizations also used for non-argb32pm formats.
Change-Id: I98d225ef8d4f2978480d09110c959b556c563b57
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The printVolumes function already adds line endings.
Change-Id: Id2553f881ccc0ab3c8b8fc77d3096dd5d968abda
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of the current working directory, which doesn't necessarily match
the location of the settings file.
Change-Id: Idffe2e87190cc9b6027fbba3b84e9dbf72ccf2f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
On Windows (Phone) 8.1 __getmainargs was still supported and used
to do the initialization of the application's parameters and
environment. When that functionality was removed together with the
now unsupported OSs,the initial filling of argc, argv, and env part
was forgotten.
Change-Id: I3b788de317b22b4525427faefc3fe974dac5d9ac
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Although WinRT doesn't officially support argc/argv, respect C++03
§3.6.1/2 (The value of argv[argc] shall be 0).
Task-number: QTCREATORBUG-19705
Change-Id: I190e2923b8a0665cc8975a800619fd916a4dd244
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
This is the first step in being able to use the undo framework in QML.
The next step would be to separate it out of Qt Widgets so that a pure
Qt Quick application doesn't need to rely on it.
Note that QUndoCommand is not a QObject, so we cannot expose its text
member as a property until Qt 6.
[ChangeLog][QUndoStack] Exposed canUndo, canRedo, undoText, redoText
and clean as Q_PROPERTYs.
Task-number: QTBUG-40040
Change-Id: Ida7ec03f871f0db7fdcc5b90ed200024c5cb348e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Avoid lots of warnings about not being able to set "modal".
Change-Id: I396718f14a55203f9989c03e20efc647c64795a9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This reverts commit 2eec3272c7.
The change to qWaitForWindowActive causes regressions
in qtdeclarative, so we need a better fix for the problems
we have with window waiting.
Task-number: QTBUG-66866
Change-Id: I8300dabc870d6aeaa9ba6bfcf3d64146b13c1955
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Determine the virtual desktop geometry in native pixels from
the QPlatformScreen siblings. Use the platform window to determine
the local position.
Task-number: QTBUG-36937
Change-Id: Ic250f1b41d8e74099558796112dbd70a7e1f6956
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Use the new API of QWindowSystemInterface to send the release
event which does not depend on the state of
QGuiApplicationPrivate::mouse_buttons.
Amends 1f6bd8bfb2.
Task-number: QTBUG-66447
Change-Id: Iae889ea416b633c9307da9535dfb51ad1dbf288e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This allows to share the atomic request so that applications can blend content
into overlays within the same renderloop.
atomic request will allow several planes update in the same commit.
Change-Id: I762ea96499765ced573e287dbd52d53c64ec7c74
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The code that updates a section size must also update length,
otherwise saveState can end up saving inconsistent state, and
restoreState() goes to an early-return, not doing anything.
The actual bug was fixed meanwhile because _q_sectionsChanged is called
again, which recalculates length. I still see this only as a safety
measure, every other code path that changes section sizes updates length
right away.
Change-Id: I6cc16261692d93b3640afafef600a5bdff8dca0c
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
all of these iterator classes already have a member operator+, which allows iter+int.
This commits addes non-member operator+, which allows int+iter, and forwards to the member
QList and QArrayData iterators now satisfy RandomAccessIterator concept
Change-Id: I25c1dd8cea299e735d5a5e288dbe23dc1d7a1933
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Before running tests that depend on QWindow::requestActivate
Gets rid of several Wayland platform checks in tst_QWindow.
Change-Id: I7a5e029044a968dfcf87ecbb5105c01d52852d35
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
And make it easier to fix if platformName == wayland-egl etc.
Change-Id: Ia2d62ba003796e08f3e8a5bbfd0c3fd9d185e4e0
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Qt should be using its own API in the way it's meant to be.
If there's an issue with Qt's built-in styles it has to be fixed there.
Otherwise this causes problems with styles, such as KDE's Breeze,
which make use of both Selected and Active states for icons.
However, Qt's built-in styles do not have hover effects for tool bar
buttons and menu items, so there's somewhat of a conflict here which
was probably the reason for the workaround used.
Change-Id: Ieaed580f548caf181b1005b4e82e3f2adc1f9ce5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
If you enable both qt.qpa.input.touch and qt.qpa.cocoa.mouse you can
see the order and interleaving of the touch and scroll events.
Task-number: QBUG-66329
Change-Id: I8e1a63e2958b85f7964bb597e49cf8529cb3f32e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Mesa and NVidia have been supporting these extensions several years now.
It also means we can get rid of the dead unused code we had for advanced
compositions.
Change-Id: I6a2fcda13490abd977eb4cc3d8b34f186d05ca25
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Add a branch for QEvent::LocaleChange to the QAbstractSpinBox::event()
handler to call updateEdit(). This will update the edit in case the
locale's number features changed (decimal separator etc.).
Task-number: QTBUG-65315
Change-Id: I9015b3a5bbe8e7b80f7bafa13f0f431507bc4cf7
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Change-Id: I7d5f211e2441415134c5905b159b41dc3b2b231b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When QCocoaWindow::setWindowFlags is called, the window()'s flags have
not been updated, so re-computing the collection behavior based on those
would not be correct.
Change-Id: I5512da75104483eac7100880c164a9d08fd82984
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit adds support for DRM atomic to qtbase eglfs/KMS QPA when
libdrm and device supports it.
Compared To legacy DRM API, atomic API allows to update multiple planes
in one vsync. This is the first part of some work that should follow
and allow:
- DRM framebuffer upscaling for embedded devices that have weaker GPUs
- Sharing the drm atomic request if the KMSDevice so that applications
in userland can blend content on overlay in the same vsync loop.
One of the application for DRM atomic and Qt is typically videoplayer
integration at high resolutions (UHD) on embedded devices which cannot
use their GPU to render such videos, but are able to render it to a drm
overlay.
Change-Id: I047adf3e3d07a53440d52c2a7073c9ed054adf34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Changed old signal/slot syntax to new version
Task-number: QTBUG-60635
Change-Id: I7cbe8851d321b7632a08c098b69a96cc346d5f83
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This is needed to be compatible with latest Qualcomm BSP releases.
This patch also makes it possible to select HW layer via
QT_OPENWFD_CLIENT_ID and QT_OPENWFD_PIPELINE_ID environment variables.
Change-Id: Ie795b21afc61a1de7c1d0b52cdb30a754e3f8266
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 00f693d3e5046999270c92731e34a3e7fcd01c6b)
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
By using qWaitForWindowExposed instead of qWaitForWindowActivated.
Task-number: QTBUG-66824
Change-Id: Idf604157070731d9c92ccf64d8349c8571960b7c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The test actually passes, so there's no need to skip it.
Task-number: QTBUG-66824
Change-Id: Id091776ff7ca7637fdcf0e0ced833982b5788d92
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>