| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| | |
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | | |
marshalling code.
Reviewed-By: Harald Fernengel
|
| | |
| | |
| | |
| | | |
Reviewed-By: Harald Fernengel
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These tests are useful in QDBusMessage and QDBusAbstractInterface. It
avoids having the same messages all over the place.
Reviewed-By: Harald Fernengel
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| | |
seem fixable easily)
Merge-request: 594
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
| |
used character operations whenever possible
better usage of QLatin1String
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
]
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
acquire guard of the local static.
This only buys us one warning less by helgrind.
Reviewed-by: Trust Me
|
|
|