mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Ref T709, in order to use BLACK_METAMEMBER(dBusServer) with std::string added all opertors
This commit is contained in:
committed by
Mat Sutcliffe
parent
81c832457e
commit
246ed0d955
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user