Fix compilation

Summary:
Seems only gcc can do a constexpr with strlen.

This fixes the build with clang, hopefully to with MSVC?

Reviewers: svuorela

Reviewed By: svuorela

Subscribers: svuorela, apol, pino, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D20149
This commit is contained in:
Albert Astals Cid 2019-03-31 22:18:08 +02:00
parent fd4fb6f596
commit 83d1ca90d9
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@
#include <QFile>
static constexpr char s_magic[] = "application/x-krita";
static constexpr int s_magic_size = strlen(s_magic);
static constexpr int s_magic_size = sizeof(s_magic) - 1; // -1 to remove the last \0
KraHandler::KraHandler()
{

View File

@ -18,7 +18,7 @@
#include <kzip.h>
static constexpr char s_magic[] = "image/openraster";
static constexpr int s_magic_size = strlen(s_magic);
static constexpr int s_magic_size = sizeof(s_magic) - 1; // -1 to remove the last \0
OraHandler::OraHandler()
{