Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
SDK
KDiff3
Commits
024cab0c
Commit
024cab0c
authored
Dec 03, 2018
by
Pino Toscano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drop extra 'void' for parameter-less methods
This is a C-ism that never applied to C++
parent
924ad21b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
48 additions
and
48 deletions
+48
-48
src/DirectoryInfo.h
src/DirectoryInfo.h
+4
-4
src/MergeFileInfos.cpp
src/MergeFileInfos.cpp
+7
-7
src/MergeFileInfos.h
src/MergeFileInfos.h
+14
-14
src/directorymergewindow.cpp
src/directorymergewindow.cpp
+2
-2
src/fileaccess.cpp
src/fileaccess.cpp
+3
-3
src/fileaccess.h
src/fileaccess.h
+3
-3
src/kdiff3.h
src/kdiff3.h
+1
-1
src/optiondialog.cpp
src/optiondialog.cpp
+12
-12
src/pdiff.cpp
src/pdiff.cpp
+1
-1
src/selection.h
src/selection.h
+1
-1
No files found.
src/DirectoryInfo.h
View file @
024cab0c
...
...
@@ -36,10 +36,10 @@ class DirectoryInfo
m_dirDest
=
dirDest
;
}
inline
FileAccess
dirA
(
void
)
const
{
return
m_dirA
;
}
inline
FileAccess
dirB
(
void
)
const
{
return
m_dirB
;
}
inline
FileAccess
dirC
(
void
)
const
{
return
m_dirC
;
}
inline
FileAccess
destDir
(
void
)
const
inline
FileAccess
dirA
()
const
{
return
m_dirA
;
}
inline
FileAccess
dirB
()
const
{
return
m_dirB
;
}
inline
FileAccess
dirC
()
const
{
return
m_dirC
;
}
inline
FileAccess
destDir
()
const
{
if
(
m_dirDest
.
isValid
())
return
m_dirDest
;
...
...
src/MergeFileInfos.cpp
View file @
024cab0c
...
...
@@ -41,7 +41,7 @@ MergeFileInfos::~MergeFileInfos()
}
//bool operator>( const MergeFileInfos& );
QString
MergeFileInfos
::
subPath
(
void
)
const
QString
MergeFileInfos
::
subPath
()
const
{
if
(
m_pFileInfoA
&&
m_pFileInfoA
->
exists
())
return
m_pFileInfoA
->
fileRelPath
();
...
...
@@ -52,7 +52,7 @@ QString MergeFileInfos::subPath(void) const
return
QString
(
""
);
}
QString
MergeFileInfos
::
fileName
(
void
)
const
QString
MergeFileInfos
::
fileName
()
const
{
if
(
m_pFileInfoA
&&
m_pFileInfoA
->
exists
())
return
m_pFileInfoA
->
fileName
();
...
...
@@ -63,7 +63,7 @@ QString MergeFileInfos::fileName(void) const
return
QString
(
""
);
}
bool
MergeFileInfos
::
conflictingFileTypes
(
void
)
bool
MergeFileInfos
::
conflictingFileTypes
()
{
// Now check if file/dir-types fit.
if
(
isLinkA
()
||
isLinkB
()
||
isLinkC
())
...
...
@@ -88,7 +88,7 @@ bool MergeFileInfos::conflictingFileTypes(void)
return
false
;
}
QString
MergeFileInfos
::
fullNameA
(
void
)
const
QString
MergeFileInfos
::
fullNameA
()
const
{
if
(
existsInA
())
return
getFileInfoA
()
->
absoluteFilePath
();
...
...
@@ -96,7 +96,7 @@ QString MergeFileInfos::fullNameA(void) const
return
m_dirInfo
->
dirA
().
absoluteFilePath
()
+
"/"
+
subPath
();
}
QString
MergeFileInfos
::
fullNameB
(
void
)
const
QString
MergeFileInfos
::
fullNameB
()
const
{
if
(
existsInB
())
return
getFileInfoB
()
->
absoluteFilePath
();
...
...
@@ -104,7 +104,7 @@ QString MergeFileInfos::fullNameB(void) const
return
m_dirInfo
->
dirB
().
absoluteFilePath
()
+
"/"
+
subPath
();
}
QString
MergeFileInfos
::
fullNameC
(
void
)
const
QString
MergeFileInfos
::
fullNameC
()
const
{
if
(
existsInC
())
return
getFileInfoC
()
->
absoluteFilePath
();
...
...
@@ -120,7 +120,7 @@ void MergeFileInfos::sort(Qt::SortOrder order)
m_children
[
i
]
->
sort
(
order
);
}
QString
MergeFileInfos
::
fullNameDest
(
void
)
const
QString
MergeFileInfos
::
fullNameDest
()
const
{
if
(
m_dirInfo
->
destDir
().
prettyAbsPath
()
==
m_dirInfo
->
dirC
().
prettyAbsPath
())
return
fullNameC
();
...
...
src/MergeFileInfos.h
View file @
024cab0c
...
...
@@ -55,8 +55,8 @@ class MergeFileInfos
~
MergeFileInfos
();
//bool operator>( const MergeFileInfos& );
QString
subPath
(
void
)
const
;
QString
fileName
(
void
)
const
;
QString
subPath
()
const
;
QString
fileName
()
const
;
bool
dirA
()
const
{
return
m_pFileInfoA
?
m_pFileInfoA
->
isDir
()
:
false
;
}
bool
dirB
()
const
{
return
m_pFileInfoB
?
m_pFileInfoB
->
isDir
()
:
false
;
}
...
...
@@ -68,29 +68,29 @@ class MergeFileInfos
bool
existsInB
()
const
{
return
m_pFileInfoB
!=
nullptr
;
}
bool
existsInC
()
const
{
return
m_pFileInfoC
!=
nullptr
;
}
bool
conflictingFileTypes
(
void
);
bool
conflictingFileTypes
();
void
sort
(
Qt
::
SortOrder
order
);
inline
MergeFileInfos
*
parent
(
void
)
const
{
return
m_pParent
;
}
inline
MergeFileInfos
*
parent
()
const
{
return
m_pParent
;
}
inline
void
setParent
(
MergeFileInfos
*
inParent
)
{
m_pParent
=
inParent
;
}
inline
const
QList
<
MergeFileInfos
*>&
children
(
void
)
const
{
return
m_children
;
}
inline
const
QList
<
MergeFileInfos
*>&
children
()
const
{
return
m_children
;
}
inline
void
addChild
(
MergeFileInfos
*
child
)
{
m_children
.
push_back
(
child
);
}
inline
void
clear
(
void
)
{
m_children
.
clear
();
}
inline
void
clear
()
{
m_children
.
clear
();
}
FileAccess
*
getFileInfoA
(
void
)
const
{
return
m_pFileInfoA
;
}
FileAccess
*
getFileInfoB
(
void
)
const
{
return
m_pFileInfoB
;
}
FileAccess
*
getFileInfoC
(
void
)
const
{
return
m_pFileInfoC
;
}
FileAccess
*
getFileInfoA
()
const
{
return
m_pFileInfoA
;
}
FileAccess
*
getFileInfoB
()
const
{
return
m_pFileInfoB
;
}
FileAccess
*
getFileInfoC
()
const
{
return
m_pFileInfoC
;
}
void
setFileInfoA
(
FileAccess
*
newInfo
)
{
m_pFileInfoA
=
newInfo
;
}
void
setFileInfoB
(
FileAccess
*
newInfo
)
{
m_pFileInfoB
=
newInfo
;
}
void
setFileInfoC
(
FileAccess
*
newInfo
)
{
m_pFileInfoC
=
newInfo
;
}
QString
fullNameA
(
void
)
const
;
QString
fullNameB
(
void
)
const
;
QString
fullNameC
(
void
)
const
;
QString
fullNameDest
(
void
)
const
;
QString
fullNameA
()
const
;
QString
fullNameB
()
const
;
QString
fullNameC
()
const
;
QString
fullNameDest
()
const
;
inline
QSharedPointer
<
DirectoryInfo
>
getDirectoryInfo
(
void
)
const
{
return
m_dirInfo
;
}
inline
QSharedPointer
<
DirectoryInfo
>
getDirectoryInfo
()
const
{
return
m_dirInfo
;
}
void
setDirectoryInfo
(
const
QSharedPointer
<
DirectoryInfo
>
&
dirInfo
)
{
m_dirInfo
=
dirInfo
;
}
inline
QString
getDirNameA
()
const
{
return
getDirectoryInfo
()
->
dirA
().
prettyAbsPath
();
}
...
...
src/directorymergewindow.cpp
View file @
024cab0c
...
...
@@ -188,8 +188,8 @@ class DirectoryMergeWindow::DirectoryMergeWindowPrivate : public QAbstractItemMo
return
nullptr
;
}
bool
isThreeWay
(
void
)
const
{
return
rootMFI
()
->
getDirectoryInfo
()
->
dirC
().
isValid
();
}
MergeFileInfos
*
rootMFI
(
void
)
const
{
return
m_pRoot
;
}
bool
isThreeWay
()
const
{
return
rootMFI
()
->
getDirectoryInfo
()
->
dirC
().
isValid
();
}
MergeFileInfos
*
rootMFI
()
const
{
return
m_pRoot
;
}
static
void
setPixmaps
(
MergeFileInfos
&
mfi
,
bool
);
...
...
src/fileaccess.cpp
View file @
024cab0c
...
...
@@ -49,7 +49,7 @@ FileAccess::FileAccess()
reset
();
}
void
FileAccess
::
reset
(
void
)
void
FileAccess
::
reset
()
{
m_fileInfo
=
QFileInfo
();
m_bExists
=
false
;
...
...
@@ -130,7 +130,7 @@ void FileAccess::setFile(const QUrl& url, bool bWantToWrite)
}
}
void
FileAccess
::
loadData
(
void
)
void
FileAccess
::
loadData
()
{
m_fileInfo
.
setCaching
(
true
);
...
...
@@ -714,7 +714,7 @@ bool FileAccess::createBackup(const QString& bakExtension)
return
true
;
}
void
FileAccess
::
doError
(
void
)
void
FileAccess
::
doError
()
{
m_bExists
=
false
;
}
...
...
src/fileaccess.h
View file @
024cab0c
...
...
@@ -39,7 +39,7 @@ public:
void
setFile
(
const
QUrl
&
name
,
bool
bWantToWrite
=
false
);
void
setFile
(
FileAccess
*
pParent
,
QFileInfo
fi
);
void
loadData
(
void
);
void
loadData
();
bool
isNormal
()
const
;
bool
isValid
()
const
;
...
...
@@ -94,12 +94,12 @@ public:
FileAccess
*
parent
()
const
;
// !=0 for listDir-results, but only valid if the parent was not yet destroyed.
void
doError
(
void
);
void
doError
();
void
filterList
(
t_DirectoryList
*
pDirList
,
const
QString
&
filePattern
,
const
QString
&
fileAntiPattern
,
const
QString
&
dirAntiPattern
,
const
bool
bUseCvsIgnore
);
QDir
getBaseDirectory
(
void
)
const
{
return
m_baseDir
;
}
QDir
getBaseDirectory
()
const
{
return
m_baseDir
;
}
private:
friend
class
FileAccessJobHandler
;
...
...
src/kdiff3.h
View file @
024cab0c
...
...
@@ -144,7 +144,7 @@ class KDiff3App : public QSplitter
protected:
void
setLockPainting
(
bool
bLock
);
void
createCaption
(
void
);
void
createCaption
();
void
initDirectoryMergeActions
();
/** sets up the statusbar for the main window by initialzing a statuslabel. */
void
initStatusBar
();
...
...
src/optiondialog.cpp
View file @
024cab0c
...
...
@@ -649,7 +649,7 @@ void OptionDialog::helpRequested()
KHelpClient
::
invokeHelp
(
QStringLiteral
(
"kdiff3/index.html"
),
QString
());
}
OptionDialog
::~
OptionDialog
(
void
)
OptionDialog
::~
OptionDialog
()
{
}
...
...
@@ -683,7 +683,7 @@ void OptionDialog::setupOtherOptions()
addOptionItem
(
new
OptionStringList
(
"RecentEncodings"
,
&
m_options
.
m_recentEncodings
));
}
void
OptionDialog
::
setupFontPage
(
void
)
void
OptionDialog
::
setupFontPage
()
{
QFrame
*
page
=
new
QFrame
();
KPageWidgetItem
*
pageItem
=
new
KPageWidgetItem
(
page
,
i18n
(
"Font"
));
...
...
@@ -728,7 +728,7 @@ void OptionDialog::setupFontPage(void)
// );
}
void
OptionDialog
::
setupColorPage
(
void
)
void
OptionDialog
::
setupColorPage
()
{
QFrame
*
page
=
new
QFrame
();
KPageWidgetItem
*
pageItem
=
new
KPageWidgetItem
(
page
,
i18n
(
"Color"
));
...
...
@@ -888,7 +888,7 @@ void OptionDialog::setupColorPage(void)
topLayout
->
addStretch
(
10
);
}
void
OptionDialog
::
setupEditPage
(
void
)
void
OptionDialog
::
setupEditPage
()
{
QFrame
*
page
=
new
QFrame
();
KPageWidgetItem
*
pageItem
=
new
KPageWidgetItem
(
page
,
i18n
(
"Editor"
));
...
...
@@ -954,7 +954,7 @@ void OptionDialog::setupEditPage(void)
topLayout
->
addStretch
(
10
);
}
void
OptionDialog
::
setupDiffPage
(
void
)
void
OptionDialog
::
setupDiffPage
()
{
QFrame
*
page
=
new
QFrame
();
KPageWidgetItem
*
pageItem
=
new
KPageWidgetItem
(
page
,
i18n
(
"Diff"
));
...
...
@@ -1040,7 +1040,7 @@ void OptionDialog::setupDiffPage(void)
topLayout
->
addStretch
(
10
);
}
void
OptionDialog
::
setupMergePage
(
void
)
void
OptionDialog
::
setupMergePage
()
{
QFrame
*
page
=
new
QFrame
();
KPageWidgetItem
*
pageItem
=
new
KPageWidgetItem
(
page
,
i18n
(
"Merge"
));
...
...
@@ -1239,7 +1239,7 @@ void OptionDialog::setupMergePage(void)
topLayout
->
addStretch
(
10
);
}
void
OptionDialog
::
setupDirectoryMergePage
(
void
)
void
OptionDialog
::
setupDirectoryMergePage
()
{
QFrame
*
page
=
new
QFrame
();
KPageWidgetItem
*
pageItem
=
new
KPageWidgetItem
(
page
,
i18n
(
"Directory"
));
...
...
@@ -1496,7 +1496,7 @@ public:
}
};
*/
void
OptionDialog
::
setupRegionalPage
(
void
)
void
OptionDialog
::
setupRegionalPage
()
{
/*
TODO: What is this line supposed to do besides leak memory? Introduced as is in .91 no explanation
...
...
@@ -1604,7 +1604,7 @@ void OptionDialog::setupRegionalPage(void)
topLayout
->
addStretch
(
10
);
}
void
OptionDialog
::
setupIntegrationPage
(
void
)
void
OptionDialog
::
setupIntegrationPage
()
{
QFrame
*
page
=
new
QFrame
();
KPageWidgetItem
*
pageItem
=
new
KPageWidgetItem
(
page
,
i18n
(
"Integration"
));
...
...
@@ -1676,7 +1676,7 @@ void OptionDialog::slotEncodingChanged()
}
}
void
OptionDialog
::
setupKeysPage
(
void
)
void
OptionDialog
::
setupKeysPage
()
{
//QVBox *page = addVBoxPage( i18n("Keys"), i18n("KeyDialog" ),
// BarIcon("fonts", KIconLoader::SizeMedium ) );
...
...
@@ -1687,7 +1687,7 @@ void OptionDialog::setupKeysPage(void)
//topLayout->addWidget( m_pKeyDialog );
}
void
OptionDialog
::
slotOk
(
void
)
void
OptionDialog
::
slotOk
()
{
slotApply
();
...
...
@@ -1695,7 +1695,7 @@ void OptionDialog::slotOk(void)
}
/** Copy the values from the widgets to the public variables.*/
void
OptionDialog
::
slotApply
(
void
)
void
OptionDialog
::
slotApply
()
{
std
::
list
<
OptionItem
*>::
iterator
i
;
for
(
i
=
m_optionItemList
.
begin
();
i
!=
m_optionItemList
.
end
();
++
i
)
...
...
src/pdiff.cpp
View file @
024cab0c
...
...
@@ -377,7 +377,7 @@ void KDiff3App::setLockPainting(bool bLock)
if
(
m_pMergeResultWindow
)
m_pMergeResultWindow
->
setPaintingAllowed
(
!
bLock
);
}
void
KDiff3App
::
createCaption
(
void
)
void
KDiff3App
::
createCaption
()
{
// Try to create a meaningful but not too long caption
// 1. If the filenames are equal then show only one filename
...
...
src/selection.h
View file @
024cab0c
...
...
@@ -40,7 +40,7 @@ public:
inline
LineRef
getOldLastLine
()
{
return
oldLastLine
;
};
inline
LineRef
getOldFirstLine
()
{
return
oldFirstLine
;
};
inline
bool
selectionContainsData
(
void
)
{
return
bSelectionContainsData
;
};
inline
bool
selectionContainsData
()
{
return
bSelectionContainsData
;
};
bool
isEmpty
()
{
return
firstLine
==
invalidRef
||
(
firstLine
==
lastLine
&&
firstPos
==
lastPos
)
||
bSelectionContainsData
==
false
;
}
void
reset
()
{
...
...
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