Use QVERIFY2 to include errorString() in the failure message.
Change-Id: Iecb4e7694c3d71bfb786908a6a6c26b187d60c8f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Some of Qt's autotests depend on access to a test server. For each test
that used the test server, tests/auto/network-settings.h created a
global object to verify at startup that host lookups to the test server
will succeed (and abort the test otherwise).
There are two problems with that approach:
First, the sanity check happens before main(), and thus before the test
framework has started logging test results. This means that if the
sanity check aborts the test, the failure message will not be visible in
the test output if logging to a file or will cause the output to be
malformed if logging to the console in XML format.
Second, since Qt 4.7, the host lookup uses a class that connects to the
QCoreApplication instance, which doesn't exist before main(), and this
caused all tests that included network-settings.h to output an error
message from QObject::connect() at the beginning of the test.
Both of these problems are solved by removing the global object from
network-settings.h and instead performing the sanity check in the
initTestCase() function of each test.
Task-number: QTBUG-22876
Change-Id: Id49c1826906327bf571686cc11527f0265e5af44
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Four of the modified files only use functions from network-settings.h
on Windows, and the other three files don't use anything from that
header.
Change-Id: Ifa4b0319d14367735b859e538921fa0eeeccce1a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
When destroying QUnifiedTimer's instance, its default animation
driver is destroyed as well. This patch avoids creating another
QUnifiedTimer instance when the animation driver's destructor
calls QUnifiedTimer::instance().
Change-Id: I9cf254a9d04d79447baa8f27625c3890c3645f08
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
When using the Q_ENUMS macro to register an enumeration in a class
with moc, it's now possible to provide a scoped enumeration that
exists in another class. This adds the enum class scope to
a metaobject's list of related classes stored in the extradata
field.
This allows the declarative code to handle non-local enums in
signal and slot functions that are exposed to QML.
Task-number: QTBUG-20639
Change-Id: I94f5292818095fda75762bd1508ba5c69de19503
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Commit f4b6628083 fixed it on windows.
Now test it work within QAtomicPtr
Change-Id: Ibf5c31a133d6d544a78ce626fac9085b73c97fd5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since recently QSslCertificate::serialNumber() always returns the
hexadecimal format, so we need to adapt to that when checking the
serial numbers for the blacklisted certificates.
Change-Id: I43bdb1be77faad7ad79a835c896fc39477452e75
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
And use it from the Cocoa backend.
In general, for threaded GL rendering to work, any function that
affect the surface must be synchronous, so the implementor (such as
QQuickCanvas) can pick it up and block until the GL context has
released the surface. Otherwise, we will crash.
Change-Id: Id8484dac7452fe96fa80ade4ea321145f32124b4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
processWindowSystemEvent does not delete the event, so
allocate it on the stack instead.
Change-Id: Iffda940ffc86ef1fabfbf101e08956fa07c49689
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
... and only resolve the functions when the methods are available.
SSL 2 functionality is not always available in OpenSSL anymore.
Change-Id: Ia3178685b26c67ac55447476789e06710b596181
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Use QGuiApplication instead, since QApplicationBase was unconditionally
defined to QGuiApplication anyway.
Change-Id: I9d0c96835693e5ca6218c330b2d243579a5b0b38
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Instead move the traversal up to the ancestors to the bridge.
This simplifies the default implementation to just return 0
Change-Id: Ic3ec60851f378587f4a23363aec2039d0e8a08a1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
The current implementation on Mac OS X called update() inside
the cocoa plugin from the GUI thread, which breaks when trying
to use the GL context from another thread and the window gets
resized. We now only call it from makeCurrent()
Change-Id: I025aad3a3b140e85e729816bf3b68827337cc80d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Bug trackers come and go, so using bug identifiers in function and test
case names will ensure that those names eventually become meaningless.
It is better to choose a meaningful name and provide explanatory
comments where appropriate.
Change-Id: I67c27782ef21b5d4eaab4854079a043c8ef6957b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Those tests are the one from Thiago's C++0X implementation
The rvalue references ones are commented out because moc do not
understand them yet
But supporting them may come later.
Change-Id: I6b0720e7f2992be9f7e34770960fa58fa456a54b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QMetaCallEvent now can handle a pointer to QSlotObjectBase
Change-Id: I94da1e68ce9bb1fd96a9ae013a389552eb625faa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In addition to the old connection syntax, you can now connect using function pointers.
connect(sender, &Sender::valueChanged,
receiver, &Receiver::updateValue );
You can connect also to functor or C++11 lambdas
The connections are now type safe (no more problems with namespaces
or typedefs). Implicit type conversion is also supported.
The new syntax forces us to change the meaning of signal form
protected to public, in order to be able to access the signal's
address everywhere
The way it works is by introducing new overload of QObject::connect
that take function pointer as parametter. Those new overload are template
function, that are implemented inline. The actual implementation is
in QObject::connectImpl which take a QObject::QSlotObject* as parametter
for the slot. That slot object contains a virtual function which call
the slot which has to be implemented in the header as it depends on the
template parametter. So the internals of QObjectPrivate::Connection
will store this QObjectSlot* in order to be able to make the call.
You can read a full description here:
http://developer.qt.nokia.com/wiki/New_Signal_Slot_Syntax
History of commits before it was imported on gerrit:
https://qt.gitorious.org/~ogoffart/qt/ogoffarts-qtbase/commits/qobject_connect_ptr
Thread on the mailing list:
http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-August/000796.htmlhttp://lists.qt.nokia.com/pipermail/qt5-feedback/2011-September/001248.html
(The discussions on the mailing list were about trying to find a
solution that do not need making signals public, but no user friendly
solution was found)
Note: support for QueuedConnection, and the symetric QObject::disconnect is
added in another commit.
Qt::UniqueConnection is not supported yet in the new overload.
Change-Id: I67d08436b0720e7f2992be9f7e34770960fa58fa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
From a bool to a handle to to connection.
Also added a new overload of disconnect that disconnect a handle
This is required because with the new syntax taking lambda or functors,
it is the only way to disconnect a connection (as it is impossible to
compare functors)
The new return value is QMetaObject::Connection, it is a wrapper around
the internal QObjectPrivate::Connection.
QObjectPrivate::Connection is now reference counted.
tst_qglobal.cpp:
This test set up an internal callback, and the callback do not set any
proper connection handle (and tbh, it would be hard for it to do so).
So the returned QMetaObject::Connection is invalid, and ok is false
(Internal callbacks are only used for jambi and should probably be removed)
Change-Id: I111626fb4f47efc4db5e2ea5bff9da15f08fea7b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Support the common construct of a top-level test directory having
a test/test.pro with:
TARGET = ../tst_sometest
TESTDATA = ../data1.txt ../data2.txt
Prior to this change, the ".." in TESTDATA would cause the data to
break out of the test's installation directory.
Change-Id: I22860bf3a148f278b3f4e18b476fd151f7f0f775
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Navigate would return a random pointer here when asked for example for
not handled relations (label etc).
Change-Id: Iec4de94e6f76f14e89b43fe7327d98878aad58ee
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
This property is no longer necessary because we can now set the user
agent directly on the proxy.
Task-number: QTBUG-17223
Change-Id: I27cb126dd401f02525290d2317650f55cae9f4ef
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
The API is the same that is present on QNetworkRequest class. Since
these are HTTP headers, this only affects proxies of type HttpProxy and
HttpCachingProxy.
This was created as a general solution to the problem pointed out in
QTBUG-19569(some proxies only accept request with specific User Agents).
In the same way that there are cases where setting the User Agent is
desired there might be reasons to set other headers, hence the support
for any header.
Change-Id: Ifd04f34d29eedb6c2a3f0b50708244996b12a123
Task: QTBUG-19569
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This allows for more focussed notification of what part of the
model has changed layout.
The slots in the proxy models can be more optimized later.
Change-Id: I1bd17465b4be6f8efdc107036db897c557fcb519
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Debug snapshots and release snapshots aren't compatible. Both a
debug version and release version of the mkv8snapshot tool must be
built, and the corresponding executable selected when building v8.
Adopt the library naming convention for naming the mkv8snapshot
executable ("mkv8snapshot" in release, "mkv8snapshot_debug" in debug
on Mac, "mkv8snapshotd" in debug on Windows).
Change-Id: I7a94b09e7db7ed8bbaa293637c092a1d1d1dbaba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
... and use it in QCoreApplication::notifyInterna() instead of
"reinventing" the wheel there. The constructor and destructor for
QScopedLoopLevelCounter are inline, so the class does not need to be
exported.
Change-Id: I7af5a4ef0987f277bcc50c1057f3c74152f3d79d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
There's no real reason for the typedef here, QtNetwork
will compile without it and it might conflict with
openssl.
Change-Id: Id352ccc98d84ca9ee9ea3c7b4a942382882173f1
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Remove usage of QDirectFbConvenience::dfbDisplayLayer in the
QDirectFbBackingStore code and resolve the IDirectFBWindow through
the QPlatformWindow.
Change-Id: Ia7db8dedc91096648bc9de029d034002ba0d6a03
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
No need to go from IDirectFBWindow -> WindowID -> IDirectFBWindow
to attach the event buffer for the event system.
Change-Id: Ia5f7c20d06e8e1da5142f1bd99ca69906107adba
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
In case we fail to initialize DirectFB, use the DirectFBErrorFatal
to quit as there is no way we can recover from this error and the
QPA backend has already been selected.
Change-Id: I8001bf32d0a14ba21c2ec13121748a6384b87c2b
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
This patch is contributed by Thanomsub Noppaburana from libthai. It
added a special thai shaping function to handle SARA AM character
for fonts without OpenType rules to support it, like Nokia Pure Text
AS.
With modification to logClusters assignment to make sure that
QTextLine::glyphRuns(int from, int length) returns correct glyphs.
Task-number: QTBUG-21206
Change-Id: I5a78ee1ab2b4c874c7d0df17d4ee6d264ed5a790
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The forwarding headers in 'include/Qt' were deprectated in Qt 4. This is
Qt 5, so time to remove them.
Change-Id: I4bf3797475b91f58af1761ed4165b552613299b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Instead of assuming which layer was assigned to Qt, resolve the to
be used layer via QWindow::screen()->handle(). Add a method to the
DirectFB QPlatformScreen to provide a pointer to the IDirectFBDisplayLayer
Change-Id: Iaea9466ca84daff752a4932deafbe38f48123715
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
The screen handling will get a bit more complex due the integration
of different ways to do OpenGL. Move to a new file.
Change-Id: Ibe3e397d13da1b270ec4afaf046d28be50e976f9
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
The modified test was using QVERIFY in the destructor of a local class,
but QVERIFY should only be used directly in a test function. This
commit changes the local class to record the result of the test and
verifies that result in the test function.
Change-Id: Ie68ac6aa880368c961ebfa67cd452f0fbf26db89
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The ScreenOrientation enum was changed so that the values are power of
twos, angleBetween() needed to be fixed in order to reflect this.
Task-number: QTBUG-22554
Change-Id: Ia45dd6643b40b14204abf967b00c0d04834736a3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QDBusArgument extraction operators and QDBusDemarshaller that implements
the extraction do not check the type of the extracted value.
Helper function template qIterGet in qdbusdemarshaller.cpp that is used
for extracting basic data types only reserves space from the stack for
the expected type as specified by client.
If the actual type in the DBus parameter is larger stack will be
overwritten in the helper function by at most 7 bytes (expected one byte,
received dbus_uint_64_t of size 8 bytes).
The fix always reserves space for the largest basic type dbus_uint64_t
readable by dbus_message_iter_get_basic API.
See also http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#ga41c23a05e552d0574d04
Task-number: QTBUG-22735
Change-Id: I9aa25b279852ac8acc40199a39910ea4002042d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Apparently, MSVC preprocessor do not understand correctly the defined()
in that macro (used in another #if)
Change-Id: I9bd102eb4e0cbaa65bea48db786a45d861491ad7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
While still lacking, at least try to reflect reality a bit.
Change-Id: I8fcd0bd540806f3d1e314c60d854d2a90f66c14e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>