Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Okular
Commits
e6f82a50
Commit
e6f82a50
authored
Mar 09, 2021
by
George Florea Bănuș
Committed by
Albert Astals Cid
Mar 09, 2021
Browse files
Fix unrar detection on Windows
CCBUG: 412413
parent
ccda6d2a
Pipeline
#53558
passed with stage
in 10 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
generators/comicbook/unrar.cpp
View file @
e6f82a50
...
...
@@ -23,6 +23,7 @@
#include "debug_comicbook.h"
#include <QRegularExpression>
#include <QStandardPaths>
#include <memory>
...
...
@@ -47,7 +48,8 @@ static UnrarFlavour *detectUnrar(const QString &unrarPath, const QString &versio
proc
.
start
(
unrarPath
,
QStringList
()
<<
versionCommand
);
bool
ok
=
proc
.
waitForFinished
(
-
1
);
Q_UNUSED
(
ok
)
const
QStringList
lines
=
QString
::
fromLocal8Bit
(
proc
.
readAllStandardOutput
()).
split
(
QLatin1Char
(
'\n'
),
QString
::
SkipEmptyParts
);
const
QRegularExpression
regex
(
QStringLiteral
(
"[
\r\n
]"
));
const
QStringList
lines
=
QString
::
fromLocal8Bit
(
proc
.
readAllStandardOutput
()).
split
(
regex
,
QString
::
SkipEmptyParts
);
if
(
!
lines
.
isEmpty
())
{
if
(
lines
.
first
().
startsWith
(
QLatin1String
(
"UNRAR "
)))
kind
=
new
NonFreeUnrarFlavour
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment