summaryrefslogtreecommitdiffstats
path: root/tests/auto/dbus
Commit message (Collapse)AuthorAgeFilesLines
* normalise signal/slot signatures [QtDBus tests]Marc Mutz2012-10-195-8/+8
| | | | | Change-Id: I4a0441d37e455dce28072ee3650b2062bec65759 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Test: remove QSKIP in tst_QDBusMarshall::receiveUnknownTypeCaroline Chao2012-10-171-4/+5
| | | | | | | | Omit the whole test and relative types if DBUS_TYPE_UNIX_FD is not defined since the test is not relevant in that case (D-Bus library too old). Change-Id: I167622f485c0f34d64984c4fa96be974e54f56bc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2228-675/+675
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix QDBusServer with more than one connectionJan Arne Petersen2012-09-141-9/+29
| | | | | | | | | | | | | | | Create a new QDBusConnectionPrivate for every new connection in qDBusNewConnection instead of creating a single QDBusConnectionPrivate in the QDBusServer constructor which gets assigned the latest connected DBusConnection in qDBusNewConnection (and loses track on all previous DBusConnections). Also extend tst_QDBusConnection::registerObjectPeer() test with multiple connections to the server. Task-Number: 24921 Change-Id: I4341e8d48d464f3fe0a314a6ab14f848545d65a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QStringList::join(QChar) overload where applicable [QtDBus]Marc Mutz2012-09-101-2/+2
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I807b0e88ac71a0cb367fb4170cca8f2cb0ad43f3 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-0121-0/+21
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make test work on Mac OS XHarald Fernengel2012-06-232-0/+2
| | | | | Change-Id: I0c2d9bc7500972144d44060f38bc7a5da65ed30f Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-026-206/+206
| | | | | | | | | | 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>
* Finish cleaning up com.trolltech -> org.qtproject in QtDBusThiago Macieira2012-04-1620-66/+71
| | | | | | | | | | | | | | Lots of uses of the annotations and error names, plus a bunch of local unit test names (including one file that had to be renamed). The meta object generator is updated to support both the old and new names. That means some references to com.trolltech *must* remain in the source code. Task-number: QTBUG-23274 Change-Id: Icc38ae040232f07c437e7546ee744a4703f41726 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Update the error codes in QtDBusThiago Macieira2012-04-162-13/+13
| | | | | | | | | | | Change the old com.trolltech ones to org.qtproject and introduce Use the alternate domain name for the Qt Project because the dash character is not valid in interface and error names. Task-number: QTBUG-23274 Change-Id: Iac1699e70525d67f983c10560932acff6b2ecde6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-2/+0
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Remove comment about QVariantList and QVariantMap.Stephen Kelly2012-03-281-2/+0
| | | | | | | | | | | | | | | | | | | | They predate Qt 4.5, but it looks like the comments are indicating that QVariantList and QVariantMap types will use the basic template, but that is not the case. Instead they will use the compare specializations for QList<T> and QMap<T> respectively. Change-Id: Iebf7e9b8aaa8a699ea720090fbf641dfecde0ff7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Don't hardcode the order of elements in QHashesThiago Macieira2012-03-282-32/+15
| | | | | | | | | | | | | | | | | | Instead use QMap if we want a stable order. Task-number: QTBUG-24995 Change-Id: I93f643df236f5078768f539615fa47163e5262e8 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QtDBus: make some constructors explicitMarc Mutz2012-03-121-19/+19
| | | | | | | | | | | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: I314d341ad0db4e9d4bbf353a9537c9422ad8a54b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/api_changes' into containtersJoão Abecasis2012-03-081-20/+4
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetaobject.cpp src/corelib/kernel/qvariant.cpp src/tools/moc/moc.h Change-Id: I2cd3d95b41d2636738c6b98064864941e3b0b4e6
| * Avoid using internal testlib API in QDbusConnection autotest.Jason McDonald2012-03-051-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCOMPARE should only be used in a test function because it makes the test function return if the compare fails. The test wants to compare without returning on failure because the compare is inside a helper function called by many test functions, so the test was calling testlib's internal QTest::compare_helper() functions instead of QCOMPARE. This commit makes this code slightly less objectionable by calling the public QTest::qCompare() instead. Change-Id: Ida17a641e89f8a297d6a036449f44b33aa266368 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Port QDBusMetaObject to Qt5 meta-property/method descriptor formatKent Hansen2012-02-291-0/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapts QDBusMetaObject to be in sync with the moc/meta-object changes for property and method descriptors (storing the name and argument count of methods, and more elaborate type information). Now that the method name is stored in the standard method descriptor, QtDBus doesn't need to store it separately anymore, and the QMetaObjectPrivate::rawStringData() function can be removed. Change-Id: I04efdbe05b52bbd85405e1713509e55308ac42da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Rename QMetaMethod::signature() to methodSignature()Kent Hansen2012-02-291-1/+1
|/ | | | | | | | | | | | | | | | | | | | In Qt5 the meta-data format will be changed to not store the method signature string explicitly; the signature will be reconstructed on demand from the method name and parameter type information. The QMetaMethod::signature() method returns a const char pointer. Changing the return type to QByteArray can lead to silent bugs due to the implicit conversion to char *. Even though it's a source- incompatible change, it's therefore better to introduce a new function, methodSignature(), and remove the old signature(). Task-number: QTBUG-24154 Change-Id: Ib3579dedd27a3c7c8914d5f1b231947be2cf4027 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Cleanup usage of QVariant::Type.Jędrzej Nowacki2012-02-271-1/+1
| | | | | | | | | QVariant::Type is marked as obsolete. It is not possible to get rid of it completely, in a source compatible way, but at least we can remove it safely from a method arguments list. Change-Id: I26b58099bfa6d32f3a583a8ae0047f0bb36bcd0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Stabilize tst_qdbusabstractinterface and make it XFAILRohan McGovern2012-02-201-40/+38
| | | | | | | | | | | | | | | This test was written incorrectly in a way which happened to allow it to pass most of the time (but not all the time). Reset the state of test objects between each test function, and mark the broken functions with QEXPECT_FAIL and a link to a task. Replace the unusual WaitForPinger construct with the usual QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations. Task-number: QTBUG-24262 Change-Id: I82d09002307c0b500bf60cd5b583674321b37609 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Eliminate duplicate data row names in dbus, tools and xml autotests.Jason McDonald2012-02-161-2/+2
| | | | | Change-Id: Ic734435f57bb4f2160ecb3bc645e642207931a99 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Align QVariant::UserType and QMetaType::UserJędrzej Nowacki2012-02-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | There is no point in keeping separate values which should mean the same. QVariant::UserType was used also to construct a valid, null QVariant, containing an instance of unknown custom type. The concept was strange and useless as there was no operation that could be done on such QVariant. Therefore it was dropped. Please note that the patch slightly changes behavior of different functions accepting a type id as parameter. Before QVariant::UserType was an invalid type from QMetaType perspective (id 127 was not assigned to any built-in type), but QMetaType::User points to the first registered custom type. Change-Id: I5c7d541a9affdcdacf53a4eda2272bdafaa87b71 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3028-28/+28
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2328-28/+28
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove dependency of QtDBus onto QtXmlHarald Fernengel2012-01-222-105/+35
| | | | | | | | | Replace the QDom based code in qdbusxmlparser with code using QXmlStreamReader. Task-number: QTBUG-20856 Change-Id: I294e3ebd6faa813c20806be3ae225ac00befb622 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in license headers.Jason McDonald2012-01-0528-30/+30
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix crashes and non-portable functionality in QDBusDemarshaller QByteArray ↵Sami Rosendahl2011-12-251-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | extraction QDBusArgument QByteArray extraction operator and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting a QByteArray when the value actually is e.g. a struct of mixed types the byte array extraction will crash as it attempts to extract the struct data as a fixed array. The fix adds DBus type checks to QDBusArgument byte array extraction operator implementations. The checks invalidate extracting arrays of other types than bytes to a QByteArray that worked with the unchecked implementation. The rationale for this restriction is 1) extracting a QByteArray to a variant checks already that the array element type is byte 2) Results of extracting arrays of types wider than a byte to a QByteArray are architecture-dependent making such code inherently non-portable. Task-number: QTBUG-22840 Change-Id: Ie20f2adc06c697a68055c803215fb408568fdd90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QDBusDemarshaller QStringList extractionSami Rosendahl2011-12-251-0/+52
| | | | | | | | | | | | | | | | QDBusArgument QStringList extraction operator and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting a QStringList and the value actually is e.g. an array of bytes the string list extraction will crash as it interprets the bytes as char pointers. The fix adds DBus type checks to QDBusArgument QStringList extraction operator implementations. The checks are as permissive as possible provided crashes are avoided. Task-number: QTBUG-22840 Change-Id: I4b67d75b59c5052d939f3a69f3e92dabdb3bdd6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QDBusDemarshaller basic string-like type extractionSami Rosendahl2011-12-251-0/+115
| | | | | | | | | | | | | | | | | | QDBusArgument string extraction operators and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting string-like basic DBus type that actually is e.g. an integer the string extraction will crash as it blindly attempts to use the integer as a pointer to char. The fix adds DBus type checks to QDBusArgument string type extraction operator implementations. The checks are as permissive as possible provided crashes are avoided. Previously supported functionality of extracting an object path or type signature to a string type is retained. Task-number: QTBUG-22840 Change-Id: I29be1ae592658ca268c65ed692e1d42619d52280 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix stack overwrite in QDBusDemarshallerSami Rosendahl2011-11-231-2/+102
| | | | | | | | | | | | | | | | | | | | QDBusArgument extraction operators and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. Helper function template qIterGet in qdbusdemarshaller.cpp that is used for extracting basic data types only reserves space from the stack for the expected type as specified by client. If the actual type in the DBus parameter is larger stack will be overwritten in the helper function by at most 7 bytes (expected one byte, received dbus_uint_64_t of size 8 bytes). The fix always reserves space for the largest basic type dbus_uint64_t readable by dbus_message_iter_get_basic API. See also http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#ga41c23a05e552d0574d04 Task-number: QTBUG-22735 Change-Id: I9aa25b279852ac8acc40199a39910ea4002042d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qtbase tests: Fix some warningsFriedemann Kleint2011-11-212-3/+3
| | | | | | | | - Fix warnings about QAtomicPointer/Int usage - Fix some gcc 4.6 warnings about assigned/unused variables Change-Id: Ib4dbf9110f0dad93ad48e97278310f05fad3a82a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Re-enabled passing test in tst_qdbuspendingcallSergio Ahumada2011-11-041-2/+0
| | | | | | | | | tst_QDBusPendingCall::watcher_waitForFinished_threaded() autotest was fixed by faa6113c41b81368c5bbc2a764c2ae9bbc42e415 Task-number: QTBUG-20859 Change-Id: I05aaebfde45862836b10700aa7d9c64e4287466f Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix unstable test due to a race in QThreadBradley T. Hughes2011-11-031-1/+1
| | | | | | | | | | | | | QThread::finished() is emitted before setting the thread's state to finished and !running, which means it's possible to receive the finished() signal and act on it while QThread::isRunning() still returns true. This test randomly fails due to this race. Fix it by using checking the return value of QThread::wait() instead. Change-Id: Ibf347fc9a2e8d32b328227ee6978e1129dd781f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove redundant #if 1 from qdbusmarshall testJason McDonald2011-11-021-2/+0
| | | | | Change-Id: I5342210cda1f02950667621e5e64d65d6357c6ce Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove unused code from qdbusmarshall test.Jason McDonald2011-11-021-32/+0
| | | | | | | | The removed functions have been unsued since at least as far back as 2006. Change-Id: Id1ea77dbfffa319c18891968f3aa378cfb563fd4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from qdbusmarshall test.Jason McDonald2011-11-021-6/+0
| | | | | | | | The removed code had been disabled since 2007 and tested functionality that was no longer supported. Change-Id: I49dfe58601c1cc6d41590ab2980daba27eca6bfb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from qdbuspendingcall testJason McDonald2011-11-021-33/+0
| | | | | | | The tested functionality hasn't been in the public API since 2008. Change-Id: I2898da3730fa6248eea2e19779b33ccc793b7a31 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* all remaining tests: eliminated usage of qttest_p4.prfRohan McGovern2011-10-2521-42/+58
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I02fe27b2c1800f929250fa8694ca2976c9661a12 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-212-3/+3
| | | | | | | | | The previous commit removed SkipMode from the testlib APi. This commit removes the parameter from all calls to QSKIP. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove redundant logic from dbus test .pro files.Jason McDonald2011-10-1120-189/+38
| | | | | | | | | | | | There was logic in .pro files for the dbus tests to omit the body of each test if dbus was not available in the Qt build. This was all redundant however, because tests/auto/auto.pro already excluded all dbus tests if dbus was not available in the Qt build. Change-Id: Iaea06e38622e5227daec4d2e08106c2da3fb4013 Reviewed-on: http://codereview.qt-project.org/6372 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* This passes just fineLars Knoll2011-09-201-1/+0
| | | | | | | | Task-number: QTBUG-21424 Change-Id: Ied95373b2cf3882ec4f352ccbc285b578c66f83d Reviewed-on: http://codereview.qt-project.org/5003 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Temporarily disabled testsHolger Ihrig2011-09-141-0/+1
| | | | | | | | | | | Necessary to avoid CI blocking. The tests should be enabled again as soon as possible. Task-number: QTBUG-21424 Change-Id: Ibc54723855579095be0dea3bd3e071dd22a1fccf Reviewed-on: http://codereview.qt-project.org/4825 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Merge branch 'master' into refactorGunnar Sletta2011-09-121-0/+3
| | | | | | | | | | | | | Conflicts: src/3rdparty/v8 src/gui/text/qfont_qpa.cpp src/gui/widgets/qlinecontrol.cpp src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp tests/auto/gui.pro tests/auto/network.pro tests/auto/qstring/tst_qstring.cpp Change-Id: Id118c172645303ccf06a207050d5bf1462ff57fe
* Moved dbus autotests into new directory structureJo Asplin2011-09-0169-0/+14094
Task-number: QTBUG-21108 Change-Id: I8cdd4af59db3716921e7392379584f349ed29136 Reviewed-on: http://codereview.qt.nokia.com/3602 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>