Skip to content

Commit

Permalink
Update WebServer example for 9ab612f
Browse files Browse the repository at this point in the history
  • Loading branch information
j2doll committed Jan 4, 2023
1 parent 52e8345 commit c9fd393
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions WebServer/WebServer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ CONFIG += console
CONFIG -= app_bundle

# C++14 or higher version is required.
CONFIG += c++14
QMAKE_CXXFLAGS += -std=c++14
# CONFIG += c++14
# QMAKE_CXXFLAGS += -std=c++14
# C++17 or higher version is required.
CONFIG += c++17
QMAKE_CXXFLAGS += -std=c++17

macx {
QMAKE_CXXFLAGS += -stdlib=libc++
Expand Down
10 changes: 8 additions & 2 deletions WebServer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,16 @@ bool loadXlsx(QString fileName, QString& strHtml)
int row = cl.row - 1;
int col = cl.col - 1;

QSharedPointer<Cell> ptrCell = cl.cell; // cell pointer
// Update ShowConsole example for 9ab612f
// {{
// QSharedPointer<Cell> ptrCell = cl.cell; // cell pointer
std::shared_ptr<Cell> ptrCell = cl.cell; // cell pointer

// value of cell
QVariant var = cl.cell.data()->value();
// QVariant var = cl.cell.data()->value();
QVariant var = ptrCell->value();
// }}

QString str = var.toString();

cellValues[row][col] = str;
Expand Down

0 comments on commit c9fd393

Please sign in to comment.