OSDN Git Service

rename qt_read_xpm_image_or_array() so that the function name implies what it does
authorIvailo Monev <xakepa10@gmail.com>
Wed, 6 Jan 2021 10:04:45 +0000 (12:04 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 6 Jan 2021 10:04:45 +0000 (12:04 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/image/qimage.cpp
src/gui/image/qxpmhandler.cpp

index ba3bf0c..7fe47ab 100644 (file)
@@ -810,7 +810,7 @@ QImage::QImage(const char *fileName, const char *format)
 #endif
 
 #ifndef QT_NO_IMAGEFORMAT_XPM
-extern bool qt_read_xpm_image_or_array(const char * const *source, QImage &image);
+extern bool qt_read_xpm_array(const char * const *source, QImage &image);
 
 /*!
     Constructs an image from the given \a xpm image.
@@ -834,7 +834,7 @@ QImage::QImage(const char * const xpm[])
 {
     if (Q_UNLIKELY(!xpm))
         return;
-    if (Q_UNLIKELY(!qt_read_xpm_image_or_array(xpm, *this)))
+    if (Q_UNLIKELY(!qt_read_xpm_array(xpm, *this)))
         // Issue: Warning because the constructor may be ambigious
         qWarning("QImage::QImage(), XPM is not supported");
 }
index 23d1aa3..b67c677 100644 (file)
@@ -977,11 +977,10 @@ static bool read_xpm_body(
 //
 // INTERNAL
 //
-// Reads an .xpm from either the QImageIO or from the QString *.
-// One of the two HAS to be 0, the other one is used.
+// Reads an .xpm from characters array
 //
 
-bool qt_read_xpm_image_or_array(const char * const * source, QImage &image)
+bool qt_read_xpm_array(const char * const * source, QImage &image)
 {
     if (!source)
         return true;