qdoc: Ignore Q_COMPILER_REF_QUALIFIERS for now

Q_COMPILER_REF_QUALIFIERS is not yet supported
on all platforms, so clangqdoc must ignore
functions that are defined only when it is
defined. This change adds  && !defined(Q_CLANG_QDOC)
to some #if defined(Q_COMPILER_REF_QUALIFIERS) tests
to allow clangqdoc to use old declarations.

Note that Q_CLANG_QDOC should also be used instead
of Q_QDOC from now on, so that we know that uses
of Q_QDOC have been examined to see if they are
still required for clangqdoc.

Change-Id: I910be70df63eca09985728c7b9eba473aed141ba
Reviewed-by: Martin Smith <martin.smith@qt.io>
bb10
Martin Smith 2016-09-22 10:04:30 +02:00
parent 128748d6fe
commit c27750ea2b
3 changed files with 5 additions and 4 deletions

View File

@ -252,7 +252,7 @@ public:
void truncate(int pos);
void chop(int n);
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP)
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC)
# if defined(Q_CC_GNU)
// required due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61941
# pragma push_macro("Q_REQUIRED_RESULT")

View File

@ -1641,7 +1641,7 @@ QString::QString(QChar ch)
\internal
*/
/*! \fn QString &QString::operator=(const Null &)
/*! \fn QString &QString::operator=(const QString::Null &)
\internal
*/
@ -4887,6 +4887,7 @@ QString QString::fromUcs4(const uint *unicode, int size)
return QUtf32::convertToUnicode((const char *)unicode, size*4, 0);
}
/*!
Resizes the string to \a size characters and copies \a unicode
into the string.

View File

@ -397,7 +397,7 @@ public:
QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const Q_REQUIRED_RESULT;
QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const Q_REQUIRED_RESULT;
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP)
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC)
# if defined(Q_CC_GNU)
// required due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61941
# pragma push_macro("Q_REQUIRED_RESULT")
@ -522,7 +522,7 @@ public:
const ushort *utf16() const;
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP)
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC)
QByteArray toLatin1() const & Q_REQUIRED_RESULT
{ return toLatin1_helper(*this); }
QByteArray toLatin1() && Q_REQUIRED_RESULT