Commit Graph

5816 Commits

Author SHA1 Message Date
Debao Zhang
5ec17700fa Remove redundant \since 5.0
\since 5.0 has been add to the class section, so member functions and
properties donot need this any more.

see SHA: 5728c8a8e7

Change-Id: I4e67461373dda99ee1fbfdeb6477fde1dcfec116
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-22 08:51:48 +01:00
Kurt Korbatits
d6d77d54aa Fixed path in qobject unittest
- Fixed path was failing to find sub program.

Change-Id: I86f1a6941e244c9bc25ad0441cc7a441607560b7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-22 06:49:08 +01:00
Kurt Korbatits
c7093ba874 Changed installTestHelperApp() to use relative paths to build
- Changed installTestHelperApp() to use OUT_PWD path to find files.
  (was looking in source tree instead of build)

Change-Id: If795c17a76aebcfbbe0d4f84c5df784a255ddb19
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-22 06:49:06 +01:00
Sergio Martins
03238488eb Use delete[] instead of delete.
Change-Id: Idfa039a56ce0f7af92e91ec1657d91c79c400d6c
Reviewed-by: David Faure <faure@kde.org>
2012-03-22 06:48:42 +01:00
Kent Hansen
e1e0e83c5e Remove support for meta-object revisions < 7
For Qt5 we no longer want to support the older revisions due to the
dual codepaths that must be maintained, and because the format of the
meta-object data is quite different in revision 7.

The dual codepaths have been replaced by asserts that indicate the
revision in which the feature was introduced, and the older-revision
fallbacks have been removed.

It's not possible to build code generated by moc that has
revision <= 6 with Qt5 because the type of the
QMetaObject::stringdata member changed from const char * to const
QByteArrayData *. For the same reason it's not possible to build a
dynamic meta-object generator targeting revision <= 6 with Qt5.
Hence, too old meta-objects will be caught at compile time, and the
code will have to be ported to generate revision 7 (e.g., by running
Qt5's moc on the original class declaration).

Change-Id: I33f05878a2d3ee3de53fc7009f7a367f55c25e36
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-22 06:37:26 +01:00
Kurt Korbatits
bcba6ed252 Added extra tests to json benchmark
- Added toByteArray() and fromByteArray() benchmark tests.
  Performance tests to measure QVariantMap to bytearray
  and bytearray to QVariantMap.
  Use case: Interprocess communications via local socket

Change-Id: If5e94ff870890b2ebb665f3cc38f5c33b34547f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-22 00:00:28 +01:00
Jerome Pasion
df6a08951a QDoc: updating manual to use "type".
-updated both QDoc manual and QDoc guide
-"QML element" and "QML component" should be "QML type"

Change-Id: Ib2a0e8baa9087a04d35c05bbbd35852da10faf42
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-21 20:58:10 +01:00
Casper van Donderen
3ba8d3b4b0 qdoc: Disable generation of .pageindex file.
The .pageindex file was generated for the search engine on the
doc.qt.nokia.com website, since this website is not used anymore there
is no use for the .pageindex file.

Task-number: QTBUG-24911
Change-Id: Ie74f569ce881ab383d83ac9c5a8bc223da91564a
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-21 20:58:02 +01:00
Kevin Krammer
9dc86ac0f2 Use main thread event loop for navigator event processing
Removes the need for an extra thread by creating the event handler's
socket notifier in the context of the main thread.

Change-Id: If8c7bb986074083b5b9a7b9c96734a970ba32f92
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-21 20:47:54 +01:00
Stephen Kelly
a974986d07 Change the parameter name of signals to be consistent.
Change-Id: Ib602fde3f9cb240f328457abf57a341c98aaace9
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-21 19:56:38 +01:00
Kent Hansen
22d621dd99 QMetaMethod::typeName() should return "void" if the return type is void
QMetaMethod::typeName() is documented to return an empty string if
the return type is void. But after the introduction of
QMetaType::UnknownType (where void was made a distinct type),
returning an empty string causes the idiom

   QMetaType::type(method.typeName())

to break; the result will be QMetaType::UnknownType rather than
the expected QMetaType::Void for methods that return void.

New code should use the new function QMetaMethod::returnType()
instead, but it would be good if existing code still did the right
thing.

The consequence of returning "void" instead of an empty string is
that it breaks existing logic that uses the typeName() length to
determine whether a method returns void. But we judge this as the
lesser of the two evils; it's better to have a typeName() function
that is consistent and keeps the QMetaType::type(method.typeName())
idiom working, than to force the typeName() inconsistency for void
only to keep code that does "strlen(method.typeName()) == 0"
working.

The places in Qt that were relying on a zero-length typeName()
(testlib, dbus, declarative) have already been changed to use
returnType().

Also adapt QMetaObjectBuilder, which is internal API.

Change-Id: I70249174029811c5b5d2a08c24b6db33b3723d19
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-21 18:55:51 +01:00
Kent Hansen
b8d71ed60b Fix QMetaObject::normalizedType() for "void" argument
Since the introduction of QMetaType::UnknownType, void is a proper
meta-type, and the normalized form of "void" should be "void", not
an empty string.

Add more tests to ensure that we do remove "void" in the one case
where it actually should be removed (e.g. "foo(void)").

Change-Id: I72dc2d24da67cf52da00c678f50213cff1b92e25
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-21 18:55:27 +01:00
Frederik Gladhorn
3ed12e4b26 Remove Q_WS_X11
The define is removed and only adds includes.

Change-Id: Id6cc32aa22536f78bb5de10cb779a3168e79441a
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-03-21 15:51:42 +01:00
Kent Hansen
e2502e1a06 Use the new QMetaMethod API in testlib
Use QMetaMethod::name() instead of parsing the signature.
Use QMetaMethod::returnType() instead of checking the length of
typeName().
Use QMetaMethod::parameterCount() instead of checking the
size of parameterTypes().

Change-Id: I424370b19b5b150865377666dca0fba5f29ad30f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-03-21 13:38:03 +01:00
Pekka Vuorela
a80d2c73c1 Fix QWidgetTextController issue when used with QtQuick1 TextEdit
Calling QInputMethod::invokeAction() was not checking for proper event
type and was requiring context widget unnecessarily.
Fixes some parts of QTBUG-24035

Change-Id: I51fe9ed02a018ced36319eb672a088503649b275
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-03-21 12:33:49 +01:00
Robin Burchell
0f9e98a586 Fix directories never being unwatched after deletion on Windows.
This causes all sorts of problems, but is also blocking the introduction of new,
more detailed signals, because the backend never correctly identified the removal.

The object handle appears to be woken up before the directory is actually
deleted, thus causing QFileInfo::exists() to return true, and not doing the
removal dance. This behaviour isn't exactly documented (as far as I was able to
find out), but also seems to happen consistently, and Chromium also contains
a comment noting a similar issue.

