summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Remove a global destructor from QtDBus."Thiago Macieira2009-08-211-6/+4
| | | | | | | | | | | | This reverts commit 3ed5b5ebf5b360dedbba14c03f6ca5701b3b9290. That was a well-intentioned commit and technically correct, but it breaks when there are static QDBusConnection objects in something that is loaded before QtDBus (like libraries that depend on QtDBus or applications like qdbus) Since QDBusConnection is ref-counted, the last instance is supposed to disconnect. However, if we have already unloaded libdbus-1, we can't do that. Q_GLOBAL_STATICs are destroyed too soon.
* Merge commit 'qt/master'Jason Barron2009-08-201-1/+1
|\ | | | | | | | | | | | | | | Conflicts: examples/painting/svgviewer/files/bubbles.svg src/corelib/kernel/qobject.cpp src/network/kernel/qhostinfo.cpp tests/auto/qhostinfo/tst_qhostinfo.cpp
| * Remove a few warnings when compiling Qt and unexport some functions.Thiago Macieira2009-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | Make some functions static that are not used anywhere but in the current file. Others that are used, add the declaration to the _p.h to ensure we don't forget about them. Finally, there's no need to enable debugging code if it's not used anywhere. Reviewed-by: TrustMe
* | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-08-191-4/+6
|\ \ | |/ | | | | | | Conflicts: tests/auto/auto.pro
| * Remove a global destructor from QtDBus.Thiago Macieira2009-08-181-4/+6
| | | | | | | | Instead, only run the unload code if we successfully loaded.
* | Merge commit 'qt/master'Jason Barron2009-08-181-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples.qdoc doc/src/plugins-howto.qdoc doc/src/topics.qdoc examples/phonon/musicplayer/mainwindow.cpp src/3rdparty/freetype/src/base/ftobjs.c src/corelib/global/qglobal.h src/corelib/tools/qalgorithms.h src/corelib/tools/qshareddata.cpp src/corelib/tools/qsharedpointer.cpp src/corelib/tools/tools.pri src/corelib/xml/qxmlstream.h src/gui/painting/painting.pri src/gui/widgets/qdatetimeedit.cpp tests/auto/qdesktopservices/qdesktopservices.pro tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tests/auto/qtextcodec/test/test.pro
| * Use LIBS_PRIVATE on Mac and X11.Thiago Macieira2009-08-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the Mac, it means "-framework ApplicationServices -framework Carbon -framework AppKit" are no longer part of the default LIBS in Qt applications. This required a lot of fixes where we used Mac-specific code in Qt. On X11, it was very straightforward, because we apparently use very little of X11 outside QtGui. I haven't changed the Windows-specific LIBS paths, because I don't know how Windows behaves. Windows has DLLs, but it links to static "import" libraries. So is it static linking or dynamic linking? Reviewed-By: Marius Storm-Olsen
* | Merge commit 'qt/master'Jason Barron2009-08-1359-59/+59
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * Update contact URL in license headers.Jason McDonald2009-08-1259-59/+59
| | | | | | | | Reviewed-by: Trust Me
* | Rename Q_DECLARE_SCOPED_PRIVATE back to Q_DECLARE_PRIVATEHarald Fernengel2009-08-064-4/+4
| | | | | | | | | | | | Rationale: We're using template magic now to get the private pointer in qglobal.h, so no need to have two macros. Also keeps backward compatibility with outside (KDE) code.
* | Merge commit 'origin/master'Jason Barron2009-08-044-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/kernel/qmetatype.cpp src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/gui/graphicsview/qgraphicssceneevent.h src/gui/itemviews/qheaderview.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qgesture.h src/gui/kernel/qgesturerecognizer.h src/gui/painting/qpaintengine_raster.cpp src/network/access/qhttpnetworkreply.cpp src/network/access/qnetworkcookie.h src/network/socket/qnativesocketengine_unix.cpp
| * | Squashed commit of the topic/exceptions branch.Harald Fernengel2009-08-034-4/+4
| | | | | | | | | | | | | | | Contains some smaller fixes and renaming of macros. Looks big, but isn't scary at all ;)
* | | Merge commit 'qt/master-stable'Jason Barron2009-07-2720-315/+750
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe qmake/Makefile.unix qmake/generators/makefile.cpp src/corelib/global/qglobal.h src/corelib/kernel/kernel.pri src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/kernel/qaction.cpp src/gui/kernel/qaction.h src/gui/kernel/qaction_p.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget.h src/gui/kernel/qwidget_mac.mm src/gui/painting/qgraphicssystemfactory.cpp src/gui/styles/qwindowsstyle.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qabstractscrollarea_p.h src/network/access/qnetworkaccessdebugpipebackend.cpp src/network/socket/qlocalsocket_unix.cpp src/network/socket/qnativesocketengine_p.h src/network/socket/qnativesocketengine_unix.cpp src/openvg/qpaintengine_vg.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qcssparser/qcssparser.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfile/tst_qfile.cpp tests/auto/qobject/tst_qobject.cpp tests/auto/qpathclipper/qpathclipper.pro tests/auto/qprocess/tst_qprocess.cpp tests/auto/qsettings/tst_qsettings.cpp tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qsqlquerymodel/qsqlquerymodel.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qwidget/tst_qwidget.cpp
| * Merge branch '4.5'Thiago Macieira2009-07-221-11/+2
| |\
| | * Fix handling of invalid object paths and signatures in release mode.Thiago Macieira2009-07-221-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I had this #ifdef __OPTIMIZE__ there so that the compiler would know not to generate unnecessary calls and a long jump table for the switch of the marshalling code. Turns out that in release mode, the checks I added to make sure we detect invalid object paths and signatures were never hit (we always treated them as pure strings). So use the signature- and object path-checking code in both release and debug mode. Task-number: reported via email (tst_qdbusmarshall failing) Reviewed-by: Peter Hartmann
| * | Merge commit 'origin/4.5'Bill King2009-07-081-0/+7
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/sql/drivers/ibase/qsql_ibase.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qsqldatabase/tst_databases.h tests/auto/qsqldatabase/tst_qsqldatabase.cpp translations/qt_ru.ts
| * | doc: Corrected several qdoc warnings.Martin Smith2009-07-031-1/+9
| | |
| * | Doc: indicate that these methods are added in 4.6Thiago Macieira2009-07-021-0/+2
| | |
| * | Merge branch 'research/qdbus-improvements'Thiago Macieira2009-07-0220-303/+737
| |\ \
| | * | Implement a support for getting return arguments out of invokeMethodThiago Macieira2009-07-021-8/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with QDBusInterface. The problem was that I didn't know how to implement the operator= for all types. But it turns out that this was possible all along: the only types I have to implement the operator= for are the basic types, which are already demarshalled. The complex types are left in QDBusArgument semi-demarshalling, but we have QDBusMetaType::demarshall, which takes a void* to an already-constructed type and demarshalls into it. That's exactly what the doctor ordered. Task-number: 206765 Reviewed-By: Marius Bugge Monsen
| | * | Improve the code a bit more by using the variant that QMetaProperty creates.Thiago Macieira2009-07-022-43/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works for the case of complex types that have to be demarshalled. We don't need to instantiate a new type because QMetaProperty has already done that for us. Also, fix the handling of properties of type variant. I have verified as well that the sending of those properties on the wire use a double-variant encoding (i.e., a variant containing a variant containing some data, the same that Qt 4.5 uses). It's a bit pedantic and it's hard to use when reading stuff, because you get a QVariant containing a QDBusVariant which contains data, but I can't change this anymore. Reviewed-By: Marius Bugge Monsen
| | * | Fix setting of complex/custom properties and error messages.Thiago Macieira2009-07-021-31/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complex properties require demarshalling before passing on to QMetaProperty::write(). We can't pass on a QVariant containing an un-demarshalled QDBusArgument. So add a new function that does the decoding properly, as well as error checking. Also take the opportunity to properly check the interface name in the case of setting a property exported from the object itself (not an adaptor). Task-number: 240608 Reviewed-by: Marius Bugge Monsen
| | * | Use an "int status" extra parameter in property reading/writing.Thiago Macieira2009-07-024-27/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling qt_metacall with the ReadProperty or WriteProperty, the data is on argv[0] like it was before, but now the QVariant itself is on argv[1] and there's an extra parameter in argv[2] which the meta code can use to indicate result. This allows QtDBus to process properties much more easily. In the case of property reading, we need to be able to modify the variant itself, because copying types when we don't have the data isn't very easy. As for setting, we need to be able to tell setProperty to return true or false depending on whether we succeeded in setting the property or not. Reviewed-By: Kent Hansen Reviewed-By: Marius Bugge Monsen
| | * | Avoid revalidating message parameters.Thiago Macieira2009-07-026-31/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a small performance improvement when making a call: we don't need to validate what we already know to be valid because we either designed it to be so or because we've already validated. The D-Bus library unfortunately validates again and there's nothing we can do about it. But we can avoid doing it twice in our own code. Reviewed-By: Marius Bugge Monsen
| | * | Keep creation failure errors for QDBusAbstractInterface.Thiago Macieira2009-07-025-70/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the object creation fails, set isValid to false. This will prevent any outgoing calls to be made with invalid information. In that case, lastError will never change either. This required adding a method to QDBusPendingCall, to be able to create one such object from an existing QDBusError. Reviewed-By: Marius Bugge Monsen
| | * | Adapt the message-sending code to return error messages from theThiago Macieira2009-07-023-49/+90
| | | | | | | | | | | | | | | | | | | | | | | | marshalling code. Reviewed-By: Harald Fernengel
| | * | Add support for error messages in the D-Bus marshaller.Thiago Macieira2009-07-022-14/+24
| | | | | | | | | | | | | | | | Reviewed-By: Harald Fernengel
| | * | Add central validation code to QDBusUtil.Thiago Macieira2009-07-021-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests are useful in QDBusMessage and QDBusAbstractInterface. It avoids having the same messages all over the place. Reviewed-By: Harald Fernengel
| | * | Add some new error codes for indicating invalid D-Bus parameters.Thiago Macieira2009-07-022-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm wondering if I should be adding com.trolltech.QtDBus stuff now. But since there's already one there, I don't see why not... Reviewed-By: Harald Fernengel
| | * | Add a function to check if an interface is implemented by an object.Thiago Macieira2009-07-024-46/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also reorganise a bit, moving the function to create the interface name from an object's class name to qdbusmisc.cpp too. Reviewed-By: Trust Me
| * | | Merge branch '4.5'Marius Storm-Olsen2009-06-301-5/+14
| |\ \ \ | | |/ /
* | | | Merge commit 'origin/master' into 4.6-mergedJason Barron2009-07-092-5/+21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreevent.cpp src/corelib/tools/qdumper.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h src/gui/kernel/qwidget_s60.cpp src/gui/text/qfontdatabase.cpp src/network/access/qnetworkreplyimpl.cpp src/sql/drivers/ibase/qsql_ibase.cpp src/testlib/qtestcase.cpp src/testlib/testlib.pro tests/auto/network-settings.h tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qobjectrace/tst_qobjectrace.cpp tests/auto/qsqldatabase/tst_qsqldatabase.cpp tools/configure/configureapp.cpp translations/qt_ru.ts
| * \ \ \ Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-07-071-0/+7
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/network/access/qhttpnetworkconnection_p.h tests/auto/qstyle/qstyle.pro tests/auto/qstyle/tst_qstyle.cpp tools/configure/configureapp.cpp configure.exe will be recompiled in next commit. Took ours.
| | * | | Add a note about this method not being safe in multithreaded contextsThiago Macieira2009-07-021-0/+7
| | | |/ | | |/|
| * | | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-06-2959-123/+132
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore src/gui/dialogs/qfiledialog_p.h src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontdatabase.cpp tests/auto/network-settings.h tests/auto/qitemdelegate/tst_qitemdelegate.cpp
| | * | Don't crash in libdbus-1 because of invalid parameters.Thiago Macieira2009-06-281-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some QDBusAbstractInterface can have empty paths or service names, for wildcard purposes. If someone tries to make a call using those interfaces, the application crashes. So check for the invalid conditions and don't make the call. If we return 0 here, the message-sending code will generate an error in QDBusConnectionPrivate. Reviewed-by: TrustMe
* | | | Merge commit 'qt/master-stable' into 4.6-mergedJason Barron2009-06-3059-118/+118
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore configure.exe src/corelib/concurrent/qtconcurrentthreadengine.h src/corelib/global/qnamespace.h src/gui/graphicsview/qgraphicssceneevent.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qapplication_p.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qwidget.h src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontdatabase.cpp src/network/access/qnetworkaccesshttpbackend.cpp tests/auto/network-settings.h tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro tests/auto/qvariant/tst_qvariant.cpp
| * | | Merge license header changes from 4.5Volker Hilsheimer2009-06-1659-118/+118
| |\ \ \ | | | |/ | | |/|
| | * | Update license headers as requested by the marketing department.Jason McDonald2009-06-1659-118/+118
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
* | | | Merge commit 'qt/master-stable' into 4.6-stableJason Barron2009-06-256-15/+15
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 4.6 into the Qt-S60 repo. Conflicts: configure.exe mkspecs/features/qttest_p4.prf qmake/generators/makefile.cpp src/corelib/io/qdir.cpp src/corelib/io/qprocess.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qobject.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/corelib/thread/qthread_p.h src/corelib/tools/qvector.h src/gui/dialogs/qdialog.cpp src/gui/dialogs/qfiledialog.cpp src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qmessagebox.cpp src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsview.cpp src/gui/image/qpixmapcache.cpp src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_p.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h src/gui/painting/qdrawhelper.cpp src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qmenubar.cpp src/network/socket/qlocalserver.cpp src/testlib/qtestcase.cpp src/testlib/testlib.pro tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qitemdelegate/tst_qitemdelegate.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qpixmap/qpixmap.pro
| * | All of Qt's own code compiles with -pedantic now (but pcre and webkit don't ↵David Faure2009-06-042-2/+2
| | | | | | | | | | | | | | | | | | | | | seem fixable easily) Merge-request: 594 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * | Merge commit 'origin/4.5'Olivier Goffart2009-06-041-1/+0
| |\ \ | | |/
| * | improved string operations all over the placeThierry Bastian2009-05-284-13/+13
| | | | | | | | | | | | | | | used character operations whenever possible better usage of QLatin1String
* | | Make Qt exception safer.Robert Griebl2009-06-102-2/+2
| |/ |/| | | | | | | | | | | | | Squashed commit of the branch haralds-haralds-qt-s60-topics/topic/exceptions, which also contains the full history. Rev-By: Harald Fernengel Rev-By: Ralf Engels
* | Remove a Q_ASSERT that could be triggered under some conditions.Thiago Macieira2009-06-041-1/+0
|/ | | | | | | | | | Whenever an argument failed to marshall, this assert would be triggered. It's technically an error in the application, but it's hard to track it down. So remove it and let the execution continue (the function returns false indicating failure already and there's a warning from the marshalling code itself) Reviewed-by: TrustMe
* Don't crash at runtime with when relaying a signal.Thiago Macieira2009-05-111-8/+3
| | | | | | | | | | | We have this function called qDBusInterfaceFromMetaObject that calculates the interface name from a given meta object. There's no need to duplicate the code here (and not do it right). All tests still pss. Task-number: 236955 Reviewed-by: Trust Me
* Make QDBusPendingCallWatcher emit a signal if it is created on anThiago Macieira2009-05-071-2/+8
| | | | | | | | | | already-finished call. This fixes a bit of a "surprise" when calling a local method (which returns and finishes immediately) or when by accident calling a function that returns QDBusReply instead of QDBusPendingCall/Reply. Reviewed-by: Trust Me
* Fixed D-Bus socket write notifications, broken since d47c05b1Thiago Macieira2009-05-041-1/+1
| | | | | | Shame on me: copy/paste from socketRead to socketWrite, I didn't change the DBUS_WATCH_READABLE to DBUS_WATCH_WRITABLE. Reviewed-by: Trust Me
* Add the parameter to the function call.Thiago Macieira2009-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Apparently we have a problem with these default parameters. We have basically: template<typename T> void func(T * = 0); template<> void func<Something>(Something *); Now, according to GCC, I can't add "= 0" to the template specialisation. However, MSVC 2008 isn't able to call the specialisation without my extra 0 here. I've seen a similar issue before in QSharedPointer. I don't think this is a big deal because the error message output by MSVC 2008 indicates this is likely a compiler bug: qdbuspendingreply.h(98) : error C2440: 'default argument': cannot convert from 'T1 *' to 'QVariant *' where [ T1=QVariant ]
* Remove unnecessary debug message.Thiago Macieira2009-03-271-1/+0
| | | | Reviewed-by: Trust Me