1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-16 04:42:53 +08:00

update webserver example for qt6

This commit is contained in:
Jay Two 2021-03-13 19:25:05 +09:00
parent ee99dd959c
commit e67147ea36
6 changed files with 12 additions and 18 deletions

View File

@ -3,10 +3,6 @@
TARGET = WebServer
TEMPLATE = app
equals( QT_MAJOR_VERSION, 6 ) {
QT += core5compat
}
QT += core
QT += network
QT -= gui

View File

@ -5,10 +5,6 @@
#include <QVariant>
#include <QHash>
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
#include <QtCore5Compat>
#endif
#include "request.hpp"
#include "response.hpp"

View File

@ -7,10 +7,6 @@
#include <QVector>
#include <QList>
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
#include <QtCore5Compat>
#endif
#include "recurse.hpp"
#include "xlsxdocument.h"

View File

@ -18,7 +18,8 @@
#include <QVector>
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
#include <QtCore5Compat>
#include <QRegularExpression>
#include <QRegularExpressionMatch>
#endif
#include <functional>
@ -439,10 +440,19 @@ namespace Recurse
{
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
QRegularExpression debug_strings("(recurse|development)");
QRegularExpressionMatch rem = debug_strings.match(env.value("DEBUG"));
if ( rem.hasMatch() )
m_debug = true;
#else
QRegExp debug_strings("(recurse|development)");
if (debug_strings.indexIn(env.value("DEBUG")) != -1)
m_debug = true;
#endif
}
inline Application::Application(int &argc, char **argv, QObject *parent)

View File

@ -8,7 +8,7 @@
#include <QUrlQuery>
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
#include <QtCore5Compat>
#include <QRegularExpression>
#endif
class Request

View File

@ -5,10 +5,6 @@
#include <QHash>
#include <QJsonDocument>
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
#include <QtCore5Compat>
#endif
#include <functional>
class Response