summaryrefslogtreecommitdiffstats
path: root/src/gui
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/gui
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/gui')
-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
6 files changed, 3 insertions, 28 deletions
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());