Commit Graph

5841 Commits

Author SHA1 Message Date
Thiago Macieira
bd112dab56 Make tst_qmovie work in shadow builds
Change-Id: I8fe4b5e98ce2fb1ac8420bf568f5c9c973165fbf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Marc Mutz
3f7741fbe7 QPointer: some optimisations
Implement QPointer in terms of QPointerBase,
a non-template roughly the same as
QPointer<QObject>, to reduce the amount of
template code being generated.

Also mark QPointer as movable, fake an
isNull() for qdoc, and remove qpointer.h's
content from QT_NO_QOBJECT builds (some
indirect include hits the missing
QWeakPointer(QObject*) constructor when
bootstrapping; worked before b/c QPointer
is a template; QPointerBase isn't, though).

Change-Id: I657826601f570f954d80b84bb0334dd3a7452859
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 17:45:47 +01:00
Kevin Krammer
29518b04a6 Make QNX virtual keyboard handling main event loop driven
Refactor from polling in an endless loop running in a separate thread
to using a QSocketNotifier working on the main thread.

Similar to "de-threading" of the navigator event handling in
9dc86ac0f2

Change-Id: I994dceed07312a3846737c8bea34cffa4ab408f1
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-22 16:47:06 +01:00
Joerg Bornemann
1a414cbc26 Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)
Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo.

Task-number: QTBUG-20480
Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-22 16:13:21 +01:00
Sean Harmer
c6965407e5 Add x86_64 to CONFIG on Mac OSX only when not cross-compiling
Change-Id: Idd066010334999376d8b2c9619d797e4eb1f1153
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-22 16:13:21 +01:00
Sean Harmer
8ec49c810c Set absolute_library_soname on mac only when not cross-compiling
Change-Id: I24a2b70a515483d9d0990f66bff2b37df72faf17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-22 16:13:21 +01:00
Mark Brand
29a67e29b9 QSql*Model: add SQL syntax helper
Change-Id: Ia53e30d7a2f2bb5b4f76c32fcf0fe526d1e4ab51
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-22 16:13:21 +01:00
Mark Brand
f44360923e QSqlTM/QSqlRTM: improve style and readability
General changes:
const, scope, braces, hash[] for clarity, comment wording and
spelling.

QSqlRelationalTableModel::selectStatement() readability:

Renamed private method.

QVector<Class>.value() already defaults to null object value, so there
is no point in handling this case explicitly.

Alias rec for d->rec added more noise than clarity.

Using "tables" list only adds an extra step. Simple concatenation does
the trick.

Deduplicate code for building table expression and JOIN condition.

Change-Id: Ia52afaf3c3937a26595d5ae867982664002562d8
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-22 16:13:21 +01:00
Mark Brand
c7b9a60571 QSqlRTM: fix whitespace
Change-Id: I0ed9ab93657d35a0e8c74469f72c77fe1fc4c7c1
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-22 16:13:21 +01:00
Samuel Rødal
787da35eb8 Fixed QInputMethod API to use isVisible() instead of visible().
Deprecate the old API for now as not to break existing usages.

Change-Id: I7abbbbe8a34951282537a9d74cded03743f44df7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-22 16:13:21 +01:00
Pekka Vuorela
7e90df7bf5 FocusAboutToChange event to be send before focus changes
Focus change happen as: FocusAboutToChange event -> focus change
-> FocusOut event -> FocusIn event.

Input method need to have focus when calling commit(). Notification
on focus about to be lost allows QWindow implementations to commit in
time.

Also changes QWidget documentation to match code reality.

Change-Id: I17a8a374a33dd700909f79e370b42348869261a6
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-03-22 16:13:21 +01:00
Stephen Kelly
6a54344e22 Remove obsolete methods which forward to the base class.
Change-Id: I7903d9664d52c6afeff800a95062c983a49703c6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-22 15:00:34 +01:00
Stephen Kelly
d596563cae Remove non-const version of QTreeWidget method.
The const version should be enough.

Change-Id: Ia9cfa484f070e318c76f03df8d8220217a7100c2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-22 15:00:02 +01:00
Stephen Kelly
8ed2f9f189 Remove obsolete internal functions.
Change-Id: Ib0deecfe4bfc13504b98e6e1f3349f8c57b25314
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-22 14:59:12 +01:00
Donald Carr
045c79f5ed Correctly export GL graphics engine for use in plugins
EGLFS and QNX both reference this symbol, hence it needs to be exported

