diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-04-12 11:30:02 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-04-12 11:30:02 -0700 |
commit | a02f67ed0e9716a9dc2540b1353e7f25fb056d4b (patch) | |
tree | 73f66d9f798404bf9e1f9a1bd703e701a8fc3446 /launcher/ui/dialogs | |
parent | c56db0408bc7bb01e9807fd02858f27328ca6b79 (diff) | |
download | PrismLauncher-a02f67ed0e9716a9dc2540b1353e7f25fb056d4b.tar.gz PrismLauncher-a02f67ed0e9716a9dc2540b1353e7f25fb056d4b.tar.bz2 PrismLauncher-a02f67ed0e9716a9dc2540b1353e7f25fb056d4b.zip |
refactor: rename watch_subdirectories -> watch_recurisve (prevent confusion of behavior)
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/BlockedModsDialog.cpp | 6 | ||||
-rw-r--r-- | launcher/ui/dialogs/BlockedModsDialog.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/launcher/ui/dialogs/BlockedModsDialog.cpp b/launcher/ui/dialogs/BlockedModsDialog.cpp index f2ef734b..ba453df6 100644 --- a/launcher/ui/dialogs/BlockedModsDialog.cpp +++ b/launcher/ui/dialogs/BlockedModsDialog.cpp @@ -190,7 +190,7 @@ void BlockedModsDialog::setupWatch() watchPath(modsFolder, true); } -void BlockedModsDialog::watchPath(QString path, bool watch_subdirectories) +void BlockedModsDialog::watchPath(QString path, bool watch_recursive) { auto to_watch = QFileInfo(path); auto to_watch_path = to_watch.canonicalFilePath(); @@ -200,14 +200,14 @@ void BlockedModsDialog::watchPath(QString path, bool watch_subdirectories) qDebug() << "[Blocked Mods Dialog] Adding Watch Path:" << path; m_watcher.addPath(to_watch_path); - if (!to_watch.isDir() || !watch_subdirectories) + if (!to_watch.isDir() || !watch_recursive) return; QDirIterator it(to_watch_path, QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot, QDirIterator::NoIteratorFlags); while (it.hasNext()) { QString watch_dir = QDir(it.next()).canonicalPath(); // resolve symlinks and relative paths - watchPath(watch_dir, watch_subdirectories); + watchPath(watch_dir, watch_recursive); } } diff --git a/launcher/ui/dialogs/BlockedModsDialog.h b/launcher/ui/dialogs/BlockedModsDialog.h index 01077aa5..e3b7c975 100644 --- a/launcher/ui/dialogs/BlockedModsDialog.h +++ b/launcher/ui/dialogs/BlockedModsDialog.h @@ -79,7 +79,7 @@ class BlockedModsDialog : public QDialog { void update(); void directoryChanged(QString path); void setupWatch(); - void watchPath(QString path, bool watch_subdirectories = false); + void watchPath(QString path, bool watch_recursive = false); void scanPaths(); void scanPath(QString path, bool start_task); void addHashTask(QString path); |