diff options
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/accessible/linux/qspimatchrulematcher.cpp | 9 | ||||
| -rw-r--r-- | src/gui/configure.cmake | 33 | ||||
| -rw-r--r-- | src/gui/painting/qcolorspace.cpp | 2 | ||||
| -rw-r--r-- | src/gui/text/qfont.cpp | 4 |
4 files changed, 36 insertions, 12 deletions
diff --git a/src/gui/accessible/linux/qspimatchrulematcher.cpp b/src/gui/accessible/linux/qspimatchrulematcher.cpp index d7047ad3e0e..48357f7ae63 100644 --- a/src/gui/accessible/linux/qspimatchrulematcher.cpp +++ b/src/gui/accessible/linux/qspimatchrulematcher.cpp @@ -23,11 +23,11 @@ QSpiMatchRuleMatcher::QSpiMatchRuleMatcher(const QSpiMatchRule &matchRule) m_interfaceMatchType(matchRule.interfaceMatchType) { // extract roles encoded in bitset stored in multiple 32 bit integers - std::unordered_set<AtspiRole> atSpiRoles; - for (int i = 0; i < matchRule.roles.size(); ++i) { + for (qsizetype i = 0; i < matchRule.roles.size(); ++i) { + const auto role = matchRule.roles.at(i); for (int j = 0; j < 32; j++) { - if (matchRule.roles.at(i) & (1 << j)) { - const int atspiRole = i * 32 + j; + if (role & (1 << j)) { + const auto atspiRole = i * 32 + j; if (atspiRole < ATSPI_ROLE_LAST_DEFINED) m_roles.insert(AtspiRole(atspiRole)); else @@ -38,6 +38,7 @@ QSpiMatchRuleMatcher::QSpiMatchRuleMatcher(const QSpiMatchRule &matchRule) } // use qualified interface names to match what accessibleInterfaces() returns + m_interfaces.reserve(matchRule.interfaces.size()); for (const QString &ifaceName : matchRule.interfaces) m_interfaces.push_back("org.a11y.atspi."_L1 + ifaceName); } diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index dac2d072e42..b14f7e74ad2 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -30,6 +30,7 @@ set_property(CACHE INPUT_libpng PROPERTY STRINGS undefined no qt system) #### Libraries qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS OR HURD) +qt_feature_vcpkg_scope(gui) qt_find_package(ATSPI2 MODULE PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_LIB atspi) qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb) qt_find_package(Libdrm MODULE PROVIDED_TARGETS Libdrm::Libdrm MODULE_NAME gui QMAKE_LIB drm) @@ -39,15 +40,26 @@ qt_find_package(PlatformGraphics qt_find_package(EGL MODULE PROVIDED_TARGETS EGL::EGL MODULE_NAME gui QMAKE_LIB egl) qt_find_package(WrapSystemFreetype 2.2.0 MODULE - PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype MODULE_NAME gui QMAKE_LIB freetype) + PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype MODULE_NAME gui QMAKE_LIB freetype + VCPKG_PORT freetype + VCPKG_ADD_TO_FEATURE freetype +) if(QT_FEATURE_system_zlib) qt_add_qmake_lib_dependency(freetype zlib) endif() -qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig) +qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui + QMAKE_LIB fontconfig + VCPKG_PORT fontconfig + VCPKG_ADD_TO_FEATURE fontconfig + VCPKG_PLATFORM "linux" +) qt_add_qmake_lib_dependency(fontconfig freetype) qt_find_package(gbm MODULE PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm) qt_find_package(WrapSystemHarfbuzz 2.6.0 MODULE - PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz) + PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz + VCPKG_PORT harfbuzz + VCPKG_ADD_TO_FEATURE harfbuzz +) qt_find_package(Libinput MODULE PROVIDED_TARGETS Libinput::Libinput MODULE_NAME gui QMAKE_LIB libinput) qt_find_package_extend_sbom(TARGETS Libinput::Libinput @@ -61,11 +73,20 @@ qt_find_package_extend_sbom(TARGETS Libinput::Libinput "Copyright © 2013-2015 Red Hat, Inc." ) qt_find_package(WrapSystemJpeg MODULE - PROVIDED_TARGETS WrapSystemJpeg::WrapSystemJpeg MODULE_NAME gui QMAKE_LIB libjpeg) + PROVIDED_TARGETS WrapSystemJpeg::WrapSystemJpeg MODULE_NAME gui QMAKE_LIB libjpeg + VCPKG_PORT libjpeg-turbo + VCPKG_ADD_TO_FEATURE jpeg +) qt_find_package(WrapSystemMd4c MODULE - PROVIDED_TARGETS WrapSystemMd4c::WrapSystemMd4c MODULE_NAME gui QMAKE_LIB libmd4c) + PROVIDED_TARGETS WrapSystemMd4c::WrapSystemMd4c MODULE_NAME gui QMAKE_LIB libmd4c + VCPKG_PORT md4c + VCPKG_ADD_TO_FEATURE textmarkdownreader +) qt_find_package(WrapSystemPNG MODULE - PROVIDED_TARGETS WrapSystemPNG::WrapSystemPNG MODULE_NAME gui QMAKE_LIB libpng) + PROVIDED_TARGETS WrapSystemPNG::WrapSystemPNG MODULE_NAME gui QMAKE_LIB libpng + VCPKG_PORT libpng + VCPKG_ADD_TO_FEATURE png +) if(QT_FEATURE_system_zlib) qt_add_qmake_lib_dependency(libpng zlib) endif() diff --git a/src/gui/painting/qcolorspace.cpp b/src/gui/painting/qcolorspace.cpp index 9149971b999..680bdef3ac9 100644 --- a/src/gui/painting/qcolorspace.cpp +++ b/src/gui/painting/qcolorspace.cpp @@ -1205,9 +1205,9 @@ QByteArray QColorSpace::iccProfile() const */ QColorSpace QColorSpace::fromIccProfile(const QByteArray &iccProfile) { + QColorSpace colorSpace; // Must detach if input is fromRawData(); nullTerminated() is trick to do that and nothing else QByteArray ownedIccProfile = iccProfile.nullTerminated(); - QColorSpace colorSpace; if (QIcc::fromIccProfile(ownedIccProfile, &colorSpace)) return colorSpace; colorSpace.detach(); diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 7ffb688c035..2b2f2a27fcd 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -1829,6 +1829,8 @@ bool QFont::operator==(const QFont &f) const */ bool QFont::operator<(const QFont &f) const { + // NB: This operator actually implements greater-than, because it consistently + // swaps LHS (should be *this, but is `f`) and RHS (should be `f`, but is *this) if (f.d == d) return false; // the < operator for fontdefs ignores point sizes. const QFontDef &r1 = f.d->request; @@ -2199,7 +2201,7 @@ QString QFont::toString() const fontDescription += comma + QString::number(sortedFeatures.size()); for (const auto &[tag, value] : std::as_const(sortedFeatures).asKeyValueRange()) - fontDescription += comma + tag.toString() + u'=' + QString::number(value); + fontDescription += comma + QLatin1StringView{tag.toString()} + u'=' + QString::number(value); return fontDescription; } |
