Shallow search and lazy loading for Other Logs page

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2025-04-18 19:52:30 +01:00
parent a39edb3b59
commit d5db974008
7 changed files with 78 additions and 54 deletions

View File

@ -39,6 +39,8 @@
#include <Application.h>
#include <pathmatcher/IPathMatcher.h>
#include <qfilesystemwatcher.h>
#include <qglobal.h>
#include "LogPage.h"
#include "ui/pages/BasePage.h"
@ -52,7 +54,7 @@ class OtherLogsPage : public QWidget, public BasePage {
Q_OBJECT
public:
explicit OtherLogsPage(InstancePtr instance, IPathMatcher::Ptr fileFilter, QWidget* parent = 0);
explicit OtherLogsPage(InstancePtr instance, QWidget* parent = 0);
~OtherLogsPage();
QString id() const override { return "logs"; }
@ -85,13 +87,16 @@ class OtherLogsPage : public QWidget, public BasePage {
private:
void setControlsEnabled(bool enabled);
QStringList getPaths();
private:
Ui::OtherLogsPage* ui;
InstancePtr m_instance;
QString m_path;
/** Path to display log paths relative to. */
QString m_basePath;
QStringList m_logSearchPaths;
QString m_currentFile;
IPathMatcher::Ptr m_fileFilter;
RecursiveFileSystemWatcher* m_watcher;
QFileSystemWatcher m_watcher;
LogFormatProxyModel* m_proxy;
shared_qobject_ptr<LogModel> m_model;