Ref T709, in order to use BLACK_METAMEMBER(dBusServer) with std::string added all opertors

This commit is contained in:
Klaus Basan
2019-07-25 16:10:15 +02:00
committed by Mat Sutcliffe
parent 81c832457e
commit 246ed0d955
5 changed files with 102 additions and 15 deletions

View File

@@ -31,3 +31,21 @@ void preventQtDBusDllUnload()
void preventQtDBusDllUnload()
{ }
#endif
QDBusArgument &operator <<(QDBusArgument &arg, const std::string &s)
{
arg.beginStructure();
arg << QString::fromStdString(s);
arg.endStructure();
return arg;
}
const QDBusArgument &operator >>(const QDBusArgument &arg, std::string &s)
{
QString qs;
arg.beginStructure();
arg >> qs;
arg.endStructure();
s = qs.toStdString();
return arg;
}