Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libqt6xdg for openSUSE:Factory checked in at 2024-10-15 15:02:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libqt6xdg (Old) and /work/SRC/openSUSE:Factory/.libqt6xdg.new.19354 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt6xdg" Tue Oct 15 15:02:09 2024 rev:2 rq:1208071 version:4.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libqt6xdg/libqt6xdg.changes 2024-06-05 17:39:06.254906549 +0200 +++ /work/SRC/openSUSE:Factory/.libqt6xdg.new.19354/libqt6xdg.changes 2024-10-15 15:02:57.312044856 +0200 @@ -1,0 +2,7 @@ +Tue Oct 15 09:00:02 UTC 2024 - Michael Vetter <[email protected]> + +- Update to 4.0.1: + * Added plasma-applications.menu to the fallback menu files. + * Fixed compilation with Qt ⥠6.8. + +------------------------------------------------------------------- Old: ---- libqtxdg-4.0.0.tar.xz libqtxdg-4.0.0.tar.xz.asc New: ---- libqtxdg-4.0.1.tar.xz libqtxdg-4.0.1.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqt6xdg.spec ++++++ --- /var/tmp/diff_new_pack.jXEwQ7/_old 2024-10-15 15:02:58.876109997 +0200 +++ /var/tmp/diff_new_pack.jXEwQ7/_new 2024-10-15 15:02:58.880110163 +0200 @@ -1,7 +1,7 @@ # # spec file for package libqt6xdg # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,10 +17,10 @@ %define _name libqtxdg -%define _sover 4.0.0 +%define _sover 4.0.1 %define sover 4 Name: libqt6xdg -Version: 4.0.0 +Version: 4.0.1 Release: 0 Summary: Qt implementation of freedesktop.org xdg specs License: LGPL-2.1-only AND SUSE-LGPL-2.1-with-digia-exception-1.1 @@ -32,20 +32,20 @@ BuildRequires: cmake >= 3.18.0 BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: cmake(lxqt2-build-tools) BuildRequires: pkgconfig BuildRequires: qt6-gui-private-devel +BuildRequires: xterm-bin BuildRequires: cmake(Qt6Core) >= 6.6.0 BuildRequires: cmake(Qt6DBus) BuildRequires: cmake(Qt6Svg) BuildRequires: cmake(Qt6Test) BuildRequires: cmake(Qt6Widgets) BuildRequires: cmake(Qt6Xml) +BuildRequires: cmake(lxqt2-build-tools) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(glib-2.0) >= 2.41.0 BuildRequires: pkgconfig(gobject-2.0) -BuildRequires: xterm-bin %description Qt implementation of freedesktop.org XDG specs for LXQt ++++++ libqtxdg-4.0.0.tar.xz -> libqtxdg-4.0.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqtxdg-4.0.0/CHANGELOG new/libqtxdg-4.0.1/CHANGELOG --- old/libqtxdg-4.0.0/CHANGELOG 2024-04-17 12:10:09.000000000 +0200 +++ new/libqtxdg-4.0.1/CHANGELOG 2024-10-12 17:37:34.000000000 +0200 @@ -1,3 +1,8 @@ +libqtxdg-4.0.1 / 2024-10-12 +============================ + * Added `plasma-applications.menu` to the fallback menu files. + * Fixed compilation with Qt ⥠6.8. + libqtxdg-4.0.0 / 2024-04-17 ============================ * Ported to Qt6. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqtxdg-4.0.0/CMakeLists.txt new/libqtxdg-4.0.1/CMakeLists.txt --- old/libqtxdg-4.0.0/CMakeLists.txt 2024-04-17 12:10:09.000000000 +0200 +++ new/libqtxdg-4.0.1/CMakeLists.txt 2024-10-12 17:37:34.000000000 +0200 @@ -15,7 +15,7 @@ set(QTXDG_MAJOR_VERSION 4) set(QTXDG_MINOR_VERSION 0) -set(QTXDG_PATCH_VERSION 0) +set(QTXDG_PATCH_VERSION 1) set(QTXDG_VERSION_STRING ${QTXDG_MAJOR_VERSION}.${QTXDG_MINOR_VERSION}.${QTXDG_PATCH_VERSION}) set(LXQTBT_MINIMUM_VERSION "2.0.0") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqtxdg-4.0.0/src/qtxdg/xdgmenu.cpp new/libqtxdg-4.0.1/src/qtxdg/xdgmenu.cpp --- old/libqtxdg-4.0.0/src/qtxdg/xdgmenu.cpp 2024-04-17 12:10:09.000000000 +0200 +++ new/libqtxdg-4.0.1/src/qtxdg/xdgmenu.cpp 2024-10-12 17:37:34.000000000 +0200 @@ -227,7 +227,7 @@ qWarning() << QString::fromLatin1("%1 not loading: %2").arg(fileName, file.errorString()); return; } - mXml.setContent(&file, true); + mXml.setContent(&file, QDomDocument::ParseOption::UseNamespaceProcessing); } @@ -666,6 +666,7 @@ // rest files ordered by priority (descending) wellKnownFiles << QLatin1String("kde4-applications.menu"); wellKnownFiles << QLatin1String("kde-applications.menu"); + wellKnownFiles << QLatin1String("plasma-applications.menu"); wellKnownFiles << QLatin1String("gnome-applications.menu"); wellKnownFiles << QLatin1String("lxde-applications.menu"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqtxdg-4.0.0/src/qtxdg/xdgmenureader.cpp new/libqtxdg-4.0.1/src/qtxdg/xdgmenureader.cpp --- old/libqtxdg-4.0.0/src/qtxdg/xdgmenureader.cpp 2024-04-17 12:10:09.000000000 +0200 +++ new/libqtxdg-4.0.1/src/qtxdg/xdgmenureader.cpp 2024-10-12 17:37:34.000000000 +0200 @@ -79,16 +79,13 @@ //qDebug() << "Load file:" << mFileName; mMenu->addWatchPath(mFileName); - QString errorStr; - int errorLine; - int errorColumn; - - if (!mXml.setContent(&file, true, &errorStr, &errorLine, &errorColumn)) + QDomDocument::ParseResult res = mXml.setContent(&file, QDomDocument::ParseOption::UseNamespaceProcessing); + if (!res) { mErrorStr = QString::fromLatin1("Parse error at line %1, column %2:\n%3") - .arg(errorLine) - .arg(errorColumn) - .arg(errorStr); + .arg(res.errorLine) + .arg(res.errorColumn) + .arg(res.errorMessage); return false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqtxdg-4.0.0/src/qtxdg/xdgmimetype.h new/libqtxdg-4.0.1/src/qtxdg/xdgmimetype.h --- old/libqtxdg-4.0.0/src/qtxdg/xdgmimetype.h 2024-04-17 12:10:09.000000000 +0200 +++ new/libqtxdg-4.0.1/src/qtxdg/xdgmimetype.h 2024-10-12 17:37:34.000000000 +0200 @@ -72,12 +72,12 @@ */ bool operator==(const XdgMimeType &other) const { - return QMimeType::operator==(other); + return name() == other.name(); } inline bool operator!=(const XdgMimeType &other) const { - return !QMimeType::operator==(other); + return !operator==(other); } void swap(XdgMimeType &other) noexcept; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqtxdg-4.0.0/src/xdgiconloader/xdgiconloader.cpp new/libqtxdg-4.0.1/src/xdgiconloader/xdgiconloader.cpp --- old/libqtxdg-4.0.0/src/xdgiconloader/xdgiconloader.cpp 2024-04-17 12:10:09.000000000 +0200 +++ new/libqtxdg-4.0.1/src/xdgiconloader/xdgiconloader.cpp 2024-10-12 17:37:34.000000000 +0200 @@ -757,7 +757,11 @@ } // XXX: duplicated from qiconloader.cpp, because this symbol isn't exported :( +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) +QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) +#else QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) +#endif { Q_UNUSED(state); @@ -766,18 +770,45 @@ if (basePixmap.isNull()) basePixmap.load(filename); + // see QPixmapIconEngine::adjustSize QSize actualSize = basePixmap.size(); // If the size of the best match we have (basePixmap) is larger than the // requested size, we downscale it to match. if (!actualSize.isNull() && (actualSize.width() > size.width() || actualSize.height() > size.height())) actualSize.scale(size, Qt::KeepAspectRatio); +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + // see QIconPrivate::pixmapDevicePixelRatio + qreal calculatedDpr; + QSize targetSize = size * scale; + if ((actualSize.width() == targetSize.width() && actualSize.height() <= targetSize.height()) || + (actualSize.width() <= targetSize.width() && actualSize.height() == targetSize.height())) + { + // Correctly scaled for dpr, just having different aspect ratio + calculatedDpr = scale; + } + else + { + qreal ratio = 0.5 * (qreal(actualSize.width()) / qreal(targetSize.width()) + + qreal(actualSize.height() / qreal(targetSize.height()))); + calculatedDpr = qMax(qreal(1.0), scale * ratio); + } + + QString key = QLatin1String("$qt_theme_") + % HexString<quint64>(basePixmap.cacheKey()) + % HexString<quint8>(mode) + % HexString<quint64>(QGuiApplication::palette().cacheKey()) + % HexString<uint>(actualSize.width()) + % HexString<uint>(actualSize.height()) + % HexString<quint16>(qRound(calculatedDpr * 1000)); +#else QString key = QLatin1String("$qt_theme_") % HexString<qint64>(basePixmap.cacheKey()) % HexString<int>(mode) % HexString<qint64>(QGuiApplication::palette().cacheKey()) % HexString<int>(actualSize.width()) % HexString<int>(actualSize.height()); +#endif QPixmap cachedPixmap; if (QPixmapCache::find(key, &cachedPixmap)) { @@ -789,6 +820,9 @@ cachedPixmap = basePixmap; if (QGuiApplication *guiApp = qobject_cast<QGuiApplication *>(qApp)) cachedPixmap = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, cachedPixmap); +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + cachedPixmap.setDevicePixelRatio(calculatedDpr); +#endif QPixmapCache::insert(key, cachedPixmap); } return cachedPixmap; @@ -796,21 +830,39 @@ // NOTE: For SVG, QSvgRenderer is used to prevent our icon handling from // being broken by icon engines that register themselves for SVG. +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) +QPixmap ScalableEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) +#else QPixmap ScalableEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) +#endif { QPixmap pm; if (size.isEmpty()) return pm; +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + QString key = QLatin1String("lxqt_") + % filename + % HexString<quint8>(mode) + % HexString<int>(state) + % HexString<uint>(size.width()) + % HexString<uint>(size.height()) + % HexString<quint16>(qRound(scale * 1000)); +#else QString key = QLatin1String("lxqt_") % filename % HexString<int>(mode) % HexString<int>(state) % HexString<int>(size.width()) % HexString<int>(size.height()); +#endif if (!QPixmapCache::find(key, &pm)) { +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + int icnSize = qMin(size.width(), size.height()) * scale; +#else int icnSize = qMin(size.width(), size.height()); +#endif pm = QPixmap(icnSize, icnSize); pm.fill(Qt::transparent); @@ -824,8 +876,12 @@ } svgIcon = QIcon(pm); +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + pm = svgIcon.pixmap(size, scale, mode, state); +#else if (QIconEngine *engine = svgIcon.data_ptr() ? svgIcon.data_ptr()->engine : nullptr) pm = engine->pixmap(size, mode, state); +#endif QPixmapCache::insert(key, pm); } @@ -838,7 +894,11 @@ // NOTE: Qt palette does not have any colors for positive/negative text // .ColorScheme-PositiveText,ColorScheme-NegativeText {color:%4;} +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) +QPixmap ScalableFollowsColorEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) +#else QPixmap ScalableFollowsColorEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) +#endif { QPixmap pm; if (size.isEmpty()) @@ -866,6 +926,16 @@ } hCol = pal.highlight().color().name(); } +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + QString key = QLatin1String("lxqt_") + % filename + % HexString<quint8>(mode) + % HexString<int>(state) + % HexString<uint>(size.width()) + % HexString<uint>(size.height()) + % HexString<quint16>(qRound(scale * 1000)) + % txtCol % bgCol % hCol; +#else QString key = QLatin1String("lxqt_") % filename % HexString<int>(mode) @@ -873,9 +943,14 @@ % HexString<int>(size.width()) % HexString<int>(size.height()) % txtCol % bgCol % hCol; +#endif if (!QPixmapCache::find(key, &pm)) { +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + int icnSize = qMin(size.width(), size.height()) * scale; +#else int icnSize = qMin(size.width(), size.height()); +#endif pm = QPixmap(icnSize, icnSize); pm.fill(Qt::transparent); @@ -926,8 +1001,12 @@ // for QIcon::pixmap() to handle states and modes, // especially the disabled mode. svgIcon = QIcon(pm); +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + pm = svgIcon.pixmap(size, scale, mode, state); +#else if (QIconEngine *engine = svgIcon.data_ptr() ? svgIcon.data_ptr()->engine : nullptr) pm = engine->pixmap(size, mode, state); +#endif QPixmapCache::insert(key, pm); } @@ -937,13 +1016,7 @@ QPixmap XdgIconLoaderEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) { - ensureLoaded(); - - QIconLoaderEngineEntry *entry = entryForSize(m_info, size); - if (entry) - return entry->pixmap(size, mode, state); - - return QPixmap(); + return scaledPixmap(size, mode, state, 1.0); } QString XdgIconLoaderEngine::key() const @@ -967,8 +1040,13 @@ { ensureLoaded(); const int integerScale = qCeil(scale); +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + QIconLoaderEngineEntry *entry = entryForSize(m_info, size, integerScale); + return entry ? entry->pixmap(size, mode, state, scale) : QPixmap(); +#else QIconLoaderEngineEntry *entry = entryForSize(m_info, size / integerScale, integerScale); return entry ? entry->pixmap(size, mode, state) : QPixmap(); +#endif } QList<QSize> XdgIconLoaderEngine::availableSizes(QIcon::Mode mode, QIcon::State state) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libqtxdg-4.0.0/src/xdgiconloader/xdgiconloader_p.h new/libqtxdg-4.0.1/src/xdgiconloader/xdgiconloader_p.h --- old/libqtxdg-4.0.0/src/xdgiconloader/xdgiconloader_p.h 2024-04-17 12:10:09.000000000 +0200 +++ new/libqtxdg-4.0.1/src/xdgiconloader/xdgiconloader_p.h 2024-10-12 17:37:34.000000000 +0200 @@ -63,7 +63,11 @@ struct ScalableFollowsColorEntry : public ScalableEntry { +#if (QT_VERSION >= QT_VERSION_CHECK(6,8,0)) + QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override; +#else QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) override; +#endif }; //class QIconLoaderEngine : public QIconEngine