Task-number: QTBUG-2331
Change-Id: Icfb6219b78e688852d7863a666a0ffc31bb4d573
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-21 12:32:16 +01:00
Bradley T. Hughes
5672e1affe Cocoa: improve mouse button tracking warnings
The warnings about "Internal mouse button tracking invalid" should check
for the correct button before emitting a warning. The warning should
also mention the correct button as well. For otherMouseDragged, we
simply check for any button that's not the left or right button.

Change-Id: I9eb6d6bd7fb5919e745b7f8eb517b4bc9efd36a6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-21 12:21:11 +01:00
Morten Johan Sorvig
7445d41e32 Cocoa: Improve window activation handling.
Make Qt window activation follow the Cocoa key
window, with one exception: Popup windows become
the key window but not the Qt active window.

Change-Id: Ic4d8685737fa3ec5c15a68b81844929370c9cd8e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-21 11:56:56 +01:00
Debao Zhang
d4258bc238 QLatin1String: Suppress MSVC warnning.
Change-Id: I61ab71549799a5af8cce85e334245642a266c3c8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-21 11:52:34 +01:00
Jerome Pasion
68d291c12a QDoc: Changing "element" string to "type".
-QDoc output should use "type", not "element".
"This type was introduced..."

Change-Id: I72b6ba6318889d7727796b80574b72694f2b7594
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-21 11:50:06 +01:00
Oswald Buddenhagen
18ddad191e permit explicitly empty qt.conf entries
this allows expressing "no SettingsPath" cleanly, and makes the
internals cleaner.

this is marginally behavior-incompatible in that if somebody had Prefix
or Data set to an empty string (rather than a dot, which is hinted at by
the documentation and commanded by common sense), he would have gotten
the binary's directory resp. Prefix, while now it will be just empty.

Change-Id: I3c11cc4e8671ffb604d4889389764a9ba9c2e7e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-21 11:49:10 +01:00
Giuseppe D'Angelo
cb32450c47 QRegularExpression: add QObject::findChildren overload
This actually involved tiding up QObject sources a little bit
to clearly separate QString / QRegExp overloads of findChildren.

The corresponding qFindChildren overload for MSVC 6 compatibiltiy
was *not* added.

