#4683 clang-format on all files in ApplicationCode

This commit is contained in:
Magne Sjaastad
2019-09-06 10:40:57 +02:00
parent 3a317504bb
commit fe9e567825
2092 changed files with 117952 additions and 111846 deletions

View File

@@ -13,12 +13,12 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void writeTextToFile(const QString& filePath, const QString& text)
void writeTextToFile( const QString& filePath, const QString& text )
{
QFile exportFile(filePath);
if (exportFile.open(QIODevice::WriteOnly | QIODevice::Text))
QFile exportFile( filePath );
if ( exportFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
{
QTextStream stream(&exportFile);
QTextStream stream( &exportFile );
stream << text;
}
@@ -33,8 +33,8 @@ QString versionHeaderText()
QDateTime dt = QDateTime::currentDateTime();
text += QString("// ResInsight version string : %1\n").arg(STRPRODUCTVER);
text += QString("// Report generated : %1\n").arg(QDateTime::currentDateTime().toString());
text += QString( "// ResInsight version string : %1\n" ).arg( STRPRODUCTVER );
text += QString( "// Report generated : %1\n" ).arg( QDateTime::currentDateTime().toString() );
text += "//\n";
text += "//\n";
text += "\n";
@@ -45,49 +45,49 @@ QString versionHeaderText()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
TEST(ListKeywords, ListAllObjectKeywords)
TEST( ListKeywords, ListAllObjectKeywords )
{
auto instance = caf::PdmDefaultObjectFactory::instance();
QString textString;
QTextStream stream(&textString);
QTextStream stream( &textString );
textString = versionHeaderText();
std::vector<QString> classKeywords = instance->classKeywords();
for (auto keyword : classKeywords)
for ( auto keyword : classKeywords )
{
stream << keyword << "\n";
}
QString filePath = "c:/temp/ri-objectKeywords.txt";
//writeTextToFile(filePath, textString);
// writeTextToFile(filePath, textString);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
TEST(ListKeywords, ListAllObjectKeywordsAndFieldKeywords)
TEST( ListKeywords, ListAllObjectKeywordsAndFieldKeywords )
{
auto instance = caf::PdmDefaultObjectFactory::instance();
QString textString;
QTextStream stream(&textString);
QTextStream stream( &textString );
bool includeClassName = true;
textString = versionHeaderText();
std::vector<QString> classKeywords = instance->classKeywords();
for (auto keyword : classKeywords)
for ( auto keyword : classKeywords )
{
caf::PdmObjectHandle* myClass = instance->create(keyword);
caf::PdmObjectHandle* myClass = instance->create( keyword );
stream << keyword;
if (includeClassName)
if ( includeClassName )
{
QString className = qStringTypeName(*myClass);
QString className = qStringTypeName( *myClass );
stream << " - " << className;
}
@@ -95,9 +95,9 @@ TEST(ListKeywords, ListAllObjectKeywordsAndFieldKeywords)
stream << "\n";
std::vector<caf::PdmFieldHandle*> fields;
myClass->fields(fields);
myClass->fields( fields );
for (auto f : fields)
for ( auto f : fields )
{
stream << " " << f->keyword() << "\n";
}
@@ -108,5 +108,5 @@ TEST(ListKeywords, ListAllObjectKeywordsAndFieldKeywords)
}
QString filePath = "c:/temp/ri-fieldKeywords.txt";
//writeTextToFile(filePath, textString);
// writeTextToFile(filePath, textString);
}