absorb return value of trimmed().
This commit is contained in:
@ -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);
|
||||||
|
@ -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;
|
||||||
|
Reference in New Issue
Block a user