1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Fix compilation with -DQT_NO_CAST_TO_ASCII

This commit is contained in:
David Faure 2017-09-11 10:05:02 +02:00
parent 76457af130
commit eecaf2e9d6
3 changed files with 4 additions and 5 deletions

View File

@ -29,7 +29,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
add_definitions(-DFALKON_VERSION=\"${PROJECT_VERSION}\") add_definitions(-DFALKON_VERSION=\"${PROJECT_VERSION}\")
# Defines that are always set # Defines that are always set
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER) add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_TO_ASCII)
# Configurable options (TODO: move all defines to a generated header) # Configurable options (TODO: move all defines to a generated header)
option(NO_SYSTEM_DATAPATH "TODO" OFF) option(NO_SYSTEM_DATAPATH "TODO" OFF)
@ -132,7 +132,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/lib/plugins ${CMAKE_SOURCE_DIR}/src/lib/plugins
${CMAKE_SOURCE_DIR}/src/lib/popupwindow ${CMAKE_SOURCE_DIR}/src/lib/popupwindow
${CMAKE_SOURCE_DIR}/src/lib/preferences ${CMAKE_SOURCE_DIR}/src/lib/preferences
${CMAKE_SOURCE_DIR}/src/lib/rss
${CMAKE_SOURCE_DIR}/src/lib/session ${CMAKE_SOURCE_DIR}/src/lib/session
${CMAKE_SOURCE_DIR}/src/lib/sidebar ${CMAKE_SOURCE_DIR}/src/lib/sidebar
${CMAKE_SOURCE_DIR}/src/lib/tabwidget ${CMAKE_SOURCE_DIR}/src/lib/tabwidget

View File

@ -136,7 +136,7 @@ LoadRequest SearchEnginesManager::searchResult(const Engine &engine, const QStri
// GET search engine // GET search engine
if (engine.postData.isEmpty()) { if (engine.postData.isEmpty()) {
QByteArray url = engine.url.toUtf8(); QByteArray url = engine.url.toUtf8();
url.replace(QLatin1String("%s"), QUrl::toPercentEncoding(string)); url.replace("%s", QUrl::toPercentEncoding(string));
return LoadRequest(QUrl::fromEncoded(url)); return LoadRequest(QUrl::fromEncoded(url));
} }

View File

@ -60,7 +60,7 @@ QByteArray AcceptLanguage::generateHeader(const QStringList &langs)
} }
QByteArray header; QByteArray header;
header.append(langs.at(0)); header.append(langs.at(0).toLatin1());
int counter = 8; int counter = 8;
for (int i = 1; i < langs.count(); i++) { for (int i = 1; i < langs.count(); i++) {
@ -70,7 +70,7 @@ QByteArray AcceptLanguage::generateHeader(const QStringList &langs)
counter -= 2; counter -= 2;
} }
header.append(s); header.append(s.toLatin1());
} }
return header; return header;