diff options
author | 2024-08-10 22:59:40 +0200 | |
---|---|---|
committer | 2024-08-11 08:53:31 +0200 | |
commit | 615c87830b4d962683154eb82d3ff7a319a622e6 (patch) | |
tree | 2d1d3ca92434be68b47fde9f4dd9dbbc619ae00d /kde-misc | |
parent | kde-plasma/kwin: drop 6.1.4 (diff) | |
download | gentoo-615c87830b4d962683154eb82d3ff7a319a622e6.tar.gz gentoo-615c87830b4d962683154eb82d3ff7a319a622e6.tar.bz2 gentoo-615c87830b4d962683154eb82d3ff7a319a622e6.zip |
kde-misc/kdiff3: Fix "unknown error"
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=486782
Closes: https://bugs.gentoo.org/935224
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-misc')
-rw-r--r-- | kde-misc/kdiff3/files/kdiff3-1.11.2-unknown-error.patch | 132 | ||||
-rw-r--r-- | kde-misc/kdiff3/kdiff3-1.11.2-r2.ebuild | 52 |
2 files changed, 184 insertions, 0 deletions
diff --git a/kde-misc/kdiff3/files/kdiff3-1.11.2-unknown-error.patch b/kde-misc/kdiff3/files/kdiff3-1.11.2-unknown-error.patch new file mode 100644 index 000000000000..22c1ec341f7a --- /dev/null +++ b/kde-misc/kdiff3/files/kdiff3-1.11.2-unknown-error.patch @@ -0,0 +1,132 @@ +From dbc690d7c5ae8e1917b214e14f21fedd4200c314 Mon Sep 17 00:00:00 2001 +From: Michael Reeves <reeves.87@gmail.com> +Date: Fri, 9 Aug 2024 22:36:39 -0400 +Subject: [PATCH] Move SourceData init to constructor for KDiff3App + +BUG: 486782 +FIXED-IN: 1.11.3 +--- + src/kdiff3.cpp | 33 +++++++++++++++++---------------- + src/kdiff3.h | 8 ++++++-- + src/kdiff3_shell.cpp | 4 ++-- + 3 files changed, 25 insertions(+), 20 deletions(-) + +diff --git a/src/kdiff3.cpp b/src/kdiff3.cpp +index a36fb6037..562e1dc8a 100644 +--- a/src/kdiff3.cpp ++++ b/src/kdiff3.cpp +@@ -113,13 +113,28 @@ bool KDiff3App::isDirComparison() const + /* + Don't call completeInit from here it will be called in KDiff3Shell as needed. + */ +-KDiff3App::KDiff3App(QWidget* pParent, const QString& name, KDiff3Shell* pKDiff3Shell): ++KDiff3App::KDiff3App(QWidget* pParent, const QString& name, KDiff3Shell* pKDiff3Shell, const FileNames& names): + QMainWindow(pParent) + { + setWindowFlags(Qt::Widget); + setObjectName(name); + m_pKDiff3Shell = pKDiff3Shell; + ++ //Get SourceData objects intalized as soon as possiable or wierd errors can happen on startup. ++ if(!names.fn1.isEmpty()) ++ { ++ m_sd1->setFilename(names.fn1); ++ m_bDirCompare = m_sd1->isDir(); ++ } ++ if(!names.fn2.isEmpty()) ++ { ++ m_sd2->setFilename(names.fn2); ++ } ++ if(!names.fn3.isEmpty()) ++ { ++ m_sd3->setFilename(names.fn3); ++ } ++ + m_pCentralWidget = new QWidget(this); + QVBoxLayout* pCentralLayout = new QVBoxLayout(m_pCentralWidget); + pCentralLayout->setContentsMargins(0, 0, 0, 0); +@@ -440,25 +455,11 @@ void KDiff3App::doFileCompare() + mainInit(m_totalDiffStatus); + } + +-void KDiff3App::completeInit(const QString& fn1, const QString& fn2, const QString& fn3) ++void KDiff3App::completeInit() + { + bool openError = false; + bool bSuccess = true; + +- if(!fn1.isEmpty()) +- { +- m_sd1->setFilename(fn1); +- m_bDirCompare = m_sd1->isDir(); +- } +- if(!fn2.isEmpty()) +- { +- m_sd2->setFilename(fn2); +- } +- if(!fn3.isEmpty()) +- { +- m_sd3->setFilename(fn3); +- } +- + //Should not fail ever. + assert(m_bDirCompare == m_sd1->isDir()); + if(m_bDirCompare != m_sd2->isDir() || (!m_sd3->isEmpty() && m_bDirCompare != m_sd3->isDir())) +diff --git a/src/kdiff3.h b/src/kdiff3.h +index f27276a42..328be6700 100644 +--- a/src/kdiff3.h ++++ b/src/kdiff3.h +@@ -101,6 +101,10 @@ class ReversibleScrollBar : public QScrollBar + void valueChanged2(qint32); + }; + ++struct FileNames { ++ const QString& fn1, fn2, fn3; ++}; ++ + /* + InitFlag + */ +@@ -124,7 +128,7 @@ class KDiff3App: public QMainWindow + public: + /** constructor of KDiff3App, calls all init functions to create the application. + */ +- KDiff3App(QWidget* parent, const QString& name, KDiff3Shell* pKDiff3Shell); ++ KDiff3App(QWidget* parent, const QString& name, KDiff3Shell* pKDiff3Shell, const FileNames& names); + ~KDiff3App() override; + + /** initializes the KActions of the application */ +@@ -141,7 +145,7 @@ class KDiff3App: public QMainWindow + void readOptions(KSharedConfigPtr); + + // Finish initialisation +- void completeInit(const QString& fn1 = QString(), const QString& fn2 = QString(), const QString& fn3 = QString()); ++ void completeInit(); + //Restore goementry and showMainWindow + void showMainWindow(); + +diff --git a/src/kdiff3_shell.cpp b/src/kdiff3_shell.cpp +index 190c03163..1bb0048f7 100644 +--- a/src/kdiff3_shell.cpp ++++ b/src/kdiff3_shell.cpp +@@ -26,7 +26,7 @@ + + KDiff3Shell::KDiff3Shell(const QString& fn1, const QString& fn2, const QString& fn3) + { +- m_widget = new KDiff3App(this, u8"KDiff3Part", this); ++ m_widget = new KDiff3App(this, u8"KDiff3Part", this, {fn1, fn2, fn3}); + assert(m_widget); + setStandardToolBarMenuEnabled(true); + +@@ -36,7 +36,7 @@ KDiff3Shell::KDiff3Shell(const QString& fn1, const QString& fn2, const QString& + + setCentralWidget(m_widget); + +- m_widget->completeInit(fn1, fn2, fn3); ++ m_widget->completeInit(); + chk_connect_a(m_widget, &KDiff3App::createNewInstance, this, &KDiff3Shell::slotNewInstance); + + // apply the saved mainwindow settings, if any, and ask the mainwindow +-- +GitLab + diff --git a/kde-misc/kdiff3/kdiff3-1.11.2-r2.ebuild b/kde-misc/kdiff3/kdiff3-1.11.2-r2.ebuild new file mode 100644 index 000000000000..1c589f8dc211 --- /dev/null +++ b/kde-misc/kdiff3/kdiff3-1.11.2-r2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_HANDBOOK="optional" +KFMIN=6.3.0 +QTMIN=6.6.2 +inherit ecm kde.org + +DESCRIPTION="Frontend to diff3 based on KDE Frameworks" +HOMEPAGE="https://apps.kde.org/kdiff3/ https://userbase.kde.org/KDiff3" +SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="" + +COMMON_DEPEND=" + >=dev-qt/qt5compat-${QTMIN}:6 + >=dev-qt/qtbase-${QTMIN}:6[gui,widgets] + >=kde-frameworks/kconfig-${KFMIN}:6 + >=kde-frameworks/kconfigwidgets-${KFMIN}:6 + >=kde-frameworks/kcoreaddons-${KFMIN}:6 + >=kde-frameworks/kcrash-${KFMIN}:6 + >=kde-frameworks/ki18n-${KFMIN}:6 + >=kde-frameworks/kio-${KFMIN}:6 + >=kde-frameworks/ktextwidgets-${KFMIN}:6 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:6 + >=kde-frameworks/kxmlgui-${KFMIN}:6 +" +DEPEND="${COMMON_DEPEND} + >=dev-libs/boost-1.82 +" +RDEPEND="${COMMON_DEPEND} + !${CATEGORY}/${PN}:5 + sys-apps/diffutils +" + +PATCHES=( + "${FILESDIR}/${P}-fix-fp-exception.patch" # KDE-bug 487338 + "${FILESDIR}/${P}-unknown-error.patch" # KDE-bug 486782 +) + +src_configure() { + local mycmakeargs=( + -DBUILD_WITH_QT6=ON + # TODO: -DENABLE_GDBINDEX? + ) + ecm_src_configure +} |