Use compare() because endsWith() does not work as expected on Windows

p4#: 22005
This commit is contained in:
Magne Sjaastad 2013-06-26 12:01:53 +02:00
parent b5688c5cd9
commit 390abe0f81
3 changed files with 8 additions and 2 deletions

View File

@ -98,6 +98,8 @@ void RivWellPathPartMgr::buildWellPathParts(cvf::Vec3d displayModelOffset, doubl
if (m_wellPathCollection.isNull()) return;
RigWellPath* wellPathGeometry = m_rimWellPath->wellPathGeometry();
if (!wellPathGeometry) return;
if (wellPathGeometry->m_wellPathPoints.size() < 2) return;
m_wellBranches.clear();

View File

@ -166,7 +166,9 @@ caf::PdmFieldHandle* RimWellPath::objectToggleField()
//--------------------------------------------------------------------------------------------------
void RimWellPath::readWellPathFile()
{
if (filepath().endsWith(".json"), Qt::CaseInsensitive)
QFileInfo fi(filepath());
if (fi.suffix().compare("json") == 0)
{
this->readJsonWellPathFile();
}

View File

@ -156,7 +156,9 @@ void RimWellPathCollection::addWellPaths( QStringList filePaths )
if (!alreadyOpen)
{
if (filePath.endsWith(".json"), Qt::CaseInsensitive)
QFileInfo fi(filePath);
if (fi.suffix().compare("json") == 0)
{
RimWellPath* wellPath = new RimWellPath();
wellPath->setProject(m_project);