mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Revert file watcher in VDS (#5636)
This commit is contained in:
parent
5c8d1f3cff
commit
3df4efebaa
2 changed files with 0 additions and 20 deletions
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include <QComboBox>
|
||||
#include <QDirIterator>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QMouseEvent>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
|
@ -118,12 +117,6 @@ VisualDeckStorageWidget::VisualDeckStorageWidget(QWidget *parent) : QWidget(pare
|
|||
} else {
|
||||
scrollArea->setWidget(databaseLoadIndicator);
|
||||
}
|
||||
|
||||
addRecursiveWatch(watcher, SettingsCache::instance().getDeckPath());
|
||||
|
||||
// Signals for changes
|
||||
connect(&watcher, &QFileSystemWatcher::fileChanged, this, &VisualDeckStorageWidget::refreshIfPossible);
|
||||
connect(&watcher, &QFileSystemWatcher::directoryChanged, this, &VisualDeckStorageWidget::refreshIfPossible);
|
||||
}
|
||||
|
||||
void VisualDeckStorageWidget::refreshIfPossible()
|
||||
|
|
@ -133,16 +126,6 @@ void VisualDeckStorageWidget::refreshIfPossible()
|
|||
}
|
||||
}
|
||||
|
||||
void VisualDeckStorageWidget::addRecursiveWatch(QFileSystemWatcher &watcher, const QString &dirPath)
|
||||
{
|
||||
QDir dir(dirPath);
|
||||
watcher.addPath(dirPath); // Watch the root directory
|
||||
|
||||
for (const QFileInfo &entry : dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
|
||||
addRecursiveWatch(watcher, entry.absoluteFilePath());
|
||||
}
|
||||
}
|
||||
|
||||
void VisualDeckStorageWidget::showEvent(QShowEvent *event)
|
||||
{
|
||||
QWidget::showEvent(event);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
#include <QCheckBox>
|
||||
#include <QFileSystemModel>
|
||||
#include <QFileSystemWatcher>
|
||||
|
||||
class VisualDeckStorageSearchWidget;
|
||||
class VisualDeckStorageSortWidget;
|
||||
|
|
@ -27,7 +26,6 @@ class VisualDeckStorageWidget final : public QWidget
|
|||
public:
|
||||
explicit VisualDeckStorageWidget(QWidget *parent);
|
||||
void refreshIfPossible();
|
||||
void addRecursiveWatch(QFileSystemWatcher &watcher, const QString &dirPath);
|
||||
void retranslateUi();
|
||||
|
||||
CardSizeWidget *cardSizeWidget;
|
||||
|
|
@ -69,7 +67,6 @@ private:
|
|||
QCheckBox *tagsOnWidgetsVisibilityCheckBox;
|
||||
QScrollArea *scrollArea;
|
||||
VisualDeckStorageFolderDisplayWidget *folderWidget;
|
||||
QFileSystemWatcher watcher;
|
||||
};
|
||||
|
||||
#endif // VISUAL_DECK_STORAGE_WIDGET_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue