From e6abf372c6c2514ec8d53fae13cc676d3b55dd00 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 14 Dec 2013 10:20:26 -0800 Subject: [PATCH] Use #pragma warning(push) and pop to control our warnings Using "default" means "reset to default compiler settings", not "revert to command-line settings". And even if it did, it's possible some other headers by the user toggled the settings. We shouldn't affect that. Task-number: QTBUG-35622 Change-Id: If7c4bd0cc8c210f88ee89e3fa2dd3b7194ad77bb Reviewed-by: Friedemann Kleint --- src/gui/image/qimage.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h index 02f0c18243..bc7f3729ad 100644 --- a/src/gui/image/qimage.h +++ b/src/gui/image/qimage.h @@ -327,6 +327,7 @@ inline void QImage::setPixel(const QPoint &pt, uint index_or_rgb) { setPixel(pt. # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #elif defined(Q_CC_MSVC) +# pragma warning(push) # pragma warning(disable: 4996) #endif @@ -403,7 +404,7 @@ inline void QImage::setText(const char* key, const char* lang, const QString &s) #if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) # pragma GCC diagnostic pop #elif defined(Q_CC_MSVC) -# pragma warning(default: 4996) +# pragma warning(pop) #endif inline int QImage::numColors() const