Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libyui for openSUSE:Factory checked 
in at 2021-10-16 22:47:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libyui (Old)
 and      /work/SRC/openSUSE:Factory/.libyui.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libyui"

Sat Oct 16 22:47:00 2021 rev:68 rq:925113 version:4.2.17

Changes:
--------
--- /work/SRC/openSUSE:Factory/libyui/libyui.changes    2021-09-04 
22:32:03.391889278 +0200
+++ /work/SRC/openSUSE:Factory/.libyui.new.1890/libyui.changes  2021-10-16 
22:47:19.816676247 +0200
@@ -1,0 +2,8 @@
+Wed Oct 13 09:39:18 UTC 2021 - Stefan Hundhammer <shundham...@suse.com>
+
+- Fixed empty entries in YQPackageSelector Zypp history window
+  (bsc#1191430)
+- Added missing textdomain (bsc#1190805)
+- 4.2.17
+
+-------------------------------------------------------------------

Old:
----
  libyui-4.2.16.tar.bz2

New:
----
  libyui-4.2.17.tar.bz2

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

Other differences:
------------------
++++++ libyui-bindings.spec ++++++
--- /var/tmp/diff_new_pack.pm80Gn/_old  2021-10-16 22:47:20.792677070 +0200
+++ /var/tmp/diff_new_pack.pm80Gn/_new  2021-10-16 22:47:20.796677073 +0200
@@ -20,7 +20,7 @@
 Name:           libyui-bindings
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 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.pm80Gn/_old  2021-10-16 22:47:20.808677083 +0200
+++ /var/tmp/diff_new_pack.pm80Gn/_new  2021-10-16 22:47:20.812677087 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-ncurses-pkg
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15

libyui-ncurses-rest-api.spec: same change
libyui-ncurses.spec: same change
++++++ libyui-qt-graph.spec ++++++
--- /var/tmp/diff_new_pack.pm80Gn/_old  2021-10-16 22:47:20.856677124 +0200
+++ /var/tmp/diff_new_pack.pm80Gn/_new  2021-10-16 22:47:20.860677127 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-graph
 
 # DO NOT manually bump the version here; instead, use   rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
@@ -61,7 +61,6 @@
 # Force removal of old -doc packages (bsc#1184363)
 Obsoletes:      %{name}-doc < %{version}
 
-
 %description -n %{bin_name}
 This package contains the Qt graph component for libyui.
 

++++++ libyui-qt-pkg.spec ++++++
--- /var/tmp/diff_new_pack.pm80Gn/_old  2021-10-16 22:47:20.876677140 +0200
+++ /var/tmp/diff_new_pack.pm80Gn/_new  2021-10-16 22:47:20.876677140 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-pkg
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15

libyui-qt-rest-api.spec: same change
libyui-qt.spec: same change
libyui-rest-api.spec: same change
libyui.spec: same change
++++++ libyui-4.2.16.tar.bz2 -> libyui-4.2.17.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/.github/workflows/ci.yml 
new/libyui-4.2.17/.github/workflows/ci.yml
--- old/libyui-4.2.16/.github/workflows/ci.yml  2021-09-01 09:10:04.000000000 
+0200
+++ new/libyui-4.2.17/.github/workflows/ci.yml  2021-10-13 16:38:45.000000000 
+0200
@@ -8,7 +8,9 @@
 jobs:
   Package:
     runs-on: ubuntu-latest
-    container: 
registry.opensuse.org/devel/libraries/libyui/containers/libyui-devel:latest
+    container:
+      image: 
registry.opensuse.org/devel/libraries/libyui/containers/libyui-devel:latest
+      options: --privileged
 
     steps:
 
@@ -24,7 +26,9 @@
 
   NonRoot:
     runs-on: ubuntu-latest
-    container: 
registry.opensuse.org/devel/libraries/libyui/containers/libyui-devel:latest
+    container:
+      image: 
registry.opensuse.org/devel/libraries/libyui/containers/libyui-devel:latest
+      options: --privileged
 
     steps:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/.github/workflows/publish-api-doc.yml 
new/libyui-4.2.17/.github/workflows/publish-api-doc.yml
--- old/libyui-4.2.16/.github/workflows/publish-api-doc.yml     2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/.github/workflows/publish-api-doc.yml     2021-10-13 
16:38:45.000000000 +0200
@@ -21,7 +21,9 @@
 jobs:
   api-doc:
     runs-on: ubuntu-latest
-    container: 
registry.opensuse.org/devel/libraries/libyui/containers/libyui-devel:latest
+    container:
+      image: 
registry.opensuse.org/devel/libraries/libyui/containers/libyui-devel:latest
+      options: --privileged
 
     steps:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/VERSION.cmake 
new/libyui-4.2.17/VERSION.cmake
--- old/libyui-4.2.16/VERSION.cmake     2021-09-01 09:10:04.000000000 +0200
+++ new/libyui-4.2.17/VERSION.cmake     2021-10-13 16:38:45.000000000 +0200
@@ -1,6 +1,6 @@
 SET( VERSION_MAJOR "4")
 SET( VERSION_MINOR "2" )
-SET( VERSION_PATCH "16" )
+SET( VERSION_PATCH "17" )
 SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
 
 SET( SONAME_MAJOR "15" )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-4.2.16/libyui-qt-pkg/src/YQPkgHistoryDialog.cc 
new/libyui-4.2.17/libyui-qt-pkg/src/YQPkgHistoryDialog.cc
--- old/libyui-4.2.16/libyui-qt-pkg/src/YQPkgHistoryDialog.cc   2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/libyui-qt-pkg/src/YQPkgHistoryDialog.cc   2021-10-13 
16:38:45.000000000 +0200
@@ -29,23 +29,22 @@
 #include <yui/qt/YQi18n.h>
 #include <yui/qt/YQUI.h>
 #include <yui/qt/utf8.h>
+#include <yui/qt/YQSignalBlocker.h>
 
-#include <zypp/parser/HistoryLogReader.h>
 #include <zypp/Date.h>
 #include <zypp/Edition.h>
 #include <boost/ref.hpp>
 
 #include <QApplication>
-#include <QDesktopWidget>
+#include <QBoxLayout>
+#include <QEventLoop>
 #include <QHBoxLayout>
 #include <QLabel>
+#include <QList>
+#include <QMessageBox>
 #include <QPushButton>
 #include <QSplitter>
-#include <QStyle>
-#include <QList>
-#include <QBoxLayout>
 #include <QTreeWidget>
-#include <QMessageBox>
 
 #include "YQPkgHistoryDialog.h"
 #include "YQPkgList.h"
@@ -53,253 +52,334 @@
 #include "QY2LayoutUtils.h"
 
 
-#define SPACING                        2       // between subwidgets
-#define MARGIN                 4       // around the widget
+#define SPACING         4      // between subwidgets
+#define MARGIN         9       // around the widget
 
 #define FILENAME       "/var/log/zypp/history"
 
 using std::endl;
 
+
 YQPkgHistoryDialog::YQPkgHistoryDialog( QWidget * parent )
     : QDialog( parent )
 {
     // Dialog title
     setWindowTitle( _( "Package History" ) );
 
-    // Enable dialog resizing even without window manager
     setSizeGripEnabled( true );
+    setMinimumSize( 750, 550 );
+
 
-    // Layout for the dialog (can't simply insert a QVBox)
+    // Outer (main) layout
 
     QVBoxLayout * layout = new QVBoxLayout();
     Q_CHECK_PTR( layout );
-    setLayout(layout);
-    layout->setMargin(MARGIN);
-    layout->setSpacing(SPACING);
+    setLayout( layout );
+    layout->setMargin( MARGIN );
+    layout->setSpacing( SPACING );
+
+
+    // Heading
 
-    setMinimumSize (300,400);
+    QLabel * label = new QLabel(  _( "Package History (/var/log/zypp/history)" 
), this );
+    label->setFixedHeight( label->sizeHint().height() );
+    layout->addWidget( label );
 
-    QLabel * label = new QLabel ( _("Show History (/var/log/zypp/history)" ), 
this );
-    label->setFixedHeight (label->sizeHint ().height ());
-    layout->addWidget (label);
 
-    // VBox for splitter
+    // Splitter between the trees
+
     QSplitter * splitter = new QSplitter( Qt::Horizontal, this );
     Q_CHECK_PTR( splitter );
     layout->addWidget( splitter );
 
-    // History view
-    _dates = new QTreeWidget (splitter);
-    _dates->setColumnCount (1);
-    _dates->setHeaderLabels ( QStringList( _("Date") ) );
-
-    _actions = new QTreeWidget (splitter);
-    _actions->setColumnCount (2);
-    _actions->setHeaderLabels ( QStringList( _("Action") ) << _("Version/URL") 
);
-    _actions->setColumnWidth (0, 200);
 
-    splitter->setStretchFactor (0, 1);
-    splitter->setStretchFactor (1, 2);
+    // Flat list for the dates
+
+    _datesTree = new QTreeWidget( splitter);
+    _datesTree->setColumnCount( 1 );
+    _datesTree->setHeaderLabels( QStringList( _( "Date" ) ) );
+    _datesTree->setRootIsDecorated( false );
+
+
+    // Tree for the actions: Action items below a date item parent
+
+    _actionsTree = new QTreeWidget( splitter );
+    _actionsTree->setColumnCount( 2 );
+    _actionsTree->setHeaderLabels( QStringList( _( "Action" ) ) << _( 
"Version/URL" ) );
+    _actionsTree->setColumnWidth( 0, 350 );
 
-    // Button box (to center the single button)
+
+    // Horizontal stretch factors for each tree in the splitter
+
+    splitter->setStretchFactor( 0, 1 );
+    splitter->setStretchFactor( 1, 3 );
+
+
+    // Button box to right-align the single button
 
     QHBoxLayout * hbox = new QHBoxLayout();
     Q_CHECK_PTR( hbox );
-    hbox->setSpacing( SPACING );
-    hbox->setMargin ( MARGIN  );
     layout->addLayout( hbox );
     hbox->addStretch();
 
-    // "OK" button
+    QPushButton * closeButton = new QPushButton( _( "&Close" ), this );
+    Q_CHECK_PTR( closeButton );
+    hbox->addWidget( closeButton );
+    closeButton->setDefault( true );
 
-    QPushButton * button = new QPushButton( _( "&Close" ), this );
-    Q_CHECK_PTR( button );
-    hbox->addWidget(button);
-    button->setDefault( true );
 
-    connect( button,   SIGNAL( clicked() ),
-            this,      SLOT  ( accept()  ) );
+    // Signal / slot connections
 
-    connect( _dates,   SIGNAL( itemSelectionChanged () ),
-           this,       SLOT ( moveToDate () ) );
+    connect( closeButton,       SIGNAL( clicked() ),
+            this,              SLOT  ( accept()  ) );
 
-    connect( _actions, SIGNAL( itemSelectionChanged() ),
-           this,       SLOT ( moveToAction () ) );
+    connect( _datesTree,        SIGNAL( itemSelectionChanged() ),
+           this,               SLOT  ( selectDate()           ) );
 
-    initialize ();
+    connect( _actionsTree,      SIGNAL( itemSelectionChanged() ),
+           this,               SLOT  ( selectAction()         ) );
 }
 
-QSize
-YQPkgHistoryDialog::sizeHint() const
+
+void
+YQPkgHistoryDialog::showHistoryDialog( QWidget* parent)
 {
-    QRect available = qApp->desktop()->availableGeometry( (QWidget *) this );
-    QSize size = QDialog::sizeHint();
-    size = size.boundedTo( QSize( available.width(), available.height() ) );
+    YQPkgHistoryDialog dialog( parent );
+
+    // Give instant feedback: Show the dialog and process the "show" event
+    // immediately so the window opens immediately (albeit empty)
+
+    dialog.show();
+    QEventLoop eventLoop;
+    eventLoop.processEvents( QEventLoop::ExcludeUserInputEvents,
+                            200 ); // millisec
+
+    YQUI::ui()->busyCursor();
+    dialog.populate(); // This takes a moment
+    YQUI::ui()->normalCursor();
 
-    return size;
+    dialog.exec();
 }
 
 
 void
-YQPkgHistoryDialog::showHistoryDialog( QWidget* parent)
+YQPkgHistoryDialog::populate()
 {
-    YQPkgHistoryDialog dialog( parent );
-    dialog.exec();
+    YQPkgHistoryItemCollector itemCollector( _datesTree, _actionsTree );
+    zypp::parser::HistoryLogReader reader( FILENAME,
+                                           
zypp::parser::HistoryLogReader::Options(),
+                                           boost::ref( itemCollector ) );
+    try
+    {
+       reader.readAll();
+    }
+    catch (  const zypp::Exception & exception )
+    {
+        yuiWarning() << "CAUGHT zypp exception: " << exception.asUserHistory() 
<< endl;
+        showReadHistoryWarning( fromUTF8( exception.asUserHistory() ) );
+    }
 }
 
-QPixmap actionIcon (zypp::HistoryActionID id)
+
+void
+YQPkgHistoryDialog::showReadHistoryWarning( const QString & message )
 {
-    switch (id.toEnum ()) {
-       case zypp::HistoryActionID::INSTALL_e : return YQIconPool::pkgInstall 
();
-       case zypp::HistoryActionID::REMOVE_e : return YQIconPool::pkgDel ();
-       case zypp::HistoryActionID::REPO_REMOVE_e : return 
YQIconPool::treeMinus ();
-       case zypp::HistoryActionID::REPO_ADD_e : return YQIconPool::treePlus ();
-       default: return QPixmap ();
+    QMessageBox msgBox;
+
+    // Translators: This is a (short) text indicating that something went
+    // wrong while trying to read the history file.
+
+    QString heading = _( "Unable to read history" );
+
+    if (  heading.length() < 25 )    // Avoid very narrow message boxes
+    {
+        QString blanks;
+        blanks.fill( ' ', 50 - heading.length() );
+        heading += blanks;
     }
 
-    return QPixmap ();
+    msgBox.setText( heading );
+    msgBox.setIcon( QMessageBox::Warning );
+    msgBox.setInformativeText( message );
+    msgBox.exec();
 }
 
-struct HistoryItemCollector
+
+void
+YQPkgHistoryDialog::selectDate()
 {
-    QTreeWidget* actions, * dates;
-    QString _last;
-    QTreeWidgetItem* date_start;
+    QString item = _datesTree->selectedItems().first()->text( 0 );
+    QList<QTreeWidgetItem *> items = _actionsTree->findItems( item, 
Qt::MatchExactly, 0);
 
-    bool operator()( const zypp::HistoryLogData::Ptr & item_ptr )
+    if ( items.size() > 0 )
     {
-       QString d = fromUTF8( item_ptr->date().form("%e %B %Y"));
-       if (d != _last)
-       {
-           _last = d;
-           date_start = new QTreeWidgetItem (actions, QStringList(d));
-           date_start->setExpanded (true);
-           actions-> insertTopLevelItem ( 0, date_start );
-           dates-> insertTopLevelItem ( 0, new QTreeWidgetItem (dates, 
QStringList(d)));
-       }
-
-       QStringList columns;
-       if ( item_ptr->action() == zypp::HistoryActionID::INSTALL_e )
-       {
-           zypp::HistoryLogDataInstall* item = static_cast 
<zypp::HistoryLogDataInstall *> (item_ptr.get());
-
-           columns << fromUTF8(item->name());
-           columns << fromUTF8(item->edition().version());
-       } else
-       if ( item_ptr->action() == zypp::HistoryActionID::REMOVE_e )
-       {
-           zypp::HistoryLogDataRemove* item = static_cast 
<zypp::HistoryLogDataRemove *> (item_ptr.get());
-
-           columns << fromUTF8(item->name());
-           columns << fromUTF8(item->edition().version());
-       } else
-       if ( item_ptr->action() == zypp::HistoryActionID::REPO_ADD_e )
-       {
-           zypp::HistoryLogDataRepoAdd* item = static_cast 
<zypp::HistoryLogDataRepoAdd *> (item_ptr.get());
-
-           columns << fromUTF8(item->alias());
-           columns << fromUTF8(item->url().asString());
-       } else
-       if ( item_ptr->action() == zypp::HistoryActionID::REPO_REMOVE_e )
-       {
-           zypp::HistoryLogDataRepoRemove* item = static_cast 
<zypp::HistoryLogDataRepoRemove *> (item_ptr.get());
-
-           columns << fromUTF8(item->alias());
-       } else
-       if ( item_ptr->action() == zypp::HistoryActionID::REPO_CHANGE_ALIAS_e )
-       {
-           zypp::HistoryLogDataRepoAliasChange* item = static_cast 
<zypp::HistoryLogDataRepoAliasChange *> (item_ptr.get());
-
-           columns << fromUTF8(item->oldAlias()) + " -> " + 
fromUTF8(item->newAlias());
-       } else
-       if ( item_ptr->action() == zypp::HistoryActionID::REPO_CHANGE_URL_e )
-       {
-           zypp::HistoryLogDataRepoUrlChange* item = static_cast 
<zypp::HistoryLogDataRepoUrlChange *> (item_ptr.get());
-
-           columns << fromUTF8(item->alias());
-           columns << fromUTF8(item->newUrl().asString());
-       }
-
-       QTreeWidgetItem *action = new QTreeWidgetItem (date_start, columns);
-       action->setIcon (0,actionIcon (item_ptr->action()) );
-       return true;
+        YQSignalBlocker( this );
+
+       _actionsTree->expandItem( items.first() );
+       _actionsTree->setCurrentItem( items.first() );
+       _actionsTree->scrollToItem( items.first(), 
QAbstractItemView::PositionAtTop );
     }
-};
+}
 
 
 void
-YQPkgHistoryDialog::initialize()
+YQPkgHistoryDialog::selectAction()
 {
-    HistoryItemCollector ic;
+    QTreeWidgetItem * item = _actionsTree->selectedItems().first();
 
-    ic.actions = _actions;
-    ic.dates = _dates;
-    zypp::parser::HistoryLogReader reader(FILENAME, 
zypp::parser::HistoryLogReader::Options(), boost::ref(ic));
+    // if this is not a top-level item, better pick a top-level one
 
-    try
+    if ( item->parent() )
+       item = item->parent();
+
+    QList<QTreeWidgetItem *> items = _datesTree->findItems( item->text( 0 ),
+                                                            Qt::MatchExactly | 
Qt::MatchRecursive,
+                                                            0 );
+    if (  items.size() > 0 )
     {
-       reader.readAll();
+        YQSignalBlocker( this );
+       _datesTree->setCurrentItem( items.first());
     }
-    catch (const zypp::Exception & exception)
-    {
-        yuiWarning() << "CAUGHT zypp exception: " << exception.asUserHistory() 
<< endl;
+}
 
-        QMessageBox msgBox;
 
-        // Translators: This is a (short) text indicating that something went
-        // wrong while trying to read history file.
+//
+//----------------------------------------------------------------------
+//
 
-        QString heading = _( "Unable to read history" );
 
-        if ( heading.length() < 25 )    // Avoid very narrow message boxes
-        {
-            QString blanks;
-            blanks.fill( ' ', 50 - heading.length() );
-            heading += blanks;
-        }
-
-        msgBox.setText( heading );
-        msgBox.setIcon( QMessageBox::Warning );
-        msgBox.setInformativeText( fromUTF8( exception.asUserHistory() ) );
-        msgBox.exec();
-    }
+YQPkgHistoryItemCollector::YQPkgHistoryItemCollector( QTreeWidget * datesTree,
+                                                      QTreeWidget * 
actionsTree )
+    : _datesTree( datesTree )
+    , _actionsTree( actionsTree )
+{
+    // NOP
 }
 
 
-void
-YQPkgHistoryDialog::moveToDate ()
+bool
+YQPkgHistoryItemCollector::operator() ( const zypp::HistoryLogData::Ptr & 
item_ptr )
 {
-    if (signalsBlocked() ) return;
-    QString item = _dates->selectedItems().first()->text(0);
-    QList<QTreeWidgetItem *> items = _actions->findItems (item, 
Qt::MatchExactly, 0);
+    QString actionDate = fromUTF8( item_ptr->date().form( "%e %B %Y" ) );
+
+    if ( actionDate != _lastDate ) // First action for a new date?
+    {
+        addDatesTreeItem( actionDate );
+        addActionsDateItem( actionDate );
+
+        _lastDate = actionDate;
+    }
+
+    QStringList columns = actionColumns( item_ptr );
 
-    if( items.size () > 0 )
+    if ( ! columns.isEmpty() )
     {
-       blockSignals(true);
-       _actions->expandItem (items.first());
-       _actions->setCurrentItem (items.first());
-       _actions->scrollToItem( items.first(), QAbstractItemView::PositionAtTop 
);
-       blockSignals(false);
+        QTreeWidgetItem * actionItem = new QTreeWidgetItem( _actionsDateItem, 
columns );
+        actionItem->setIcon( 0, actionIcon( item_ptr->action() ) );
     }
+
+    return true;
 }
 
+
 void
-YQPkgHistoryDialog::moveToAction ()
+YQPkgHistoryItemCollector::addDatesTreeItem( const QString & actionDate )
 {
-    if (signalsBlocked() ) return;
-    QTreeWidgetItem* item = _actions->selectedItems().first();
+    new QTreeWidgetItem( _datesTree, QStringList( actionDate ) );
+}
 
-    // if this is not top-level item, better pick top-level one
-    if (item->parent ())
-       item = item->parent ();
 
-    QList<QTreeWidgetItem *> items = _dates->findItems (item->text(0), 
Qt::MatchExactly | Qt::MatchRecursive, 0);
+void
+YQPkgHistoryItemCollector::addActionsDateItem( const QString & actionDate )
+{
+    _actionsDateItem = new QTreeWidgetItem( _actionsTree, QStringList( 
actionDate ) );
+    _actionsDateItem->setExpanded( true );
+}
 
-    if( items.size () > 0 )
+
+QStringList
+YQPkgHistoryItemCollector::actionColumns( const zypp::HistoryLogData::Ptr & 
item_ptr )
+{
+    QStringList columns;
+
+    switch ( item_ptr->action().toEnum() )
     {
-       blockSignals(true);
-       _dates->setCurrentItem (items.first());
-       blockSignals(false);
+        case zypp::HistoryActionID::INSTALL_e:
+            {
+                zypp::HistoryLogDataInstall * item =
+                    static_cast <zypp::HistoryLogDataInstall *>( 
item_ptr.get() );
+
+                columns << fromUTF8( item->name() );
+                columns << fromUTF8( item->edition().version() );
+            }
+            break;
+
+        case zypp::HistoryActionID::REMOVE_e:
+            {
+                zypp::HistoryLogDataRemove * item =
+                    static_cast <zypp::HistoryLogDataRemove *>( item_ptr.get() 
);
+
+                columns << fromUTF8( item->name() );
+                columns << fromUTF8( item->edition().version() );
+            }
+            break;
+
+        case zypp::HistoryActionID::REPO_ADD_e:
+            {
+                zypp::HistoryLogDataRepoAdd * item =
+                    static_cast <zypp::HistoryLogDataRepoAdd *>( 
item_ptr.get() );
+
+                columns << fromUTF8( item->alias() );
+                columns << fromUTF8( item->url().asString() );
+            }
+            break;
+
+        case zypp::HistoryActionID::REPO_REMOVE_e:
+            {
+                zypp::HistoryLogDataRepoRemove * item =
+                    static_cast <zypp::HistoryLogDataRepoRemove *>( 
item_ptr.get() );
+
+                columns << fromUTF8( item->alias() );
+            }
+            break;
+
+        case zypp::HistoryActionID::REPO_CHANGE_ALIAS_e:
+            {
+                zypp::HistoryLogDataRepoAliasChange * item =
+                    static_cast <zypp::HistoryLogDataRepoAliasChange *>( 
item_ptr.get() );
+
+                columns << fromUTF8( item->oldAlias() ) + " -> " + fromUTF8( 
item->newAlias() );
+            }
+            break;
+
+        case zypp::HistoryActionID::REPO_CHANGE_URL_e:
+            {
+                zypp::HistoryLogDataRepoUrlChange * item =
+                    static_cast <zypp::HistoryLogDataRepoUrlChange *>( 
item_ptr.get() );
+
+                columns << fromUTF8( item->alias() );
+                columns << fromUTF8( item->newUrl().asString() );
+            }
+            break;
+
+        default:
+            break;
     }
+
+    return columns;
 }
 
+
+QPixmap
+YQPkgHistoryItemCollector::actionIcon( zypp::HistoryActionID id )
+{
+    switch ( id.toEnum() )
+    {
+        case zypp::HistoryActionID::INSTALL_e:     return 
YQIconPool::pkgInstall();
+        case zypp::HistoryActionID::REMOVE_e:      return YQIconPool::pkgDel();
+        case zypp::HistoryActionID::REPO_REMOVE_e: return 
YQIconPool::treeMinus();
+        case zypp::HistoryActionID::REPO_ADD_e:    return 
YQIconPool::treePlus();
+
+        default: return QPixmap();
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/libyui-qt-pkg/src/YQPkgHistoryDialog.h 
new/libyui-4.2.17/libyui-qt-pkg/src/YQPkgHistoryDialog.h
--- old/libyui-4.2.16/libyui-qt-pkg/src/YQPkgHistoryDialog.h    2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/libyui-qt-pkg/src/YQPkgHistoryDialog.h    2021-10-13 
16:38:45.000000000 +0200
@@ -24,7 +24,8 @@
 #ifndef YQPkgHistoryDialog_h
 #define YQPkgHistoryDialog_h
 
-#include <qdialog.h>
+#include <QDialog>
+#include <zypp/parser/HistoryLogReader.h>
 
 
 class YQPkgList;
@@ -42,36 +43,104 @@
 public:
 
     /**
-     * Static convenience method: Post a History dialog for pkg 'pkgName'.
+     * Static convenience method: Post a history dialog.
      **/
     static void showHistoryDialog( QWidget* parent = 0);
 
+
+protected:
+
     /**
-     * Returns the preferred size.
-     *
-     * Reimplemented from QWidget to limit the dialog to the screen dimensions.
+     * Constructor: Creates a dialog for the zypp history.
+     * Use the static showHistoryDialog() method instead.
+     **/
+    YQPkgHistoryDialog( QWidget * parent );
+
+    /**
+     * Fill the trees with content.
+     **/
+    void populate();
+
+    /**
+     * Show a warning pop-up if there was an error reading the history file.
+     **/
+    void showReadHistoryWarning( const QString & message );
+
+
+protected slots:
+
+    void selectDate();
+    void selectAction();
+
+
+protected:
+
+    // Data members
+
+    QTreeWidget * _datesTree;   // Flat list for dates
+    QTreeWidget * _actionsTree; // Tree with action items below date items
+};
+
+
+/**
+ * Helper class to populate both tree widgets in this dialog with zypp history
+ * actions.
+ *
+ * This is used as a functor for a zypp::parser::HistoryLogReader where it is
+ * called for each history item found while parsing the history file.
+ **/
+class YQPkgHistoryItemCollector
+{
+public:
+
+    /**
+     * Constructor. This stores the widget pointers so items can later be added
+     * to those trees when libzypp calls operator() for each history item.
+     **/
+    YQPkgHistoryItemCollector( QTreeWidget * datesTree,
+                               QTreeWidget * actionsTree );
+
+    /**
+     * Functor method that is called by zypp::parser::HistoryLogReader for each
+     * history item (for each action). This will add an item for the action
+     * and, if needed, a parent item for the date and an item in the dates
+     * tree.
      **/
-    virtual QSize sizeHint () const;
+    bool operator() ( const zypp::HistoryLogData::Ptr & item_ptr );
 
-    
 protected:
 
-    void initialize ();
+    /**
+     * Add one item in the "dates" tree for the specified date.
+     **/
+    void addDatesTreeItem  ( const QString & actionDate );
+
+    /**
+     * Add one item in the "actions" tree for the specified date.
+     * This item will act as the parent item for all actions on that date.
+     **/
+    void addActionsDateItem( const QString & actionDate );
 
     /**
-     * Constructor: Creates a History dialog for all packages that match 
'pkgName'.
+     * Format columns for one action, depending on the action type.
+     *
+     * Return an empty QStringList if this is not an action that is suitable to
+     * be shown to the user.
      **/
-    YQPkgHistoryDialog( QWidget *              parent );
+    QStringList actionColumns( const zypp::HistoryLogData::Ptr & item_ptr );
+
+    /**
+     * Return a suitable icon for an action.
+     **/
+    QPixmap actionIcon( zypp::HistoryActionID id );
+
 
     // Data members
-    
-    QTreeWidget * _dates;
-    QTreeWidget * _actions;
-
-public slots:
-    void moveToDate ();
-    void moveToAction ();
 
+    QTreeWidget *     _datesTree;
+    QTreeWidget *     _actionsTree;
+    QTreeWidgetItem * _actionsDateItem;  // parent item for all actions of 
this date
+    QString           _lastDate;         // initialized empty like all QStrings
 };
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libyui-4.2.16/libyui-qt-pkg/src/YQPkgSecondaryFilterView.cc 
new/libyui-4.2.17/libyui-qt-pkg/src/YQPkgSecondaryFilterView.cc
--- old/libyui-4.2.16/libyui-qt-pkg/src/YQPkgSecondaryFilterView.cc     
2021-09-01 09:10:04.000000000 +0200
+++ new/libyui-4.2.17/libyui-qt-pkg/src/YQPkgSecondaryFilterView.cc     
2021-10-13 16:38:45.000000000 +0200
@@ -14,6 +14,10 @@
   Floor, Boston, MA 02110-1301 USA
 */
 
+/*
+  Textdomain "qt-pkg"
+*/
+
 
 #define YUILogComponent "qt-pkg"
 #include <yui/YUILog.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui-bindings.spec 
new/libyui-4.2.17/package/libyui-bindings.spec
--- old/libyui-4.2.16/package/libyui-bindings.spec      2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/package/libyui-bindings.spec      2021-10-13 
16:38:45.000000000 +0200
@@ -20,7 +20,7 @@
 Name:           libyui-bindings
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 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.2.16/package/libyui-ncurses-pkg.spec 
new/libyui-4.2.17/package/libyui-ncurses-pkg.spec
--- old/libyui-4.2.16/package/libyui-ncurses-pkg.spec   2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/package/libyui-ncurses-pkg.spec   2021-10-13 
16:38:45.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-ncurses-pkg
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui-ncurses-rest-api.spec 
new/libyui-4.2.17/package/libyui-ncurses-rest-api.spec
--- old/libyui-4.2.16/package/libyui-ncurses-rest-api.spec      2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/package/libyui-ncurses-rest-api.spec      2021-10-13 
16:38:45.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.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui-ncurses.spec 
new/libyui-4.2.17/package/libyui-ncurses.spec
--- old/libyui-4.2.16/package/libyui-ncurses.spec       2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/package/libyui-ncurses.spec       2021-10-13 
16:38:45.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-ncurses
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui-qt-graph.spec 
new/libyui-4.2.17/package/libyui-qt-graph.spec
--- old/libyui-4.2.16/package/libyui-qt-graph.spec      2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/package/libyui-qt-graph.spec      2021-10-13 
16:38:45.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-graph
 
 # DO NOT manually bump the version here; instead, use   rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui-qt-pkg.spec 
new/libyui-4.2.17/package/libyui-qt-pkg.spec
--- old/libyui-4.2.16/package/libyui-qt-pkg.spec        2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/package/libyui-qt-pkg.spec        2021-10-13 
16:38:45.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt-pkg
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui-qt-rest-api.spec 
new/libyui-4.2.17/package/libyui-qt-rest-api.spec
--- old/libyui-4.2.16/package/libyui-qt-rest-api.spec   2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/package/libyui-qt-rest-api.spec   2021-10-13 
16:38:45.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.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui-qt.spec 
new/libyui-4.2.17/package/libyui-qt.spec
--- old/libyui-4.2.16/package/libyui-qt.spec    2021-09-01 09:10:04.000000000 
+0200
+++ new/libyui-4.2.17/package/libyui-qt.spec    2021-10-13 16:38:45.000000000 
+0200
@@ -19,7 +19,7 @@
 Name:           libyui-qt
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui-rest-api.spec 
new/libyui-4.2.17/package/libyui-rest-api.spec
--- old/libyui-4.2.16/package/libyui-rest-api.spec      2021-09-01 
09:10:04.000000000 +0200
+++ new/libyui-4.2.17/package/libyui-rest-api.spec      2021-10-13 
16:38:45.000000000 +0200
@@ -19,7 +19,7 @@
 Name:           libyui-rest-api
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui.changes 
new/libyui-4.2.17/package/libyui.changes
--- old/libyui-4.2.16/package/libyui.changes    2021-09-01 09:10:04.000000000 
+0200
+++ new/libyui-4.2.17/package/libyui.changes    2021-10-13 16:38:45.000000000 
+0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Wed Oct 13 09:39:18 UTC 2021 - Stefan Hundhammer <shundham...@suse.com>
+
+- Fixed empty entries in YQPackageSelector Zypp history window
+  (bsc#1191430)
+- Added missing textdomain (bsc#1190805)
+- 4.2.17
+
+-------------------------------------------------------------------
 Tue Aug 24 15:30:52 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
 
 - Fixed using an uninitialized variable, in some situations
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libyui-4.2.16/package/libyui.spec 
new/libyui-4.2.17/package/libyui.spec
--- old/libyui-4.2.16/package/libyui.spec       2021-09-01 09:10:04.000000000 
+0200
+++ new/libyui-4.2.17/package/libyui.spec       2021-10-13 16:38:45.000000000 
+0200
@@ -19,7 +19,7 @@
 Name:           libyui
 
 # DO NOT manually bump the version here; instead, use rake version:bump
-Version:        4.2.16
+Version:        4.2.17
 Release:        0
 
 %define         so_version 15

Reply via email to