Add support for two Stimplan file formats (#6015)

#5990 XML import : Support two Stimplan file formats
This commit is contained in:
Magne Sjaastad
2020-06-03 18:46:25 +02:00
committed by GitHub
parent 77090bce6a
commit 88ddeddca6
10 changed files with 783 additions and 53 deletions

View File

@@ -334,7 +334,7 @@ bool RiaApplication::openFile( const QString& fileName )
}
else if ( int( fileType ) & int( RiaDefines::ImportFileType::ANY_ECLIPSE_FILE ) )
{
loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{ fileName }, true );
loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{fileName}, true );
lastUsedDialogTag = RiaDefines::defaultDirectoryLabel( fileType );
}
@@ -1373,9 +1373,14 @@ int RiaApplication::launchUnitTests()
//
// Use the gtest filter to execute a subset of tests
//::testing::GTEST_FLAG( filter ) = "*RifCaseRealizationParametersReaderTest*";
//
//
QString filterText = RiaPreferences::current()->gtestFilter();
if ( !filterText.isEmpty() )
{
::testing::GTEST_FLAG( filter ) = filterText.toLatin1();
// Example on filter syntax
//::testing::GTEST_FLAG( filter ) = "*RifCaseRealizationParametersReaderTest*";
}
// Use this macro in main() to run all tests. It returns 0 if all
// tests are successful, or 1 otherwise.
@@ -1825,8 +1830,10 @@ bool RiaApplication::generateCode( const QString& fileName, QString* errMsg )
out << "+++ \n";
out << "# Introduction\n\n";
out << "As the Python interface is growing release by release, we are investigating how to automate "
"the building of reference documentation. This document is not complete, but will improve as "
out << "As the Python interface is growing release by release, we are investigating how to "
"automate "
"the building of reference documentation. This document is not complete, but will improve "
"as "
"the automation "
"moves forward.\n";
@@ -1838,7 +1845,7 @@ bool RiaApplication::generateCode( const QString& fileName, QString* errMsg )
std::vector<std::shared_ptr<const caf::PdmObject>> commandObjects;
QStringList excludedClassNames{ "TestCommand1", "TC2" }; // See RifCommandCore-Text.cpp
QStringList excludedClassNames{"TestCommand1", "TC2"}; // See RifCommandCore-Text.cpp
auto allObjects = caf::PdmMarkdownBuilder::createAllObjects( caf::PdmDefaultObjectFactory::instance() );
for ( auto classObject : allObjects )

View File

@@ -369,6 +369,8 @@ RiaPreferences::RiaPreferences( void )
CAF_PDM_InitField( &m_openExportedPdfInViewer, "openExportedPdfInViewer", false, "Open Exported PDF in Viewer", "", "", "" );
m_openExportedPdfInViewer.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
CAF_PDM_InitField( &m_gtestFilter, "gtestFilter", QString(), "Unit Test Filter (gtest)", "", "", "" );
}
//--------------------------------------------------------------------------------------------------
@@ -566,6 +568,7 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
group->add( &m_showHud );
}
uiOrdering.add( &m_gtestFilter );
uiOrdering.add( &m_showProgressBar );
uiOrdering.add( &m_showProjectChangedDialog );
uiOrdering.add( &m_showTestToolbar );
@@ -833,6 +836,14 @@ bool RiaPreferences::show3dInformation() const
return RiaApplication::enableDevelopmentFeatures() && m_showHud();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaPreferences::gtestFilter() const
{
return m_gtestFilter();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -91,6 +91,7 @@ public:
QString holoLensExportFolder() const;
bool useShaders() const;
bool show3dInformation() const;
QString gtestFilter() const;
const QString& dateFormat() const;
const QString& timeFormat() const;
@@ -199,6 +200,7 @@ private:
caf::PdmField<bool> m_showSummaryTimeAsLongString;
caf::PdmField<bool> m_useMultipleThreadsWhenLoadingSummaryData;
caf::PdmField<bool> m_showProgressBar;
caf::PdmField<QString> m_gtestFilter;
caf::PdmField<PageSizeEnum> m_pageSize;
caf::PdmField<PageOrientationEnum> m_pageOrientation;