Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Treat pattern name as UTF-8 when loading a .pat resource

Nicholas LaPointee29cf8b578c1
diff --git a/libs/pigment/resources/KoPattern.cpp b/libs/pigment/resources/KoPattern.cpp
index ffa5092b8b..ee3808bea7 100644
--- a/libs/pigment/resources/KoPattern.cpp
+++ b/libs/pigment/resources/KoPattern.cpp
@@ -117,7 +117,7 @@ bool KoPattern::loadPatFromDevice(QIODevice *dev)
}
// size -1 so we don't add the end 0 to the QString...
- QString newName = QString::fromLatin1(name, size -1);
+ QString newName = QString::fromUtf8(name, size - 1);
if (!newName.isEmpty()) { // if it's empty, it's better to leave the name that was there before (based on filename)
setName(newName);
}