Commit Graph

6702 Commits

Author SHA1 Message Date
David Faure
ac86c8397c Pass configured timeout to callWithCallback too.
This was missing in ccf3b9e48b2d773999a9a88e249f79380618cde6.

Change-Id: I8bc8239591b893aad361b372a36ed5b9478aff24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 22:49:42 +02:00
David Faure
9724642621 Fix unit confusion in ccf3b9e48b2d773999a9a88e249f79380618cde6
I wrote nonsense in that commit. The older methods that take a timeout
all take milliseconds, and the comments in the unit test really meant
milliseconds, not seconds. 1s is not shorter than 100ms....

Change-Id: Ic18899bb0462d89575dc5a9a311478adc4dea1cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 22:49:26 +02:00
Lauro Neto
31a5fb1fa2 Update QXbWindow orientation API
After orientation handling was split in window orientation
and content orientation QXcbWindow remained with the old api.
This patch renames setOrientation to handleContentOrientationChange,
fixing the issue of double status bar (portrait and landscape)
when running Qt5 apps with QtComponents on N9 in portrait mode.
(thanks to Simon for pointing out the difference between
changing the window and the content orientations)

Change-Id: I20d0be0c7f7e4593ac1e3c2ac2518144fc7fed0e
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
2012-05-02 22:38:11 +02:00
Robin Burchell
266913a649 Stub out QDnsLookup on Android.
Android's resolv.h is completely crippled, so we can't use the libc resolver.

Change-Id: I07e310e3561c719f4fe0bf08e58b5194f5a76e4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-02 22:32:17 +02:00
Robin Burchell
dac828dd81 Android's resolv.h is busted, so stub out QHostInfo::localDomainName().
Change-Id: Idcf5ca7298eed55121b690906885af0eb3fe0b9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-02 22:32:13 +02:00
Robin Burchell
a195a5bfd6 Disable code using if_nameindex on Android.
Android doesn't support if_nameindex.

Change-Id: Idb0cbf52e6cffb19fe65e30430ef53626e0eeac7
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-02 22:32:07 +02:00
Robin Burchell
0c1ae68c0a Work around Android not having SYS_futex.
Even though we really shouldn't, we can get away with using __NR_futex instead.

Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I0ba449b740acf2c78825f8093d1515a74f0bc9cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 17:55:22 +02:00
Kevin Krammer
a818a1eb2f Add implementation of virtual keyboard based on BPS events
Change-Id: Ida4fa344c54db32b7b22b08a124b8c7b6df8adef
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-05-02 17:52:50 +02:00
Friedemann Kleint
77a8bd1e01 Windows: Fix a crash in Vista style.
Do not query the paintDevice of a backing store that has not
received a resize yet.

Change-Id: I49bf8f7e85c092c5664e5bc507802bd2cd8b62ea
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-02 14:53:41 +02:00
Bradley T. Hughes
af0df2d047 Remove unused Mac OS X code from QtWidgets
qcolordialog_mac.mm, qfiledialog_mac.mm, qfontdialog_mac.mm, and
qnspanelproxy_mac.mm are unused, remove them. The functionality they
used to provide is already included in the Cocoa platform plugin.

Change-Id: I2815d119687fd8d8dd421da36563afbd645ee000
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-05-02 14:53:41 +02:00
Stephen Kelly
98ac56676a Avoid macro re-definition warning for QT_NO_EXCEPTIONS
Change-Id: I0c4b2d00dd567af17f22b733b93032ff1056fcbd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 14:53:41 +02:00
Stephen Kelly
8dd66f42e8 Avoid undefined macro warning for __GXX_EXPERIMENTAL_CXX0X__.
The GCC use of this is already correct.

Change-Id: I28650196c7a325b552117fe2f2014ad7d6b365c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-02 14:53:41 +02:00
Casper van Donderen
c0f0a7825e QDoc: Remove all occurences of 'qdoc3' in source.
Change-Id: I7d4e3238a9233d6aab32cc7a3c5a883e718113d5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-05-02 14:53:41 +02:00
Casper van Donderen
21c3170fa6 Add "make docs" target for QtNetwork and sanitize other qdocconfs.
Change-Id: Ic9d6384b20162debeb69cb067c96c330c0fd999a
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-05-02 14:53:41 +02:00
stockton
e02e49852f fix documentation for QKeySequence::StandardKey "What's This"
add apostrophe and double-quotes.

