Changeset View
Changeset View
Standalone View
Standalone View
src/abstractfile/abstractfilelistener.cpp
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU Lesser General Public License | 14 | * You should have received a copy of the GNU Lesser General Public License | ||
15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #include "abstractfilelistener.h" | 18 | #include "abstractfilelistener.h" | ||
19 | 19 | | |||
20 | #include "abstractfilelisting.h" | 20 | #include "abstractfilelisting.h" | ||
21 | #include "databaseinterface.h" | 21 | #include "databaseinterface.h" | ||
22 | #include "notificationitem.h" | | |||
23 | 22 | | |||
24 | #include <QThread> | 23 | #include <QThread> | ||
25 | 24 | | |||
26 | class AbstractFileListenerPrivate | 25 | class AbstractFileListenerPrivate | ||
27 | { | 26 | { | ||
28 | public: | 27 | public: | ||
29 | 28 | | |||
30 | QThread mFileQueryThread; | 29 | QThread mFileQueryThread; | ||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | |||||
95 | { | 94 | { | ||
96 | d->mFileListing = fileIndexer; | 95 | d->mFileListing = fileIndexer; | ||
97 | d->mFileQueryThread.start(); | 96 | d->mFileQueryThread.start(); | ||
98 | d->mFileListing->moveToThread(&d->mFileQueryThread); | 97 | d->mFileListing->moveToThread(&d->mFileQueryThread); | ||
99 | connect(fileIndexer, &AbstractFileListing::indexingStarted, | 98 | connect(fileIndexer, &AbstractFileListing::indexingStarted, | ||
100 | this, &AbstractFileListener::indexingStarted); | 99 | this, &AbstractFileListener::indexingStarted); | ||
101 | connect(fileIndexer, &AbstractFileListing::indexingFinished, | 100 | connect(fileIndexer, &AbstractFileListing::indexingFinished, | ||
102 | this, &AbstractFileListener::indexingFinished); | 101 | this, &AbstractFileListener::indexingFinished); | ||
103 | connect(fileIndexer, &AbstractFileListing::newNotification, | | |||
104 | this, &AbstractFileListener::newNotification); | | |||
105 | connect(fileIndexer, &AbstractFileListing::closeNotification, | | |||
106 | this, &AbstractFileListener::closeNotification); | | |||
107 | } | 102 | } | ||
108 | 103 | | |||
109 | AbstractFileListing *AbstractFileListener::fileListing() const | 104 | AbstractFileListing *AbstractFileListener::fileListing() const | ||
110 | { | 105 | { | ||
111 | return d->mFileListing; | 106 | return d->mFileListing; | ||
112 | } | 107 | } | ||
113 | 108 | | |||
114 | 109 | | |||
115 | #include "moc_abstractfilelistener.cpp" | 110 | #include "moc_abstractfilelistener.cpp" |