Change-Id: I11b2b8ad5f2b81d951173f7cd8a7fbb8be4bb89b
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 13:30:06 +01:00
David Faure
f89bf2c153 Make comment() work in the C locale too.
The parser makes the default language en_US, and no mimetype xml says
<comment xml:lang="C">, so use the en_US string for the C locale,
rather than returning an empty string.

Change-Id: Iad7c142e8078abe357773249416e7ce9b3e29a92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 13:29:50 +01:00
David Faure
5ec5ce3549 Return all expected paths in QStandardPaths::standardLocations
ApplicationsLocation and DataLocation were returning only the local path,
rather than system paths + local path.

Change-Id: I653d14e5bbe1e08c5fa1ecd5a6106336d1cd0369
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 13:29:27 +01:00
Xizhi Zhu
8445c5ede7 Don't do anything if setting the same proxy factory.
Otherwise, it crashes if you simply set the same proxy factory instance
twice.

Change-Id: I4b1f1d0eed7630c9a145c0a330c6be1b3fc381e5
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-03-22 13:28:32 +01:00
Teemu Katajisto
89b5244310 Cocoa: fix setting color with alpha channel value for color dialog
Make sure that if ShowAlphaChannel option is set then also setShowsAlpha
needs to be set for the panel before setting the current color, otherwise
alpha channel value is omitted.

Task-number: QTBUG-24320

Change-Id: Ifb3822711af8ffd0cf6cb4c8aab2b0020d296663
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-22 13:22:10 +01:00
Honglei Zhang
91c44fd31e Update QtXmlPatterns module name in documentation
According to new module name convention, QtXmlPatterns is
replaced with Qt XML Patterns in all documentation.

Task-number: QTBUG-24775

Change-Id: I9ca85728e266bd1ca9fa7a14e5e68c43c8d3e826
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-22 12:53:26 +01:00
Kevin Krammer
f900da7582 Need to check new rotation against initial rotation instead of current
Only swap width/height of initial geometry if orthogonal to initial
rotation not orthogonal to current rotation

Change-Id: I825954e98dee6c0d07a284307dfb8e1f9fd538e6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
2012-03-22 12:37:25 +01:00
Jędrzej Nowacki
5ea56e93f7 Reserve more space for built-in types in id space.
We are running out of type ids for built-in types, 255 is not enough.
QMetaType already contains about ~70 types, situation is maybe not
tragic now, but there is a great chance that we will want to add more
built-in types from different modules like jsondb or declarative. Then
it might be tight, because we are not allowed to reorganize type ids
(it would be a binary incompatible change).

This change was not possible up to now. Old moc generated code assumes
that type id can be safely stored in 8 bits.

This is source compatible change.

Change-Id: Iec600adf6b6196a9f3f06ca6d865911084390cc2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-03-22 11:52:23 +01:00
Samuel Rødal
55fa3c189f Got rid of Map / Unmap events in favor of Expose event.
Since change 2e4d8f67a8 the need for Map and Unmap events has
gone away, as now the Expose event is used to notify the application
about when it can start rendering.

The Map and Unmap events weren't really used except by QWidget to set
the WA_Mapped flag, which we now set based on the expose / unexpose.

Also guarantee that a Resize event is always sent before the first
Expose, by re-introducing an asynchronous expose event handler. Since
an expose is required before rendering to a QWindow, show a warning if
QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a
window that has not received its first expose.

Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-22 11:43:36 +01:00
Stephen Kelly
9c7cdce672 List QtPrintSupport as a dependency of QtPlatformSupport.
As it is a static library, it is also necessary to link to
QtPrintSupport when using QtPlatformSupport.

Change-Id: Id7ed458e5a7a0f6199d76b12f979faabb51d0f87
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-22 11:36:45 +01:00
Kai Koehne
3f3dd8f1d3 Show correct origin of Q_ASSERT in Windows dialog
Display the actual file and line where the Q_ASSERT statement
was triggered.

Change-Id: I54d72f4c4bd9edee744c0f6e08f31b8e3120f454
Reviewed-by: David Faure <faure@kde.org>
2012-03-22 08:51:48 +01:00
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