Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/kcm/libinput/libinput_config.cpp
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 43 | { | |||
---|---|---|---|---|---|
77 | m_view->setAttribute(Qt::WA_AlwaysStackOnTop); | 77 | m_view->setAttribute(Qt::WA_AlwaysStackOnTop); | ||
78 | 78 | | |||
79 | m_view->rootContext()->setContextProperty("backend", m_backend); | 79 | m_view->rootContext()->setContextProperty("backend", m_backend); | ||
80 | m_view->rootContext()->setContextProperty("deviceModel", getDeviceList(m_backend)); | 80 | m_view->rootContext()->setContextProperty("deviceModel", getDeviceList(m_backend)); | ||
81 | 81 | | |||
82 | KDeclarative::KDeclarative kdeclarative; | 82 | KDeclarative::KDeclarative kdeclarative; | ||
83 | kdeclarative.setDeclarativeEngine(m_view->engine()); | 83 | kdeclarative.setDeclarativeEngine(m_view->engine()); | ||
84 | kdeclarative.setupBindings(); | 84 | kdeclarative.setupBindings(); | ||
85 | | ||||
86 | if (m_backend->mode() == InputBackendMode::XLibinput) { | ||||
87 | m_view->setSource(QUrl("qrc:/libinput/main_deviceless.qml")); | ||||
88 | } else { | ||||
85 | m_view->setSource(QUrl("qrc:/libinput/main.qml")); | 89 | m_view->setSource(QUrl("qrc:/libinput/main.qml")); | ||
90 | } | ||||
86 | 91 | | |||
87 | if (m_initError) { | 92 | if (m_initError) { | ||
88 | m_errorMessage->setMessageType(KMessageWidget::Error); | 93 | m_errorMessage->setMessageType(KMessageWidget::Error); | ||
89 | m_errorMessage->setText(m_backend->errorString()); | 94 | m_errorMessage->setText(m_backend->errorString()); | ||
90 | QMetaObject::invokeMethod(m_errorMessage, "animatedShow", | 95 | QMetaObject::invokeMethod(m_errorMessage, "animatedShow", | ||
91 | Qt::QueuedConnection); | 96 | Qt::QueuedConnection); | ||
92 | } else { | 97 | } else { | ||
93 | connect(m_backend, SIGNAL(deviceAdded(bool)), this, SLOT(onDeviceAdded(bool))); | 98 | connect(m_backend, SIGNAL(deviceAdded(bool)), this, SLOT(onDeviceAdded(bool))); | ||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |