Changeset View
Changeset View
Standalone View
Standalone View
src/imageformats/ora.cpp
Show All 12 Lines | |||||
13 | #include "ora.h" | 13 | #include "ora.h" | ||
14 | 14 | | |||
15 | #include <QImage> | 15 | #include <QImage> | ||
16 | #include <QScopedPointer> | 16 | #include <QScopedPointer> | ||
17 | 17 | | |||
18 | #include <kzip.h> | 18 | #include <kzip.h> | ||
19 | 19 | | |||
20 | static constexpr char s_magic[] = "image/openraster"; | 20 | static constexpr char s_magic[] = "image/openraster"; | ||
21 | static constexpr int s_magic_size = strlen(s_magic); | 21 | static constexpr int s_magic_size = sizeof(s_magic) - 1; // -1 to remove the last \0 | ||
apol: Won't sizeof give the sizeof(char*)? | |||||
22 | 22 | | |||
23 | OraHandler::OraHandler() | 23 | OraHandler::OraHandler() | ||
24 | { | 24 | { | ||
25 | } | 25 | } | ||
26 | 26 | | |||
27 | bool OraHandler::canRead() const | 27 | bool OraHandler::canRead() const | ||
28 | { | 28 | { | ||
29 | if (canRead(device())) { | 29 | if (canRead(device())) { | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |
Won't sizeof give the sizeof(char*)?