refs #314, fixed DBus crash because of wrong list type

discussion here: https://dev.vatsim-germany.org/boards/22/topics/2006?r=2015#message-2015
* Fixed CIndexVariantMap
* In the same step added more tests in the DBus sample
This commit is contained in:
Klaus Basan
2014-08-21 11:27:17 +02:00
parent 2089ab89a1
commit a97830b7cf
5 changed files with 62 additions and 2 deletions

View File

@@ -107,7 +107,7 @@ namespace BlackMisc
*/
void CIndexVariantMap::unmarshallFromDbus(const QDBusArgument &argument)
{
QList<int> indexes;
QList<CPropertyIndex> indexes;
QList<CVariant> values;
argument >> indexes;
argument >> values;
@@ -129,6 +129,14 @@ namespace BlackMisc
this->m_values.insert(index, value);
}
/*
* Add string by literal
*/
void CIndexVariantMap::addValue(const CPropertyIndex &index, const char *str)
{
this->addValue(index, QString(str));
}
/*
* Register metadata
*/