mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-03 23:40:58 +00:00
update cpp qt5 server samples
This commit is contained in:
parent
74f39b442e
commit
98a28a075a
@ -46,7 +46,7 @@ protected:
|
|||||||
if (socket->bytesAvailable() >= socket->contentLength()) {
|
if (socket->bytesAvailable() >= socket->contentLength()) {
|
||||||
emit requestReceived(socket);
|
emit requestReceived(socket);
|
||||||
} else {
|
} else {
|
||||||
connect(socket, &Socket::readChannelFinished, [this, socket, m]() {
|
connect(socket, &QHttpEngine::Socket::readChannelFinished, [this, socket]() {
|
||||||
emit requestReceived(socket);
|
emit requestReceived(socket);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ private :
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline QRegularExpressionMatch getRequestMatch(QString serverTemplatePath, QString requestPath){
|
inline QRegularExpressionMatch getRequestMatch(QString serverTemplatePath, QString requestPath){
|
||||||
QRegularExpression parExpr( R"(\{([^\/\\s]+)\})" );
|
QRegularExpression parExpr( R"(\{([^\/\s]+)\})" );
|
||||||
serverTemplatePath.replace( parExpr, R"((?<\1>[^\/\s]+))" );
|
serverTemplatePath.replace( parExpr, R"((?<\1>[^\/\s]+))" );
|
||||||
serverTemplatePath.append("[\\/]?$");
|
serverTemplatePath.append("[\\/]?$");
|
||||||
QRegularExpression pathExpr( serverTemplatePath );
|
QRegularExpression pathExpr( serverTemplatePath );
|
||||||
@ -117,4 +117,4 @@ private :
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // OAI_APIROUTER_H
|
#endif // OAI_APIROUTER_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user