Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libyui for openSUSE:Factory checked 
in at 2023-04-27 19:59:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libyui (Old)
 and      /work/SRC/openSUSE:Factory/.libyui.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libyui"

Thu Apr 27 19:59:27 2023 rev:88 rq:1082957 version:4.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libyui/libyui.changes    2023-04-20 
15:13:14.409617497 +0200
+++ /work/SRC/openSUSE:Factory/.libyui.new.1533/libyui.changes  2023-04-27 
19:59:28.377410018 +0200
@@ -1,0 +2,7 @@
+Tue Apr 25 13:34:17 UTC 2023 - Stefan Hundhammer <[email protected]>
+
+- Qt UI: Fixed regression for icon loading (bsc#1210712)
+  https://github.com/libyui/libyui/pull/100
+- 4.5.2
+
+-------------------------------------------------------------------

Old:
----
  libyui-4.5.1.tar.bz2

New:
----
  libyui-4.5.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libyui-bindings.spec ++++++
--- /var/tmp/diff_new_pack.BywUBp/_old  2023-04-27 19:59:28.965413476 +0200
+++ /var/tmp/diff_new_pack.BywUBp/_new  2023-04-27 19:59:28.969413498 +0200
@@ -20,7 +20,7 @@
 Name:           libyui-bindings
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 Summary:        Bindings for libyui
 License:        LGPL-2.1-only OR LGPL-3.0-only

++++++ libyui-ncurses-pkg.spec ++++++
--- /var/tmp/diff_new_pack.BywUBp/_old  2023-04-27 19:59:28.993413640 +0200
+++ /var/tmp/diff_new_pack.BywUBp/_new  2023-04-27 19:59:28.993413640 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-ncurses-pkg
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16

libyui-ncurses-rest-api.spec: same change
libyui-ncurses.spec: same change
++++++ libyui-qt-graph.spec ++++++
--- /var/tmp/diff_new_pack.BywUBp/_old  2023-04-27 19:59:29.057414016 +0200
+++ /var/tmp/diff_new_pack.BywUBp/_new  2023-04-27 19:59:29.061414039 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-graph
 
 # DO NOT manually bump the version here; instead, use   rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16

++++++ libyui-qt-pkg.spec ++++++
--- /var/tmp/diff_new_pack.BywUBp/_old  2023-04-27 19:59:29.081414157 +0200
+++ /var/tmp/diff_new_pack.BywUBp/_new  2023-04-27 19:59:29.085414180 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-pkg
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16

libyui-qt-rest-api.spec: same change
libyui-qt.spec: same change
libyui-rest-api.spec: same change
libyui.spec: same change
++++++ libyui-4.5.1.tar.bz2 -> libyui-4.5.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/VERSION.cmake 
new/libyui-4.5.2/VERSION.cmake
--- old/libyui-4.5.1/VERSION.cmake      2023-04-18 18:02:45.000000000 +0200
+++ new/libyui-4.5.2/VERSION.cmake      2023-04-26 11:52:26.000000000 +0200
@@ -1,6 +1,6 @@
 SET( VERSION_MAJOR "4")
 SET( VERSION_MINOR "5" )
-SET( VERSION_PATCH "1" )
+SET( VERSION_PATCH "2" )
 SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
 
 SET( SONAME_MAJOR "16" )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/libyui-qt/src/YQUI.cc 
new/libyui-4.5.2/libyui-qt/src/YQUI.cc
--- old/libyui-4.5.1/libyui-qt/src/YQUI.cc      2023-04-18 18:02:45.000000000 
+0200
+++ new/libyui-4.5.2/libyui-qt/src/YQUI.cc      2023-04-26 11:52:26.000000000 
+0200
@@ -29,12 +29,14 @@
 #include <libintl.h>
 #include <algorithm>
 #include <stdio.h>
+#include <unistd.h>             // access()
 
 #include <QWidget>
 #include <QThread>
 #include <QSocketNotifier>
 #include <QDesktopWidget>
 #include <QEvent>
+#include <QFile>
 #include <QCursor>
 #include <QLocale>
 #include <QMessageLogContext>
@@ -650,7 +652,7 @@
             // Suppress well-known Qt warning that we can't do anything about
             if ( msg.contains( "Timers cannot be stopped from another thread" 
) )
                 break;
-            
+
            yuiWarning() <<  "<libqt-warning> " << msg << endl;
            break;
 
@@ -670,37 +672,61 @@
 }
 
 
