OSDN Git Service

use proper types for XPM RGB colors table and color map in XPM handler
authorIvailo Monev <xakepa10@gmail.com>
Wed, 2 Feb 2022 03:59:18 +0000 (05:59 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 2 Feb 2022 03:59:18 +0000 (05:59 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/image/qxpmhandler.cpp

index f0f5a22..f327533 100644 (file)
@@ -47,7 +47,7 @@ static quint64 xpmHash(const char *str)
 #define QRGB(r,g,b) (r*65536 + g*256 + b)
 
 static const struct XPMRGBData {
-    const uint value;
+    const QRgb value;
     const char *name;
 } xpmRgbTbl[] = {
   { QRGB(240,248,255),  "aliceblue" },
@@ -782,7 +782,7 @@ static bool read_xpm_body(
     if (cpp < 0 || cpp > 15)
         return false;
 
-    QMap<quint64, int> colorMap;
+    QMap<quint64, QRgb> colorMap;
     bool hasTransparency = false;
     QByteArray buf(200, 0);