diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2023-01-28 23:29:06 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2023-01-28 23:32:26 +0100 |
commit | 7530e75c45ce9caa4e5cfd2722f797af4c90adda (patch) | |
tree | 9d7d2a12b276e2aa7a60c3856425043c5d5b2a01 /kde-apps/akonadi-calendar | |
parent | kde-apps/akonadi-calendar: Convert event start time to user's local tz (diff) | |
download | gentoo-7530e75c45ce9caa4e5cfd2722f797af4c90adda.tar.gz gentoo-7530e75c45ce9caa4e5cfd2722f797af4c90adda.tar.bz2 gentoo-7530e75c45ce9caa4e5cfd2722f797af4c90adda.zip |
kde-apps/akonadi-calendar: Fix hidpi scaling, kalendarac crashes
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=453676
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=463222
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/akonadi-calendar')
3 files changed, 73 insertions, 1 deletions
diff --git a/kde-apps/akonadi-calendar/akonadi-calendar-22.08.3-r1.ebuild b/kde-apps/akonadi-calendar/akonadi-calendar-22.08.3-r1.ebuild index d5f48f842b30..4880c2331795 100644 --- a/kde-apps/akonadi-calendar/akonadi-calendar-22.08.3-r1.ebuild +++ b/kde-apps/akonadi-calendar/akonadi-calendar-22.08.3-r1.ebuild @@ -46,4 +46,8 @@ DEPEND=" " RDEPEND="${DEPEND}" -PATCHES=( "${FILESDIR}/${P}-convert-event-start-time-to-local-tz.patch" ) +PATCHES=( + "${FILESDIR}/${P}-fix-hidpi-scaling.patch" + "${FILESDIR}/${P}-fix-kalendarac-crash.patch" + "${FILESDIR}/${P}-convert-event-start-time-to-local-tz.patch" +) diff --git a/kde-apps/akonadi-calendar/files/akonadi-calendar-22.08.3-fix-hidpi-scaling.patch b/kde-apps/akonadi-calendar/files/akonadi-calendar-22.08.3-fix-hidpi-scaling.patch new file mode 100644 index 000000000000..26698be849c4 --- /dev/null +++ b/kde-apps/akonadi-calendar/files/akonadi-calendar-22.08.3-fix-hidpi-scaling.patch @@ -0,0 +1,32 @@ +From cb8e88e6b50a6edc399510b1a8d6307177f00bb7 Mon Sep 17 00:00:00 2001 +From: Moody Liu <mooodyhunter@outlook.com> +Date: Fri, 14 Oct 2022 23:19:25 +0000 +Subject: [PATCH] kalendarac: set AA_EnableHighDpiScaling attribute before + constructing QGuiApplication + +--- + reminder-daemon/kalendaracmain.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/reminder-daemon/kalendaracmain.cpp b/reminder-daemon/kalendaracmain.cpp +index 0566c7f..c0ae2be 100644 +--- a/reminder-daemon/kalendaracmain.cpp ++++ b/reminder-daemon/kalendaracmain.cpp +@@ -12,10 +12,13 @@ + + int main(int argc, char **argv) + { ++#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) ++ // set this attribute before contructing QGuiApplication ++ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); ++#endif + QGuiApplication app(argc, argv); + app.setQuitOnLastWindowClosed(false); + #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + #endif + +-- +GitLab + diff --git a/kde-apps/akonadi-calendar/files/akonadi-calendar-22.08.3-fix-kalendarac-crash.patch b/kde-apps/akonadi-calendar/files/akonadi-calendar-22.08.3-fix-kalendarac-crash.patch new file mode 100644 index 000000000000..64801160d886 --- /dev/null +++ b/kde-apps/akonadi-calendar/files/akonadi-calendar-22.08.3-fix-kalendarac-crash.patch @@ -0,0 +1,36 @@ +From 9baa8ca070a73658bec0c5a9a1854e4ec73abd8a Mon Sep 17 00:00:00 2001 +From: Allen Winter <winter@kde.org> +Date: Fri, 30 Dec 2022 09:29:02 -0500 +Subject: [PATCH] Ensure Akonadi IncidenceChanger doesn't try to show dialogs + +Since kalendarac is not a proper QApplication it can't +show dialogs anyway. Else you'll see crashes with: +"QWidget: Cannot create a QWidget without QApplication" +--- + reminder-daemon/kalendaralarmclient.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/reminder-daemon/kalendaralarmclient.cpp b/reminder-daemon/kalendaralarmclient.cpp +index b726ac1..da3b050 100644 +--- a/reminder-daemon/kalendaralarmclient.cpp ++++ b/reminder-daemon/kalendaralarmclient.cpp +@@ -6,6 +6,7 @@ + #include "calendarinterface.h" + #include "logging.h" + ++#include <Akonadi/IncidenceChanger> + #include <KIO/ApplicationLauncherJob> + + #include <KCheckableProxyModel> +@@ -52,6 +53,8 @@ void KalendarAlarmClient::setupAkonadi() + const QStringList mimeTypes{Event::eventMimeType(), Todo::todoMimeType()}; + mCalendar = Akonadi::ETMCalendar::Ptr(new Akonadi::ETMCalendar(mimeTypes)); + mCalendar->setObjectName(QStringLiteral("KalendarAC's calendar")); ++ Akonadi::IncidenceChanger *changer = mCalendar->incidenceChanger(); ++ changer->setShowDialogsOnError(false); + mETM = mCalendar->entityTreeModel(); + + connect(&mCheckTimer, &QTimer::timeout, this, &KalendarAlarmClient::checkAlarms); +-- +GitLab + |