Changeset View
Changeset View
Standalone View
Standalone View
src/kded/helpers/requestpin.cpp
Show All 37 Lines | 36 | RequestPin::RequestPin(BluezQt::DevicePtr device, bool numeric, QObject *parent) | |||
---|---|---|---|---|---|
38 | , m_dialogWidget(0) | 38 | , m_dialogWidget(0) | ||
39 | , m_device(device) | 39 | , m_device(device) | ||
40 | , m_numeric(numeric) | 40 | , m_numeric(numeric) | ||
41 | { | 41 | { | ||
42 | m_notification = new KNotification(QStringLiteral("RequestPin"), | 42 | m_notification = new KNotification(QStringLiteral("RequestPin"), | ||
43 | KNotification::Persistent, this); | 43 | KNotification::Persistent, this); | ||
44 | 44 | | |||
45 | m_notification->setComponentName(QStringLiteral("bluedevil")); | 45 | m_notification->setComponentName(QStringLiteral("bluedevil")); | ||
46 | m_notification->setTitle(QStringLiteral("%1 (%2)").arg(m_device->name(), m_device->address())); | 46 | m_notification->setTitle(QStringLiteral("%1 (%2)").arg(m_device->name().toHtmlEscaped(), m_device->address().toHtmlEscaped())); | ||
47 | m_notification->setText(i18nc("Shown in a notification to announce that a PIN is needed to accomplish a pair action," | 47 | m_notification->setText(i18nc("Shown in a notification to announce that a PIN is needed to accomplish a pair action," | ||
48 | "%1 is the name of the bluetooth device", | 48 | "%1 is the name of the bluetooth device", | ||
49 | "PIN needed to pair with %1", m_device->name())); | 49 | "PIN needed to pair with %1", m_device->name().toHtmlEscaped())); | ||
50 | 50 | | |||
51 | QStringList actions; | 51 | QStringList actions; | ||
52 | actions.append(i18nc("Notification button which once clicked, a dialog to introduce the PIN will be shown", | 52 | actions.append(i18nc("Notification button which once clicked, a dialog to introduce the PIN will be shown", | ||
53 | "Introduce PIN")); | 53 | "Introduce PIN")); | ||
54 | 54 | | |||
55 | m_notification->setActions(actions); | 55 | m_notification->setActions(actions); | ||
56 | 56 | | |||
57 | connect(m_notification, &KNotification::action1Activated,this, &RequestPin::introducePin); | 57 | connect(m_notification, &KNotification::action1Activated,this, &RequestPin::introducePin); | ||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |