Accepting request 174783 from KDE:Distro:Factory
- Add kdiff3-fix-save-relative-path.patch: fix saving merged files. Patch is from: https://bugs.archlinux.org/task/31813 and is already upstream. (forwarded request 174711 from aspiers) OBS-URL: https://build.opensuse.org/request/show/174783 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kdiff3?expand=0&rev=24
This commit is contained in:
parent
e42bd66e8e
commit
9c1c59eed1
78
kdiff3-fix-save-relative-path.patch
Normal file
78
kdiff3-fix-save-relative-path.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From 23ad423e4255c80ee22b269f73e20333f7c06678 Mon Sep 17 00:00:00 2001
|
||||
From: joachim99 <joachim.eibl@gmx.de>
|
||||
Date: Sat, 22 Sep 2012 23:02:12 +0200
|
||||
Subject: [PATCH] - Fix for saving files on KDE with relative path specified
|
||||
via command line option -o.
|
||||
|
||||
Signed-off-by: joachim99 <joachim.eibl@gmx.de>
|
||||
---
|
||||
kdiff3/src-QT4/fileaccess.cpp | 18 ++++++++++++++----
|
||||
kdiff3/src-QT4/kdiff3.cpp | 2 ++
|
||||
2 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/kdiff3/src-QT4/fileaccess.cpp b/kdiff3/src-QT4/fileaccess.cpp
|
||||
index 134fc26..b6e01f0 100644
|
||||
--- a/kdiff3/src-QT4/fileaccess.cpp
|
||||
+++ b/kdiff3/src-QT4/fileaccess.cpp
|
||||
@@ -183,7 +183,8 @@ static QString nicePath( const QFileInfo& fi )
|
||||
|
||||
void FileAccess::setFile( const QFileInfo& fi, FileAccess* pParent )
|
||||
{
|
||||
- m_filePath = nicePath( fi.filePath() ); // remove "./" at start
|
||||
+ m_filePath = pParent == 0 ? fi.absoluteFilePath() :
|
||||
+ nicePath( fi.filePath() ); // remove "./" at start
|
||||
|
||||
m_bSymLink = fi.isSymLink();
|
||||
if ( m_bSymLink || (!m_bExists && m_filePath.contains("@@") ) )
|
||||
@@ -566,7 +567,16 @@ QString FileAccess::absoluteFilePath() const
|
||||
if ( parent() != 0 )
|
||||
return parent()->absoluteFilePath() + "/" + m_filePath;
|
||||
else
|
||||
- return m_filePath;
|
||||
+ {
|
||||
+ if ( m_filePath.isEmpty() )
|
||||
+ return QString();
|
||||
+
|
||||
+ QFileInfo fi( m_filePath );
|
||||
+ if ( fi.isAbsolute() )
|
||||
+ return m_filePath;
|
||||
+ else
|
||||
+ return fi.absoluteFilePath(); // Probably never reached
|
||||
+ }
|
||||
} // Full abs path
|
||||
|
||||
// Just the name-part of the path, without parent directories
|
||||
@@ -1184,7 +1194,7 @@ bool FileAccessJobHandler::rename( const QString& dest )
|
||||
m_bSuccess = false;
|
||||
KIO::FileCopyJob* pJob = KIO::file_move( m_pFileAccess->url(), kurl, permissions, KIO::HideProgressInfo );
|
||||
connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
|
||||
- connect( pJob, SIGNAL(percent(KJob*,unsigned long)), this, SLOT(slotPercent(KJob*, unsigned long)));
|
||||
+ connect( pJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
|
||||
|
||||
ProgressProxy::enterEventLoop( pJob,
|
||||
i18n("Renaming file: %1 -> %2",m_pFileAccess->prettyAbsPath(),dest) );
|
||||
@@ -1673,7 +1683,7 @@ bool FileAccessJobHandler::listDir( t_DirectoryList* pDirList, bool bRecursive,
|
||||
&pp, SLOT( slotListDirInfoMessage(KJob*, const QString&) ));
|
||||
|
||||
// This line makes the transfer via fish unreliable.:-(
|
||||
- //connect( pListJob, SIGNAL(percent(KJob*,unsigned long)), this, SLOT(slotPercent(KJob*, unsigned long)));
|
||||
+ //connect( pListJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
|
||||
|
||||
ProgressProxy::enterEventLoop( pListJob,
|
||||
i18n("Listing directory: %1",m_pFileAccess->prettyAbsPath()) );
|
||||
diff --git a/kdiff3/src-QT4/kdiff3.cpp b/kdiff3/src-QT4/kdiff3.cpp
|
||||
index 165602f..de7cc9c 100644
|
||||
--- a/kdiff3/src-QT4/kdiff3.cpp
|
||||
+++ b/kdiff3/src-QT4/kdiff3.cpp
|
||||
@@ -211,6 +211,8 @@ KDiff3App::KDiff3App(QWidget* pParent, const char* /*name*/, KDiff3Part* pKDiff3
|
||||
m_outputFilename = args->getOption("output");
|
||||
if ( m_outputFilename.isEmpty() )
|
||||
m_outputFilename = args->getOption("out");
|
||||
+ if ( ! m_outputFilename.isEmpty() )
|
||||
+ m_outputFilename = FileAccess( m_outputFilename, true ).absoluteFilePath();
|
||||
}
|
||||
|
||||
m_bAutoFlag = args!=0 && args->isSet("auto");
|
||||
--
|
||||
1.7.12.2
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 2 12:47:34 BST 2013 - aspiers@suse.com
|
||||
|
||||
- Add kdiff3-fix-save-relative-path.patch: fix saving merged
|
||||
files. Patch is from: https://bugs.archlinux.org/task/31813
|
||||
and is already upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 20 16:10:19 UTC 2012 - nico.kruber@gmail.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package kdiff3
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -24,6 +24,8 @@ License: GPL-2.0+
|
||||
Group: Development/Tools/Version Control
|
||||
Url: http://kdiff3.sourceforge.net/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM kdiff3-fix-save-relative-path.patch
|
||||
Patch0: kdiff3-fix-save-relative-path.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: kdebase4-workspace-devel
|
||||
BuildRequires: libkonq-devel
|
||||
@ -48,6 +50,7 @@ KDiff3 is a program that:
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p2
|
||||
|
||||
%build
|
||||
%cmake_kde4 -d build
|
||||
|
Loading…
Reference in New Issue
Block a user