Changeset View
Changeset View
Standalone View
Standalone View
plugins/subversion/kdevsvnplugin.cpp
Show First 20 Lines • Show All 398 Lines • ▼ Show 20 Line(s) | 391 | if (source.isLocalFile()) { | |||
---|---|---|---|---|---|
399 | KUrlRequesterDialog dlg(dir, i18n("Destination file/directory"), nullptr); | 399 | KUrlRequesterDialog dlg(dir, i18n("Destination file/directory"), nullptr); | ||
400 | 400 | | |||
401 | if (isFile) { | 401 | if (isFile) { | ||
402 | dlg.urlRequester()->setMode(KFile::File | KFile::Directory | KFile::LocalOnly); | 402 | dlg.urlRequester()->setMode(KFile::File | KFile::Directory | KFile::LocalOnly); | ||
403 | } else { | 403 | } else { | ||
404 | dlg.urlRequester()->setMode(KFile::Directory | KFile::LocalOnly); | 404 | dlg.urlRequester()->setMode(KFile::Directory | KFile::LocalOnly); | ||
405 | } | 405 | } | ||
406 | 406 | | |||
407 | if (dlg.exec() == QDialog::Accepted) { | 407 | if (dlg.exec() == QDialog::Accepted) { // krazy:exclude=crashy | ||
408 | KDevelop::ICore::self()->runController()->registerJob(copy(source, dlg.selectedUrl())); | 408 | KDevelop::ICore::self()->runController()->registerJob(copy(source, dlg.selectedUrl())); | ||
409 | } | 409 | } | ||
410 | } else { | 410 | } else { | ||
411 | KMessageBox::error(nullptr, i18n("Copying only works on local files")); | 411 | KMessageBox::error(nullptr, i18n("Copying only works on local files")); | ||
412 | return; | 412 | return; | ||
413 | } | 413 | } | ||
414 | 414 | | |||
415 | } | 415 | } | ||
Show All 19 Lines | 427 | if (source.isLocalFile()) { | |||
435 | KUrlRequesterDialog dlg(dir, i18n("Destination file/directory"), nullptr); | 435 | KUrlRequesterDialog dlg(dir, i18n("Destination file/directory"), nullptr); | ||
436 | 436 | | |||
437 | if (isFile) { | 437 | if (isFile) { | ||
438 | dlg.urlRequester()->setMode(KFile::File | KFile::Directory | KFile::LocalOnly); | 438 | dlg.urlRequester()->setMode(KFile::File | KFile::Directory | KFile::LocalOnly); | ||
439 | } else { | 439 | } else { | ||
440 | dlg.urlRequester()->setMode(KFile::Directory | KFile::LocalOnly); | 440 | dlg.urlRequester()->setMode(KFile::Directory | KFile::LocalOnly); | ||
441 | } | 441 | } | ||
442 | 442 | | |||
443 | if (dlg.exec() == QDialog::Accepted) { | 443 | if (dlg.exec() == QDialog::Accepted) { // krazy:exclude=crashy | ||
444 | KDevelop::ICore::self()->runController()->registerJob(move(source, dlg.selectedUrl())); | 444 | KDevelop::ICore::self()->runController()->registerJob(move(source, dlg.selectedUrl())); | ||
445 | } | 445 | } | ||
446 | } else { | 446 | } else { | ||
447 | KMessageBox::error(nullptr, i18n("Moving only works on local files/dirs")); | 447 | KMessageBox::error(nullptr, i18n("Moving only works on local files/dirs")); | ||
448 | return; | 448 | return; | ||
449 | } | 449 | } | ||
450 | } | 450 | } | ||
451 | 451 | | |||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |