Changeset View
Changeset View
Standalone View
Standalone View
sddmauthhelper.cpp
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Line(s) | 162 | { | |||
---|---|---|---|---|---|
164 | // we have to check with QString and isEmpty() instead of QDir and exists() because | 164 | // we have to check with QString and isEmpty() instead of QDir and exists() because | ||
165 | // QDir returns "." and true for exists() in the case of a non-existent user; | 165 | // QDir returns "." and true for exists() in the case of a non-existent user; | ||
166 | QString sddmHomeDirPath = KUser("sddm").homeDir(); | 166 | QString sddmHomeDirPath = KUser("sddm").homeDir(); | ||
167 | if (sddmHomeDirPath.isEmpty()) { | 167 | if (sddmHomeDirPath.isEmpty()) { | ||
168 | qDebug() << "Cannot proceed, user 'sddm' does not exist. Please check your SDDM install."; | 168 | qDebug() << "Cannot proceed, user 'sddm' does not exist. Please check your SDDM install."; | ||
169 | return ActionReply::HelperErrorReply(); | 169 | return ActionReply::HelperErrorReply(); | ||
170 | } | 170 | } | ||
171 | 171 | | |||
172 | QDir sddmCacheLocation(sddmHomeDirPath + QStringLiteral("/.cache")); | ||||
172 | QDir sddmConfigLocation(sddmHomeDirPath + QStringLiteral("/.config")); | 173 | QDir sddmConfigLocation(sddmHomeDirPath + QStringLiteral("/.config")); | ||
173 | QDir fontconfigDir(args[QStringLiteral("sddmUserConfig")].toString() + QStringLiteral("/fontconfig")); | 174 | QDir fontconfigDir(args[QStringLiteral("sddmUserConfig")].toString() + QStringLiteral("/fontconfig")); | ||
174 | 175 | | |||
176 | sddmCacheLocation.removeRecursively(); | ||||
175 | fontconfigDir.removeRecursively(); | 177 | fontconfigDir.removeRecursively(); | ||
176 | QFile::remove(sddmConfigLocation.path() + QStringLiteral("/kdeglobals")); | 178 | QFile::remove(sddmConfigLocation.path() + QStringLiteral("/kdeglobals")); | ||
177 | QFile::remove(sddmConfigLocation.path() + QStringLiteral("/plasmarc")); | 179 | QFile::remove(sddmConfigLocation.path() + QStringLiteral("/plasmarc")); | ||
178 | 180 | | |||
179 | // remove cursor theme, NumLock preference, and scaling DPI from config file | 181 | // remove cursor theme, NumLock preference, and scaling DPI from config file | ||
180 | ActionReply reply = ActionReply::HelperErrorReply(); | 182 | ActionReply reply = ActionReply::HelperErrorReply(); | ||
181 | QSharedPointer<KConfig> sddmConfig = openConfig(args[QStringLiteral("kde_settings.conf")].toString()); | 183 | QSharedPointer<KConfig> sddmConfig = openConfig(args[QStringLiteral("kde_settings.conf")].toString()); | ||
182 | QSharedPointer<KConfig> sddmOldConfig = openConfig(args[QStringLiteral("sddm.conf")].toString()); | 184 | QSharedPointer<KConfig> sddmOldConfig = openConfig(args[QStringLiteral("sddm.conf")].toString()); | ||
▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines |