diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/doc/qtcore.qdocconf | 1 | ||||
-rw-r--r-- | src/corelib/io/qstorageinfo_unix.cpp | 4 | ||||
-rw-r--r-- | src/corelib/time/qdatetimeparser.cpp | 27 | ||||
-rw-r--r-- | src/corelib/tools/qunicodetools.cpp | 2 |
4 files changed, 19 insertions, 15 deletions
diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf index 85dcde4607..15b1925e51 100644 --- a/src/corelib/doc/qtcore.qdocconf +++ b/src/corelib/doc/qtcore.qdocconf @@ -1,4 +1,5 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) +include($QT_INSTALL_DOCS/config/exampleurl-qtbase.qdocconf) project = QtCore description = Qt Core Reference Documentation diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp index b6413d7902..4669c20711 100644 --- a/src/corelib/io/qstorageinfo_unix.cpp +++ b/src/corelib/io/qstorageinfo_unix.cpp @@ -220,7 +220,7 @@ static bool shouldIncludeFs(const QStorageIterator &it) return false; } -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID) if (it.fileSystemType() == "rootfs") return false; #endif @@ -849,7 +849,7 @@ QList<QStorageInfo> QStorageInfoPrivate::mountedVolumes() info.d->device = it.device(); info.d->fileSystemType = it.fileSystemType(); info.d->subvolume = it.subvolume(); - if (info.bytesTotal() == 0) + if (info.bytesTotal() == 0 && info != root()) continue; volumes.append(info); } diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp index 728b066db1..fc369bae75 100644 --- a/src/corelib/time/qdatetimeparser.cpp +++ b/src/corelib/time/qdatetimeparser.cpp @@ -621,11 +621,11 @@ int QDateTimeParser::sectionMaxSize(Section s, int count) const case LastSection: return 0; case AmPmSection: { - const int lowerMax = qMin(getAmPmText(AmText, LowerCase).size(), + const int lowerMax = qMax(getAmPmText(AmText, LowerCase).size(), getAmPmText(PmText, LowerCase).size()); - const int upperMax = qMin(getAmPmText(AmText, UpperCase).size(), + const int upperMax = qMax(getAmPmText(AmText, UpperCase).size(), getAmPmText(PmText, UpperCase).size()); - return qMin(4, qMin(lowerMax, upperMax)); + return qMax(lowerMax, upperMax); } case Hour24Section: @@ -1664,13 +1664,16 @@ QDateTimeParser::findTimeZone(QStringRef str, const QDateTime &when, /*! \internal - Returns - AM if str == tr("AM") - PM if str == tr("PM") - PossibleAM if str can become tr("AM") - PossiblePM if str can become tr("PM") - PossibleBoth if str can become tr("PM") and can become tr("AM") - Neither if str can't become anything sensible + Compares str to the am/pm texts returned by getAmPmText(). + Returns AM or PM if str is one of those texts. Failing that, it looks to see + whether, ignoring spaces and case, each character of str appears in one of + the am/pm texts. + If neither text can be the result of the user typing more into str, returns + Neither. If both texts are possible results of further typing, returns + PossibleBoth. Otherwise, only one of them is a possible completion, so this + returns PossibleAM or PossiblePM to indicate which. + + \sa getAmPmText() */ QDateTimeParser::AmPmFinder QDateTimeParser::findAmPm(QString &str, int sectionIndex, int *used) const { @@ -1699,10 +1702,10 @@ QDateTimeParser::AmPmFinder QDateTimeParser::findAmPm(QString &str, int sectionI QDTPDEBUG << "findAmPm" << str << ampm[0] << ampm[1]; - if (str.indexOf(ampm[amindex], 0, Qt::CaseInsensitive) == 0) { + if (str.startsWith(ampm[amindex], Qt::CaseInsensitive)) { str = ampm[amindex]; return AM; - } else if (str.indexOf(ampm[pmindex], 0, Qt::CaseInsensitive) == 0) { + } else if (str.startsWith(ampm[pmindex], Qt::CaseInsensitive)) { str = ampm[pmindex]; return PM; } else if (context == FromString || (str.count(space) == 0 && str.size() >= size)) { diff --git a/src/corelib/tools/qunicodetools.cpp b/src/corelib/tools/qunicodetools.cpp index d14118abf7..08e1146c59 100644 --- a/src/corelib/tools/qunicodetools.cpp +++ b/src/corelib/tools/qunicodetools.cpp @@ -327,7 +327,7 @@ static const uchar breakTable[BAfter + 1][QUnicodeTables::NumSentenceBreakClasse // Any CR LF Sep Extend Sp Lower Upper OLetter Numeric ATerm SContinue STerm Close { Initial, BAfterC, BAfter , BAfter , Initial, Initial, Lower , Upper , Initial, Initial, ATerm , Initial, STerm , Initial }, // Initial { Initial, BAfterC, BAfter , BAfter , Lower , Initial, Initial, Initial, Initial, Initial, LUATerm, Initial, STerm , Initial }, // Lower - { Initial, BAfterC, BAfter , BAfter , Upper , Initial, Initial, Upper , Initial, Initial, LUATerm, STerm , STerm , Initial }, // Upper + { Initial, BAfterC, BAfter , BAfter , Upper , Initial, Initial, Upper , Initial, Initial, LUATerm, Initial, STerm , Initial }, // Upper { Lookup , BAfterC, BAfter , BAfter , LUATerm, ACS , Initial, Upper , Break , Initial, ATerm , STerm , STerm , ATermC }, // LUATerm { Lookup , BAfterC, BAfter , BAfter , ATerm , ACS , Initial, Break , Break , Initial, ATerm , STerm , STerm , ATermC }, // ATerm |