diff --git a/src/imageformats/kra.cpp b/src/imageformats/kra.cpp --- a/src/imageformats/kra.cpp +++ b/src/imageformats/kra.cpp @@ -18,6 +18,9 @@ #include #include +static constexpr char s_magic[] = "application/x-krita"; +static constexpr int s_magic_size = strlen(s_magic); + KraHandler::KraHandler() { } @@ -55,7 +58,7 @@ char buff[57]; if (device->peek(buff, sizeof(buff)) == sizeof(buff)) - return qstrcmp(buff + 0x26, "application/x-krita") == 0; + return memcmp(buff + 0x26, s_magic, s_magic_size) == 0; return false; } diff --git a/src/imageformats/ora.cpp b/src/imageformats/ora.cpp --- a/src/imageformats/ora.cpp +++ b/src/imageformats/ora.cpp @@ -17,6 +17,9 @@ #include +static constexpr char s_magic[] = "image/openraster"; +static constexpr int s_magic_size = strlen(s_magic); + OraHandler::OraHandler() { } @@ -54,7 +57,7 @@ char buff[54]; if (device->peek(buff, sizeof(buff)) == sizeof(buff)) - return qstrcmp(buff + 0x26, "image/openraster") == 0; + return memcmp(buff + 0x26, s_magic, s_magic_size) == 0; return false; }