1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-17 19:37:09 +02:00

Build with QT_STRICT_ITERATORS

This commit is contained in:
Dominik Schmidt
2012-11-15 13:05:21 +01:00
parent 04f56cfd83
commit 430e733c0d
2 changed files with 6 additions and 4 deletions

View File

@@ -19,6 +19,8 @@ SET( TOMAHAWK_VERSION_PATCH 99 )
# enforce proper symbol exporting on all platforms # enforce proper symbol exporting on all platforms
add_definitions( "-fvisibility=hidden" ) add_definitions( "-fvisibility=hidden" )
# enforce using constBegin, constEnd for const-iterators
add_definitions( "-DQT_STRICT_ITERATORS" )
# build options # build options
option(BUILD_GUI "Build Tomahawk with GUI" ON) option(BUILD_GUI "Build Tomahawk with GUI" ON)

View File

@@ -212,8 +212,8 @@ void QxtWebCgiService::pageRequestedEvent(QxtWebRequestEvent* event)
env["QUERY_STRING"] = event->url.encodedQuery(); env["QUERY_STRING"] = event->url.encodedQuery();
// Populate HTTP header environment variables // Populate HTTP header environment variables
QMultiHash<QString, QString>::const_iterator iter = event->headers.begin(); QMultiHash<QString, QString>::const_iterator iter = event->headers.constBegin();
while (iter != event->headers.end()) while (iter != event->headers.constEnd())
{ {
QString key = "HTTP_" + iter.key().toUpper().replace('-', '_'); QString key = "HTTP_" + iter.key().toUpper().replace('-', '_');
if (key != "HTTP_CONTENT_TYPE" && key != "HTTP_CONTENT_LENGTH") if (key != "HTTP_CONTENT_TYPE" && key != "HTTP_CONTENT_LENGTH")
@@ -222,9 +222,9 @@ void QxtWebCgiService::pageRequestedEvent(QxtWebRequestEvent* event)
} }
// Populate HTTP_COOKIE parameter // Populate HTTP_COOKIE parameter
iter = event->cookies.begin(); iter = event->cookies.constBegin();
QString cookies; QString cookies;
while (iter != event->cookies.end()) while (iter != event->cookies.constEnd())
{ {
if (!cookies.isEmpty()) if (!cookies.isEmpty())
cookies += "; "; cookies += "; ";