diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-10-13 07:48:17 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-10-13 07:49:00 (GMT) |
commit | 9c6e466dc09813dd4a641b2cf385f35ac99346f5 (patch) | |
tree | 365c190a6b67aa64d0c542bde688204342542b67 /src/gui | |
parent | c34ed14c2c185fcb6fee1f8091790f41270f8472 (diff) | |
download | Qt-9c6e466dc09813dd4a641b2cf385f35ac99346f5.zip Qt-9c6e466dc09813dd4a641b2cf385f35ac99346f5.tar.gz Qt-9c6e466dc09813dd4a641b2cf385f35ac99346f5.tar.bz2 |
Fixed a few compiler warnings from QtGui for Symbian.
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qpixmap_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 4 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/qmainwindow.cpp | 6 |
7 files changed, 16 insertions, 11 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 554c0f3..9ae8d72 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -716,6 +716,8 @@ void QS60PixmapData::beginDataAccess() void QS60PixmapData::endDataAccess(bool readOnly) const { + Q_UNUSED(readOnly); + if(!cfbsBitmap) return; diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6919292..f1bbcae 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -929,7 +929,7 @@ TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id) return CCoeControl::MopSupplyObject(id); } -void QSymbianControl::setFocusSafely(bool focus) +void QSymbianControl::setFocusSafely(bool focus, bool resetLastFocused) { // The stack hack in here is very unfortunate, but it is the only way to ensure proper // focus in Symbian. If this is not executed, the control which happens to be on @@ -939,17 +939,19 @@ void QSymbianControl::setFocusSafely(bool focus) S60->appUi()->RemoveFromStack(this); // Symbian doesn't automatically remove focus from the last focused control, so we need to // remember it and clear focus ourselves. - if (lastFocusedControl && lastFocusedControl != this) + if (resetLastFocused && lastFocusedControl && lastFocusedControl != this) lastFocusedControl->SetFocus(false); QT_TRAP_THROWING(S60->appUi()->AddToStackL(this, ECoeStackPriorityDefault + 1, ECoeStackFlagStandard)); // Note the + 1 - lastFocusedControl = this; + if (resetLastFocused) + lastFocusedControl = this; this->SetFocus(true); } else { S60->appUi()->RemoveFromStack(this); QT_TRAP_THROWING(S60->appUi()->AddToStackL(this, ECoeStackPriorityDefault, ECoeStackFlagStandard)); - lastFocusedControl = 0; + if (resetLastFocused) + lastFocusedControl = 0; this->SetFocus(false); } } diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index d33791b..3186221 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -157,7 +157,7 @@ public: void setIgnoreFocusChanged(bool enabled) { m_ignoreFocusChanged = enabled; } void CancelLongTapTimer(); - void setFocusSafely(bool focus); + void setFocusSafely(bool focus, bool resetLastFocused = true); protected: void Draw(const TRect& aRect) const; @@ -199,7 +199,7 @@ inline void QS60Data::updateScreenSize() S60->screenHeightInPixels = params.iPixelSize.iHeight; S60->screenWidthInTwips = params.iTwipsSize.iWidth; S60->screenHeightInTwips = params.iTwipsSize.iHeight; - + S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 20; TReal inches = S60->screenHeightInTwips / (TReal)KTwipsPerInch; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index b0d405a..07308d2 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -370,7 +370,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de control->MakeVisible(false); QT_TRAP_THROWING(control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags)); // Avoid keyboard focus to a hidden window. - control->setFocusSafely(false); + control->setFocusSafely(false, false); RDrawableWindow *const drawableWindow = control->DrawableWindow(); // Request mouse move events. diff --git a/src/gui/painting/qpaintengine_s60.cpp b/src/gui/painting/qpaintengine_s60.cpp index e17dba1..6f4f398 100644 --- a/src/gui/painting/qpaintengine_s60.cpp +++ b/src/gui/painting/qpaintengine_s60.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE class QS60PaintEnginePrivate : public QRasterPaintEnginePrivate { public: - QS60PaintEnginePrivate(QS60PaintEngine *engine) { } + QS60PaintEnginePrivate(QS60PaintEngine *engine) { Q_UNUSED(engine); } }; QS60PaintEngine::QS60PaintEngine(QPaintDevice *device, QS60PixmapData *data) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index e8f6d39..738e36a 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -1354,6 +1354,7 @@ static void match(int script, const QFontDef &request, #ifdef Q_WS_X11 load(family_name, script, forceXLFD); #else + Q_UNUSED(forceXLFD); load(family_name, script); #endif diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index 0947e1b..501e62f 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -119,7 +119,7 @@ void QMainWindowPrivate::init() q->setAttribute(Qt::WA_Hover); #ifdef QT_SOFTKEYS_ENABLED menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, q); - menuBarAction->setObjectName("_q_menuSoftKeyAction"); + menuBarAction->setObjectName(QLatin1String("_q_menuSoftKeyAction")); #endif } @@ -933,7 +933,7 @@ static bool checkDockWidgetArea(Qt::DockWidgetArea area, const char *where) } #ifndef QT_NO_TABBAR -/*! +/*! \property QMainWindow::documentMode \brief whether the tab bar for tabbed dockwidgets is set to document mode. \since 4.5 @@ -954,7 +954,7 @@ void QMainWindow::setDocumentMode(bool enabled) #endif // QT_NO_TABBAR #ifndef QT_NO_TABWIDGET -/*! +/*! \property QMainWindow::tabShape \brief the tab shape used for tabbed dock widgets. \since 4.5 |