Changeset View
Changeset View
Standalone View
Standalone View
src/file/filelistener.cpp
Show All 27 Lines | 27 | public: | |||
---|---|---|---|---|---|
28 | 28 | | |||
29 | LocalFileListing mLocalFileIndexer; | 29 | LocalFileListing mLocalFileIndexer; | ||
30 | 30 | | |||
31 | }; | 31 | }; | ||
32 | 32 | | |||
33 | FileListener::FileListener(QObject *parent) : AbstractFileListener(parent), d(std::make_unique<FileListenerPrivate>()) | 33 | FileListener::FileListener(QObject *parent) : AbstractFileListener(parent), d(std::make_unique<FileListenerPrivate>()) | ||
34 | { | 34 | { | ||
35 | setFileListing(&d->mLocalFileIndexer); | 35 | setFileListing(&d->mLocalFileIndexer); | ||
36 | connect(&d->mLocalFileIndexer, &LocalFileListing::rootPathChanged, | | |||
37 | this, &FileListener::rootPathChanged); | | |||
38 | } | 36 | } | ||
39 | 37 | | |||
40 | FileListener::~FileListener() | 38 | FileListener::~FileListener() | ||
41 | = default; | 39 | = default; | ||
42 | 40 | | |||
43 | const LocalFileListing& FileListener::localFileIndexer() const | 41 | const LocalFileListing& FileListener::localFileIndexer() const | ||
44 | { | 42 | { | ||
45 | return d->mLocalFileIndexer; | 43 | return d->mLocalFileIndexer; | ||
46 | } | 44 | } | ||
47 | 45 | | |||
48 | QString FileListener::rootPath() const | | |||
49 | { | | |||
50 | return d->mLocalFileIndexer.rootPath(); | | |||
51 | } | | |||
52 | | ||||
53 | void FileListener::setRootPath(const QString &rootPath) | | |||
54 | { | | |||
55 | d->mLocalFileIndexer.setRootPath(rootPath); | | |||
56 | } | | |||
57 | | ||||
58 | 46 | | |||
59 | #include "moc_filelistener.cpp" | 47 | #include "moc_filelistener.cpp" |