-QIcon YQUI::loadIcon( const string & iconName ) const
+QIcon YQUI::loadIcon( const string & iconName_str ) const
 {
-    QIcon icon;
-    const QString resource = ":/";
+    QString iconName( iconName_str.c_str() );
 
-    if ( QIcon::hasThemeIcon( iconName.c_str() ) )
-    {
-       yuiDebug() << "Trying theme icon from: " << iconName << endl;
-       icon = QIcon::fromTheme( iconName.c_str() );
-    }
+    // Notice that QIcon::isNull() is not a useful check if loading an icon was
+    // successful: It returns 'false' even if the icon just has a filename.
+    //
+    // There does not seem any reliable check if loading an icon was 
successful.
 
-    if ( ! iconIsValid( icon ) )
-    {
-       yuiDebug() << "Trying icon from resource: " << iconName << endl;
-       icon = QIcon( resource + iconName.c_str() );
-    }
+    if ( QIcon::hasThemeIcon( iconName ) )
+        return loadThemeIcon( iconName );
 
-    if ( ! iconIsValid( icon ) )
+    if ( iconName.startsWith( "/" ) )
+        return loadIconFromPath( iconName );
+
+    return loadBuiltInIcon( iconName );
+}
+
+
+QIcon YQUI::loadThemeIcon( const QString & iconName ) const
+{
+    yuiDebug() << "Using theme icon for " << iconName << endl;
+    return QIcon::fromTheme( iconName );
+}
+
+
+QIcon YQUI::loadIconFromPath( const QString & iconName ) const
+{
+    if ( access( iconName.toUtf8(), R_OK ) != 0 )
     {
-       yuiDebug() << "Trying icon from path: " << iconName << endl;
-       icon = QIcon( iconName.c_str() );
+        yuiWarning() << "Can't open icon file " << iconName << endl;
+        return QIcon();
     }
 
-    if ( ! iconIsValid( icon ) )
-       yuiWarning() << "Couldn't load icon: " << iconName << endl;
-
-    return icon;
+    yuiDebug() << "Loading icon from absolute path " << iconName << endl;
+    return QIcon( iconName );
 }
 
 
