Added support for new TQStringVariantMap type.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/36/head
Michele Calgaro 5 years ago
parent 7ea414a2ab
commit ce4a92763f
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -872,11 +872,7 @@ void KDCOPWindow::slotCallFunction( TQListViewItem* it )
TQDataStream reply(replyData, IO_ReadOnly); TQDataStream reply(replyData, IO_ReadOnly);
if (demarshal(replyType, reply, mainView->lb_replyData)) if (demarshal(replyType, reply, mainView->lb_replyData))
{ {
mainView->l_replyType->setText mainView->l_replyType->setText(i18n("<strong>%1</strong>").arg(TQString::fromUtf8(replyType)));
(
i18n("<strong>%1</strong>")
.arg(TQString::fromUtf8(replyType))
);
mainView->lb_replyData->show(); mainView->lb_replyData->show();
} }
else else
@ -914,12 +910,7 @@ void KDCOPWindow::slotFillApplications()
TDEApplication::restoreOverrideCursor(); TDEApplication::restoreOverrideCursor();
} }
bool KDCOPWindow::demarshal bool KDCOPWindow::demarshal(TQCString &replyType, TQDataStream &reply, TQListBox *theList)
(
TQCString & replyType,
TQDataStream & reply,
TQListBox *theList
)
{ {
TQStringList ret; TQStringList ret;
TQPixmap pret; TQPixmap pret;
@ -1082,6 +1073,15 @@ bool KDCOPWindow::demarshal
reply >> r; reply >> r;
ret << r.toString(); ret << r.toString();
} }
else if (replyType == "TQStringVariantMap")
{
TQStringVariantMap r;
reply >> r;
for (TQStringVariantMap::ConstIterator it(r.begin()); it != r.end(); ++it)
{
ret << it.key() + " : " + it.data().toString();
}
}
else if (replyType == "DCOPRef") else if (replyType == "DCOPRef")
{ {
DCOPRef r; DCOPRef r;
@ -1091,8 +1091,7 @@ bool KDCOPWindow::demarshal
} }
else else
{ {
ret << ret << i18n("Do not know how to demarshal %1").arg(TQString::fromUtf8(replyType));
i18n("Do not know how to demarshal %1").arg(TQString::fromUtf8(replyType));
isValid = false; isValid = false;
} }

Loading…
Cancel
Save