Changeset View
Changeset View
Standalone View
Standalone View
src/kded/receivefilejob.cpp
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Line(s) | 70 | { | |||
---|---|---|---|---|---|
133 | } | 133 | } | ||
134 | } | 134 | } | ||
135 | 135 | | |||
136 | void ReceiveFileJob::showNotification() | 136 | void ReceiveFileJob::showNotification() | ||
137 | { | 137 | { | ||
138 | KNotification *notification = new KNotification(QStringLiteral("IncomingFile"), | 138 | KNotification *notification = new KNotification(QStringLiteral("IncomingFile"), | ||
139 | KNotification::Persistent, this); | 139 | KNotification::Persistent, this); | ||
140 | 140 | | |||
141 | notification->setTitle(QStringLiteral("%1 (%2)").arg(m_deviceName, m_deviceAddress)); | 141 | notification->setTitle(QStringLiteral("%1 (%2)").arg(m_deviceName.toHtmlEscaped(), m_deviceAddress)); | ||
142 | notification->setText(i18nc( | 142 | notification->setText(i18nc( | ||
143 | "Show a notification asking to authorize or deny an incoming file transfer to this computer from a Bluetooth device.", | 143 | "Show a notification asking to authorize or deny an incoming file transfer to this computer from a Bluetooth device.", | ||
144 | "%1 is sending you the file %2", m_deviceName, m_transfer->name())); | 144 | "%1 is sending you the file %2", m_deviceName.toHtmlEscaped(), m_transfer->name())); | ||
145 | 145 | | |||
146 | QStringList actions; | 146 | QStringList actions; | ||
147 | actions.append(i18nc("Button to accept the incoming file transfer and download it in the default download directory", "Accept")); | 147 | actions.append(i18nc("Button to accept the incoming file transfer and download it in the default download directory", "Accept")); | ||
148 | actions.append(i18nc("Deny the incoming file transfer", "Cancel")); | 148 | actions.append(i18nc("Deny the incoming file transfer", "Cancel")); | ||
149 | 149 | | |||
150 | notification->setActions(actions); | 150 | notification->setActions(actions); | ||
151 | 151 | | |||
152 | connect(notification, &KNotification::action1Activated, this, &ReceiveFileJob::slotAccept); | 152 | connect(notification, &KNotification::action1Activated, this, &ReceiveFileJob::slotAccept); | ||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |