Changeset View
Changeset View
Standalone View
Standalone View
svn/fileviewsvnplugin.cpp
Show All 38 Lines | |||||
39 | #include <QVBoxLayout> | 39 | #include <QVBoxLayout> | ||
40 | #include <QListWidget> | 40 | #include <QListWidget> | ||
41 | #include <KConfigGroup> | 41 | #include <KConfigGroup> | ||
42 | #include <KWindowConfig> | 42 | #include <KWindowConfig> | ||
43 | #include <QWindow> | 43 | #include <QWindow> | ||
44 | #include <QTableWidget> | 44 | #include <QTableWidget> | ||
45 | #include <QHeaderView> | 45 | #include <QHeaderView> | ||
46 | 46 | | |||
47 | #include "svncommitdialog.h" | ||||
48 | #include "svncommands.h" | ||||
49 | | ||||
47 | K_PLUGIN_FACTORY(FileViewSvnPluginFactory, registerPlugin<FileViewSvnPlugin>();) | 50 | K_PLUGIN_FACTORY(FileViewSvnPluginFactory, registerPlugin<FileViewSvnPlugin>();) | ||
48 | 51 | | |||
49 | FileViewSvnPlugin::FileViewSvnPlugin(QObject* parent, const QList<QVariant>& args) : | 52 | FileViewSvnPlugin::FileViewSvnPlugin(QObject* parent, const QList<QVariant>& args) : | ||
50 | KVersionControlPlugin(parent), | 53 | KVersionControlPlugin(parent), | ||
51 | m_pendingOperation(false), | 54 | m_pendingOperation(false), | ||
52 | m_versionInfoHash(), | 55 | m_versionInfoHash(), | ||
53 | m_updateAction(0), | 56 | m_updateAction(0), | ||
54 | m_showLocalChangesAction(0), | 57 | m_showLocalChangesAction(0), | ||
Show All 23 Lines | 70 | { | |||
78 | m_showLocalChangesAction->setText(i18nc("@item:inmenu", "Show Local SVN Changes")); | 81 | m_showLocalChangesAction->setText(i18nc("@item:inmenu", "Show Local SVN Changes")); | ||
79 | connect(m_showLocalChangesAction, SIGNAL(triggered()), | 82 | connect(m_showLocalChangesAction, SIGNAL(triggered()), | ||
80 | this, SLOT(showLocalChanges())); | 83 | this, SLOT(showLocalChanges())); | ||
81 | 84 | | |||
82 | m_commitAction = new QAction(this); | 85 | m_commitAction = new QAction(this); | ||
83 | m_commitAction->setIcon(QIcon::fromTheme("svn-commit")); | 86 | m_commitAction->setIcon(QIcon::fromTheme("svn-commit")); | ||
84 | m_commitAction->setText(i18nc("@item:inmenu", "SVN Commit...")); | 87 | m_commitAction->setText(i18nc("@item:inmenu", "SVN Commit...")); | ||
85 | connect(m_commitAction, SIGNAL(triggered()), | 88 | connect(m_commitAction, SIGNAL(triggered()), | ||
86 | this, SLOT(commitFiles())); | 89 | this, SLOT(commitDialog())); | ||
87 | 90 | | |||
88 | m_addAction = new QAction(this); | 91 | m_addAction = new QAction(this); | ||
89 | m_addAction->setIcon(QIcon::fromTheme("list-add")); | 92 | m_addAction->setIcon(QIcon::fromTheme("list-add")); | ||
90 | m_addAction->setText(i18nc("@item:inmenu", "SVN Add")); | 93 | m_addAction->setText(i18nc("@item:inmenu", "SVN Add")); | ||
91 | connect(m_addAction, SIGNAL(triggered()), | 94 | connect(m_addAction, SIGNAL(triggered()), | ||
92 | this, SLOT(addFiles())); | 95 | this, SLOT(addFiles())); | ||
93 | 96 | | |||
94 | m_removeAction = new QAction(this); | 97 | m_removeAction = new QAction(this); | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 158 | while (process.readLine(buffer, sizeof(buffer)) > 0) { | |||
158 | 161 | | |||
159 | switch (buffer[0]) { | 162 | switch (buffer[0]) { | ||
160 | case 'I': | 163 | case 'I': | ||
161 | case '?': version = UnversionedVersion; break; | 164 | case '?': version = UnversionedVersion; break; | ||
162 | case 'M': version = LocallyModifiedVersion; break; | 165 | case 'M': version = LocallyModifiedVersion; break; | ||
163 | case 'A': version = AddedVersion; break; | 166 | case 'A': version = AddedVersion; break; | ||
164 | case 'D': version = RemovedVersion; break; | 167 | case 'D': version = RemovedVersion; break; | ||
165 | case 'C': version = ConflictingVersion; break; | 168 | case 'C': version = ConflictingVersion; break; | ||
169 | case '!': version = MissingVersion; break; | ||||
166 | default: | 170 | default: | ||
167 | if (filePath.contains('*')) { | 171 | if (filePath.contains('*')) { | ||
168 | version = UpdateRequiredVersion; | 172 | version = UpdateRequiredVersion; | ||
169 | } else if (filePath.contains("W155010")) { | 173 | } else if (filePath.contains("W155010")) { | ||
170 | version = UnversionedVersion; | 174 | version = UnversionedVersion; | ||
171 | } | 175 | } | ||
172 | break; | 176 | break; | ||
173 | } | 177 | } | ||
Show All 26 Lines | 193 | if ((process.exitCode() != 0 || process.exitStatus() != QProcess::NormalExit)) { | |||
200 | } | 204 | } | ||
201 | } | 205 | } | ||
202 | 206 | | |||
203 | return true; | 207 | return true; | ||
204 | } | 208 | } | ||
205 | 209 | | |||
206 | void FileViewSvnPlugin::endRetrieval() | 210 | void FileViewSvnPlugin::endRetrieval() | ||
207 | { | 211 | { | ||
212 | emit versionInfoUpdated(); | ||||
208 | } | 213 | } | ||
209 | 214 | | |||
210 | KVersionControlPlugin::ItemVersion FileViewSvnPlugin::itemVersion(const KFileItem& item) const | 215 | KVersionControlPlugin::ItemVersion FileViewSvnPlugin::itemVersion(const KFileItem& item) const | ||
211 | { | 216 | { | ||
212 | const QString itemUrl = item.localPath(); | 217 | const QString itemUrl = item.localPath(); | ||
213 | if (m_versionInfoHash.contains(itemUrl)) { | 218 | if (m_versionInfoHash.contains(itemUrl)) { | ||
214 | return m_versionInfoHash.value(itemUrl); | 219 | return m_versionInfoHash.value(itemUrl); | ||
215 | } | 220 | } | ||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 249 | { | |||
295 | actions.append(m_revertAction); | 300 | actions.append(m_revertAction); | ||
296 | actions.append(m_showUpdatesAction); | 301 | actions.append(m_showUpdatesAction); | ||
297 | return actions; | 302 | return actions; | ||
298 | } | 303 | } | ||
299 | 304 | | |||
300 | 305 | | |||
301 | void FileViewSvnPlugin::updateFiles() | 306 | void FileViewSvnPlugin::updateFiles() | ||
302 | { | 307 | { | ||
303 | execSvnCommand("update", QStringList(), | 308 | execSvnCommand(QLatin1String("update"), QStringList(), | ||
304 | i18nc("@info:status", "Updating SVN repository..."), | 309 | i18nc("@info:status", "Updating SVN repository..."), | ||
305 | i18nc("@info:status", "Update of SVN repository failed."), | 310 | i18nc("@info:status", "Update of SVN repository failed."), | ||
306 | i18nc("@info:status", "Updated SVN repository.")); | 311 | i18nc("@info:status", "Updated SVN repository.")); | ||
307 | } | 312 | } | ||
308 | 313 | | |||
309 | void FileViewSvnPlugin::showLocalChanges() | 314 | void FileViewSvnPlugin::showLocalChanges() | ||
310 | { | 315 | { | ||
311 | Q_ASSERT(!m_contextDir.isEmpty()); | 316 | Q_ASSERT(!m_contextDir.isEmpty()); | ||
Show All 32 Lines | 345 | const bool started = QProcess::startDetached( | |||
344 | } | 349 | } | ||
345 | ); | 350 | ); | ||
346 | if (!started) { | 351 | if (!started) { | ||
347 | emit errorMessage(i18nc("@info:status", "Could not show local SVN changes: could not start kompare.")); | 352 | emit errorMessage(i18nc("@info:status", "Could not show local SVN changes: could not start kompare.")); | ||
348 | file->deleteLater(); | 353 | file->deleteLater(); | ||
349 | } | 354 | } | ||
350 | } | 355 | } | ||
351 | 356 | | |||
352 | void FileViewSvnPlugin::commitFiles() | 357 | void FileViewSvnPlugin::commitDialog() | ||
353 | { | 358 | { | ||
354 | QDialog dialog(0, Qt::Dialog); | 359 | QStringList context; | ||
355 | 360 | if (!m_contextDir.isEmpty()) { | |||
356 | QVBoxLayout* boxLayout = new QVBoxLayout(&dialog); | 361 | context << m_contextDir; | ||
357 | 362 | } else { | |||
358 | boxLayout->addWidget(new QLabel(i18nc("@label", "Description:"), | 363 | for (const auto &i : m_contextItems) { | ||
359 | &dialog)); | 364 | context << i.localPath(); | ||
360 | QPlainTextEdit* editor = new QPlainTextEdit(&dialog); | 365 | } | ||
361 | boxLayout->addWidget(editor, 1); | | |||
362 | | ||||
363 | QFrame* line = new QFrame(&dialog); | | |||
364 | line->setFrameShape(QFrame::HLine); | | |||
365 | line->setFrameShadow(QFrame::Sunken); | | |||
366 | boxLayout->addWidget(line); | | |||
367 | | ||||
368 | const QStringList header = { i18nc("@title:column", "Path"), | | |||
369 | i18nc("@title:column", "Status") }; | | |||
370 | const int columnPath = 0; | | |||
371 | const int columnStatus = 1; | | |||
372 | QTableWidget *changes = new QTableWidget(m_versionInfoHash.size(), header.size(), &dialog); | | |||
373 | changes->setHorizontalHeaderLabels(header); | | |||
374 | changes->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); | | |||
375 | changes->horizontalHeader()->setSectionResizeMode(columnStatus, QHeaderView::ResizeToContents); | | |||
376 | changes->verticalHeader()->setVisible(false); | | |||
377 | changes->setSortingEnabled(false); | | |||
378 | | ||||
379 | QHash<QString, ItemVersion>::const_iterator it = m_versionInfoHash.cbegin(); | | |||
380 | for ( int row = 0 ; it != m_versionInfoHash.cend(); ++it, ++row ) { | | |||
381 | QTableWidgetItem *path = new QTableWidgetItem( it.key() ); | | |||
382 | QTableWidgetItem *status = new QTableWidgetItem; | | |||
383 | | ||||
384 | path->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); | | |||
385 | status->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); | | |||
386 | | ||||
387 | changes->setItem(row, columnPath, path); | | |||
388 | changes->setItem(row, columnStatus, status); | | |||
389 | | ||||
390 | switch(it.value()) { | | |||
391 | case UnversionedVersion: | | |||
392 | status->setText( i18nc("@item:intable", "Unversioned") ); | | |||
393 | break; | | |||
394 | case LocallyModifiedVersion: | | |||
395 | status->setText( i18nc("@item:intable", "Modified") ); | | |||
396 | break; | | |||
397 | case AddedVersion: | | |||
398 | status->setText( i18nc("@item:intable", "Added") ); | | |||
399 | break; | | |||
400 | case RemovedVersion: | | |||
401 | status->setText( i18nc("@item:intable", "Deleted") ); | | |||
402 | break; | | |||
403 | case ConflictingVersion: | | |||
404 | status->setText( i18nc("@item:intable", "Conflict") ); | | |||
405 | break; | | |||
406 | case MissingVersion: | | |||
407 | status->setText( i18nc("@item:intable", "Missing") ); | | |||
408 | break; | | |||
409 | case UpdateRequiredVersion: | | |||
410 | status->setText( i18nc("@item:intable", "Update required") ); | | |||
411 | break; | | |||
412 | default: | | |||
413 | // For SVN normaly we shouldn't be here with: | | |||
414 | // NormalVersion, LocallyModifiedUnstagedVersion, IgnoredVersion. | | |||
415 | // 'default' is for any future changes in ItemVersion enum. | | |||
416 | qWarning() << QString("Unknown SVN status for item %1, ItemVersion = %2").arg(it.key()).arg(it.value()); | | |||
417 | status->setText(""); | | |||
418 | } | | |||
419 | } | | |||
420 | // Sort by status: unversioned is at the bottom. | | |||
421 | changes->sortByColumn(columnStatus, Qt::AscendingOrder); | | |||
422 | boxLayout->addWidget(changes, 3); | | |||
423 | | ||||
424 | dialog.setWindowTitle(i18nc("@title:window", "SVN Commit")); | | |||
425 | auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, &dialog); | | |||
426 | connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); | | |||
427 | connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject); | | |||
428 | auto okButton = buttonBox->button(QDialogButtonBox::Ok); | | |||
429 | | ||||
430 | okButton->setDefault(true); | | |||
431 | okButton->setText(i18nc("@action:button", "Commit")); | | |||
432 | boxLayout->addWidget(buttonBox); | | |||
433 | | ||||
434 | KConfigGroup dialogConfig(KSharedConfig::openConfig("dolphinrc"), | | |||
435 | "SvnCommitDialog"); | | |||
436 | dialog.winId(); // Workaround for QTBUG-40584, line 1/2. See KWindowConfig::restoreWindowSize() docs. | | |||
437 | KWindowConfig::restoreWindowSize(dialog.windowHandle(), dialogConfig); | | |||
438 | dialog.resize(dialog.windowHandle()->size()); // Workaround for QTBUG-40584, line 2/2. See KWindowConfig::restoreWindowSize() docs. | | |||
439 | | ||||
440 | if (dialog.exec() == QDialog::Accepted) { | | |||
441 | // Write the commit description into a temporary file, so | | |||
442 | // that it can be read by the command "svn commit -F". The temporary | | |||
443 | // file must stay alive until slotOperationCompleted() is invoked and will | | |||
444 | // be destroyed when the version plugin is destructed. | | |||
445 | if (!m_tempFile.open()) { | | |||
446 | emit errorMessage(i18nc("@info:status", "Commit of SVN changes failed.")); | | |||
447 | return; | | |||
448 | } | 366 | } | ||
449 | 367 | | |||
450 | QTextStream out(&m_tempFile); | 368 | SvnCommitDialog *svnCommitDialog = new SvnCommitDialog(&m_versionInfoHash, context); | ||
451 | const QString fileName = m_tempFile.fileName(); | | |||
452 | out << editor->toPlainText(); | | |||
453 | m_tempFile.close(); | | |||
454 | 369 | | |||
455 | QStringList arguments; | 370 | connect(this, &FileViewSvnPlugin::versionInfoUpdated, svnCommitDialog, &SvnCommitDialog::refreshChangesList); | ||
456 | arguments << "-F" << fileName; | 371 | | ||
457 | execSvnCommand("commit", arguments, | 372 | connect(svnCommitDialog, &SvnCommitDialog::revertFiles, this, QOverload<const QStringList&>::of(&FileViewSvnPlugin::revertFiles)); | ||
458 | i18nc("@info:status", "Committing SVN changes..."), | 373 | connect(svnCommitDialog, &SvnCommitDialog::diffFile, this, &FileViewSvnPlugin::diffFile); | ||
459 | i18nc("@info:status", "Commit of SVN changes failed."), | 374 | connect(svnCommitDialog, &SvnCommitDialog::addFiles, this, QOverload<const QStringList&>::of(&FileViewSvnPlugin::addFiles)); | ||
460 | i18nc("@info:status", "Committed SVN changes.")); | 375 | connect(svnCommitDialog, &SvnCommitDialog::commit, this, &FileViewSvnPlugin::commitFiles); | ||
461 | } | | |||
462 | 376 | | |||
463 | KWindowConfig::saveWindowSize(dialog.windowHandle(), dialogConfig, KConfigBase::Persistent); | 377 | svnCommitDialog->setAttribute(Qt::WA_DeleteOnClose); | ||
378 | svnCommitDialog->show(); | ||||
464 | } | 379 | } | ||
465 | 380 | | |||
466 | void FileViewSvnPlugin::addFiles() | 381 | void FileViewSvnPlugin::addFiles() | ||
467 | { | 382 | { | ||
468 | execSvnCommand(QLatin1String("add"), QStringList(), | 383 | execSvnCommand(QLatin1String("add"), QStringList(), | ||
469 | i18nc("@info:status", "Adding files to SVN repository..."), | 384 | i18nc("@info:status", "Adding files to SVN repository..."), | ||
470 | i18nc("@info:status", "Adding of files to SVN repository failed."), | 385 | i18nc("@info:status", "Adding of files to SVN repository failed."), | ||
471 | i18nc("@info:status", "Added files to SVN repository.")); | 386 | i18nc("@info:status", "Added files to SVN repository.")); | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 429 | { | |||
515 | FileViewSvnPluginSettings* settings = FileViewSvnPluginSettings::self(); | 430 | FileViewSvnPluginSettings* settings = FileViewSvnPluginSettings::self(); | ||
516 | Q_ASSERT(settings != 0); | 431 | Q_ASSERT(settings != 0); | ||
517 | settings->setShowUpdates(checked); | 432 | settings->setShowUpdates(checked); | ||
518 | settings->save(); | 433 | settings->save(); | ||
519 | 434 | | |||
520 | emit itemVersionsChanged(); | 435 | emit itemVersionsChanged(); | ||
521 | } | 436 | } | ||
522 | 437 | | |||
438 | void FileViewSvnPlugin::revertFiles(const QStringList& filesPath) | ||||
439 | { | ||||
440 | for (const auto &i : qAsConst(filesPath)) { | ||||
441 | m_contextItems.append( QUrl::fromLocalFile(i) ); | ||||
442 | } | ||||
443 | m_contextDir.clear(); | ||||
444 | | ||||
445 | execSvnCommand(QLatin1String("revert"), QStringList() << filesPath, | ||||
446 | i18nc("@info:status", "Reverting changes to file..."), | ||||
447 | i18nc("@info:status", "Revert file failed."), | ||||
448 | i18nc("@info:status", "File reverted.")); | ||||
449 | } | ||||
450 | | ||||
451 | void FileViewSvnPlugin::diffFile(const QString& filePath) | ||||
452 | { | ||||
453 | // For a diff we will export last known file local revision from a remote and compare. We will | ||||
454 | // not use basic SVN action 'svn diff --extensions -U<lines> <fileName>' because we should count | ||||
455 | // lines or set maximum number for this. | ||||
456 | // With a maximum number (2147483647) 'svn diff' starts to work slowly. | ||||
457 | | ||||
458 | QTemporaryFile *file = new QTemporaryFile(this); | ||||
459 | // TODO: Calling a blocking operation: with a slow connection this might take some time. Work | ||||
meven: Todos are more commonly written //TODO within our codebase. | |||||
460 | // should be done in a separate thread or process. | ||||
461 | if (!SVNCommands::exportLocalFile(filePath, SVNCommands::localRevision(filePath), file)) { | ||||
462 | emit errorMessage(i18nc("@info:status", "Could not show local SVN changes for a file: could not get file.")); | ||||
463 | file->deleteLater(); | ||||
464 | } | ||||
465 | | ||||
466 | const bool started = QProcess::startDetached( | ||||
467 | QLatin1String("kompare"), | ||||
468 | QStringList { | ||||
469 | file->fileName(), | ||||
470 | filePath | ||||
471 | } | ||||
472 | ); | ||||
473 | if (!started) { | ||||
474 | emit errorMessage(i18nc("@info:status", "Could not show local SVN changes: could not start kompare.")); | ||||
475 | file->deleteLater(); | ||||
476 | } | ||||
477 | } | ||||
478 | | ||||
479 | void FileViewSvnPlugin::addFiles(const QStringList& filesPath) | ||||
480 | { | ||||
481 | for (const auto &i : qAsConst(filesPath)) { | ||||
482 | m_contextItems.append( QUrl::fromLocalFile(i) ); | ||||
483 | } | ||||
484 | m_contextDir.clear(); | ||||
485 | | ||||
486 | addFiles(); | ||||
487 | } | ||||
488 | | ||||
489 | void FileViewSvnPlugin::commitFiles(const QStringList& context, const QString& msg) | ||||
490 | { | ||||
491 | // Write the commit description into a temporary file, so | ||||
meven: Well now is a good time ;) | |||||
492 | // that it can be read by the command "svn commit -F". The temporary | ||||
493 | // file must stay alive until slotOperationCompleted() is invoked and will | ||||
494 | // be destroyed when the version plugin is destructed. | ||||
495 | if (!m_tempFile.open()) { | ||||
496 | emit errorMessage(i18nc("@info:status", "Commit of SVN changes failed.")); | ||||
497 | return; | ||||
498 | } | ||||
499 | | ||||
500 | QTextStream out(&m_tempFile); | ||||
501 | const QString fileName = m_tempFile.fileName(); | ||||
502 | out << msg; | ||||
503 | m_tempFile.close(); | ||||
504 | | ||||
505 | QStringList arguments; | ||||
506 | arguments << context << "-F" << fileName; | ||||
507 | | ||||
508 | // Lets clear m_contextDir and m_contextItems variables: we will pass everything in arguments. | ||||
509 | // This is needed because startSvnCommandProcess() uses only one QString for svn transaction at | ||||
510 | // a time but we want to commit everything. | ||||
511 | m_contextDir.clear(); | ||||
512 | m_contextItems.clear(); | ||||
513 | | ||||
514 | execSvnCommand(QLatin1String("commit"), arguments, | ||||
515 | i18nc("@info:status", "Committing SVN changes..."), | ||||
516 | i18nc("@info:status", "Commit of SVN changes failed."), | ||||
517 | i18nc("@info:status", "Committed SVN changes.")); | ||||
518 | } | ||||
519 | | ||||
523 | void FileViewSvnPlugin::execSvnCommand(const QString& svnCommand, | 520 | void FileViewSvnPlugin::execSvnCommand(const QString& svnCommand, | ||
524 | const QStringList& arguments, | 521 | const QStringList& arguments, | ||
525 | const QString& infoMsg, | 522 | const QString& infoMsg, | ||
526 | const QString& errorMsg, | 523 | const QString& errorMsg, | ||
527 | const QString& operationCompletedMsg) | 524 | const QString& operationCompletedMsg) | ||
528 | { | 525 | { | ||
529 | emit infoMessage(infoMsg); | 526 | emit infoMessage(infoMsg); | ||
530 | 527 | | |||
Show All 12 Lines | 537 | { | |||
543 | 540 | | |||
544 | const QString program(QLatin1String("svn")); | 541 | const QString program(QLatin1String("svn")); | ||
545 | QStringList arguments; | 542 | QStringList arguments; | ||
546 | arguments << m_command << m_arguments; | 543 | arguments << m_command << m_arguments; | ||
547 | if (!m_contextDir.isEmpty()) { | 544 | if (!m_contextDir.isEmpty()) { | ||
548 | arguments << m_contextDir; | 545 | arguments << m_contextDir; | ||
549 | m_contextDir.clear(); | 546 | m_contextDir.clear(); | ||
550 | } else { | 547 | } else { | ||
548 | // If m_contextDir is empty and m_contextItems is empty then all svn arguments are in | ||||
549 | // m_arguments (for example see commitFiles()). | ||||
550 | if (!m_contextItems.isEmpty()) { | ||||
551 | const KFileItem item = m_contextItems.takeLast(); | 551 | const KFileItem item = m_contextItems.takeLast(); | ||
552 | arguments << item.localPath(); | 552 | arguments << item.localPath(); | ||
553 | // the remaining items of m_contextItems will be executed | 553 | // the remaining items of m_contextItems will be executed | ||
554 | // after the process has finished (see slotOperationFinished()) | 554 | // after the process has finished (see slotOperationFinished()) | ||
555 | } | 555 | } | ||
556 | } | ||||
556 | m_process.start(program, arguments); | 557 | m_process.start(program, arguments); | ||
557 | } | 558 | } | ||
558 | 559 | | |||
559 | QList<QAction*> FileViewSvnPlugin::directoryActions(const KFileItem& directory) const | 560 | QList<QAction*> FileViewSvnPlugin::directoryActions(const KFileItem& directory) const | ||
560 | { | 561 | { | ||
561 | m_contextDir = directory.localPath(); | 562 | m_contextDir = directory.localPath(); | ||
562 | if (!m_contextDir.endsWith(QLatin1Char('/'))) { | 563 | if (!m_contextDir.endsWith(QLatin1Char('/'))) { | ||
563 | m_contextDir += QLatin1Char('/'); | 564 | m_contextDir += QLatin1Char('/'); | ||
Show All 26 Lines |
Todos are more commonly written //TODO within our codebase.