From 1b233eff36dd185d32a1e72a2ba0ef825b1f6ef7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 3 Jul 2013 13:52:02 +0200 Subject: Silence compiler warnings in browser example. settings.cpp(138) : warning C4189: 'jar' : local variable is initialized but not referenced settings.cpp(240) : warning C4189: 'jar' : local variable is initialized but not referenced searchlineedit.cpp: In member function 'virtual void ClearButton::paintEvent(QPaintEvent*)': searchlineedit.cpp:68:12: warning: variable 'color' set but not used [-Wunused-but-set-variable] networkaccessmanager.cpp: In member function 'void NetworkAccessManager::requestFinished(QNetworkReply*)': networkaccessmanager.cpp:115:12: warning: unused variable 'pctCached' [-Wunused-variable] networkaccessmanager.cpp:116:12: warning: unused variable 'pctPipelined' [-Wunused-variable] networkaccessmanager.cpp:117:12: warning: unused variable 'pctSecure' [-Wunused-variable] networkaccessmanager.cpp:118:12: warning: unused variable 'pctDownloadBuffer' [-Wunused-variable] history.cpp: In member function 'virtual int HistoryMenuModel::rowCount(const QModelIndex&) const': history.cpp:516:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] history.cpp: In member function 'virtual QModelIndex HistoryMenuModel::mapToSource(const QModelIndex&) const': history.cpp:541:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Change-Id: I76ba8ff28509f39c653e9b5ba707e380393dff0d Reviewed-by: Jocelyn Turcotte --- examples/webkitwidgets/browser/history.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/webkitwidgets/browser/history.cpp') diff --git a/examples/webkitwidgets/browser/history.cpp b/examples/webkitwidgets/browser/history.cpp index d241994..761d3f5 100644 --- a/examples/webkitwidgets/browser/history.cpp +++ b/examples/webkitwidgets/browser/history.cpp @@ -513,7 +513,7 @@ int HistoryMenuModel::rowCount(const QModelIndex &parent) const return bumpedItems + folders; } - if (parent.internalId() == -1) { + if (parent.internalId() == quintptr(-1)) { if (parent.row() < bumpedRows()) return 0; } @@ -538,7 +538,7 @@ QModelIndex HistoryMenuModel::mapToSource(const QModelIndex &proxyIndex) const if (!proxyIndex.isValid()) return QModelIndex(); - if (proxyIndex.internalId() == -1) { + if (proxyIndex.internalId() == quintptr(-1)) { int bumpedItems = bumpedRows(); if (proxyIndex.row() < bumpedItems) return m_treeModel->index(proxyIndex.row(), proxyIndex.column(), m_treeModel->index(0, 0)); @@ -559,7 +559,7 @@ QModelIndex HistoryMenuModel::index(int row, int column, const QModelIndex &pare || parent.column() > 0) return QModelIndex(); if (!parent.isValid()) - return createIndex(row, column, -1); + return createIndex(row, column, quintptr(-1)); QModelIndex treeIndexParent = mapToSource(parent); -- cgit v1.2.1