summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorABBAPOH <ABBAPOH@nextmail.ru>2013-12-01 12:44:48 +0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-02 09:21:18 +0100
commit4d1b0a0d58d90eddfe5242cb3b3b6ca68b8b2077 (patch)
tree806f8f314a05fcc5f1a9a0c5fc262f1b38efab6c
parent441639970acf93def7d7425f5557dc29164cc560 (diff)
Add QByteArrayliterals to QDDSHandler
Change-Id: I9785fecffad5c82bacb846ba1d4dcdfda9af168b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--src/plugins/imageformats/dds/qddshandler.cpp12
-rw-r--r--src/plugins/imageformats/dds/qddshandler.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/imageformats/dds/qddshandler.cpp b/src/plugins/imageformats/dds/qddshandler.cpp
index 899ad11..4d4d9d9 100644
--- a/src/plugins/imageformats/dds/qddshandler.cpp
+++ b/src/plugins/imageformats/dds/qddshandler.cpp
@@ -1229,6 +1229,11 @@ QDDSHandler::QDDSHandler() :
{
}
+QByteArray QDDSHandler::name() const
+{
+ return QByteArrayLiteral("dds");
+}
+
bool QDDSHandler::canRead() const
{
if (canRead(device())) {
@@ -1328,11 +1333,6 @@ bool QDDSHandler::jumpToImage(int imageNumber)
return true;
}
-QByteArray QDDSHandler::name() const
-{
- return "dds";
-}
-
bool QDDSHandler::canRead(QIODevice *device)
{
if (!device) {
@@ -1343,7 +1343,7 @@ bool QDDSHandler::canRead(QIODevice *device)
if (device->isSequential())
return false;
- return device->peek(4) == "DDS ";
+ return device->peek(4) == QByteArrayLiteral("DDS ");
}
bool QDDSHandler::ensureHeaderCached() const
diff --git a/src/plugins/imageformats/dds/qddshandler.h b/src/plugins/imageformats/dds/qddshandler.h
index 5142bb7..70f2df1 100644
--- a/src/plugins/imageformats/dds/qddshandler.h
+++ b/src/plugins/imageformats/dds/qddshandler.h
@@ -53,6 +53,8 @@ class QDDSHandler : public QImageIOHandler
public:
QDDSHandler();
+ QByteArray name() const;
+
bool canRead() const;
bool read(QImage *image);
bool write(const QImage &image);
@@ -60,8 +62,6 @@ public:
int imageCount() const;
bool jumpToImage(int imageNumber);
- QByteArray name() const;
-
static bool canRead(QIODevice *device);
private: