diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index e1d9858a66..4d2b36632f 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -138,7 +138,7 @@ inline QChar QDirPrivate::getFilterSepChar(const QString &nameFilter) // static inline QStringList QDirPrivate::splitFilters(const QString &nameFilter, QChar sep) { - if (sep == 0) + if (sep.isNull()) sep = getFilterSepChar(nameFilter); QStringList ret = nameFilter.split(sep); for (int i = 0; i < ret.count(); ++i) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index e3a3cc79c6..ea220ed557 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -1509,7 +1509,7 @@ QString::QString(const QChar *unicode, int size) } else { if (size < 0) { size = 0; - while (unicode[size] != 0) + while (!unicode[size].isNull()) ++size; } if (!size) {