summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a new built-in type: signed char.Jędrzej Nowacki2012-05-082-3/+30
| | | | | | | | | | | | C++ distinguish between "char", "signed char" and "unsigned char", they are three independent types. Fix QVariant behavior on ARM. On ARM "char" may mean "unsigned char", but we depends on the sign during a numerical conversions. Change-Id: I610ce3fb88ed5964b67f3ae442d264fe16b2d261 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add assignment operator for QJsonValueRefAli Akhtarzada2012-05-081-0/+5
| | | | | | | | | The implicit cast to QJsonValue was being ignored probably because the compiler was generating a default QJsonValueRef assignment operator Change-Id: I3a041595497308868dd7e4aab71027ce21bf8f0b Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Revert "QtPrintSupport: Remove remaining LPR specific code"Rohan McGovern2012-05-081-3/+0
| | | | | | | | | | | | | | | | This doesn't compile with a typical cross-compilation setup, which generally won't include cups headers. The commit should have been rejected, but wasn't, due to a bug in the Qt Project CI. Since it now causes all other modules depending on qtbase to fail their CI, it must be reverted to minimize disruption while the commit can be amended and/or the test toolchain updated to include cups headers. This reverts commit 80f7a388906f94f58bf765a32b9abbb16f967db2. Change-Id: I315ae275b37de358a74af28ab7bd691c9849acba Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* QtPrintSupport: Remove remaining LPR specific codeJohn Layt2012-05-071-0/+3
| | | | | | | | | | | | | | | | | | CUPS is the only supported print system on UNIX, LPR/PS support has already been dropped but some LPR specific code still remains. * Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to QCUPSSupport * Remove qprinterinfo_unix as no longer used * Remove LPR related code from QPdfPrintEngine * Remove all QT_NO_LPR uses * Remove most QT_NO_CUPS uses, use QT_NO_PRINTER where necessary Some QT_NO_CUPS uses remain in QPdfPrintEngine, these will be removed in a following change implementing a CUPS plugin. Change-Id: I439b6fad9cf88c3d24aa48e49475f49ad310dbad Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-0712-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Rename setResizeMode to setSectionResizeMode.Stephen Kelly2012-05-073-12/+12
| | | | | | | | | The overload of this method was renamed in b64426248d2212eb59535b2ca383d30fdb5e1c7a but this one was not. Change-Id: I60a6ddf0fcf9deea31ccf51e7b0db16c66023356 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Add some extra tests to tst_QString to ensure the encoding is correctThiago Macieira2012-05-071-3/+193
| | | | | | | | | | | This also tests by consequence that the behaviour of QByteArrays containing NULs is consistent. Right now, that means the QByteArray processing stops at the NUL, which is the same behaviour as if a pointer to the byte array's data were used. (it's what happens if there's no QByteArray overload and the const char* one is called) Change-Id: If56a822f95866e8cb5b153d07b48198bb83fb386 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change QStringBuilder to use UTF-8 tooThiago Macieira2012-05-071-16/+1
| | | | | | | | | | | | | This commit completes the previous commit so that both QString and QStringBuilder now operate on UTF-8 input. A small fix was required in QStringBuilder: an if clause isn't enough to separate the two append versions. Since there are no QString functions that append to char*, if we're converting to a QByteArray, we need to go through a QString first in a separate function. Change-Id: Ic503340c5d0c32d420c90c91cc2e0fc1ae9230f3 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtDBus]Thiago Macieira2012-05-072-3/+3
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I052a3412a568ad639f2bf169b4491b56dddff1c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix encoding mismatches in tst_QSqlQueryThiago Macieira2012-05-071-3/+3
| | | | | | | | | | | | | | | The file has been UTF-8 encoded for years, which means that the line: QString longerBLOB( "abcdefghijklmnopqrstuvxyz¿äëïöü¡ " ); Loaded a mojibake into QString. Then, this data was stored as a blob in the database by calling longerBLOB.toLatin1() (a QByteArray), and reloaded for check using toString(). Once the QString default codec changes to UTF-8, the mojibake would get fixed, and the test would fail. Make sure it doesn't happen. Change-Id: If12d6124c973e4a1c1b7978d90fffb9aa5545c66 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add default value for getters in QJsonValueLiang Qi2012-05-061-1/+11
| | | | | | | Done-with: Debao Zhang <dbzhang800@gmail.com> Change-Id: I3ddd8dd89dc75d91ac9977bf9b6eb3174d7669e4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtSql]Thiago Macieira2012-05-051-2/+2
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Icb3ab0e1f4f3173563f3de36115b5457cf1ba856 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Enable specifying raw headers for the requestShane Kearns2012-05-053-10/+33
| | | | | | | | Use "--headers=file" where the file contains the raw headers to send. This is useful for replaying requests from log files. Change-Id: I3bbe582d96fc9797f692a0d5772e8164f8265ce0 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Load resources in in QTextDocument correctlyLars Knoll2012-05-041-3/+1
| | | | | | | | | | | | | | | In Qt 4, we loaded resources through the QTextEdit or QTextControl if they were the parent of the document. Modularization for Qt 5 broke this, as we can't cast the parent to a QTextEdit anymore. The fix is to make the loadResource() methods in QTextControl and QTextEdit invokable and discover and invoke them at runtime on the parent object. Task-number: QTBUG-25116 Change-Id: Iba04bc16849b0c5ddcd275f12d1a386a8fe591bf Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Windowmodality-test: Compile with Qt 4.8.Friedemann Kleint2012-05-042-6/+6
| | | | | | | Make it possible to shadow-build using Qt 4.8 for comparison. Change-Id: I1a18b7f1d03b11f0420aab14455e2c53d1afd6ba Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* add support for non-BMP ligaturesKonstantin Ritt2012-05-041-0/+12
| | | | | | | | | | | | | | | | | | | | | > http://www.unicode.org/versions/Unicode5.2.0/ D. Character Additions: There are three new characters in the newly-encoded Kaithi script that will require changes in implementations which make hard-coded assumptions about composition during normalization. Most new characters added to the standard with decompositions cannot be generated by the operations toNFC() or toNFKC), but these three can. Implementers should check their code carefully to ensure that it handles these three characters correctly. U+1109A KAITHI LETTER DDDHA U+1109C KAITHI LETTER RHA U+110AB KAITHI LETTER VA UCD 6.1 adds two more of them: U+1112E CHAKMA VOWEL SIGN O U+1112F CHAKMA VOWEL SIGN AU Change-Id: I781a26848078d8b83a182b0fd4e681be2a6d9a27 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use QFile::{encode,decode}Name to deal with QT_PLUGIN_PATHThiago Macieira2012-05-041-1/+1
| | | | | | | | | Since it deals with paths, let's use the proper path-handling functions. Change-Id: I896d2c472dfd675e9ff247657447178702f178be Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Slightly improve the query encode/decode test in QUrlThiago Macieira2012-05-041-6/+7
| | | | | | | | Show that nothing is changed either way, regardless of the encoding flags used. Change-Id: I31fba5f87eae777d4b708ab789b32169004bcbcc Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QUrl::toString(StripTrailingSlash) to not turn file:/// into file:David Faure2012-05-041-10/+18
| | | | | | | | It should only strip one slash (as the name indicates), and not if the path is just "/". Change-Id: I133a81977241de77a49d1d1559143d30e0bd52f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove insignification from tst_QOpenGLMiikka Heikkinen2012-05-041-2/+0
| | | | | | | | This test is passing for Windows now in CI due to recent fixes, so remove the insignification. Change-Id: Ib74aea443c4a66c9bf743d88e15d9f27f9ac2fe4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [other]Thiago Macieira2012-05-042-3/+3
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ib1eaf42679ab5db4005192c3d00ba79e43edfcca Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtOpenGL]Thiago Macieira2012-05-041-3/+3
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I6ea46cd6dfed75afc253fa2b4e3f1789bdad1d4e Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtNetwork]Thiago Macieira2012-05-046-33/+33
| | | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I94cc301ea75cc689bcb6e2d417120cf14e36808d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtGui]Thiago Macieira2012-05-047-31/+31
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I2850033159508ebb1ff7564e15b99a146dbee94c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore]Thiago Macieira2012-05-049-28/+28
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I38f97ad379deafebef02c75d611343ca15640c8a Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Make the event notification on Windows be mandatory in all dispatchersThiago Macieira2012-05-044-0/+20
| | | | | | | | | | | | | This way, QWinEventNotifier will work on all Windows systems, not just with the default event dispatcher. Other dispatchers (other than QWin32EventDispatcher) are permitted, so the class should not abort just because of that. If a dispatcher really doesn't want to implement this, they need to implement the virtuals to do nothing, possibly print a warning. Change-Id: I2c132bcde95b9d5941c8906a0fcd2ad964087772 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Rename QAbstractSocket::PauseOnNotify -> PauseOnSslErrorsShane Kearns2012-05-041-1/+1
| | | | | | | | | | | | | | | Although we created an enum for pause modes to make 5.x binary compatible with 5.0, the enum value is not well named. In 5.1, we propose to add PauseOnProxyAuthentication to the enum. PauseOnNotify is not clear what it means, while PauseOnSslErrors is. Any new notification in a minor release would need a new enum value otherwise applications would get pauses they did not expect. Task-number: QTBUG-19032 Change-Id: I4dbb7467663b37ca7f0551d24a31bc013968bedc Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* troll.no changed its NS record configuration. Adapt.Thiago Macieira2012-05-031-1/+1
| | | | | | Change-Id: I62d778da67a463da765b6ad70774449560105d7d Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Merge "Merge remote-tracking branch 'origin/api_changes'" into ↵Lars Knoll2012-05-039-64/+330
|\ | | | | | | refs/staging/master
| * Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-039-64/+330
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
| | * Allow qDebug output to be configured by qSetMessagePattern()Kai Koehne2012-04-242-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qSetMessagePattern() to configure the default message pattern. This one can still be overwritten by setting the QT_MESSAGE_PATTERN environment variable. Without this method, there's actually no way to change the default output programatically. Since QT_MESSAGE_PATTERN is evaluated when the first message arrives, setting it via e.g. qputenv might have no effect/be too late. Change-Id: I115e0c30606f128fdbf5c169a951ffa2a6a48517 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Make QStringLiteral and QByteArrayLiteral always return the real typesThiago Macieira2012-04-231-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, the macros would return an internal type that contained the pointer to the data. This breaks code that tried to use the macros with operators, like QStringBuilder but also when writing: QStringList() << QStringLiteral("a") << QStringLiteral("b"); This change seems to work fine now and I can also verify that this works: const auto str = QStringLiteral("Hello"); Even though it creates a QString, which is non-POD and non-constexpr. Change-Id: Iaf82af9bea4245513a1128ea54f9d2d3d785fb09 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| | * Add unit testing for the qdbusxml2cpp toolThiago Macieira2012-04-213-1/+269
| | | | | | | | | | | | | | | | | | | | | | | | I have not added tests for warnings or other failure to input. This tests only proper output for the moment. Change-Id: Ie01fd2a78adfa57c27bf288a08cd44ae82f51241 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
| | * Logging: Change arguments of message handler to avoid conversionsKai Koehne2012-04-202-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new QtMessageHandler that takes QString instead of char *: This avoids converting to local8bit , only to convert it back to utf16 for Windows. The old QMessageHandler is kept for a transition period, but will be removed before Qt 5.0. Also fix qEmergencyOut (that is called in OOM situations) to not rely on the default message handler. Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Remove QVariant constructor taking Qt::GlobalColor.Jędrzej Nowacki2012-04-192-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | The constructor is wrong, it creates instance of QVariant encapsulating a QColor instance. QVariant should not implicitly convert data, never. Change-Id: Idc794ecdecb42d8b53fee3f993bf51ddd43f595d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | Revert "Don't use the pri depends line for link dependencies."Stephen Kelly2012-05-033-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit df43b9a06a73759ba74f23d9c3e91bd0347d1026. Using the same depends information as QMake provides adds a lot of convenience for users, and is mostly 'correct' from a CMake point of view anyway. Change-Id: I8f2a2f74a687c25a0dedcc491ef72ddb5b136090 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Optimise windows cert fetching and fix test case.Shane Kearns2012-05-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're not going to verify the peer, or we know in advance that windows won't have a CA root then don't ask it to verify the certificate chain. The test case started failing in CI when the windows cert fetcher was integrated due to timing change. I've relaxed the timing requirement of the test to avoid it being unstable. Task-number: QTBUG-24827 Change-Id: I694f193f7d96962667f00aa01b9483b326e3e054 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* | | Skip tst_QOpenGL::openGLPaintDevice() if wrong openGL version.Miikka Heikkinen2012-05-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that this case is failing on CI because OpenGL version, so skip if OpenGL is not recent enough. Task-number: QTBUG-24192 Change-Id: I543e7a092e5c107ee57cd9dce7dc5c890a0315cf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtXml]Thiago Macieira2012-05-031-2/+2
|/ / | | | | | | | | | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I7e7202e6a1a84699ae0d43e4b2e7ee9ec87ed0b6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]Thiago Macieira2012-05-0318-60/+60
| | | | | | | | | | | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Define P in stringbuilder.cpp, just to help in editing in the editorThiago Macieira2012-05-031-0/+5
| | | | | | | | | | | | | | Otherwise it keeps thinking that we have an error. Change-Id: I8175e34dc6421884b89de9165193e32b6cdf1b62 Reviewed-by: hjk <qthjk@ovi.com>
* | tst_qdnslookup: disabled broken testdataRohan McGovern2012-05-031-0/+4
| | | | | | | | | | | | | | | | The mentioned records for råkat.se cannot be resolved. Note these were marked with a FIXME in the first place. Change-Id: I4ea3bbb0aec8ca1b3487c44656b48a8715228886 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* | Fix unit confusion in ccf3b9e48b2d773999a9a88e249f79380618cde6David Faure2012-05-021-4/+10
| | | | | | | | | | | | | | | | | | 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>
* | Introduce QObject::isSignalConnected(QMetaMethod)Olivier Goffart2012-05-021-0/+31
| | | | | | | | | | | | | | | | | | 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>
* | Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-0239-580/+580
| | | | | | | | | | | | | | | | | | | | 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>
* | Fix regression in connectNotify(const char *) emissionKent Hansen2012-05-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fixed uninitialized memory in QMetaObjectBuilder::fromRelocatableDataRohan McGovern2012-05-011-0/+5
| | | | | | | | | | | | | | | | | | | | 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>
* | Never attempt to run the dbus tests on APPLE.Stephen Kelly2012-05-012-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Temporarily disable -Woverloaded-virtual in headersclean testKent Hansen2012-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add QMetaMethod-based QObject::connect/disconnectNotify() APIKent Hansen2012-05-011-0/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>