Change-Id: I84826b3df9275a9bda03608a5b66756890eda6f8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-21 11:43:38 +01:00
Giuseppe D'Angelo
8659495202 QRegularExpression: support for QStringList overloads
Change-Id: Ia9017348742e41187684185d04b56d27edd383b5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-21 11:43:30 +01:00
Jason McDonald
054b69c963 testlib: Remove obsolete internal compare_helper overload.
Change-Id: Ic98faf360a713ac698f9bf1ff8aaad5a4c5c176b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-21 11:43:23 +01:00
Jędrzej Nowacki
bfd2b30faf Crash fix in ~QVariant
QVariant handlers can not be unregistered. We are not able to guarantee
that such operation is safe and we do not want to.

Change-Id: Id9a12e6a8c750110e4a08eab1de3e07e5c408675
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-21 11:43:14 +01:00
Thorbjørn Lund Martsum
a4a61bb3ef QCoreApplication - add return type bool on install/remove translator
This add a bool as return value on QCoreApplication::installTranslator
and QCoreApplication::removeTranslator. It returns true on success.

Before it was very clumsy to detected this. It was needed to react
on the signal and mark a success - just to provide an error message
on failure.

This is 99.99% source compatible - only if someone grabs a function
pointer to this - it will break the code - but it seems to be very
theoretic.

Change-Id: I947fcee1352f530e559bb177a90c10d84eed1aec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-21 11:02:46 +01:00
Jiang Jiang
2cc5442b02 Remove hardcoded font names in QFont::defaultFamily()
QFont::defaultFamily() should not use any hardcoded font names like
"Helvetica" or "Times" as they might not be present in certain systems,
it should rather use abstract names like "sans-serif", "serif" and
"monospace" then let the platform plugin to decide which font map to
them.

Change-Id: I5aafb103a5238c17b10773711ad504806c6fc3ce
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-21 09:00:22 +01:00
Morten Johan Sorvig
7f18dbc30c Cocoa: Implement screen availableGeometry.
As usual the y coordinate needs to be inverted.

Change-Id: Iac9b48f9bdb475a3d5a76b930c2e138a625f1ef8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-21 07:00:34 +01:00
Bradley T. Hughes
bf469e923e Cocoa: fix inactive palette text color
The QPalette::Inactive text color should be the same as
kThemeTextColorDialogActive. kThemeTextColorDialogInactive is for
disabled widgets/windows.

Change-Id: I55eb63fff213cb9870a991455cbc3254b9d1538e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-21 06:58:07 +01:00
Bradley T. Hughes
83a6435595 Cocoa: fix crash when using QPrintDialog
The contextInfo passed to printPanelDidEnd should be a QPrintDialog*,
not a QPrintDialogPrivate*.

Change-Id: I8f9aae2f27b483b4669f9d39cdafd0ddeb37fd22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-21 06:57:57 +01:00
Jędrzej Nowacki
37b0a8e7e6 Fix qDebug stream for an invalid QVariant.
This patch changes invalid QVariant qDebug stream value from
"QVariant(, QVariant::Invalid)" to "QVariant(Invalid)"

New tests were added.

Change-Id: Ia57d4fc2d775cc9fce28e03eba402c2173845b35
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-21 06:55:33 +01:00
Donald Carr
b936b95965 EGLFS: Integrate building into configure.
With the move to the QPA architecture EGL is now only required by
individual platform plugins and the configure script has been adjusted to
reflect this.

Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-21 03:03:29 +01:00
João Abecasis
c236842241 Use clang's builtin is_enum, if available
Change-Id: Ie0c32b8fd6d3bb02cf6c6b626bb31d57cdcdf497
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
2012-03-21 01:18:22 +01:00
Donald Carr
2003b83f6f Avoid Qt/X11 header contamination via egl.h
egl.h on certain platforms directly includes X11 headers, resulting in an
all too familiar header conflict. There are existing defines we merely need
to set in order to avoid this eventuality.

Change-Id: Ic91b66286ad6cc329f9c88b5e47834690a8eb96a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-20 22:52:52 +01:00
Kent Hansen
3e1e0b41a8 Use the new QMetaMethod API in QtDBus
Use QMetaMethod::name() instead of parsing the signature.
Use QMetaMethod::returnType() instead of resolving the type id
via the type name.

Change-Id: If5d0198c5f1329fd9d9340acd58bd4a36933d960
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-20 22:23:13 +01:00
Kent Hansen
83e055424a Add QtJson types to meta-type system
Make QJsonValue, QJsonObject, QJsonArray and QJsonDocument
first-class meta-types.
This is an enabler for a lightweight integration with QML.

