diff options
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 5b25c97..4c0b154 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -803,11 +803,10 @@ QString QLocale::quoteString(const QStringRef &str, QuotationStyle style) const #ifndef QT_NO_SYSTEMLOCALE if (d() == systemPrivate()) { QVariant res; - if (style == QLocale::StandardQuotation) - res = systemLocale()->query(QSystemLocale::StringToStandardQuotation, QVariant::fromValue(str)); - else + if (style == QLocale::AlternateQuotation) res = systemLocale()->query(QSystemLocale::StringToAlternateQuotation, QVariant::fromValue(str)); - + if (res.isNull() || style == QLocale::StandardQuotation) + res = systemLocale()->query(QSystemLocale::StringToStandardQuotation, QVariant::fromValue(str)); if (!res.isNull()) return res.toString(); } |