summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-07-06 07:23:40 (GMT)
committeraxis <qt-info@nokia.com>2009-07-06 07:43:45 (GMT)
commitad51d58450eaf0a0d4fccecfc479e719f5e3ff9b (patch)
treecd43225283969334fe3e8aabb9efb453aa25d4a0 /src
parent6725d82984107997fd865b2158b7f51931653a71 (diff)
downloadQt-ad51d58450eaf0a0d4fccecfc479e719f5e3ff9b.zip
Qt-ad51d58450eaf0a0d4fccecfc479e719f5e3ff9b.tar.gz
Qt-ad51d58450eaf0a0d4fccecfc479e719f5e3ff9b.tar.bz2
Removed pointless variables to silence warnings from RVCT.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qresource.cpp4
-rw-r--r--src/corelib/kernel/qsharedmemory_symbian.cpp2
-rw-r--r--src/gui/itemviews/qheaderview.cpp6
-rw-r--r--src/gui/kernel/qwidget_s60.cpp6
-rw-r--r--src/gui/painting/qpainter.cpp1
-rw-r--r--src/gui/styles/qwindowsstyle.cpp4
-rw-r--r--src/gui/text/qfontengine.cpp3
-rw-r--r--src/gui/widgets/qcalendarwidget.cpp11
-rw-r--r--src/network/access/qhttpnetworkreply.cpp2
9 files changed, 4 insertions, 35 deletions
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 158147b..29bbe4c 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -263,9 +263,8 @@ QResourcePrivate::ensureInitialized() const
if(path.startsWith(QLatin1Char(':')))
path = path.mid(1);
- bool found = false;
if(path.startsWith(QLatin1Char('/'))) {
- found = that->load(path);
+ that->load(path);
} else {
QMutexLocker lock(resourceMutex());
QStringList searchPaths = *resourceSearchPaths();
@@ -273,7 +272,6 @@ QResourcePrivate::ensureInitialized() const
for(int i = 0; i < searchPaths.size(); ++i) {
const QString searchPath(searchPaths.at(i) + QLatin1Char('/') + path);
if(that->load(searchPath)) {
- found = true;
that->absoluteFilePath = QLatin1Char(':') + searchPath;
break;
}
diff --git a/src/corelib/kernel/qsharedmemory_symbian.cpp b/src/corelib/kernel/qsharedmemory_symbian.cpp
index d05f9f3..f564391 100644
--- a/src/corelib/kernel/qsharedmemory_symbian.cpp
+++ b/src/corelib/kernel/qsharedmemory_symbian.cpp
@@ -134,8 +134,6 @@ bool QSharedMemoryPrivate::create(int size)
bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
{
// Grab a pointer to the memory block
- TBool readOnly = (mode == QSharedMemory::ReadOnly ? true : false);
-
if (!chunk.Handle()) {
QString function = QLatin1String("QSharedMemory::handle");
QString safeKey = makePlatformSafeKey(key);
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index a44528d..8ae048e 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -2821,16 +2821,12 @@ void QHeaderViewPrivate::setupSectionIndicator(int section, int position)
sectionIndicator = new QLabel(viewport);
}
- int x, y, w, h;
+ int w, h;
int p = q->sectionViewportPosition(section);
if (orientation == Qt::Horizontal) {
- x = p;
- y = 0;
w = q->sectionSize(section);
h = viewport->height();
} else {
- x = 0;
- y = p;
w = viewport->width();
h = q->sectionSize(section);
}
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 4e84ff4..d56c119 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -266,17 +266,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|| type == Qt::Sheet
|| (flags & Qt::MSWindowsFixedSizeDialogHint));
bool desktop = (type == Qt::Desktop);
- bool tool = (type == Qt::Tool || type == Qt::Drawer);
+ //bool tool = (type == Qt::Tool || type == Qt::Drawer);
WId id = 0;
if (popup)
flags |= Qt::WindowStaysOnTopHint; // a popup stays on top
- // always initialize
- if (!window)
- initializeWindow = true;
-
TRect clientRect = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
int sw = clientRect.Width();
int sh = clientRect.Height();
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index b2e3051..2b3f7c3 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -5719,7 +5719,6 @@ void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justif
engine.justify(line);
}
QFixed x = QFixed::fromReal(p.x());
- QFixed ox = x;
for (int i = 0; i < nItems; ++i) {
int item = visualOrder[i];
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 313db30..062eaec 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -1782,8 +1782,6 @@ case PE_FrameDockWidget:
case PE_FrameTabWidget:
if (use2000style) {
- QRect rect = opt->rect;
- QPalette pal = opt->palette;
qDrawWinButton(p, opt->rect, opt->palette, false, 0);
break;
}
@@ -2523,7 +2521,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
bool floating = false;
bool active = dwOpt->state & State_Active;
- int menuOffset = 0; //used to center text when floated
QColor inactiveCaptionTextColor = d->inactiveCaptionText;
if (dwOpt->movable) {
QColor left, right;
@@ -2538,7 +2535,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
left = d->inactiveCaptionColor;
right = d->inactiveGradientCaptionColor;
}
- menuOffset = 2;
QBrush fillBrush(left);
if (left != right) {
QPoint p1(r.x(), r.top() + r.height()/2);
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 06d3516..d82b01f 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1043,9 +1043,8 @@ quint32 QFontEngine::getTrueTypeGlyphIndex(const uchar *cmap, uint unicode)
return 0;
quint16 segCountX2 = qFromBigEndian<quint16>(cmap + 6);
const unsigned char *ends = cmap + 14;
- quint16 endIndex = 0;
int i = 0;
- for (; i < segCountX2/2 && (endIndex = qFromBigEndian<quint16>(ends + 2*i)) < unicode; i++) {}
+ for (; i < segCountX2/2 && qFromBigEndian<quint16>(ends + 2*i) < unicode; i++) {}
const unsigned char *idx = ends + segCountX2 + 2 + 2*i;
quint16 startIndex = qFromBigEndian<quint16>(idx);
diff --git a/src/gui/widgets/qcalendarwidget.cpp b/src/gui/widgets/qcalendarwidget.cpp
index 0c1dc2f..744281b 100644
--- a/src/gui/widgets/qcalendarwidget.cpp
+++ b/src/gui/widgets/qcalendarwidget.cpp
@@ -2142,14 +2142,11 @@ QSize QCalendarWidget::minimumSizeHint() const
int end = 53;
int rows = 7;
int cols = 8;
- int startRow = 0;
- int startCol = 0;
const int marginH = (style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1) * 2;
if (horizontalHeaderFormat() == QCalendarWidget::NoHorizontalHeader) {
rows = 6;
- startRow = 1;
} else {
for (int i = 1; i <= 7; i++) {
QFontMetrics fm(d->m_model->formatForCell(0, i).font());
@@ -2160,7 +2157,6 @@ QSize QCalendarWidget::minimumSizeHint() const
if (verticalHeaderFormat() == QCalendarWidget::NoVerticalHeader) {
cols = 7;
- startCol = 1;
} else {
for (int i = 1; i <= 6; i++) {
QFontMetrics fm(d->m_model->formatForCell(i, 0).font());
@@ -2527,13 +2523,6 @@ void QCalendarWidget::setDateRange(const QDate &min, const QDate &max)
if (!min.isValid() || !max.isValid())
return;
- QDate minimum = min;
- QDate maximum = max;
- if (min > max) {
- minimum = max;
- maximum = min;
- }
-
QDate oldDate = d->m_model->m_date;
d->m_model->setRange(min, max);
d->yearEdit->setMinimum(d->m_model->m_minimumDate.year());
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 167b957..90e81d6 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -470,8 +470,6 @@ bool QHttpNetworkReplyPrivate::parseStatus(const QByteArray &status)
qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
{
qint64 bytes = 0;
- char crlfcrlf[5];
- crlfcrlf[4] = '\0';
char c = 0;
bool allHeaders = false;
while (!allHeaders && socket->bytesAvailable()) {