[SCM] kwidgetsaddons packaging branch, master, updated. debian/5.37.0-2-98-g75a9a9a
Maximiliano Curia
maxy at moszumanska.debian.org
Tue Jan 2 18:55:41 UTC 2018
Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/kwidgetsaddons.git;a=commitdiff;h=ad7321c
The following commit has been merged in the master branch:
commit ad7321c35ae81cc8b9cf1f2cb7dcbb119b3268bc
Author: Scarlett Clark <sgclark at kde.org>
Date: Sun Oct 15 16:39:37 2017 +0200
Add patch from upstream to fix the missing funct ftbfs
---
debian/patches/series | 1 +
debian/patches/upstream_add_missing_include.diff | 122 +++++++++++++++++++++++
2 files changed, 123 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..79dc5d7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream_add_missing_include.diff
diff --git a/debian/patches/upstream_add_missing_include.diff b/debian/patches/upstream_add_missing_include.diff
new file mode 100644
index 0000000..9a1acdf
--- /dev/null
+++ b/debian/patches/upstream_add_missing_include.diff
@@ -0,0 +1,122 @@
+diff --git a/autotests/kacceleratormanagertest.cpp b/autotests/kacceleratormanagertest.cpp
+index ccbab04..91fec5a 100644
+--- a/autotests/kacceleratormanagertest.cpp
++++ b/autotests/kacceleratormanagertest.cpp
+@@ -1,116 +1,117 @@
+ /* This file is part of the KDE libraries
+ *
+ * Copyright (c) 2017 David Faure <faure at kde.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+ #include <kacceleratormanager.h>
++#include <functional>
+
+ #include <QTest>
+ #include <QMenu>
+
+ #define QSL QStringLiteral
+
+ static QStringList extractActionTexts(QMenu &menu, std::function<QString(const QAction*)> func)
+ {
+ menu.aboutToShow(); // signals are now public in Qt5, how convenient :-)
+
+ QStringList ret;
+ bool lastIsSeparator = false;
+ foreach (const QAction *action, menu.actions()) {
+ if (action->isSeparator()) {
+ if (!lastIsSeparator) { // Qt gets rid of duplicate separators, so we should too
+ ret.append(QStringLiteral("separator"));
+ }
+ lastIsSeparator = true;
+ } else {
+ lastIsSeparator = false;
+ if (action->menu()) {
+ ret.append(QStringLiteral("submenu"));
+ } else {
+ const QString text = func(action);
+ ret.append(text);
+ }
+ }
+ }
+ return ret;
+ }
+
+ class KAcceleratorManagerTest : public QObject
+ {
+ Q_OBJECT
+
+ private Q_SLOTS:
+ void initTestCase()
+ {
+ }
+
+ void testActionTexts_data()
+ {
+ QTest::addColumn<QStringList>("initialTexts");
+ QTest::addColumn<QStringList>("expectedTexts");
+
+ QTest::newRow("basic") << QStringList{QSL("Open"), QSL("Close"), QSL("Quit")} << QStringList{QSL("&Open"), QSL("&Close"), QSL("&Quit")};
+ QTest::newRow("same_first") << QStringList{QSL("Open"), QSL("Close"), QSL("Clone"), QSL("Quit")} << QStringList{QSL("&Open"), QSL("&Close"), QSL("C&lone"), QSL("&Quit")};
+ QTest::newRow("cjk") << QStringList{QSL("Open (&O)"), QSL("Close (&C)"), QSL("Clone (&C)"), QSL("Quit (&Q)")} << QStringList{QSL("Open (&O)"), QSL("Close (&C)"), QSL("C&lone (C)"), QSL("Quit (&Q)")};
+ }
+
+ void testActionTexts()
+ {
+ // GIVEN
+ QFETCH(QStringList, initialTexts);
+ QFETCH(QStringList, expectedTexts);
+ QMenu menu;
+ for (const QString &text : qAsConst(initialTexts)) {
+ menu.addAction(text);
+ }
+ // WHEN
+ KAcceleratorManager::manage(&menu);
+ // THEN
+ const QStringList texts = extractActionTexts(menu, &QAction::text);
+ QCOMPARE(texts, expectedTexts);
+ }
+
+ void testActionIconTexts_data()
+ {
+ QTest::addColumn<QStringList>("initialTexts");
+ QTest::addColumn<QStringList>("expectedTexts");
+
+ QTest::newRow("basic") << QStringList{QSL("Open"), QSL("Close"), QSL("Quit")} << QStringList{QSL("Open"), QSL("Close"), QSL("Quit")};
+ QTest::newRow("same_first") << QStringList{QSL("Open"), QSL("Close"), QSL("Clone"), QSL("Quit")} << QStringList{QSL("Open"), QSL("Close"), QSL("Clone"), QSL("Quit")};
+ QTest::newRow("cjk") << QStringList{QSL("Open (&O)"), QSL("Close (&C)"), QSL("Clone (&C)"), QSL("Quit (&Q)")} << QStringList{QSL("Open"), QSL("Close"), QSL("Clone"), QSL("Quit")};
+ }
+
+ void testActionIconTexts()
+ {
+ // GIVEN
+ QFETCH(QStringList, initialTexts);
+ QFETCH(QStringList, expectedTexts);
+ QMenu menu;
+ for (const QString &text : qAsConst(initialTexts)) {
+ menu.addAction(text);
+ }
+ // WHEN
+ KAcceleratorManager::manage(&menu);
+ // THEN
+ const QStringList iconTexts = extractActionTexts(menu, &QAction::iconText);
+ QCOMPARE(iconTexts, expectedTexts);
+ }
+ };
+
+ QTEST_MAIN(KAcceleratorManagerTest)
+
+ #include "kacceleratormanagertest.moc"
--
kwidgetsaddons packaging
More information about the pkg-kde-commits
mailing list