[general] moving ios and android project under ./platform folder

This commit is contained in:
Petr Pokorny
2020-12-20 12:38:56 +01:00
parent 8e759a51e4
commit 41f0be34e7
9877 changed files with 141 additions and 2889 deletions

17
platform/qt/src/utf.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include <mbgl/util/utf.hpp>
#include <QString>
namespace mbgl {
namespace util {
std::u16string convertUTF8ToUTF16(std::string const& utf8) {
auto utf16 = QString::fromUtf8(utf8.data(), utf8.length());
// Newers Qt have QString::toStdU16String(), but this is how it is
// implemented. Do it here to keep compatibility with older versions.
return std::u16string(reinterpret_cast<const char16_t*>(utf16.utf16()), utf16.length());
}
} // namespace util
} // namespace mbgl