Skip to content

Commit

Permalink
Refactor getColumnTypes method to improve logic for sheet availabilit…
Browse files Browse the repository at this point in the history
…y and initialization.
  • Loading branch information
przemek83 committed Jan 2, 2025
1 parent 7225a43 commit da5ee19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ImportOds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ std::pair<bool, QVector<ColumnType>> ImportOds::getColumnTypes(
it != columnTypes_.constEnd())
return {true, *it};

if (!isSheetAvailable(sheetName) || !initializeColumnTypes(sheetName))
return {false, {}};
if (isSheetAvailable(sheetName) && initializeColumnTypes(sheetName))
return {true, columnTypes_.value(sheetName)};

return {true, columnTypes_.value(sheetName)};
return {false, {}};
}

std::pair<bool, QStringList> ImportOds::getColumnNames(const QString& sheetName)
Expand Down

0 comments on commit da5ee19

Please sign in to comment.