Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SDK
Dolphin Plugins
Commits
eaef1920
Commit
eaef1920
authored
Sep 15, 2020
by
Alexander Lohnau
💬
Browse files
Compile with QT_NO_FOREACH QT_NO_KEYWORDS
parent
c67ff4dd
Changes
63
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
eaef1920
...
...
@@ -42,7 +42,7 @@ include(ECMOptionalAddSubdirectory)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_definitions
(
-DQT_NO_URL_CAST_FROM_STRING
)
add_definitions
(
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_FOREACH -DQT_NO_KEYWORDS
)
ecm_optional_add_subdirectory
(
svn
)
ecm_optional_add_subdirectory
(
git
)
...
...
bazaar/fileviewbazaarplugin.cpp
View file @
eaef1920
...
...
@@ -282,7 +282,7 @@ QList<QAction*> FileViewBazaarPlugin::outOfVersionControlActions(const KFileItem
QList
<
QAction
*>
FileViewBazaarPlugin
::
contextMenuFilesActions
(
const
KFileItemList
&
items
)
const
{
Q_ASSERT
(
!
items
.
isEmpty
());
for
each
(
const
KFileItem
&
item
,
items
)
{
for
(
const
KFileItem
&
item
:
items
)
{
m_contextItems
.
append
(
item
);
}
m_contextDir
.
clear
();
...
...
@@ -294,7 +294,7 @@ QList<QAction*> FileViewBazaarPlugin::contextMenuFilesActions(const KFileItemLis
const
int
itemsCount
=
items
.
count
();
int
versionedCount
=
0
;
int
editingCount
=
0
;
for
each
(
const
KFileItem
&
item
,
items
)
{
for
(
const
KFileItem
&
item
:
items
)
{
const
ItemVersion
state
=
itemVersion
(
item
);
if
(
state
!=
UnversionedVersion
)
{
++
versionedCount
;
...
...
@@ -436,10 +436,10 @@ void FileViewBazaarPlugin::slotOperationCompleted(int exitCode, QProcess::ExitSt
m_pendingOperation
=
false
;
if
((
exitStatus
!=
QProcess
::
NormalExit
)
||
(
exitCode
!=
0
))
{
emit
errorMessage
(
m_errorMsg
);
Q_EMIT
errorMessage
(
m_errorMsg
);
}
else
if
(
m_contextItems
.
isEmpty
())
{
emit
operationCompletedMessage
(
m_operationCompletedMsg
);
emit
itemVersionsChanged
();
Q_EMIT
operationCompletedMessage
(
m_operationCompletedMsg
);
Q_EMIT
itemVersionsChanged
();
}
else
{
startBazaarCommandProcess
();
}
...
...
@@ -451,7 +451,7 @@ void FileViewBazaarPlugin::slotOperationError()
m_contextItems
.
clear
();
m_pendingOperation
=
false
;
emit
errorMessage
(
m_errorMsg
);
Q_EMIT
errorMessage
(
m_errorMsg
);
}
void
FileViewBazaarPlugin
::
execBazaarCommand
(
const
QString
&
command
,
...
...
@@ -460,7 +460,7 @@ void FileViewBazaarPlugin::execBazaarCommand(const QString& command,
const
QString
&
errorMsg
,
const
QString
&
operationCompletedMsg
)
{
emit
infoMessage
(
infoMsg
);
Q_EMIT
infoMessage
(
infoMsg
);
QProcess
process
;
process
.
start
(
QLatin1String
(
"bzr plugins"
));
...
...
@@ -477,7 +477,7 @@ void FileViewBazaarPlugin::execBazaarCommand(const QString& command,
}
if
(
!
foundQbzr
)
{
emit
infoMessage
(
"Please Install QBzr"
);
Q_EMIT
infoMessage
(
"Please Install QBzr"
);
return
;
}
...
...
bazaar/fileviewbazaarplugin.h
View file @
eaef1920
...
...
@@ -49,7 +49,7 @@ public:
private
slots
:
private
Q_SLOTS
:
void
updateFiles
();
void
pullFiles
();
void
pushFiles
();
...
...
dropbox/fileviewdropboxplugin.cpp
View file @
eaef1920
...
...
@@ -78,7 +78,7 @@ FileViewDropboxPlugin::FileViewDropboxPlugin(QObject* parent, const QVariantList
// Find and watch aggregation.dbx file
QDir
dir
(
dropboxDir
);
QStringList
nameFilter
(
"instance*"
);
QStringList
instanceDirs
=
dir
.
entryList
(
nameFilter
);
const
QStringList
instanceDirs
=
dir
.
entryList
(
nameFilter
);
QString
aggregationDB
=
""
;
for
(
const
QString
&
instance
:
instanceDirs
)
{
aggregationDB
=
dropboxDir
+
'/'
+
instance
+
'/'
+
"aggregation.dbx"
;
...
...
@@ -145,7 +145,7 @@ QList<QAction*> FileViewDropboxPlugin::versionControlActions(const KFileItemList
return
QList
<
QAction
*>
();
}
for
each
(
const
KFileItem
&
item
,
items
)
{
for
(
const
KFileItem
&
item
:
items
)
{
d
->
contextFilePaths
<<
QDir
(
item
.
localPath
()).
canonicalPath
();
}
...
...
@@ -156,7 +156,7 @@ QList<QAction*> FileViewDropboxPlugin::versionControlActions(const KFileItemList
}
// analyze item options and dynamically form a menu
for
each
(
const
QString
&
replyLine
,
reply
)
{
for
(
const
QString
&
replyLine
:
reply
)
{
const
QStringList
options
=
replyLine
.
split
(
'~'
);
if
(
options
.
count
()
>
2
)
{
...
...
dropbox/fileviewdropboxplugin.h
View file @
eaef1920
...
...
@@ -66,7 +66,7 @@ public:
QList
<
QAction
*>
versionControlActions
(
const
KFileItemList
&
items
)
const
override
;
QList
<
QAction
*>
outOfVersionControlActions
(
const
KFileItemList
&
items
)
const
override
;
private
slots
:
private
Q_SLOTS
:
void
handleContextAction
(
QAction
*
action
);
private:
...
...
git/checkoutdialog.cpp
View file @
eaef1920
...
...
@@ -120,7 +120,7 @@ CheckoutDialog::CheckoutDialog(QWidget* parent):
setDefaultNewBranchName
(
m_branchComboBox
->
currentText
());
//keep local branches to prevent creating an equally named new branch
for
each
(
const
QString
&
b
,
branches
)
{
for
(
const
QString
&
b
:
branches
)
{
if
(
!
b
.
startsWith
(
QLatin1String
(
"remotes/"
)))
{
//you CAN create local branches called "remotes/...", but since no sane person
//would do that, we save the effort of another call to "git branch"
...
...
git/checkoutdialog.h
View file @
eaef1920
...
...
@@ -55,7 +55,7 @@ public:
*/
QString
newBranchName
()
const
;
private
slots
:
private
Q_SLOTS
:
void
branchRadioButtonToggled
(
bool
checked
);
void
newBranchCheckBoxStateToggled
(
int
state
);
/**
...
...
git/commitdialog.h
View file @
eaef1920
...
...
@@ -43,7 +43,7 @@ public:
* @returns True if the last commit is to be amended, false otherwise
*/
bool
amend
()
const
;
private
slots
:
private
Q_SLOTS
:
void
signOffButtonClicked
();
void
amendCheckBoxStateChanged
();
void
saveDialogSize
();
...
...
git/fileviewgitplugin.cpp
View file @
eaef1920
...
...
@@ -308,7 +308,7 @@ QList<QAction*> FileViewGitPlugin::contextMenuFilesActions(const KFileItemList&
if
(
!
m_pendingOperation
){
m_contextDir
=
QFileInfo
(
items
.
first
().
localPath
()).
canonicalPath
();
m_contextItems
.
clear
();
for
each
(
const
KFileItem
&
item
,
items
){
for
(
const
KFileItem
&
item
:
items
){
m_contextItems
.
append
(
item
);
}
...
...
@@ -316,7 +316,7 @@ QList<QAction*> FileViewGitPlugin::contextMenuFilesActions(const KFileItemList&
int
versionedCount
=
0
;
int
addableCount
=
0
;
int
revertCount
=
0
;
for
each
(
const
KFileItem
&
item
,
items
){
for
(
const
KFileItem
&
item
:
items
){
const
ItemVersion
state
=
itemVersion
(
item
);
if
(
state
!=
UnversionedVersion
&&
state
!=
RemovedVersion
&&
state
!=
IgnoredVersion
)
{
...
...
@@ -473,7 +473,7 @@ void FileViewGitPlugin::log()
);
if
(
!
process
.
waitForFinished
()
||
process
.
exitCode
()
!=
0
)
{
emit
errorMessage
(
xi18nd
(
"@info:status"
,
"<application>Git</application> Log failed."
));
Q_EMIT
errorMessage
(
xi18nd
(
"@info:status"
,
"<application>Git</application> Log failed."
));
return
;
}
...
...
@@ -571,12 +571,12 @@ void FileViewGitPlugin::checkout()
}
if
(
process
.
exitCode
()
==
0
&&
process
.
exitStatus
()
==
QProcess
::
NormalExit
)
{
if
(
!
completedMessage
.
isEmpty
())
{
emit
operationCompletedMessage
(
completedMessage
);
emit
itemVersionsChanged
();
Q_EMIT
operationCompletedMessage
(
completedMessage
);
Q_EMIT
itemVersionsChanged
();
}
}
else
{
emit
errorMessage
(
xi18nd
(
"@info:status"
,
"<application>Git</application> Checkout failed."
Q_EMIT
errorMessage
(
xi18nd
(
"@info:status"
,
"<application>Git</application> Checkout failed."
" Maybe your working directory is dirty."
));
}
}
...
...
@@ -610,8 +610,8 @@ void FileViewGitPlugin::commit()
}
}
if
(
!
completedMessage
.
isEmpty
())
{
emit
operationCompletedMessage
(
completedMessage
);
emit
itemVersionsChanged
();
Q_EMIT
operationCompletedMessage
(
completedMessage
);
Q_EMIT
itemVersionsChanged
();
}
}
}
...
...
@@ -641,10 +641,10 @@ void FileViewGitPlugin::createTag()
}
if
(
process
.
exitCode
()
==
0
&&
process
.
exitStatus
()
==
QProcess
::
NormalExit
)
{
completedMessage
=
xi18nd
(
"@info:status"
,
"Successfully created tag '%1'"
,
dialog
.
tagName
());
emit
operationCompletedMessage
(
completedMessage
);
Q_EMIT
operationCompletedMessage
(
completedMessage
);
}
else
{
//I don't know any other error, but in case one occurs, the user doesn't get FALSE error messages
emit
errorMessage
(
gotTagAlreadyExistsMessage
?
Q_EMIT
errorMessage
(
gotTagAlreadyExistsMessage
?
xi18nd
(
"@info:status"
,
"<application>Git</application> tag creation failed."
" A tag with the name '%1' already exists."
,
dialog
.
tagName
())
:
xi18nd
(
"@info:status"
,
"<application>Git</application> tag creation failed."
)
...
...
@@ -663,7 +663,7 @@ void FileViewGitPlugin::push()
dialog
.
localBranch
(),
dialog
.
destination
(),
dialog
.
remoteBranch
());
m_operationCompletedMsg
=
xi18nd
(
"@info:status"
,
"Pushed branch %1 to %2:%3."
,
dialog
.
localBranch
(),
dialog
.
destination
(),
dialog
.
remoteBranch
());
emit
infoMessage
(
xi18nd
(
"@info:status"
,
"Pushing branch %1 to %2:%3..."
,
Q_EMIT
infoMessage
(
xi18nd
(
"@info:status"
,
"Pushing branch %1 to %2:%3..."
,
dialog
.
localBranch
(),
dialog
.
destination
(),
dialog
.
remoteBranch
()));
m_command
=
"push"
;
...
...
@@ -684,7 +684,7 @@ void FileViewGitPlugin::pull()
dialog
.
remoteBranch
(),
dialog
.
source
());
m_operationCompletedMsg
=
xi18nd
(
"@info:status"
,
"Pulled branch %1 from %2 successfully."
,
dialog
.
remoteBranch
(),
dialog
.
source
());
emit
infoMessage
(
xi18nd
(
"@info:status"
,
"Pulling branch %1 from %2..."
,
dialog
.
remoteBranch
(),
Q_EMIT
infoMessage
(
xi18nd
(
"@info:status"
,
"Pulling branch %1 from %2..."
,
dialog
.
remoteBranch
(),
dialog
.
source
()));
m_command
=
"pull"
;
...
...
@@ -708,10 +708,10 @@ void FileViewGitPlugin::slotOperationCompleted(int exitCode, QProcess::ExitStatu
}
if
((
exitStatus
!=
QProcess
::
NormalExit
)
||
(
exitCode
!=
0
))
{
emit
errorMessage
(
message
.
isNull
()
?
m_errorMsg
:
message
);
Q_EMIT
errorMessage
(
message
.
isNull
()
?
m_errorMsg
:
message
);
}
else
if
(
m_contextItems
.
isEmpty
())
{
emit
operationCompletedMessage
(
message
.
isNull
()
?
m_operationCompletedMsg
:
message
);
emit
itemVersionsChanged
();
Q_EMIT
operationCompletedMessage
(
message
.
isNull
()
?
m_operationCompletedMsg
:
message
);
Q_EMIT
itemVersionsChanged
();
}
else
{
startGitCommandProcess
();
}
...
...
@@ -723,7 +723,7 @@ void FileViewGitPlugin::slotOperationError()
m_contextItems
.
clear
();
m_pendingOperation
=
false
;
emit
errorMessage
(
m_errorMsg
);
Q_EMIT
errorMessage
(
m_errorMsg
);
}
QString
FileViewGitPlugin
::
parsePushOutput
()
...
...
@@ -752,7 +752,7 @@ QString FileViewGitPlugin::parsePullOutput()
return
xi18nd
(
"@info:status"
,
"Branch is already up-to-date."
);
}
if
(
line
.
contains
(
"CONFLICT"
))
{
emit
itemVersionsChanged
();
Q_EMIT
itemVersionsChanged
();
return
xi18nd
(
"@info:status"
,
"Merge conflicts occurred. Fix them and commit the result."
);
}
}
...
...
@@ -765,7 +765,7 @@ void FileViewGitPlugin::execGitCommand(const QString& gitCommand,
const
QString
&
errorMsg
,
const
QString
&
operationCompletedMsg
)
{
emit
infoMessage
(
infoMsg
);
Q_EMIT
infoMessage
(
infoMsg
);
m_command
=
gitCommand
;
m_arguments
=
arguments
;
...
...
git/fileviewgitplugin.h
View file @
eaef1920
...
...
@@ -47,7 +47,7 @@ public:
QList
<
QAction
*>
versionControlActions
(
const
KFileItemList
&
items
)
const
override
;
QList
<
QAction
*>
outOfVersionControlActions
(
const
KFileItemList
&
items
)
const
override
;
private
slots
:
private
Q_SLOTS
:
void
addFiles
();
void
revertFiles
();
void
showLocalChanges
();
...
...
git/pulldialog.cpp
View file @
eaef1920
...
...
@@ -78,9 +78,9 @@ PullDialog::PullDialog(QWidget* parent):
//get branch names
int
currentBranchIndex
;
QStringList
branches
=
gitWrapper
->
branches
(
&
currentBranchIndex
);
const
QStringList
branches
=
gitWrapper
->
branches
(
&
currentBranchIndex
);
for
each
(
const
QString
&
branch
,
branches
)
{
for
(
const
QString
&
branch
:
branches
)
{
if
(
branch
.
startsWith
(
QLatin1String
(
"remotes/"
)))
{
const
QString
remote
=
branch
.
section
(
'/'
,
1
,
1
);
const
QString
name
=
branch
.
section
(
'/'
,
2
);
...
...
git/pulldialog.h
View file @
eaef1920
...
...
@@ -38,7 +38,7 @@ private:
QComboBox
*
m_remoteComboBox
;
QComboBox
*
m_remoteBranchComboBox
;
QHash
<
QString
,
QStringList
>
m_remoteBranches
;
private
slots
:
private
Q_SLOTS
:
void
remoteSelectionChanged
(
const
QString
&
newRemote
);
};
...
...
git/pushdialog.cpp
View file @
eaef1920
...
...
@@ -108,9 +108,9 @@ PushDialog::PushDialog (QWidget* parent ):
//get branch names
int
currentBranchIndex
;
QStringList
branches
=
gitWrapper
->
branches
(
&
currentBranchIndex
);
const
QStringList
branches
=
gitWrapper
->
branches
(
&
currentBranchIndex
);
for
each
(
const
QString
&
branch
,
branches
)
{
for
(
const
QString
&
branch
:
branches
)
{
if
(
branch
.
startsWith
(
QLatin1String
(
"remotes/"
)))
{
const
QString
remote
=
branch
.
section
(
'/'
,
1
,
1
);
const
QString
name
=
branch
.
section
(
'/'
,
2
);
...
...
git/pushdialog.h
View file @
eaef1920
...
...
@@ -36,7 +36,7 @@ public:
QString
localBranch
()
const
;
QString
remoteBranch
()
const
;
bool
force
()
const
;
private
slots
:
private
Q_SLOTS
:
void
remoteSelectionChanged
(
const
QString
&
newRemote
);
void
localBranchSelectionChanged
(
const
QString
&
newLocalBranch
);
private:
...
...
git/tagdialog.h
View file @
eaef1920
...
...
@@ -52,7 +52,7 @@ public:
*/
QString
baseBranch
()
const
;
private
slots
:
private
Q_SLOTS
:
void
setOkButtonState
();
private:
inline
void
setLineEditErrorModeActive
(
bool
active
);
...
...
hg/backoutdialog.h
View file @
eaef1920
...
...
@@ -37,10 +37,10 @@ class HgBackoutDialog : public DialogBase
public:
explicit
HgBackoutDialog
(
QWidget
*
parent
=
0
);
public
slots
:
public
Q_SLOTS
:
void
done
(
int
r
)
override
;
private
slots
:
private
Q_SLOTS
:
void
saveGeometry
();
void
slotSelectBaseChangeset
();
void
slotSelectParentChangeset
();
...
...
hg/branchdialog.h
View file @
eaef1920
...
...
@@ -37,7 +37,7 @@ class HgBranchDialog : public DialogBase
public:
explicit
HgBranchDialog
(
QWidget
*
parent
=
0
);
public
slots
:
public
Q_SLOTS
:
void
slotUpdateDialog
(
const
QString
&
text
);
void
slotCreateBranch
();
void
slotSwitch
();
...
...
hg/bundledialog.h
View file @
eaef1920
...
...
@@ -44,10 +44,10 @@ class HgBundleDialog : public DialogBase
public:
explicit
HgBundleDialog
(
QWidget
*
parent
=
0
);
public
slots
:
public
Q_SLOTS
:
void
done
(
int
r
)
override
;
private
slots
:
private
Q_SLOTS
:
void
saveGeometry
();
/**
...
...
hg/clonedialog.h
View file @
eaef1920
...
...
@@ -44,7 +44,7 @@ public:
explicit
HgCloneDialog
(
const
QString
&
directory
,
QWidget
*
parent
=
0
);
void
setWorkingDirectory
(
const
QString
&
directory
);
private
slots
:
private
Q_SLOTS
:
void
saveGeometry
();
/**
...
...
hg/commitdialog.cpp
View file @
eaef1920
...
...
@@ -366,8 +366,8 @@ void HgCommitDialog::createCopyMessageMenu()
QString
output
;
hgw
->
executeCommand
(
QLatin1String
(
"log"
),
args
,
output
);
QStringList
messages
=
output
.
split
(
'\n'
,
QString
::
SkipEmptyParts
);
for
each
(
QString
msg
,
messages
)
{
const
QStringList
messages
=
output
.
split
(
'\n'
,
QString
::
SkipEmptyParts
);
for
(
const
QString
&
msg
:
messages
)
{
QAction
*
action
=
m_copyMessageMenu
->
addAction
(
msg
.
left
(
40
));
// max 40 characters
action
->
setData
(
msg
);
// entire description into action data
actionGroup
->
addAction
(
action
);
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
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