Task-number: QTBUG-25545

Change-Id: Ib79953731953166ff7d8b999fee6571e62d86d01
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-02 14:53:41 +02:00
Kai Koehne
2f105af8de Enable QML debugging of qtquick1 with CONFIG+=quick1
Make the option name align with the name of the module.

Change-Id: I29a822b55b3cb52a51592aa2bd0746a53bfe44b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-05-02 12:21:55 +02:00
Andreas Holzammer
a3a1fea094 Support mkspecs in subdirs for xcompile under windows
Support mkspecs in subdirectories for cross compilation
under windows. Mkspecs in subdirectories are separated by
slashes.

Change-Id: Id3954cc38df2922b20156589335faad989ec0537
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-02 12:16:39 +02:00
Robin Burchell
61196fc248 mkdtemp() is not included in Android's libc
Use our own implementation instead.

Change-Id: Ic04dd480d52404e03e26cdf4caa1d00e4c3219c7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-05-02 12:14:17 +02:00
Sean Harmer
b17814e6ff Allow creation of QOpenGLShaderProgram without a current context
This change prevents the qWarning() in QOpenGLFunctions from being
triggered when creating a QOpenGLShaderProgram object without a current
QOpenGLContext. This is a common case especially when the shader program
is a member variable of a class.

It now relies upon the QOpenGLShaderProgram::init() function to resolve
the GL function pointers when the shader program is first used which of
course should be done with an active context.

Change-Id: Ib7dc345593f2a70d72ef8f650151cc90001058ca
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-02 11:36:36 +02:00
Sean Harmer
c73ddb0c0e Initialize QOpenGLFunctions before using it in QOpenGLShaderProgram
Change-Id: I472e97092b05f1721b7df5759d674c213d6018c6
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-02 11:20:42 +02:00
Olivier Goffart
36b3a6ad38 Fix compilation of public headers with QT_NO_DEPRECATED defined
Put the functions in QT_DEPRECATED_SINCE if possible

QPluginLoader::staticInstances is not documented as deprecated, and do
not reference any alternative use. So I unmarked it as deprecated.

Change-Id: I556c3f3657fb0490dd5543fcc56718fe9bd394e7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-05-02 11:14:09 +02:00
Olivier Goffart
bcd477e0bc Introduce QObject::isSignalConnected(QMetaMethod)
This is much more performant than calling QObject::receivers(const char*)

Can be used instead of connectNotify in some cases.

Change-Id: I19e0933f678f171f515d9a0f69f0ad4fb7d894b4
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-05-02 10:59:41 +02:00
Debao Zhang
ade8888603 Don't use obsolete qVariantValue, qVariantCanConvert, etc.
qVariantValue and qVariantCanConvert are Compatibility members, while in
Qt4.8 they are marked as Qt 3 Support Members.

qVariantFromValue and qVariantSetValue are Obsolete members.

Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-02 08:30:59 +02:00
Donald Carr
6102ab8d64 Make eglfs hooks functionality namespace cognisant
Change-Id: Ie9f86bd0494c0423f50d0f405922ab169b2431e3
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-02 04:29:15 +02:00
Rohan McGovern
2929b920af Fixed windows platform plugin with -qtnamespace.
Added missing QT_BEGIN_NAMESPACE/QT_END_NAMESPACE

Change-Id: I2ffc5ec18d19027c01c81ba9c29f6d7cac5e9619
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-02 03:20:56 +02:00
Rohan McGovern
6b98bf6a14 Fixed QtGui and QtPrintSupport with -qtnamespace and MSVC
With this compiler, external functions declared inside other functions
will end up in the wrong namespace.

Change-Id: Ia37283d632dbc2ee0c269aeffa1f045b3e60148e
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-05-02 03:20:53 +02:00
Kent Hansen
74c3517e6a Fix regression in connectNotify(const char *) emission
Reimplementations of connectNotify() and disconnectNotify() can
assume that the signal argument is in normalized form, but after the
introduction of the Qt5 meta-object format, it could happen that it's
not.

