The number of paint events is correct now, but the first expected region
is still incorrect. Move the XFAIL to the region comparison.
Change-Id: I3e706cf703b20a0e98b644b3082172fc3142b44f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
CFRunLoopTimer's callback will never recurse. Since we are using one
CFRunLoopTimer to drive all Qt timers, we need to work around this by
sending all timers via a dedicated CFRunLoopSource (since these
callbacks can recurse). We also need to block this new timer source
along with the posted event source when calling processEvents()
"manually" to prevent livelock deep in CFRunLoop.
Change-Id: I375e46b6cfa0c76db678a1085314d42d8996d062
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Mac OS X provided a platform API for marking a window/document as
modified. This previously worked in Qt 4, so we need to have an
interface to keep this working in Qt 5. If the platform window does not
provide an implementation, fallback to setting the window title.
Note that this does not add any QWindow API, it's only in
QPlatformWindow.
Change-Id: I84c5a5df8536859157f2b1fa9e4cc647a09fd06d
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
QTimeLine appears to have very poor timing characteristics. Historical
CI logs show roughly one failure in every twenty-five test runs on
Windows, and less frequent failures on Mac and Linux.
The root of the problem seems to be that QTimeLine's currentTime
counter appears to run at a variable speed and the only guarantee is
that it is slower than wall time. The frameChanged() test
function waited for double the expected duration of the timeline and
still found that the timeline had failed to finish in about one in every
thirty test runs. The interpolation() test function also failed for the
same reason, though less often.
This commit makes the frameChanged test more strict so that the poor
timing will be demonstrated more often, waiting only 1.5 times the
duration instead of double the duration. It also makes the test fail
gracefully so that this known issue won't disrupt CI when the test is
made significant in a later commit.
Task-number: QTBUG-24796
Change-Id: If469d43abb662e24445a9da619052eea9cf7c581
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
QTimeLine::currentTime() is an integer in the range [0..duration], not a
float in the range [0.0..1.0]. The aim of the test appears to be to
verify that currentTime() is at least 90% of the way to duration() when
the timeline is almost due to finish, so verify that and give the
corresponding 10% tolerance on reaching the end state.
Change-Id: I38646947c3b9189a4e8e91a450c6071430ddc66a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This test hangs ~2.6% of the time in CI.
Task-number: QTBUG-25342
Change-Id: I2c3531140e15edfe2dc2524e101b84e3206a4e61
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
const was missing in many convenience functions.
grabWindow should not be const since it actually does something.
Change-Id: I0ffa718878d4251c4fb5c34789cf58ebb85cff37
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Practically all functions in QGuiApplication are static.
Change-Id: I5948620865c021029a3c04b31901b1110e6c0d27
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Default QDataStream version was changed in Qt5, but the test tried to
load an old dumped file.
Change-Id: I49c06c232ec8a27f33c9da345bae4e03cd0c56fb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
When destroying a window immediately after showing it, we can sometimes
provoke a crash in Cocoa after the show-window-animation has finished
(which appears to assume that the window's view will always be valid).
Prevent the crash by not removing the view from the window. When
recreating a window, we explicitly release the old window, but we do not
release the view, so we can freely add it to the new window (i.e. this
does not introduce new bugs related to recreating the platform window).
Task-number: QTBUG-24977
Change-Id: I466ce75b04785401032a0a2d4a2c494910cd1672
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
testlib now compiles without widget support and it will be great to get
this code path QAed and testable.
Change-Id: Iceb641bf04fdac84ef0a0f86d0abb83f4c66bf80
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Provide support for platforms with older implementations of
realpath() (eg. iOS).
Change-Id: Iec7f73c8014d238ae6a2cb2fa836b36b89ce4ef6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
When creating the temporary project object,
Option::output_dir must be adjusted temporarily.
Task-number: QTBUG-22788
Change-Id: Ibf8897a46b63f48b9e33d7e2168b09e559cecec7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Since Windows Vista the resource language must be included to
make the version information visible in Windows Explorer.
Two new variables have been introduced:
RC_LANG (default: 1033) - resource language
RC_CODEPAGE (default: 1200) - resource codepage
Task-number: QTBUG-23218
Change-Id: I29e102d19501e3b7a43d5096fc4806bc38a4d846
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
For variables that are supposed to contain a single int,
this method returns the numeric value.
Only the first value of the variable is taken into account.
Change-Id: Ifa11ba5ac044e0a4703a387a9bcf02043e4681d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This function is used to pass non-spontaneous events from QWindow to
QPlatformWindow so that QPlatformWindow subclasses can do any platform
specific event handling (such as setting/clearing modality flags on
QEvent::WindowBlock/WindowUnblock).
Change-Id: I82a89e8dadcd2f706aae25889d79cbfac9c2ee18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Otherwise, the order of updating of the indexes will cause
inconsistent results because it will rely on ordering within a
QHash (which is indeterminate).
Task-number: QTBUG-25325
Change-Id: I7d99578c8ee2954b8562dc5aff7dc32e74d41fb5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The include files have a hard dependency on OpenGL (ES2); testing for the
presence of EGL support is insufficient grounds for including this
functionality
Change-Id: I391b5dbbcbef40ecf68d16617b6eb1c0bb4b799e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This is needed to use the classes with standard algorithms
and is the Right Thing anyway.
Change-Id: I13d1e0bfabbd216319cc138f11a9b3240f093052
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The only valid state for EGLFS is fullscreen; this change reduces EGLFS to
reflect this cruel reality
Change-Id: I5aa9b4ef88451a00ce9de328add7d5512e1c86b5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This test has not failed in the last 500 Continuous Integration runs.
Task-number: QTBUG-22769
Change-Id: Ib2e95bb2291757941baa0ea46d568816eef20b09
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This improves quality of rendering for QWidget-based applications a bit.
Change-Id: I6b832d1de7e722f4dbe4e82882f5db35f0b8c30c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
The used functionality is partially not available under WinCE.
qnetworkfunctions_wince.h encapsulates the needed extra symbols.
It only needs to compile as the functions are loaded dynamically.
Change-Id: Ieb9010d4f6c7f94d39918b869ac503976e094e49
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
The current approach of forcing people to pass the fully qualified prefix
of their toolchain to the configure script is verbose and something of a
chore for people who use the same toolchain to target several devices.
This allows you to set a single toolchain for use with all Qt targets via:
qmake -set CROSS_COMPILE foo
You can still explicitly override this toolchain, as originally mandated,
with the configure time device-option arguments.
Change-Id: Ibd3d940bb08fa09499533f9c661557e337a8421a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Previously the cache was not enabled if the request had AlwaysNetwork
set. This removes the check for the CacheLoadControlAttribute when
checking if the cache should be enabled.
Task-number: QTBUG-15805
Change-Id: I3d0722fbc1e6c77c5b947a2af0a09e2de8f4f9df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
The QPA api is internal and not meant to be used by app users.
Change-Id: I37245e9635bf22f2454e763699dd58eca6565b63
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
All QPA api as marked as so:
* preliminary - the api is subject to change anytime
* internal - internal api that shouldn't be used by apps
* ingroup qpa - "qpa" module. In the long run, qdoc should
generate documentation for qplatform* API as if it were
a seperate module.
Change-Id: I4e76c0e0c1805c679cabd52d5006f9fa9bc411c0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
The QPixmap in the pixmap cache should not outlive the QPlatformIntegration.
Clear the cache shortly before destroying the platform integration. This is
fixing a crash with the DirectFB plugin in the tst_qpixmapcache test.
Change-Id: I0b1a304dc37d874b412aadb77f8dbaa7d292711f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
There's no need to change behaviour now. The current marker (@Invalid())
returns an empty string list, as opposed to a list with one item.
Changing it would break compatibility unpredictably with Qt 4.
So I choose not to change QSettings. Let it be "Done".
Task-number: QTBUG-25110
Change-Id: Id1f353dfed800005d927183da237f3f8357c496d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Useful when we get relative events, as otherwise the mouse might end up
far outside the screen boundaries.
Change-Id: I8e3884ab2acb03eaa6afce8926f503dbd03b0c5d
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Growth computations are deferred to QArrayData::allocate, except in the
case of realloc as that functionality is currently lacking in
QArrayData. Since that sits in library code, anyway, it can be changed
later to use a future QArrayData::reallocate.
As it is, reallocData is becoming a model for QArrayData::reallocate
and what it can offer to containers of POD/movable types.
Change-Id: I045483f729114be43e4818149d1be1b333bcbe13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In this branch, !IS_RAW_DATA has already established that offset is
sizeof(QByteArrayData) and realloc maintains the assumption.
Change-Id: Ic160e36d7781d4c4f64a3b2ebec98c9cb605b3eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
For the time being QByteArrayData keeps its independent existence, for
the sake of other modules. Once they have been ported to use the new
initializer macros it can be changed to:
struct QByteArrayData { QArrayData array; };
Extra braces can then be added to the macros.
With respect to source compatibility, the only concern is with other
modules, as QByteArrayData has already changed in incompatible ways with
Qt 4.x
Done-with: João Abecasis
Change-Id: I044e2a680317431777a098feec8839a90a3d3da3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This eases porting to QArrayData and retains semantics. In append() and
prepend() a conditional was generalized so that no work is done if there
is nothing to add.
Done-with: Jędrzej Nowacki
Change-Id: Ib9e7bb572801b2434fa040cde2bf66dacf595f22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
In conceptual terms, this change increments the Data::alloc member by
one for all strings allocated and maintained by these classes. Instances
initialized with fromRawData retain 0 as the member value, so they are
treated as immutable.
This brings QByteArray and QString closer to QVector, making it possible
for them to reference and share the same data in memory, in the future.
It also brings them closer to QArrayData.
In practical terms all comparisons to the alloc member were changed to
take into account that it also tracks the terminating null character.
Aside from the increment in the alloc member, there should be no user
visible changes.
Change-Id: I618f49022a9b1845754500c8f8706c72a68b9c7d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ic0bd8f68080bf139d81266d033cfd3c96a8d01f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Change-Id: Ib40807b97bf8d9ec26e0dfe2797786d9352ce579
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
A recent change in platformsupport required "egl" to be defined,
otherwise the QNX plugin would fail at runtime with unresolved symbols.
Now the EGL config test passes.
Change-Id: I111eb939abac86885bcdb35d5f5899f515bd8c4e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Instead of having to pass -no-xcb -no-eglfs -no-directfb, it's
better to pass -no-qpa-platform-guard which is also resilient
against future platform additions.
Change-Id: Id68bfe3688980fa273665b01b9332f5d6f359491
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
qpa includes are considered private and should not be included
in public header files.
Change-Id: I26c744ec1d8ddef7b0c11c3d26b593be05f5aa54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Should be const just like Qt4's QGLContext::getProcAddress.
Change-Id: I273467d5cf852cd49f48cec3f335c4ddac795363
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>