]> git.lyx.org Git - lyx.git/blobdiff - src/support/qstring_helpers.cpp
Use Common Number separator instead of European to detect numbers
[lyx.git] / src / support / qstring_helpers.cpp
index 1e421ca132552e08e624e8abfb22e27d336d85aa..4f63167b4305f665e9cb04403b346a94054a73ee 100644 (file)
@@ -12,7 +12,9 @@
 
 #include <config.h>
 
-#include "support/docstring.h"
+#include "support/qstring_helpers.h"
+
+#include "support/debug.h"
 #include "support/docstring.h"
 
 #include <QString>
 
 namespace lyx {
 
+LyXErr & operator<<(LyXErr & err, QString const & str)
+{
+       return err << fromqstr(str);
+}
+
+
 QString toqstr(char const * str)
 {
        return QString::fromUtf8(str);
@@ -35,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());
 }