common: added function to convert any number to a hex string

Helps with debugging.
This commit is contained in:
itsmattkc
2020-04-16 23:13:35 +10:00
parent 2f80be437a
commit df534fadbe
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -45,6 +45,7 @@ set(OLIVE_SOURCES
common/timelinecommon.h
common/timerange.h
common/timerange.cpp
common/tohex.h
common/xmlutils.h
common/xmlutils.cpp
PARENT_SCOPE
+12
View File
@@ -1,4 +1,16 @@
#ifndef TOHEX_H
#define TOHEX_H
#include <QtGlobal>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
inline QString ToHex(quint64 t) {
return QStringLiteral("%1").arg(t, 0, 16);
}
OLIVE_NAMESPACE_EXIT
#endif // TOHEX_H