summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-08-26 09:25:08 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-08-26 09:27:44 (GMT)
commitdad83c695e968d7c9fb0be2f4636cf14d34fb8a1 (patch)
tree4699bdb1a869d6a119e59f17d5217b25e4e504b5
parent796d7cc7dd96cea9875afe2e9cf814e8cb192aa1 (diff)
downloadQt-dad83c695e968d7c9fb0be2f4636cf14d34fb8a1.zip
Qt-dad83c695e968d7c9fb0be2f4636cf14d34fb8a1.tar.gz
Qt-dad83c695e968d7c9fb0be2f4636cf14d34fb8a1.tar.bz2
fix warnings on Windows CE
Lots of warnings in the qreal == float case. Some Q_UNUSED added. Reviewed-by: thartman
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp2
-rw-r--r--src/gui/effects/qgraphicseffect_p.h2
-rw-r--r--src/gui/graphicsview/qsimplex_p.cpp2
-rw-r--r--src/gui/kernel/qwidget.cpp5
-rw-r--r--src/gui/widgets/qmenu.cpp2
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
6 files changed, 11 insertions, 4 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index a8de17b..e1fc804 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1289,6 +1289,8 @@ static QString readSymLink(const QString &link)
qFree(rdb);
CloseHandle(handle);
}
+#else
+ Q_UNUSED(link);
#endif // Q_OS_WINCE
return result;
}
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 175bd99..6ce5cda 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -164,7 +164,7 @@ class QGraphicsOpacityEffectPrivate : public QGraphicsEffectPrivate
{
Q_DECLARE_PUBLIC(QGraphicsOpacityEffect)
public:
- QGraphicsOpacityEffectPrivate() : opacity(0.7) {}
+ QGraphicsOpacityEffectPrivate() : opacity(qreal(0.7)) {}
~QGraphicsOpacityEffectPrivate() {}
qreal opacity;
diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp
index dbd8d4f..30a7d5d 100644
--- a/src/gui/graphicsview/qsimplex_p.cpp
+++ b/src/gui/graphicsview/qsimplex_p.cpp
@@ -293,7 +293,7 @@ int QSimplex::findPivotColumn()
int QSimplex::pivotRowForColumn(int column)
{
- qreal min = 999999999999.0; // ###
+ qreal min = qreal(999999999999.0); // ###
int minIndex = -1;
for (int i = 1; i < rows; ++i) {
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 6ffac2c..7e88e9f 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -971,7 +971,10 @@ struct QWidgetExceptionCleaner
/* this cleans up when the constructor throws an exception */
static inline void cleanup(QWidget *that, QWidgetPrivate *d)
{
-#ifndef QT_NO_EXCEPTIONS
+#ifdef QT_NO_EXCEPTIONS
+ Q_UNUSED(that);
+ Q_UNUSED(d);
+#else
QWidgetPrivate::allWidgets->remove(that);
if (d->focus_next != that) {
if (d->focus_next)
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index f0f425f..4734d22 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -368,7 +368,9 @@ QRect QMenuPrivate::actionRect(QAction *act) const
return actionRects.at(index);
}
+#if defined(Q_WS_MAC)
static const qreal MenuFadeTimeInSec = 0.150;
+#endif
void QMenuPrivate::hideUpToMenuBar()
{
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index e025876..4ea18f8 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -379,7 +379,7 @@ void QPlainTextDocumentLayout::layoutBlock(const QTextBlock &block)
tl->beginLayout();
qreal availableWidth = d->width;
if (availableWidth <= 0) {
- availableWidth = INT_MAX; // similar to text edit with pageSize.width == 0
+ availableWidth = qreal(INT_MAX); // similar to text edit with pageSize.width == 0
}
availableWidth -= 2*margin + extraMargin;
while (1) {