Don't return a const QString &, return the QString by value. This
is still broken for some of the older methods, but let's not add
to it.
Change-Id: Ic5cabb1b89eda0fcf678dbe175963e03109e5c2c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
QMetaType::IsGadget was introduced in Qt 5.5 and set when Q_GADGET is used.
If an existing Qt 5.4 class was converted to a gadget in Qt 5.5+,
the two types would have differing QMetaType::TypeFlags. Such a conversion
happened for QGeoCoordinate, QGeoShape, QGeoRectangle
and QGeoCircle. There might be other classes too.
In principle, the same problem exists for every future addition to
QMetaType::TypeFlag too. This patch ensures that new flags are kept in
the metatype database and the related qFatal call is not triggered for any
flag >= TypeFlag::WasDeclaredAsMetaType.
Change-Id: Ibb15daeb28d9a11b7f31658f4219cbca2499213f
Task-number: QTBUG-46454
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
There's zero reason not to do it, esp. given how small
a QSizePolicy is.
Change-Id: I88b92bb27e6341b60a2cb3f2ddcc232f25f03ca8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change-Id: I5ea44a720e01e388a8d219a89c5b0ccd8fd23146
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Previously, the path was removed from list returned (indicating failure
to remove) only when the thread's list was empty
(last file in directory). Move the statement up so that removal
happens when it is found in thread's list.
Task-number: QTBUG-46449
Change-Id: Ib79199c731f79357b0e5c17636254fbeb3a754a0
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
The accessibility class was created and activated in onCreate(), which
meant we where trying to activate accessibility before the platform
plugin was properly initialized.
With this change we will also activate, or deactivate, accessibility in
Qt whenever the state is changed by Android, compared to doing it at
start-up only.
Task-number: QTBUG-46355
Change-Id: I5cbae125df43f7694d4464d5054e6cfec4626e26
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Exporting value classes (as opposed to just their non-inline
methods) creates subtle binary incompatibility problems.
In this case, between C++11 and C++98 builds because of the
move assignment operator.
Even though it's not a problem in practice, so far, for some
types of classes this issue ie real (QVector, say), so it's
best to avoid exporting what we don't need to export.
Change-Id: Ifca6aaedcbfa79ca35e651de7630e69c3b266fe3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Currently, the files are extracted with read-only permissions.
If the data are extracted under a temporary directory, this prevents
it from being deleted, causing a leak and test failures (for example,
tst_qfileinfo).
Change-Id: Idc85f31265af234446ed21d736e9a2b9866dc62d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Caused by the refactor in 05351b0cde.
The count was probably wrong in the creation of the QKeyEvent, so this
commit keeps it wrong.
Change-Id: I049a653beeb5454c9539ffff13e573bba826e927
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
X server sends emulated XI_Motion events before each touch sequence.
Filter them out to avoid a mess with mouse events synthesized in
QGuiApplication.
Change-Id: Ic919c86b41e2467a594de7c903cc0f3fc88a6804
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
wm_window_type_property_id is a dynamic property, so we should
check that it is set by using QObject::dynamicPropertyNames()
instead of QMetaObject::indexOfProperty().
Change-Id: Ic7f3408a0d028f349538e0538c40c4b58360f7df
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Make sure GLESv2 library to be loaded even when the symlink of .so is
not installed.
Change-Id: Ie7c810a137cebc7fa59612830e3643861b532fdb
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
When trying to do a straight right/left/up/down swipe, a minimal
change in the other direction caused to the gesture to be canceled.
Introduce a threshold for checking such to prevent this.
Task-number: QTBUG-46195
Change-Id: I3e199f2ec0c81d23a16073b1f5b8fff004958239
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
QDialog::setVisible() tries to adjusts the dialog position, but
it's not really possible if the dialog size is not defined yet.
Besides, if the dialog window is not created, QWidget::move()
will not really move it and will set WA_PendingMoveEvent flag.
And QWidget::setVisible() also will not change the position,
because we reset WA_Moved flag. Thus it may break adjusting
the position in QDialog::showEvent().
So adjust the position only in QDialog::showEvent().
Task-number: QTBUG-36185
Task-number: QTBUG-39259
Task-number: QTBUG-41844
Change-Id: I015a19f2e533f68178f4ee7519b17f5e9b5def7b
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Closing the forkfd descriptor before disabling the deathNotifier causes
a race condition in ~QProcess. This is the same underlying cause as
QTBUG-22789.
Change-Id: I1cbdedc567fdfa8d95d111827b7bf9994661ecc7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These examples now define their own images. Having duplicate
definitions is bad as it results in invalid example manifest
xml, and Qt Creator fails to detect all examples declared in
that file.
Task-number: QTBUG-41996
Change-Id: Ia9d6cd0b3ec4e82b79b1df54774c2d9cea279a59
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
On Windows, we set VERSION for QML plugins, because this embeds a
VERSIONINFO resource into the DLL that can be inspected by the user.
Change-Id: Ifb42efed6ceee05d05f61a271e028776cac6a3a2
Task-number: QTBUG-46473
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
To avoid conflicting anchors within an HTML page, QDoc keeps
the used anchors in a map, and appends 'x' to new anchors if
it was already used. However, this map was never cleared, so
anchors on one page affected the ones generated for another
page.
This commit clears the map for each page when generating the
page header.
Change-Id: Id30baced46917bb4d48cf58dde047f4fbcdf74cf
Task-number: QTBUG-46153
Reviewed-by: Martin Smith <martin.smith@digia.com>
Match the cases for the adding logic.
Change-Id: I61f49975b4cfcf2acf26b31b521cbc9b96f9d150
Task-number: QTBUG-46447
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
It can happen that NSMenuDidEndTrackingNotification comes after our imageCell
QNSImageView was deallocated (for example, mouse button is not released yet
when dealloc called). Remove soon-to-be-deallocated observer.
Change-Id: Ib155cc5f0b884c6b1fed0f986d12599096b582c6
Task-number: QTBUG-46425
Reviewed-by: Thierry Bastian <thierryb@filewave.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
[NSDate date] returns an id, so one needs to send a message instead of
accessing a property.
Change-Id: I21ce9b64310315accb7a89278b292dd5c73adc4d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
+ (id)allocWithZone:(NSZone *)zone returns before the cleanup handler is
installed. this causes the QCocoaApplicationDelegate not to be cleaned up
by the garbage collector
Change-Id: Ic4862b96228539f3da857955f08157402974a104
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
In GNOME/Unity XCB, logical DPI is scaled by device pixel ratio, and on
Macs logical DPI is constant but pixel ratio is based on physical DPI,
making logical DPI effectively physical DPI divided by pixel ratio.
This patch ensure the same logic is used for other XCB desktops.
Change-Id: I60f24618cd49f6b34a6ff1eff317883d191d3491
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Until now there was no connection between the tracked touch points and
the touch device. So the touch point for one device could be updated
by the touch event from another device.
Change-Id: I09fcf03a171cc361c6b5b4995758aa53d29ff414
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Since we added font matching by style name, the style name is not just
a derived property and should not be ignored in comparisons.
The QFontDef::exactMatch comparison is left unchanged, since it tests
if a loaded font matches a requested one.
Task-number: QTBUG-30851
Change-Id: I4187c5b993815001f35bcf24dc449059bfdcba6f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The difference between rectangle and boundingRect was not quite clear.
This patch adds a snippet with a corresponding image, in order to
illustrate the difference.
Change-Id: Icb1fe737788cc93f1c5baa16bc0e04b8ec728f3a
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
When a premultiplied alpha changes value because it is rounded to fewer
bits the premultiplied colors may need to be recalculated with the new
value. Otherwise the color will both be wrong and potentially invalid.
Change-Id: I9ec74a22aac73cd7ffab04e180cf2bf35bb4c315
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
readLine() overload was renamed into readLineInto() in
21674735cc.
Change-Id: Iebd4c4e42ef4579c02ca38d7e41d00c3032130d8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Fix regression introduced in commit 63660402d. exists()
also returns true for a directory ...
Change-Id: I2b4fff00b18eeba53e959306ab33c3bef3795987
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
As discussed on the development mailing list, the new overload is ambiguous
and breaks source compatibility. Therefore this function that is new in 5.5
shall be called readLineInto.
Change-Id: I2aecb8441af4edb72f16d0bc6dabf10cdabf32e2
Reviewed-by: Jan Kundrát <jkt@kde.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It should also be possible to use QT_STRICT_ITERATORS in Qt's own code base
Change-Id: I0914db480d4d2b06e71e3a2588163efdd3ff6d27
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
- Implement init() and cleanup() to verify that
no top level widgets are leaked.
- Position widget in tst_QToolTip::task183679() and set
window title.
- Remove hardcoded wait in tst_QToolTip::whatsThis()
and use a find function within QTRY_VERIFY().
- Rearrange and clean code a bit.
Change-Id: I0b1ad88444fc9441c1071a2527f75de1f68ea9e5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Corrects a few white-spaces, return statements and else statements
to fit Qt coding style.
Comment updated to indicate how far the code is getting from its
original roots.
No semantic changes.
Change-Id: Ia2288c501788a291bfc4e8b70e8eb1efb7a90128
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Use the last path from QSP to hint that we want to
load photos from the global photo library. This
should currently only make a difference on iOS.
Change-Id: I7a6217dbbbc2e247b69bf406c02001458c757211
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Now we can choose to use separate screens or virtual desktop.
With virtual desktop the geometry of all screens is taken
into account so that the input plugin do not clamp global
pointer coordinates to the first screen anymore, we also
create only one hardware cursor that can now freely move
on all the screens.
Virtual desktop is enabled by default, but the old default
behavior can be restored by setting separateScreens to true.
Change-Id: I78dbf9e8d3dd44f68d33350dc8fc3727bf8a26fe
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The default reaction to configuration changes in Android
is to destroy the activity. To avoid this happening for
locale changes, we had the "locale" configuration change
registered in the default AndroidManifest.xml, however,
you also need to register that you are handling the
layoutDirection change, otherwise Android will not
call onConfigurationChange() for language changes, but
tear down the activity instead.
[ChangeLog][Android] Fixed bug where application was not
resumable after user changed language in system settings.
Change-Id: I3fe84a9332217b062b5352b2c977e2dbeacd5239
Task-number: QTBUG-45430
Reviewed-by: BogDan Vatra <bogdan@kde.org>
When enabled, all QWindows will be backed by a NSWindow.
This is unlike the default where only top-level
QWindows get a NSWindow.
The QWindow still has (Q)NSView as the NSWindow content
view. The return value of the winId functions are
still the NSView and is not affected by this switch.
Change-Id: I131b89af04c09451a6e7515d1da3f7498f53979a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
The methods are called hslHue and hslSaturation. This was leading
to dead links.
Change-Id: I0997c415958aae9a66fb037d98f8ad3d43b38231
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
- Use QTRY_COMPARE() in touchBeginWithGraphicsWidget.
- Change raw event translation tests to wait for the
window to become active to avoid WM positioning issues.
- Blacklist the raw event translation tests on Linux.
Task-number: QTBUG-46266
Change-Id: I73aae375ee279a518a2a083d0ce8919cce474cb3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>