Gentoo Archives: gentoo-commits

From: "Chris Reffett (creffett)" <creffett@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in kde-misc/kdiff3/files: kdiff3-0.9.97-relativepath.patch
Date: Fri, 30 Nov 2012 05:52:12
Message-Id: 20121130055202.6F8F720C9F@flycatcher.gentoo.org
1 creffett 12/11/30 05:52:02
2
3 Added: kdiff3-0.9.97-relativepath.patch
4 Log:
5 Revision bump. Do not append 'Categories' to .desktop file, bug 443562. Add patch to fix using file paths with -o, bug 443938.
6
7 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 42618354)
8
9 Revision Changes Path
10 1.1 kde-misc/kdiff3/files/kdiff3-0.9.97-relativepath.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-misc/kdiff3/files/kdiff3-0.9.97-relativepath.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-misc/kdiff3/files/kdiff3-0.9.97-relativepath.patch?rev=1.1&content-type=text/plain
14
15 Index: kdiff3-0.9.97-relativepath.patch
16 ===================================================================
17
18
19 --- a/kdiff3/src-QT4/fileaccess.cpp
20 +++ b/kdiff3/src-QT4/fileaccess.cpp
21 @@ -183,7 +183,8 @@
22
23 void FileAccess::setFile( const QFileInfo& fi, FileAccess* pParent )
24 {
25 - m_filePath = nicePath( fi.filePath() ); // remove "./" at start
26 + m_filePath = pParent == 0 ? fi.absoluteFilePath() :
27 + nicePath( fi.filePath() ); // remove "./" at start
28
29 m_bSymLink = fi.isSymLink();
30 if ( m_bSymLink || (!m_bExists && m_filePath.contains("@@") ) )
31 @@ -566,7 +567,16 @@
32 if ( parent() != 0 )
33 return parent()->absoluteFilePath() + "/" + m_filePath;
34 else
35 - return m_filePath;
36 + {
37 + if ( m_filePath.isEmpty() )
38 + return QString();
39 +
40 + QFileInfo fi( m_filePath );
41 + if ( fi.isAbsolute() )
42 + return m_filePath;
43 + else
44 + return fi.absoluteFilePath(); // Probably never reached
45 + }
46 } // Full abs path
47
48 // Just the name-part of the path, without parent directories
49 @@ -1184,7 +1194,7 @@
50 m_bSuccess = false;
51 KIO::FileCopyJob* pJob = KIO::file_move( m_pFileAccess->url(), kurl, permissions, KIO::HideProgressInfo );
52 connect( pJob, SIGNAL(result(KJob*)), this, SLOT(slotSimpleJobResult(KJob*)));
53 - connect( pJob, SIGNAL(percent(KJob*,unsigned long)), this, SLOT(slotPercent(KJob*, unsigned long)));
54 + connect( pJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
55
56 ProgressProxy::enterEventLoop( pJob,
57 i18n("Renaming file: %1 -> %2",m_pFileAccess->prettyAbsPath(),dest) );
58 @@ -1673,7 +1683,7 @@
59 &pp, SLOT( slotListDirInfoMessage(KJob*, const QString&) ));
60
61 // This line makes the transfer via fish unreliable.:-(
62 - //connect( pListJob, SIGNAL(percent(KJob*,unsigned long)), this, SLOT(slotPercent(KJob*, unsigned long)));
63 + //connect( pListJob, SIGNAL(percent(KJob*,unsigned long)), &pp, SLOT(slotPercent(KJob*, unsigned long)));
64
65 ProgressProxy::enterEventLoop( pListJob,
66 i18n("Listing directory: %1",m_pFileAccess->prettyAbsPath()) );
67
68 kdiff3/src-QT4/kdiff3.cpp Diff
69
70 --- a/kdiff3/src-QT4/kdiff3.cpp
71 +++ b/kdiff3/src-QT4/kdiff3.cpp
72 @@ -211,6 +211,8 @@
73 m_outputFilename = args->getOption("output");
74 if ( m_outputFilename.isEmpty() )
75 m_outputFilename = args->getOption("out");
76 + if ( ! m_outputFilename.isEmpty() )
77 + m_outputFilename = FileAccess( m_outputFilename, true ).absoluteFilePath();
78 }
79
80 m_bAutoFlag = args!=0 && args->isSet("auto");