Hello community, here is the log from the commit of package libyui-qt for openSUSE:Factory checked in at 2020-06-10 00:39:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui-qt (Old) and /work/SRC/openSUSE:Factory/.libyui-qt.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-qt" Wed Jun 10 00:39:08 2020 rev:70 rq:812569 version:2.53.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libyui-qt/libyui-qt.changes 2020-03-27 21:56:32.614766442 +0100 +++ /work/SRC/openSUSE:Factory/.libyui-qt.new.3606/libyui-qt.changes 2020-06-10 00:39:25.181557757 +0200 @@ -1,0 +2,14 @@ +Thu Jun 4 11:58:01 UTC 2020 - Stefan Hundhammer <[email protected]> + +- Added autoWrap to label widget (bsc#1172513) +- Bumped SO version to 12 +- 2.53.0 + + +------------------------------------------------------------------- +Wed May 20 10:00:31 UTC 2020 - Stefan Hundhammer <[email protected]> + +- Fixed build failures with older Qt versions (pre-5.15) (bsc#1165118) +- 2.52.4 + +------------------------------------------------------------------- @@ -5 +19 @@ -- 2.53.3 +- 2.52.3 Old: ---- libyui-qt-2.52.3.tar.bz2 New: ---- libyui-qt-2.53.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyui-qt-doc.spec ++++++ --- /var/tmp/diff_new_pack.FeVgpf/_old 2020-06-10 00:39:26.381560904 +0200 +++ /var/tmp/diff_new_pack.FeVgpf/_new 2020-06-10 00:39:26.385560915 +0200 @@ -17,11 +17,11 @@ %define parent libyui-qt -%define so_version 11 +%define so_version 12 Name: %{parent}-doc # DO NOT manually bump the version here; instead, use rake version:bump -Version: 2.52.3 +Version: 2.53.0 Release: 0 Source: %{parent}-%{version}.tar.bz2 ++++++ libyui-qt.spec ++++++ --- /var/tmp/diff_new_pack.FeVgpf/_old 2020-06-10 00:39:26.405560967 +0200 +++ /var/tmp/diff_new_pack.FeVgpf/_new 2020-06-10 00:39:26.405560967 +0200 @@ -18,11 +18,11 @@ Name: libyui-qt # DO NOT manually bump the version here; instead, use rake version:bump -Version: 2.52.3 +Version: 2.53.0 Release: 0 Source: %{name}-%{version}.tar.bz2 -%define so_version 11 +%define so_version 12 %define bin_name %{name}%{so_version} BuildRequires: boost-devel @@ -30,7 +30,7 @@ BuildRequires: gcc-c++ BuildRequires: pkg-config -%define libyui_devel_version libyui-devel >= 3.9.1 +%define libyui_devel_version libyui-devel >= 3.10.0 BuildRequires: %{libyui_devel_version} BuildRequires: fontconfig-devel BuildRequires: pkgconfig(Qt5Core) ++++++ libyui-qt-2.52.3.tar.bz2 -> libyui-qt-2.53.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/VERSION.cmake new/libyui-qt-2.53.0/VERSION.cmake --- old/libyui-qt-2.52.3/VERSION.cmake 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/VERSION.cmake 2020-06-08 13:09:21.000000000 +0200 @@ -1,11 +1,11 @@ SET(VERSION_MAJOR "2") -SET(VERSION_MINOR "52") -SET(VERSION_PATCH "3") +SET(VERSION_MINOR "53") +SET(VERSION_PATCH "0") SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" ) ##### This is needed for the libyui-qt core ONLY. ##### These will be overridden from exports in LibyuiConfig.cmake -SET( SONAME_MAJOR "11" ) +SET( SONAME_MAJOR "12" ) SET( SONAME_MINOR "0" ) SET( SONAME_PATCH "0" ) SET( SONAME "${SONAME_MAJOR}.${SONAME_MINOR}.${SONAME_PATCH}" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/package/libyui-qt-doc.spec new/libyui-qt-2.53.0/package/libyui-qt-doc.spec --- old/libyui-qt-2.52.3/package/libyui-qt-doc.spec 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/package/libyui-qt-doc.spec 2020-06-08 13:09:21.000000000 +0200 @@ -17,11 +17,11 @@ %define parent libyui-qt -%define so_version 11 +%define so_version 12 Name: %{parent}-doc # DO NOT manually bump the version here; instead, use rake version:bump -Version: 2.52.3 +Version: 2.53.0 Release: 0 Source: %{parent}-%{version}.tar.bz2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/package/libyui-qt.changes new/libyui-qt-2.53.0/package/libyui-qt.changes --- old/libyui-qt-2.52.3/package/libyui-qt.changes 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/package/libyui-qt.changes 2020-06-08 13:09:21.000000000 +0200 @@ -1,8 +1,22 @@ ------------------------------------------------------------------- +Thu Jun 4 11:58:01 UTC 2020 - Stefan Hundhammer <[email protected]> + +- Added autoWrap to label widget (bsc#1172513) +- Bumped SO version to 12 +- 2.53.0 + + +------------------------------------------------------------------- +Wed May 20 10:00:31 UTC 2020 - Stefan Hundhammer <[email protected]> + +- Fixed build failures with older Qt versions (pre-5.15) (bsc#1165118) +- 2.52.4 + +------------------------------------------------------------------- Tue Mar 24 16:18:31 UTC 2020 - Stefan Hundhammer <[email protected]> - Fixed Qt 5.15 deprecated warnings (bsc#1165118) -- 2.53.3 +- 2.52.3 ------------------------------------------------------------------- Mon Feb 17 11:29:24 UTC 2020 - Stefan Hundhammer <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/package/libyui-qt.spec new/libyui-qt-2.53.0/package/libyui-qt.spec --- old/libyui-qt-2.52.3/package/libyui-qt.spec 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/package/libyui-qt.spec 2020-06-08 13:09:21.000000000 +0200 @@ -18,11 +18,11 @@ Name: libyui-qt # DO NOT manually bump the version here; instead, use rake version:bump -Version: 2.52.3 +Version: 2.53.0 Release: 0 Source: %{name}-%{version}.tar.bz2 -%define so_version 11 +%define so_version 12 %define bin_name %{name}%{so_version} BuildRequires: boost-devel @@ -30,7 +30,7 @@ BuildRequires: gcc-c++ BuildRequires: pkg-config -%define libyui_devel_version libyui-devel >= 3.9.1 +%define libyui_devel_version libyui-devel >= 3.10.0 BuildRequires: %{libyui_devel_version} BuildRequires: fontconfig-devel BuildRequires: pkgconfig(Qt5Core) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/QY2Styler.cc new/libyui-qt-2.53.0/src/QY2Styler.cc --- old/libyui-qt-2.52.3/src/QY2Styler.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/QY2Styler.cc 2020-06-08 13:09:21.000000000 +0200 @@ -301,7 +301,7 @@ { // Don't use yuiDebug() here - deadlock (reason unknown so far) in thread handling! - qDebug() << "Registering " << widget << " for parent " << parent << Qt::endl; + qDebug() << "Registering " << widget << " for parent " << parent << "\n"; widget->installEventFilter( this ); _children[parent].push_back( widget ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQApplication.cc new/libyui-qt-2.53.0/src/YQApplication.cc --- old/libyui-qt-2.52.3/src/YQApplication.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQApplication.cc 2020-06-08 13:09:21.000000000 +0200 @@ -54,14 +54,17 @@ #include "YQContextMenu.h" using std::string; +using std::endl; -// Qt5 requires the explicit font initialization; otherwise it picks up + +// Qt5 requires explicit font initialization; otherwise it picks up // any random matching fonts, and tends to choose the worst one // (e.g. bitmap fonts) in the end. (bnc#879991) // Note that this is also set in LANG_FONTS_FILE static const char * default_font_family = "Sans Serif"; + YQApplication::YQApplication() : YApplication() , _currentFont( 0 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQCheckBoxFrame.cc new/libyui-qt-2.53.0/src/YQCheckBoxFrame.cc --- old/libyui-qt-2.52.3/src/YQCheckBoxFrame.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQCheckBoxFrame.cc 2020-06-08 13:09:21.000000000 +0200 @@ -38,6 +38,7 @@ #define TOP_MARGIN 6 using std::string; +using std::endl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQComboBox.cc new/libyui-qt-2.53.0/src/YQComboBox.cc --- old/libyui-qt-2.52.3/src/YQComboBox.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQComboBox.cc 2020-06-08 13:09:21.000000000 +0200 @@ -43,6 +43,7 @@ #include <QDebug> using std::string; +using std::endl; @@ -76,8 +77,25 @@ this, &pclass(this)::slotSelected ); #endif +#if (QT_VERSION < QT_VERSION_CHECK( 5, 15, 0 )) + + // The Trolls introduced a bunch of SOURCE CODE INCOMPATIBILITIES in a MINOR RELEASE! + // With Qt 5.15, they deprecated a ton of functions, causing a ton of warnings. + // For us, this means a build failure because we always compile with -Werror, + // promoting all warnings to errors. + // + // Seriously, Trolls, WTF?!? + // + // And now we have to live with ugly stuff like this #if QT_VERSION. Thanks a lot. + // + // -- 2020-05-20 HuHa + + connect( _qt_comboBox, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::activated), + this, &pclass(this)::textChanged ); +#else connect( _qt_comboBox, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::textActivated), this, &pclass(this)::textChanged ); +#endif connect( _qt_comboBox, &pclass(_qt_comboBox)::editTextChanged, this, &pclass(this)::textChanged ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQContextMenu.cc new/libyui-qt-2.53.0/src/YQContextMenu.cc --- old/libyui-qt-2.52.3/src/YQContextMenu.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQContextMenu.cc 2020-06-08 13:09:21.000000000 +0200 @@ -33,6 +33,9 @@ #include "YQContextMenu.h" #include <yui/YEvent.h> +using std::endl; + + YQContextMenu::YQContextMenu() : QObject () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQDialog.cc new/libyui-qt-2.53.0/src/YQDialog.cc --- old/libyui-qt-2.52.3/src/YQDialog.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQDialog.cc 2020-06-08 13:09:21.000000000 +0200 @@ -50,6 +50,8 @@ #define VERBOSE_EVENT_LOOP 0 +using std::endl; + YQDialog::YQDialog( YDialogType dialogType, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQDumbTab.cc new/libyui-qt-2.53.0/src/YQDumbTab.cc --- old/libyui-qt-2.52.3/src/YQDumbTab.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQDumbTab.cc 2020-06-08 13:09:21.000000000 +0200 @@ -41,6 +41,9 @@ #define YQDumbTabSpacing 2 #define YQDumbTabFrameMargin 2 +using std::endl; + + YQDumbTab::YQDumbTab( YWidget * parent ) : QWidget( (QWidget *) parent->widgetRep() ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQGenericButton.cc new/libyui-qt-2.53.0/src/YQGenericButton.cc --- old/libyui-qt-2.52.3/src/YQGenericButton.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQGenericButton.cc 2020-06-08 13:09:21.000000000 +0200 @@ -38,6 +38,7 @@ #include "YQDialog.h" using std::string; +using std::endl; YQGenericButton::YQGenericButton( YWidget * parent, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQImage.cc new/libyui-qt-2.53.0/src/YQImage.cc --- old/libyui-qt-2.52.3/src/YQImage.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQImage.cc 2020-06-08 13:09:21.000000000 +0200 @@ -36,6 +36,7 @@ #include "YQImage.h" using std::string; +using std::endl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQInputField.cc new/libyui-qt-2.53.0/src/YQInputField.cc --- old/libyui-qt-2.52.3/src/YQInputField.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQInputField.cc 2020-06-08 13:09:21.000000000 +0200 @@ -47,6 +47,7 @@ #include <X11/keysym.h> // CapsLock detection using std::string; +using std::endl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQLabel.cc new/libyui-qt-2.53.0/src/YQLabel.cc --- old/libyui-qt-2.52.3/src/YQLabel.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQLabel.cc 2020-06-08 13:09:21.000000000 +0200 @@ -33,6 +33,9 @@ #include "YQApplication.h" #include "YQLabel.h" +#define AUTO_WRAP_WIDTH 150 +#define AUTO_WRAP_HEIGHT 10 + using std::string; @@ -43,6 +46,7 @@ bool isOutputField ) : QLabel( (QWidget *) parent->widgetRep() ) , YLabel( parent, text, isHeading, isOutputField ) + , _layoutPass1Width( 0 ) { setWidgetRep( this ); @@ -90,6 +94,13 @@ } +void YQLabel::setAutoWrap( bool autoWrap ) +{ + YLabel::setAutoWrap( autoWrap ); + QLabel::setWordWrap( autoWrap ); +} + + void YQLabel::setEnabled( bool enabled ) { QLabel::setEnabled( enabled ); @@ -99,17 +110,87 @@ int YQLabel::preferredWidth() { - return sizeHint().width(); + int width; + + if ( autoWrap() ) + { + if ( layoutPass() == 2 ) + { + // Use the width passed down to us from the parent layout manager + // in the last setSize() call. This is the definitive width that + // will be used after taking all other children of the layout into + // consideration, also including making widgets smaller due to size + // restrictions, or redistributing excess space. + // + // Since this widget can auto-wrap its contents, we accept + // basically any width; we just need to adapt the preferred height + // accordingly. + width = _layoutPass1Width; + } + else + { + // Use a preliminary width. Typically, this widget should be + // wrapped into a MinSize or MinWidth which hopefully gives us a + // much more useful width than this. + // + // We would also just use 0 here, but that would make debugging + // really hard since the widget might completly disappear. + // + // The real width that will be used will be set in the setSize() + // call following the recursive preferredWidth() / + // preferredHeight() calls in the widget tree. + width = AUTO_WRAP_WIDTH; + } + } + else // ! autoWrap() + { + width = sizeHint().width(); + } + + return width; } int YQLabel::preferredHeight() { - return sizeHint().height(); + int height; + + if ( autoWrap() ) + { + if ( layoutPass() == 2 ) + { + // This is where the magic happens: + // + // setSize() in the first layout pass gave us the real width which + // we stored in _layoutPass1Width. We can now calculate the height + // that is really needed based on that width. QLabel provides this + // handy function that takes word wrapping and font metrics into + // account (remember, we are using a proportional font, so every + // letter has a different width). + + height = heightForWidth( _layoutPass1Width ); + } + else + { + height = AUTO_WRAP_HEIGHT; + } + } + else // ! autoWrap() + { + height = sizeHint().height(); + } + + return height; } void YQLabel::setSize( int newWidth, int newHeight ) { + if ( autoWrap() ) + { + _layoutPass1Width = layoutPass() == 1 ? + newWidth : 0; + } + resize( newWidth, newHeight ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQLabel.h new/libyui-qt-2.53.0/src/YQLabel.h --- old/libyui-qt-2.52.3/src/YQLabel.h 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQLabel.h 2020-06-08 13:09:21.000000000 +0200 @@ -63,6 +63,13 @@ **/ virtual void setUseBoldFont( bool bold ); + /* + * Enable or disable automatic word wrapping. + * + * Reimplemented from YLabel. + **/ + virtual void setAutoWrap( bool autoWrap = true ); + /** * Set enabled / disabled state. * @@ -90,6 +97,10 @@ * Reimplemented from YWidget. **/ virtual void setSize( int newWidth, int newHeight ); + +protected: + + int _layoutPass1Width; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQMultiProgressMeter.cc new/libyui-qt-2.53.0/src/YQMultiProgressMeter.cc --- old/libyui-qt-2.52.3/src/YQMultiProgressMeter.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQMultiProgressMeter.cc 2020-06-08 13:09:21.000000000 +0200 @@ -34,6 +34,8 @@ #include "YQMultiProgressMeter.h" #include <yui/YDialog.h> +using std::endl; + YQMultiProgressMeter::YQMultiProgressMeter( YWidget * parent, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQRadioButton.cc new/libyui-qt-2.53.0/src/YQRadioButton.cc --- old/libyui-qt-2.52.3/src/YQRadioButton.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQRadioButton.cc 2020-06-08 13:09:21.000000000 +0200 @@ -38,6 +38,7 @@ #include "YQSignalBlocker.h" using std::string; +using std::endl; #define SPACING 8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQSelectionBox.cc new/libyui-qt-2.53.0/src/YQSelectionBox.cc --- old/libyui-qt-2.52.3/src/YQSelectionBox.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQSelectionBox.cc 2020-06-08 13:09:21.000000000 +0200 @@ -47,6 +47,7 @@ #define SHRINKABLE_VISIBLE_LINES 2 using std::string; +using std::endl; YQSelectionBox::YQSelectionBox( YWidget * parent, const string & label ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQTable.cc new/libyui-qt-2.53.0/src/YQTable.cc --- old/libyui-qt-2.52.3/src/YQTable.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQTable.cc 2020-06-08 13:09:21.000000000 +0200 @@ -39,6 +39,9 @@ #include "YQApplication.h" +using std::endl; + + YQTable::YQTable( YWidget * parent, YTableHeader * tableHeader, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-2.52.3/src/YQUI_builtins.cc new/libyui-qt-2.53.0/src/YQUI_builtins.cc --- old/libyui-qt-2.52.3/src/YQUI_builtins.cc 2020-03-24 18:23:01.000000000 +0100 +++ new/libyui-qt-2.53.0/src/YQUI_builtins.cc 2020-06-08 13:09:21.000000000 +0200 @@ -60,6 +60,7 @@ #define DEFAULT_MACRO_FILE_NAME "macro.ycp" using std::string; +using std::endl;
