Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/kcm/libinput/touchpadconfiglibinput.cpp
Show All 29 Lines | |||||
30 | #include <QQmlProperty> | 30 | #include <QQmlProperty> | ||
31 | #include <QMetaObject> | 31 | #include <QMetaObject> | ||
32 | 32 | | |||
33 | #include "../touchpadconfigcontainer.h" | 33 | #include "../touchpadconfigcontainer.h" | ||
34 | #include "touchpadbackend.h" | 34 | #include "touchpadbackend.h" | ||
35 | 35 | | |||
36 | #include "version.h" | 36 | #include "version.h" | ||
37 | 37 | | |||
38 | TouchpadConfigLibinput::TouchpadConfigLibinput(TouchpadConfigContainer *parent, const QVariantList &args) | 38 | TouchpadConfigLibinput::TouchpadConfigLibinput(TouchpadConfigContainer *parent, TouchpadBackend* backend, const QVariantList &args) | ||
39 | : TouchpadConfigPlugin(parent) | 39 | : TouchpadConfigPlugin(parent) | ||
40 | { | 40 | { | ||
41 | KAboutData* data = new KAboutData(QStringLiteral("kcm_touchpad"), | 41 | KAboutData* data = new KAboutData(QStringLiteral("kcm_touchpad"), | ||
42 | i18n("Touchpad KCM"), | 42 | i18n("Touchpad KCM"), | ||
43 | TOUCHPAD_KCM_VERSION, | 43 | TOUCHPAD_KCM_VERSION, | ||
44 | i18n("System Settings module for managing your touchpad"), | 44 | i18n("System Settings module for managing your touchpad"), | ||
45 | KAboutLicense::GPL_V2, | 45 | KAboutLicense::GPL_V2, | ||
46 | i18n("Copyright © 2016 Roman Gilg"), | 46 | i18n("Copyright © 2016 Roman Gilg"), | ||
47 | QString()); | 47 | QString()); | ||
48 | 48 | | |||
49 | data->addAuthor(i18n("Roman Gilg"), | 49 | data->addAuthor(i18n("Roman Gilg"), | ||
50 | i18n("Developer"), | 50 | i18n("Developer"), | ||
51 | QStringLiteral("subdiff@gmail.com")); | 51 | QStringLiteral("subdiff@gmail.com")); | ||
52 | 52 | | |||
53 | m_parent->setAboutData(data); | 53 | m_parent->setAboutData(data); | ||
54 | 54 | | |||
55 | m_backend = TouchpadBackend::implementation(); | 55 | m_backend = backend; | ||
romangg: Put it in the constructor initializer list. | |||||
56 | m_initError = !m_backend->errorString().isNull(); | 56 | m_initError = !m_backend->errorString().isNull(); | ||
57 | 57 | | |||
58 | m_view = new QQuickWidget(this); | 58 | m_view = new QQuickWidget(this); | ||
59 | 59 | | |||
60 | m_errorMessage = new KMessageWidget(this); | 60 | m_errorMessage = new KMessageWidget(this); | ||
61 | m_errorMessage->setCloseButtonVisible(false); | 61 | m_errorMessage->setCloseButtonVisible(false); | ||
62 | m_errorMessage->setWordWrap(true); | 62 | m_errorMessage->setWordWrap(true); | ||
63 | m_errorMessage->setVisible(false); | 63 | m_errorMessage->setVisible(false); | ||
▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines |
Put it in the constructor initializer list.