diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/opengl/qopengl.cpp | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopenglengineshadermanager.cpp | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopenglfunctions.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qbrush.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 4 | ||||
-rw-r--r-- | src/gui/painting/qpaintengineex.cpp | 8 | ||||
-rw-r--r-- | src/gui/painting/qpdf.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qtransform.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontengine_qpf2.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qzip.cpp | 2 |
11 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp index c8d33df4ba..622e014746 100644 --- a/src/gui/opengl/qopengl.cpp +++ b/src/gui/opengl/qopengl.cpp @@ -128,7 +128,7 @@ QDebug operator<<(QDebug d, const QOpenGLConfig::Gpu &g) } enum Operator { NotEqual, LessThan, LessEqualThan, Equals, GreaterThan, GreaterEqualThan }; -static const char *operators[] = {"!=", "<", "<=", "=", ">", ">="}; +static const char operators[][3] = {"!=", "<", "<=", "=", ">", ">="}; static inline QString valueKey() { return QStringLiteral("value"); } static inline QString opKey() { return QStringLiteral("op"); } diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/gui/opengl/qopenglengineshadermanager.cpp index 853ad8b711..7e53c01cba 100644 --- a/src/gui/opengl/qopenglengineshadermanager.cpp +++ b/src/gui/opengl/qopenglengineshadermanager.cpp @@ -511,7 +511,7 @@ GLuint QOpenGLEngineShaderManager::getUniformLocation(Uniform id) if (uniformLocations.isEmpty()) uniformLocations.fill(GLuint(-1), NumUniforms); - static const char *uniformNames[] = { + static const char *const uniformNames[] = { "imageTexture", "patternColor", "globalOpacity", diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index c60532b90b..49926a4d93 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -3568,7 +3568,7 @@ void QOpenGLExtensions::flushShared() d->flushIsSufficientToSyncContexts = false; // default to false, not guaranteed by the spec const char *vendor = (const char *) glGetString(GL_VENDOR); if (vendor) { - static const char *flushEnough[] = { "Apple", "ATI", "Intel", "NVIDIA" }; + static const char *const flushEnough[] = { "Apple", "ATI", "Intel", "NVIDIA" }; for (size_t i = 0; i < sizeof(flushEnough) / sizeof(const char *); ++i) { if (strstr(vendor, flushEnough[i])) { d->flushIsSufficientToSyncContexts = true; diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index 5bf8387400..670717c5f1 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -999,7 +999,7 @@ bool QBrush::operator==(const QBrush &b) const */ QDebug operator<<(QDebug dbg, const QBrush &b) { - static const char *BRUSH_STYLES[] = { + static const char *const BRUSH_STYLES[] = { "NoBrush", "SolidPattern", "Dense1Pattern", diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 37f2de98b6..d34b2b9a44 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -675,7 +675,7 @@ QPixelLayout qPixelLayouts[QImage::NImageFormats] = { { 0, 0, 0, 0, 0, 0, 0, 0, false, QPixelLayout::BPP8, convertGrayscale8ToRGB32, convertGrayscale8FromARGB32PM, convertGrayscale8FromRGB32 } // Format_Grayscale8 }; -FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { +const FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { 0, // BPPNone fetchPixels<QPixelLayout::BPP1MSB>, // BPP1MSB fetchPixels<QPixelLayout::BPP1LSB>, // BPP1LSB @@ -685,7 +685,7 @@ FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount] = { fetchPixels<QPixelLayout::BPP32> // BPP32 }; -StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { +const StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { 0, // BPPNone storePixels<QPixelLayout::BPP1MSB>, // BPP1MSB storePixels<QPixelLayout::BPP1LSB>, // BPP1LSB @@ -697,7 +697,7 @@ StorePixelsFunc qStorePixels[QPixelLayout::BPPCount] = { typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index); -FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = { +static const FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = { 0, // BPPNone fetchPixel<QPixelLayout::BPP1MSB>, // BPP1MSB fetchPixel<QPixelLayout::BPP1LSB>, // BPP1LSB diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 0d391b2cec..66ef5949d9 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -1126,8 +1126,8 @@ typedef const uint *(QT_FASTCALL *FetchPixelsFunc)(uint *buffer, const uchar *sr typedef void (QT_FASTCALL *StorePixelsFunc)(uchar *dest, const uint *src, int index, int count); extern QPixelLayout qPixelLayouts[QImage::NImageFormats]; -extern FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount]; -extern StorePixelsFunc qStorePixels[QPixelLayout::BPPCount]; +extern const FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount]; +extern const StorePixelsFunc qStorePixels[QPixelLayout::BPPCount]; diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 0f80cd18a0..f00bc8d9df 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -238,7 +238,7 @@ bool QPaintEngineExPrivate::hasClipOperations() const * */ -static QPainterPath::ElementType qpaintengineex_ellipse_types[] = { +static const QPainterPath::ElementType qpaintengineex_ellipse_types[] = { QPainterPath::MoveToElement, QPainterPath::CurveToElement, QPainterPath::CurveToDataElement, @@ -257,7 +257,7 @@ static QPainterPath::ElementType qpaintengineex_ellipse_types[] = { QPainterPath::CurveToDataElement }; -static QPainterPath::ElementType qpaintengineex_line_types_16[] = { +static const QPainterPath::ElementType qpaintengineex_line_types_16[] = { QPainterPath::MoveToElement, QPainterPath::LineToElement, QPainterPath::MoveToElement, QPainterPath::LineToElement, QPainterPath::MoveToElement, QPainterPath::LineToElement, @@ -276,7 +276,7 @@ static QPainterPath::ElementType qpaintengineex_line_types_16[] = { QPainterPath::MoveToElement, QPainterPath::LineToElement }; -static QPainterPath::ElementType qpaintengineex_rect4_types_32[] = { +static const QPainterPath::ElementType qpaintengineex_rect4_types_32[] = { QPainterPath::MoveToElement, QPainterPath::LineToElement, QPainterPath::LineToElement, QPainterPath::LineToElement, // 1 QPainterPath::MoveToElement, QPainterPath::LineToElement, QPainterPath::LineToElement, QPainterPath::LineToElement, // 2 QPainterPath::MoveToElement, QPainterPath::LineToElement, QPainterPath::LineToElement, QPainterPath::LineToElement, // 3 @@ -312,7 +312,7 @@ static QPainterPath::ElementType qpaintengineex_rect4_types_32[] = { }; -static QPainterPath::ElementType qpaintengineex_roundedrect_types[] = { +static const QPainterPath::ElementType qpaintengineex_roundedrect_types[] = { QPainterPath::MoveToElement, QPainterPath::LineToElement, QPainterPath::CurveToElement, diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 3f2ebb92a0..6ea0800538 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -384,7 +384,7 @@ QByteArray QPdf::generateDashes(const QPen &pen) -static const char* pattern_for_brush[] = { +static const char* const pattern_for_brush[] = { 0, // NoBrush 0, // SolidPattern "0 J\n" diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp index 31d7a2300b..a3e9db2057 100644 --- a/src/gui/painting/qtransform.cpp +++ b/src/gui/painting/qtransform.cpp @@ -1078,7 +1078,7 @@ QDataStream & operator>>(QDataStream &s, QTransform &t) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QTransform &m) { - static const char *typeStr[] = + static const char *const typeStr[] = { "TxNone", "TxTranslate", diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp index 7e16983b6c..a678b4c8ea 100644 --- a/src/gui/text/qfontengine_qpf2.cpp +++ b/src/gui/text/qfontengine_qpf2.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE //#define DEBUG_HEADER //#define DEBUG_FONTENGINE -static QFontEngineQPF2::TagType tagTypes[QFontEngineQPF2::NumTags] = { +static const QFontEngineQPF2::TagType tagTypes[QFontEngineQPF2::NumTags] = { QFontEngineQPF2::StringType, // FontName QFontEngineQPF2::StringType, // FileName QFontEngineQPF2::UInt32Type, // FileIndex diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp index 9f561dcb02..edd3447357 100644 --- a/src/gui/text/qzip.cpp +++ b/src/gui/text/qzip.cpp @@ -670,7 +670,7 @@ void QZipReaderPrivate::scanFiles() void QZipWriterPrivate::addEntry(EntryType type, const QString &fileName, const QByteArray &contents/*, QFile::Permissions permissions, QZip::Method m*/) { #ifndef NDEBUG - static const char *entryTypes[] = { + static const char *const entryTypes[] = { "directory", "file ", "symlink " }; |