parent
2b846461c8
commit
fbbaea3cd9
|
@ -4618,9 +4618,11 @@
|
|||
<define name="Q_DECL_IMPORT" value=""/>
|
||||
<define name="QT_DECLARE_DEPRECATED_TR_FUNCTIONS(context)" value="static inline QString trUtf8(const char *sourceText, const char *disambiguation = Q_NULLPTR, int n = -1) { return QCoreApplication::translate(#context, sourceText, disambiguation, n); }"/>
|
||||
<define name="Q_DECLARE_FLAGS(x,y)" value=""/>
|
||||
<define name="Q_DECLARE_LOGGING_CATEGORY(name)" value="extern const QLoggingCategory &name();"/>
|
||||
<define name="Q_DECLARE_OPERATORS_FOR_FLAGS(x)" value=""/>
|
||||
<define name="Q_DECLARE_METATYPE(x)" value=""/>
|
||||
<define name="Q_DECLARE_PRIVATE(Class)" value="inline Class##Private* d_func() { return reinterpret_cast<Class##Private*>(qGetPtrHelper(d_ptr)); } inline const Class##Private d_func() const { return reinterpret_cast<const Class##Private *>(qGetPtrHelper(d_ptr)); } friend class Class##Private;"/>
|
||||
<define name="Q_DECLARE_PRIVATE_D(Dptr, Class)" value="inline Class##Private* d_func() { return reinterpret_cast<Class##Private *>(qGetPtrHelper(Dptr)); } inline const Class##Private* d_func() const { return reinterpret_cast<const Class##Private *>(qGetPtrHelper(Dptr)); } friend class Class##Private;"/>
|
||||
<define name="Q_DECLARE_PUBLIC(Class)" value="inline Class##Public* d_func() { return reinterpret_cast<Class##Public*>(qGetPtrHelper(d_ptr)); } inline const Class##Public d_func() const { return reinterpret_cast<const Class##Public *>(qGetPtrHelper(d_ptr)); } friend class Class##Public;"/>
|
||||
<define name="Q_DECLARE_TR_FUNCTIONS(context)" value="public: static inline QString tr(const char *sourceText, const char *disambiguation = Q_NULLPTR, int n = -1) { return QCoreApplication::translate(#context, sourceText, disambiguation, n); } QT_DECLARE_DEPRECATED_TR_FUNCTIONS(context) private:"/>
|
||||
<define name="Q_DISABLE_COPY(C)" value="C(C&);C& operator=(const C&);"/>
|
||||
|
@ -4632,6 +4634,7 @@
|
|||
<define name="Q_LIKELY(expr)" value="expr"/>
|
||||
<define name="Q_NULLPTR" value="NULL"/>
|
||||
<define name="Q_OBJECT" value=""/>
|
||||
<define name="Q_PRIVATE_SLOT(d, signature)" value=""/>
|
||||
<define name="Q_PROPERTY(X)" value=""/>
|
||||
<define name="Q_Q(Class)" value="Class * const q = q_func()"/>
|
||||
<define name="Q_RETURN_ARG(type, data)" value="QReturnArgument<type >(#type, data)"/>
|
||||
|
@ -4673,6 +4676,8 @@
|
|||
<define name="QTC_CHECK(cond)" value="if (Q_LIKELY(cond)) {} else { QTC_ASSERT_STRING(#cond); } do {} while (0)"/>
|
||||
<define name="QTC_GUARD(cond)" value="((Q_LIKELY(cond)) ? true : (QTC_ASSERT_STRING(#cond), false))"/>
|
||||
<define name="Q_LOGGING_CATEGORY(name,...)" value=""/>
|
||||
<define name="QT_FORWARD_DECLARE_CLASS(name)" value="class name;"/>
|
||||
<define name="QT_FORWARD_DECLARE_STRUCT(name)" value="struct name;"/>
|
||||
<!-- https://doc.qt.io/qt-5/qstring.html#QStringLiteral -->
|
||||
<define name="QStringLiteral(str)" value="QString::fromUtf8(str, sizeof(str) - 1)"/>
|
||||
<!-- https://doc.qt.io/qt-5/qtglobal.html#qreal-typedef -->
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <QFile>
|
||||
#include <cstdio>
|
||||
#include <QCoreApplication>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
|
||||
void QString1(QString s)
|
||||
|
@ -399,6 +400,10 @@ void validCode(int * pIntPtr)
|
|||
if (Q_UNLIKELY(!pIntPtr)) {}
|
||||
|
||||
printf(QT_TR_NOOP("Hi"));
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(logging_category_test);
|
||||
QT_FORWARD_DECLARE_CLASS(forwardDeclaredClass);
|
||||
QT_FORWARD_DECLARE_STRUCT(forwardDeclaredStruct);
|
||||
}
|
||||
|
||||
void ignoredReturnValue()
|
||||
|
|
Loading…
Reference in New Issue