summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Add a note about this method not being safe in multithreaded contextsThiago Macieira2009-07-021-0/+7
| |
* | 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
|\ \ | |/
| * 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 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
* | 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
|\ \ | |/
| * 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
* | improved string operations all over the placeThierry Bastian2009-05-284-13/+13
|/ | | | | used character operations whenever possible better usage of QLatin1String
* 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
* Fix crashes in D-Bus due to race conditions.Thiago Macieira2009-03-272-5/+8
| | | | | | | | | | | | | | This happens in heavily threaded applications: libdbus-1 asks us to add and remove timers (and watches, but those less often) from any thread. Since QObject's model requires that timers and QSocketDescriptors be added only in the object's own thread, we have to sync back to the main thread. However, since D-Bus keeps adding and removing the timers, we have to keep a queue of timers to be added and that list is accessed by any thread. Make sure that list is only accessed in locked conditions. Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Small fix: initialise the global static isDebugging variable within theThiago Macieira2009-03-271-2/+1
| | | | | | | | acquire guard of the local static. This only buys us one warning less by helgrind. Reviewed-by: Trust Me
* Long live Qt 4.5!Lars Knoll2009-03-2360-0/+18152