The QTextLayout::FormatRange is larger than void* and thus should not be held in
QList. Use a QVector instead.
Other parts of Qt already hold FormatRanges in QVectors, so this also makes
handling FormatRanges more consistent.
To avoid ugly names for the getter which doesn't overload on return type alone),
rename the set of function to format (from additionalFormats).
[ChangeLog][QtGui][QTextLayout] Added QVector-based alternatives setFormat(),
format(), and clearFormat() to setAdditionalFormats(), additionalFormats(),
and clearAdditionalFormats(), resp.
Change-Id: Ie04a561b43c91c3b2befb3cac2981821f84d5f77
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
We have at least 5 different (but equal) implementations of a wrapper
in Qt, and some code uses explicit NSAutoreleasePools. Having a shared
implementation lets us clean up things a bit and makes it easier to
reason about which pools are actually needed.
Change-Id: I2fd8eefc3ae7308595ef9899b7820206268362a5
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Report the proper window geometry and adapt the
geometry parameters of expose events to be relative
to the window coordinate system.
Change-Id: Ifb32b2663fdf41df0c9783e76e0ebc5e5cf978a3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Qt should help abstract such platform differences.
This ifdef is proliferating in user code (seen a few times
in KDE) and even in Qt code (qstandardpaths.cpp).
[ChangeLog][QtCore][QDir] Added listSeparator().
Change-Id: Icad082a51c8efd5d63f7af9bbaedbe4bc15b8937
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The destructor is the first virtual method. By not defining it
out-of-line, we provoke multiple copies of vtables, not all of
which can be merged by the linker. If the linker fails, RTTI
such as dynamic_cast and catch-blocks involving the type will
not work.
Additionally, QFontEngineGlyphCache was not exported, and
therefore also not its vtable, making it impossible for
users outside of QtGui to get a unique RTTI for the class.
Change-Id: Ib265945934216bb609629431eb4c71996d4fd39d
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Key sequences can be compared for equality,
so qHash should be overloaded, too.
[ChangeLog][QtGui][QKeySequence] Added qHash(QKeySequence).
Change-Id: I3cf896292459897d66198d96dfcdba1a39bdafce
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Convenience to avoid annoying detaching (instead of using at()),
especially on temporary vectors (returned by functions or so).
[ChangeLog][QtCore][QVector] Added the convenience constFirst
and constLast functions.
Change-Id: If61b1f0096f6a7a1c9074340e237cc2376ce3d18
Task-number: QTBUG-46026
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Convert vertical wheel events to horizontal for two cases of
the items layout when vertical scrolling is impossible:
1) TopToBottom flow with wrapping
2) LeftToRight flow without wrapping
Do it only for pure vertical events to avoid a mess for such
devices as touchpads or Apple Mouse.
[ChangeLog][QtWidgets][Important Behavior Changes] Allow
horizontal scrolling with a vertical mouse wheel for QListView.
Task-number: QTBUG-37007
Change-Id: Ie2525153fa7b443d27ca08cc5f5d4d7ecdb8c183
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Don't initialize it before main, instead, do it whenever
QWidgetWindow::handleTabletEvent() is called, which is seldomly.
Change-Id: I16935e223d4f9879257e7be026fee0215b9dde22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The makespec inits QMAKE_LFLAGS_PLUGIN to the same as QMAKE_LFLAGS_SHLIB,
which will create a dynamic library by passing -dynamiclib. The advantage of
creating a proper bundle (MH_BUNDLE) instead of a dynamic library (MH_DYLIB)
is that bundles can be unloaded completely by the host application.
Change-Id: I03b39b704c09213f40a4cb84f5794bf6b3669fc0
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Like application bundles on OSX, the plugin bundle has its Info.plist
in the Contents directory.
Change-Id: I216fa79857924beb0e9c5fcc4a8d06b197a3f383
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
- Space between class/instance signifier
- No space between return type and message name
- No space in message arguments
Change-Id: Ie25e0be3c134586c44bb82bf7075f6eb153388a9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Directly process events delivered from testlib in QGuiApplication. The
old code put these events into the QPA event queue leading to race
conditions with plugins delivering native events from a secondary
thread.
Change-Id: I5646b1014f681593d487c9d1e65053ba06206411
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
These changes are required to make event delivery from
test lib synchronous.
Change-Id: I8f7093a2bfe01dfa1b0315620d672e7346a7a23a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The test fails on all ubuntu versions, not only 14.04 as far
as I can tell.
Change-Id: I1e204f68bbb791eef25338f0ed007942a2eb22ff
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The resizeColumnsToContents test would fail on some machines, as the
requested 40 pixels where to small to accommodate the header size hint
as well. Raising it to 60 pixels helps make the test pass.
Change-Id: I2a5026fd18425e236849a1cef25ba8d899c7ae5a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This may introduce a privacy issue, however, there does not seem to be a
way to disable this behavior on iOS - there would probably be a setting
if they considered that an issue - so we might as well do the same.
Change-Id: I7a5a6552c36d69b98064b50875562f586b10c0ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
For example the Galaxy Note series of devices. This makes possible
drawing applications which handle stylus events differently from touch
or mouse. As on any other platform, if the application does not accept
the QTabletEvent, a QMouseEvent will be synthesized.
Also fix the tablet manual test to show larger circles on hidpi devices.
[ChangeLog][Android] stylus devices such as the S Pen generate
QTabletEvents
Task-number: QTBUG-38379
Change-Id: Ib594f453b8403cc06aa4e440a76f07afa3bac38c
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reduce the size of .text section in QtCore by 4.5KB and in QtNetwork
by 26.5KB.
Change-Id: If7998776166b9681c1e4b24c51d40444aa996d7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Draw touch points as dots and mouse points as circles
to be able to verify High DPI scaling.
Change-Id: I2293adbcc726391f0d9e156935d609b957432029
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Standalone files are added by using RESOURCES += file.txt, while
collections of files are defined as collection.files = f1.txt f2.txt
and then added using RESOURCES += collection. For collections a prefix
can also be set using collection.prefix = /foo. The standalone files
are not prefixed.
Change-Id: I8236808238414da05e744f799a1bb15a72f4a46f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Currently the text cursor is hidden when a cursor was set using
setTextCursor on a widget with a widget text control and the interaction
flag TextSelectableByKeyboard. The documentation indicates that this is
incorrect behavior.
Change-Id: I624a470617f15d09f5772213016e552a5149424c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
That commit removed the user-defined copy constructors,
under the assumption that this would be ok for these
non-exported classes. But the change is still BiC,
because it turns the iterators into trivial types,
which changes the way they are passed into functions
by value.
So, delay the change until Qt 6.
Change-Id: I8065ff1ff78f5722505328447f2496777d1e8957
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Add the option to load the testability library based on whether
an environment variable QT_LOAD_TESTABILITY is set, in addition
to the current "-testability" flag.
This improves the use of testability library together with the
autopilot functional testing tool.
Task-number: QTBUG-32974
Change-Id: I6abf2c004cbff2ce0aff44e24a99bcc8188a52ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QMachOParser is defined in the private header that only gets included in
developer-builds. Thus ifdef its usage out, not just the header
inclusion.
Change-Id: I1e0059787be6eb70bd1661c7814e69eee7c5b2ee
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Simplify the code by passing the source of a mouse event
directly to the constructor instead of setting it by
QGuiApplicationPrivate::setMouseEventSource().
Change-Id: I1774cf39a211d36d3adf0ff30f3bd2fb7c5fb429
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
If this setting is enabled, the entire group of docked tabs will
be draggable by the title bar of the group and and individual dock
can be dragged by dragging the tab.
When tabs are detached, the docks that are contained are reparented to
a QDockWidgetGroupWindow.
[ChangeLog][QtWidgets][QMainWindow] Added GroupedDragging as a DockOption
which allow users to drag all the tabs together when dragging the
title of a QDockWidget which is tabbed with others.
Change-Id: I5285685b129770498eb3e4fd5f4556e41225a595
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This change introduces the class QWindowSystemEventHandler
which can be used to hook into QWindowSystemInterfacePrivate to
filter and dispatch window system events.
One use case is to intercept key events from the underlying system
in QtCompositor and feed them into the xkbcommon state, and to modify
the events based on the resulting state.
Change-Id: I829eb7d960420135990fb0f6db54c14eea3e8e48
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The \qmlabstract command was missing from the qdoc user manual, and
qdoc was still allowing the \abstract command to be used for marking
up the abstract of a scientific paper. The \abstract command is now
made a synonym of \qmlabstract, and they are both added to the qdoc
user manual.
Change-Id: I003ac50b8dabbf037f18d9ea3e6d88a12d69bf5f
Task-number: QTBUG-46003
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Also document that the QByteArrray::MaxSize takes a trailing '\0' into
account.
Change-Id: I89e9a0d1a80a49b33efbac16ff7aa2a98f0e5670
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The new connection syntax is a bit tricky to use, when the signal or
the slot is overloaded, because one must explicitly cast to the
correct signal type.
This patch adds an example to the documentation of each overloaded
signal. The example shows how to do the cast to the correct signal
type.
Change-Id: Ifc9f28d05c2ae126a674d2ca5887935fc59cd83b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
- Make the subject of the Property watcher settable.
- Embed it into a QMainWindow with menu and
listen to the screen changed event, setting
the new screen with a message about the position.
- Remove hash, close obsolete windows by iterating
over the top levels looking for the screen.
Change-Id: I4ed1122bab7c0cd9676d63995ce85a44719f4ba6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
and deprecate isTristate()/setTristate() which isn't specific enough.
This matches the changes to the flags themselves.
Change-Id: I0ba592af340cb81fc9f4d483569844fe8d7510c3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
This makes the behavior much more clear. You can get a tristate checkbox
just by setting the CheckStateRole to PartiallyChecked, no tristate flag needed.
The flag, on the other hand, enables the automatic-tristate behavior in
QTreeViews (and only there), hence the new name for it.
Change-Id: I18d292a8b8294c863eab806f3874d15dfb72556c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
QReg*Exp*s can be compared for equality,
so qHash should be overloaded, too.
There was a (poor) private implementation of qHash(QRegExpEngineKey)
already, which has now been replaced with a better one (the old one
didn't take into account all the fields that make up equality,
producing unnecessary collisions).
[ChangeLog][QtCore][QRegExp] Added qHash(QRegExp).
[ChangeLog][QtCore][QRegularExpression] Added qHash(QRegularExpression).
Change-Id: I1d22fbcc0508018a3f94b4c24571b13ba6e07df2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Pass the correct include path to the config test, otherwise compilation
will fail.
Change-Id: I6723cad41ec289b051dcc9c47b3b1d67af7c5879
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Remove the calls to QWindowSystemInterface::setSynchronousWindowsSystemEvents
in the Haiku QPA plugin, because the method was renamed in latest QPA API and
we do not really have to call them anyway (was a copy&paste leftover from QNX QPA).
Change-Id: I67db43e89c093e5679f11d967d609846008cad0d
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Set status code and status text if file was sent with reply.
Change-Id: Ie6acadc5c1d06538449262ffd8486e8de573b931
Task-number: QTBUG-45581
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
It's undefined behavior to left or right-shift a signed integer such
that the sign changes. Since SymbolCsbBit is 31, make sure we use
unsigned numbers.
Found by ICC
qplatformfontdatabase.cpp(614): error #68: integer conversion resulted in a change of sign
Change-Id: Idf715b895bac4d56b4afffff13da78d294b1248e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This is consistent with how the iOS enums are defined.
Change-Id: I3a07be1bf1d70bddb8bcfea61f09f2a97bd39077
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>