The problem is that the internal QArgumentType class, which attempts
to resolve a typename to a type id, was calling QMetaType::type().
QMetaType::type() falls back to trying the normalized form of the
typename if the original argument can't be resolved as a type (this
behavior isn't documented, but that's how it works). This means that
e.g. QMetaType::type("const QString &") returns QMetaType::QString.

Since QMetaObjectPrivate::indexOfMethodRelative() (more specifically,
the methodMatch() helper function) prefers to compare type ids
over typenames (since the type ids are stored directly in the meta-
object data for built-in types), the method lookup would *succeed*
for signatures with non-normalized built-in typenames as parameters.
QObject::connect() would then think that it did not have to
normalize the signature (see "// check for normalized signatures").
The consequence was that the original, non-normalized form got
passed to connectNotify().

This commit introduces an internal typename-to-type function that
is the same as QMetaType::type(), except it doesn't try to normalize
the name. This way, the only place where normalization can occur in
the signature-to-meta-method processing is through the calls to
QMetaObject::normalizedSignature() in QObject::connect() itself.

The implication is that there are now cases where the method
signature will be decoded and processed twice, where processing it
once was sufficient before. On the other hand, it is consistent with
the pre-Qt5-meta-object behavior, where we predict that the
signature is already normalized, and only perform (comparatively
costly) normalization if the initial lookup fails.

Change-Id: Ie6b60f60b0f9a57ebd378d980329dac62d57bbd9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-01 20:03:28 +02:00
Adrien Bustany
3013758f17 QNetworkProxyFactory: check the "no_proxy" environment variable
The QNetworkProxyFactory class considered the http_proxy environment
variable, but not the no_proxy one. This commit adds no_proxy handling,
loosely modeled after the way curl does it.

Change-Id: Ibb9e5ffcb30fed5c95dc9fc3bc4177e20d025a50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-01 14:56:38 +02:00
Rohan McGovern
2149b650ea Fixed compile of QSslSocket with -qtnamespace on Windows.
Q_DECLARE_METATYPE must be outside of the qt namespace.

System headers must be included outside of the qt namespace.

Change-Id: I2f48b1df87e5edae2baee6ce813af08d3e011dc0
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-01 12:38:07 +02:00
Olivier Goffart
9420a7da7a Fix warning
qxcbnativeinterface.cpp:209:8: warning: unused parameter ‘context’
[-Wunused-parameter]

Change-Id: I0c90e94020907cf84626af9f3fef3e6746182431
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 09:41:27 +02:00
Rohan McGovern
40a73d7c63 Fixed uninitialized memory in QMetaObjectBuilder::fromRelocatableData
static_metacall was never set on the metaobject written by
QMetaObjectBuilder::fromRelocatableData, sometimes causing a crash.  It
should be initialized to 0.

Change-Id: I79373d895e131f0cc2ff1af6d2177a0c1a282be7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-01 09:41:27 +02:00
Olivier Goffart
e1d5355325 Fix warning about narrowing inside {}
Such as
qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of
‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { }
[-Wnarrowing]

Change-Id: I00d66d96ef3af1a46935a58119668a20f8fd58c7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 07:11:13 +02:00
Sergio Ahumada
62185f07f8 configure: Escape '{' in getQMakeConf2 function
Change-Id: I7df0ca940a76b80d7b0da24dbedbabd2b8736bb8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-01 07:10:55 +02:00
Kevin Krammer
050ff2730c Handle navigator events in BPS event filter
Change-Id: I37b5de4bf1e9f9bbe53910eb5e3f490172b28371
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-05-01 07:10:45 +02:00
Kevin Krammer
e212d25972 Register for and handle screen events delivered through BPS
Delegates actual event inspection and reaction to the screen event
handler class already used by the PPS screen event handler

Change-Id: Ic07efa1de3f6b452f3091e901bd8a577175e3cf0
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-05-01 07:10:43 +02:00
Friedemann Kleint
0b05e4cdd5 Widgets: No longer use deprecated QPixmap::grabWindow(),grabWidget().
Change-Id: Icf0d6a672edcfd1d3d10275bb9a93bde29251e79
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 07:10:40 +02:00
Lars Knoll
1767e21123 Allow loading of static plugins by index
Static plugins could so far not get loaded by
index. Implement the missing support for this.

