mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Convert foreach to for loops
Test Plan: Compile Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19911
This commit is contained in:
parent
af8c491904
commit
6dbabdfee6
|
@ -185,7 +185,8 @@ void InformationPanel::showContextMenu(const QPoint &pos) {
|
||||||
dateformatAction->setChecked(InformationPanelSettings::dateFormat() == static_cast<int>(Baloo::DateFormats::ShortFormat));
|
dateformatAction->setChecked(InformationPanelSettings::dateFormat() == static_cast<int>(Baloo::DateFormats::ShortFormat));
|
||||||
|
|
||||||
popup.addSeparator();
|
popup.addSeparator();
|
||||||
foreach (QAction* action, customContextMenuActions()) {
|
const auto actions = customContextMenuActions();
|
||||||
|
for (QAction *action : actions) {
|
||||||
popup.addAction(action);
|
popup.addAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +312,7 @@ void InformationPanel::slotFilesAdded(const QString& directory)
|
||||||
|
|
||||||
void InformationPanel::slotFilesChanged(const QStringList& files)
|
void InformationPanel::slotFilesChanged(const QStringList& files)
|
||||||
{
|
{
|
||||||
foreach (const QString& fileName, files) {
|
for (const QString& fileName : files) {
|
||||||
if (m_shownUrl == QUrl::fromLocalFile(fileName)) {
|
if (m_shownUrl == QUrl::fromLocalFile(fileName)) {
|
||||||
showItemInfo();
|
showItemInfo();
|
||||||
break;
|
break;
|
||||||
|
@ -321,7 +322,7 @@ void InformationPanel::slotFilesChanged(const QStringList& files)
|
||||||
|
|
||||||
void InformationPanel::slotFilesRemoved(const QStringList& files)
|
void InformationPanel::slotFilesRemoved(const QStringList& files)
|
||||||
{
|
{
|
||||||
foreach (const QString& fileName, files) {
|
for (const QString& fileName : files) {
|
||||||
if (m_shownUrl == QUrl::fromLocalFile(fileName)) {
|
if (m_shownUrl == QUrl::fromLocalFile(fileName)) {
|
||||||
// the currently shown item has been removed, show
|
// the currently shown item has been removed, show
|
||||||
// the parent directory as fallback
|
// the parent directory as fallback
|
||||||
|
|
Loading…
Reference in a new issue