mirror of
https://github.com/QtExcel/QXlsx.git
synced 2025-01-30 05:02:52 +08:00
update webserver example for qt6
This commit is contained in:
parent
ee99dd959c
commit
e67147ea36
@ -3,10 +3,6 @@
|
|||||||
TARGET = WebServer
|
TARGET = WebServer
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
equals( QT_MAJOR_VERSION, 6 ) {
|
|
||||||
QT += core5compat
|
|
||||||
}
|
|
||||||
|
|
||||||
QT += core
|
QT += core
|
||||||
QT += network
|
QT += network
|
||||||
QT -= gui
|
QT -= gui
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
|
||||||
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
|
|
||||||
#include <QtCore5Compat>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "request.hpp"
|
#include "request.hpp"
|
||||||
#include "response.hpp"
|
#include "response.hpp"
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|
||||||
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
|
|
||||||
#include <QtCore5Compat>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "recurse.hpp"
|
#include "recurse.hpp"
|
||||||
|
|
||||||
#include "xlsxdocument.h"
|
#include "xlsxdocument.h"
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
|
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
|
||||||
#include <QtCore5Compat>
|
#include <QRegularExpression>
|
||||||
|
#include <QRegularExpressionMatch>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@ -439,10 +440,19 @@ namespace Recurse
|
|||||||
{
|
{
|
||||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
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)");
|
QRegExp debug_strings("(recurse|development)");
|
||||||
|
|
||||||
if (debug_strings.indexIn(env.value("DEBUG")) != -1)
|
if (debug_strings.indexIn(env.value("DEBUG")) != -1)
|
||||||
m_debug = true;
|
m_debug = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Application::Application(int &argc, char **argv, QObject *parent)
|
inline Application::Application(int &argc, char **argv, QObject *parent)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
|
|
||||||
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
|
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
|
||||||
#include <QtCore5Compat>
|
#include <QRegularExpression>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class Request
|
class Request
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
|
|
||||||
#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version
|
|
||||||
#include <QtCore5Compat>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
class Response
|
class Response
|
||||||
|
Loading…
x
Reference in New Issue
Block a user