Index: svn/CMakeLists.txt =================================================================== --- svn/CMakeLists.txt +++ svn/CMakeLists.txt @@ -21,8 +21,6 @@ DolphinVcs ) -kde_enable_exceptions() - install(FILES fileviewsvnplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) install(FILES fileviewsvnpluginsettings.kcfg DESTINATION ${KCFG_INSTALL_DIR}) install(TARGETS fileviewsvnplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}) Index: svn/fileviewsvnplugin.cpp =================================================================== --- svn/fileviewsvnplugin.cpp +++ svn/fileviewsvnplugin.cpp @@ -308,41 +308,44 @@ Q_ASSERT(m_contextItems.isEmpty()); QProcess *process = new QProcess(this); - QTemporaryFile *file = new QTemporaryFile(QDir::tempPath() + QString("/%1.XXXXXX").arg( QDir(m_contextDir).dirName() ), process); + const QString tmpFileNameTemplate = QDir::tempPath() + QDir::separator() + QString("%1.XXXXXX").arg( QDir(m_contextDir).dirName() ); + QTemporaryFile *file = new QTemporaryFile(tmpFileNameTemplate, process); - try { - if (!file->open()) { - throw( i18nc("@info:status", "Show changes error: can't create temporary file.") ); - } + if (!file->open()) { + emit errorMessage( i18nc("@info:status", "Show changes error: can't create temporary file.") ); + process->deleteLater(); + return; + } - process->setStandardOutputFile( file->fileName() ); - process->start( - QLatin1String("svn"), - QStringList { - QLatin1String("diff"), - QLatin1String("--git"), - m_contextDir - } - ); - if (!process->waitForFinished() || process->exitCode() != 0) { - throw( i18nc("@info:status", "Show changes error: svn diff failed.") ); + process->setStandardOutputFile( file->fileName() ); + process->start( + QLatin1String("svn"), + QStringList { + QLatin1String("diff"), + QLatin1String("--git"), + m_contextDir } + ); + if (!process->waitForFinished() || process->exitCode() != 0) { + emit errorMessage( i18nc("@info:status", "Show changes error: svn diff failed.") ); + process->deleteLater(); + return; + } - process->setStandardOutputFile( QProcess::nullDevice() ); - process->start( - QLatin1String("kompare"), - QStringList { - file->fileName() - } - ); - if ( !process->waitForStarted() ) { - throw( i18nc("@info:status", "Show changes error: start of kompare failed.") ); + process->setStandardOutputFile( QProcess::nullDevice() ); + process->start( + QLatin1String("kompare"), + QStringList { + file->fileName() } - connect(process, QOverload::of(&QProcess::finished), process, &QProcess::deleteLater); - } catch (const QString &str) { - emit errorMessage( str ); + ); + if ( !process->waitForStarted() ) { + emit errorMessage( i18nc("@info:status", "Show changes error: start of kompare failed.") ); process->deleteLater(); + return; } + + connect(process, QOverload::of(&QProcess::finished), process, &QProcess::deleteLater); } void FileViewSvnPlugin::commitFiles()