The DEPLOYMENT variable has been deprecated.
Change-Id: I1c7c07b36a2e665ae302e4f43f7f2dc752f3c1f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This makes the terminology consistent with Sailfish OS and the QNX QPA.
The kImePlatformDataReturnKeyType in the iOS QPA is not changed to not
break compatibility. Also, improve documentation.
Change-Id: I2780de5b1e9277185ae1d4d9bbc67e36682fbfba
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
De-duplicates vtables and enables RTTI on this class
hierarchy.
Export QFramePrivate, as QAbstractScrollAreaPrivate
(a subclass) is exported, too.
Change-Id: I541886373435dc49c4267190a7191e2436f4c95e
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Keeping a static variable in an inline function is a bad idea because
each definition of that function will have its own version of the
variable. As qtestmouse.h can be included multiple times in the same
test (via some utility classes as with tst_qquickflickable), this
leads to confusion.
Change-Id: I80f198817c34c3a7e07bf6944189927817efb8a6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
...but only for Qt 6. It's a source-incompatible change,
e.g. in a user hierarchy of clone()able runnables.
Change-Id: I8610308dea46da19bda5c96985d35f31c43484be
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
De-duplicates vtables and enables RTTI on this hierarchy.
This is esp. important for exception classes, as RTTI is used
to select the catch clause to handle the exception in-flight.
The issue is made a bit complicated by the fact that the
exception specification changed from C++98 to 11 and that C++98
clients require the empty throw() specification while we don't
want to introduce warnings for C++11 users.
Let's hope no compiler includes throw specs into the mangled
names.
Task-number: QTBUG-45582
Change-Id: If086c8c38fccdc2c9c7e2aa7a492192cc1f86a6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Deprecate the qmake variable DEPLOYMENT that was used for installing
files on remote devices for Windows RT and Windows CE Visual Studio
projects. Use INSTALLS for both nmake and Visual Studio projects.
[ChangeLog][core][qmake] Deprecated the qmake variable DEPLOYMENT in
favor of INSTALLS.
Task-number: QTBUG-21854
Change-Id: Ia9d2c69feb7d87b0b9dc69ff7c0a68be35a57acd
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Calling QCursor::setPos() to emulate mouse move events
is a rather bad idea, as it creates round trips through
the server, leading to timing issues etc.
In addition, we should not call qapp->notify(), but rather
route the events through the proper QPA interface. This
is required to properly generate all other events such
as enter/leave etc. As this breaks existing tests,
put the new behavior behind an #ifdef for now. Like this,
we can fix tests one by one, and then turn on the define by
default for 5.6 (with a changelog message).
We emulate timestamps to avoid creating double clicks
by mistake. In addition, fix QGuiApplication::processMouseEvent
to not push events back into the QPA event queue (as this is
a bad hack and breaks the new testing system).
Change-Id: I71774cb56674d7fb66b9a7cf1e1ada1629536408
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
qmake win32 generators by default used values of DEFINES for RC
preprocessor defines, too. For simple defines this works. For
string literals this failed for the .vcxproj files:
DEFINES += "FOO=\"BAR BAR\"" works for CL but fails for RC.
DEFINES += "FOO=\\\"BAR BAR\\\"" works for RC but fails for CL.
This patch introduces the qmake variable RC_DEFINES. The variable
contains the preprocessor defines, that are used for RC. If the
varible is not set, the DEFINES values are used for RC.
Task-number: QTBUG-44184
Change-Id: I4202271759d29de8c1829347ae3ef117eda54b38
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Probably not performance-relevant here, but easier to read and safer,
too (consider what happens if frect becomes QRectF).
Change-Id: Ia5e4369b550b3a5b899b41ac4cbbda91229f2eb4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
De-duplicates vtables and enables RTTI on this class
hierarchy.
Export, as QDeclarativeTranslatePrivate (QtQuick1)
inherits it.
Change-Id: I32439c59f7d4bff466ecae969bb761a42c3837f1
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
De-duplicates vtables and enables RTTI on this class
hierarchy.
Export, as QPlainTextDocumentLayoutPrivate (QtWidgets)
inherits it.
Change-Id: I8aee43b43898a72430d8bc1247ea76c7d4e9031d
Reported-by: Volker Krause <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Change-Id: Ia825ef6d932fbd45ceaf8c54a3207f207fa40994
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Pass a temporary QVector instead of a named variable. Apart from less function
calls, it also makes the code C++11-ready (enables move semantics).
Change-Id: Ia7d3bed8aeae48453f96dc3c979f7ae394a5a26d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
QTextLayout::additionalFormats setters and getters using QList<FormatRange> have
been deprecated; port to the QVector versions.
Moved op== definition for FormatRange needed in tst_qsyntaxhighlighter.cpp
to a friend declaration in FormatRange itself, because MSVC 2008 doesn't find
it otherwise.
Change-Id: Ibab6589df057f02377d895079b56395859e3401e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The pattern "mySet.intersect(other).isEmpty()" has been spotted in
the wild and in Qt codebase. intersects() is much cheaper because it
bails out as soon as we find one common item and doesn't do any
allocations.
[ChangeLog][QtCore][QSet] Added intersects().
Change-Id: I44a350dc4cdb9deb835a23eee99fc99d6ca24c82
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Needed for QSet::intersects() for optimization purposes. No need
to calculate the hash when we already have it.
Change-Id: I247602bb0558ca8d1fb8333de9d5f339146c576d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
OpenSSL should automatically seed the random number generator, and the
current fallback code does not offer strong guarantees. It should
never actually be used, so let's remove it entirely.
Change-Id: I9a0a70345fe8df5913871bcac644623b687aea01
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
Commit e486d69133 changed the behavior of
QString::fromLocal8Bit(const QByteArray &) to preserve embedded null
characters. The embedded null character from qt_error_string()'s buffer is not
something we want to preserve, it is merely a safe guard. Therefore let's strip
it away.
Change-Id: Iceac91551f51a1036a942ff30d246baea7a6fd7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
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>