diff options
| author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-03-30 14:49:56 +0300 |
|---|---|---|
| committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2025-03-30 14:49:56 +0300 |
| commit | 83b91bf9dbdde0bd51c1906168ad4b4ecef54420 (patch) | |
| tree | 6a2e96b4a41c72160a57696af0ede95bc29f55d6 | |
| parent | 1db38dc7d01e2b0567fc6d92c7aa58bfe69ce9c3 (diff) | |
| parent | 6b85f003930b2776684f114c139cec86fb9b9918 (diff) | |
Merge tag 'v5.15.18-lts' into tqtc/lts-5.15-opensourcev5.15.18-lts-lgpl5.15
Qt 5.15.18-lts release
Change-Id: I8544dfbea95d7cb4c987b52ea2ddfe7350b43dd1
| -rw-r--r-- | .qmake.conf | 2 | ||||
| -rw-r--r-- | src/designer/src/lib/shared/qdesigner_utils_p.h | 7 | ||||
| -rw-r--r-- | src/designer/src/lib/uilib/abstractformbuilder.cpp | 14 | ||||
| -rw-r--r-- | src/designer/src/lib/uilib/properties.cpp | 33 | ||||
| -rw-r--r-- | src/linguist/lrelease/lrelease.1 | 2 | ||||
| -rw-r--r-- | src/linguist/lupdate/lupdate.1 | 2 | ||||
| -rw-r--r-- | src/linguist/shared/numerus.cpp | 1 | ||||
| -rw-r--r-- | src/qdoc/tokenizer.h | 12 |
8 files changed, 46 insertions, 27 deletions
diff --git a/.qmake.conf b/.qmake.conf index 2d823f0b1..b8f617264 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) DEFINES += QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST -MODULE_VERSION = 5.15.17 +MODULE_VERSION = 5.15.18 diff --git a/src/designer/src/lib/shared/qdesigner_utils_p.h b/src/designer/src/lib/shared/qdesigner_utils_p.h index 38cb31c9d..b7ec3e37b 100644 --- a/src/designer/src/lib/shared/qdesigner_utils_p.h +++ b/src/designer/src/lib/shared/qdesigner_utils_p.h @@ -136,9 +136,10 @@ QString MetaEnum<IntType>::valueToKey(IntType value, bool *ok) const template <class IntType> IntType MetaEnum<IntType>::keyToValue(QString key, bool *ok) const { - if (!m_scope.isEmpty() && key.startsWith(m_scope)) - key.remove(0, m_scope.size() + m_separator.size()); - const typename KeyToValueMap::const_iterator it = m_keyToValueMap.find(key); + const auto lastSep = key.lastIndexOf(m_separator); + if (lastSep != -1) + key.remove(0, lastSep + m_separator.size()); + const auto it = m_keyToValueMap.find(key); const bool found = it != m_keyToValueMap.constEnd(); if (ok) *ok = found; diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp index 48f789687..948eae841 100644 --- a/src/designer/src/lib/uilib/abstractformbuilder.cpp +++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp @@ -798,19 +798,19 @@ static inline Qt::Alignment alignmentFromDom(const QString &in) if (!in.isEmpty()) { const auto flags = in.splitRef(QLatin1Char('|')); for (const auto &f : flags) { - if (f == QStringLiteral("Qt::AlignLeft")) { + if (f.endsWith(QLatin1String("::AlignLeft"))) { rc |= Qt::AlignLeft; - } else if (f == QStringLiteral("Qt::AlignRight")) { + } else if (f.endsWith(QLatin1String("::AlignRight"))) { rc |= Qt::AlignRight; - } else if (f == QStringLiteral("Qt::AlignHCenter")) { + } else if (f.endsWith(QLatin1String("::AlignHCenter"))) { rc |= Qt::AlignHCenter; - } else if (f == QStringLiteral("Qt::AlignJustify")) { + } else if (f.endsWith(QLatin1String("::AlignJustify"))) { rc |= Qt::AlignJustify; - } else if (f == QStringLiteral("Qt::AlignTop")) { + } else if (f.endsWith(QLatin1String("::AlignTop"))) { rc |= Qt::AlignTop; - } else if (f == QStringLiteral("Qt::AlignBottom")) { + } else if (f.endsWith(QLatin1String("::AlignBottom"))) { rc |= Qt::AlignBottom; - } else if (f == QStringLiteral("Qt::AlignVCenter")) { + } else if (f.endsWith(QLatin1String("::AlignVCenter"))) { rc |= Qt::AlignVCenter; } } diff --git a/src/designer/src/lib/uilib/properties.cpp b/src/designer/src/lib/uilib/properties.cpp index 0e18d3ca9..605383ca3 100644 --- a/src/designer/src/lib/uilib/properties.cpp +++ b/src/designer/src/lib/uilib/properties.cpp @@ -71,14 +71,30 @@ namespace QFormInternal { #endif -static inline void fixEnum(QString &s) +static QStringView fixEnum(QStringView s) { - int qualifierIndex = s.lastIndexOf(QLatin1Char(':')); - if (qualifierIndex == -1) - qualifierIndex = s.lastIndexOf(QLatin1Char('.')); - if (qualifierIndex != -1) - s.remove(0, qualifierIndex + 1); + qsizetype valuePos = s.lastIndexOf(u':'); // "E::A" -> 3 + if (valuePos == -1) + valuePos = s.lastIndexOf(u'.'); + return valuePos != -1 ? s.mid(valuePos + 1) : s; } + +// "QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok" +// -> "Cancel|Ok" +// ### FIXME Remove/check when QTBUG-118240 is fixed. +static inline QString fixFlags(QStringView s) +{ + QString result; + result.reserve(s.size()); + const auto flags = s.split(u'|'); + for (const auto &flag : flags) { + if (!result.isEmpty()) + result.append(u'|'); + result.append(fixEnum(flag)); + } + return result; +} + // Convert complex DOM types with the help of QAbstractFormBuilder QVariant domPropertyToVariant(QAbstractFormBuilder *afb,const QMetaObject *meta,const DomProperty *p) { @@ -118,17 +134,16 @@ QVariant domPropertyToVariant(QAbstractFormBuilder *afb,const QMetaObject *meta, const QMetaEnum e = meta->property(index).enumerator(); Q_ASSERT(e.isFlag() == true); - return QVariant(e.keysToValue(p->elementSet().toUtf8())); + return QVariant(e.keysToValue(fixFlags(p->elementSet()).toUtf8())); } case DomProperty::Enum: { const QByteArray pname = p->attributeName().toUtf8(); const int index = meta->indexOfProperty(pname); - QString enumValue = p->elementEnum(); + const QStringView enumValue = fixEnum(p->elementEnum()); // Triggers in case of objects in Designer like Spacer/Line for which properties // are serialized using language introspection. On preview, however, these objects are // emulated by hacks in the formbuilder (size policy/orientation) - fixEnum(enumValue); if (index == -1) { // ### special-casing for Line (QFrame) -- fix for 4.2. Jambi hack for enumerations if (!qstrcmp(meta->className(), "QFrame") diff --git a/src/linguist/lrelease/lrelease.1 b/src/linguist/lrelease/lrelease.1 index a82531ef5..f0aa9c85c 100644 --- a/src/linguist/lrelease/lrelease.1 +++ b/src/linguist/lrelease/lrelease.1 @@ -1,4 +1,4 @@ -.TH lrelease 1 "18 October 2001" "Digia Plc and/or its subsidiary(-ies)" \" -*- nroff -*- +.TH lrelease 1 "18 October 2001" "The Qt Company Ltd." \" -*- nroff -*- .\" .\" Copyright (C) 2016 The Qt Company Ltd. .\" Contact: https://www.qt.io/licensing/ diff --git a/src/linguist/lupdate/lupdate.1 b/src/linguist/lupdate/lupdate.1 index 1eaf03aed..11da49da9 100644 --- a/src/linguist/lupdate/lupdate.1 +++ b/src/linguist/lupdate/lupdate.1 @@ -1,4 +1,4 @@ -.TH lupdate 1 "18 October 2001" "Digia Plc and/or its subsidiary(-ies)" \" -*- nroff -*- +.TH lupdate 1 "18 October 2001" "The Qt Company Ltd." \" -*- nroff -*- .\" .\" Copyright (C) 2016 The Qt Company Ltd. .\" Contact: https://www.qt.io/licensing/ diff --git a/src/linguist/shared/numerus.cpp b/src/linguist/shared/numerus.cpp index 5b4895233..5e45cf381 100644 --- a/src/linguist/shared/numerus.cpp +++ b/src/linguist/shared/numerus.cpp @@ -176,6 +176,7 @@ static const QLocale::Language englishStyleLanguages[] = { QLocale::Friulian, QLocale::WesternFrisian, QLocale::Galician, + QLocale::Ganda, QLocale::Georgian, QLocale::German, QLocale::Greek, diff --git a/src/qdoc/tokenizer.h b/src/qdoc/tokenizer.h index 64f188f07..104e8efbf 100644 --- a/src/qdoc/tokenizer.h +++ b/src/qdoc/tokenizer.h @@ -177,12 +177,14 @@ private: void init(); void start(const Location &loc); /* - This limit on the length of a lexeme seems fairly high, but a - doc comment can be arbitrarily long. The previous 65,536 limit - was reached by Mark Summerfield. - */ - enum { yyLexBufSize = 524288 }; + Represents the maximum amount of characters that a token can be composed + of. + When a token with more characters than the maximum amount is encountered, a + warning is issued and parsing continues, discarding all characters from the + currently parsed token that don't fit into the buffer. + */ + enum { yyLexBufSize = 1048576 }; int getch() { return yyPos == yyIn.size() ? EOF : yyIn[yyPos++]; } inline int getChar() |
