qt.cfg: Added support for Q_DECLARE_PUBLIC()-macro.

This commit is contained in:
Martin Ettl 2019-02-27 15:38:31 +01:00
parent 17c1733b0e
commit fe402498e1
2 changed files with 2 additions and 1 deletions

View File

@ -1336,6 +1336,7 @@
<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&lt;Class##Private*&gt;(qGetPtrHelper(d_ptr)); } inline const Class##Private d_func() const { return reinterpret_cast&lt;const Class##Private *&gt;(qGetPtrHelper(d_ptr)); } friend class Class##Private;"/>
<define name="Q_DECLARE_PUBLIC(Class)" value="inline Class##Public* d_func() { return reinterpret_cast&lt;Class##Public*&gt;(qGetPtrHelper(d_ptr)); } inline const Class##Public d_func() const { return reinterpret_cast&lt;const Class##Public *&gt;(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&amp;);C&amp; operator=(const C&amp;);"/>
<define name="Q_ENUM(X)" value=""/>

View File

@ -24,7 +24,7 @@ void ignoreleak(void)
void memleak_asprintf(char **ptr, const char *fmt, const int arg)
{
// No warning is expected for
// No warning is expected for
if (-1 != asprintf(ptr,fmt,arg)) {
free(ptr);
}