Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDiff3
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KDE
KDiff3
Commits
b94ecd09
Commit
b94ecd09
authored
Jan 26, 2018
by
Michael Reeves
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile with -DQT_NO_URL_CAST_FROM_STRING
# Conflicts: # CMakeLists.txt
parent
6c2cf88e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
CMakeLists.txt
CMakeLists.txt
+1
-0
src/fileaccess.cpp
src/fileaccess.cpp
+5
-5
src/fileaccess.h
src/fileaccess.h
+2
-2
src/kdiff3.cpp
src/kdiff3.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
b94ecd09
...
...
@@ -55,6 +55,7 @@ set(KDiff3_LIBRARIES ${Qt5PrintSupport_LIBRARIES} KF5::I18n KF5::CoreAddons KF5:
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CLANG_WARNING_FLAGS
}
"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
CLANG_WARNING_FLAGS
}
"
)
add_definitions
(
-DQT_NO_URL_CAST_FROM_STRING
)
#remove unnneeded errors
remove_definitions
(
-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_KEYWORDS
)
...
...
src/fileaccess.cpp
View file @
b94ecd09
...
...
@@ -804,7 +804,7 @@ bool FileAccess::removeFile()
else
{
FileAccessJobHandler
jh
(
this
);
return
jh
.
removeFile
(
absoluteFilePath
(
)
);
return
jh
.
removeFile
(
QUrl
(
absoluteFilePath
()
)
);
}
}
...
...
@@ -1137,7 +1137,7 @@ bool FileAccessJobHandler::rmDir( const QString& dirName )
}
}
bool
FileAccessJobHandler
::
removeFile
(
const
Q
String
&
fileName
)
bool
FileAccessJobHandler
::
removeFile
(
const
Q
Url
&
fileName
)
{
if
(
fileName
.
isEmpty
()
)
return
false
;
...
...
@@ -1147,12 +1147,12 @@ bool FileAccessJobHandler::removeFile( const QString& fileName )
KIO
::
SimpleJob
*
pJob
=
KIO
::
file_delete
(
fileName
,
KIO
::
HideProgressInfo
);
connect
(
pJob
,
&
KIO
::
SimpleJob
::
result
,
this
,
&
FileAccessJobHandler
::
slotSimpleJobResult
);
ProgressProxy
::
enterEventLoop
(
pJob
,
i18n
(
"Removing file: %1"
,
fileName
)
);
ProgressProxy
::
enterEventLoop
(
pJob
,
i18n
(
"Removing file: %1"
,
fileName
.
toDisplayString
()
)
);
return
m_bSuccess
;
}
}
bool
FileAccessJobHandler
::
symLink
(
const
Q
String
&
linkTarget
,
const
QString
&
linkLocation
)
bool
FileAccessJobHandler
::
symLink
(
const
Q
Url
&
linkTarget
,
const
QUrl
&
linkLocation
)
{
if
(
linkTarget
.
isEmpty
()
||
linkLocation
.
isEmpty
()
)
return
false
;
...
...
@@ -1163,7 +1163,7 @@ bool FileAccessJobHandler::symLink( const QString& linkTarget, const QString& li
connect
(
pJob
,
&
KIO
::
CopyJob
::
result
,
this
,
&
FileAccessJobHandler
::
slotSimpleJobResult
);
ProgressProxy
::
enterEventLoop
(
pJob
,
i18n
(
"Creating symbolic link: %1 -> %2"
,
linkLocation
,
linkTarget
)
);
i18n
(
"Creating symbolic link: %1 -> %2"
,
linkLocation
.
toDisplayString
(),
linkTarget
.
toDisplayString
()
)
);
return
m_bSuccess
;
}
}
...
...
src/fileaccess.h
View file @
b94ecd09
...
...
@@ -146,8 +146,8 @@ public:
const
QString
&
dirAntiPattern
,
bool
bFollowDirLinks
,
bool
bUseCvsIgnore
);
bool
mkDir
(
const
QString
&
dirName
);
bool
rmDir
(
const
QString
&
dirName
);
bool
removeFile
(
const
Q
String
&
dirName
);
bool
symLink
(
const
Q
String
&
linkTarget
,
const
QString
&
linkLocation
);
bool
removeFile
(
const
Q
Url
&
dirName
);
bool
symLink
(
const
Q
Url
&
linkTarget
,
const
QUrl
&
linkLocation
);
private:
FileAccess
*
m_pFileAccess
;
...
...
src/kdiff3.cpp
View file @
b94ecd09
...
...
@@ -755,7 +755,7 @@ void KDiff3App::slotFileSaveAs()
{
slotStatusMsg
(
i18n
(
"Saving file with a new filename..."
)
);
QString
s
=
QFileDialog
::
getSaveFileUrl
(
this
,
i18n
(
"Save As..."
),
Q
Dir
::
currentPath
(
),
0
).
url
(
QUrl
::
PreferLocalFile
);
QString
s
=
QFileDialog
::
getSaveFileUrl
(
this
,
i18n
(
"Save As..."
),
Q
Url
::
fromLocalFile
(
QDir
::
currentPath
()
),
0
).
url
(
QUrl
::
PreferLocalFile
);
if
(
!
s
.
isEmpty
()
)
{
m_outputFilename
=
s
;
m_pMergeResultWindowTitle
->
setFileName
(
m_outputFilename
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment