Use QT_WARNING_.. instead of #pragma GCC diagnostic ..
Change-Id: I0bb55a7f1074f3b8d6fb681b1d4dab5105ae7569 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
237cb0d082
commit
3a845e4b4f
@ -38,10 +38,8 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
||||
#endif
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
|
||||
|
||||
const QArrayData QArrayData::shared_null[2] = {
|
||||
{ Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared null
|
||||
@ -52,9 +50,7 @@ static const QArrayData qt_array[3] = {
|
||||
{ { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, sizeof(QArrayData) }, // unsharable empty
|
||||
/* zero initialized terminator */};
|
||||
|
||||
#if defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
QT_WARNING_POP
|
||||
|
||||
static const QArrayData &qt_array_empty = qt_array[0];
|
||||
static const QArrayData &qt_array_unsharable_empty = qt_array[1];
|
||||
|
@ -1104,18 +1104,14 @@ QFontEngine *QWindowsFontDatabase::fontEngine(const QByteArray &fontData, qreal
|
||||
GUID guid;
|
||||
CoCreateGuid(&guid);
|
||||
|
||||
#ifdef Q_CC_GNU
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wstrict-aliasing")
|
||||
QString uniqueFamilyName = QLatin1Char('f')
|
||||
+ QString::number(guid.Data1, 36) + QLatin1Char('-')
|
||||
+ QString::number(guid.Data2, 36) + QLatin1Char('-')
|
||||
+ QString::number(guid.Data3, 36) + QLatin1Char('-')
|
||||
+ QString::number(*reinterpret_cast<quint64 *>(guid.Data4), 36);
|
||||
#ifdef Q_CC_GNU
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
QT_WARNING_POP
|
||||
|
||||
QString actualFontName = font.changeFamilyName(uniqueFamilyName);
|
||||
if (actualFontName.isEmpty()) {
|
||||
|
@ -39,14 +39,12 @@
|
||||
# define DC_COLLATE 22
|
||||
#endif
|
||||
|
||||
#if defined (Q_CC_MINGW)
|
||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
||||
QT_WARNING_DISABLE_GCC("-Wsign-compare")
|
||||
|
||||
extern qreal qt_pointMultiplier(QPageLayout::Unit unit);
|
||||
|
||||
static inline uint qwcsnlen(const wchar_t *str, uint maxlen)
|
||||
|
@ -58,8 +58,9 @@
|
||||
- (NSString *)nameForLegacyLogging;
|
||||
@end
|
||||
|
||||
#pragma GCC diagnostic push // Ignore XCTestProbe deprecation
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
QT_WARNING_PUSH
|
||||
// Ignore XCTestProbe deprecation
|
||||
QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
@ -498,4 +499,4 @@ bool QXcodeTestLogger::isActive()
|
||||
return s_currentTestLogger;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
QT_WARNING_POP
|
||||
|
Loading…
x
Reference in New Issue
Block a user