Changeset View
Changeset View
Standalone View
Standalone View
plugins/notifications/notification.cpp
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | 112 | } else { | |||
---|---|---|---|---|---|
115 | FileTransferJob* job = np.createPayloadTransferJob(destinationUrl); | 115 | FileTransferJob* job = np.createPayloadTransferJob(destinationUrl); | ||
116 | job->start(); | 116 | job->start(); | ||
117 | connect(job, &FileTransferJob::result, this, &Notification::applyIconAndShow); | 117 | connect(job, &FileTransferJob::result, this, &Notification::applyIconAndShow); | ||
118 | } | 118 | } | ||
119 | } | 119 | } | ||
120 | 120 | | |||
121 | if(!mRequestReplyId.isEmpty()) { | 121 | if(!mRequestReplyId.isEmpty()) { | ||
122 | mNotification->setActions( QStringList(i18n("Reply")) ); | 122 | mNotification->setActions( QStringList(i18n("Reply")) ); | ||
123 | connect(mNotification, &KNotification::action1Activated, this, &Notification::replyRequested); | 123 | connect(mNotification, &KNotification::action1Activated, this, &Notification::reply); | ||
124 | } | 124 | } | ||
125 | 125 | | |||
126 | connect(mNotification, &KNotification::closed, this, &Notification::closed); | 126 | connect(mNotification, &KNotification::closed, this, &Notification::closed); | ||
127 | 127 | | |||
128 | return mNotification; | 128 | return mNotification; | ||
129 | } | 129 | } | ||
130 | 130 | | |||
131 | void Notification::reply() | ||||
132 | { | ||||
133 | Q_EMIT replyRequested(); | ||||
134 | } | ||||
135 | | ||||
131 | void Notification::closed() | 136 | void Notification::closed() | ||
132 | { | 137 | { | ||
133 | mClosed = true; | 138 | mClosed = true; | ||
134 | } | 139 | } | ||
135 | 140 | | |||
136 | void Notification::parseNetworkPackage(const NetworkPackage &np) | 141 | void Notification::parseNetworkPackage(const NetworkPackage &np) | ||
137 | { | 142 | { | ||
138 | mInternalId = np.get<QString>(QStringLiteral("id")); | 143 | mInternalId = np.get<QString>(QStringLiteral("id")); | ||
Show All 11 Lines |