diff --git a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp index 9c189bf6f7..afe08a907b 100644 --- a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp +++ b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.cpp @@ -26,7 +26,6 @@ #include "RiuFileDialogTools.h" #include "RiuTools.h" -#include "opm/io/eclipse/EclUtil.hpp" #include #include @@ -269,15 +268,17 @@ RicRecursiveFileSearchDialogResult RicRecursiveFileSearchDialog::runRecursiveSea RiaStringListSerializer stringListSerializer( fileFilterRegistryKey ); stringListSerializer.addString( dialog.m_fileFilterField->currentText(), maxItemsInRegistry ); } + + return { .ok = dialog.result() == QDialog::Accepted, + .files = dialog.m_foundFiles, + .rootDir = dialog.rootDirWithEndSeparator(), + .pathFilter = dialog.pathFilterWithoutStartSeparator(), + .fileNameFilter = dialog.fileNameFilter(), + .fileType = dialog.fileType(), + .groupingMode = dialog.ensembleGroupingMode() }; } - return RicRecursiveFileSearchDialogResult( dialog.result() == QDialog::Accepted, - dialog.m_foundFiles, - dialog.rootDirWithEndSeparator(), - dialog.pathFilterWithoutStartSeparator(), - dialog.fileNameFilter(), - dialog.fileType(), - dialog.ensembleGroupingMode() ); + return {}; } //-------------------------------------------------------------------------------------------------- @@ -1298,7 +1299,6 @@ RiaDefines::FileType RicRecursiveFileSearchDialog::mapSummaryFileType( RicRecurs return RiaDefines::FileType::STIMPLAN_SUMMARY; default: { - CAF_ASSERT( false && "Unsupported file type" ); return RiaDefines::FileType::SMSPEC; } } diff --git a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.h b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.h index 7511bb364f..f9aac443e9 100644 --- a/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.h +++ b/ApplicationLibCode/Commands/RicRecursiveFileSearchDialog.h @@ -39,7 +39,7 @@ class QComboBox; class QCheckBox; class QTreeView; -class RicRecursiveFileSearchDialogResult; +struct RicRecursiveFileSearchDialogResult; //================================================================================================== /// @@ -180,26 +180,8 @@ private slots: //================================================================================================== /// //================================================================================================== -class RicRecursiveFileSearchDialogResult +struct RicRecursiveFileSearchDialogResult { -public: - RicRecursiveFileSearchDialogResult( bool ok, - const QStringList& files, - const QString& rootDir, - const QString& pathFilter, - const QString& fileNameFilter, - RicRecursiveFileSearchDialog::FileType fileType, - RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ) - : ok( ok ) - , files( files ) - , rootDir( rootDir ) - , pathFilter( pathFilter ) - , fileNameFilter( fileNameFilter ) - , fileType( fileType ) - , groupingMode( groupingMode ) - { - } - bool ok; QStringList files; QString rootDir;