mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
Use copy ctor instead of conversion through QChar*
Versions of Qt < 4.7 do not have a QString constructor from QChar* without specifying the size of the string. However, since the QString is copy-on-write, the QString object can be passed to the copy constructor of the return value directly!
This commit is contained in:
parent
2c9695e594
commit
ec7057eb78
@ -295,7 +295,7 @@ QString RifEclipseOutputFileTools::fileNameByType(const QStringList& fileSet, ec
|
||||
int reportNumber = -1;
|
||||
if (ecl_util_get_file_type(fileSet.at(i).toAscii().data(), &formatted, &reportNumber) == fileType)
|
||||
{
|
||||
return QString(fileSet.at(i).data());
|
||||
return fileSet.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ QStringList RifEclipseOutputFileTools::fileNamesByType(const QStringList& fileSe
|
||||
int reportNumber = -1;
|
||||
if (ecl_util_get_file_type(fileSet.at(i).toAscii().data(), &formatted, &reportNumber) == fileType)
|
||||
{
|
||||
fileNames.append(QString(fileSet.at(i).data()));
|
||||
fileNames.append(fileSet.at(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user