mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
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:
parent
698bd431e6
commit
551ffb88ab
@ -40,8 +40,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|||||||
|
|
||||||
# defines
|
# defines
|
||||||
add_definitions(-DQT_NO_CAST_TO_ASCII)
|
add_definitions(-DQT_NO_CAST_TO_ASCII)
|
||||||
# Fast concatenation (Qt >= 4.6)
|
# Efficient construction for QString & QByteArray (Qt >= 4.8)
|
||||||
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
|
add_definitions(-DQT_USE_QSTRINGBUILDER)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_definitions(-DNOMINMAX)
|
add_definitions(-DNOMINMAX)
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
@ -194,7 +194,7 @@ void Smtp::readyRead()
|
|||||||
ehlo();
|
ehlo();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logError("Connection failed, unrecognized reply: " + line);
|
logError(QLatin1String("Connection failed, unrecognized reply: ") + line);
|
||||||
m_state = Close;
|
m_state = Close;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -231,7 +231,7 @@ void Smtp::readyRead()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Authentication failed!
|
// Authentication failed!
|
||||||
logError("Authentication failed, msg: " + line);
|
logError(QLatin1String("Authentication failed, msg: ") + line);
|
||||||
m_state = Close;
|
m_state = Close;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -242,7 +242,7 @@ void Smtp::readyRead()
|
|||||||
m_state = Data;
|
m_state = Data;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logError("<mail from> was rejected by server, msg: " + line);
|
logError(QLatin1String("<mail from> was rejected by server, msg: ") + line);
|
||||||
m_state = Close;
|
m_state = Close;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -253,7 +253,7 @@ void Smtp::readyRead()
|
|||||||
m_state = Body;
|
m_state = Body;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logError("<Rcpt to> was rejected by server, msg: " + line);
|
logError(QLatin1String("<Rcpt to> was rejected by server, msg: ") + line);
|
||||||
m_state = Close;
|
m_state = Close;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -264,7 +264,7 @@ void Smtp::readyRead()
|
|||||||
m_state = Quit;
|
m_state = Quit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logError("<data> was rejected by server, msg: " + line);
|
logError(QLatin1String("<data> was rejected by server, msg: ") + line);
|
||||||
m_state = Close;
|
m_state = Close;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -276,7 +276,7 @@ void Smtp::readyRead()
|
|||||||
m_state = Close;
|
m_state = Close;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logError("Message was rejected by the server, error: " + line);
|
logError(QLatin1String("Message was rejected by the server, error: ") + line);
|
||||||
m_state = Close;
|
m_state = Close;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -105,7 +105,7 @@ void TrackersAdditionDlg::parseUTorrentList(const QString &, const QString &path
|
|||||||
m_ui->trackers_list->insertPlainText("\n");
|
m_ui->trackers_list->insertPlainText("\n");
|
||||||
int nb = 0;
|
int nb = 0;
|
||||||
while (!list_file.atEnd()) {
|
while (!list_file.atEnd()) {
|
||||||
const QByteArray line = list_file.readLine().trimmed();
|
const QString line = list_file.readLine().trimmed();
|
||||||
if (line.isEmpty()) continue;
|
if (line.isEmpty()) continue;
|
||||||
BitTorrent::TrackerEntry newTracker(line);
|
BitTorrent::TrackerEntry newTracker(line);
|
||||||
if (!existingTrackers.contains(newTracker)) {
|
if (!existingTrackers.contains(newTracker)) {
|
||||||
|
@ -57,8 +57,8 @@ CONFIG(release, debug|release) {
|
|||||||
include(../version.pri)
|
include(../version.pri)
|
||||||
|
|
||||||
DEFINES += QT_NO_CAST_TO_ASCII
|
DEFINES += QT_NO_CAST_TO_ASCII
|
||||||
# Fast concatenation (Qt >= 4.6)
|
# Efficient construction for QString & QByteArray (Qt >= 4.8)
|
||||||
DEFINES += QT_USE_FAST_CONCATENATION QT_USE_FAST_OPERATOR_PLUS
|
DEFINES += QT_USE_QSTRINGBUILDER
|
||||||
|
|
||||||
win32: DEFINES += NOMINMAX
|
win32: DEFINES += NOMINMAX
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user