Changeset View
Changeset View
Standalone View
Standalone View
ksplash/ksplashqml/splashapp.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 54 | { | |||
---|---|---|---|---|---|
60 | parser.addPositionalArgument(QStringLiteral("theme"), QStringLiteral("Path to the theme to test")); | 60 | parser.addPositionalArgument(QStringLiteral("theme"), QStringLiteral("Path to the theme to test")); | ||
61 | parser.addHelpOption(); | 61 | parser.addHelpOption(); | ||
62 | 62 | | |||
63 | parser.process(*this); | 63 | parser.process(*this); | ||
64 | m_testing = parser.isSet(QStringLiteral("test")); | 64 | m_testing = parser.isSet(QStringLiteral("test")); | ||
65 | m_window = parser.isSet(QStringLiteral("window")); | 65 | m_window = parser.isSet(QStringLiteral("window")); | ||
66 | m_theme = parser.positionalArguments().value(0); | 66 | m_theme = parser.positionalArguments().value(0); | ||
67 | 67 | | |||
68 | QDBusConnection dbus = QDBusConnection::sessionBus(); | ||||
69 | dbus.registerObject(QStringLiteral("/KSplash"), this, QDBusConnection::ExportScriptableSlots); | ||||
70 | dbus.registerService(QStringLiteral("org.kde.KSplash")); | ||||
71 | | ||||
68 | setupWaylandIntegration(); | 72 | setupWaylandIntegration(); | ||
69 | 73 | | |||
70 | foreach(QScreen* screen, screens()) | 74 | foreach(QScreen* screen, screens()) | ||
71 | adoptScreen(screen); | 75 | adoptScreen(screen); | ||
72 | 76 | | |||
73 | setStage(QStringLiteral("initial")); | 77 | setStage(QStringLiteral("initial")); | ||
74 | 78 | | |||
75 | if (KWindowSystem::isPlatformWayland()) { | 79 | if (KWindowSystem::isPlatformWayland()) { | ||
76 | setStage(QStringLiteral("wm")); | 80 | setStage(QStringLiteral("wm")); | ||
77 | } | 81 | } | ||
78 | 82 | | |||
79 | QPixmap cursor(32, 32); | 83 | QPixmap cursor(32, 32); | ||
80 | cursor.fill(Qt::transparent); | 84 | cursor.fill(Qt::transparent); | ||
81 | setOverrideCursor(QCursor(cursor)); | 85 | setOverrideCursor(QCursor(cursor)); | ||
82 | 86 | | |||
83 | if (m_testing) { | 87 | if (m_testing) { | ||
84 | m_timer.start(TEST_STEP_INTERVAL, this); | 88 | m_timer.start(TEST_STEP_INTERVAL, this); | ||
85 | } | 89 | } | ||
86 | 90 | | |||
87 | connect(this, &QGuiApplication::screenAdded, this, &SplashApp::adoptScreen); | 91 | connect(this, &QGuiApplication::screenAdded, this, &SplashApp::adoptScreen); | ||
88 | 92 | | |||
89 | QDBusConnection dbus = QDBusConnection::sessionBus(); | | |||
90 | dbus.registerObject(QStringLiteral("/KSplash"), this, QDBusConnection::ExportScriptableSlots); | | |||
91 | dbus.registerService(QStringLiteral("org.kde.KSplash")); | | |||
92 | | ||||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | SplashApp::~SplashApp() | 95 | SplashApp::~SplashApp() | ||
96 | { | 96 | { | ||
97 | qDeleteAll(m_windows); | 97 | qDeleteAll(m_windows); | ||
98 | } | 98 | } | ||
99 | 99 | | |||
100 | void SplashApp::timerEvent(QTimerEvent * event) | 100 | void SplashApp::timerEvent(QTimerEvent * event) | ||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |