X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Fqstring_helpers.cpp;h=4f63167b4305f665e9cb04403b346a94054a73ee;hb=8d640dc77608bedddb5b00982c23665584f52d21;hp=ded445fc72992efb38f64486e2a7a9b5cc7da2a1;hpb=9f9d9500c0825020844da261eb2e86922355aedb;p=lyx.git diff --git a/src/support/qstring_helpers.cpp b/src/support/qstring_helpers.cpp index ded445fc72..4f63167b43 100644 --- a/src/support/qstring_helpers.cpp +++ b/src/support/qstring_helpers.cpp @@ -12,6 +12,9 @@ #include +#include "support/qstring_helpers.h" + +#include "support/debug.h" #include "support/docstring.h" #include @@ -19,6 +22,12 @@ namespace lyx { +LyXErr & operator<<(LyXErr & err, QString const & str) +{ + return err << fromqstr(str); +} + + QString toqstr(char const * str) { return QString::fromUtf8(str); @@ -34,6 +43,8 @@ QString toqstr(docstring const & ucs4) { // If possible we let qt do the work, since this version does not // need to be superfast. + if (ucs4.empty()) + return QString(); return QString::fromUcs4((uint const *)ucs4.data(), ucs4.length()); }