Commit 263eb676 authored by Albert Astals Cid's avatar Albert Astals Cid

Merge remote-tracking branch 'origin/KDE/4.14'

parents 2a2970f8 717c4b0f
......@@ -39,11 +39,11 @@ struct UnrarHelper
K_GLOBAL_STATIC( UnrarHelper, helper )
static UnrarFlavour* detectUnrar( const QString &unrarPath )
static UnrarFlavour* detectUnrar( const QString &unrarPath, const QString &versionCommand )
{
UnrarFlavour* kind = 0;
QProcess proc;
proc.start( unrarPath, QStringList() << "--version" );
proc.start( unrarPath, QStringList() << versionCommand );
bool ok = proc.waitForFinished( -1 );
Q_UNUSED( ok )
const QStringList lines = QString::fromLocal8Bit( proc.readAllStandardOutput() ).split( '\n', QString::SkipEmptyParts );
......@@ -69,7 +69,10 @@ UnrarHelper::UnrarHelper()
path = KStandardDirs::findExe( "rar" );
if ( !path.isEmpty() )
kind = detectUnrar( path );
kind = detectUnrar( path, "--version" );
if ( !kind )
kind = detectUnrar( path, "-v" );
if ( !kind )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment