[SCM] kwidgetsaddons packaging branch, master, updated. debian/5.28.0-1-6-g37ca58b

Maximiliano Curia maxy at moszumanska.debian.org
Fri Apr 7 15:37:54 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/kwidgetsaddons.git;a=commitdiff;h=8d89792

The following commit has been merged in the master branch:
commit 8d897921e18d5e40dd746f039c59b37f264b958d
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date:   Fri Apr 7 16:56:07 2017 +0200

    Apply "KFontRequester: Find the nearest match for a missing font" (243626c)
    
    If the font is missing, then try to find the nearest font family instead
    of just selecting the first family in the list.
    This fixes KDE#286260
    Add the upstream patch as:
     KFontRequester-Find-the-nearest-match-for-a-missing-font.patch
    
    Gbp-Dch: Full
---
 ...Find-the-nearest-match-for-a-missing-font.patch | 39 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 40 insertions(+)

diff --git a/debian/patches/KFontRequester-Find-the-nearest-match-for-a-missing-font.patch b/debian/patches/KFontRequester-Find-the-nearest-match-for-a-missing-font.patch
new file mode 100644
index 0000000..23d5b73
--- /dev/null
+++ b/debian/patches/KFontRequester-Find-the-nearest-match-for-a-missing-font.patch
@@ -0,0 +1,39 @@
+From: Alexander Volkov <a.volkov at rusbitech.ru>
+Date: Thu, 12 Jan 2017 19:37:04 +0300
+Subject: KFontRequester: Find the nearest match for a missing font
+
+If the font is missing, then try to find the nearest font
+family instead of just selecting the first family in the
+list.
+
+BUG: 286260
+REVIEW: 129809
+---
+ src/kfontrequester.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/kfontrequester.cpp b/src/kfontrequester.cpp
+index 6cca672..63fbbd0 100644
+--- a/src/kfontrequester.cpp
++++ b/src/kfontrequester.cpp
+@@ -24,6 +24,7 @@
+ #include <QPushButton>
+ #include <QLayout>
+ #include <QFontDatabase>
++#include <QFontInfo>
+ #include <QFontDialog>
+ #include <QLocale>
+ 
+@@ -46,8 +47,10 @@ static QFont nearestExistingFont(const QFont &font)
+     const QStringList families = dbase.families();
+     if (!families.contains(family)) {
+         // Chose another family.
+-        family = families.count() ? families[0] : QStringLiteral("fixed");
+-        // TODO: Try to find nearest match?
++        family = QFontInfo(font).family(); // the nearest match
++        if (!families.contains(family)) {
++            family = families.count() ? families.at(0) : QStringLiteral("fixed");
++        }
+     }
+ 
+     // Check if the family has the requested style.
diff --git a/debian/patches/series b/debian/patches/series
index e0b9231..a986d42 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 KMessageWidget-use-darker-red-color-when-type-is-Error.patch
 Fix-KDateComboBox-checks-for-valid-entered-dates.patch
+KFontRequester-Find-the-nearest-match-for-a-missing-font.patch

-- 
kwidgetsaddons packaging



More information about the pkg-kde-commits mailing list