OSDN Git Service

Bump version.
[lamexp/LameXP.git] / src / Tool_Abstract.cpp
index 4cb8fd0..99a5229 100644 (file)
@@ -1,12 +1,12 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2017 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2020 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
+// it under the terms of the GNU GENERAL PUBLIC LICENSE as published by
 // the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version, but always including the *additional*
-// restrictions defined in the "License.txt" file.
+// (at your option) any later version; always including the non-optional
+// LAMEXP GNU GENERAL PUBLIC LICENSE ADDENDUM. See "License.txt" file!
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -176,7 +176,7 @@ AbstractTool::result_t AbstractTool::awaitProcess(QProcess &process, QAtomicInt
 
        while (process.state() != QProcess::NotRunning)
        {
-               if (checkFlag(abortFlag))
+               if (CHECK_FLAG(abortFlag))
                {
                        process.kill();
                        bAborted = true;
@@ -199,11 +199,7 @@ AbstractTool::result_t AbstractTool::awaitProcess(QProcess &process, QAtomicInt
                        QByteArray line = process.readLine();
                        if (line.size() > 0)
                        {
-                               static const char REPALCE_CHARS[3] = { '\r', '\b', '\t' };
-                               for (size_t i = 0; i < MUTILS_ARR2LEN(REPALCE_CHARS); ++i)
-                               {
-                                       line.replace(REPALCE_CHARS[i], char(0x20));
-                               }
+                               line.replace('\r', char(0x20)).replace('\b', char(0x20)).replace('\t', char(0x20));
                                const QString text = QString::fromUtf8(line.constData()).simplified();
                                if (!text.isEmpty())
                                {