Util. function for class name

This commit is contained in:
Klaus Basan
2020-04-23 20:15:57 +02:00
committed by Mat Sutcliffe
parent 5987e58043
commit c1622951b3
2 changed files with 31 additions and 2 deletions

View File

@@ -13,11 +13,12 @@
#include "blackmisc/blackmiscexport.h"
#include <stddef.h>
#include <QString>
#include <stddef.h>
class QMetaType;
class QTextStream;
class QObject;
struct QMetaObject;
//! Metadata util functions
@@ -36,6 +37,12 @@ namespace BlackMisc
//! Real heap size of an object
BLACKMISC_EXPORT size_t heapSizeOf(const QMetaObject &objectType);
//! Class name as from QMetaObject::className with namespace
BLACKMISC_EXPORT QString className(const QObject *object);
//! Class name as from QMetaObject::className without namespace
BLACKMISC_EXPORT QString classNameShort(const QObject *object);
} // ns
#endif // guard