There was an offset equivalent to all the margins we add to
the action rectangles. We need to subtract it in order for
both menu items, parent and sub-menu, to be aligned. This
amount is given by the sub-menu's first action position
relative to its popup.
Change-Id: I141bbe3cfb81825a25b12e4059b93e61c29df518
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Matches glibc commit 9a0cc8c1bd7645bf3c988890ffb59639c07a5812.
[ChangeLog][QtCore][QUrl] Fixed a bug in parsing IPv6 addresses with
more than 4 hex digits in a component.
[ChangeLog][QtNetwork][QHostAddress] Fixed a bug in parsing IPv6
addresses with more than 4 hex digits in a component.
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=9a0cc8c1bd7645bf3c988890ffb59639c07a5812
Change-Id: I2701038131d91eb108aebb3bec16278e4efe3de2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Useful for making sense of the event dispatcher, especially when running
tests.
Change-Id: Iea84bcfb40d4954439c2e31ffc0197c64907e800
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Many Android systems come with a locked down system call list, causing
the statx(2) system call to fail with an unexpected error code or by
delivering a signal to the application. Because of the signal, we can't
do runtime detection...
This is not our bug: it's obviously a mistake in the SECCOMP rules in
Android. But we work around the issue.
Unfortunately, because of a few manufacturers who can't configure their
rules properly, everyone will suffer.
Task-number: QTBUG-64490
Change-Id: I39332e0a867442d58082fffd1507a49415917384
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
There is no codepath that can result in d->baseTheme being nullptr.
Remove the checks and get rid unneeded and sometimes dangerous fallbacks
(createPlatformMenuBar(), showPlatformMenuBar() and three more methods
could overflow the stack because of infinity recursion).
Change-Id: Ib03adadf56c169286de42671e2da506502df7aea
Reviewed-by: Jan Grulich <jgrulich@redhat.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the VK is hidden keep cursor handle the cursor handle visible for
~4s after user last activity.
Task-number: QTBUG-66806
Change-Id: I8122c5886efaeee86bb691ad971aa7a3e3d7f8e1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
- turn CursorHandleShowMode in a QFlag for better control
- add ScopedValueChangeBack which is useful to control m_blockUpdateSelection
- implement longPress word selection
Change-Id: Ieed709644db991e10077d5be5d5a59f16f4fc3a8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Makes the naming of QPA logging categories the same across different
platforms, which makes it easier to debug an unfamiliar platform.
Change-Id: I60ed34892d154e86723c8e4bcff3c28fcab1f7a1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
it's antithetical to do that, as raw data is documented to be not null-
terminated. QString doesn't, either.
Change-Id: I7ded83a09f64e747a248f9bdac2a364032aae4c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Avoid doing the conversion over QRgba64 when we don't need it.
Change-Id: Ic2f82bef0a80b17ef7803eedcdb0600eeac96489
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The Test Anything Protocol (TAP), was originally Perl's simple text-based
interface between testing modules and test harnesses, but has since been
adopted by a large number of producers and consumers in many different
languages, which allows colorizing and summarizing test results.
The format is very simple:
TAP version 13
ok 1 - test description
not ok 2 - test description
---
message: 'Failure message'
severity: fail
expected: 123
actual: 456
...
ok 3 - test description # SKIP
1..3
The specification [1] is very brief, so the implementation has been
based on how typical consumers behave, especially when it comes to
the undefined diagnostics block.
[1] http://testanything.org/tap-version-13-specification.html
Change-Id: I616e802ea380165c678510e940ddc6607d39c92d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This function was not appearing in the QVariant docs because the \fn command
was wrong and because clang was not seeing the declaration in qvariant.h in
the first place. With this update, the function does appear in the docs, but
it's signature is not correct because clang can't find a definition for
std::variant<Types...>, which probably means it doesn't have the most recent
declarations in the std namespace.
Change-Id: I7912ff333e5d4a8619461dd3ab7ee34bcd8f2289
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Allocate new shared memory only when window size grows or when window
size is 2 times smaller than allocated memory size. This improves
window resizing performance and also allows to free some memory if
window becames much smaller.
Change-Id: I3454cd3c6023eede8242d6b29038f4dd6638f9f1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
This reverts commit 7257862fb2.
It has been reported that this patch causes widgets with certain effects
become invisible.
Task-number: QTBUG-60231
Task-number: QTBUG-66803
Task-number: QTBUG-66387
Change-Id: I9c3c4cf2f17ac639d1aee5489b665aa1e165af16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Rename getter QHeaderView::firstSectionMovable()
to QHeaderView::isFirstSectionMovable(), turn into a property
and fix \since.
Change-Id: Ica2ca43d22f3fd78ff63178ba75014807fc9b823
Reviewed-by: David Faure <david.faure@kdab.com>
Also makes the qt_rectfill_quint16 actually work with any uint16 format
Change-Id: Ibb3deed54ee1a0a86b14d5349c95f106ced057f7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Commit f55c73ede2 added various backendConfig methods;
API review for 5.11 pointed out that Config should not be abbreviated.
Change-Id: I3b294b44a030b2a6e4cdd034fa27583c228dfe42
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Tripped over by Alexei Fedotov and brought to light on the developer
list; Thiago says it's a left-over from before reworking to actually
use getentropy() instead of getrandom(); it should no longer be
needed.
Change-Id: Id09b0628e58fa62170a0f0da35b2b121f3fb0172
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
When calling showFullScreen(), the setwindowStates call in the
QWindowsWindow constructor led to generating a resize event. This is
pretty bad for example when QOpenGLWindow is involved since the QWindow's
platformWindow member is not even set yet (handle() == nullptr) so
everything related to OpenGL contexts starts failing (as there is no
underlying platform window yet as far as the QWindow is concerned).
In short, generating geometry changes from the platformwindow ctor is a
bad idea. Use initialize() instead for that.
Task-number: QTBUG-67027
Change-Id: I35d11949213eb21f81b2ff2d4f2282cb36510210
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
- Directly apply the flag in case the platform window exists and
is in full screen.
- Store as a dynamic property in case the platform window is not
created yet.
Amends 69839e55c1.
Task-number: QTBUG-41309
Task-number: QTBUG-66557
Change-Id: I162baecfae4d07a5d5b59c5401bdb605faa7ab68
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Add more message codes and fix the whitespaces in the output:
EVENT: hwd= 0x280484 WM_WINDOWPOSCHANGED msg=0x 47 et=0x 21e wp= 0 at -2208 -31887 handled= false
->
EVENT: hwd=0x2204d6 WM_WINDOWPOSCHANGED msg=0x47 et=0x21e wp=0 at -3280,-19633 handled=false
Change-Id: I89a7b3bd328748ef39fe2dcd789497f43e9d4a2a
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The generic one is better optimized and faster at this point.
Change-Id: Ie7eef2402265183ef4d27a7f0eab5dc801beba7a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When the source model of a QSortFilterProxyModel has rows removed, a
mapping is performed in order to figure out which corresponding rows in
the sorted and filtered view of the model are affected. In doing so it
constructs a vector of removal intervals which are subsequently used to
emit rowsRemoved signals. In the case where many rows are removed (e.g.
all of them), many removal intervals are identified that are often
adjacent and could be simplified, which is what this patch does. i.e.
instead of emitting 3 rowsRemoved for 0-3, 4-6, 7-12, now a single
rowsRemoved is emitted for 0-12.
Change-Id: Ia503091cc4928378c88257cd8b431582e9ff454e
Reviewed-by: David Faure <david.faure@kdab.com>
WindowStateChangedEvent::oldState is of type Qt::WindowStates and should
therefore be set to QWindow::windowStates() instead of QWindow::windowState()
Change-Id: I6710624dd303642a31bfbb25bc07bf05b921d84c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QDir::isAbsolutePath(name) thinks any path starting with a slash is
absolute; however, to return a valid absolute path, we need to put a
drive prefix onto such a name. So use QFileSystemEntry::isAbsolute()
for that check (it believes in the need for a drive, or UNC prefix)
and handle the absolute-but-for-drive case when it arises.
Add a regression test and make related changes to existing tests.
Task-number: QTBUG-50839
Change-Id: Id5d2b2586bb1423fa2d9375a298a4bb5241cffe0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Avoid using the two fast-scaling paths, while they might not overflow
in this case, they do not have enough precision in their fixed point
math to render accurately.
Task-number: QTBUG-53582
Change-Id: I2e063ee90defbecd79a12a6ce02a74c60d1805df
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This is done in QAction::event(), not eventFilter().
Change-Id: Idc5d7864d259dcf035543c40c8e7b6acd86bde9b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QRasterPaintEngineState::flags.non_complex_pen was not initialized in
the ctor which leads to valgrind warnings. Initialize it to false - the
correct value is set within update/ensurePen() before it is really used.
Task-number: QTBUG-66615
Change-Id: If154873ad89903c243662ab1f140f74434a6f88c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Set the color buffer depths on the PIXELFORMATDESCRIPTOR for
the fallback code path (-platform windows:gl=gdi).
Task-number: QTBUG-66797
Change-Id: Idccd94fdf121803af1c19e34cc86b6f06ca88d90
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The Q_GADGET macro cannot be used in templates. It can however be useful
to derive a template class from a Q_GADGET enabled base class to benefit
from type safety features in C++ (e.g. the class could represent an id
or handle for some C++ type).
For proper wrapping of a QVariant with a gadget value in a QJSValue, the
QMetaType::IsGadget flag must be set for the registered template
instance type - which does not happen prior to the fix because
IsGadgetHelper requires qt_check_for_QGADGET_macro to be defined in the
registered class but not in an ancestor class - in other words: The
class must declare Q_GADGET.
To overcome this, IsGadgetHelper/IsPointerToGadgetHelper can now
differentiate between a Q_GADGET flagged class (allowing
automatic registration) and a derived class, e.g. a template class
(forcing Q_DECLARE_METATYPE to be used explicitly).
[ChangeLog][QtCore][QMetaObject] It is now possible to use template
class instances inheriting from a Q_GADGET in Qml
Task-number: QTBUG-66744
Change-Id: I7632ad45cff79fa422b3f852ca0b963f35fab155
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QtTestLib uses its own message handler for plain text logging, so it doesn't
go though the logic in qDefaultMessageHandler that dispatches logging to
alternate logging sinks.
Building on the approach of Android and Windows, we log to AUL from the
plain text logger. A future improvement in this area would be to make
QtTestLib make more use of the infrastructure in qlogging.cpp, but this
is a bigger task and requires a better overview of the requirements.
The AUL code has been isolated into a wrapper, to allow logging both
to AUl and to e.g. the QPlainTextLogger. This is needed so that we
short circuit the plain text logger in case AUL already has handled
printing to stderr.
Change-Id: Iee0c3902190bd081b7ffbaf77c41b3118ce7f6da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The check on line 972 says lcQpaXInputEvents().isDebugEnabled() so
that debug output was always showing "from 0,0" due to
lastScrollPosition not being set.
Change-Id: I345732e36db05108f70474261c47e78333b57d30
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Divide the whole FP1616 value by 0x10000 instead of dividing
the integer part by 0x10000 and the fractional part by 0xFFFF.
It also makes fixed1616ToInt() consistent with fixed1616ToReal(),
see 7d3f353a5b.
Change-Id: Id76025028c926872b002ef0a1ca8a8bdc2de3e1e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This fix issues where long plain text where not wrapping and being
unreadable.
Change-Id: I64d4ce94f7460d00d1722647893bd8f70e5ea8d6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
If buddy is deleted then QLabel will still try to deliver the
shortcut event to it, in QLabel::event(), and cras.
Besides connecting to destroyed() which alone fixes the crash,
also hardened it and guarded against dereferencing null buddy,
in the unlikely event of someone adding features to QLabel.
The second part is suitable for backporting to the LTS branches.
Task-Id: QTBUG-66841
Change-Id: Ib6a36a9f99cee31afe1f88eb77f5b6cafb8b1086
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
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>
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>
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>
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>
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>
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>
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>
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>
The default value for a default constructed FindFlags QFlag is zero and
FindCaseSensitively is 0x2. Therefore the default behavior for find() is
case insensitive.
Change-Id: Id3419c3562fc6170fdb281098a22dd8205603847
Task-number: QTBUG-62660
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This adds subscription to additional config changes on Android to
avoid the application automatically restarting when the SIM card is
replaced or the logical density of the screen is changed (as a result
of the user changing it in settings).
These restarts are especially problematic when using Qt in a
home screen application due to the way they are launched.
[ChangeLog][Android] Avoid the system restarting application when
user replaces SIM card or changes the logical density of the screen.
Task-number: QTBUG-63735
Change-Id: Iba85fe6239b2d29b543b3c4e2f953efb9b54f713
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
To avoid needless detach()ing:
- don't make copy of tabArray unconditionally.
- use qAsConst to avoid detatch in for loop.
- For CoW types, prefer const methods.
Change-Id: I3273316bdd862fee4c66bad8291898a9ed913c60
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This follows on from a232251992 which
covered a similar instance of this. As with that change, we should not
abort the compilation, just ignore it.
Task-number: QTBUG-63772
Change-Id: Ide958080a90f43ed19edd8a320e7d45de1c96821
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QTableView draws its gridlines at width/height of the cells. This
means that there is no gridline at x=0 and/or y=0. This is fine when
there is a header. But when the header is invisible, an additional
line at 0 must be drawn to have a boundary to the neighbor widget.
When a span is drawn, the clip rect has to be adjusted in this case
because x/y=0 belongs to the cell (and therefore would be clipped
out).
Also fix the drawing of the grid lines in RTL mode and with
ScrollPerPixel.
Task-number: QTBUG-22972
Change-Id: I1829770e3d5bf65421b590f7bb7354cbf222e3fb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When _q_sectionsChanged() is called from e.g. QSortFilterProxyModel
the LayoutChangeHint is set which can be used to avoid useless work
in this function.
Change-Id: I034db3fcc7a5f9ea7ebc0fa3ffd7429edb154eb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since pthread_cond_timedwait takes absolute time instead of relative
time like most POSIX API, there's a small gain in performance here: we
avoid an extra system call to get the current time.
Task-number: QTBUG-64266
Change-Id: I25d85d86649448d5b2b3fffd1451138568091f50
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The indentation of large code blocks in setModel() and clear() are not
correct. Needed for another change to avoid whitespace changeds in there.
Change-Id: I620c8c5e83e98747f5c17469738722cf976fb467
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Looks like this should be "super." instead of "super_"
Found by spotbugs.
Change-Id: I83d096eee332361d62e783581bfa15017536081d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
When first starting an Android app we have invocation order issue, to
load the platform plugin we create the default QLocale (needed by the
resource locator code to see if :/qt/etc/qt.conf exists) so when the
android platform plugin loads and creates its own QSystemLocale, the
QLocale defaultLocalePrivate is already created and pointing to
globalLocaleData which means that systemData won't be called and thus
the code that triggers the call to QLocalePrivate::updateSystemPrivate
won't be called when calling QLocale().
I thought of two ways of fixing this, one was calling
QLocalePrivate::updateSystemPrivatea() from the QAndroidSystemLocale
constructor, but giving the responsibility to not break things to the
plugin seems a little fragile, so making the check on QLocale()
seems better.
Without this patch an Android app doing
QApplication app(argc, argv);
qDebug() << QLocale().name();
qDebug() << QLocale().name();
qDebug() << QLocale::system().name();
qDebug() << QLocale().name();
would print
""
""
"ca_ES"
"ca_ES"
now it correctly prints "ca_ES" the four times.
Task-number: QTBUG-41385
Change-Id: I2cf419f59aa008fa3aca11295fe7d42c40bcc32e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When reading an HTML file with <H1> for example, we still set the font
size as before (that's how it always was done),
but now it remembers that it came from an H1 tag, so it writes
<h1 ...><span font-size:xx-large ...> ... rather than
<p ...><span ...> ... This will help with the upcoming Markdown
format, where heading level is saved but the font is not.
Now the style combobox in examples/widgets/richtext/textedit can set
list item type, heading type or "standard" formatting, and also shows the
current formatting of the line that has the cursor. It was always a
shortcoming in this example that it only allowed setting the current line's
block format but had no feedback to show the current format.
Change-Id: I0a7849b74f23fea84d3375c487c3a6b9f43240c1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
[ChangeLog][QtCore][QJsonValue] fromVariant() conversion now converts
from QUrl and QUuid using special encoding forms to ensure best JSON
compatibility.
Change-Id: I56b444f9d6274221a3b7fffd150cdc5ca1f87ff1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
For compatibility with other parsers that may expect it to be so.
Change-Id: I56b444f9d6274221a3b7fffd150cd66390f98fd5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Seems this issue is still there with Adreno 5xx and 6xx is suspected to
have it as well (no device to test though), so added both 5xx and 6xx
to cover these. Updated 30x to 3xx in order to cover Adreno 320 and 330
as per https://en.wikipedia.org/wiki/Adreno.
Amends 9ae028f507
Task-number: QTBUG-66702
Change-Id: I6ce3f6499d3ff9da884be45039e5f5e0990f7e1f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
After a37785ec76 went in, it become
apparent that multi mouse button state handling in qtestlib is
non-existent, for details see QTBUG-64030 and QTBUG-63786. What
happened behind the scenes often was not what one would expect based
on the provided QTest::mouse* input sequence - events went missing,
incorrect events were generated, each subsequent test function
started with a state set from the function that run earlier. It is
easy to see how a minor change in one test could easily affect outcome
of other tests.
With a37785ec76, Qt platform plugins
are now responsible for sending explicit mouse button type and state
information; qtestlib should take full responsibility now as well.
But using the new API from a37785ec7 alone in qtestlib is not sufficient.
We need to reset mouse state between each new test function run (we do
this at function scope as that fits with the current qtestlib API user
expectations). This patch implements the necessary reseting logic.
Updated tst_qwindow.cpp::generatedMouseMove() to use QTest::mouse* APIs.
That test requires pressing multiple buttons, it was not possible with
QTest::mouse* APIs before this patch.
Added an auto test for multiple mouse button pressing/release in
tests/auto/testlib/selftests/mouse/. And few other tests which are
currently QSKIP-ed, but should be considered when re-designing qtestlib
APIs.
Task-number: QTBUG-64030
Change-Id: I39fdcbc73a467a7463ce2aed622bf22484095635
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QXcbScreen::format() was producing console warning and returning invalid
format if rgb-swap was necessary. Let it match possibly reversed formats
since the backing-store will swizzle it anyway.
Change-Id: I6a53cb8ceda029e9d708d25ad635832f1163ffe7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Factor out a function to calculate the size and update the size when a
style sheet parent is set.
Task-number: QTBUG-64550
Change-Id: I3afe997085eae3cd48b7fe0a4c98582a8f572260
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
This avoids issues when using dependencies installed in a custom or
dedicated $prefix, when PCRE2 is configured to install its headers
in their own directory under instead of directly in $prefix/include.
Task-number: QTBUG-66355
Change-Id: Ia99464820600282d61237e5bcff38101d2c9684b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Before there was a risk looking up e.g index -1 if there
were no visible sections in layoutAboutToChange.
Change-Id: Ic911e4292e8e8c4892fef1c0f34cf7dccaad2bac
Task-number: QTBUG-65478
Reviewed-by: David Faure <david.faure@kdab.com>
This fixes cross compilation with mingw from a case
sensitive filesystem.
Change-Id: I0f5ba708b7138cae325ff564559d3e40eba4e714
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The refactoring to support multiple providers broke alias resolving
(e.g. "text/directory" would be an invalid mimetype, instead of being
resolved to "text/vcard"). The unittest didn't catch it because most of
it was running with a single mime directory (and therefore a single provider,
in the new model). Fixed by re-running a number of test methods once we
have a second mime directory.
Change-Id: Ib5da89ba79c11ed41813b2aff4bc71c30afcde7d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
No behavior was changed, just cleanup so the upcoming feature
can land safely, with an elegant diff.
- Removed all naked qobject_casts<QStyleSheetStyle*>(), replaced
them with qt_styleSheet() (which does the same, for now).
- Removed a bunch of #ifdefed'out "metal hack" code. The code is disabled
and enough time has passed without nobody needing it.
- Removed a few "extra ? extra->style" by assigning it to a variable first.
- Misc
Change-Id: Ia45c38b06e2b5d2426635f730b4cb42c7ac1251d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The UBA in Qt was out of date, implementing the spec from pre
Unicode 6.3 days. It missed handling of directional isolates and
paired brackets.
This adds a completely new implementation of the UBA, that is
compliant with Unicode 10.
Added the test data from Unicode 10 to the qcomplextext auto
test and ensure that we pass the test suite.
Task-number: QTBUG-57743
Change-Id: Ie2d957bc9775d82f0a51d1c78dc6bd154f22847c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If the script item is rtl, we need to subtract the offset inside the
ligature again, as the full width of the ligature would have already
been added in the loop before.
Change-Id: I544ac6fa19484b35335767e1ba1befc3dfa07693
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We recreate the window of our QNSView in various situation such as changing
the styleMask, which results in either a new QNSwindow or QNSpanel being
set as the window of the view. KVO-observing the window property of the
view will fail we then have a new window instance, and will crash when
trying to remove the observer from the new window.
Unfortunately catching the NSRangeException that happens when removing
an observer from a 'switched' window is not possible, so the user is
left with:
Terminating app due to uncaught exception 'NSRangeException', reason:
Cannot remove an observer <Foo 0xabc> for the key path "bar"
from <QNSPanel 0xdef> because it is not registered as an observer.
Change-Id: Ib2adbb99f19303a054fb1eb65e959aecd32b1162
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
qtbase/src/gui/painting/qoutlinemapper.cpp: In member function ‘QT_FT_Outline* QOutlineMapper::convertPath(const QVectorPath&)’:
qtbase/src/gui/painting/qoutlinemapper.cpp:182:76: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QPointF’ from an array of ‘const qreal’ {aka ‘const double’} [-Werror=class-memaccess]
memcpy(m_elements.data(), path.points(), count* sizeof(QPointF));
Change-Id: Ieca99f0262c57e58adbcf48ac923ae11bd428b00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
qtbase/src/corelib/tools/qvector.h:782:16: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class QRingChunk’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
memmove(b + 1, b, (d->size - offset) * sizeof(T));
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../include/QtCore/5.11.0/QtCore/private/qringbuffer_p.h:1,
Change-Id: I6583241223fe3fc76c0b792779993a34aa9485fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It can be used if, for example, you get an image MIME type
from the user, and you want to find the appropriate format
for loading or saving this image.
Task-number: QTBUG-49714
Change-Id: Iae5a7e9d658d6c3d1cd750a8bbc279f1812f99df
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Based on the information we got from Unity developers, we need
to check for window's frame geometry to be set, not just window's
position to be set. On various window managers, a window is
'ready' once the frame geometry is set. This fixes autotest
flakiness of tests that use qWaitForWindowActive.
Task-number: QTBUG-66216
Change-Id: Icb664e7b802b474919f3b058c00681574522ccbe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Windows does not send a mouse release by itself, which can
leave Quick controls believing the mouse is still pressed.
Synthesize an event.
Task-number: QTBUG-66447
Change-Id: Ia865edddc0c77a1b42b9ad2c38323379e74b6704
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
On Debian 9, the sanitize library exports only dlopen symbol, but
it doesn't export the other ones.
We need to check all dl symbols that we use, otherwise "-ldl" will
not be added to the libs list.
Task-number: QTBUG-64864
Change-Id: I3e62b82985348c40b8b61302ba589d5564598e18
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The coordinate conversion was wrong. Use
QCocoaScreen::mapFromNative() instead.
Task-number: QTBUG-53184
Change-Id: I50f18d68ba5d7e1cb5046523a608bfa2e076d7ea
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
We don't need xkb state APIs to check for keys on first level.
Change-Id: I728e6bfe09bce127ad8eae78ecee7cefd620f52e
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This will allow us to reuse these functions on systems that
do not rely on X11, but use libxkbcommon for handling keyboard
input.
Task-number: QTBUG-65503
Change-Id: I78034238771be96fbb38e8187801fefbee1a5fed
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This is a more correct fix for QTBUG-48795. The original fix
was unnecessarily using non-XKB code path for updating state
for all incoming key events. This would result in losing some
valuable bits from xkb state.
Task-number: QTBUG-48795
Change-Id: Ic4fb28b2d834272f1db2cbf5888cafb209707847
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
xkbcommon-keysyms.h is generated from X11 header files, so it
contains all the same values.
Removed all of #ifndef XK_* as those keysyms are present in
xkbcommon-keysyms.h (checked the header from 0.4.1, the minimal
required version). The same for XF86XK_* defines.
This will allow to reuse some of this code on platforms that
don't depend on X11, for details see QTBUG-65503.
Task-number: QTBUG-65503
Change-Id: I68083e11cea1f29d775a6ed46503a06b04b9a05c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
- Use smart pointer for handling xkb state.
- Make it more clear (in the code and the comment) when a latin
keysym is used.
Change-Id: Iee8106c72177c22b1a8fe875027b1dda82196b36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Now also digits from other alphabets e.g ۲ (arabic two) are mapped
to Qt::Key_* digit keys.
Re-factored logic:
- All known dead keys have direct mappings since
1d86e5f84a. Don't special treat them
in "unicode mapping" code path.
- Removed the ISO8859-1 legacy logic, which is leftover from Qt4
where keysym to Qt decoding was done from raw data. In Qt5 we always
get a utf8 string from xkb_state_key_get_utf8(). Furthermore,
ISO8859-1 and utf8 encode ASCII exactly the same way.
- Set Qt::KeypadModifier from key input handler methods. This logic
does not belong in keysymToQtKey().
Note:
KeyTbl[] and keysymToQtKey() have been duplicated in several places
in Qt. That stuff will be cleaned up as part of QTBUG-65503. This
change will make those cleanups easier.
Task-number: QTBUG-58865
Task-number: QTBUG-65503
Change-Id: Iaf10205a26804f7fc03eb8a16a0879f1bd7bf332
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
3edcd9420e added more robust support
for keyboard input on XKeyboard-less X servers. The various fallbacks
that we had did not work that well in practice. We can remove them now.
The xkb_keymap_new_from_names() function relies on reading XKB config
files from a file system. Since we don't use this function anymore, we
can also simplify xkb context creation (see XKB_CONTEXT_NO_DEFAULT_INCLUDES),
as we don't care about DFLT_XKB_CONFIG_ROOT (which we previously set
via -xkb-config-root for the bundled libxkbcommon).
This patch also changes the code to use smart pointers for managing
the global xkb context, keymap and state.
[ChangeLog][X11] The -xkb-config-root command line switch has been
removed as it it no longer needed when configuring with -qt-xkbcommon-x11.
Change-Id: I80eecf83adae90af5cd20df434c1fba0358a12fd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Remove the Xlib dependency by extracting XConvertCase
from libxkbcommon sources (xkbcommon/src/keysym.c).
libxkbcommon >= 0.8.0 exposes case conversion APIs, but
we should prefer using the slightly adjusted version (see
the patch for more details).
This change also is necessary for follow-up cleanups.
Change-Id: Icf1716e0ad26f46a7aefb23722cfc57957754d5e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This change amends 305dd1b61f, which lost
1514b4e8 and brought src/corelib/json/qjsonarray.cpp back, which got
removed in c9c9adeef9. In
a6b697ca13, it was moved to
src/corelib/serialization/qjsonarray.cpp in 5.11.
Change-Id: Ic6134a78d75a9c245934cf70a67a54c80a3e7c85
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This change amends 305dd1b61f, which lost
40334303 and brought src/corelib/xml/qxmlstream_p.h back. In
a6b697ca13, it was moved to
src/corelib/serialization/qxmlstream_p.h in 5.11.
Change-Id: Ia1e9841b866ff49f7274b1b13fd224c0a20a017e
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
- There is no need to mention qkeymapper, which is an internal
implementation detail.
- Describe the encoding of int.
- Add a note that calling possibleKeys() outside key event
handler context is not valid.
Change-Id: Ife9b7d1496f04b5a433ed2d56f29c4f01f174441
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
... which was trying to fix a rarely occurring situation where system
settings from a desktop environment does not set any latin keymap on
X. This is a DE bug and it has a simple workaround (details in the patch).
Ubuntu has fixed this issue sometime between 12.10 -> 14.04. Gnome 3
always appends 'us' layout, even if you have only e.g. 'gr' listed in
keyboard layouts (can be checked via setxkbmap -query). In KDE, the
global system shorcuts seem to stop working as soon as latin keymap
is not the first in the list, which means that KDE users won't be
affected as they will likely always have a latin keymap present in
the list.
This patch removes parts of 2b666d9576,
the parts that in the commit message I was referring to by this quote:
"lookupLatinKeysym() also handles the cases that did not work in Qt4
with XLookupString".
Since finding a latin key is not working by XLookupString() in this
rare case, then it would not work pretty much across the whole desktop.
And users would be more interested at finding a solution that works
across the desktop. We should not workaround this issue. Desktops that
are doing it wrong should learn about this and not repeat the same mistakes
on Wayland systems, where XKB keymap is assembled by compositor and passed
to clients. Clients should work with the provided keymap as is.
The missing-latin-keymap workaround is considered fragile for several
reasons - it might not work with legacy or enterprise X server key codes
and it relies on global _XKB_RULES_NAMES (there might be several connected
keyboards). And theoretical limitation: client might be running in a
restricted environment where we don't have access to keymaps on the
file system.
Change-Id: Ib445b2ea46174248cfa0e5da0eb642cd2a5cf2f6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This is a signal that is not actually supported by the
StatusNotificationIcon standard, but it comes to be important
for the Qt implementation of it, in fact qt apps might
not have a menu, when exporting the Menu path as /NO_DBUSMENU
or they could add this later in the execution.
So, currently there's no way for the StatusNotificationWatcher
to know when a menu has been added (or changed).
Adding a NewMenu signal won't cause any troubles, but will
allow watchers to be notified properly on menu addition.
Change-Id: I9a8b00213f5023950811af1d62cd91bc51744b78
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Commit cf4a611115 refactored out test
identifier buildup into a standalone function, but it returned the
QTestCharBuffer as a value type, which ultimately caused it to crash:
Unfortunately QTestCharBuffer is not copied correctly: Since it uses the
default copy ctor it will copy the buf pointer and create a deep copy of
the staticBuf pointer. When the dtor was later called it would then end up
calling free(buf) (where buf pointed to the staticBuf of the original
QTestCharBuffer).
Task-number: QTBUG-66607
Change-Id: Ifa290658be6f077a0d6613451c26aeeffc8df41c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6ffb358822)
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
GTK's scale factor, which can differ from Qt's scale factor, must
be taken into account in the native GTK menu positioning function
qt_gtk_menu_position_func().
Task-number: QTBUG-55251
Change-Id: I4ad460baab54facd25564ad85ded383c9321d597
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
When the table for a selected column can't be determined (e.g. because
there is no table for it), PQftable returns InvalidOid. This was not
covered and a query to determine the table name was executed every
time which slowed down calls to QSqlQuery::value(QString).
Task-number: QTBUG-65226
Change-Id: Idd8fbaaef7b01ca4151439f46cad2cce6f1c93e9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Use a range-based for loop instead of index-based access.
Change-Id: Ie43aee540062eec4800f39915ebd42d5a3cae4b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
CGDisplayCreateImageForRect seems to have a weird behavior when mixing
highDPI and non-highDPI screens since it may take part of the
non-highDPI screen when the highDPI display is at the left or at the
top of the main monitor.
To workaround this issue, we capture the whole screen and then crop the
image to the desired size.
Task-number: QTBUG-47643
Change-Id: Ib2a3850a0a549964c7fe272abb563bd23518c234
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
While both GCC and the GCC compatible clang support this attribute in
general, GCC doesn't support it when targeting macOS, ending up with
errors like these:
error: 'init_priority' attribute is not supported on this platform
This error isn't a property of the platform itself though, since
clang supports the attribute just fine on macOS.
The attribute is only used to work around an issue with dllimport
on windows, so limit its use to that platform, to avoid issues
with it potentially being unsupported on platforms other than
macOS as well.
This fixes compiling with GCC for macOS.
Change-Id: I0235e6365635d73233951566c10ad869b26a0fc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Configuring Qt with -no-feature-ftp cause build to fail.
Change-Id: I47f1cdc400702d0211a9f620c8606983f08fa70c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This reverts commit 71090f0950. Changing
the link was wrong because we do not actually comply with the new RFC.
Task-number: QTBUG-66470
Change-Id: I940917d6763842499b18fffd15147cb93c27b7f4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use QT_DEFINE_QPA_EVENT_HANDLER to define
QWindowSystemInterface::handleCloseEvent().
Change-Id: I4f1105f7aa78bdebddfe9062b388eb616e325e31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Platforms can reimplement this function to control
how non-spontaneous window close is handled.
Make QWindow::close() call this function.
Change-Id: I3da13e6c8519de2af7e54334d8a1e833ce98cba1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QOpenGLProgramBinaryCache::setProgramBinary() should check
GL_LINK_STATUS after glProgramBinary(), but doesn't.
In practice, this means that SDDM is a white screen, and KDE is just
a gray task bar.
So far, Qt tries to check this using its internal ::link() function.
But in case the cached binary fails to load, Qt currently attempts to
link the inexistent program, resulting in a zero-length, fixed
pipeline shader.
Checking this already in ::setProgramBinary() makes the call to
::link() superfluous, so we remove that as well.
Done-with: Max Staudt <mstaudt@suse.com>
Done-with: Michal Srb <msrb@suse.com>
Done-with: Fabian Vogt <fvogt@suse.de>
Task-number: QTBUG-66420
Change-Id: Iabb51d0eb2c0c16bde696efff623e57d15f28d82
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Do not clear the settings of QHeaderView during layoutChange when the
model is empty and the section count did not change. This will not work
when a section is moved or a section is replaced with a new one during
layoutChange. But since layoutChanged is also called on sorting, this
patch ensures that the settings are not cleared in this case.
This restores the behavior to the same as before 5.9.4.
Task-number: QTBUG-66444
Task-number: QTBUG-65478
Change-Id: I39989cfd45b42e58f49d18ec014d3a941cadb6c9
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
During (re)storing the sections within layoutChanged handling, the
hidden section size was not properly stored which lead to a section
size of 0 when the section was unhided afterwards.
Task-number: QTBUG-66413
Task-number: QTBUG-65478
Change-Id: I0b714c7e0530a1eae82b3bb0e0dc80ed576522d0
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Rename example savegame and its snippets following
a6b697ca13.
Fix:
/qtbase/examples/corelib/serialization/savegame/doc/src/savegame.qdoc:28: warning: Cannot find file 'json/savegame/savegame.pro' or 'json/savegame/savegame.qmlproject'
qtbase/examples/corelib/serialization/savegame/doc/src/savegame.qdoc:98: (qdoc) warning: Cannot find file to quote from: 'json/savegame/level.cpp'
json
qtbase/src/network/ssl/qsslconfiguration.cpp:889: warning: Undocumented parameter 'name' in QSslConfiguration::setBackendConfigOption()
qtbase/src/corelib/tools/qbitarray.cpp:314: warning: No such parameter 'len' in QBitArray::fromBits()
Change-Id: If59512873ca2116b89490927fdbf9ea1d8b237a8
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Properly initialize MedianDouble::values in ctor.
This fixes the following valgrind warnings in the unit test:
Conditional jump or move depends on uninitialised value(s)
at 0x40771E4: addValue (qtconcurrentmedian.h:161)
by 0x40771E4: QtConcurrent::BlockSizeManagerV2::timeAfterUser() (qtconcurrentiteratekernel.cpp:195)
Change-Id: I8c8e297a52caca38cd6191ae2653f2765d387077
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Private headers not only need the _p suffix, but we also need to mean it
:)
Change-Id: I6028200a872661af34cbf90c77974cc1a22c09c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
TouchEvent::TouchPoint::pos was not updated in
QGraphicsScenePrivate::updateTouchPointsForItem().
To prevent the transformation being calculated repeatedly for each touch
point member, extract a function genericMapFromSceneTransform()
from genericMapFromScene() returning the transformation and use
that whereever multiple points are transformed.
Add a test, extracting helper functionality from
tst_QGraphicsItem::touchEventPropagation().
In addition, fold tst_QGraphicsScene::checkTouchPointsEllipseDiameters() from
c48f4bde00 into this test, so that
it is testing all transformations.
Task-number: QTBUG-66192
Change-Id: If71886d2c14c4e216f7781ea2f22f1adc444e6cf
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
- Move ivars into @implementation
- Use instancetype where applicable
- Use dot notation for property access
- Use subscript operator for dictionaries and arrays
- Format selectors consistently
- Use proper style for init methods
- Use generics instead of void pointers where possible
- Use "range for" loops instead of indexing
- Replace or replace IBAction/IBOutlet with void
Change-Id: I1667812a51d4dfe44ae80fe337cb1f4bc9699d92
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-geometry, -title and -icon for xcb did not work if the platform string had
arguments or there were fallback platforms.
Only accept the arguments if xcb is the default platform. I.e. ignore the
arguments if xcb is a fallback.
This now works:
./application -platform "xcb:someArg=value" -title specialXcbTitle
./application -platform "xcb;wayland" -title specialXcbTitle
./application -platform "xcb:someArg=value;wayland" -title specialXcbTitle
But this does not:
./application -platform "wayland;xcb:someArg=value" -title specialXcbTitle
Change-Id: I4ee20b1ed722bc98417a5e75db7d8c98ffcdfcfe
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
[ChangeLog][QtGui] QT_QPA_PLATFORM and the -platform argument now support a
list of platform plugins in prioritized order. Platforms are separated by
semicolons.
The plugins are tried in the order they are specified as long as all preceding
platforms fail gracefully by returning nullptr in the implementation of
QPlatformIntegrationPlugin::create()
This is useful on Linux distributions where the Wayland plugin may be
installed, but is not supported by the current session. i.e. if X11 is running
or if the compositor does not provide a compatible shell extension.
Example usage:
QT_QPA_PLATFORM="wayland;xcb" ./application
or
./application -platform "wayland;xcb"
Task-number: QTBUG-59762
Change-Id: Ia3f034ec522ed6729d71acf971d172da9e68a5a0
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
... and make sure we can build if it's switched off.
Change-Id: I9565a2ce632a861a99e1276f3edf4f0d094b5451
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Duplex doesn't really make sense in the context of printing to pdf,
and the variable was only being used in QCupsPrintEnginePrivate anyway
Change-Id: I801634c56759572825b5c9549d7a1dc92e5697a0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
First check if the pagesize is one of the known ones before
comparing the page sizes. It's veeeery similar but without
it when running the qprinter tests i get a failure since we
set "Index Card 3x5in" but get back "Photo 3x5in"
Change-Id: I72671231c2abec39e036de829d226784f06e1b41
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It was added by Sam back in 2007, and we've removed other instances of
the same pattern since then. It doesn't make any sense today.
Change-Id: I0f3cb299e312648fd9dc96c639dab4c77fcb48c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This makes the documentation match the implementation.
-platform overrides QT_QPA_PLATFORM, not the other way around. Similarly
for the other arguments.
Change-Id: Iffaf8bb1134bc57e5b682f37b9cc1a713872ede1
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
The code used to retrieve FTP resource with the path of QUrl as an
absolute URL starting from the root directory. It is not always working
with a relative URL because the root directory and working directory may
be different. Depending on the implementation of FTP server, the
reference directory of a relative URL could be either the root directory
or the working directory.
To resolve it, a new state “ResolvingPath” is added to resolve resource
paths before retrieving. For both GET and PUT operations supported by
QNetworkAccessFtpBackendFactory, the resource will be retrieved via its
URL path. Depending on the prefix of the URL path, the path of working
directory is prepended to the resource path as an absolute path starting
with the working directory.
If a URL path starts with “//” or “/%2F” user-input prefix, the resource
will be retrieved by an absolute path starting with the root
directory. If a path starts with /~/ or the working directory prefix,
its resource will be retrieved from the working directory.
Task-number: QTBUG-25034
Change-Id: I26198af1c0077f51565afd3f96050235c661f063
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This allows QML DialogButtonBox in Qt Quick Controls 2 to use the same
enum without having to duplicate it.
Change-Id: Ib3a89acd18f9e584a203ee44621ca2e3fc0ceaba
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
[ChangeLog][QtCore][QByteArray] Added QByteArray::isUpper() and
QByteArray::isLower() to check if a byte array contains only uppercase
or only lowercase Latin1 letters.
Change-Id: I7ab3c775bc714138d4be259ac6fa2cfc70467ed4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add formatting for registered enumerations based on QMetaEnum
and unregistered enumerations as hex values.
[ChangeLog][QtTest] QtTest now prints values of QFlags that failed to
compare with QCOMPARE.
Task-number: QTBUG-65845
Change-Id: I3eae6d20d3c0d72441ca6c4037d9a8dafa4b6357
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Skip the initialization of a QOffscreenX11GLXContext and thereby fix
a null pointer dereference if the environment variable $DISPLAY is
unset or contains invalid information.
Task-number: QTBUG-66423
Change-Id: Ideea510d1c63a4f6700839955d833cd10e3b0bbe
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Since 1.1 lib names are similar to what they have on other
platforms, that is: libssl and libcrypto.
Task-number: QTBUG-62733
Change-Id: I477899433719fe36104491601d8cb71004b265ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Having it there is awkward since all the subclasses of QPagedPaintDevice,
that is QPdfWriter and QPrinter, have their own m_pageLayout via
their private engine classes so we ended up with code like
pd->engine->setPageMargins(margins, units);
// Set QPagedPaintDevice layout to match the current paint engine layout
m_pageLayout = pd->engine->pageLayout();
Now we just use the subclass for it's page layout and all is simpler
since we don't need to make sure the two variables are updated to
have the same contents.
Unfortunately this means that we have to implement a dummy subclass
for QPagedPaintDevice(). That constructor doesn't make any sense since
QPagedPaintDevice is not really a leaf you want to instantiate, it's
there to provide common api for the subclasses and the
QPagedPaintDevice(QPagedPaintDevicePrivate *dd) constructor should be used.
Since it's a public class we can't remove that constructor and that's why
we have that QDummyPagedPaintDevicePrivate.
QPageLayout &QPagedPaintDevice::devicePageLayout() is also deprecated now
since there's no "device" page layout anymore. Those functions were
marked internal and as far as I can see unused outside
QPdfWriter/QPrinter so it should be fine.
[ChangeLog][QtGui] QPagedPaintDevice constructor has been deprecated
since that class is not meant to be used standalone, its two public
but internal devicePageLayout() methods are now deprecated.
Change-Id: I054601b66afcb7dd662db6247c5ed7820fbee212
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Commit cf4a611115 refactored out test
identifier buildup into a standalone function, but it returned the
QTestCharBuffer as a value type, which ultimately caused it to crash:
Unfortunately QTestCharBuffer is not copied correctly: Since it uses the
default copy ctor it will copy the buf pointer and create a deep copy of
the staticBuf pointer. When the dtor was later called it would then end up
calling free(buf) (where buf pointed to the staticBuf of the original
QTestCharBuffer).
Change-Id: Ifa290658be6f077a0d6613451c26aeeffc8df41c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Use ShmCreateSegment call, that was added in MIT-SHM 1.2, to
create shared memory segments on the server side. It returns
a POSIX shared memory object that is used to mmap memory.
It's in effect a file descriptor that is passed through the
X server socket and thus avoids permission checks.
On the other hand this scheme is more secure, because the
file descriptor, and thus the shared memory, are accessible
only by the X server and the application.
Task-number: QTBUG-46017
Change-Id: I202eead9d01aee2ab5b65f4f74f4c13da7cb2239
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
- extract the creation of a shared memory segment into a separate
function
- do extra checks for errors
- check that MIT-SHM extension is present once in QXcbConnection
Change-Id: I956bdf76b879ec5c95a7ed219a59ae722dc5afba
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Complete 43c44d05ca to cover builds
using Windows ICC.
Change-Id: I5f4d62f17b54835a58f3002744574c514cce5e39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the layout direction is changed after the QToolButton is created,
the extension button icon was not updated.
Task-number: QTBUG-66344
Change-Id: I8690b2c42c4f485a39490f16b15b8ee58e6f4ace
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Don't use out param, use return by value instead.
Also since we don't need CoW replace QVector with std::vector
Change-Id: I5b6ea286b83e2ab959b5734cc1af31cc63c06553
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
instead of manual qFloor, use the toAlignedRect() function to get the minimal enclosing rectangle
this will in some cases over-paint one-pixel, which is preferable to under-paint which
leaves gaps inside painting text lines that can not be fixed by the user of the painting routines
Task-number: QTBUG-66036
Change-Id: I8d6c2f7370e55bd544e1ff93d5c07b554b20ffeb
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Dominik Haumann <dhaumann@kde.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Clear all queued buffers, and reinitialize the Qt layer so we can try again
next time.
Change-Id: I921f6f457666206be92aadf2fe40b855e6ebff62
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
A step towards having the application do its event dispatching though the
thread data's dispatcher, like QEventLoop, instead of keeping two references
to the same dispatcher, one in QCoreApplicationPrivate and one in QThreadData.
Change-Id: I7b215e7e99869d25638ec67f0666f632a508cc0f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixed some regression of checkbox's size brought in by c9f68a5.
Using qreal and QRectF to avoid the round error accumulation
of sizes in low dpi situations.
Tweaked the look of the check mark.
Task-number: QTBUG-66343
Change-Id: I8f68144f60437907701021bb43ee736dfcb7241f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This is a regression introduced with commit
cb142954c5 that changed the code from
using QString:fromUtf8(name, propertyLength) to QString::fromUtf8(name),
assuming that the property name is a zero-terminated string. That
however is not correct.
ASAN trace:
==4039==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60400001e0b4 at pc 0x7f3383c7d66e bp 0x7ffdc8e3d9b0 sp 0x7ffdc8e3d158
READ of size 5 at 0x60400001e0b4 thread T0
#0 0x7f3383c7d66d (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x5166d)
#1 0x7f337602f32a in QString::fromUtf8(char const*, int) ../../../../include/QtCore/../../src/corelib/tools/qstring.h:569
#2 0x7f337602f32a in QXcbWindow::windowTitle(QXcbConnection const*, unsigned int) /home/simon/dev/qt-5.11/qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp:2861
[...]
0x60400001e0b4 is located 0 bytes to the right of 36-byte region [0x60400001e090,0x60400001e0b4)
allocated by thread T1 (QXcbEventReader) here:
#0 0x7f3383d0ab50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
#1 0x7f337b397e2b (/usr/lib/x86_64-linux-gnu/libxcb.so.1+0xde2b)
Change-Id: Ia5024602d3aacb924b5dcd3956672da2a8f10feb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
[ChangeLog][Third-Party Code] Clarified use of "Unicode
Common Local Data Repository (CLDR)" in the documentation.
Also updated SPDX license name / ID.
Change-Id: I7261c675251dcca118f2661061a09b9c9200486e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
[ChangeLog][Third-Party Code] Documented use of
"Unicode Character Database (UCD)" in Qt Core.
Change-Id: Id66877d04b4bbe6967d366bc631942e466a861ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the focus is lost on an editor due to the application no longer
being the active one then we have to ensure the parent view is going to
get the focus when it is returned. Since the editor does not have focus
when this check is done we need to manually account for this case by
setting it on the parent view as if it would if the editor did have
focus.
Task-number: QTBUG-62253
Change-Id: I14ac347e9e3a2bfaa8715a45811b17c1c7cf15f8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Modeled on the QtGui's debug operator for its events.
Change-Id: I2c92aa017178cb8bde2d2b1eaba7cb130e874c13
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This change amends 305dd1b61f, which lost
0d9208ce and brought src/plugins/styles/mac/qmacstyle_mac.mm back. In
4f3249f32d, it was moved to
src/plugins/styles/mac in 5.10.
Task-number: QTBUG-65773
Change-Id: I721268caf12067ed798f5846234cd2fdf3e493dc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This used to be public back when QMacStyle had public API.
Long replaced by the WA_Mac*Size attributes.
Change-Id: Ifd948e648ec90ff29b6b3652bc9d5cb1dc9c6a09
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Leaving the logic of starting up the event dispatcher to the call site,
unified both the case of a custom event dispatcher and the default
event dispatcher.
The data argument is left in due to the static nature of the function.
Change-Id: Ia2020e39ccc67cd5a583d4e614dd978b2ec44dba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a flag to QTemporaryFileEngine causing the file to be opened in
non-shared mode, preventing renaming failures caused by the Dropbox
driver accessing it.
Task-number: QTBUG-57299
Change-Id: Id7afc3559fd15784d4166efbbd057d592b5e0ab2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use Qt::AA_DontShowShortcutsInContextMenus instead of
Qt::AA_DontShowIconsInMenus in the getters and helpers for
formatting the action text. Streamline the code and use
static method invocation.
Amends c2c3452ba5.
Task-number: QTBUG-49435
Change-Id: I8827c2dc757e5899e5a26ffbf2d0b5018aa7544a
Reviewed-by: David Faure <david.faure@kdab.com>
QCoreApplication::setEventDispatcher sets the dispatcher on the current
thread, not on QCoreApplictionPrivate, so when running init() we don't
have an event dispatcher set.
Change-Id: Ia008e68b70777779ab14f1f7b9eeadac9adbcf7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Modification of the function pixelFormatCompatibleWithInternalFormat to
not change RGB pixel format to RGBA one, allowing the creation of valid
RGB textures with Qt3D.
Task-number: QTBUG-66365
Change-Id: I5c3187a3fefaedf85140f80fbb7145e1a762805b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The code got dropped already in commit 9a3ce25f98.
[ChangeLog][Third-Party Code] Removed attribution for QTemporaryFile:
The original code got rewritten.
Change-Id: Ib8977f88d3bd649def136e5842d013e9952ab5dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The remaining time will be fetched again after checking the predicate, so the
read value was never used.
Change-Id: I627152116ea579577e490ecefbaee02fec4aabdc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Windows sends a mouse move with no buttons pressed to signal "Enter"
when a window is shown over the cursor. Discard the event and only
use it for generating QEvent::Enter as not to confuse tests.
This is preparing for the use of the new QPA API for mouse events.
Change-Id: I3eb7f3dad82d27d0b425c7eaf34b1eee11592074
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
qtbase/src/corelib/io/qiodevice.cpp:688:60: required from here
../../../include/QtCore/../../../../qtbase/src/corelib/tools/qvector.h:727:20: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class QRingBuffer’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
memmove(i, b, (d->size - offset) * sizeof(T));
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I9dc9a17c281b71bf2eb3e89116600ec3ba345d74
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>