It causes most of the fails seen on Android.
Task-number: QTBUG-69064
Change-Id: I2f97fea41ee78e7962b8c34ed996bbe4bcb88732
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Skip a few tests that Android's time-zone information doesn't suffice
to get right.
Task-number: QTBUG-68835
Change-Id: Ibf8d213c96b29d74fc478a0ede686ae52b5200fb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Where possible. Sometimes the replacement is QTRY_COMPARE instead.
Also don't use QTestEventLoop directly when it can also be replaced with
QSignalSpy use.
Remove the TimerHelper class, since its uses can be done with QSignalSpy (and a
lambda when remainingTime is checked). Although checking static single-shot
timers still needs a target object, so use a stripped down version in those
tests.
remainingTimeDuringActivation() was not actually testing the repeating case, but
single-shot case twice, so fix that. In the repeating case the remaining time is
exactly 20 ms on my machine, but QEMU emulation seems to be slow enough for time
to advance before the lambda is executed, so relax the conditions.
Task-number: QTBUG-63992
Change-Id: Iae92ff7862a13d36e695eec63b54403ec872f2b4
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Ignore synthesized mouse move events whithout the left mouse
button pressed. We receive such mouse move event on touch
before the mouse press event, it causes the menu to show
and then the subsequent mouse press event closes the menu.
Also don't propagate mouse events after closing a popup
to another popup, because they may close the latter one.
Change-Id: I50a2d9b57da63d33ffe416161a09f1696d65c88f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Fix warnings about invalid function type casts (return types
conflicting with the FARPROC returned by GetProcAddress()) like:
corelib\global\qoperatingsystemversion_win.cpp💯48: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'RtlGetVersionFunction' {aka 'long int (*)(_OSVERSIONINFOW*)'} [-Werror=cast-function-type]
io\qlockfile_win.cpp:158:85: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'GetModuleFileNameExFunc' {aka 'long unsigned int (*)(void*, HINSTANCE__*, wchar_t*, long unsigned int)'} [-Werror=cast-function-type]
by introducing nested casts.
Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: I3a5d2ea901bf5dc35963c589d61cf3dc7393377a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
these characters can appear in file names, but are meta characters in
dependency context. they have different semantics in make commands, so
this required some reshuffling in the windows generator (which just
treated dependencies and commands the same way).
we don't actually escape colons for nmake, because it has magic
treatment of drive letters anyway (and colons cannot appear elsewhere).
also, if a target's filename gets quoted, batch rules will blow up.
therefore, "funny" file names are really only supported as inputs -
which is just enough to make resource embedding work.
Task-number: QTBUG-22863
Task-number: QTBUG-68635
Change-Id: I473b0bf47d045298fd2ae481a29de603a3c1be30
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
following the same mechanism as qpa headers, one can specify a list of
regexes in the @private_headers variable in sync.profile.
Change-Id: I5de0284e639ad283561f54dba7dda8c6437b23f8
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QSpdyProtocolHandler requires the features http and ssl.
This fixes the moc warning
src/network/access/qspdyprotocolhandler_p.h:0: Note: No relevant classes found. No output generated.
for the -no-ssl build.
Change-Id: I915751e98fc67e8601a8da8c5d18b11304bc0390
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
This only enables compilation, it doesn't fix any test.
Qt on Android supports process, but not TEST_HELPER_INSTALLS. See also
acdd57cb for winrt.
android-ndk-r10e is used to compile, see
http://doc-snapshots.qt.io/qt5-5.11/androidgs.html .
corelib/io/{qdir,qresourceengine} need to be fixed later.
Done-with: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-with: Mårten Nordheim <marten.nordheim@qt.io>
Change-Id: I34b924c8ae5d46d6835b8f0a6606450920f4423b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
If CONFIG option no_include_pwd is set, moc does not add the build
directory to its include path. The path to the generated
moc_predefs.h file is by default relative though, resulting in
moc warnings:
Warning: Failed to resolve include "debug/moc_predefs.h" for moc file xxx myheader.h
Fix this by always making the path to moc_predefs.h absolute.
Task-number: QTBUG-69087
Change-Id: I8ef79c8340f9ebd6b0bba15e026d65ef3c088535
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
A follow-up of 9d078c8f147ea875e862360b0d7480201fbbcff7 in qtqa repo.
Change-Id: Ib7c1f5cf325e9ad0066aae139b0dc72bc0184b32
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
And disable menu actions for functionality that's not available.
Task-number: QTBUG-68168
Change-Id: I153487860e8dda8271ae04e9cd2ad8b26a4b130f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This greatly reduces how often we reset the scroll evaluators,
especially with non-focused windows in KWin which sends an enter for
every wheel events in that case.
The update of the evaluators also has race conditions with the normal
events, and thus reducing them fixes odd scrolling behavior with rapid
firing mouse wheels.
Task-number: QTBUG-42415
Task-number: QTBUG-68734
Change-Id: I1c14ca3352bf9c6e57e47ad3aaee1712fe6ba30b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
QTimeZonePrivate::isValid() just checks m_id is non-empty; so we have
to leave m_id clear if we don't get a valid time-zone back when we ask
the JNI for one. Unfortunately, JNI gives us a "valid" default zone
if it doesn't recognize the given name; so check the known names of
this zone (or of zones with its offset); if the given ianaId isn't one
of them, assume this is a bogus zone.
Task-number: QTBUG-68842
Change-Id: I6245db18c59c4261ed5fcd4d948dd773365ce61d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Before the fix is applied this test fails because QFINDTESTDATA will
return "/usr/" instead of the folder with the same name in the current
directory.
The 'usr' folder can't be located 'next to' the application since this
does not trigger the issue (QFINDTESTDATA looks for the folder next
to the executable early on). So we put it in a subdirectory and change
the current working directory to its parent directory.
Change-Id: I627679dcb6f2f6954264e23bfc1a71de3bff7203
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Newer mouse devices support a so-called "free-scroll" mode, which
unlocks the wheel and allows for faster scrolling. For such input
devices, evdev will report an event value greater than 1, when free
scrolling is active. Examples for such devices would be the Logitech
G700 or MX Master series.
However QEvdevMouseHandler interpreted such an event's data incorrectly
and triggered wheel events for the opposite scrolling direction. This
also often resulted in jittery & jumpy scrolling, when the events'
values alternated between 1 and 2.
Change-Id: Ibb23ed4419d647fff9b90d371d5bb4037cf2bd9b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
While at it, fix some more issues in the sentences to
harmonize the description between the different classes.
Change-Id: Iee1c3ffe6fd71e82504bfb003d927c4db3b2a065
Reviewed-by: Martin Smith <martin.smith@qt.io>
TempFileTemplate is initialized each time an application starts.
It leads to the call of QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation)
which is slow and can even change permissions of the runtime directory.
Use a static wrapper function to initialize this variable only when needed.
Change-Id: Ib620f9b842c88103c67f8dfab200f4d39c9981ee
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QImageWriter::supportedMimeTypes() had an empty mimetype name
in the list because the mimetype for the key "cur" was missing in this
json file.
Change-Id: I4eae4275cb04c4d640dbcac76cd9dc99baa4f0a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Convert these keysyms into the corresponding Qt::Key_ enum values,
so that they can be part of a QKeySequence and used by applications.
Task-number: QTBUG-69062
Change-Id: I6f2e28191dd8dacd63d4bf710e1714fc5dcce75f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Fix warnings about invalid function type casts (return types
conflicting with the FARPROC returned by GetProcAddress()) like:
corelib\global\qoperatingsystemversion_win.cpp💯48: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'RtlGetVersionFunction' {aka 'long int (*)(_OSVERSIONINFOW*)'} [-Werror=cast-function-type]
by introducing nested casts.
Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: I8ba6a74e6347dada486ca40c98aa8999957c4281
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
While at it, add the comment to the toFloat() functions also.
Task-number: QTBUG-55232
Change-Id: I21c06363946f35fb3d89a51e4f75be392b57c0a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Both use QLocale::toDouble behind the scenes, so the same limitations
apply. Document them for toFloat() also.
Change-Id: I954362a0db203630685c034df6a921fa6447a509
Reviewed-by: Martin Smith <martin.smith@qt.io>
The order of the arguments of QHashCombine::operator() was
accidentally swapped -- the first is supposed to be the
accumlated value, the second the new value to combine.
[ChangeLog][QtGui][QMatrix] The qHash() implementation for
QMatrix has been changed.
[ChangeLog][QtGui][QTransform] The qHash() implementation for
QTransform has been changed.
Change-Id: Iba13f76ff734a2184c96184ee0e5748c05db07fa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is comparable to what we do on macOS, except that the scroll phase
and inverted state are missing.
Task-number: QTBUG-38570
Task-number: QTBUG-56075
Change-Id: I27502e1e2667317ab701f30f1fc601ae1e0591d0
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
List the values that are compared by the comparison operator overloads,
rather than the less specific "all values".
Task-number: QTBUG-68877
Change-Id: Id4df02b9019e13113fd38a598b8349293fab7915
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The inline operators are referenced by the container serialization
helper code above the definition, causing g++ 8.1/MinGW to complain:
In file included from ..\..\include/QtCore/qdatastream.h:1,
from access\qnetworkaccessdebugpipebackend.cpp:41:
..\..\include/QtCore/../../src/corelib/serialization/qdatastream.h:349:21: error: 'QDataStream& QDataStream::operator>>(quint32&)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline QDataStream &QDataStream::operator>>(quint32 &i)
^~~~~~~~~~~
..\..\include/QtCore/../../src/corelib/serialization/qdatastream.h:361:21: error: 'QDataStream& QDataStream::operator<<(quint32)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline QDataStream &QDataStream::operator<<(quint32 i)
Declare the operators to be inline to fix this.
Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: Ifa075aff8749df5c7a56148b8b9a0e3ec1e853aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change a0a22037cd wrongly introduced
a level of indirection when passing the MSG * as void * to
QWindowSystemInterface::handleNativeEvent() in
QWindowsContext::filterNativeEvent(). Remove the indirection.
Task-number: QTBUG-67095
Change-Id: Ibc2db7ae56bca38f79bafabfabb6127d6ff8cf09
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add menu bar with Help->About that contains a short description of the
example application.
Remove redundant title string between menu and application content.
Task-number: QTBUG-68652
Change-Id: I31fb386ab9c01eff86b8ed3ef274ba8cfdb0148b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
... by adding a prefix to the resource.
On android there is a resource ("qpdf") which gets included in the root
in all applications, included from "src/gui/painting/painting.pri".
So we move the test data to a sub-folder.
Task-number: QTBUG-68596
Change-Id: I67f2ed79a32c68d9a76cafba8ef23fe0da7c0fe8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When cross-compiling for Android on Windows the 'relative to test
source' option could end up possibly matching with a matching folder in
root ('/') because file is a Windows path and the canonicalFilePath of
that path is "".
Fixes tst_qxmlstream (and possibly others) on Android when Qt is
compiled on Windows.
Task-number: QTBUG-68596
Change-Id: I378374e41eea80f43680b3941adaa91fa604934a
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
"terminate" and "terminated" both fail on Android since
QThread::terminate not supported on Android. So we should skip them.
Task-number: QTBUG-68596
Change-Id: Id0d1dde2cfa02bb2978e5dd16087bf8f3bf112b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Undocked dock windows have the following flags:
Tool|X11BypassWindowManagerHint|WindowTitleHint|
WindowSystemMenuHint|CustomizeWindowHint|WindowCloseButtonHint
CustomizeWindowHint with no WindowMaximizeButtonHint
means that we disable window resize in order to remove
the zoom button (this is perhaps questionable, but
is established behavior). That will however break dock
windows: add exception for Qt::Tool.
After refactoring we discover this special case, again.
See previous fix in d37643c43.
Change-Id: I67a09341e75b92fdb3108ea93901295c39107fe1
History-repeats: QTBUG-46882
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
macOS 10.14+ will display an “Accessibility Access”
security dialog if we generate mouse events, so don’t.
Task-number: QTBUG-68830
Change-Id: If832ca3cd49ec6bdad1a8188feab884b6562e9d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Silence warnings about copying/clearing memory types which g++
considers non-trivial, for example:
windows\qwindowsfontdatabase.cpp:1003:75: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QChar' from an array of 'const ushort' {aka 'const short unsigned int'} [-Werror=class-memaccess]
memcpy(faceNamePtr, faceName.utf16(), sizeof(wchar_t) * nameLength);
qwindowsxpstyle.cpp:946:46: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess]
memset(&data, 0, sizeof(data));
^
qwindowsxpstyle.cpp:1053:38: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess]
memset(&data, 0, sizeof(data));
by introducing a cast.
Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: I160eb5fc7b64a2bc404e1fa61d306af2662d1252
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This allows distinguishing between these tools and tools for the host,
when cross compiling.
While mac tools normally only are available on macOS, there are third
party efforts to port them to other platforms. In these cases, it
might be useful to use a prefix (either some sort of triplet prefix,
or an absolute path) to distinguish between the host build platform
compilers/tools and the ones for the cross target.
The use of this variable matches the one used in a lot of other
mkspecs, and shouldn't cause any issues for those who aren't setting
it.
Change-Id: Iaeba571d955ea79ed1249989fcc525eb1eaf1f5c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Do allow people to build from git using the Qt License Agreement 4.0.
The license agreement text is the same as in the installers, except
that some Unicode characters got normalized to their ASCII variants,
and things have been properly wrapped.
[ChangeLog][Licensing] The commercial preview license in the git
checkout has been replaced by the Qt License Agreement 4.0 text.
This makes it explicit that commercial customers of The Qt Company
can use the git version under commercial terms. However, support
is (still) only provided for builds from released branches of Qt.
Task-number: QTBUG-52222
Change-Id: I9e99b68e236a09610b798ba7a841e5a9d1ce6898
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
androiddeploytqt is the only official way of deploying applications to the
device, so it is therefore part of the "platform". It therefore needs to live
in qtbase.
Change-Id: I52d7c4427275aacec792b71284a0c10edaf7ab69
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
In tst_QDateTime::springForward(), we test correct handling of times
in the gap; these are formally invalid and a mktime() implementation
may reasonably reject them causing our date-time code to produce an
invalid result. So handle that case gracefully in the tests, only
insisting on consistency between the two ways of preparing the date.
In one test, package the repeated code I was going to adapt into a
macro to save repeitition.
Task-number: QTBUG-68832
Task-number: QTBUG-68839
Change-Id: Ib8a16ff007f4e75ab2ccff05b1ccf00a45e50dc8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Android doesn't use the proper zone-abbreviation, so just check it
starts with the right date-time. Revised the way the #if-ery for that
is handled, to avoid repetition of the (now more complex) condition in
the two tests affected.
Task-number: QTBUG-68833
Change-Id: Iceb5469f46c69ba5cdbaf7ca050ad70f2bb74f44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>