Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/mod_uploader/StarStringConversion.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/mod_uploader/StarStringConversion.hpp')
-rw-r--r--source/mod_uploader/StarStringConversion.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/mod_uploader/StarStringConversion.hpp b/source/mod_uploader/StarStringConversion.hpp
new file mode 100644
index 0000000..020398f
--- /dev/null
+++ b/source/mod_uploader/StarStringConversion.hpp
@@ -0,0 +1,20 @@
+#ifndef STAR_STRING_CONVERSION
+#define STAR_STRING_CONVERSION
+
+#include <QString>
+
+#include "StarString.hpp"
+
+namespace Star {
+
+inline String toSString(QString const& str) {
+ return String(str.toUtf8().data());
+}
+
+inline QString toQString(String const& str) {
+ return QString::fromUtf8(str.utf8Ptr(), str.utf8Size());
+}
+
+}
+
+#endif