29 #include <QtCore/qglobal.h> 30 #include <QSharedPointer> 49 #define cStr(qStr) qStr.toUtf8().constData() 54 #define ptrStr(ptr) ptrToString(static_cast<void*>(ptr)) 58 return QString::asprintf(
"%p", ptr);
66 const QString lc = value.toLower();
79 return QString(
"true");
81 return QString(
"false");
92 #define ZBL_DECLARE_LOGGED_CATEGORY(category) static ZblLogCategory category; 94 #define ZBL_DECLARE_LOGGED_OBJECT ZBL_DECLARE_LOGGED_CATEGORY(m_log) 96 #define ZBL_DEFINE_LOGGED_CATEGORY(category_name, variable_name) \ 97 ZblLogCategory variable_name(#category_name); 99 #define ZBL_DEFINE_LOGGED_OBJECT(class_name) \ 100 ZblLogCategory class_name::m_log(#class_name); 102 #define ZBL_REGISTER_LOGGED_CATEGORY(variable_name) variable_name.registerCategory(); 104 #define ZBL_REGISTER_LOGGED_OBJECT ZBL_REGISTER_LOGGED_CATEGORY(m_log) 107 #define zCWarning(category) qCWarning(category()) 108 #define zCCritical(category) qCCritical(category()) 109 #define zCDebug(category) qCDebug(category()) 111 #define zWarning() zCWarning(m_log) 112 #define zCritical() zCCritical(m_log) 113 #define zDebug() zCDebug(m_log) 115 #define LOCK_ZLOGCATEGORIES \ 116 QStringList& zLogCategories(ZblLogCategory::m_categories); \ 117 QMutexLocker categoryLock(&ZblLogCategory::m_categorylock); 128 #define ZBL_SLOT_BEGIN_TRY try{zThreadErr.clearError(); 134 #define ZBL_SLOT_END_VOID(facility,code,error_message) \ 135 }catch(Zbl::ZblException ze){ \ 136 QString msg(#error_message); \ 137 msg.append(", source exception: ").append(ze.what( )); \ 138 zThreadErr.raiseError(#facility,#code,msg);} \ 139 catch(...){zThreadErr.raiseError(#facility,#code,#error_message);} 141 #define ZBL_SLOT_END_RETURN(return_success,return_failed,facility,code,error_message) \ 142 return return_success; \ 143 ZBL_SLOT_END_VOID(facility,code,error_message) \ 144 return return_failed; 146 #define Z_CONSTANT_DEF(propName, dataType) \ 147 Q_PROPERTY(dataType propName READ propName CONSTANT) \ 150 #define Z_CONSTANT_IMPL(className, readMethodName, dataType, constantExp) \ 151 dataType className::readMethodName(){return constantExp;} 153 #define Z_PROPGET_DEF(propName, propType) \ 154 Q_PROPERTY(propType propName READ propName) \ 157 #define Z_PROPGET_IMPL(className, propName, propType, failedValue) \ 158 propType className::propName(){ \ 160 ZBL_SLOT_END_RETURN(m_fi.at(m_i).propName(), failedValue, \ 161 Z_FAC_JS, className::propName, propName failed) \ 177 QThread* objThread =
object.thread();
179 QThread* thisThread = QThread::currentThread();
181 return objThread == thisThread ? true :
false;
QList< QString > zMetaRow
QList< QList< QString > > zStringTable
QString ptrToString(void *ptr)
QString toLiterallyTrue(bool value)
QSharedPointer< QProcess > ZqProcessPtr
enum Zbl::logFileFormat LogFileFormat
Specifies the output format for Zuble log files.
QList< QList< QVariant > > zVariantTable
bool fromLiterallyTrue(const QString &value)
QSharedPointer< QString > ZqStringPtr
QSharedPointer< QFile > ZqFilePtr
logFileFormat
Specifies the output format for Zuble log files.
textSearchType
Specifies search case sensitivity.
QSharedPointer< QByteArray > ZqByteArrayPtr
bool inObjectThread(const QObject &object)
textSearchType zValidateSearchType(int searchType)
Validates an integer value to be type textSearchType and returns it or a valid default value if out o...
QSharedPointer< QIODevice > ZqIODevicePtr