Fix warnings in manual tests.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Thu, 12 Apr 2012 11:59:03 +0000 (13:59 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 13 Apr 2012 16:15:26 +0000 (18:15 +0200)
- Constructor order.
- Unused variables.
- size_t -> int conversions.

Change-Id: Ic5b016f41d01a4d8153ae0900b607bf946523c1d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
tests/manual/network_stresstest/minihttpserver.cpp
tests/manual/network_stresstest/tst_network_stresstest.cpp
tests/manual/qgraphicsitemgroup/customitem.cpp
tests/manual/qgraphicslayout/flicker/window.h
tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp
tests/manual/qtabletevent/device_information/tabletwidget.cpp

index e3473a3..1bafe93 100644 (file)
@@ -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?
index 38a516a..74237ea 100644 (file)
@@ -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) {
index 6f3f1e0..eab218e 100644 (file)
@@ -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.);
index 3b032c3..51bf0e0 100644 (file)
@@ -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;
index e3ba3ca..5eab6d4 100644 (file)
@@ -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()) {
index d12da6c..bc0c63b 100644 (file)
@@ -94,7 +94,7 @@ bool TabletWidget::eventFilter(QObject *, QEvent *ev)
     return false;
 }
 
-void TabletWidget::paintEvent(QPaintEvent *event)
+void TabletWidget::paintEvent(QPaintEvent *)
 {
     QPainter painter(this);