summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-09-09 07:26:25 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-09-09 08:31:10 (GMT)
commitbb5c934d3e2e07ddf3a1c299b2111d7119a01eb5 (patch)
treec539591ba2ed2eb6a0b724d03073ed4f43470b81
parent34625a376b7d08856c6de1f52179d86aaaa30f14 (diff)
downloadQt-bb5c934d3e2e07ddf3a1c299b2111d7119a01eb5.zip
Qt-bb5c934d3e2e07ddf3a1c299b2111d7119a01eb5.tar.gz
Qt-bb5c934d3e2e07ddf3a1c299b2111d7119a01eb5.tar.bz2
Lighthouse: Various compiler warning/error fixes
compliments from Vapula
-rw-r--r--src/gui/kernel/qapplication_qpa.cpp1
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.cpp8
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.h2
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.cpp2
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa_p.h2
-rw-r--r--src/plugins/platforms/fb_base/fb_base.cpp4
-rw-r--r--src/plugins/platforms/fb_base/fb_base.h2
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbintegration.h1
8 files changed, 7 insertions, 15 deletions
diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp
index e5b5396..d432829 100644
--- a/src/gui/kernel/qapplication_qpa.cpp
+++ b/src/gui/kernel/qapplication_qpa.cpp
@@ -68,7 +68,6 @@
QT_BEGIN_NAMESPACE
static QString appName;
-static const char *appFont = 0; // application font
QWidget *qt_button_down = 0; // widget got last button-down
diff --git a/src/gui/kernel/qplatformcursor_qpa.cpp b/src/gui/kernel/qplatformcursor_qpa.cpp
index 6665396..ac557b9 100644
--- a/src/gui/kernel/qplatformcursor_qpa.cpp
+++ b/src/gui/kernel/qplatformcursor_qpa.cpp
@@ -187,10 +187,6 @@ static const uchar mcur_fdiag_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x03, 0xfc, 0x01, 0xfc, 0x00,
0xfc, 0x41, 0xfc, 0x63, 0xdc, 0x77, 0x8c, 0x7f, 0x04, 0x7f, 0x00, 0x7e,
0x00, 0x7f, 0x80, 0x7f, 0xc0, 0x7f, 0x00, 0x00 };
-static const uchar cur_blank_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
// 20 x 20
static const uchar forbidden_bits[] = {
@@ -546,11 +542,11 @@ void QPlatformCursorImage::set(Qt::CursorShape id)
\a hy the y coordinate of the cursor's hotspot
*/
-void QPlatformCursorImage::set(const QImage * image, int hx, int hy)
+void QPlatformCursorImage::set(const QImage &image, int hx, int hy)
{
hot.setX(hx);
hot.setY(hy);
- cursorImage = *image;
+ cursorImage = image;
}
/*!
diff --git a/src/gui/kernel/qplatformcursor_qpa.h b/src/gui/kernel/qplatformcursor_qpa.h
index abdbfee..71d0e87 100644
--- a/src/gui/kernel/qplatformcursor_qpa.h
+++ b/src/gui/kernel/qplatformcursor_qpa.h
@@ -63,7 +63,7 @@ public:
QImage * image() { return &cursorImage; }
QPoint hotspot() { return hot; }
void set(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY);
- void set(const QImage * image, int hx, int hy);
+ void set(const QImage &image, int hx, int hy);
void set(Qt::CursorShape);
private:
static void createSystemCursor(int id);
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
index 7b83fd3..bb29cbf 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
@@ -207,7 +207,6 @@ void QWindowSystemInterface::handleTouchEvent(QWidget *tlw, ulong timestamp, QEv
Qt::TouchPointStates states;
QTouchEvent::TouchPoint p;
- int primaryPoint = -1;
QList<struct TouchPoint>::const_iterator point = points.constBegin();
QList<struct TouchPoint>::const_iterator end = points.constEnd();
while (point != end) {
@@ -217,7 +216,6 @@ void QWindowSystemInterface::handleTouchEvent(QWidget *tlw, ulong timestamp, QEv
Qt::TouchPointStates state = point->state;
if (point->isPrimary) {
state |= Qt::TouchPointPrimary;
- primaryPoint = point->id;
}
p.setState(state);
p.setRect(point->area);
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa_p.h b/src/gui/kernel/qwindowsysteminterface_qpa_p.h
index 5f3ac5d..78e1f33 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_qpa_p.h
@@ -49,8 +49,6 @@ QT_BEGIN_NAMESPACE
class QWindowSystemInterfacePrivate {
public:
- Q_ENUMS(EventType);
-
enum EventType {
Close,
GeometryChange,
diff --git a/src/plugins/platforms/fb_base/fb_base.cpp b/src/plugins/platforms/fb_base/fb_base.cpp
index ef7ab02..48488d4 100644
--- a/src/plugins/platforms/fb_base/fb_base.cpp
+++ b/src/plugins/platforms/fb_base/fb_base.cpp
@@ -67,7 +67,7 @@ void QPlatformSoftwareCursor::setCursor(Qt::CursorShape shape)
graphic->set(shape);
}
-void QPlatformSoftwareCursor::setCursor(const QImage * image, int hotx, int hoty)
+void QPlatformSoftwareCursor::setCursor(const QImage &image, int hotx, int hoty)
{
graphic->set(image, hotx, hoty);
}
@@ -85,7 +85,7 @@ void QPlatformSoftwareCursor::changeCursor(QCursor * widgetCursor, QWidget * wid
if (shape == Qt::BitmapCursor) {
// application supplied cursor
QPoint spot = widgetCursor->hotSpot();
- setCursor(&widgetCursor->pixmap().toImage(), spot.x(), spot.y());
+ setCursor(widgetCursor->pixmap().toImage(), spot.x(), spot.y());
} else {
// system cursor
setCursor(shape);
diff --git a/src/plugins/platforms/fb_base/fb_base.h b/src/plugins/platforms/fb_base/fb_base.h
index 10f292e..e52455a 100644
--- a/src/plugins/platforms/fb_base/fb_base.h
+++ b/src/plugins/platforms/fb_base/fb_base.h
@@ -40,7 +40,7 @@ protected:
private:
void setCursor(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY);
void setCursor(Qt::CursorShape shape);
- void setCursor(const QImage * image, int hotx, int hoty);
+ void setCursor(const QImage &image, int hotx, int hoty);
QRect currentRect; // next place to draw the cursor
QRect prevRect; // last place the cursor was drawn
QRect getCurrentRect();
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
index a5d7abd..e93495c 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
+++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
@@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE
class QLinuxFbScreen : public QFbScreen
{
+ Q_OBJECT
public:
QLinuxFbScreen(uchar * d, int w, int h, int lstep, QImage::Format screenFormat);
void setGeometry(QRect rect);