Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile fix for Leap 15.0 (related to bsc#1130502) #67

Merged
merged 1 commit into from Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion 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.
Expand Down
2 changes: 1 addition & 1 deletion package/libyui-qt-pkg-doc.spec
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions package/libyui-qt-pkg.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Apr 18 12:18:53 UTC 2019 - Ladislav Slezak <lslezak@suse.cz>

- 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 <shundhammer@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/libyui-qt-pkg.spec
Expand Up @@ -17,7 +17,7 @@


Name: libyui-qt-pkg
Version: 2.46.1
Version: 2.46.2
Release: 0
Source: %{name}-%{version}.tar.bz2

Expand Down
5 changes: 5 additions & 0 deletions src/YQPkgDiskUsageList.cc
Expand Up @@ -45,6 +45,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <QStyle>
#include <QHeaderView>
#include <QEvent>
#include <QtGlobal>

#include <zypp/ZYppFactory.h>

Expand Down Expand Up @@ -180,7 +181,11 @@ QSize
YQPkgDiskUsageList::sizeHint() const
{
QFontMetrics fms( font() );
#if QT_VERSION >= 0x051100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's hex - it would be Qt 5.17. Use #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) instead

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Changing in both places with new PRs.

That was a nasty one: This had worked all the time until Qt went for double-digit minor versions (starting with Qt 5.10). Argh. ;-(

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()
Expand Down