Commit 28a6aabd authored by Matthew Woehlke's avatar Matthew Woehlke

STYLE: Indent and brace alignment.

parent 785b20d6
...@@ -205,45 +205,45 @@ void pqTestUtility::recordTests(const QString& filename) ...@@ -205,45 +205,45 @@ void pqTestUtility::recordTests(const QString& filename)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void pqTestUtility::addDataDirectory(const QString& label, const QDir& path) void pqTestUtility::addDataDirectory(const QString& label, const QDir& path)
{ {
this->DataDirectories[label] = path; this->DataDirectories[label] = path;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void pqTestUtility::removeDataDirectory(const QString& label) void pqTestUtility::removeDataDirectory(const QString& label)
{ {
this->DataDirectories.remove(label); this->DataDirectories.remove(label);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
QString pqTestUtility::convertToDataDirectory(const QString& file) QString pqTestUtility::convertToDataDirectory(const QString& file)
{ {
QString normalized_file = file; QString normalized_file = file;
QMap<QString, QDir>::iterator iter; QMap<QString, QDir>::iterator iter;
for(iter = this->DataDirectories.begin(); iter != this->DataDirectories.end(); ++iter) for(iter = this->DataDirectories.begin(); iter != this->DataDirectories.end(); ++iter)
{ {
QString rel_file = iter.value().relativeFilePath(file); QString rel_file = iter.value().relativeFilePath(file);
if(!rel_file.contains("..")) if(!rel_file.contains(".."))
{ {
normalized_file = QString("${%1}/%2").arg(iter.key()).arg(rel_file); normalized_file = QString("${%1}/%2").arg(iter.key()).arg(rel_file);
break; break;
} }
} }
return normalized_file; return normalized_file;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
QString pqTestUtility::convertFromDataDirectory(const QString& file) QString pqTestUtility::convertFromDataDirectory(const QString& file)
{ {
QString filename = file; QString filename = file;
QMap<QString, QDir>::iterator iter; QMap<QString, QDir>::iterator iter;
for(iter = this->DataDirectories.begin(); iter != this->DataDirectories.end(); ++iter) for(iter = this->DataDirectories.begin(); iter != this->DataDirectories.end(); ++iter)
{ {
QString label = QString("${%1}").arg(iter.key()); QString label = QString("${%1}").arg(iter.key());
if(filename.contains(label)) if(filename.contains(label))
{ {
filename.replace(label, iter.value().absolutePath()); filename.replace(label, iter.value().absolutePath());
break; break;
} }
} }
return filename; return filename;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment