summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove QWorkspace.Debao Zhang2012-03-2336-4558/+20
| | | | | | | | | | QWorkspace had been called Q3Workspace before Qt4.0 finally released. In a sense, it is a Qt3 support Widget. And QWorkspace has been deprecated and replaced by QMdiArea at Qt4.3. Change-Id: Iea1bf831c9960c23c2b21d51fdc7c13b303642ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cleanup Q3* itemsDebao Zhang2012-03-2313-64/+2
| | | | | | | | Cleanup Q3* items from QtCore and QtGui modules. Change-Id: Id214a077a50e99d820c84e96e34866492a0130d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move the UTF-8 data into a separate .cpp so I can use laterThiago Macieira2012-03-233-114/+168
| | | | | | | | This allows me to keep the UTF-8 invalid data in one safe place. I won't need to copy & paste it. Change-Id: Icb909d08b7f8d0e1ffbc28e01a0ba0c1fa9dccf0 Reviewed-by: David Faure <faure@kde.org>
* tst_qsslsocket*: don't inherit from QSharedPointerMarc Mutz2012-03-233-66/+42
| | | | | | | | | | | | QSharedPointer is about to become final. Instead of inheriting from it to add implicit conversions to and from QSslSocket*, make QSslSocketPtr a typedef, and make the conversions explicit. Change-Id: I4eebb262ab5aef348f4d676f9e839325d4ed13da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qsharedpointer: don't inherit from QSharedPointerMarc Mutz2012-03-231-8/+12
| | | | | | | | | | | | QSharedPointer is about to be made final. Instead of inheriting from it to gain access to the d-pointer, cast it to a layout-compatible struct and access the pointer from there. Assert liberally to ensure layout compatibility. Change-Id: Ifc0fa6a6608e861469286673844325663f4f7fcc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDirIterator: don't inherit from QDirMarc Mutz2012-03-232-3/+3
| | | | | | | | | | | | Remove the inheritance hack used in QDirIterator to gain access to QDir's d-pointer by simply making QDirIterator a friend of QDir. This allows to turn QDir into a final class. Change-Id: I97efef8714bb194d62b9fe5192ce240a90f2bf97 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: don't inherit from QString, QVariantMarc Mutz2012-03-232-30/+25
| | | | | | | | | | | QString and QVariant are about to be marked Q_DECL_FINAL_CLASS, so change inheritance to composition. At least this was private inheritance... Change-Id: I43caaa6c03041b8f0bd0f7987ddb4c6ff8309e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qnetworkreply: don't inherit from QSharedPointerMarc Mutz2012-03-232-163/+162
| | | | | | | | | | | | | | | QSharedPointer isn't meant to be used as a base class. Instead of inheriting from it to add implicit conversions to and from QNetworkReply*, make QNetworkReplyPtr a typedef, overload two oft-used functions to take a QNetworkReplyPtr in addition to QNetworkReply*, and otherwise make the conversions explicit. Change-Id: I1eff1793a19f2d5bad1cce8de74c0786675a50f3 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Rewrite QMap to use a RB treeLars Knoll2012-03-237-558/+1048
| | | | | | | | | | | | | | | | | | | | QMap used to use a skiplist in Qt 4.x, which has variable sized nodes and we can thus not optimise using custom allocators. The rewrite now uses a red-black tree, and all allocations and tree operations happen in the cpp file. This will allow us to introduce custom allocation schemes in later versions of Qt. Added some more tests and a benchmark. Memory consumption of the new QMap implementation is pretty much the same as before. Performance of insertion and lookup has increased by 10-30%. iteration is slower, but still extremely fast and should not matter compared to the work usually done when iterating. Change-Id: I8796c0e4b207d01111e2ead7ae55afb464dd88f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPointer: some optimisationsMarc Mutz2012-03-221-18/+40
| | | | | | | | | | | | | | | | | | 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>
* Remove obsolete methods which forward to the base class.Stephen Kelly2012-03-222-22/+0
| | | | | | | 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>
* Remove non-const version of QTreeWidget method.Stephen Kelly2012-03-222-11/+0
| | | | | | | | | 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>
* Remove obsolete internal functions.Stephen Kelly2012-03-222-27/+0
| | | | | | | | 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>
* Reserve more space for built-in types in id space.Jędrzej Nowacki2012-03-222-2/+2
| | | | | | | | | | | | | | | | | | | 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>
* Got rid of Map / Unmap events in favor of Expose event.Samuel Rødal2012-03-2226-163/+321
| | | | | | | | | | | | | | | | | | Since change 2e4d8f67a871f2033 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>
* List QtPrintSupport as a dependency of QtPlatformSupport.Stephen Kelly2012-03-221-1/+1
| | | | | | | | | 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>
* Remove support for meta-object revisions < 7Kent Hansen2012-03-228-760/+130
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change the parameter name of signals to be consistent.Stephen Kelly2012-03-211-2/+2
| | | | | Change-Id: Ib602fde3f9cb240f328457abf57a341c98aaace9 Reviewed-by: hjk <qthjk@ovi.com>
* QMetaMethod::typeName() should return "void" if the return type is voidKent Hansen2012-03-215-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix QMetaObject::normalizedType() for "void" argumentKent Hansen2012-03-214-1/+30
| | | | | | | | | | | | | | 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>
* Use the new QMetaMethod API in testlibKent Hansen2012-03-212-18/+8
| | | | | | | | | | | | | 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>
* QLatin1String: Suppress MSVC warnning.Debao Zhang2012-03-211-1/+1
| | | | | Change-Id: I61ab71549799a5af8cce85e334245642a266c3c8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QRegularExpression: add QObject::findChildren overloadGiuseppe D'Angelo2012-03-213-13/+112
| | | | | | | | | | | 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>
* QRegularExpression: support for QStringList overloadsGiuseppe D'Angelo2012-03-214-18/+254
| | | | | | Change-Id: Ia9017348742e41187684185d04b56d27edd383b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* testlib: Remove obsolete internal compare_helper overload.Jason McDonald2012-03-214-27/+0
| | | | | Change-Id: Ic98faf360a713ac698f9bf1ff8aaad5a4c5c176b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Crash fix in ~QVariantJędrzej Nowacki2012-03-216-32/+28
| | | | | | | | 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>
* QCoreApplication - add return type bool on install/remove translatorThorbjørn Lund Martsum2012-03-212-9/+16
| | | | | | | | | | | | | | | | | 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>
* Fix qDebug stream for an invalid QVariant.Jędrzej Nowacki2012-03-212-8/+64
| | | | | | | | | | 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>
* Use clang's builtin is_enum, if availableJoão Abecasis2012-03-211-3/+9
| | | | | | Change-Id: Ie0c32b8fd6d3bb02cf6c6b626bb31d57cdcdf497 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Use the new QMetaMethod API in QtDBusKent Hansen2012-03-204-15/+10
| | | | | | | | | 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>
* Add QtJson types to meta-type systemKent Hansen2012-03-205-4/+70
| | | | | | | | | | 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>
* Fix cross-compilation of qdbus bootstrapped tools.Stephen Kelly2012-03-201-1/+1
| | | | | | Change-Id: Ib40fc1c1743ff23a259cabbf26d91956398c3239 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Reserve a virtual method for use with a feature in Qt 5.1.Stephen Kelly2012-03-202-0/+12
| | | | | | | | | | 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>
* Forward declare QMetaObject as a struct.Stephen Kelly2012-03-201-1/+1
| | | | | | | Fixes compiler warnings with clang and others. Change-Id: I726d4c10644287bb642c8b5dd28172afe8c4d1ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reserve the virtual viewportSizeHint method in QAbstractScrollArea.Stephen Kelly2012-03-202-0/+12
| | | | | | | | | | 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>
* Add API and reserve space for storing the QMetaObject with the QMetaType.Stephen Kelly2012-03-203-8/+30
| | | | | | | | 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>
* Generate a forwarding header for QStringBuilder.Stephen Kelly2012-03-201-0/+1
| | | | | | | This should fix the declarative build. Change-Id: I32dd5b7783995759f27d016c801ae6dfb3d44733 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtWidgets: Cleanup Q3* itemsDebao Zhang2012-03-2019-779/+24
| | | | | | | | | Clear all the Q3* items away, expect QStyle::SH_Q3ListViewExpand_SelectMouseType which is still used by QTreeView. So simply removed Q3 from its name. Change-Id: Ia79f0283137b6751ba68791ae55df1d8bd7ea74a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add a base class with specialization to QStringBuilder.Stephen Kelly2012-03-191-12/+38
| | | | | | | | This will allow separation of API that should work with QString results, and API that should work with QByteArray results. Change-Id: I5be398188abd421bb5056cea2658ea85fc03aa4f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix up the QEventLoopLocker documentation.Stephen Kelly2012-03-191-3/+10
| | | | | Change-Id: If5bf8c2703f094023a614b3efcbd8489560694d9 Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove a dead code from QVariant.Jędrzej Nowacki2012-03-191-9/+26
| | | | | | | Remove some "safety" code, but essentially it was a dead code. Change-Id: Ie19c29d4cce8b72be5dbaca53c03adc63e8c3dc5 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Merge master into api_changesKent Hansen2012-03-1968-193/+632
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
| * Set RPATH_FLAGS on Mac tooLincoln Ramsay2012-03-191-0/+2
| | | | | | | | | | | | | | | | | | Without this, QMAKE_RPATHDIR is empty and qt_module.prf's logic to turn on absolute_library_soname fails, causing some modules to build without absolute paths (eg. qtjsbackend's QtV8 framework). Change-Id: If03136ca60a5d8a96a589e2d1034e5884fd6a1ac Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Fixed benchmarks to work from install directoryKurt Korbatits2012-03-1918-32/+104
| | | | | | | | | | | | | | | | | | - Changed benchmarks to use TESTDATA and QFINDTESTDATA - Fixed up targets all use tst_bench_ syntax Change-Id: I5c2936702e248478f5df225ce38893158ee22d7f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Make copy and assign private for QAccessibleEvent.Frederik Gladhorn2012-03-183-27/+48
| | | | | | | | | | | | | | | | | | Also make the handling of events in the test pointer based since mac-g++ doesn't seem to like const references the way they were before. Change-Id: I7fe39978d4729b8e586be30978b74aa51ca7cfe6 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * configure: Fix iconv detectionGirish Ramakrishnan2012-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | Makes no sense to disable iconv based on QPA. This change will make iconv as the "system" codec i.e the codec used for 8-bit locale dependent conversions. Change-Id: I4469e9c226b2411ac1338f61dabb84ec9c2ec603 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Cocoa: Fix function key handlingBradley T. Hughes2012-03-181-7/+11
| | | | | | | | | | | | | | | | | | | | | | Cocoa sends function keys (e.g. arrow keys, backspace, F1-F35, etc.) as Unicode characters in the U+F700-U+F8FF range. Do not deliver text for events that contain a single control character (to match Qt 4 behavior). With this fix, keyboard navigation works again in Qt Creator when running against Qt 5. Change-Id: I5854bf713c2855dbc5ee491bace2f9dc1acd9426 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
| * Fix shortcut handling in the Cocoa pluginBradley T. Hughes2012-03-181-25/+26
| | | | | | | | | | | | | | | | | | | | | | KeyPress events could be shortcuts or deadkeys, but we don't know which until we try. Shortcuts take precedence over deadkeys, so send them through QWindowSystemInterface::tryHandleSynchronousShortcutEvent() before passing it onto the input method. Change-Id: I479a3a7ff1c35e7c5692e8a17fb2173576dd0a29 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
| * Win32: Compile qmake when shadow-buildingMarius Storm-Olsen2012-03-181-1/+1
| | | | | | | | | | Change-Id: I803c733f744372701c51e4d629ff797c6648f833 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * Add new test cases to tst_QMetaType.Jędrzej Nowacki2012-03-181-6/+14
| | | | | | | | | | Change-Id: I405ab5df9d9de3a0a0a71276b172a27ee01392e3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>