Fix use of wrong var in KIO plugin
This commit is contained in:
parent
24b8225c9e
commit
ee9fa0998e
|
@ -128,7 +128,10 @@ QList<QAction *> SyncthingFileItemAction::actions(const KFileItemListProperties
|
||||||
}
|
}
|
||||||
for(const QString &path : paths) {
|
for(const QString &path : paths) {
|
||||||
if(path == dirPath) {
|
if(path == dirPath) {
|
||||||
detectedDirs << (lastDir = &dir);
|
lastDir = &dir;
|
||||||
|
if(!detectedDirs.contains(lastDir)) {
|
||||||
|
detectedDirs << lastDir;
|
||||||
|
}
|
||||||
} else if(path.startsWith(dir.path)) {
|
} else if(path.startsWith(dir.path)) {
|
||||||
detectedItems << SyncthingItem(&dir, path.mid(dir.path.size()));
|
detectedItems << SyncthingItem(&dir, path.mid(dir.path.size()));
|
||||||
lastDir = &dir;
|
lastDir = &dir;
|
||||||
|
@ -189,15 +192,15 @@ QList<QAction *> SyncthingFileItemAction::actions(const KFileItemListProperties
|
||||||
if(isPaused) {
|
if(isPaused) {
|
||||||
actions << new QAction(
|
actions << new QAction(
|
||||||
QIcon::fromTheme(QStringLiteral("media-playback-start")),
|
QIcon::fromTheme(QStringLiteral("media-playback-start")),
|
||||||
containingDirs.size() == 1
|
detectedDirs.size() == 1
|
||||||
? tr("Resume ") + containingDirs.front()->displayName()
|
? tr("Resume ") + detectedDirs.front()->displayName()
|
||||||
: tr("Resume selected directories"),
|
: tr("Resume selected directories"),
|
||||||
parentWidget);
|
parentWidget);
|
||||||
} else {
|
} else {
|
||||||
actions << new QAction(
|
actions << new QAction(
|
||||||
QIcon::fromTheme(QStringLiteral("media-playback-pause")),
|
QIcon::fromTheme(QStringLiteral("media-playback-pause")),
|
||||||
containingDirs.size() == 1
|
detectedDirs.size() == 1
|
||||||
? tr("Pause ") + containingDirs.front()->displayName()
|
? tr("Pause ") + detectedDirs.front()->displayName()
|
||||||
: tr("Pause selected directories"),
|
: tr("Pause selected directories"),
|
||||||
parentWidget);
|
parentWidget);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue