using hashes to perform comparisons between blackmisc value objects stored inside of QVariant

refs #81
This commit is contained in:
Klaus Basan
2013-12-22 20:40:30 +00:00
committed by Mathew Sutcliffe
parent 67a5dbfe48
commit a280d239e6
22 changed files with 416 additions and 0 deletions

View File

@@ -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