Changeset View
Changeset View
Standalone View
Standalone View
src/tools/balooctl/monitorcommand.cpp
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 59 | m_schedulerDBusInterface = new org::kde::baloo::scheduler(QStringLiteral("org.kde.baloo"), | |||
---|---|---|---|---|---|
62 | this | 62 | this | ||
63 | ); | 63 | ); | ||
64 | connect(m_schedulerDBusInterface, &org::kde::baloo::scheduler::stateChanged, | 64 | connect(m_schedulerDBusInterface, &org::kde::baloo::scheduler::stateChanged, | ||
65 | this, &MonitorCommand::stateChanged); | 65 | this, &MonitorCommand::stateChanged); | ||
66 | 66 | | |||
67 | if (m_indexerDBusInterface->isValid() && m_schedulerDBusInterface->isValid()) { | 67 | if (m_indexerDBusInterface->isValid() && m_schedulerDBusInterface->isValid()) { | ||
68 | m_err << i18n("Press ctrl+c to stop monitoring") << endl; | 68 | m_err << i18n("Press ctrl+c to stop monitoring") << endl; | ||
69 | balooIsAvailable(); | 69 | balooIsAvailable(); | ||
70 | stateChanged(m_schedulerDBusInterface->state()); | ||||
71 | QString currentFile = m_indexerDBusInterface->currentFile(); | ||||
72 | if (!currentFile.isEmpty()) { | ||||
73 | startedIndexingFile(currentFile); | ||||
74 | } | ||||
70 | } else { | 75 | } else { | ||
71 | balooIsNotAvailable(); | 76 | balooIsNotAvailable(); | ||
72 | } | 77 | } | ||
73 | 78 | | |||
74 | m_dbusServiceWatcher->setWatchMode(QDBusServiceWatcher::WatchForOwnerChange); | 79 | m_dbusServiceWatcher->setWatchMode(QDBusServiceWatcher::WatchForOwnerChange); | ||
75 | } | 80 | } | ||
76 | 81 | | |||
77 | void MonitorCommand::balooIsNotAvailable() | 82 | void MonitorCommand::balooIsNotAvailable() | ||
Show All 36 Lines |