summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbus_symbols_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Support interactive authorization flag in DBusMessageKai Uwe Broulik2018-07-101-0/+57
| | | | | | | | This flag was introduced to serve as a replacement for a dedicated "interactive" boolean argument in method calls guarded by Polkit. Change-Id: Ida91c9872e70f8ca6672563d0ca6642f38c498ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Undef interface in more places, fixing builds with libc++ on windowsMartin Storsjö2018-01-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | After including windows.h, interface is a define that expands to "struct" (unless WIN32_LEAN_AND_MEAN is defined). This name is used as a normal identifier in multiple places within Qt. This has already been worked around in a number of places (in e.g. 3ba61d9baa569ea69e41a943981680c09c521ff7 and 786d23bb4966b6697ac04c43158e2312d898e133). After qrandom.h was included in <QtCore/QtCore>, this header implicitly includes <random>. In libc++ on windows, this header then transitively includes windows.h, exposing the clash with the name "interface" in even more locations than before. For cases within qtbase internals, it could also alternatively be handled by defining WIN32_LEAN_AND_MEAN while building QtDbus, but for occurrences in public headers, the undef trick needs to be used. Change-Id: I89754f38f55ae7f2145255a2c8a71b23492be6a1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qtdbusglobal.h and qtdbusglobal_p.hLars Knoll2016-07-141-1/+1
| | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. QtDBus already had such a header, but its name (qdbusmacros.h) was not in line with what's being used in all other modules. So add a qtdbusglobal.h header, and turn qdbusmacros.h into a a forwarding header to that new global header file. Change-Id: Ib7eb2484c7b8b588eb89bf3290cb6c1c7c391fe2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-211-1/+1
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Revert "dbus: Add method serial() and replySerial() to class DBusMessage."Thiago Macieira2016-01-111-2/+0
| | | | | | | | | This reverts commit 618e2cc081e09d9222418bd933876224675a7530. The original commit has a section of code that I failed to review properly and is of questionable functionality. Change-Id: I61c53d7b8b2aa7c3312292b017a18aba7da11bc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* dbus: Add method serial() and replySerial() to class DBusMessage.Ralf Habacker2016-01-071-0/+2
| | | | | | | | | | | | | This patch includes setup of class member 'msg' in QDBusMessagePrivate::toDBusMessage() to be able to get the serial after message sending. Testcases for comparing the 'reply serial to' with the 'serial' are included. Task-number: QTBUG-44490 Change-Id: Iae7c48f5b0c70a6c5ae500904072b38b46dfd876 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement the blocking QtDBus call in terms of the non-blocking oneThiago Macieira2015-09-151-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the code a little by having a single code path. More importantly, we no longer need to call the evil function dbus_connection_send_with_reply_and_block. That function acquires a lock on the socket transport inside libdbus-1, which means all threads need to wait until the one call gets unblocked before they can continue. To do that, this commit reimplements the QDBus::Block part of QDBusConnectionPrivate::sendWithReply by reusing the existing call to sendWithReplyAsync() and then doing a blocking-wait with QDBusPendingCallPrivate::waitForFinished(). By using (Q)DBusPendingCall and the threaded connection approach (next commit), now we never block on the socket. That also means the code to call dbus_pending_call_block() is no longer necessary and the waitForFinished() function itself can be considerably simplified. As a side-effect of no longer blocking, a number of pre-existing race conditions that used to be hidden showed up. Note: this commit deadlocks without the threading (next commits). Task-number: QTBUG-43585 Change-Id: Ic5d393bfd36e48a193fcffff13b73754954a3f7d Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Make sure we don't call dbus_connection_can_send_type on too old libdbusThiago Macieira2015-05-261-3/+0
| | | | | | | | | | | | | | | | | | This function was introduced alongside the support for Unix file descriptors, so it's a good indicator of whether Unix FDs are supported. Ever since dbus_minimal_p.h, however, DBUS_TYPE_UNIX_FD may be defined even if the system libs don't support it. In order to fix this issue, I had to fix what was apparently a merge conflict resolution mistake and remove the #ifdef around the test. Doing the latter is a good idea due to moc being unable to find <dbus/dbus.h>. This was tested with both linked and dynamically-loaded libdbus-1. Task-number: QTBUG-46199 Change-Id: I66a35ce5f88941f29aa6ffff13dfb4b5438613a3 Reviewed-by: Jani Vähäkangas <jani.vahakangas@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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-211-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix memory leaks with QDBusServerThiago Macieira2015-01-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * 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>
* | 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>
* Make QtDBus compile without libdbus-1 headers, if dlopeningThiago Macieira2014-12-011-1/+6
| | | | | | | | | | | | | | 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>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add method to QDBusServer to allow anonymous client connections.Roland Winklmeier2014-01-151-0/+3
| | | | | | | | | | | | | | | | This change adds a new method to QDBusServer to allow anonymous connections. This is part of the DBus API and was not yet possible to use with QDBusServer. It is set in the newConnection callback when a new client tries to connect. Anonymous connections are enabled by default in DBus but not allowed by default. [ChangeLog][QtDBus][QDBusServer] Added method to QDBusServer to allow anonymous client connections, even if the connecting client is not authenticated as a user. Change-Id: I984c9e634101ecd2e67bb25c8d12bb1071836fd3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Stop using function deprecated in D-Bus 1.2 (raise minimum version)Thiago Macieira2013-02-271-1/+1
| | | | | | | | | | | | | | | | The dbus_watch_get_fd function was deprecated in D-Bus 1.2 (technically, in 1.1.1, but that was a development release) because it had a bad name. Sockets on Windows have file descriptors, but they are not shared from the same pool as the CRT library's file descriptors. This commit raises the minimum required version of D-Bus to 1.2. This is the first requirement raise since this code was introduced in 2006. For some reason, the D-Bus 1.2.0 release seems to be missing, but 1.2.1 was released on 04-Apr-2008. That's ancient enough for all distributions Qt 5 is supposed to run on. Change-Id: Ia6bbc137fffbb27c77290ed3e32d3380f0ae3c54 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make QtDBus work again with D-Bus 1.0 and 1.1Thiago Macieira2012-10-191-12/+0
| | | | | | | | | | The dbus_get_version function was introduced in 1.2, so we'd need to detect pre-1.2 by the absence of the function. But if we're going to detect the presence or absence of any function, we might as well do it on dbus_connection_can_send_type, which is the function we wanted anyway. Change-Id: I6e17a3a8f1382c6a489490084f6e3f61aa5a1947 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | 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>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed QLibrary::resolve() to return a function pointer.Kim Motoyoshi Kalland2011-07-251-2/+2
| | | | | | | | | | | According to the C++ standard, there is no guarantee that you can cast between function pointers and void pointers without data loss (section 5.2.10-6). Change-Id: I27f4d835e4c8ca8ecca0d76cfea9ce34491956bd Reviewed-on: http://codereview.qt.nokia.com/1995 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Add a function that returns the D-Bus local machine IDThiago Macieira2011-06-231-0/+2
| | | | | | | | | Cherry-picked from 4.8 59bd3bcd961fb3198dc9ba24996f7f9af67aeda3 Change-Id: Id3c8f9edbcbe9bbea83d4d54a6eb25500ab80b68 Reviewed-on: http://codereview.qt.nokia.com/655 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+375
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12