Skip to content

Commit 0611c2d

Browse files
fix compilation error on windows.
1 parent a018085 commit 0611c2d

10 files changed

+17
-17
lines changed

src/tactioncontext.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ void TActionContext::execute(THttpRequest &request)
9494
QStringList components = TUrlRoute::splitPath(path);
9595
TRouting route = TUrlRoute::instance().findRouting(method, components);
9696

97-
tSystemDebug("Routing: controller:{} action:{}", (char*)route.controller.data(),
98-
(char*)route.action.data());
97+
tSystemDebug("Routing: controller:{} action:{}", (const char*)route.controller.data(),
98+
(const char*)route.action.data());
9999

100100
if (!route.exists) {
101101
// Default URL routing
@@ -112,7 +112,7 @@ void TActionContext::execute(THttpRequest &request)
112112
route.setRouting(c + QByteArrayLiteral("controller"), action, components.mid(2));
113113
}
114114
}
115-
tSystemDebug("Active Controller : {}", route.controller.data());
115+
tSystemDebug("Active Controller : {}", (const char*)route.controller.data());
116116
}
117117
}
118118

@@ -152,7 +152,7 @@ void TActionContext::execute(THttpRequest &request)
152152
TSessionManager::instance().remove(_currController->session().sessionId); // Removes the old session
153153
// Re-generate session ID
154154
_currController->session().sessionId = TSessionManager::instance().generateId();
155-
tSystemDebug("Re-generate session ID: {}", _currController->session().sessionId.data());
155+
tSystemDebug("Re-generate session ID: {}", (const char*)_currController->session().sessionId.data());
156156
}
157157

158158
if (EnableCsrfProtectionModuleFlag && _currController->csrfProtectionEnabled()) {

src/tactioncontroller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ bool TActionController::verifyRequest(const THttpRequest &request) const
264264
throw SecurityException("Authenticity token is empty", __FILE__, __LINE__);
265265
}
266266

267-
tSystemDebug("postAuthToken: {}", (char*)postAuthToken.data());
267+
tSystemDebug("postAuthToken: {}", (const char*)postAuthToken.data());
268268
return Tf::strcmp(postAuthToken, authenticityToken());
269269
}
270270

src/tactionmailer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ bool TActionMailer::deliver(const QString &templateName)
8282
mailer->setAuthenticationEnabled(Tf::appSettings()->value(Tf::ActionMailerSmtpAuthentication).toBool());
8383
mailer->setUserName(Tf::appSettings()->value(Tf::ActionMailerSmtpUserName).toByteArray());
8484
mailer->setPassword(Tf::appSettings()->value(Tf::ActionMailerSmtpPassword).toByteArray());
85-
tSystemDebug("{}", mail.toByteArray().data());
85+
tSystemDebug("{}", (const char*)mail.toByteArray().data());
8686

