summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-office/ktimetracker')
-rw-r--r--app-office/ktimetracker/files/ktimetracker-5.0.1-fix-edit-history-dialog-crash.patch31
-rw-r--r--app-office/ktimetracker/files/ktimetracker-5.0.1-fix-formatTime-in-non-decimal-mode.patch33
-rw-r--r--app-office/ktimetracker/files/ktimetracker-5.0.1-fix-sorting-of-time-columns.patch38
-rw-r--r--app-office/ktimetracker/files/ktimetracker-5.0.1-fix-table-column-visibility.patch34
-rw-r--r--app-office/ktimetracker/ktimetracker-5.0.1-r1.ebuild52
5 files changed, 188 insertions, 0 deletions
diff --git a/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-edit-history-dialog-crash.patch b/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-edit-history-dialog-crash.patch
new file mode 100644
index 000000000000..a27b7b6ae4d7
--- /dev/null
+++ b/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-edit-history-dialog-crash.patch
@@ -0,0 +1,31 @@
+From 065d7c154641f83c46e490cbb5d15b6cff92121b Mon Sep 17 00:00:00 2001
+From: Marc Orcau <budalokko@gmail.com>
+Date: Tue, 27 Apr 2021 17:17:18 +0200
+Subject: [PATCH] Fix edit history dialog crash when event has non existent
+ related entity
+
+Replaced qFatal() by qCWarning(). Faulty event does not appear on the list then.
+
+BUG: 424993
+---
+ src/dialogs/historydialog.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/dialogs/historydialog.cpp b/src/dialogs/historydialog.cpp
+index ca2f10a..458c147 100644
+--- a/src/dialogs/historydialog.cpp
++++ b/src/dialogs/historydialog.cpp
+@@ -131,7 +131,9 @@ QString HistoryDialog::listAllEvents()
+
+ const Task *parent = dynamic_cast<Task*>(m_projectModel->tasksModel()->taskByUID(event->relatedTo()));
+ if (!parent) {
+- qFatal("orphan event");
++ qCWarning(KTT_LOG) << "Unable to load 'relatedTo' entry for " << event->summary();
++ err = "NoRelatedToForEvent";
++ continue;
+ }
+
+ auto *item = new QTableWidgetItem(parent->name());
+--
+GitLab
+
diff --git a/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-formatTime-in-non-decimal-mode.patch b/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-formatTime-in-non-decimal-mode.patch
new file mode 100644
index 000000000000..ad5be92794a3
--- /dev/null
+++ b/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-formatTime-in-non-decimal-mode.patch
@@ -0,0 +1,33 @@
+From 310c0fee25f142c6f6a0e7a0b4445af2e8785c79 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino@kde.org>
+Date: Wed, 21 Oct 2020 10:49:20 +0200
+Subject: [PATCH] Fix formatTime() in non-decimal mode on 32bit archs
+
+int64_t is not long int on 32bit architectures but long long int, thus
+the "%ld" printf modifer gets truncated/wrong values.
+
+As solution, do not use int64_t but long long int, so the "%lld" can be
+always used.
+---
+ src/ktimetrackerutility.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ktimetrackerutility.cpp b/src/ktimetrackerutility.cpp
+index aca00e8..fe449ba 100644
+--- a/src/ktimetrackerutility.cpp
++++ b/src/ktimetrackerutility.cpp
+@@ -33,9 +33,9 @@ QString formatTime(double minutes, bool decimal)
+ time.sprintf("%.2f", minutes / 60.0);
+ time.replace('.', QLocale().decimalPoint());
+ } else {
+- const auto absMinutes = static_cast<int64_t>(std::round(std::fabs(minutes)));
++ const auto absMinutes = static_cast<long long int>(std::round(std::fabs(minutes)));
+ time.sprintf(
+- "%s%ld:%02ld",
++ "%s%lld:%02lld",
+ minutes < 0 ? QString(QLocale().negativeSign()).toUtf8().data() : "",
+ absMinutes / 60, absMinutes % 60);
+ }
+--
+GitLab
+
diff --git a/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-sorting-of-time-columns.patch b/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-sorting-of-time-columns.patch
new file mode 100644
index 000000000000..f30ed30eaf6c
--- /dev/null
+++ b/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-sorting-of-time-columns.patch
@@ -0,0 +1,38 @@
+From 7b17dccec643ffbf9e51a011d2aa1547169e9686 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@centrum.cz>
+Date: Sat, 8 May 2021 13:05:34 +0200
+Subject: [PATCH] fix sorting of time columns
+
+Commit 910b2939a07ee241 changed QVariant types for sorting from qlonglong
+to int64_t, but QSortFilterProxyModel::lessThan() docs explicitly list
+types that are compared numerically, int64_t is not one of them, so it
+gets sorted as a string. This meant that '0:02' was sorted before '0:17'.
+---
+ src/model/task.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/model/task.cpp b/src/model/task.cpp
+index 106e719..ff68b24 100644
+--- a/src/model/task.cpp
++++ b/src/model/task.cpp
+@@ -509,13 +509,13 @@ QVariant Task::data(int column, int role) const
+ case 0:
+ return m_name;
+ case 1:
+- return QVariant::fromValue<int64_t>(m_sessionTime);
++ return QVariant::fromValue<qlonglong>(m_sessionTime);
+ case 2:
+- return QVariant::fromValue<int64_t>(m_time);
++ return QVariant::fromValue<qlonglong>(m_time);
+ case 3:
+- return QVariant::fromValue<int64_t>(m_totalSessionTime);
++ return QVariant::fromValue<qlonglong>(m_totalSessionTime);
+ case 4:
+- return QVariant::fromValue<int64_t>(m_totalTime);
++ return QVariant::fromValue<qlonglong>(m_totalTime);
+ case 5:
+ return QVariant::fromValue<int>(m_priority);
+ case 6:
+--
+GitLab
+
diff --git a/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-table-column-visibility.patch b/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-table-column-visibility.patch
new file mode 100644
index 000000000000..13edc84a6114
--- /dev/null
+++ b/app-office/ktimetracker/files/ktimetracker-5.0.1-fix-table-column-visibility.patch
@@ -0,0 +1,34 @@
+From ddc87a47089b900ee1c62be10b23d0d4bb2361f1 Mon Sep 17 00:00:00 2001
+From: Alexander Potashev <aspotashev@gmail.com>
+Date: Mon, 24 Feb 2020 23:01:23 +0100
+Subject: [PATCH] TaskView: Change visibility of table columns after the view
+ is connected to model
+
+Otherwise setColumnHidden() has no effect.
+
+BUG: 417988
+---
+ src/taskview.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/taskview.cpp b/src/taskview.cpp
+index 3b9578f..c1b7580 100644
+--- a/src/taskview.cpp
++++ b/src/taskview.cpp
+@@ -164,12 +164,12 @@ void TaskView::load(const QUrl &url)
+ m_tasksWidget->setRootIsDecorated(true);
+
+ reconfigureModel();
+- m_tasksWidget->reconfigure();
+
+ // Connect to the new model created by TimeTrackerStorage::load()
+ auto *tasksModel = m_storage->tasksModel();
+ m_filterProxyModel->setSourceModel(tasksModel);
+ m_tasksWidget->setSourceModel(tasksModel);
++ m_tasksWidget->reconfigure();
+ for (int i = 0; i <= tasksModel->columnCount(QModelIndex()); ++i) {
+ m_tasksWidget->resizeColumnToContents(i);
+ }
+--
+GitLab
+
diff --git a/app-office/ktimetracker/ktimetracker-5.0.1-r1.ebuild b/app-office/ktimetracker/ktimetracker-5.0.1-r1.ebuild
new file mode 100644
index 000000000000..8174fe9a4bfa
--- /dev/null
+++ b/app-office/ktimetracker/ktimetracker-5.0.1-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="forceoptional"
+ECM_TEST="true"
+KDE_ORG_CATEGORY="pim"
+KFMIN=5.82.0
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Todo management and time tracker"
+HOMEPAGE="https://userbase.kde.org/KTimeTracker"
+
+if [[ ${KDE_BUILD_TYPE} = release ]]; then
+ SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-2+ handbook? ( FDL-1.2 )"
+SLOT="5"
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ >=kde-frameworks/kcalendarcore-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kidletime-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-table-column-visibility.patch" # KDE-bug 417988
+ "${FILESDIR}/${P}-fix-formatTime-in-non-decimal-mode.patch"
+ "${FILESDIR}/${P}-fix-edit-history-dialog-crash.patch" # KDE-bug 424993
+ "${FILESDIR}/${P}-fix-sorting-of-time-columns.patch"
+)