Changeset View
Changeset View
Standalone View
Standalone View
src/drkonqi.cpp
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Line(s) | 193 | if (tf.open()) { | |||
---|---|---|---|---|---|
195 | ts << reportText; | 195 | ts << reportText; | ||
196 | ts.flush(); | 196 | ts.flush(); | ||
197 | } else { | 197 | } else { | ||
198 | KMessageBox::sorry(parent, xi18nc("@info","Cannot open file <filename>%1</filename> " | 198 | KMessageBox::sorry(parent, xi18nc("@info","Cannot open file <filename>%1</filename> " | ||
199 | "for writing.", tf.fileName())); | 199 | "for writing.", tf.fileName())); | ||
200 | return; | 200 | return; | ||
201 | } | 201 | } | ||
202 | 202 | | |||
203 | KIO::FileCopyJob* job = KIO::file_copy(QUrl::fromLocalFile(tf.fileName()), fileUrl); | 203 | // QFileDialog was run with confirmOverwrite, so we can safely | ||
204 | // overwrite as necesssary. | ||||
205 | KIO::FileCopyJob* job = KIO::file_copy(QUrl::fromLocalFile(tf.fileName()), | ||||
206 | fileUrl, | ||||
207 | -1, | ||||
208 | KIO::DefaultFlags | KIO::Overwrite); | ||||
204 | KJobWidgets::setWindow(job, parent); | 209 | KJobWidgets::setWindow(job, parent); | ||
205 | if (!job->exec()) { | 210 | if (!job->exec()) { | ||
206 | KMessageBox::sorry(parent, job->errorText()); | 211 | KMessageBox::sorry(parent, job->errorString()); | ||
207 | } | 212 | } | ||
208 | } | 213 | } | ||
209 | } | 214 | } | ||
210 | } | 215 | } | ||
211 | 216 | | |||
212 | void DrKonqi::setSignal(int signal) | 217 | void DrKonqi::setSignal(int signal) | ||
213 | { | 218 | { | ||
214 | instance()->m_signal = signal; | 219 | instance()->m_signal = signal; | ||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |