common: added function to convert any number to a hex string
Helps with debugging.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user