summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qimage.h')
-rw-r--r--src/gui/image/qimage.h58
1 files changed, 25 insertions, 33 deletions
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 55b8690c77..4ce99b9ab1 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -10,9 +10,9 @@
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -23,8 +23,8 @@
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
@@ -106,20 +106,16 @@ public:
Format_RGBX8888,
Format_RGBA8888,
Format_RGBA8888_Premultiplied,
-#if 0
- // reserved for future use
- Format_RGB15,
- Format_Grayscale16,
- Format_Grayscale8,
- Format_Grayscale4,
- Format_Grayscale4LSB,
- Format_Grayscale2,
- Format_Grayscale2LSB
-#endif
Format_BGR30,
Format_A2BGR30_Premultiplied,
Format_RGB30,
Format_A2RGB30_Premultiplied,
+ Format_Alpha8,
+ Format_Grayscale8,
+#if 0
+ // reserved for future use
+ Format_Grayscale16,
+#endif
#ifndef Q_QDOC
NImageFormats
#endif
@@ -155,7 +151,7 @@ public:
bool isNull() const;
- int devType() const;
+ int devType() const Q_DECL_OVERRIDE;
bool operator==(const QImage &) const;
bool operator!=(const QImage &) const;
@@ -224,7 +220,11 @@ public:
void setPixel(const QPoint &pt, uint index_or_rgb);
QVector<QRgb> colorTable() const;
- void setColorTable(const QVector<QRgb> colors); // ### Qt 6: remove const
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ void setColorTable(const QVector<QRgb> &colors);
+#else
+ void setColorTable(const QVector<QRgb> colors);
+#endif
qreal devicePixelRatio() const;
void setDevicePixelRatio(qreal scaleFactor);
@@ -288,7 +288,7 @@ public:
#endif
qint64 cacheKey() const;
- QPaintEngine *paintEngine() const;
+ QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
// Auxiliary data
int dotsPerMeterX() const;
@@ -321,7 +321,7 @@ public:
#endif
protected:
- virtual int metric(PaintDeviceMetric metric) const;
+ virtual int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
QImage mirrored_helper(bool horizontal, bool vertical) const;
QImage rgbSwapped_helper() const;
void mirrored_inplace(bool horizontal, bool vertical);
@@ -353,13 +353,9 @@ inline void QImage::setPixel(const QPoint &pt, uint index_or_rgb) { setPixel(pt.
#if QT_DEPRECATED_SINCE(5, 0)
-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#elif defined(Q_CC_MSVC)
-# pragma warning(push)
-# pragma warning(disable: 4996)
-#endif
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
+QT_WARNING_DISABLE_MSVC(4996)
inline QString QImage::text(const char* key, const char* lang) const
{
@@ -431,11 +427,7 @@ inline void QImage::setText(const char* key, const char* lang, const QString &s)
setText(k, 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(pop)
-#endif
+QT_WARNING_POP
inline int QImage::numColors() const
{