Changeset View
Changeset View
Standalone View
Standalone View
startkde/startplasma.cpp
Show All 11 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
12 | Library General Public License for more details. | 12 | Library General Public License for more details. | ||
13 | 13 | | |||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to | ||
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include <config-startplasma.h> | ||||
21 | | ||||
20 | #include <QDir> | 22 | #include <QDir> | ||
21 | #include <QProcess> | 23 | #include <QProcess> | ||
22 | #include <QStandardPaths> | 24 | #include <QStandardPaths> | ||
23 | #include <QTextStream> | 25 | #include <QTextStream> | ||
24 | #include <QEventLoop> | 26 | #include <QEventLoop> | ||
25 | 27 | | |||
26 | #include <QDBusConnectionInterface> | 28 | #include <QDBusConnectionInterface> | ||
27 | #include <QDBusServiceWatcher> | 29 | #include <QDBusServiceWatcher> | ||
▲ Show 20 Lines • Show All 288 Lines • ▼ Show 20 Line(s) | 314 | if (!desktopLockedAtStart) { | |||
316 | if (ksplashCfg.readEntry("Engine", QStringLiteral("KSplashQML")) == QLatin1String("KSplashQML")) { | 318 | if (ksplashCfg.readEntry("Engine", QStringLiteral("KSplashQML")) == QLatin1String("KSplashQML")) { | ||
317 | p = new QProcess; | 319 | p = new QProcess; | ||
318 | p->start(QStringLiteral("ksplashqml"), { ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")) }); | 320 | p->start(QStringLiteral("ksplashqml"), { ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")) }); | ||
319 | } | 321 | } | ||
320 | } | 322 | } | ||
321 | return p; | 323 | return p; | ||
322 | } | 324 | } | ||
323 | 325 | | |||
324 | | ||||
325 | void setupGSLib() | 326 | void setupGSLib() | ||
326 | // Get Ghostscript to look into user's KDE fonts dir for additional Fontmap | 327 | // Get Ghostscript to look into user's KDE fonts dir for additional Fontmap | ||
327 | { | 328 | { | ||
328 | const QByteArray usr_fdir = QFile::encodeName(QDir::home().absoluteFilePath(QStringLiteral(".fonts"))); | 329 | const QByteArray usr_fdir = QFile::encodeName(QDir::home().absoluteFilePath(QStringLiteral(".fonts"))); | ||
329 | if (qEnvironmentVariableIsSet("GS_LIB")) { | 330 | if (qEnvironmentVariableIsSet("GS_LIB")) { | ||
330 | qputenv("GS_LIB", usr_fdir + ':' + qgetenv("GS_LIB")); | 331 | qputenv("GS_LIB", usr_fdir + ':' + qgetenv("GS_LIB")); | ||
331 | } else { | 332 | } else { | ||
332 | qputenv("GS_LIB", usr_fdir); | 333 | qputenv("GS_LIB", usr_fdir); | ||
Show All 17 Lines | 338 | { | |||
350 | // If the session should be locked from the start (locked autologin), | 351 | // If the session should be locked from the start (locked autologin), | ||
351 | // lock now and do the rest of the KDE startup underneath the locker. | 352 | // lock now and do the rest of the KDE startup underneath the locker. | ||
352 | 353 | | |||
353 | 354 | | |||
354 | QStringList plasmaSessionOptions; | 355 | QStringList plasmaSessionOptions; | ||
355 | if (wayland) { | 356 | if (wayland) { | ||
356 | plasmaSessionOptions << QStringLiteral("--no-lockscreen"); | 357 | plasmaSessionOptions << QStringLiteral("--no-lockscreen"); | ||
357 | } else { | 358 | } else { | ||
358 | if (qEnvironmentVariableIsSet("KDEWM")) { | | |||
359 | plasmaSessionOptions << QStringLiteral("--windowmanager") << qEnvironmentVariable("KDEWM"); | | |||
360 | } | | |||
361 | if (desktopLockedAtStart) { | 359 | if (desktopLockedAtStart) { | ||
362 | plasmaSessionOptions << QStringLiteral("--lockscreen"); | 360 | plasmaSessionOptions << QStringLiteral("--lockscreen"); | ||
363 | } | 361 | } | ||
364 | } | 362 | } | ||
365 | 363 | | |||
366 | bool rc = true; | 364 | bool rc = true; | ||
367 | QEventLoop e; | 365 | QEventLoop e; | ||
368 | 366 | | |||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |