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, backend) | ||
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(); | | |||
56 | m_initError = !m_backend->errorString().isNull(); | 55 | m_initError = !m_backend->errorString().isNull(); | ||
romangg: Put it in the constructor initializer list. | |||||
57 | 56 | | |||
58 | m_view = new QQuickWidget(this); | 57 | m_view = new QQuickWidget(this); | ||
59 | 58 | | |||
60 | m_errorMessage = new KMessageWidget(this); | 59 | m_errorMessage = new KMessageWidget(this); | ||
61 | m_errorMessage->setCloseButtonVisible(false); | 60 | m_errorMessage->setCloseButtonVisible(false); | ||
62 | m_errorMessage->setWordWrap(true); | 61 | m_errorMessage->setWordWrap(true); | ||
63 | m_errorMessage->setVisible(false); | 62 | m_errorMessage->setVisible(false); | ||
64 | 63 | | |||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |
Put it in the constructor initializer list.