8787
// POP before SMTP
8888
if (Tf::appSettings()->value(Tf::ActionMailerSmtpEnablePopBeforeSmtp).toBool()) {

src/tactionthread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void TActionThread::run()
122122
QByteArray connectionHeader = requests[0].header().rawHeader(QByteArrayLiteral("Connection")).toLower();
123123
if (Q_UNLIKELY(connectionHeader.contains("upgrade"))) {
124124
QByteArray upgradeHeader = requests[0].header().rawHeader(QByteArrayLiteral("Upgrade")).toLower();
125-
tSystemDebug("Upgrade: {}", (char*)upgradeHeader.data());
125+
tSystemDebug("Upgrade: {}", (const char*)upgradeHeader.data());
126126
if (upgradeHeader == "websocket") {
127127
// Switch to WebSocket
128128
if (!handshakeForWebSocket(requests[0].header())) {

src/thttputility.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ QByteArray THttpUtility::timeZone()
402402
tz += (offset > 0) ? '+' : '-';
403403
offset = qAbs(offset);
404404
tz += QString("%1%2").arg(offset / 60, 2, 10, QLatin1Char('0')).arg(offset % 60, 2, 10, QLatin1Char('0')).toLatin1();
405-
tSystemDebug("tz: {}", (char*)tz.data());
405+
tSystemDebug("tz: {}", (const char*)tz.data());
406406
return tz;
407407
}
408408

src/tpopmailer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ bool TPopMailer::connectToHost()
8282
int j = response.indexOf('>');
8383
if (i >= 0 && j > i) {
8484
apopToken = response.mid(i, j - i + 1);
85-
tSystemDebug("APOP token: {}", (char*)apopToken.data());
85+
tSystemDebug("APOP token: {}", (const char*)apopToken.data());
8686
}
8787

8888
if (_apopEnabled) {
@@ -194,7 +194,7 @@ bool TPopMailer::write(const QByteArray &command)
194194

195195
int len = _socket->write(cmd);
196196
_socket->flush();
197-
tSystemDebug("C: {}", cmd.trimmed().data());
197+
tSystemDebug("C: {}", (const char*)cmd.trimmed().data());
198198
return (len == cmd.length());
199199
}
200200

@@ -209,7 +209,7 @@ bool TPopMailer::readResponse(QByteArray *reply)
209209

210210
if (_socket->waitForReadyRead(5000)) {
211211
QByteArray rcv = _socket->readLine();
212-
tSystemDebug("S: {}", rcv.data());
212+
tSystemDebug("S: {}", (const char*)rcv.data());
213213

214214
if (rcv.startsWith("+OK")) {
215215
ret = true;

src/tsessionmemcachedstore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool TSessionMemcachedStore::store(TSession &session)
4040
#endif
4141

4242
TMemcached memcached;
43-
tSystemDebug("TSessionMemcachedStore::store id:{}", session.id().data());
43+
tSystemDebug("TSessionMemcachedStore::store id:{}", (const char*)session.id().data());
4444
return memcached.set('_' + session.id(), data, lifeTimeSecs());
4545
}
4646

src/tsessionredisstore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool TSessionRedisStore::store(TSession &session)
4040
#endif
4141

4242
TRedis redis;
43-
tSystemDebug("TSessionRedisStore::store id:{}", (char*)session.id().data());
43+
tSystemDebug("TSessionRedisStore::store id:{}", (const char*)session.id().data());
4444
return redis.setEx('_' + session.id(), data, lifeTimeSecs());
4545
}
4646

src/tsmtpmailer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ bool TSmtpMailer::write(const QByteArray &command)
408408

409409
int len = _socket->write(cmd);
410410
_socket->flush();
411-
tSystemDebug("C: {}", (char*)cmd.trimmed().data());
411+
tSystemDebug("C: {}", (const char*)cmd.trimmed().data());
412412
return (len == cmd.length());
413413
}
414414

@@ -430,7 +430,7 @@ int TSmtpMailer::read(QByteArrayList *reply)
430430
break;
431431
}
432432
}
433-
tSystemDebug("S: {}", (char*)rcv.data());
433+
tSystemDebug("S: {}", (const char*)rcv.data());
434434

435435
if (code == 0)
436436
code = rcv.left(3).toInt();

src/turlroute.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ bool TUrlRoute::addRouteFromString(const QString &line)
128128

129129
_routes << rt;
130130
tSystemDebug("route: method:{} path:{} ctrl:{} action:{} params:{}",
131-
rt.method, qUtf8Printable(QLatin1String("/") + rt.componentList.join("/")), (char*)rt.controller.data(),
132-
(char*)rt.action.data(), rt.hasVariableParams);
131+
rt.method, qUtf8Printable(QLatin1String("/") + rt.componentList.join("/")), (const char*)rt.controller.data(),
132+
(const char*)rt.action.data(), rt.hasVariableParams);
133133
return true;
134134
}
135135

0 commit comments

Comments
 (0)