summaryrefslogtreecommitdiff
path: root/kde-misc/kdiff3/files
diff options
context:
space:
mode:
Diffstat (limited to 'kde-misc/kdiff3/files')
-rw-r--r--kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch55
-rw-r--r--kde-misc/kdiff3/files/kdiff3-1.11.2-unknown-error.patch132
2 files changed, 0 insertions, 187 deletions
diff --git a/kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch b/kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch
deleted file mode 100644
index b735d659f928..000000000000
--- a/kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 5965591080306c66a48e961d264f212989fdae94 Mon Sep 17 00:00:00 2001
-From: Michael Reeves <reeves.87@gmail.com>
-Date: Thu, 4 Jul 2024 07:50:21 -0400
-Subject: [PATCH] Handle 0 height QWidget in getNofVisibleLines
-
-BUG:487338
-FIXED-IN:1.11.3
----
- src/difftextwindow.cpp | 8 +++++---
- src/mergeresultwindow.cpp | 3 ++-
- 2 files changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/src/difftextwindow.cpp b/src/difftextwindow.cpp
-index 783d13a66..85c0419fd 100644
---- a/src/difftextwindow.cpp
-+++ b/src/difftextwindow.cpp
-@@ -574,7 +574,9 @@ LineRef DiffTextWindow::convertDiff3LineIdxToLine(const LineType d3lIdx) const
- */
- LineRef getBestFirstLine(LineRef line, LineType nofLines, LineRef firstLine, LineType visibleLines)
- {
-- if(line < visibleLines) //well known result.
-+ assert(visibleLines >= 0); // VisibleLines should not be < 0.
-+
-+ if(line < visibleLines || visibleLines == 0) //well known result.
- return 0;
-
- LineRef newFirstLine = firstLine;
-@@ -1412,8 +1414,8 @@ void DiffTextWindow::resizeEvent(QResizeEvent* e)
- LineType DiffTextWindow::getNofVisibleLines() const
- {
- QFontMetrics fm = fontMetrics();
--
-- return height() / fm.lineSpacing() - 1;
-+ //QWidget::height() may return 0 with certian configurations with 0 length input files loaded.
-+ return std::max((LineType)ceil(height() / fm.lineSpacing()) - 1, 0);
- }
-
- qint32 DiffTextWindow::getVisibleTextAreaWidth() const
-diff --git a/src/mergeresultwindow.cpp b/src/mergeresultwindow.cpp
-index b1100569d..46e50c945 100644
---- a/src/mergeresultwindow.cpp
-+++ b/src/mergeresultwindow.cpp
-@@ -471,7 +471,8 @@ qint32 MergeResultWindow::getVisibleTextAreaWidth() const
- qint32 MergeResultWindow::getNofVisibleLines() const
- {
- QFontMetrics fm = fontMetrics();
-- return (height() - 3) / fm.lineSpacing() - 2;
-+ //QWidget::height() may return 0 with certian configurations with 0 length input files loaded.
-+ return std::max((qint32)ceil((height() - 3) / fm.lineSpacing()) - 2, 0);
- }
-
- qint32 MergeResultWindow::getTextXOffset() const
---
-GitLab
-
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
deleted file mode 100644
index 22c1ec341f7a..000000000000
--- a/kde-misc/kdiff3/files/kdiff3-1.11.2-unknown-error.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-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
-