Change-Id: I4725efdd2746cf97fd26d3632a99e8eee849f834
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-20 22:22:41 +01:00
Stephen Kelly
8727db0dad Fix cross-compilation of qdbus bootstrapped tools.
Change-Id: Ib40fc1c1743ff23a259cabbf26d91956398c3239
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-20 22:20:25 +01:00
Stephen Kelly
fbdf76771c Reserve a virtual method for use with a feature in Qt 5.1.
The view will query the delegate for roles which are relevant to
the particular delegate. For unrelated roles, the delegate
will not have to repaint when the data changes.

Change-Id: If8f1ba4c2bce7dbcf70de344b984aea1deca0edd
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: David Faure <faure@kde.org>
2012-03-20 22:20:13 +01:00
Stephen Kelly
8687cf1f99 Forward declare QMetaObject as a struct.
Fixes compiler warnings with clang and others.

Change-Id: I726d4c10644287bb642c8b5dd28172afe8c4d1ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-20 19:20:02 +01:00
Stephen Kelly
0042b5f0f2 Reserve the virtual viewportSizeHint method in QAbstractScrollArea.
The virtual method will be used to implement
the patch at http://codereview.qt-project.org/#change,11763

Change-Id: I6d6ffbb8aaaba73e5c769f3435cc60323c77b75a
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-20 19:09:27 +01:00
Girish Ramakrishnan
9cf35d1241 Add egl include paths and link lines to eglfs.
This is the equivalent of 821fc4cf4e520a74b8d4c834f2fb46e4e2f27001
from qt4 but done differently because qt5 has egl.prf.

Change-Id: I52114239bdeda6c300db04a7859cae52aa9e9b41
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-20 17:30:32 +01:00
Jiang Jiang
1d6e16a6ac Fix a typo in QFontconfigDatabase
Font family names for default families (Serif, Sans serif, Monospace)
was only taken from the first family in the array (aka. always Serif).

Change-Id: Ia326dc85e03819f1a72deda66aade348809d94da
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-20 17:30:32 +01:00
Eskil Abrahamsen Blomfeldt
5234e901be Fix GPOS positioning for some fonts
We need to do ACCESS_Frame for each 2 byte frame, otherwise
the position of the cursor in the input stream will not be
updated by enough, and we will read twice as many pairsets.
Depending on the value read for the SecondGlyph in the
broken pairsets, we might get strange kerning results.

Change-Id: I7fb5a850afe0364b3dd50869d5f36fd14d2f4eaf
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
2012-03-20 17:30:32 +01:00
Sean Harmer
7165e68033 Set the default QPA plugin for QNX builds to "qnx"
Change-Id: I630c3631d480929c1e3a618d0f0b084fd2cc6ad0
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-20 17:30:32 +01:00
Giuseppe D'Angelo
240ef4d9ec Fix stltest compilation
The usage of std:ptrdiff_t in the test requires the #inclusion of
the cstddef header.

Task-number: QTBUG-24828
Change-Id: I7e1ca6ee010469708f8da1709563b5ebced972e5
Reviewed-by: Anssi Eteläniemi
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-20 17:30:32 +01:00
Stephen Kelly
afa50b1478 Add API and reserve space for storing the QMetaObject with the QMetaType.
In Qt 5.1, http://codereview.qt-project.org/#change,19113 can be rebased
on top of this change in a compatible way.

Change-Id: If7ac0481a3b2a874528de4ef6ea7535501a4ac71
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-03-20 16:03:57 +01:00
Marius Storm-Olsen
e67066eff6 Remove old bic test data
We will not be testing BIC of Qt5 against Qt4

Change-Id: I6f0eea3dd60eea1535749240a178a19605c981d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-20 15:24:48 +01:00
Samuel Rødal
7a169fb52a Revert "Remove the LIBS from platformsupport"
This reverts commit cd6e90c70a.

Prevent symbol lookup error when requesting alpha visuals with GLX in
the xcb plugin. This means other plugins will also link against
-lXrender, but we need this workaround for now.

Change-Id: I2fd2c63bc577c2497060a555c91d72337723b931
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-03-20 14:43:45 +01:00
Martin Smith
1ae2a0227a qdoc: Handle multiple \ingroup commands in QML types.
These were not handled in the QmlVisitor class.
It was believed they would appear as separate
commands in QmlVisitor, but the appear as one
\ingroup command followed by several group
identifiers.

Change-Id: If198433f7cd5095264f41346987c49ee4c30a786
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-20 14:21:25 +01:00
Martin Smith
95571df87e qdoc: Remove short description from apiDesc
The XSLT already adds this from the <shortdesc>.

Change-Id: I5813bf668f9b198e6b76bc0af8f26c7a910890fb
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-20 14:19:46 +01:00