Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/plugin/notificationshelper.cpp
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | |||||
62 | { | 62 | { | ||
63 | m_plasmoidScreen = plasmoidScreenGeometry; | 63 | m_plasmoidScreen = plasmoidScreenGeometry; | ||
64 | repositionPopups(); | 64 | repositionPopups(); | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | void NotificationsHelper::addNotificationPopup(QObject *win) | 67 | void NotificationsHelper::addNotificationPopup(QObject *win) | ||
68 | { | 68 | { | ||
69 | QQuickWindow *popup = qobject_cast<QQuickWindow*>(win); | 69 | QQuickWindow *popup = qobject_cast<QQuickWindow*>(win); | ||
70 | if (!popup) { | ||||
71 | return; | ||||
72 | } | ||||
70 | m_availablePopups.append(popup); | 73 | m_availablePopups.append(popup); | ||
71 | 74 | | |||
72 | // Don't let QML ever delete this component | 75 | // Don't let QML ever delete this component | ||
73 | QQmlEngine::setObjectOwnership(win, QQmlEngine::CppOwnership); | 76 | QQmlEngine::setObjectOwnership(win, QQmlEngine::CppOwnership); | ||
74 | 77 | | |||
75 | connect(win, SIGNAL(notificationTimeout()), | 78 | connect(win, SIGNAL(notificationTimeout()), | ||
76 | this, SLOT(onPopupClosed())); | 79 | this, SLOT(onPopupClosed())); | ||
77 | 80 | | |||
▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines |