dbus-1-tqt does not support array of objectpathkeymaps #1

Συγχωνευμένα
SlavekB συγχώνευσε 1 υποβολές από bug/2925/objectpath σε master 6 έτη πριν
deloptes σχολίασε 6 έτη πριν
Συνεργάτης

https://bugs.trinitydesktop.org/show_bug.cgi?id=2925

When trying to parse data with signature a{oa{sa{sv}}} the flow is something like this:

TQT_DBusProxy::sendWithReply
-> TQT_DBusConnection::sendWithReply
-> TQT_DBusMessage::fromDBusMessage(reply)
-> TQT_DBusMarshall::messageToList(message, dmsg)
-> qFetchParameter(&it)
-> TQT_DBusData qFetchMap
-> qFetchStringKeyMapEntry

It turned out that it does not support array of objectpathkeymaps and it was returning a null key, which explains why it was returning always the last entry

https://bugs.trinitydesktop.org/show_bug.cgi?id=2925 When trying to parse data with signature a{oa{sa{sv}}} the flow is something like this: TQT_DBusProxy::sendWithReply -> TQT_DBusConnection::sendWithReply -> TQT_DBusMessage::fromDBusMessage(reply) -> TQT_DBusMarshall::messageToList(message, dmsg) -> qFetchParameter(&it) -> TQT_DBusData qFetchMap -> qFetchStringKeyMapEntry It turned out that it does not support array of objectpathkeymaps and it was returning a null key, which explains why it was returning always the last entry
SlavekB αξιολόγησε 6 έτη πριν
SlavekB άφησε ένα σχόλιο
Ιδιοκτήτης

The code looks good. It does not seem to cause any change to the API / ABI. Please, just a little cleaning.

Note: Please remove the test output as an ammend of an existing commit and then use push with -f.

The code looks good. It does not seem to cause any change to the API / ABI. Please, just a little cleaning. Note: Please remove the test output as an ammend of an existing commit and then use push with -f.
// dbus_message_iter_get_fixed_array(&sub,&data,&len);
// return TQCString(data,len);
// } else {
SlavekB σχολίασε 6 έτη πριν
Ιδιοκτήτης

Well, it's a good idea to remove this unused code. It looks a little confusing, so it'll be better if it's gone.

Well, it's a good idea to remove this unused code. It looks a little confusing, so it'll be better if it's gone.
MicheleC σχολίασε 6 έτη πριν
Ιδιοκτήτης

Any idea why that code was commented out? Could it be useful?

Any idea why that code was commented out? Could it be useful?
SlavekB σχολίασε 6 έτη πριν
Ιδιοκτήτης

I have no idea. This code is here in a comment from the first commit into the Trinity repository. Additionally, obviously if / else / else is not consistent.

I have no idea. This code is here in a comment from the first commit into the Trinity repository. Additionally, obviously if / else / else is not consistent.
MicheleC σχολίασε 6 έτη πριν
Ιδιοκτήτης

yes, the commented else is obviously confusing. Given that the code was always commented out from the beginning, removing it seems ok 👍

yes, the commented else is obviously confusing. Given that the code was always commented out from the beginning, removing it seems ok :+1:
deloptes σχολίασε 6 έτη πριν
Συντάκτης
Συνεργάτης

This was the reason why I removed it - it seems it was never used or at least not in this life of this piece of software

This was the reason why I removed it - it seems it was never used or at least not in this life of this piece of software
tqdbusmarshall.cpp Παρωχημένο
Q_ASSERT(dbus_message_iter_has_next(&itemIter));
TQString key = qFetchParameter(&itemIter).toString();
// tqDebug("qFetchStringKeyMapEntry key : %s", key.latin1());
SlavekB σχολίασε 6 έτη πριν
Ιδιοκτήτης

Please, can you remove this unused test output from your patch?

Please, can you remove this unused test output from your patch?
SlavekB σχολίασε 6 έτη πριν
Ιδιοκτήτης

@deloptes, please do the small cleaning as mentioned in the review above.

@deloptes, please do the small cleaning as mentioned in the review above.
deloptes σχολίασε 6 έτη πριν
Συντάκτης
Συνεργάτης

Hi Slavek,
sorry for the multiple commits, I tried for first time the ammend but failed miserably :)

regards

Hi Slavek, sorry for the multiple commits, I tried for first time the ammend but failed miserably :) regards
SlavekB σχολίασε 6 έτη πριν
Ιδιοκτήτης

All right, it does not matter – I did squash to combine your series of commits into one 😸

All right, it does not matter – I did squash to combine your series of commits into one :smile_cat:
SlavekB έκλεισε αυτό το pull request 6 έτη πριν
SlavekB διέγραψε το κλάδο bug/2925/objectpath 6 έτη πριν
SlavekB το πρόσθεσε στο R14.0.6 release ορόσημο 6 έτη πριν
Το pull request έχει συγχωνευθεί ως f126c44916.
Συνδεθείτε για να συμμετάσχετε σε αυτή τη συνομιλία.
Δεν υπάρχουν εξεταστές
Χωρίς Ορόσημο
Χωρίς Αποδέκτη
3 Συμμετέχοντες
Ειδοποιήσεις
Ημερομηνία Παράδοσης

Δεν ορίστηκε ημερομηνία παράδοσης.

Εξαρτήσεις

Δεν έχουν οριστεί εξαρτήσεις.

Αναφορά: TDE/dbus-1-tqt#1
Φόρτωση…
Δεν υπάρχει ακόμα περιεχόμενο.