Changeset View
Changeset View
Standalone View
Standalone View
src/imageformats/kra.cpp
Show All 13 Lines | |||||
14 | 14 | | |||
15 | #include <kzip.h> | 15 | #include <kzip.h> | ||
16 | 16 | | |||
17 | #include <QImage> | 17 | #include <QImage> | ||
18 | #include <QIODevice> | 18 | #include <QIODevice> | ||
19 | #include <QFile> | 19 | #include <QFile> | ||
20 | 20 | | |||
21 | static constexpr char s_magic[] = "application/x-krita"; | 21 | static constexpr char s_magic[] = "application/x-krita"; | ||
22 | static constexpr int s_magic_size = strlen(s_magic); | 22 | static constexpr int s_magic_size = sizeof(s_magic) - 1; // -1 to remove the last \0 | ||
23 | 23 | | |||
24 | KraHandler::KraHandler() | 24 | KraHandler::KraHandler() | ||
25 | { | 25 | { | ||
26 | } | 26 | } | ||
27 | 27 | | |||
28 | bool KraHandler::canRead() const | 28 | bool KraHandler::canRead() const | ||
29 | { | 29 | { | ||
30 | if (canRead(device())) { | 30 | if (canRead(device())) { | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |