summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Skip non-exported slots early when creating a XML interface description.Robert Griebl2015-03-251-1/+6
| | | | | | | | This will prevent unnecessary warnings about unknown types for signals or slots that are not even exported to the D-Bus. Change-Id: Iecda5beca5ebe6665a193245fe1c2578156f6abe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Export the symbols of libdbus-1 when loading it at runtime.Robert Griebl2015-03-251-0/+1
| | | | | | | | | This allows applications that need additional symbols from the library to easily obtain them without needing to replicate the library open logic from qdbus_symbols.cpp. Change-Id: Ic65ef6684637fbcd1c9f4fe1dc7a57f0624b61a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Fix const correctness in old style castsThiago Macieira2015-03-111-2/+2
| | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c9468642b2db83 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix various qdoc-warnings.Friedemann Kleint2015-02-251-1/+1
| | | | | | | | | | qtbase/src/corelib/doc/src/containers.qdoc:28: warning: Can't link to 'QList:end()' qtbase/src/corelib/kernel/qmetaobject.cpp:2680: warning: Cannot find 'fromType(...)' in '\fn' QMetaEnum QMetaEnum::fromType() const qtbase/src/corelib/kernel/qmetatype.cpp:1117: warning: Cannot find 'qMetaTypeTypeImpl(...)' in '\fn' int qMetaTypeTypeImpl(const char *typeName) qtbase/src/corelib/plugin/qplugin.qdoc:48: warning: Cannot find file to quote from: 'plugins/interfaces.h' Change-Id: Ie613253211e16ec616ccb70c24c625a9d5352d1b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Remove documentation of QDBusIntrospection::Object::introspection.Friedemann Kleint2015-02-251-8/+0
| | | | | | | | qtbase/src/dbus/qdbusintrospection.cpp:269: warning: Cannot find 'QDBusIntrospection::Object::introspection' specified with '\variable' in any header file Change-Id: I7c5d207842235752ebe38f45b7eee7f8fc00127d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-1513-37/+37
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QDBusConnection::registorObject with interfaceKevron Rees2015-02-155-3/+31
| | | | | | | | | | | | Currently QDBus relies on a key in QMetaClassInfo to understand the DBus interface name. This patch allows QDBus to also use a specified interface name in the registerObject call instead of relying on QMetaClassInfo that might not be there (if the QObject was created in QML or Javascript for example). Change-Id: Ie02b2c67e7deb07f43e35eb166c11833fcbf38f3 Task-number: QTBUG-44074 Reviewed-by: Kevron Rees <kevron.m.rees@intel.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-132-0/+8
| | | | | | | | | | | Instead of leaving a note for Qt6 and then forget to do the actual change once again, change APIs now inside QT_VERSION >= QT_VERSION_CHECK(6,0,0) blocks. Change-Id: Ifa769904e304358a9c2accfd6c9f86eeb342f9dc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-1184-552/+552
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-216-7/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Doc: link issue D-Bus ViewerNico Vertriest2015-01-121-0/+17
| | | | | | | | | | | | | | | | Moved doc D-Bus Viewer from qdbusviewer.cpp to qtdbus-index.qdoc Doc moved from qttools to qtbase Task-number: QTBUG-43537 Change-Id: I718781a8f5029f64fea0f2be241b4d584cc8bfce Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Fix memory leaks with QDBusServerThiago Macieira2015-01-113-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Two serious mistakes: - we need to call dbus_server_free_data_slot as many times as we call dbus_server_allocate_data_slot - we need to delete the d pointer... The changes to the unit tests are simply to cause the used peer connections to be removed so they don't show up in valgrind. Change-Id: I9fd1ada5503db9ba481806c09116874ee81f450d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Fix compilation with MSVC 2010Thiago Macieira2015-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013 and 2015 compile this fine. I didn't test 2012. I wouldn't have fixed if the objective weren't to enable QtDBus by default on all architectures: since it is, we can't have Qt fail to compile from sources on MSVC 2010. qdbus_symbols.cpp(92) : fatal error C1001: An internal error has occurred in the compiler Change-Id: I42b930bc37c4e478a66725d83c8a73836fbf567c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Make QtDBus unit tests compile with runtime dbus-1 tooThiago Macieira2015-01-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | There's a change in Qt 5.4.0 that makes Qt compile with its own set of D-Bus headers, which means QT_CFLAGS_DBUS may be empty. Thus, we can't compile or link if we're using the actual libdbus-1 API to build the test. This commit makes these unit tests use the same dynamic loading mechanism. Change-Id: I56b2a7320086ef88793f6552cb54ca6224010451 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Make QDBusConnection and QDBusServer return an error on default objectsThiago Macieira2015-01-062-2/+2
| | | | | | | | | | | | | | | | | | | | The error of "Not connected". This incidentally solves a crash when QDBusServer().lastError() is called but libdbus-1 couldn't be found. Change-Id: Id93f447d00c0aa6660d4528c4bbce5998d9186a8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix assignment within a Q_ASSERTHolger Hans Peter Freyther2015-01-161-1/+1
| | | | | | | | | | | | | | | | | | This was introduced in 3b844c16e0988b017c67b2329cbe34d4da112b33 and doesn't seem to be right. Change-Id: I1c6a9445996650566d44f223651dd0c855619a88 Fixes: Coverity CID 21589 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove unused QDBusMessage::timeout memberThiago Macieira2015-01-062-4/+3
| | | | | | | | | | | | | | | | | | | | | | It's been there forever, but never used. The timeout is set during the actual call. I moved QDBusMessage::type only for padding purposes. Change-Id: I41dd638ac423078be642077dbf17439d15b5d405 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Make QDBusMessage store its own message typeThiago Macieira2015-01-062-16/+19
| | | | | | | | | | | | | | | | | | Instead of the libdbus-1 constants. Though they're exactly the same because they are based on the protocol wire format, so this is technically a no-op change. Change-Id: Ia2c638c4b508497ca693afd9c76e60ba9245f5e7 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Remove the old QDBusConnection::sender functionalityThiago Macieira2015-01-065-36/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This has been deprecated since QDBusContext was introduced (Qt 4.3). So it's time to remove the functionality. [ChangeLog][Important Behavior Change] QDBusConnection::sender() (deprecated since Qt 4.3) has changed to always return an invalid QDBusConnection. To know what connection the incoming call was received from, use QDBusContext. Change-Id: I355efb82c14e54ed718c8f892d8267e727b19118 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Cosmetic debugging difference for QDBusConnectionThiago Macieira2015-01-061-1/+3
| | | | | | | | | | | | | | This makes the output slightly easier to read. Change-Id: I590b9abcb0263ae5f0580391b42e179c47569a8a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Add a simple way of tracing calls to libdbus-1Thiago Macieira2015-01-061-1/+77
| | | | | | | | | | | | | | | | | | | | | | Very useful to track memory leaks and other silly stuff going wrong. Requires C++11, but since it isn't enabled by default, it's not a problem. ALso, only works with "runtime" dbus -- for linked, use ltrace(1) instead. Change-Id: Iccb18516cfb729b2b1bf9ee592df4a1adefeb3b7 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-293-10/+31
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
| * Doc: corrected broken links qtbaseNico Vertriest2014-12-231-2/+2
| | | | | | | | | | | | | | Task-number: QTBUG-43115 Change-Id: Ib441326083294a6d59d75510142b1481f7b0bc35 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Remove the hardcoding of Unix socket paths for QtDBusThiago Macieira2014-12-201-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the tests to be run on Windows too by using TCP socket connections instead of requiring Unix sockets. The tests shouldn't have hardcoded the path, which came from QDBusServer anyway. Now the tests simply defer to QDBusServer. This is a slight behavior change for Windows, but not one that should matter since anyone who was using the default constructor resulted in a QDBusServer that failed to listen. [ChangeLog][QtDBus][QDBusServer] Fixed a bug that made QDBusServer's default constructor try to bind to a Unix socket on non-Unix systems. Now QDBusServer will attempt to bind to a TCP socket instead. Change-Id: I2a126019671c2d90257e739ed3aff7938d1fe946 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Fix loading of the dbus-1 DLL built by MinGW on WindowsThiago Macieira2014-12-201-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLibrary does not append the version suffix on Windows by itself, since there's no established practice on how to do this. The MinGW builds of dbus-1 call it "libdbus-1-3.dll", so we need append the suffix ourselves. Unfortunately, other names like "dbus-1.dll" have been seen in the wild, so we need to try both basenames (Windows doesn't prepend the "lib" prefix). Both basenames work on Unix, so give "libdbus-1" on Unix since that will result in one fewer stat. Change-Id: I92506df5fd30c7674216568406bf86b25bf646b8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Include qobjectdefs.h for Q_GADGETThiago Macieira2014-12-291-0/+1
| | | | | | | | | | | | Change-Id: Ie1bf2393757978775596a542732c62e3f3014f82 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove Q_NO_USING_KEYWORDThiago Macieira2014-12-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a lot of code now requiring it. Any compiler that doesn't support the keyword is too old for Qt now. The last time anyone asked about this macro was for QTBUG-27393 and we don't know which compiler that was. As a necessity, this patch contains a reversal of a0c3a57aed5cde37017733e7cf5e41cc6a1174aa [ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses the "using" keyword. Compilers that do not support this keyword are deprecated and will not be able to build Qt. Previous versions of Qt may or may not compile, as no testing was done to ensure it worked. Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-105-3/+286
|\| | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-053-2/+283
| |\ | | | | | | | | | Change-Id: I0cd11cbe95693b78450ea81a0187760f4a6a8b5f
| | * Make QtDBus compile without libdbus-1 headers, if dlopeningThiago Macieira2014-12-013-2/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of QtDBus already needs very little from libdus-1, so create an extra header containing the minimum API we actually need. One large advantage of this solution is that now QtDBus can always be enabled, even if the system doesn't have libdbus-1 installed. This is interesting on OS X, where libdbus-1 is often installed by Homebrew or MacPorts, which may include extra libraries we don't want in our packaging. Change-Id: I1b397121ec12eeca333ef778cf8e1c7b64d6b223 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Change misleading error message in QDBusReplyThiago Macieira2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | "no signature" is misleading and even led me to re-check the code to see if it meant that the reply failed and no signature could be obtained. Saying that the signature was obtained but is empty is better. Change-Id: I1381cf53b334798125d36db0934105d15b63b84f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * | Break after handling the read/writeAlbert Astals Cid2014-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop is there because watchers may have two Watcher for the same fd, one for read and one for write, but after we're processed the correct one we don't need to keep looping. This fixes a crash since it's possible that while in processing q_dbus_watch_handle we get a watch added/remove this invalidating the iterator and crashing Change-Id: Icb61deae272d2f237a4c616fae598404d419af90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix DBus signature generation for complex types.Aaron McCarthy2014-12-042-34/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating the DBus signature of a registered custom type the marshaller appends the signatures of the map entries and array items after the map/array causing an invalid DBus signature to be generated. This happens because beginArray() and beginMap() output the full signature of the data. Fixed by suppressing changes to the signature within beginArray()/endArray() and beginMap()/endMap() blocks. Change-Id: Icaf23b2fe58a3e1f575b81e4a100f02684f68452 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-035-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-244-56/+49
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * | Don't send reply messages for non-method calls in QDBusMessageMatt Fischer2014-11-221-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | QDBusMessage is intended to avoid sending reply messages unless the message is a method call without the NO_REPLY_EXPECTED flag set. However, since messages which are not method calls will never have this flag set, the code will currently cause all non-method call messages to expect a reply. This patch changes the code to examine the message type, and to only check for the flag in cases where the message is a method call. Change-Id: Ic5bb00df69d3cfb38f60bf6bfd8463fb28cf2c99 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge remote-tracking branch 'origin/5.3' into 5.4.0Oswald Buddenhagen2014-11-103-56/+45
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Iad9ef6bf7d6111efba8232a7d9b46bb9974912f5
| | * Partially revert "Fix a deadlock introduced by the race condition fix"5.3Thiago Macieira2014-11-051-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit was 9361be58f47ec256bf920c378479a02501219c1f (2008-11-17), referring to the race condition fix that was applied in commit d47c05b1889bb4f06203bbc65f4660b8d0128954 (2008-10-08). The fix for the deadlock reintroduced the race condition and the commit message noted it. The workaround is no longer necessary since we've fixed the original race condition differently now (see the previous two commits). Task-number: QTBUG-42189 Change-Id: I5a83249597a83c4d4caa2ae57964ad3cc61c1d70 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| | * QDBusConnection: Merge the dispatch and the watch-and-timeout locksThiago Macieira2014-11-053-29/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need two anymore because they now protect the same thing: the state of the DBusConnection. The difference existed when it was possible for two threads to access the DBusConnection at the same time: one doing dispatching and one doing something else. Unfortunately, even though DBusConnection supports this, QtDBus doesn't. From d47c05b1889bb4f06203bbc65f4660b8d0128954 (2008-10-08): Details: if we're removing a timer or a watcher from our list, there's a race condition: one thread (not the QDBusConnection thread) could be asking for the removal (which causes an event to be sent), then deletes the pointer. In the meantime, QDBusConnection will process the timers and socket notifiers and could end up calling lidbus-1 with deleted pointers. That commit fixed the race condition but introduced a deadlock. Task-number: QTBUG-42189 Change-Id: I034038f763cbad3a67398909defd31a23c27c965 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| | * Always lock the DBus dispatcher before dbus_connection_send*Thiago Macieira2014-11-052-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We lock it before dbus_connection_send_with_reply (the async version) in QDBusConnectionPrivate::sendWithReplyAsync. We weren't locking it before send_with_reply_and_block and we apparently should. The locking around the dbus_connection_send function might not be necessary, but let's do it to be safe. The lock now needs to be recursive because we may be inside QDBusConnectionPrivate::doDispatch. Task-number: QTBUG-42189 Change-Id: I7b6b350909359817ea8b3f9c693bced042c9779a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | Update dbus to use new QMetaType::registerNormalizedType signatureJędrzej Nowacki2014-11-171-13/+1
| | | | | | | | | | | | | | | Change-Id: I5d755f383d8cd226a25bd495f6854c0db9719a51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QtDBus: use qEnvironmentVariableIntValue()Marc Mutz2014-10-171-1/+1
|/ / | | | | | | | | | | | | | | It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: Ib0c0f903531a3a656919e87df8065a9c6c7a666c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: Use title case in section1 titlesNico Vertriest2014-09-301-3/+3
| | | | | | | | | | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Update license headers and add new license filesMatti Paaso2014-09-2465-1235/+715
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Replace the const QString global static with a QStringLiteralThiago Macieira2014-08-131-4/+10
| | | | | | | | | | | | | | | | | | | | | | It was originally created to avoid allocating memory for the QString at every turn, but we have QStringLiteral for that today. It has also served a very good run by catching qatomic.h implementations that had bad cv qualifications. Change-Id: Id6d952b8cce363015ec2611d346b4cccedecf137 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | QtDBus: Warn if blocking calls take too long.Robin Burchell2014-07-251-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blocking DBus calls have the potential to totally wreck user interactivity at best (actions taking too long) and make things appear completely broken at worst (the default timeout is 30 seconds, which is a huge amount of time, especially if you get unfortunate and have a repeated blocking call). Provide a warning when a call is found that takes too long, based on some preset durations (200ms for the main thread, 500ms for other threads on the basis that the main thread is generally more important). Also provide configuration knobs for these environment variables, in miliseconds: setting them to 0 will warn on all blocking DBus calls. Setting them to -1 (the default, on release builds) will disable the warning. [ChangeLog][QtDBus] Blocking calls that take a long time will now generate a warning. The time taken may be tuned using the environment variables Q_DBUS_BLOCKING_CALL_MAIN_THREAD_WARNING_MS and Q_DBUS_BLOCKING_CALL_OTHER_THREAD_WARNING_MS. The value represents (in milliseconds) how long before a blocking call is warned on. A value below zero disables the warning, a value of zero will warn on all blocking calls. Change-Id: I0ab4c34aa01670a154d794d9f2694b3235e789db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-012-10/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Merge remote-tracking branch 'origin/stable' into 5.3Frederik Gladhorn2014-06-251-6/+5
| |\ | | | | | | | | | Change-Id: I7462840d15583ead82e86fcf5c84659b909e8c4e
| | * QDBus: fix data race on isDebugging boolDavid Faure2014-06-211-6/+5
| | | | | | | | | | | | | | | Change-Id: Id0b8bf8dac570abfc6c8768bd4264650ae0c199b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix data race in accessing QDBusConnectionPrivate::serviceNamesThiago Macieira2014-06-152-4/+7
| |/ | | | | | | | | | | | | | | | | The trick of creating a copy is not thread-safe. I'd known this since the moment I wrote that code, but thought "what could go wrong?". Task-number: QTBUG-39285 Change-Id: If521d4a649c06e6a34926687e85623aa25cb4c35 Reviewed-by: David Faure <david.faure@kdab.com>