Fix regular expression for new version of Monkey's Audio.
This commit is contained in:
parent
dbd0c860e1
commit
97ab6bd0be
@ -30,7 +30,7 @@
|
||||
#define VER_LAMEXP_MINOR_LO 4
|
||||
#define VER_LAMEXP_TYPE Alpha
|
||||
#define VER_LAMEXP_PATCH 17
|
||||
#define VER_LAMEXP_BUILD 886
|
||||
#define VER_LAMEXP_BUILD 888
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Tool versions (minimum expected versions!)
|
||||
|
@ -57,8 +57,9 @@ bool MACDecoder::decode(const QString &sourceFile, const QString &outputFile, vo
|
||||
|
||||
bool bTimeout = false;
|
||||
bool bAborted = false;
|
||||
int prevProgress = -1;
|
||||
|
||||
QRegExp regExp("Progress: (\\d+)%");
|
||||
QRegExp regExp("Progress: (\\d+).(\\d+)%");
|
||||
|
||||
while(process.state() != QProcess::NotRunning)
|
||||
{
|
||||
@ -86,7 +87,11 @@ bool MACDecoder::decode(const QString &sourceFile, const QString &outputFile, vo
|
||||
{
|
||||
bool ok = false;
|
||||
int progress = regExp.cap(1).toInt(&ok);
|
||||
if(ok) emit statusUpdated(progress);
|
||||
if(ok && (progress > prevProgress))
|
||||
{
|
||||
emit statusUpdated(progress);
|
||||
prevProgress = qMin(progress + 2, 99);
|
||||
}
|
||||
}
|
||||
else if(!text.isEmpty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user