summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbuspendingcall.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add missing full stops in briefsPaul Wicking2018-06-211-2/+2
| | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* doc: update dbus sources for clangqdocMartin Smith2017-12-081-1/+1
| | | | | | | | | | Changed some uses of Q_QDOC to Q_CLANG_QDOC; eliminated some uses of Q_QDOC; correct some function signatures used for qdoc; added docs for swap() functions. Change-Id: I0d3c62d462bd3b10fd35d411bdfb93d952e6423d Reviewed-by: Martin Smith <martin.smith@qt.io>
* 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>
* Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QDBusPendingCall: Remove unused memberThiago Macieira2015-10-151-1/+0
| | | | | | | | We set it to the number of types that the call expects to receive, but we never used it anywhere else. Change-Id: I42e7ef1a481840699a8dffff1407eb520b5844d8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Implement the blocking QtDBus call in terms of the non-blocking oneThiago Macieira2015-09-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Use QStringLiteral where applicable in QtDBusThiago Macieira2015-03-311-1/+2
| | | | | | | | | Move to qdbusutil_p.h the string constants that are used often and in multiple places; use QStringLiteral in qdbusintegrator.cpp for the strings that are used often. Change-Id: I8e1325b9ba015bda91bf01c42175d8032ea32f62 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>
* 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>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-7/+7
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QDbus: Fix (!a == b) comparisonTobias Hunger2013-09-021-1/+1
| | | | | | | ! binds to a, and that is wrong here. Change-Id: I746d2b82bbd03635b3aa06abb0c5566f84a03128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change QDBusPendingCallPrivate to full reference counting for deletion.Peter Seiderer2013-07-291-0/+6
| | | | | | | | | | | | | | Fixes race between QDBusConnectionPrivate::processFinishedCall() releasing the mutex before emitting signals (using various members of QDBusPendingCallPrivate) and deletion of the QDBusPendingCallPrivate object through QDBusPendingCall::d's destructor (a member of type QExplicitlySharedDataPointer<QDBusPendingCallPrivate>) leeds to segmentation fault with CrashTest example on slow/single core arm cpu). Task-number: QTBUG-27809 Change-Id: I3590d74d1cfa5816ede764b50b83a7008ec780ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Add more qtbase implictly-shared classes to the listGiuseppe D'Angelo2012-11-301-0/+1
| | | | | | | QText*Format and QDns* ones are still missing. Change-Id: I8e87fba596e87289ca935717e0a90bfc0b0a26c0 Reviewed-by: hjk <qthjk@ovi.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>
* QDBusMetaTypeId: don't cache the result of qMetaTypeId<>() in static intsMarc Mutz2012-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | There's not much point in caching the result of qMetaTypeId<>, because it's already internally memoised. In addition, the code that initialised the static int caches wasn't protected against concurrent access under the assumption that the operations performed were thread-safe. That is true for most of them, but not for the stores to the static ints, which race against each other: // Thread A // Thread B r1 = initialized /*=false*/ r1 = initialized /*=false*/ r2 = qMetaTypeId<...>(); r2 = qMetaTypeId<...>(); message = r2; message = r2; // race, ditto for all other ints To fix, turn the ints into inline functions that just call the respective qMetaTypeId<>() function. Change-Id: I5aa80c624872c3867232abc26ffdcde70cd54022 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-101-2/+2
|\ | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
| * Doc: Modularize QtDBus documentation and add missing file to QtNetwork.Casper van Donderen2012-05-091-2/+2
| | | | | | | | | | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Idacff866735d00b048d65318bc4c3ee1dfa16310 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | QtDBus: add member-swap to shared classesMarc Mutz2012-05-091-0/+8
|/ | | | | | | Implemented as in other shared classes (e.g. QPen). Change-Id: Ic827540b535fc5506165b5395b796a53a00bb096 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge master into api_changesKent Hansen2012-03-271-6/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * Use QVector<int> instead of QList<int> for storing metatypes in QtDBusThiago Macieira2012-03-241-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change I00020eed fixed a bug present in 64-bit machines because it tried to access QList<int>'s internal array data, assuming it was a vector of ints. That worked in 32-bit, but not 64-bit. The fix involves a conversion between QList and QVector. Now fix it properly by changing everything to be QVector. The benefit is that on 64-bit, they are real vectors, not the 50%-overhead pointer array that QList is. Change-Id: I989ad279d0d8b2c9ab262a1eed413ab2365b5461 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QtDBus: make some constructors explicitMarc Mutz2012-03-121-1/+1
|/ | | | | | | | | 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>
* 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>
* Don't directly access QList contentsAlberto Mardegan2011-11-161-3/+6
| | | | | | | | | | | | The existing code doesn't work on 64bit machines. We must first convert the list into a QVector, which guarantees that elements are laid out correctly as an array. Merge-request: 1467 Reviewed-by: thiago (cherry picked from commit 00020eed3fa948f69cfa776e92121edec6f975cc) Change-Id: I00020eed3fa948f69cfa776e92121edec6f975cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.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/+539
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