[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#859939: unblock: kwidgetsaddons/5.28.0-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear release team,

I've backported for upstream fixes in kwidgetsaddons for stretch that I 
consider worthwhile, the corresponding debian/changelog entries are:
  * Apply "KMessageWidget: use darker red color when type is Error" (497c463)
    Otherwise the close button is barely visible.
    Add the upstrem patch as:
     KMessageWidget-use-darker-red-color-when-type-is-Error.patch
    This fixes the KDE#357210
  * Apply "Fix KDateComboBox checks for valid entered dates" (1550b2c)
    This fixes wrong or missing checks to determine whether an entered date
    is valid.
    Add upstream patch as:
     Fix-KDateComboBox-checks-for-valid-entered-dates.patch
  * 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
  * Backport "Fix wrong size hint when animatedShow is called with hidden parent" (0cfb788)
    Add upstream patch as:
     Fix-wrong-size-hint-when-animatedShow-is-called-with-hidd.patch
    This fixes KDE#377676

I've uploaded 5.28.0-2 with these changes and it has built successfully in all 
the release architectures.

I'm attaching the corresponding debdiff.

Happy hacking,

Please unblock package kwidgetsaddons

unblock kwidgetsaddons/5.28.0-2

- -- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'testing'), (500, 'stable'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEE+JIdOnQEyG4RNSIVxxl2mbKbIyoFAljqKyMQHG1heHlAZGVi
aWFuLm9yZwAKCRDHGXaZspsjKo/FD/4ytSOSR4qDA47B8mlXujxxSQq2T1COpy0J
Ctjey2yNiCUlZgdMXs5SDUNNRn4UxQu1YNx96GkCE7f6q09MnlL/Xgdew1RfJT+L
5h8f8/Hn/tRMcGihVEyaIoSa+PGYMxRT8FZS2aA1mTpjq90O9w5Y7OdOSjYH9WCH
135sBHPgKHqrhULM0sOgz8nxlvRC7AypplW1wfi64/4AZRfvkjIneuqWIQrwF2MF
3KR6iZs+KolD8RTJ/2DuxrFEkSPS17o00jW9C71nVzAZcTUBNzgygDqdVS7ES3Wd
ddg7lNjm2X9xzb6XnU4vqr3nyBz1s2FzfWCRLbPYy+EOs+qKJieSsSU20CltpIYQ
vvNLm86JUaTRrvIcaFZKFJrLaUIJec8q5DTGsax4/gSf5bmdZWsd+uSO+0cPf1/1
WJj1ILFK3ePp0TKHF0ZRvBaEeFB+3fsSnNQT7aDNjt92/bRe2QV21NMtomWmOaPv
/er2LrlwHV5fm4sRqZ2CE6aHaiEhktIh1dXAJ/ljoRUNCy5e5cFXlcTmeHTSNoOd
7zJAGCd5HRjAJhx1MSQQhXET2f6Iu23v3YuETEhO7yAc6MpfPzzZ0FK9TiKLVZXp
+9imkGqCfa9/1og9R6XnHy0xZ9CGn7flI7hLDJj5Z8DJyQzCg8NeSiRp/ec9X/hu
vqcj3JEklg==
=Bq6j
-----END PGP SIGNATURE-----
diff -Nru kwidgetsaddons-5.28.0/debian/changelog kwidgetsaddons-5.28.0/debian/changelog
--- kwidgetsaddons-5.28.0/debian/changelog	2016-11-18 16:02:42.000000000 +0100
+++ kwidgetsaddons-5.28.0/debian/changelog	2017-04-07 17:36:47.000000000 +0200
@@ -1,3 +1,28 @@
+kwidgetsaddons (5.28.0-2) unstable; urgency=medium
+
+  * Apply "KMessageWidget: use darker red color when type is Error" (497c463)
+    Otherwise the close button is barely visible.
+    Add the upstrem patch as:
+     KMessageWidget-use-darker-red-color-when-type-is-Error.patch
+    This fixes the KDE#357210
+  * Apply "Fix KDateComboBox checks for valid entered dates" (1550b2c)
+    This fixes wrong or missing checks to determine whether an entered date
+    is valid.
+    Add upstream patch as:
+     Fix-KDateComboBox-checks-for-valid-entered-dates.patch
+  * 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
+  * Backport "Fix wrong size hint when animatedShow is called with hidden parent" (0cfb788)
+    Add upstream patch as:
+     Fix-wrong-size-hint-when-animatedShow-is-called-with-hidd.patch
+    This fixes KDE#377676
+
+ -- Maximiliano Curia <maxy@debian.org>  Fri, 07 Apr 2017 17:36:47 +0200
+
 kwidgetsaddons (5.28.0-1) unstable; urgency=medium
 
   [ Automatic packaging ]
diff -Nru kwidgetsaddons-5.28.0/debian/patches/Fix-KDateComboBox-checks-for-valid-entered-dates.patch kwidgetsaddons-5.28.0/debian/patches/Fix-KDateComboBox-checks-for-valid-entered-dates.patch
--- kwidgetsaddons-5.28.0/debian/patches/Fix-KDateComboBox-checks-for-valid-entered-dates.patch	1970-01-01 01:00:00.000000000 +0100
+++ kwidgetsaddons-5.28.0/debian/patches/Fix-KDateComboBox-checks-for-valid-entered-dates.patch	2017-04-07 17:36:47.000000000 +0200
@@ -0,0 +1,251 @@
+From: David Jarvie <djarvie@kde.org>
+Date: Sat, 31 Dec 2016 00:01:12 +0000
+Subject: Fix KDateComboBox checks for valid entered dates
+
+This fixes wrong or missing checks to determine whether an entered
+date is valid, which fixes the following bugs:
+- When an up/down arrow or page up/down key was pressed to change the
+  date, and the minimum and maximum dates were not set, it was always
+  considered invalid and the date was not changed.
+- When the DateKeywords option was set, and the minimum and maximum
+  dates were not set, the only date which was displayed in the menu was
+  "No Date".
+- setMinimumDate() and resetMinimumDate() did nothing if no maximum
+  date was currently set.
+- setMaximumDate() and resetMaximumDate() did nothing if no minimum
+  date was currently set.
+- resetDateRange() did nothing.
+
+REVIEW: 129709
+---
+ autotests/kdatecomboboxtest.cpp | 22 +++++++++++
+ src/kdatecombobox.cpp           | 81 +++++++++++++++++++++++++++--------------
+ src/kdatecombobox.h             |  6 ++-
+ 3 files changed, 81 insertions(+), 28 deletions(-)
+
+diff --git a/autotests/kdatecomboboxtest.cpp b/autotests/kdatecomboboxtest.cpp
+index c15525a..07bb16c 100644
+--- a/autotests/kdatecomboboxtest.cpp
++++ b/autotests/kdatecomboboxtest.cpp
+@@ -95,6 +95,28 @@ void KDateComboBoxTest::testDateRange()
+     QCOMPARE(m_combo->minimumDate(), QDate(2000, 1, 1));
+     QCOMPARE(m_combo->maximumDate(), QDate(2003, 1, 1));
+ 
++    m_combo->resetDateRange();
++    QVERIFY(!m_combo->minimumDate().isValid());
++    QVERIFY(!m_combo->maximumDate().isValid());
++
++    // Check functioning when the minimum or maximum date is not already set
++
++    m_combo->setMinimumDate(QDate(2000, 1, 1));
++    QCOMPARE(m_combo->minimumDate(), QDate(2000, 1, 1));
++    QVERIFY(!m_combo->maximumDate().isValid());
++
++    m_combo->resetMinimumDate();
++    QVERIFY(!m_combo->minimumDate().isValid());
++    QVERIFY(!m_combo->maximumDate().isValid());
++
++    m_combo->setMaximumDate(QDate(2003, 1, 1));
++    QVERIFY(!m_combo->minimumDate().isValid());
++    QCOMPARE(m_combo->maximumDate(), QDate(2003, 1, 1));
++
++    m_combo->resetMaximumDate();
++    QVERIFY(!m_combo->minimumDate().isValid());
++    QVERIFY(!m_combo->maximumDate().isValid());
++
+     delete m_combo;
+ }
+ 
+diff --git a/src/kdatecombobox.cpp b/src/kdatecombobox.cpp
+index ad1d085..2df1e9d 100644
+--- a/src/kdatecombobox.cpp
++++ b/src/kdatecombobox.cpp
+@@ -51,6 +51,11 @@ public:
+     void addMenuAction(const QString &text, const QDate &date);
+     void enableMenuDates();
+     void updateDateWidget();
++    void setDateRange(const QDate &minDate,
++                      const QDate &maxDate,
++                      const QString &minWarnMsg,
++                      const QString &maxWarnMsg);
++    bool isInDateRange(const QDate &date) const;
+ 
+ // Q_PRIVATE_SLOTs
+     void clickDate();
+@@ -134,7 +139,7 @@ void KDateComboBoxPrivate::initDateWidget()
+     // If EditTime then set the line edit
+     q->lineEdit()->setReadOnly((m_options & KDateComboBox::EditDate) != KDateComboBox::EditDate);
+ 
+-    // If SelectTime then make list items visible
++    // If SelectDate then make list items visible
+     if ((m_options & KDateComboBox::SelectDate) == KDateComboBox::SelectDate ||
+             (m_options & KDateComboBox::DatePicker) == KDateComboBox::DatePicker ||
+             (m_options & KDateComboBox::DatePicker) == KDateComboBox::DateKeywords) {
+@@ -205,7 +210,7 @@ void KDateComboBoxPrivate::enableMenuDates()
+     // Hide menu dates if they are outside the date range
+     for (int i = 0; i < m_actions.count(); ++i) {
+         QDate date = m_actions[i]->data().toDate();
+-        m_actions[i]->setVisible(!date.isValid() || (date >= m_minDate && date <= m_maxDate));
++        m_actions[i]->setVisible(!date.isValid() || isInDateRange(date));
+     }
+ }
+ 
+@@ -222,16 +227,48 @@ void KDateComboBoxPrivate::updateDateWidget()
+     q->blockSignals(false);
+ }
+ 
++void KDateComboBoxPrivate::setDateRange(const QDate &minDate,
++                                        const QDate &maxDate,
++                                        const QString &minWarnMsg,
++                                        const QString &maxWarnMsg)
++{
++    if (minDate.isValid() && maxDate.isValid() && minDate > maxDate) {
++        return;
++    }
++
++    if (minDate != m_minDate || maxDate != m_maxDate ||
++            minWarnMsg != m_minWarnMsg || maxWarnMsg != m_maxWarnMsg) {
++        m_minDate = minDate;
++        m_maxDate = maxDate;
++        m_minWarnMsg = minWarnMsg;
++        m_maxWarnMsg = maxWarnMsg;
++    }
++    enableMenuDates();
++}
++
++bool KDateComboBoxPrivate::isInDateRange(const QDate &date) const
++{
++    return date.isValid() &&
++           (!m_minDate.isValid() || date >= m_minDate) &&
++           (!m_maxDate.isValid() || date <= m_maxDate);
++}
++
+ void KDateComboBoxPrivate::selectDate(QAction *action)
+ {
+     if (action->objectName() != QLatin1String("DatePicker")) {
+-        enterDate(action->data().toDate());
++        QDate date = action->data().toDate();
++        if (isInDateRange(date)) {
++            enterDate(date);
++        }
+     }
+ }
+ 
+ void KDateComboBoxPrivate::clickDate()
+ {
+-    enterDate(m_datePicker->date());
++    QDate date = m_datePicker->date();
++    if (isInDateRange(date)) {
++        enterDate(date);
++    }
+ }
+ 
+ void KDateComboBoxPrivate::editDate(const QString &text)
+@@ -341,9 +378,7 @@ void KDateComboBox::assignDate(const QDate &date)
+ bool KDateComboBox::isValid() const
+ {
+     d->parseDate();
+-    return d->m_date.isValid() &&
+-           (!d->m_minDate.isValid() || d->m_date >= d->m_minDate) &&
+-           (!d->m_maxDate.isValid() || d->m_date <= d->m_maxDate);
++    return d->isInDateRange(d->m_date);
+ }
+ 
+ bool KDateComboBox::isNull() const
+@@ -372,13 +407,14 @@ QDate KDateComboBox::minimumDate() const
+ 
+ void KDateComboBox::setMinimumDate(const QDate &minDate, const QString &minWarnMsg)
+ {
+-    setDateRange(minDate, d->m_maxDate, minWarnMsg, d->m_maxWarnMsg);
++    if (minDate.isValid()) {
++        d->setDateRange(minDate, d->m_maxDate, minWarnMsg, d->m_maxWarnMsg);
++    }
+ }
+ 
+ void KDateComboBox::resetMinimumDate()
+ {
+-    //setDateRange(d->m_minDate, d->defaultMaxDate(), d->m_minWarnMsg, QString());
+-    setDateRange(QDate(), d->m_maxDate, QString(), d->m_maxWarnMsg);
++    d->setDateRange(QDate(), d->m_maxDate, QString(), d->m_maxWarnMsg);
+ }
+ 
+ QDate KDateComboBox::maximumDate() const
+@@ -388,13 +424,14 @@ QDate KDateComboBox::maximumDate() const
+ 
+ void KDateComboBox::setMaximumDate(const QDate &maxDate, const QString &maxWarnMsg)
+ {
+-    setDateRange(d->m_minDate, maxDate, d->m_minWarnMsg, maxWarnMsg);
++    if (maxDate.isValid()) {
++        d->setDateRange(d->m_minDate, maxDate, d->m_minWarnMsg, maxWarnMsg);
++    }
+ }
+ 
+ void KDateComboBox::resetMaximumDate()
+ {
+-    //setDateRange(d->m_minDate, d->defaultMaxDate(), d->m_minWarnMsg, QString());
+-    setDateRange(d->m_minDate, QDate(), d->m_minWarnMsg, QString());
++    d->setDateRange(d->m_minDate, QDate(), d->m_minWarnMsg, QString());
+ }
+ 
+ void KDateComboBox::setDateRange(const QDate &minDate,
+@@ -402,24 +439,14 @@ void KDateComboBox::setDateRange(const QDate &minDate,
+                                  const QString &minWarnMsg,
+                                  const QString &maxWarnMsg)
+ {
+-    if (!minDate.isValid() || !maxDate.isValid() || minDate > maxDate) {
+-        return;
+-    }
+-
+-    if (minDate != d->m_minDate || maxDate != d->m_maxDate ||
+-            minWarnMsg != d->m_minWarnMsg || maxWarnMsg != d->m_maxWarnMsg) {
+-        d->m_minDate = minDate;
+-        d->m_maxDate = maxDate;
+-        d->m_minWarnMsg = minWarnMsg;
+-        d->m_maxWarnMsg = maxWarnMsg;
++    if (minDate.isValid() && maxDate.isValid()) {
++        d->setDateRange(minDate, maxDate, minWarnMsg, maxWarnMsg);
+     }
+-    d->enableMenuDates();
+ }
+ 
+ void KDateComboBox::resetDateRange()
+ {
+-    //setDateRange(d->defaultMinDate(), d->defaultMaxDate(), QString(), QString());
+-    setDateRange(QDate(), QDate(), QString(), QString());
++    d->setDateRange(QDate(), QDate(), QString(), QString());
+ }
+ 
+ QLocale::FormatType KDateComboBox::displayFormat() const
+@@ -475,7 +502,7 @@ void KDateComboBox::keyPressEvent(QKeyEvent *keyEvent)
+         QComboBox::keyPressEvent(keyEvent);
+         return;
+     }
+-    if (temp.isValid() && temp >= d->m_minDate && temp <= d->m_maxDate) {
++    if (d->isInDateRange(temp)) {
+         d->enterDate(temp);
+     }
+ }
+diff --git a/src/kdatecombobox.h b/src/kdatecombobox.h
+index d9a20ca..458c701 100644
+--- a/src/kdatecombobox.h
++++ b/src/kdatecombobox.h
+@@ -227,7 +227,9 @@ public Q_SLOTS:
+     void setMinimumDate(const QDate &minTime, const QString &minWarnMsg = QString());
+ 
+     /**
+-     * Reset the minimum date to the default
++     * Reset the minimum date to the default.
++     *
++     * The default is to have no minimum date.
+      */
+     void resetMinimumDate();
+ 
+@@ -248,6 +250,8 @@ public Q_SLOTS:
+ 
+     /**
+      * Reset the maximum date to the default
++     *
++     * The default is to have no maximum date.
+      */
+     void resetMaximumDate();
+ 
diff -Nru kwidgetsaddons-5.28.0/debian/patches/Fix-wrong-size-hint-when-animatedShow-is-called-with-hidd.patch kwidgetsaddons-5.28.0/debian/patches/Fix-wrong-size-hint-when-animatedShow-is-called-with-hidd.patch
--- kwidgetsaddons-5.28.0/debian/patches/Fix-wrong-size-hint-when-animatedShow-is-called-with-hidd.patch	1970-01-01 01:00:00.000000000 +0100
+++ kwidgetsaddons-5.28.0/debian/patches/Fix-wrong-size-hint-when-animatedShow-is-called-with-hidd.patch	2017-04-07 17:36:47.000000000 +0200
@@ -0,0 +1,25 @@
+From: Christoph Feck <cfeck@kde.org>
+Date: Tue, 28 Mar 2017 01:31:54 +0200
+Subject: Fix wrong size hint when animatedShow is called with hidden parent
+
+BUG: 377676
+
+Differential Revision: https://phabricator.kde.org/D5092
+---
+ src/kmessagewidget.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/kmessagewidget.cpp b/src/kmessagewidget.cpp
+index 3a6bfe0..eb143a6 100644
+--- a/src/kmessagewidget.cpp
++++ b/src/kmessagewidget.cpp
+@@ -408,7 +408,8 @@ void KMessageWidget::removeAction(QAction *action)
+ 
+ void KMessageWidget::animatedShow()
+ {
+-    if (!style()->styleHint(QStyle::SH_Widget_Animate, 0, this)) {
++    if (!style()->styleHint(QStyle::SH_Widget_Animate, 0, this)
++     || (parentWidget() && !parentWidget()->isVisible())) {
+         show();
+         emit showAnimationFinished();
+         return;
diff -Nru kwidgetsaddons-5.28.0/debian/patches/KFontRequester-Find-the-nearest-match-for-a-missing-font.patch kwidgetsaddons-5.28.0/debian/patches/KFontRequester-Find-the-nearest-match-for-a-missing-font.patch
--- kwidgetsaddons-5.28.0/debian/patches/KFontRequester-Find-the-nearest-match-for-a-missing-font.patch	1970-01-01 01:00:00.000000000 +0100
+++ kwidgetsaddons-5.28.0/debian/patches/KFontRequester-Find-the-nearest-match-for-a-missing-font.patch	2017-04-07 17:36:47.000000000 +0200
@@ -0,0 +1,39 @@
+From: Alexander Volkov <a.volkov@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 -Nru kwidgetsaddons-5.28.0/debian/patches/KMessageWidget-use-darker-red-color-when-type-is-Error.patch kwidgetsaddons-5.28.0/debian/patches/KMessageWidget-use-darker-red-color-when-type-is-Error.patch
--- kwidgetsaddons-5.28.0/debian/patches/KMessageWidget-use-darker-red-color-when-type-is-Error.patch	1970-01-01 01:00:00.000000000 +0100
+++ kwidgetsaddons-5.28.0/debian/patches/KMessageWidget-use-darker-red-color-when-type-is-Error.patch	2017-04-07 17:36:47.000000000 +0200
@@ -0,0 +1,29 @@
+From: Elvis Angelaccio <elvis.angelaccio@kde.org>
+Date: Fri, 30 Dec 2016 12:27:55 +0100
+Subject: KMessageWidget: use darker red color when type is Error
+
+Otherwise the close button is barely visible. There isn't an easy way to
+change to color of the close button icon, so we use a slightly darker
+background color instead.
+
+BUG: 357210
+FIXED-IN: 5.30
+
+Differential Revision: D3418
+---
+ src/kmessagewidget.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/kmessagewidget.cpp b/src/kmessagewidget.cpp
+index e8b25f6..3a6bfe0 100644
+--- a/src/kmessagewidget.cpp
++++ b/src/kmessagewidget.cpp
+@@ -284,6 +284,8 @@ void KMessageWidget::setMessageType(KMessageWidget::MessageType type)
+         break;
+     case Error:
+         bg1.setRgb(218, 68, 83); // values taken from kcolorscheme.cpp (Negative)
++        // #357210: use darker color to improve the visibility of close button.
++        bg1 = bg1.darker(110);
+         fg.setRgb(239, 240, 241);
+         break;
+     }
diff -Nru kwidgetsaddons-5.28.0/debian/patches/series kwidgetsaddons-5.28.0/debian/patches/series
--- kwidgetsaddons-5.28.0/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ kwidgetsaddons-5.28.0/debian/patches/series	2017-04-07 17:36:47.000000000 +0200
@@ -0,0 +1,4 @@
+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
+Fix-wrong-size-hint-when-animatedShow-is-called-with-hidd.patch

Reply to: