mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
committed by
Mathew Sutcliffe
parent
0518e680c3
commit
67a5dbfe48
@@ -7,6 +7,8 @@
|
||||
#define BLACKMISC_FREEFUNCTIONS_H
|
||||
|
||||
#include <QDir> // for Q_INIT_RESOURCE
|
||||
#include <QVariant>
|
||||
#include <QDBusArgument>
|
||||
|
||||
/*!
|
||||
* Workaround, to call initResource from namespace. Used in BlackMisc::initResources().
|
||||
@@ -79,6 +81,34 @@ namespace BlackMisc
|
||||
*/
|
||||
void initResources();
|
||||
|
||||
/*!
|
||||
* \brief QVariant to string, allows to stringify CValueObject
|
||||
* \param qv
|
||||
* \param i18n
|
||||
* \return
|
||||
*/
|
||||
QString qVariantToString(const QVariant &qv, bool i18n = false);
|
||||
|
||||
/*!
|
||||
* Fix variant. Required if a variant "comes in" via DBus,
|
||||
* and represents a QDBusArgument rather than the real type.
|
||||
* \param variant
|
||||
* \param localUserType
|
||||
* \return
|
||||
*/
|
||||
QVariant fixQVariantFromDbusArgument(const QVariant &variant, int localUserType);
|
||||
|
||||
/*!
|
||||
* Convert a QDBusArgument back to a concrete type if required
|
||||
* This is a workaround if a QVariant is sent via DBus, QDBusArgument is
|
||||
* received and Qt is nor able to get the original QVariant back
|
||||
* \param argument
|
||||
* \param type
|
||||
* \return
|
||||
*/
|
||||
// TODO: To be removed if a better solution is found
|
||||
QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type);
|
||||
|
||||
} // BlackMisc
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user