summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-04-12 13:59:03 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-13 18:15:26 +0200
commitcdc221ae00260c1bea196e2728eb20b83db19bbe (patch)
treed4ae554197b917539397deb381be1b5b21d569fc /tests/manual
parent76f536d661d4765ef12e146fae1527dcd0508137 (diff)
Fix warnings in manual tests.
- Constructor order. - Unused variables. - size_t -> int conversions. Change-Id: Ic5b016f41d01a4d8153ae0900b607bf946523c1d Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/network_stresstest/minihttpserver.cpp2
-rw-r--r--tests/manual/network_stresstest/tst_network_stresstest.cpp2
-rw-r--r--tests/manual/qgraphicsitemgroup/customitem.cpp2
-rw-r--r--tests/manual/qgraphicslayout/flicker/window.h4
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp6
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.cpp2
6 files changed, 9 insertions, 9 deletions
diff --git a/tests/manual/network_stresstest/minihttpserver.cpp b/tests/manual/network_stresstest/minihttpserver.cpp
index e3473a3141..1bafe9363d 100644
--- a/tests/manual/network_stresstest/minihttpserver.cpp
+++ b/tests/manual/network_stresstest/minihttpserver.cpp
@@ -148,7 +148,7 @@ void MiniHttpServerConnection::handlePendingRequest()
return;
}
- QUrl uri = QUrl::fromEncoded(request.mid(4, eol - strlen(http11) - 4));
+ QUrl uri = QUrl::fromEncoded(request.mid(4, eol - int(strlen(http11)) - 4));
source.setFileName(":" + uri.path());
// connection-close?
diff --git a/tests/manual/network_stresstest/tst_network_stresstest.cpp b/tests/manual/network_stresstest/tst_network_stresstest.cpp
index 38a516af82..74237ea9cc 100644
--- a/tests/manual/network_stresstest/tst_network_stresstest.cpp
+++ b/tests/manual/network_stresstest/tst_network_stresstest.cpp
@@ -537,7 +537,7 @@ void tst_NetworkStressTest::blockingMultipleRequests()
qWarning() << "no content-length:" << QString(buffer);
break;
}
- pos += strlen("\r\ncontent-length: ");
+ pos += int(strlen("\r\ncontent-length: "));
int eol = buffer.indexOf("\r\n", pos + 2);
if (eol == -1) {
diff --git a/tests/manual/qgraphicsitemgroup/customitem.cpp b/tests/manual/qgraphicsitemgroup/customitem.cpp
index 6f3f1e0522..eab218e9a0 100644
--- a/tests/manual/qgraphicsitemgroup/customitem.cpp
+++ b/tests/manual/qgraphicsitemgroup/customitem.cpp
@@ -80,7 +80,7 @@ CustomGroup::CustomGroup() :
setFlag(QGraphicsItem::ItemIsSelectable);
}
-void CustomGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void CustomGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
{
if (option->state & QStyle::State_Selected)
painter->setOpacity(1.);
diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h
index 3b032c3b45..51bf0e0733 100644
--- a/tests/manual/qgraphicslayout/flicker/window.h
+++ b/tests/manual/qgraphicslayout/flicker/window.h
@@ -46,8 +46,8 @@
#include <QtWidgets>
struct Statistics {
- Statistics() : output(0),
- setGeometryCount(0), currentBenchmarkIteration(0), relayoutClicked(false), sleepMsecs(0)
+ Statistics() : setGeometryCount(0), sleepMsecs(0), output(0),
+ currentBenchmarkIteration(0), relayoutClicked(false)
{
}
QMap<QGraphicsWidget*, int> setGeometryTracker;
diff --git a/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp b/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp
index e3ba3ca88f..5eab6d43bd 100644
--- a/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp
+++ b/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp
@@ -83,7 +83,7 @@ void DownloadManager::upload(const QUrl &url, const QString &user, const QString
connect(ul, SIGNAL(downloadFinished(TransferItem*)), SLOT(downloadFinished(TransferItem*)));
}
-void DownloadManager::finished(QNetworkReply *reply)
+void DownloadManager::finished(QNetworkReply *)
{
}
@@ -121,7 +121,7 @@ void DownloadManager::authenticationRequired(QNetworkReply *reply, QAuthenticato
qDebug() << "authenticationRequired" << reply;
TransferItem *transfer = findTransfer(reply);
//provide the credentials exactly once, so that it fails if credentials are incorrect.
- if (transfer && !transfer->user.isEmpty() || !transfer->password.isEmpty()) {
+ if ((transfer && !transfer->user.isEmpty()) || !transfer->password.isEmpty()) {
auth->setUser(transfer->user);
auth->setPassword(transfer->password);
transfer->user.clear();
@@ -129,7 +129,7 @@ void DownloadManager::authenticationRequired(QNetworkReply *reply, QAuthenticato
}
}
-void DownloadManager::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth)
+void DownloadManager::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth)
{
//provide the credentials exactly once, so that it fails if credentials are incorrect.
if (!proxyUser.isEmpty() || !proxyPassword.isEmpty()) {
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
index d12da6c886..bc0c63bbb1 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
@@ -94,7 +94,7 @@ bool TabletWidget::eventFilter(QObject *, QEvent *ev)
return false;
}
-void TabletWidget::paintEvent(QPaintEvent *event)
+void TabletWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);