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
Utilities
Krusader
Commits
9965606f
Commit
9965606f
authored
Dec 07, 2020
by
Alexander Lohnau
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix detaching in for loops
parent
cce2a797
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
12 deletions
+13
-12
krusader/ActionMan/useractionlistview.cpp
krusader/ActionMan/useractionlistview.cpp
+2
-2
krusader/Archive/krarchandler.cpp
krusader/Archive/krarchandler.cpp
+1
-1
krusader/BookMan/krbookmarkhandler.cpp
krusader/BookMan/krbookmarkhandler.cpp
+1
-1
krusader/Dialogs/kurllistrequester.cpp
krusader/Dialogs/kurllistrequester.cpp
+1
-1
krusader/FileSystem/sizecalculator.cpp
krusader/FileSystem/sizecalculator.cpp
+2
-1
krusader/GUI/kfnkeys.cpp
krusader/GUI/kfnkeys.cpp
+1
-1
krusader/JobMan/jobman.cpp
krusader/JobMan/jobman.cpp
+4
-4
krusader/Panel/PanelView/krviewitemdelegate.cpp
krusader/Panel/PanelView/krviewitemdelegate.cpp
+1
-1
No files found.
krusader/ActionMan/useractionlistview.cpp
View file @
9965606f
...
@@ -170,7 +170,7 @@ void UserActionListView::slotCurrentItemChanged(QTreeWidgetItem* item)
...
@@ -170,7 +170,7 @@ void UserActionListView::slotCurrentItemChanged(QTreeWidgetItem* item)
QDomDocument
UserActionListView
::
dumpSelectedActions
(
QDomDocument
*
mergeDoc
)
const
QDomDocument
UserActionListView
::
dumpSelectedActions
(
QDomDocument
*
mergeDoc
)
const
{
{
QList
<
QTreeWidgetItem
*>
list
=
selectedItems
();
const
QList
<
QTreeWidgetItem
*>
list
=
selectedItems
();
QDomDocument
doc
;
QDomDocument
doc
;
if
(
mergeDoc
)
if
(
mergeDoc
)
doc
=
*
mergeDoc
;
doc
=
*
mergeDoc
;
...
@@ -188,7 +188,7 @@ QDomDocument UserActionListView::dumpSelectedActions(QDomDocument* mergeDoc) con
...
@@ -188,7 +188,7 @@ QDomDocument UserActionListView::dumpSelectedActions(QDomDocument* mergeDoc) con
void
UserActionListView
::
removeSelectedActions
()
void
UserActionListView
::
removeSelectedActions
()
{
{
QList
<
QTreeWidgetItem
*>
list
=
selectedItems
();
const
QList
<
QTreeWidgetItem
*>
list
=
selectedItems
();
for
(
auto
item
:
list
)
{
for
(
auto
item
:
list
)
{
if
(
auto
*
actionItem
=
dynamic_cast
<
UserActionListViewItem
*>
(
item
))
{
if
(
auto
*
actionItem
=
dynamic_cast
<
UserActionListViewItem
*>
(
item
))
{
...
...
krusader/Archive/krarchandler.cpp
View file @
9965606f
...
@@ -124,7 +124,7 @@ KrArcHandler::KrArcHandler(QObject *parent) : QObject(parent)
...
@@ -124,7 +124,7 @@ KrArcHandler::KrArcHandler(QObject *parent) : QObject(parent)
QStringLiteral
(
"application/vnd.rar"
)
};
QStringLiteral
(
"application/vnd.rar"
)
};
#ifdef KRARC_QUERY_ENABLED
#ifdef KRARC_QUERY_ENABLED
auto
mimetypes
=
KProtocolInfo
::
archiveMimetypes
(
"krarc"
);
const
auto
mimetypes
=
KProtocolInfo
::
archiveMimetypes
(
"krarc"
);
for
(
const
auto
&
mimetype
:
mimetypes
)
for
(
const
auto
&
mimetype
:
mimetypes
)
krarcArchiveMimetypes
.
insert
(
mimetype
);
krarcArchiveMimetypes
.
insert
(
mimetype
);
#endif
#endif
...
...
krusader/BookMan/krbookmarkhandler.cpp
View file @
9965606f
...
@@ -599,7 +599,7 @@ bool KrBookmarkHandler::eventFilter(QObject *obj, QEvent *ev)
...
@@ -599,7 +599,7 @@ bool KrBookmarkHandler::eventFilter(QObject *obj, QEvent *ev)
// such as Ctrl+W and accelerator keys
// such as Ctrl+W and accelerator keys
if
(
eventType
==
QEvent
::
KeyPress
&&
menu
)
{
if
(
eventType
==
QEvent
::
KeyPress
&&
menu
)
{
auto
*
kev
=
dynamic_cast
<
QKeyEvent
*>
(
ev
);
auto
*
kev
=
dynamic_cast
<
QKeyEvent
*>
(
ev
);
QList
<
QAction
*>
acts
=
menu
->
actions
();
const
QList
<
QAction
*>
acts
=
menu
->
actions
();
bool
quickSearchStarted
=
false
;
bool
quickSearchStarted
=
false
;
bool
searchInSpecialItems
=
KConfigGroup
(
krConfig
,
"Look&Feel"
).
readEntry
(
"Search in special items"
,
false
);
bool
searchInSpecialItems
=
KConfigGroup
(
krConfig
,
"Look&Feel"
).
readEntry
(
"Search in special items"
,
false
);
...
...
krusader/Dialogs/kurllistrequester.cpp
View file @
9965606f
...
@@ -124,7 +124,7 @@ void KURLListRequester::keyPressEvent(QKeyEvent *e)
...
@@ -124,7 +124,7 @@ void KURLListRequester::keyPressEvent(QKeyEvent *e)
void
KURLListRequester
::
deleteSelectedItems
()
void
KURLListRequester
::
deleteSelectedItems
()
{
{
QList
<
QListWidgetItem
*>
selectedItems
=
urlListBox
->
selectedItems
();
const
QList
<
QListWidgetItem
*>
selectedItems
=
urlListBox
->
selectedItems
();
for
(
QListWidgetItem
*
item
:
selectedItems
)
for
(
QListWidgetItem
*
item
:
selectedItems
)
delete
item
;
delete
item
;
emit
changed
();
emit
changed
();
...
...
krusader/FileSystem/sizecalculator.cpp
View file @
9965606f
...
@@ -103,7 +103,8 @@ void SizeCalculator::nextUrl()
...
@@ -103,7 +103,8 @@ void SizeCalculator::nextUrl()
nextUrl
();
nextUrl
();
return
;
return
;
}
}
for
(
FileItem
*
file
:
fs
->
fileItems
())
const
QList
<
FileItem
*>
fileItems
=
fs
->
fileItems
();
for
(
FileItem
*
file
:
fileItems
)
m_nextSubUrls
<<
file
->
getUrl
();
m_nextSubUrls
<<
file
->
getUrl
();
delete
fs
;
delete
fs
;
}
else
{
}
else
{
...
...
krusader/GUI/kfnkeys.cpp
View file @
9965606f
...
@@ -51,7 +51,7 @@ KFnKeys::KFnKeys(QWidget *parent, KrMainWindow *mainWindow) :
...
@@ -51,7 +51,7 @@ KFnKeys::KFnKeys(QWidget *parent, KrMainWindow *mainWindow) :
layout
->
setSpacing
(
0
);
layout
->
setSpacing
(
0
);
int
pos
=
0
;
int
pos
=
0
;
for
(
QPair
<
QPushButton
*
,
QPair
<
QAction
*
,
const
QString
&>>
entry
:
buttonList
)
{
for
(
QPair
<
QPushButton
*
,
QPair
<
QAction
*
,
const
QString
&>>
entry
:
qAsConst
(
buttonList
)
)
{
layout
->
addWidget
(
entry
.
first
,
0
,
pos
++
);
layout
->
addWidget
(
entry
.
first
,
0
,
pos
++
);
}
}
layout
->
activate
();
layout
->
activate
();
...
...
krusader/JobMan/jobman.cpp
View file @
9965606f
...
@@ -248,7 +248,7 @@ bool JobMan::waitForJobs(bool waitForUserInput)
...
@@ -248,7 +248,7 @@ bool JobMan::waitForJobs(bool waitForUserInput)
m_messageBox
->
addButton
(
QMessageBox
::
Abort
);
m_messageBox
->
addButton
(
QMessageBox
::
Abort
);
m_messageBox
->
addButton
(
QMessageBox
::
Cancel
);
m_messageBox
->
addButton
(
QMessageBox
::
Cancel
);
m_messageBox
->
setDefaultButton
(
QMessageBox
::
Cancel
);
m_messageBox
->
setDefaultButton
(
QMessageBox
::
Cancel
);
for
(
KrJob
*
job
:
m_jobs
)
for
(
KrJob
*
job
:
qAsConst
(
m_jobs
)
)
connect
(
job
,
&
KrJob
::
terminated
,
this
,
&
JobMan
::
slotUpdateMessageBox
);
connect
(
job
,
&
KrJob
::
terminated
,
this
,
&
JobMan
::
slotUpdateMessageBox
);
slotUpdateMessageBox
();
slotUpdateMessageBox
();
...
@@ -258,7 +258,7 @@ bool JobMan::waitForJobs(bool waitForUserInput)
...
@@ -258,7 +258,7 @@ bool JobMan::waitForJobs(bool waitForUserInput)
// accepted -> cancel all jobs
// accepted -> cancel all jobs
if
(
result
==
QMessageBox
::
Abort
)
{
if
(
result
==
QMessageBox
::
Abort
)
{
for
(
KrJob
*
job
:
m_jobs
)
{
for
(
KrJob
*
job
:
qAsConst
(
m_jobs
)
)
{
job
->
cancel
();
job
->
cancel
();
}
}
return
true
;
return
true
;
...
@@ -314,7 +314,7 @@ void JobMan::slotControlActionTriggered()
...
@@ -314,7 +314,7 @@ void JobMan::slotControlActionTriggered()
if
(
!
anyRunning
&&
m_queueMode
)
{
if
(
!
anyRunning
&&
m_queueMode
)
{
m_jobs
.
first
()
->
start
();
m_jobs
.
first
()
->
start
();
}
else
{
}
else
{
for
(
KrJob
*
job
:
m_jobs
)
{
for
(
KrJob
*
job
:
qAsConst
(
m_jobs
)
)
{
if
(
anyRunning
)
if
(
anyRunning
)
job
->
pause
();
job
->
pause
();
else
else
...
@@ -426,7 +426,7 @@ void JobMan::cleanupMenu() {
...
@@ -426,7 +426,7 @@ void JobMan::cleanupMenu() {
void
JobMan
::
updateUI
()
void
JobMan
::
updateUI
()
{
{
int
totalPercent
=
0
;
int
totalPercent
=
0
;
for
(
KrJob
*
job
:
m_jobs
)
{
for
(
KrJob
*
job
:
qAsConst
(
m_jobs
)
)
{
totalPercent
+=
job
->
percent
();
totalPercent
+=
job
->
percent
();
}
}
const
bool
hasJobs
=
!
m_jobs
.
isEmpty
();
const
bool
hasJobs
=
!
m_jobs
.
isEmpty
();
...
...
krusader/Panel/PanelView/krviewitemdelegate.cpp
View file @
9965606f
...
@@ -237,7 +237,7 @@ void KrViewItemDelegate::cycleEditorSelection()
...
@@ -237,7 +237,7 @@ void KrViewItemDelegate::cycleEditorSelection()
EditorSelection
currentSelection
(
editor
->
selectionStart
(),
editor
->
QLINEEDIT_SELECTIONLENGTH
);
EditorSelection
currentSelection
(
editor
->
selectionStart
(),
editor
->
QLINEEDIT_SELECTIONLENGTH
);
auto
text
=
editor
->
text
();
auto
text
=
editor
->
text
();
auto
selections
=
generateFileNameSelections
(
text
);
const
auto
selections
=
generateFileNameSelections
(
text
);
// try to find current selection in the list
// try to find current selection in the list
int
currentIndex
=
0
;
int
currentIndex
=
0
;
...
...
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