diff options
Diffstat (limited to 'src/corelib/text/qcollator_win.cpp')
-rw-r--r-- | src/corelib/text/qcollator_win.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/text/qcollator_win.cpp b/src/corelib/text/qcollator_win.cpp index 9d81de882f..54f57f1d24 100644 --- a/src/corelib/text/qcollator_win.cpp +++ b/src/corelib/text/qcollator_win.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Aleix Pol Gonzalez <aleixpol@kde.org> +** Copyright (C) 2020 Aleix Pol Gonzalez <aleixpol@kde.org> ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -89,6 +89,11 @@ void QCollatorPrivate::cleanup() int QCollator::compare(QStringView s1, QStringView s2) const { + if (!s1.size()) + return s2.size() ? -1 : 0; + if (!s2.size()) + return +1; + if (d->isC()) return s1.compare(s2, d->caseSensitivity); |