diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-02 10:59:52 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-05 22:26:49 +0000 |
commit | dbf7706413bb8d624ac17b24398eaf4ef542ed6b (patch) | |
tree | eef2343e4e3b8cdab2d0c126496b2583f884393a /src/gui/image | |
parent | 6b66108c1ffc48ee1dc06c4e25d9210bf2d41084 (diff) |
Replace Q_DECL_NOEXCEPT with noexcept in QtGui
Change-Id: I43803b88fea8083782d73ce157c466b022208740
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qbitmap.h | 2 | ||||
-rw-r--r-- | src/gui/image/qicon.cpp | 2 | ||||
-rw-r--r-- | src/gui/image/qicon.h | 8 | ||||
-rw-r--r-- | src/gui/image/qimage.cpp | 8 | ||||
-rw-r--r-- | src/gui/image/qimage.h | 14 | ||||
-rw-r--r-- | src/gui/image/qpicture.h | 4 | ||||
-rw-r--r-- | src/gui/image/qpixmap.h | 4 | ||||
-rw-r--r-- | src/gui/image/qpixmapcache.cpp | 2 | ||||
-rw-r--r-- | src/gui/image/qpixmapcache.h | 8 |
9 files changed, 26 insertions, 26 deletions
diff --git a/src/gui/image/qbitmap.h b/src/gui/image/qbitmap.h index f7895bb1e0..3cc360f670 100644 --- a/src/gui/image/qbitmap.h +++ b/src/gui/image/qbitmap.h @@ -61,7 +61,7 @@ public: QBitmap(const QBitmap &other) : QPixmap(other) {} // QBitmap(QBitmap &&other) : QPixmap(std::move(other)) {} // QPixmap doesn't, yet, have a move ctor QBitmap &operator=(const QBitmap &other) { QPixmap::operator=(other); return *this; } - QBitmap &operator=(QBitmap &&other) Q_DECL_NOTHROW { QPixmap::operator=(std::move(other)); return *this; } + QBitmap &operator=(QBitmap &&other) noexcept { QPixmap::operator=(std::move(other)); return *this; } ~QBitmap(); #endif diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index c3c4b24678..892a686c89 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -663,7 +663,7 @@ QFactoryLoader *qt_iconEngineFactoryLoader() /*! Constructs a null icon. */ -QIcon::QIcon() Q_DECL_NOEXCEPT +QIcon::QIcon() noexcept : d(0) { } diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h index 8870950982..0f834fc2cb 100644 --- a/src/gui/image/qicon.h +++ b/src/gui/image/qicon.h @@ -58,11 +58,11 @@ public: enum Mode { Normal, Disabled, Active, Selected }; enum State { On, Off }; - QIcon() Q_DECL_NOEXCEPT; + QIcon() noexcept; QIcon(const QPixmap &pixmap); QIcon(const QIcon &other); #ifdef Q_COMPILER_RVALUE_REFS - QIcon(QIcon &&other) Q_DECL_NOEXCEPT + QIcon(QIcon &&other) noexcept : d(other.d) { other.d = nullptr; } #endif @@ -71,10 +71,10 @@ public: ~QIcon(); QIcon &operator=(const QIcon &other); #ifdef Q_COMPILER_RVALUE_REFS - inline QIcon &operator=(QIcon &&other) Q_DECL_NOEXCEPT + inline QIcon &operator=(QIcon &&other) noexcept { swap(other); return *this; } #endif - inline void swap(QIcon &other) Q_DECL_NOEXCEPT + inline void swap(QIcon &other) noexcept { qSwap(d, other.d); } operator QVariant() const; diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 8b2db6d346..b49674644a 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -741,7 +741,7 @@ bool QImageData::checkForAlphaPixels() const \sa isNull() */ -QImage::QImage() Q_DECL_NOEXCEPT +QImage::QImage() noexcept : QPaintDevice() { d = 0; @@ -5552,7 +5552,7 @@ Q_STATIC_ASSERT(sizeof(pixelformats) / sizeof(*pixelformats) == QImage::NImageFo /*! Returns the QImage::Format as a QPixelFormat */ -QPixelFormat QImage::pixelFormat() const Q_DECL_NOTHROW +QPixelFormat QImage::pixelFormat() const noexcept { return toPixelFormat(format()); } @@ -5560,7 +5560,7 @@ QPixelFormat QImage::pixelFormat() const Q_DECL_NOTHROW /*! Converts \a format into a QPixelFormat */ -QPixelFormat QImage::toPixelFormat(QImage::Format format) Q_DECL_NOTHROW +QPixelFormat QImage::toPixelFormat(QImage::Format format) noexcept { Q_ASSERT(static_cast<int>(format) < NImageFormats); return pixelformats[format]; @@ -5569,7 +5569,7 @@ QPixelFormat QImage::toPixelFormat(QImage::Format format) Q_DECL_NOTHROW /*! Converts \a format into a QImage::Format */ -QImage::Format QImage::toImageFormat(QPixelFormat format) Q_DECL_NOTHROW +QImage::Format QImage::toImageFormat(QPixelFormat format) noexcept { for (int i = 0; i < NImageFormats; i++) { if (format == pixelformats[i]) diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h index af7e6988cb..a4ec7aa69b 100644 --- a/src/gui/image/qimage.h +++ b/src/gui/image/qimage.h @@ -137,7 +137,7 @@ public: }; Q_ENUM(Format) - QImage() Q_DECL_NOEXCEPT; + QImage() noexcept; QImage(const QSize &size, Format format); QImage(int width, int height, Format format); QImage(uchar *data, int width, int height, Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr); @@ -152,7 +152,7 @@ public: QImage(const QImage &); #ifdef Q_COMPILER_RVALUE_REFS - inline QImage(QImage &&other) Q_DECL_NOEXCEPT + inline QImage(QImage &&other) noexcept : QPaintDevice(), d(nullptr) { qSwap(d, other.d); } #endif @@ -160,10 +160,10 @@ public: QImage &operator=(const QImage &); #ifdef Q_COMPILER_RVALUE_REFS - inline QImage &operator=(QImage &&other) Q_DECL_NOEXCEPT + inline QImage &operator=(QImage &&other) noexcept { qSwap(d, other.d); return *this; } #endif - inline void swap(QImage &other) Q_DECL_NOEXCEPT + inline void swap(QImage &other) noexcept { qSwap(d, other.d); } bool isNull() const; @@ -341,9 +341,9 @@ public: QString text(const QString &key = QString()) const; void setText(const QString &key, const QString &value); - QPixelFormat pixelFormat() const Q_DECL_NOTHROW; - static QPixelFormat toPixelFormat(QImage::Format format) Q_DECL_NOTHROW; - static QImage::Format toImageFormat(QPixelFormat format) Q_DECL_NOTHROW; + QPixelFormat pixelFormat() const noexcept; + static QPixelFormat toPixelFormat(QImage::Format format) noexcept; + static QImage::Format toImageFormat(QPixelFormat format) noexcept; // Platform specific conversion functions #if defined(Q_OS_DARWIN) || defined(Q_QDOC) diff --git a/src/gui/image/qpicture.h b/src/gui/image/qpicture.h index ec7b4bd7e3..cac2ef5dfc 100644 --- a/src/gui/image/qpicture.h +++ b/src/gui/image/qpicture.h @@ -79,10 +79,10 @@ public: QPicture& operator=(const QPicture &p); #ifdef Q_COMPILER_RVALUE_REFS - inline QPicture &operator=(QPicture &&other) Q_DECL_NOEXCEPT + inline QPicture &operator=(QPicture &&other) noexcept { qSwap(d_ptr, other.d_ptr); return *this; } #endif - inline void swap(QPicture &other) Q_DECL_NOEXCEPT + inline void swap(QPicture &other) noexcept { d_ptr.swap(other.d_ptr); } void detach(); bool isDetached() const; diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h index 13c81f18d0..2103fcc58c 100644 --- a/src/gui/image/qpixmap.h +++ b/src/gui/image/qpixmap.h @@ -74,10 +74,10 @@ public: QPixmap &operator=(const QPixmap &); #ifdef Q_COMPILER_RVALUE_REFS - inline QPixmap &operator=(QPixmap &&other) Q_DECL_NOEXCEPT + inline QPixmap &operator=(QPixmap &&other) noexcept { qSwap(data, other.data); return *this; } #endif - inline void swap(QPixmap &other) Q_DECL_NOEXCEPT + inline void swap(QPixmap &other) noexcept { qSwap(data, other.data); } operator QVariant() const; diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index 66907bebd7..a41ec8f35c 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -176,7 +176,7 @@ bool QPixmapCache::Key::operator ==(const Key &key) const Otherwise, if pixmap was flushed, the key is no longer valid. \since 5.7 */ -bool QPixmapCache::Key::isValid() const Q_DECL_NOTHROW +bool QPixmapCache::Key::isValid() const noexcept { return d && d->isValid; } diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h index 12d05b00f3..c5bedb27ab 100644 --- a/src/gui/image/qpixmapcache.h +++ b/src/gui/image/qpixmapcache.h @@ -56,8 +56,8 @@ public: Key(); Key(const Key &other); #ifdef Q_COMPILER_RVALUE_REFS - Key(Key &&other) Q_DECL_NOTHROW : d(other.d) { other.d = nullptr; } - Key &operator =(Key &&other) Q_DECL_NOTHROW { swap(other); return *this; } + Key(Key &&other) noexcept : d(other.d) { other.d = nullptr; } + Key &operator =(Key &&other) noexcept { swap(other); return *this; } #endif ~Key(); bool operator ==(const Key &key) const; @@ -65,8 +65,8 @@ public: { return !operator==(key); } Key &operator =(const Key &other); - void swap(Key &other) Q_DECL_NOTHROW { qSwap(d, other.d); } - bool isValid() const Q_DECL_NOTHROW; + void swap(Key &other) noexcept { qSwap(d, other.d); } + bool isValid() const noexcept; private: KeyData *d; |