Task-number: QTBUG-25274
Change-Id: I901b08bfaf4f9fc3cb9fcea0b47f3ed89588a27b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 07:10:37 +02:00
Lars Knoll
c56e756aa9 Reset pointer to 0 after freeing
set m_textureResource to 0 after freeing it, to
ensure we allocate a new one two lines below before
using it again 5 lines below.

Change-Id: Ib9c4de94aefed91f15d0fab0cd3c774a64f2f891
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 07:10:34 +02:00
Lars Knoll
715e9caf19 Initialize member variable
Change-Id: Icfbe064e89b0c2f7b67ba58cbdc79347275b63b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-01 07:10:31 +02:00
Lars Knoll
f9c2094e49 Restructure how we initialize hash nodes a little
This should help to silence coverity which was complaining
hundreds of times about Qt not initializing h and next in
QHashNode.

Change-Id: Ib7977693e9786d4b310799e4f428115c65bb3fee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 07:10:31 +02:00
Lars Knoll
69218f58a9 Initialize members
Change-Id: I786de497af63a45d9c38780e856a3f27c5ce8468
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-01 07:10:28 +02:00
Martin Smith
7329d61212 qdoc: Further changes to the QML specialization
Re-adding <qmlInherits>, <qmlInheritedBy>,
<qmlInstantiates>, and <qmlSince>. Also adding
<qmlAttached>.

Change-Id: Iebd70a37b083bc404ce621d0bb9d3090dbc1109e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-01 07:10:25 +02:00
Stephen Kelly
aa17350eb6 Never attempt to run the dbus tests on APPLE.
The Qt buildsystem is creating the config files for it even
when it is not building QtDBus, so Qt5DBus_FOUND = True.

Re-enable the CI testing on mac with this change.

Task-number: QTBUG-25522

Change-Id: I5d2690d17fde6c5aabcbdd3e2eef9f0846edd97d
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-05-01 07:10:23 +02:00
Kent Hansen
31b0a37306 Temporarily disable -Woverloaded-virtual in headersclean test
This autotest fails to build after the introduction of the
QMetaMethod-based connect/disconnectNotify() functions; we are
intentionally keeping the old const char * versions (overloads) for
a limited time, to avoid disrupting other modules.

This commit will be reverted as soon as the compatibility overloads
have been removed.

Change-Id: I9b5a40b51ffa3bfa3d185410389678c262ca7b45
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
31e9f2a7a5 Port bearer plugins to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Some of the reimplementations were commented out since the signals
being checked for aren't even declared by the relevant classes.

Change-Id: I4486d1f3242db21cebd55fb53def3904f7c236ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
a08e0fca27 Port QtDBus to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: I1c7f0e46149964367f42faccfff4b89acbf16511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
e525957253 Port QNetworkSession to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: I36f6dc761e3b5a087e38db29b761c3e9237958b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
90c6d44512 Port QBuffer to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Also fix a bug in the disconnectNotify() reimplementation; when all
signals are disconnected at once, disconnectNotify() is only called
a single time, with an invalid method as argument. Thus, the signal
connection count should be set to 0, instead of decremented.

Change-Id: Ieee92293777bff87f8b28e56e23ab55d0b8b8101
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
b39c1a32b5 Port QtConcurrent to QMetaMethod-based connectNotify()
The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: Ica5b2c5020adf972db5005be8c062ddcdae8c0b4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-01 01:18:03 +02:00
Kent Hansen
243ea09e4c Add QMetaMethod-based QObject::connect/disconnectNotify() API
This API will fully replace the const char *-based connectNotify()
and disconnectNotify() in Qt5; the old functions will be REMOVED
before Qt 5.0 final.

The new implementation fixes the long-standing issue of
connectNotify() not being called when using the (internal)
index-based QMetaObject::connect() (e.g., from QML).

As with the old API, there are still two "unintuitive" behaviors
concerning disconnectNotify():
- disconnectNotify() is not called when the signal is disconnected
  using the QObject::disconnect(QMetaObject::Connection) overload.
- disconnectNotify() is not called when a receiver is destroyed
  (i.e., when a connection is implicitly removed).

The old versions of connectNotify() and disconnectNotify() are kept
for now, and they are still called. They will be removed once known
existing reimplementations (e.g., QtNetwork, QtDBus) have been
ported to the new API.

Change-Id: I8b4f007f3c6d89199c1ba04a3e23c8ca314e0896
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-01 01:18:03 +02:00