Behavior will agree with the docs.
[ChangeLog][QtGui][QWindow] lastWindowClosed will be emitted even if
quitOnLastWindowClosed is not set
Task-number: QTBUG-32956
Change-Id: I7bb269d53894859fee27e171eea7ad472ea86af0
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Previously QPlatformScreen was automatically deleting its QScreen
in ~QPlatformScreen(). That means that we cannot use QScreen's
methods when the screen is being removed, because doing so would
call virtual methods of QPlatformScreen. By that point the
QPlatformScreen subclass object does not exist anymore, and we
call the default implementation instead of the subclassed one, or
get a crash for the pure virtual methods. This happens for example
when removing a screen which contains a QWindow with some QML item
using QQuickScreenAttached.
This patch adds a QPlatformIntegration::destroyScreen() function,
which deletes the QScreen and later the QPlatformScreen.
~QPlatformScreen will still delete the QScreen if it was not deleted
with destroyScreen(), so code not ported to the new approach
will continue to work as before, with only a warning added.
Task-number: QTBUG-41141
Change-Id: Ie4a03dee08ceb4c3e94a81875411f6f723273fe1
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This is a temporary measure while the Qt CI system is updated to have
the correct D-Bus configuration. Once it is fixed, this commit should be
reverted, so that we don't run into the situation in which the tests
aren't getting run on some configurations and we never know about it.
Change-Id: I7192d4d95a60dcb63acfa6cc90bfdc58592b0664
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
The order is:
1) own header
2) own private header, if any
3) other headers
Commit f17d7a124f broke the order.
Change-Id: I7225024691db91fd936a057accdad65bacb3f979
Reviewed-by: Richard J. Moore <rich@kde.org>
Gesture events sent to a disappearing tooltip can crash. This can most
easily be seen by scrolling over a tooltip on OSX with a magic mouse
middle scroll gesture.
Task-number: QTBUG-42826
Change-Id: Id5510895f63297ca157e3d24a3f4e3a6034586e8
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Include statvfs.h on all non-Linux and non-Solaris systems.
* Fix type of stat_buf structure on BSD.
Change-Id: I6336503082fafd7f6108cf95c079bdd329d2ea0f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
In case the foundry name was empty and foundry lookup has failed, don't
look for *any* foundry since it does exactly the same as previous call.
Change-Id: I2a81949df06c31e1ae6999a6bbbe973408d4b814
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
According to the documentation, the argument is called COPYONLY instead
of COPY_ONLY.
Fixes warning and ensures it works properly.
Change-Id: I643f5ea808aaaf94c3ee666ec39485e84ed38df1
Reviewed-by: Vishesh Handa <vhanda@kde.org>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
The EglDisplay and the Display is normally a PlatformIntegration wide
resource
Change-Id: Ie5382a2a0b34fbe1c506b5134bf581afbd7f5d99
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Fixes combo-boxes being too big and some alignment issues
that were not present in Qt4.
See screenshot in JIRA task.
Tested with QT_SMALL_COLORDIALOG too.
Task-number: QTBUG-43501
Change-Id: I2aefb64be1c5f3c4894149d85e1a12c9c0cc3d62
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This reverts commit 8c538d10da.
This patch, unfortunately, do not combine well with another
problematic code producing, as a result, a serious regression.
While the proper/better fix in Cocoa menu not found, I'm reverting
this patch.
Change-Id: I1ff03dbe12805da447cb3cfe3e2f231528bf1a16
Task-number: QTBUG-43471
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
The /home path doesn't exist on Android, so it doesn't work as
a non-writable current dir. Instead we use /data on Android.
Change-Id: Ib779f60822da1bef421a16a00c1030245a8c5b90
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The qtlogging.ini file needs to be detectable by QFINDTESTDATA,
so we put it in a qrc file on Android.
Change-Id: I5fb0217098c56f2b2e99ab8d1642c4a7904b18d1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test requires building a console application first, deploying
this as part of the APK and then being able to execute the
bundled file from the main application. Since IPC is a limited
use case on Android, we just skip this test instead.
Change-Id: Ie68e495ff64b69e7027924291a411b5de0e2da76
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Test requires that tst_qiodevice.cpp is available on file system,
but since we're not able to deploy directly to the file system
on Android and since we want to actually test file system access,
we bundle it in qrc and copy it out during initialization.
Change-Id: Ida2b5bf6f1dcd43bc740a2b9380352bab5eb6c62
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Some of the tests expect QDir::homePath() and QDir::currentPath()
to be different, so we just set the current path to something
other than QDir::homePath().
Change-Id: Ib048d323f4745369821765230b995a73b8a97145
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test may not be possible on Android, since the file system
can be mounted with noatime or relatime which means read access
will not be registered.
Change-Id: I40f587e1a1f131ee06f0e3700e908ccaa19c83ce
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Since there's no way to deploy files directly to the file file
system on Android, we put them in a qrc file and extract them
on startup.
Change-Id: I6a42aa5e0372bfd9fb2f7ccfea964c9c3c2e45d8
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test requires that the resources are also available
in the file system. Since it's not possible to deploy directly
to the file system using Android, we extract the files on
startup instead.
Change-Id: I1d1fe7d62c4c618a89713e3a7d1903e42bfb10b8
Reviewed-by: BogDan Vatra <bogdan@kde.org>
There's no way to install files automatically into the file
system on Android, so to test QDir on the file system, we have
to bundle the files in qrc and then copy them into the file system
on startup. This adds some complexity, but at least it will detect
regressions.
We also need to make sure the current directory is the same as
the data path, since the test assumes this, and /usr/ does not
exist on Android, so we have to use a different path to find the
root path.
Change-Id: I18d79b5ed99a0afff573beb30c61745c403f8991
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This will arbitrarily fail at certain points. Adjusting the
timeouts helps, but it's very unpredictable, so it's better
to do what we do on Windows and just expect-fail the results
that we get.
Change-Id: Ie6033c73539c2dd69115b06096919e173f097367
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Add all test data to resources.
Change-Id: Id42a4c033b75409f65cb4d56ebf1161336b93832
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
We must add all test data to resources.
Change-Id: Ic12f8fce9afb965aff32e7141516c8d223e64491
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
We must add all test data to resources.
Change-Id: I7f9e7650156b174b7c16270d86b78e9408dff254
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Add test data to resources.
Change-Id: Ib8a5688e7caab8434b8f0676f53a2a79ec94b264
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
According to the Desktop Entry Specification, “If $XDG_CURRENT_DESKTOP is
set then it contains a colon-separated list of strings”. For example, on
GNOME Flashback session that variable is set to “GNOME-Flashback:GNOME”.
The value returned by QGenericUnixServices::desktopEnvironment() is in
most cases the uppercase variant of $XDG_CURRENT_DESKTOP variable.
In qgenericunixthemes.cpp, we need to support multiple names in the
return result of that function. If at least one part is in the list of
Gtk+-based desktop environments, then we should use gtk2 platform theme.
Change-Id: I0c9de68756d41b031e822be8cf100ca5c0b202ae
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The enum values are different for the default framebuffer and non-default
ones. With QOpenGLWidget there is always a non-default fb bound, so the
correct way is to use GL_COLOR_ATTACHMENT0 etc. GL_COLOR_EXT and friends
are only allowed when the default framebuffer is bound, as per spec.
Change-Id: Ia8c27038dc899e44d1a95eb88adbc1cac72652b0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Supports relative pointer, axis, keyboard and touch events.
libinput support is only available in combination with libudev.
libxkbcommon is required to perform key mapping. For now the
default keymap is used always (selected when building xkbcommon).
[ChangeLog][QtGui] Added a plugin to get mouse, keyboard and touch events
via libinput.
Change-Id: I469d8992c0cd3e79225cefaeb931697baf86a92b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
They aren't needed. The template version for QList in qdatastream.h is
sufficient.
This is binary compatible, since the functions were never exported. It's
also source compatible, provided no one tried to do:
QDataStream & (*fptr)(QDataStream &, QStringList &) = &operator>>;
Change-Id: I8a4449b416154b34c007ef6abacf2b112451028f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
qstringlist.h no longer includes qiodevice.h
Change-Id: I08b83400316cb0b43bde0b390a9430e589e79e10
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Even though the compiler supports it, the MSVC headers might do
something wrong and make compilation fail later due to attempting to
overload unsigned short with char16_t.
The _CHAR16_T definition comes from <cstddef>, so include that instead
of <stddef.h> in C++ mode.
Change-Id: Ifaeb1c92bde2db4ed4129507462391904afd6510
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
icl.exe behaves like cl.exe (MSVC), so we should use the MSVC-style of
__pragma instead of _Pragma.
Change-Id: Ieee740c430589c3bb1b964138f8bf7f58b8d2892
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
We cannot use override in the Q_OBJECT macro, so tell Clang not to warn
about our lack of use of the keyword in the three virtuals that Q_OBJECT
overrides when the user uses Q_DECL_OVERRIDE in their own functions.
We can't use Q_DECL_OVERRIDE for two reasons:
1) because that would trigger the warning in any and all virtual
overrides the user may have in their own class (and most of Qt)
2) because when Q_OBJECT is used in QObject, it's not overriding
anything -- it's the base declaration
For #2, we could add a different macro exclusively for QObject that moc
would expand, but it's unnecessary work.
Change-Id: Ic9cb7896f93f06f4e86b6a42dc08f96d257f7550
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
There's a lot of code now requiring it. Any compiler that doesn't
support the keyword is too old for Qt now. The last time anyone asked
about this macro was for QTBUG-27393 and we don't know which compiler
that was.
As a necessity, this patch contains a reversal of
a0c3a57aed
[ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses
the "using" keyword. Compilers that do not support this keyword are
deprecated and will not be able to build Qt. Previous versions of Qt may
or may not compile, as no testing was done to ensure it worked.
Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This allows the time to be synchronized between different programs, as
opposed to how long it has been since the message pattern was first
parsed...
Change-Id: If8bdfa0d997ca418a5fcae40f8c34fb77f90d2aa
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Now it will say "MSVC 2015" instead of "MSVC _MSC_VER 1900".
Change-Id: I1546929aec205d0a9a62dcc39f20093664951048
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Wait for the subprocess to print "ready" before assuming that it is
ready to receive calls. waitForStarted() will return as soon as the
child is running, but it may not have registered on D-Bus yet.
This also solves the synchronization problem more elegantly than how
tst_qdbusmarshall.cpp was trying to do it.
Change-Id: I548dfba2677cc5a34ba50f4310c4d5baa98093b2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The executables are not in the same dir as on Unix, so we need to use
QFINDTESTDATA to find them. The DESTDIR setting prevents qmake from
placing the executables in a "debug/" subdir.
Change-Id: I1d6d10e6f6f109f55fd9809dcf83da0386f38772
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Rohan was right in e88f9a92b7 to stabilize
the test and reset the state, but killing the subprocess is overkill.
All we need is to reset the state in both applications, which includes
disconnecting and reconnecting to the peer, to discard any sent but not
yet received messages.
Change-Id: Ie01392e6e63bd70ef8345217d3fc641ed63c7aba
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
QDBusServer::address() will return an empty QString, which caused the
tests to fail later with no apparent reason.
Change-Id: I86f448dfc67a6cdb27ecda2d490f335766cfaf4f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>