absorb return value of trimmed().

This commit is contained in:
2018-05-23 17:34:34 +02:00
parent 1bff46a61d
commit 2774821b73
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ void PGetFourierBlockDialog::checkPhaseParameter()
ival = str.toInt(&ok); ival = str.toInt(&ok);
if (!ok) { // i.e. the phase entry is not a number. Check for parXX if (!ok) { // i.e. the phase entry is not a number. Check for parXX
str.trimmed(); str = str.trimmed();
if (str.startsWith("par")) { // if (str.startsWith("par")) { //
str.remove("par"); str.remove("par");
ival = str.toInt(&ok); ival = str.toInt(&ok);

View File

@ -2262,7 +2262,7 @@ void PTextEdit::musrMsr2Data()
stream = new QTextStream(file); stream = new QTextStream(file);
while ( !stream->atEnd() ) { while ( !stream->atEnd() ) {
str = stream->readLine(); // line of text excluding '\n' str = stream->readLine(); // line of text excluding '\n'
str.trimmed(); str = str.trimmed();
if (!str.isEmpty() && !str.startsWith("#") && !str.startsWith("run", Qt::CaseInsensitive)) { if (!str.isEmpty() && !str.startsWith("#") && !str.startsWith("run", Qt::CaseInsensitive)) {
fln = str.section(' ', 0, 0, QString::SectionSkipEmpty); fln = str.section(' ', 0, 0, QString::SectionSkipEmpty);
if (fMsr2DataParam->msrFileExtension.isEmpty()) if (fMsr2DataParam->msrFileExtension.isEmpty())
@ -2305,7 +2305,7 @@ void PTextEdit::musrMsr2Data()
stream = new QTextStream(file); stream = new QTextStream(file);
while ( !stream->atEnd() ) { while ( !stream->atEnd() ) {
str = stream->readLine(); // line of text excluding '\n' str = stream->readLine(); // line of text excluding '\n'
str.trimmed(); str = str.trimmed();
if (!str.isEmpty() && !str.startsWith("#") && !str.startsWith("run", Qt::CaseInsensitive)) { if (!str.isEmpty() && !str.startsWith("#") && !str.startsWith("run", Qt::CaseInsensitive)) {
fln = str.section(' ', 0, 0, QString::SectionSkipEmpty); fln = str.section(' ', 0, 0, QString::SectionSkipEmpty);
break; break;