Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ExcelViewer/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

using namespace QXlsx;

// Hard-coded QXlsx version string (based on the library you are using)
// static const char *QXLSX_VERSION = "1.5.0";

MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
Expand Down
10 changes: 9 additions & 1 deletion QXlsx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 3.16)

project(QXlsx
VERSION 1.5.0
VERSION 1.5.1
LANGUAGES CXX
)

Expand Down Expand Up @@ -158,6 +158,14 @@ target_compile_definitions(QXlsx PRIVATE
QT_DISABLE_DEPRECATED_BEFORE=0x060600
)


if(MSVC)
# SHELL: forces CMake to place /permissive at the very end of the argument list,
# overriding any automatically appended /permissive- flags.
target_compile_options(QXlsx PRIVATE "SHELL:/permissive")
endif()


if (NOT WIN32)
# Strict iterators can't be used on Windows, they lead to a link error
# when application code iterates over a QVector<QPoint> for instance, unless
Expand Down
13 changes: 11 additions & 2 deletions QXlsx/QXlsx.pri
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
QT += core
QT += gui-private

# TODO: Define your C++ version. c++14, c++17, etc.
CONFIG += c++11
# Define your C++ version.
# Safe method using built-in variables without brackets
lessThan(QT_MAJOR_VERSION, 6) {
# Set C++11 for Qt 5 (5.7 or higher version)
CONFIG += c++11
message("Qt 5 detected: Setting C++ standard to C++11")
} else {
# Set C++17 for Qt 6
CONFIG += c++17
message("Qt 6 detected: Setting C++ standard to C++17")
}

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
Expand Down
6 changes: 0 additions & 6 deletions QXlsx/QXlsx.pro
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,4 @@ QXLSX_HEADERPATH=$$PWD/header/
QXLSX_SOURCEPATH=$$PWD/source/
include($$PWD/QXlsx.pri)

HEADERS += \
header/xlsxreadsax.h

SOURCES += \
source/xlsxreadsax.cpp


13 changes: 13 additions & 0 deletions QXlsx/header/xlsxglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@
#ifndef XLSXGLOBAL_H
#define XLSXGLOBAL_H

#if defined(_MSC_VER)
# ifndef stdext
# define stdext ::std
# endif
# include <iterator>
namespace std {

Check failure on line 11 in QXlsx/header/xlsxglobal.h

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Choose a different namespace for this declaration.

See more on https://sonarcloud.io/project/issues?id=QtExcel_QXlsx&issues=AZ7R24Qj8k0XjExFYAry&open=AZ7R24Qj8k0XjExFYAry&pullRequest=459
template<class _Iter>
inline _Iter make_checked_array_iterator(_Iter _Array, size_t _Size, size_t _Start = 0) {

Check warning on line 13 in QXlsx/header/xlsxglobal.h

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the unused parameter "_Size", make it unnamed, or declare it "[[maybe_unused]]".

See more on https://sonarcloud.io/project/issues?id=QtExcel_QXlsx&issues=AZ7R24Qj8k0XjExFYArz&open=AZ7R24Qj8k0XjExFYArz&pullRequest=459
return _Array + _Start;
}
}
#endif

#include <cstdio>

Check warning on line 19 in QXlsx/header/xlsxglobal.h

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move these 9 #include directives to the top of the file.

See more on https://sonarcloud.io/project/issues?id=QtExcel_QXlsx&issues=AZ7R24Qi8k0XjExFYArx&open=AZ7R24Qi8k0XjExFYArx&pullRequest=459
#include <iostream>
#include <string>

Expand Down
Loading