summaryrefslogtreecommitdiff
path: root/user/trojita/signedness.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-11-18 03:11:50 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-11-21 02:08:32 -0600
commit4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92 (patch)
treed7baad867fb90684d7d08e4221f363e72efd147f /user/trojita/signedness.patch
parent3ff4b8c8548f6b45f93367f2ea8d151844f43c8f (diff)
downloadpackages-4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92.tar.gz
packages-4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92.tar.bz2
packages-4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92.tar.xz
packages-4a4ac4b35fd5faf14e7143c0c8babe65c9c95e92.zip
user/trojita: Fix build and add patches
* Ensures Trojitá does not crash using attachments. * Port to Qt 5.15. * Fix a security issue with STARTTLS. * Ensure passwords are stored correctly. * Fix signedness on unsigned char platforms (ARM, Power). Closes: #856
Diffstat (limited to 'user/trojita/signedness.patch')
-rw-r--r--user/trojita/signedness.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/user/trojita/signedness.patch b/user/trojita/signedness.patch
new file mode 100644
index 000000000..693baf67a
--- /dev/null
+++ b/user/trojita/signedness.patch
@@ -0,0 +1,71 @@
+From e4478df9389894b6498ffe252310cdecd1e58904 Mon Sep 17 00:00:00 2001
+From: Vicente Bergas <vicencb@gmail.com>
+Date: Sat, 3 Feb 2018 19:02:38 +0100
+Subject: [PATCH] Fix signed vs. unsigned math on ARM
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On ARM systems, `char` is not signed, but unsigned, and therefore code
+like qMin(-11, ...) doesn't really do a correct thing.
+
+Change-Id: I1e03570c8a809cd6d8c699b3bc138a6bd05ce53c
+Signed-off-by: Jan Kundrát <jkt@kde.org>
+---
+ src/Gui/Spinner.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Gui/Spinner.h b/src/Gui/Spinner.h
+index b8b06b85..2f60ce45 100644
+--- a/src/Gui/Spinner.h
++++ b/src/Gui/Spinner.h
+@@ -82,8 +82,8 @@ private slots:
+ void updateAncestors();
+ void updateGeometry();
+ private:
+- uchar m_step;
+- char m_fadeStep;
++ int m_step;
++ int m_fadeStep;
+ int m_timer;
+ QTimer *m_startTimer;
+ QList<QWidget*> m_ancestors;
+--
+GitLab
+
+From 2202821fad977923d2f69c044ad09b3dc46c804a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jkt@kde.org>
+Date: Fri, 24 Aug 2018 13:44:34 +0200
+Subject: [PATCH] Fix comparison of integer expressions of different signedness
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ src/Imap/Model/ModelTest/modeltest.cpp: In member function ‘void ModelTest::data()’:
+ src/Imap/Model/ModelTest/modeltest.cpp:422:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘QFlags<Qt::AlignmentFlag>::Int’ {aka ‘unsigned int’} [-Werror=sign-compare]
+ Q_ASSERT(alignment == (alignment & (Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask)));
+ ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Change-Id: I7007e1c0cba20b31d76f6426548ad4fb43480017
+---
+ src/Imap/Model/ModelTest/modeltest.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Imap/Model/ModelTest/modeltest.cpp b/src/Imap/Model/ModelTest/modeltest.cpp
+index 24046a24..d2c8fcac 100644
+--- a/src/Imap/Model/ModelTest/modeltest.cpp
++++ b/src/Imap/Model/ModelTest/modeltest.cpp
+@@ -418,8 +418,8 @@ void ModelTest::data()
+ // Check that the alignment is one we know about
+ QVariant textAlignmentVariant = model->data(model->index(0, 0), Qt::TextAlignmentRole);
+ if (textAlignmentVariant.isValid()) {
+- int alignment = textAlignmentVariant.toInt();
+- Q_ASSERT(alignment == (alignment & (Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask)));
++ unsigned int alignment = textAlignmentVariant.toUInt();
++ Q_ASSERT(alignment == (alignment & (Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask)));
+ }
+
+ // General Purpose roles that should return a QColor
+--
+GitLab
+