diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-12-14 10:20:26 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-16 22:26:37 +0100 |
commit | e6abf372c6c2514ec8d53fae13cc676d3b55dd00 (patch) | |
tree | 077c86556d3562df95d37f70a99c9bef541426e8 /src/gui | |
parent | de61c7880777c1d64553769f2f8a152483d5c17b (diff) |
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 <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimage.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 |