Define QT_USE_QSTRINGBUILDER.

The old defines are deprecated.
QT_USE_QSTRINGBUILDER also supports QByteArray which we use extensively
in WebUI.
This commit is contained in:
Chocobo1 2017-08-28 13:02:46 +08:00
parent 698bd431e6
commit 551ffb88ab
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
4 changed files with 11 additions and 11 deletions

View file

@ -40,8 +40,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# defines
add_definitions(-DQT_NO_CAST_TO_ASCII)
# Fast concatenation (Qt >= 4.6)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
# Efficient construction for QString & QByteArray (Qt >= 4.8)
add_definitions(-DQT_USE_QSTRINGBUILDER)
if (WIN32)
add_definitions(-DNOMINMAX)
endif (WIN32)

View file

@ -194,7 +194,7 @@ void Smtp::readyRead()
ehlo();
}
else {
logError("Connection failed, unrecognized reply: " + line);
logError(QLatin1String("Connection failed, unrecognized reply: ") + line);
m_state = Close;
}
break;
@ -231,7 +231,7 @@ void Smtp::readyRead()
}
else {
// Authentication failed!
logError("Authentication failed, msg: " + line);
logError(QLatin1String("Authentication failed, msg: ") + line);
m_state = Close;
}
break;
@ -242,7 +242,7 @@ void Smtp::readyRead()
m_state = Data;
}
else {
logError("<mail from> was rejected by server, msg: " + line);
logError(QLatin1String("<mail from> was rejected by server, msg: ") + line);
m_state = Close;
}
break;
@ -253,7 +253,7 @@ void Smtp::readyRead()
m_state = Body;
}
else {
logError("<Rcpt to> was rejected by server, msg: " + line);
logError(QLatin1String("<Rcpt to> was rejected by server, msg: ") + line);
m_state = Close;
}
break;
@ -264,7 +264,7 @@ void Smtp::readyRead()
m_state = Quit;
}
else {
logError("<data> was rejected by server, msg: " + line);
logError(QLatin1String("<data> was rejected by server, msg: ") + line);
m_state = Close;
}
break;
@ -276,7 +276,7 @@ void Smtp::readyRead()
m_state = Close;
}
else {
logError("Message was rejected by the server, error: " + line);
logError(QLatin1String("Message was rejected by the server, error: ") + line);
m_state = Close;
}
break;

View file

@ -105,7 +105,7 @@ void TrackersAdditionDlg::parseUTorrentList(const QString &, const QString &path
m_ui->trackers_list->insertPlainText("\n");
int nb = 0;
while (!list_file.atEnd()) {
const QByteArray line = list_file.readLine().trimmed();
const QString line = list_file.readLine().trimmed();
if (line.isEmpty()) continue;
BitTorrent::TrackerEntry newTracker(line);
if (!existingTrackers.contains(newTracker)) {

View file

@ -57,8 +57,8 @@ CONFIG(release, debug|release) {
include(../version.pri)
DEFINES += QT_NO_CAST_TO_ASCII
# Fast concatenation (Qt >= 4.6)
DEFINES += QT_USE_FAST_CONCATENATION QT_USE_FAST_OPERATOR_PLUS
# Efficient construction for QString & QByteArray (Qt >= 4.8)
DEFINES += QT_USE_QSTRINGBUILDER
win32: DEFINES += NOMINMAX