mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 09:15:34 +08:00
using hashes to perform comparisons between blackmisc value objects stored inside of QVariant
refs #81
This commit is contained in:
committed by
Mathew Sutcliffe
parent
67a5dbfe48
commit
a280d239e6
@@ -7,6 +7,7 @@
|
||||
#define BLACKMISC_FREEFUNCTIONS_H
|
||||
|
||||
#include <QDir> // for Q_INIT_RESOURCE
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
#include <QDBusArgument>
|
||||
|
||||
@@ -81,6 +82,21 @@ namespace BlackMisc
|
||||
*/
|
||||
void initResources();
|
||||
|
||||
/*!
|
||||
* \brief Compare 2 QVariants
|
||||
* \param v1
|
||||
* \param v2
|
||||
*/
|
||||
bool equalQVariants(const QVariant &v1, const QVariant &v2);
|
||||
|
||||
/*!
|
||||
* \brief Compare QVariants
|
||||
* \param v1
|
||||
* \param v2
|
||||
* \return
|
||||
*/
|
||||
int compareQVariants(const QVariant &v1, const QVariant &v2);
|
||||
|
||||
/*!
|
||||
* \brief QVariant to string, allows to stringify CValueObject
|
||||
* \param qv
|
||||
@@ -109,6 +125,14 @@ namespace BlackMisc
|
||||
// TODO: To be removed if a better solution is found
|
||||
QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type);
|
||||
|
||||
/*!
|
||||
* \brief Add several hash values
|
||||
* \param values
|
||||
* \param classTypeId
|
||||
* \return
|
||||
*/
|
||||
uint calculateHash(const QList<uint> &values, const char *className);
|
||||
|
||||
} // BlackMisc
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user