From 5b39361d97c7e747467a746b6ddc5a8c0608350e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Thu, 18 Apr 2019 14:20:40 +0200 Subject: [PATCH] Compile fix for Leap 15.0 (related to bsc#1130502) - 2.46.2 --- VERSION.cmake | 2 +- package/libyui-qt-pkg-doc.spec | 2 +- package/libyui-qt-pkg.changes | 7 +++++++ package/libyui-qt-pkg.spec | 2 +- src/YQPkgDiskUsageList.cc | 5 +++++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/VERSION.cmake b/VERSION.cmake index 6e20a9b..2e586b4 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,6 +1,6 @@ SET( VERSION_MAJOR "2" ) SET( VERSION_MINOR "46" ) -SET( VERSION_PATCH "1" ) +SET( VERSION_PATCH "2" ) SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" ) ##### This is need for the libyui core, ONLY. diff --git a/package/libyui-qt-pkg-doc.spec b/package/libyui-qt-pkg-doc.spec index 248a698..5476aaf 100644 --- a/package/libyui-qt-pkg-doc.spec +++ b/package/libyui-qt-pkg-doc.spec @@ -20,7 +20,7 @@ %define so_version 10 Name: %{parent}-doc -Version: 2.46.1 +Version: 2.46.2 Release: 0 Source: %{parent}-%{version}.tar.bz2 diff --git a/package/libyui-qt-pkg.changes b/package/libyui-qt-pkg.changes index c695e0a..931db89 100644 --- a/package/libyui-qt-pkg.changes +++ b/package/libyui-qt-pkg.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 18 12:18:53 UTC 2019 - Ladislav Slezak + +- Backward compatibility fix to ensure it still compiles in + Leap 15.0 (related to bsc#1130502) +- 2.46.2 + ------------------------------------------------------------------- Wed Apr 17 14:05:38 UTC 2019 - Stefan Hundhammer diff --git a/package/libyui-qt-pkg.spec b/package/libyui-qt-pkg.spec index b51dcf5..b0f396b 100644 --- a/package/libyui-qt-pkg.spec +++ b/package/libyui-qt-pkg.spec @@ -17,7 +17,7 @@ Name: libyui-qt-pkg -Version: 2.46.1 +Version: 2.46.2 Release: 0 Source: %{name}-%{version}.tar.bz2 diff --git a/src/YQPkgDiskUsageList.cc b/src/YQPkgDiskUsageList.cc index cdbad3e..bb36026 100644 --- a/src/YQPkgDiskUsageList.cc +++ b/src/YQPkgDiskUsageList.cc @@ -45,6 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include #include +#include #include @@ -180,7 +181,11 @@ QSize YQPkgDiskUsageList::sizeHint() const { QFontMetrics fms( font() ); +#if QT_VERSION >= 0x051100 return QSize( fms.horizontalAdvance( "/var/usr/home 100% 100.32GB 100.3GB" ) + 50, 100 ); +#else + return QSize( fms.width( "/var/usr/home 100% 100.32GB 100.3GB" ) + 50, 100 ); +#endif #ifdef FIXME int width = header()->headerWidth()