Fix warnings in manual tests.

- Constructor order.
- Unused variables.
- size_t -> int conversions.

Change-Id: Ic5b016f41d01a4d8153ae0900b607bf946523c1d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
Friedemann Kleint 2012-04-12 13:59:03 +02:00 committed by Qt by Nokia
parent 76f536d661
commit cdc221ae00
6 changed files with 9 additions and 9 deletions

View File

@ -148,7 +148,7 @@ void MiniHttpServerConnection::handlePendingRequest()
return; 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()); source.setFileName(":" + uri.path());
// connection-close? // connection-close?

View File

@ -537,7 +537,7 @@ void tst_NetworkStressTest::blockingMultipleRequests()
qWarning() << "no content-length:" << QString(buffer); qWarning() << "no content-length:" << QString(buffer);
break; break;
} }
pos += strlen("\r\ncontent-length: "); pos += int(strlen("\r\ncontent-length: "));
int eol = buffer.indexOf("\r\n", pos + 2); int eol = buffer.indexOf("\r\n", pos + 2);
if (eol == -1) { if (eol == -1) {

View File

@ -80,7 +80,7 @@ CustomGroup::CustomGroup() :
setFlag(QGraphicsItem::ItemIsSelectable); 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) if (option->state & QStyle::State_Selected)
painter->setOpacity(1.); painter->setOpacity(1.);

View File

@ -46,8 +46,8 @@
#include <QtWidgets> #include <QtWidgets>
struct Statistics { struct Statistics {
Statistics() : output(0), Statistics() : setGeometryCount(0), sleepMsecs(0), output(0),
setGeometryCount(0), currentBenchmarkIteration(0), relayoutClicked(false), sleepMsecs(0) currentBenchmarkIteration(0), relayoutClicked(false)
{ {
} }
QMap<QGraphicsWidget*, int> setGeometryTracker; QMap<QGraphicsWidget*, int> setGeometryTracker;

View File

@ -83,7 +83,7 @@ void DownloadManager::upload(const QUrl &url, const QString &user, const QString
connect(ul, SIGNAL(downloadFinished(TransferItem*)), SLOT(downloadFinished(TransferItem*))); 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; qDebug() << "authenticationRequired" << reply;
TransferItem *transfer = findTransfer(reply); TransferItem *transfer = findTransfer(reply);
//provide the credentials exactly once, so that it fails if credentials are incorrect. //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->setUser(transfer->user);
auth->setPassword(transfer->password); auth->setPassword(transfer->password);
transfer->user.clear(); 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. //provide the credentials exactly once, so that it fails if credentials are incorrect.
if (!proxyUser.isEmpty() || !proxyPassword.isEmpty()) { if (!proxyUser.isEmpty() || !proxyPassword.isEmpty()) {

View File

@ -94,7 +94,7 @@ bool TabletWidget::eventFilter(QObject *, QEvent *ev)
return false; return false;
} }
void TabletWidget::paintEvent(QPaintEvent *event) void TabletWidget::paintEvent(QPaintEvent *)
{ {
QPainter painter(this); QPainter painter(this);