Hello community, here is the log from the commit of package libyui-qt for openSUSE:Factory checked in at 2019-01-21 10:07:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui-qt (Old) and /work/SRC/openSUSE:Factory/.libyui-qt.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-qt" Mon Jan 21 10:07:58 2019 rev:54 rq:664699 version:2.49.14 Changes: -------- --- /work/SRC/openSUSE:Factory/libyui-qt/libyui-qt.changes 2018-12-31 09:44:23.938314412 +0100 +++ /work/SRC/openSUSE:Factory/.libyui-qt.new.28833/libyui-qt.changes 2019-01-21 10:08:01.814820103 +0100 @@ -1,0 +2,6 @@ +Thu Jan 10 11:30:28 UTC 2019 - Stefan Hundhammer <[email protected]> + +- Fixed segfault in YQTableItem icon (bsc#1121083) +- 2.49.14 + +------------------------------------------------------------------- Old: ---- libyui-qt-2.49.13.tar.bz2 New: ---- libyui-qt-2.49.14.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyui-qt-doc.spec ++++++ --- /var/tmp/diff_new_pack.9UfWmW/_old 2019-01-21 10:08:02.286819626 +0100 +++ /var/tmp/diff_new_pack.9UfWmW/_new 2019-01-21 10:08:02.290819621 +0100 @@ -1,7 +1,7 @@ # # spec file for package libyui-qt-doc # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ %define so_version 9 Name: %{parent}-doc -Version: 2.49.13 +Version: 2.49.14 Release: 0 Source: %{parent}-%{version}.tar.bz2 ++++++ libyui-qt.spec ++++++ --- /var/tmp/diff_new_pack.9UfWmW/_old 2019-01-21 10:08:02.302819609 +0100 +++ /var/tmp/diff_new_pack.9UfWmW/_new 2019-01-21 10:08:02.302819609 +0100 @@ -1,7 +1,7 @@ # # spec file for package libyui-qt # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: libyui-qt -Version: 2.49.13 +Version: 2.49.14 Release: 0 Source: %{name}-%{version}.tar.bz2 ++++++ libyui-qt-2.49.13.tar.bz2 -> libyui-qt-2.49.14.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/VERSION.cmake new/libyui-qt-2.49.14/VERSION.cmake --- old/libyui-qt-2.49.13/VERSION.cmake 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/VERSION.cmake 2019-01-10 12:46:43.000000000 +0100 @@ -1,6 +1,6 @@ SET(VERSION_MAJOR "2") SET(VERSION_MINOR "49") -SET(VERSION_PATCH "13") +SET(VERSION_PATCH "14") SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" ) ##### This is needed for the libyui-qt core ONLY. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/package/libyui-qt-doc.spec new/libyui-qt-2.49.14/package/libyui-qt-doc.spec --- old/libyui-qt-2.49.13/package/libyui-qt-doc.spec 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/package/libyui-qt-doc.spec 2019-01-10 12:46:43.000000000 +0100 @@ -20,7 +20,7 @@ %define so_version 9 Name: %{parent}-doc -Version: 2.49.13 +Version: 2.49.14 Release: 0 Source: %{parent}-%{version}.tar.bz2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/package/libyui-qt.changes new/libyui-qt-2.49.14/package/libyui-qt.changes --- old/libyui-qt-2.49.13/package/libyui-qt.changes 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/package/libyui-qt.changes 2019-01-10 12:46:43.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Jan 10 11:30:28 UTC 2019 - Stefan Hundhammer <[email protected]> + +- Fixed segfault in YQTableItem icon (bsc#1121083) +- 2.49.14 + +------------------------------------------------------------------- Tue Dec 18 14:01:56 UTC 2018 - Stefan Hundhammer <[email protected]> - YImage: Fall back to compiled-in Qt resources (bsc#1119688) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/package/libyui-qt.spec new/libyui-qt-2.49.14/package/libyui-qt.spec --- old/libyui-qt-2.49.13/package/libyui-qt.spec 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/package/libyui-qt.spec 2019-01-10 12:46:43.000000000 +0100 @@ -17,7 +17,7 @@ Name: libyui-qt -Version: 2.49.13 +Version: 2.49.14 Release: 0 Source: %{name}-%{version}.tar.bz2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/src/YQApplication.cc new/libyui-qt-2.49.14/src/YQApplication.cc --- old/libyui-qt-2.49.13/src/YQApplication.cc 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/src/YQApplication.cc 2019-01-10 12:46:43.000000000 +0100 @@ -763,7 +763,8 @@ _contextMenuPos = contextMenuPos; } -void YQApplication::setApplicationTitle ( const string& title ) + +void YQApplication::setApplicationTitle ( const string & title ) { QString qtTitle = fromUTF8( title ); YApplication::setApplicationTitle ( title ); @@ -771,20 +772,23 @@ qApp->setApplicationName(qtTitle); } -void YQApplication::setApplicationIcon ( const string& icon ) + +void YQApplication::setApplicationIcon ( const string & icon ) { QString qtIcon = fromUTF8( icon ); YApplication::setApplicationIcon ( icon ); - QString icon_name = QFileInfo(qtIcon).baseName(); - if (QIcon::hasThemeIcon(icon_name)) + QString icon_name = QFileInfo( qtIcon ).baseName(); + + if ( QIcon::hasThemeIcon( icon_name ) ) { - qApp->setWindowIcon ( QIcon::fromTheme ( icon_name ) ); + qApp->setWindowIcon( QIcon::fromTheme ( icon_name ) ); } else { - QPixmap pixmap (qtIcon); + QPixmap pixmap( qtIcon ); + if ( !pixmap.isNull() ) - qApp->setWindowIcon ( QIcon ( pixmap ) ); + qApp->setWindowIcon( QIcon( pixmap ) ); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/src/YQImage.cc new/libyui-qt-2.49.14/src/YQImage.cc --- old/libyui-qt-2.49.13/src/YQImage.cc 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/src/YQImage.cc 2019-01-10 12:46:43.000000000 +0100 @@ -86,8 +86,8 @@ if ( QIcon::hasThemeIcon( imageFileName().c_str() ) ) // try the desktop theme first { yuiDebug() << "Trying theme icon from " << imageFileName() << endl; - QIcon icon = QIcon::fromTheme(imageFileName().c_str()); - pixmap = icon.pixmap(22); + QIcon icon = QIcon::fromTheme( imageFileName().c_str() ); + pixmap = icon.pixmap( 22 ); } else // try loading from a plain file { @@ -98,7 +98,7 @@ QString name = QString( ":/%1.svg" ).arg( fromUTF8 ( imageFileName() ) ); yuiDebug() << "Trying built-in Qt resource icon " << name << endl; QIcon icon( name ); - pixmap = icon.pixmap(22); + pixmap = icon.pixmap( 22 ); } if ( pixmap.isNull() ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/src/YQTable.cc new/libyui-qt-2.49.14/src/YQTable.cc --- old/libyui-qt-2.49.13/src/YQTable.cc 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/src/YQTable.cc 2019-01-10 12:46:43.000000000 +0100 @@ -453,9 +453,9 @@ if ( cell->hasIconName() ) { // _table is checked against 0 in the constructor - QIcon icon = icon = YQUI::ui()->loadIcon( cell->iconName() ); + QIcon icon = YQUI::ui()->loadIcon( cell->iconName() ); - if ( !icon.isNull() ) + if ( ! icon.isNull() ) setData( column, Qt::DecorationRole, icon ); } else // No icon name diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/src/YQTimezoneSelector.cc new/libyui-qt-2.49.14/src/YQTimezoneSelector.cc --- old/libyui-qt-2.49.13/src/YQTimezoneSelector.cc 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/src/YQTimezoneSelector.cc 2019-01-10 12:46:43.000000000 +0100 @@ -86,6 +86,7 @@ QPixmap cachePix; }; + static float convert_pos (const QString &pos, int digits) { @@ -103,11 +104,13 @@ return t1 - t2/pow (10.0, fraction.length()); } + bool YQTimezoneSelectorPrivate::Location::operator<(const Location& l1 ) const { return l1.latitude < latitude; } + YQTimezoneSelector::YQTimezoneSelector( YWidget * parent, const std::string & pixmap, const std::map<std::string,std::string> & timezones ) : QFrame( (QWidget *) parent->widgetRep() ) , YTimezoneSelector( parent, pixmap, timezones ) @@ -188,12 +191,14 @@ resize( newWidth, newHeight ); } + QPoint YQTimezoneSelectorPrivate::pixPosition( const Location &pos ) const { return QPoint( (int) ( _pix.width() / 2 + _pix.width() / 2 * pos.longitude / 180 ), (int) ( _pix.height() / 2 - _pix.height() / 2 * pos.latitude / 90 ) ) ; } + void YQTimezoneSelector::mousePressEvent ( QMouseEvent * event ) { if ( event->button() == Qt::RightButton ) @@ -225,6 +230,7 @@ update(); } + void YQTimezoneSelector::paintEvent( QPaintEvent *event ) { QFrame::paintEvent( event ); @@ -242,12 +248,15 @@ } p.drawPixmap( ( width() - d->cachePix.width() ) / 2, ( height() - d->cachePix.height() ) / 2, d->cachePix ); - Q_INIT_RESOURCE(qt_icons); + Q_INIT_RESOURCE( qt_icons ); QIcon icon = QIcon::fromTheme( "zoom-in", QIcon( ":/zoom-in" ) ); + if ( !icon.isNull() ) setCursor( QCursor( icon.pixmap( QSize( 16, 16 ) ) ) ); - } else { - int left = qMin( qMax( d->_zoom.x() - width() / 2, 0 ), d->_pix.width() - width() ); + } + else + { + int left = qMin( qMax( d->_zoom.x() - width() / 2, 0 ), d->_pix.width() - width() ); int top = qMin( qMax( d->_zoom.y() - height() / 2, 0 ), d->_pix.height() - height() ); if ( d->cachePix.isNull() ) @@ -260,6 +269,7 @@ p.setBrush( QColor( "#D8DF57" ) ); p.setPen( QColor( "#B9DFD6" ) ); + for ( QList<YQTimezoneSelectorPrivate::Location>::const_iterator it = d->locations.begin(); it != d->locations.end(); ++it ) { if ( !d->highlight || ( *it ).zone != d->_best.zone ) @@ -272,7 +282,6 @@ } if ( d->highlight > 0 ) { -// QPoint pos = d->pixPosition( d->_best ); static const QColor blinks[] = { QColor( "#00ff00" ), QColor( "#22dd00" ), QColor( "#44bb00" ), QColor( "#669900" ), QColor( "#887700" ), QColor( "#aa5500" ), QColor( "#887700" ), QColor( "#669900" ), QColor( "#44bb00" ), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/src/YQUI.cc new/libyui-qt-2.49.14/src/YQUI.cc --- old/libyui-qt-2.49.13/src/YQUI.cc 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/src/YQUI.cc 2019-01-10 12:46:43.000000000 +0100 @@ -691,21 +691,22 @@ yuiError() << "Client killed. Possibly caused by X server shutdown or crash." << std::endl; } + QIcon YQUI::loadIcon( const string & iconName ) const { QIcon icon; const QString resource = ":/"; + if ( QIcon::hasThemeIcon( iconName.c_str() ) ) { yuiDebug() << "Trying theme icon from: " << iconName << std::endl; - icon = QIcon::fromTheme( iconName.c_str(), QIcon( resource + iconName.c_str() ) ); + icon = QIcon::fromTheme( iconName.c_str() ); } if ( icon.isNull() ) { yuiDebug() << "Trying icon from resource: " << iconName << std::endl; icon = QIcon( resource + iconName.c_str() ); - } if ( icon.isNull() ) @@ -716,6 +717,7 @@ if ( icon.isNull() ) yuiWarning() << "Couldn't load icon: " << iconName << std::endl; + return icon; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/src/YQUI.h new/libyui-qt-2.49.14/src/YQUI.h --- old/libyui-qt-2.49.13/src/YQUI.h 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/src/YQUI.h 2019-01-10 12:46:43.000000000 +0100 @@ -285,9 +285,26 @@ /** * Sets the application name for the window title **/ - void setApplicationTitle(const QString& title) { _applicationTitle=title; } + void setApplicationTitle(const QString & title) { _applicationTitle=title; } - QIcon loadIcon( const string& iconName ) const; + /** + * Load an icon. This tries several locations: + * + * - The icon theme from the current desktop + * - The compiled-in Qt resources + * - An external file + * + * If the icon does not have a filename extension, the icon theme will try + * to append ".svg" and ".png". For the compiled-in Qt resources, there are + * aliases specified ("foo" -> "foo.svg"), so it will also work without an + * extension. + * + * For external files, a path and an extension will be necessary. + * + * If no icon could be loaded, this will return a null QIcon (check with + * icon.isNull()), and a warning is logged. + **/ + QIcon loadIcon( const string & iconName ) const; protected: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.49.13/src/YQWizard.cc new/libyui-qt-2.49.14/src/YQWizard.cc --- old/libyui-qt-2.49.13/src/YQWizard.cc 2018-12-18 15:11:48.000000000 +0100 +++ new/libyui-qt-2.49.14/src/YQWizard.cc 2019-01-10 12:46:43.000000000 +0100 @@ -147,8 +147,6 @@ YQUI::setTextdomain( TEXTDOMAIN ); - //layoutTitleBar( this ); - if( topLevelWidget()->windowTitle().isEmpty() ) { topLevelWidget()->setWindowTitle ( YQUI::ui()->applicationTitle() );
