summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qplatformfontdatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qplatformfontdatabase.cpp')
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index 599b18ac05..4ad826e87b 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -45,6 +45,7 @@
#include <qpa/qplatformscreen.h>
#include <QtCore/QLibraryInfo>
#include <QtCore/QDir>
+#include <QtCore/QMetaEnum>
#include <algorithm>
#include <iterator>
@@ -201,6 +202,26 @@ QSupportedWritingSystems &QSupportedWritingSystems::operator=(const QSupportedWr
return *this;
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug debug, const QSupportedWritingSystems &sws)
+{
+ QMetaObject mo = QFontDatabase::staticMetaObject;
+ QMetaEnum me = mo.enumerator(mo.indexOfEnumerator("WritingSystem"));
+
+ QDebugStateSaver saver(debug);
+ debug.nospace() << "QSupportedWritingSystems(";
+ int i = sws.d->vector.indexOf(true);
+ while (i > 0) {
+ debug << me.valueToKey(i);
+ i = sws.d->vector.indexOf(true, i + 1);
+ if (i > 0)
+ debug << ", ";
+ }
+ debug << ")";
+ return debug;
+}
+#endif
+
/*!
Destroys the supported writing systems object.
*/