Changeset View
Changeset View
Standalone View
Standalone View
kcms/baloo/kcm.cpp
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | 113 | else { | |||
---|---|---|---|---|---|
114 | QDBusMessage message = QDBusMessage::createMethodCall( | 114 | QDBusMessage message = QDBusMessage::createMethodCall( | ||
115 | QStringLiteral("org.kde.baloo"), | 115 | QStringLiteral("org.kde.baloo"), | ||
116 | QStringLiteral("/"), | 116 | QStringLiteral("/"), | ||
117 | QStringLiteral("org.kde.baloo.main"), | 117 | QStringLiteral("org.kde.baloo.main"), | ||
118 | QStringLiteral("quit") | 118 | QStringLiteral("quit") | ||
119 | ); | 119 | ); | ||
120 | 120 | | |||
121 | QDBusConnection::sessionBus().asyncCall(message); | 121 | QDBusConnection::sessionBus().asyncCall(message); | ||
122 | | ||||
123 | // Delete the index when we turn off indexing | ||||
124 | QString balooDBLocation; | ||||
125 | QString envBalooPath = QString::fromLocal8Bit(qgetenv("BALOO_DB_PATH")); | ||||
126 | if (!envBalooPath.isEmpty()) { | ||||
127 | balooDBLocation = envBalooPath; | ||||
128 | } else { | ||||
129 | balooDBLocation = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/baloo/index"); | ||||
130 | } | ||||
131 | QFile(balooDBLocation).remove(); | ||||
132 | m_previouslyEnabled = false; | ||||
133 | | ||||
122 | } | 134 | } | ||
123 | 135 | | |||
124 | // Start cleaner | 136 | // Start cleaner | ||
125 | const QString exe = QStandardPaths::findExecutable(QStringLiteral("baloo_file_cleaner")); | 137 | const QString exe = QStandardPaths::findExecutable(QStringLiteral("baloo_file_cleaner")); | ||
126 | QProcess::startDetached(exe, QStringList()); | 138 | QProcess::startDetached(exe, QStringList()); | ||
127 | 139 | | |||
128 | // Update the baloo_file's config cache | 140 | // Update the baloo_file's config cache | ||
129 | config.refresh(); | 141 | config.refresh(); | ||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |