Skip to content

Commit

Permalink
fix build on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
shun2wang committed Sep 6, 2024
1 parent 00fec77 commit 334410c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Desktop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ target_link_libraries(
OpenSSL::Crypto
# FreeXL
${LIBFREEXL_LIBRARIES}
freexl::freexl
$<$<NOT:$<BOOL:${LINUX_LOCAL_BUILD}>>:freexl::freexl>
# ReadStat -----------------------------------
${LIBREADSTAT_LIBRARIES}
# MinGW's ReadStat
Expand Down
3 changes: 2 additions & 1 deletion Desktop/data/importers/excel/excel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Excel::Excel(const string &locator)

void Excel::open()
{
_fileSize = QFileInfo::size(_path);
QFileInfo fi(tq(_path));
_fileSize = fi.size();

if (_fileSize < 0)
throw runtime_error("Could not access file");
Expand Down
5 changes: 3 additions & 2 deletions Desktop/data/importers/excelimporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "excelimporter.h"
#include "data/importers/excel/excel.h"
#include "data/importers/excel/excelimportcolumn.h"
#include <columnutils.h>
#include <string>
#include <QFileInfo>
#include <QDebug>
Expand All @@ -37,7 +38,7 @@ ImportDataSet* ExcelImporter::loadFile(const std::string &locator, std::function
uint32_t row;
uint16_t col;

vector<ExcelImportColumn *> importColumns;
std::vector<ExcelImportColumn *> importColumns;

Excel excel(locator);
excel.open();
Expand Down Expand Up @@ -73,7 +74,7 @@ ImportDataSet* ExcelImporter::loadFile(const std::string &locator, std::function

for (int i = 0; i < colNames.size(); ++i)
{
string colName = colNames[i];
std::string colName = colNames[i];
if (colName.empty())
colName = "V" + std::to_string(i + 1);
else if(ColumnUtils::isIntValue(colName))
Expand Down

0 comments on commit 334410c

Please sign in to comment.