-bool YQUI::iconIsValid( const QIcon & icon ) const
+QIcon YQUI::loadBuiltInIcon( const QString & iconName ) const
 {
-    return icon.availableSizes().size() > 0;
+    QString resource = ":/";
+
+    QString iconPath = iconName.startsWith( resource ) ?
+        iconName : resource + iconName;
+
+    if ( QFile( iconPath ).exists() )
+        // Using QFile because it can handle Qt resources and their aliases
+    {
+        yuiDebug() << "Using built-in icon " << iconName << endl;
+        return QIcon( iconPath );
+    }
+    else
+    {
+        yuiWarning() << "No built-in icon " << iconName << endl;
+        return QIcon();
+    }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/libyui-qt/src/YQUI.h 
new/libyui-4.5.2/libyui-qt/src/YQUI.h
--- old/libyui-4.5.1/libyui-qt/src/YQUI.h       2023-04-18 18:02:45.000000000 
+0200
+++ new/libyui-4.5.2/libyui-qt/src/YQUI.h       2023-04-26 11:52:26.000000000 
+0200
@@ -287,7 +287,7 @@
     /**
      * Sets the application name for the window title
      **/
-    void setApplicationTitle(const QString & title) { _applicationTitle=title; 
}
+    void setApplicationTitle( const QString & title ) { _applicationTitle = 
title; }
 
     /**
      * Load an icon. This tries several locations:
@@ -308,16 +308,29 @@
      **/
     QIcon loadIcon( const string & iconName ) const;
 
+
+protected:
+
+    /**
+     * Load an icon from the desktop theme.
+     * Those icon names typically do not contain a leading path or a filename 
extension.
+     **/
+    QIcon loadThemeIcon( const QString & iconName ) const;
+
     /**
-     * Return if 'icon' is valid, i.e. it has non-null content.
+     * Load an icon from an absolute path (including filename extension).
+     **/
+    QIcon loadIconFromPath( const QString & iconPath ) const;
+
+    /**
+     * Load a built-in icon, i.e. one from the Qt resource system.
      *
-     * Notice that this is different from QIcon::isNull() which returns 'true'
-     * if the icon has a pixmap or a filename, even if that file could not be
-     * loaded or does not even exist.
+     * Use either an alias from qt_icons.rcc (and no filename extension)
+     * or a full filename with path and extension, e.g. "icons/foo.svg".
+     * A leading ":/" will be added if not already there.
      **/
-    bool iconIsValid( const QIcon & icon ) const;
+    QIcon loadBuiltInIcon( const QString & iconName ) const;
 
-protected:
 
     /**
      * Handle command line args
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-bindings.spec 
new/libyui-4.5.2/package/libyui-bindings.spec
--- old/libyui-4.5.1/package/libyui-bindings.spec       2023-04-18 
18:02:45.000000000 +0200
+++ new/libyui-4.5.2/package/libyui-bindings.spec       2023-04-26 
11:52:26.000000000 +0200
@@ -20,7 +20,7 @@
 Name:           libyui-bindings
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 Summary:        Bindings for libyui
 License:        LGPL-2.1-only OR LGPL-3.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-ncurses-pkg.spec 
new/libyui-4.5.2/package/libyui-ncurses-pkg.spec
--- old/libyui-4.5.1/package/libyui-ncurses-pkg.spec    2023-04-18 
18:02:45.000000000 +0200
+++ new/libyui-4.5.2/package/libyui-ncurses-pkg.spec    2023-04-26 
11:52:26.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-ncurses-pkg
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-ncurses-rest-api.spec 
new/libyui-4.5.2/package/libyui-ncurses-rest-api.spec
--- old/libyui-4.5.1/package/libyui-ncurses-rest-api.spec       2023-04-18 
18:02:45.000000000 +0200
+++ new/libyui-4.5.2/package/libyui-ncurses-rest-api.spec       2023-04-26 
11:52:26.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-ncurses-rest-api
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-ncurses.spec 
new/libyui-4.5.2/package/libyui-ncurses.spec
--- old/libyui-4.5.1/package/libyui-ncurses.spec        2023-04-18 
18:02:45.000000000 +0200
+++ new/libyui-4.5.2/package/libyui-ncurses.spec        2023-04-26 
11:52:26.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-ncurses
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-qt-graph.spec 
new/libyui-4.5.2/package/libyui-qt-graph.spec
--- old/libyui-4.5.1/package/libyui-qt-graph.spec       2023-04-18 
18:02:45.000000000 +0200
+++ new/libyui-4.5.2/package/libyui-qt-graph.spec       2023-04-26 
11:52:26.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-graph
 
 # DO NOT manually bump the version here; instead, use   rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-qt-pkg.spec 
new/libyui-4.5.2/package/libyui-qt-pkg.spec
--- old/libyui-4.5.1/package/libyui-qt-pkg.spec 2023-04-18 18:02:45.000000000 
+0200
+++ new/libyui-4.5.2/package/libyui-qt-pkg.spec 2023-04-26 11:52:26.000000000 
+0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-pkg
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-qt-rest-api.spec 
new/libyui-4.5.2/package/libyui-qt-rest-api.spec
--- old/libyui-4.5.1/package/libyui-qt-rest-api.spec    2023-04-18 
18:02:45.000000000 +0200
+++ new/libyui-4.5.2/package/libyui-qt-rest-api.spec    2023-04-26 
11:52:26.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-rest-api
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-qt.spec 
new/libyui-4.5.2/package/libyui-qt.spec
--- old/libyui-4.5.1/package/libyui-qt.spec     2023-04-18 18:02:45.000000000 
+0200
+++ new/libyui-4.5.2/package/libyui-qt.spec     2023-04-26 11:52:26.000000000 
+0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui-rest-api.spec 
new/libyui-4.5.2/package/libyui-rest-api.spec
--- old/libyui-4.5.1/package/libyui-rest-api.spec       2023-04-18 
18:02:45.000000000 +0200
+++ new/libyui-4.5.2/package/libyui-rest-api.spec       2023-04-26 
11:52:26.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-rest-api
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui.changes 
new/libyui-4.5.2/package/libyui.changes
--- old/libyui-4.5.1/package/libyui.changes     2023-04-18 18:02:45.000000000 
+0200
+++ new/libyui-4.5.2/package/libyui.changes     2023-04-26 11:52:26.000000000 
+0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Tue Apr 25 13:34:17 UTC 2023 - Stefan Hundhammer <[email protected]>
+
+- Qt UI: Fixed regression for icon loading (bsc#1210712)
+  https://github.com/libyui/libyui/pull/100
+- 4.5.2
+
+-------------------------------------------------------------------
 Tue Apr 18 13:35:21 UTC 2023 - Stefan Hundhammer <[email protected]>
 
 - Qt UI: Fixed loading icons from an absolute path (bsc#1210591)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.5.1/package/libyui.spec 
new/libyui-4.5.2/package/libyui.spec
--- old/libyui-4.5.1/package/libyui.spec        2023-04-18 18:02:45.000000000 
+0200
+++ new/libyui-4.5.2/package/libyui.spec        2023-04-26 11:52:26.000000000 
+0200
@@ -19,7 +19,7 @@
 Name:           libyui
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 
 %define         so_version 16

Reply via email to