Changeset View
Changeset View
Standalone View
Standalone View
src/kded/receivefilejob.cpp
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Line(s) | 160 | { | |||
---|---|---|---|---|---|
168 | 168 | | |||
169 | FileReceiverSettings::self()->load(); | 169 | FileReceiverSettings::self()->load(); | ||
170 | m_targetPath = FileReceiverSettings::self()->saveUrl().adjusted(QUrl::StripTrailingSlash); | 170 | m_targetPath = FileReceiverSettings::self()->saveUrl().adjusted(QUrl::StripTrailingSlash); | ||
171 | m_targetPath.setPath(m_targetPath.path() + QLatin1Char('/') + m_transfer->name()); | 171 | m_targetPath.setPath(m_targetPath.path() + QLatin1Char('/') + m_transfer->name()); | ||
172 | 172 | | |||
173 | m_tempPath = createTempPath(m_transfer->name()); | 173 | m_tempPath = createTempPath(m_transfer->name()); | ||
174 | qCDebug(BLUEDAEMON) << "TempPath" << m_tempPath; | 174 | qCDebug(BLUEDAEMON) << "TempPath" << m_tempPath; | ||
175 | 175 | | |||
176 | m_accepted = true; | ||||
176 | m_request.accept(m_tempPath); | 177 | m_request.accept(m_tempPath); | ||
177 | } | 178 | } | ||
178 | 179 | | |||
179 | void ReceiveFileJob::slotCancel() | 180 | void ReceiveFileJob::slotCancel() | ||
180 | { | 181 | { | ||
181 | if (m_transfer->status() == BluezQt::ObexTransfer::Queued) { | 182 | if (!m_accepted && m_transfer->status() == BluezQt::ObexTransfer::Queued) { | ||
182 | qCDebug(BLUEDAEMON) << "Cancel Push"; | 183 | qCDebug(BLUEDAEMON) << "Cancel Push"; | ||
183 | m_request.reject(); | 184 | m_request.reject(); | ||
184 | setError(KJob::UserDefinedError); | 185 | setError(KJob::UserDefinedError); | ||
185 | emitResult(); | 186 | emitResult(); | ||
186 | } | 187 | } | ||
187 | } | 188 | } | ||
188 | 189 | | |||
189 | void ReceiveFileJob::moveFinished(KJob *job) | 190 | void ReceiveFileJob::moveFinished(KJob *job) | ||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |