File gcc7-fix.patch of Package kate4
From 4d1a7c60f6126faaea0e4efb86471f9df45d1e2e Mon Sep 17 00:00:00 2001
From: Wolfgang Bauer <wbauer@tmo.at>
Date: Sun, 28 May 2017 14:35:41 +0200
Subject: [PATCH] Make compile with MSVC2013 (and GCC7)
Fixes an error when compiling with GCC7:
error: call of overloaded 'abs(uint)' is ambiguous
Backport of https://cgit.kde.org/ktexteditor.git/commit/?id=8b2820b4c95284337b5713ce7f548a456c25279e
from the KF5 ktexteditor.
---
part/view/kateviewhelpers.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/part/view/kateviewhelpers.cpp b/part/view/kateviewhelpers.cpp
index 8ad87710e..fa5ff03e5 100644
--- a/part/view/kateviewhelpers.cpp
+++ b/part/view/kateviewhelpers.cpp
@@ -1703,7 +1703,7 @@ void KateIconBorder::paintBorder (int /*x*/, int y, int /*width*/, int height)
if (realLine > -1) {
if (m_viewInternal->cache()->viewLine(z).startCol() == 0) {
if (m_viRelLineNumbersOn && m_view->viInputMode()) {
- int diff = abs(realLine - currentLine);
+ int diff = abs(realLine - static_cast<int>(currentLine));
if (diff > 0) {
p.drawText( lnX + m_maxCharWidth / 2, y, lnWidth - m_maxCharWidth, h,
Qt::TextDontClip|Qt::AlignRight|Qt::AlignVCenter, QString("%1").arg(diff) );
--
2.12.3