Had zoom panel drag fetaure reviewed. Updated functional tests.
authorKaj Wallin <kaj.wallin@ixonos.com>
Wed, 26 May 2010 05:54:41 +0000 (08:54 +0300)
committerKaj Wallin <kaj.wallin@ixonos.com>
Wed, 26 May 2010 05:54:41 +0000 (08:54 +0300)
Reviewed by: Henri Lampela

doc/test_cases/functionality-tests.doc
situare.supp
src/ui/mainwindow.cpp
src/ui/zoombutton.cpp
src/ui/zoombutton.h
src/ui/zoombuttonpanel.h

index 66a3299..99b595b 100644 (file)
Binary files a/doc/test_cases/functionality-tests.doc and b/doc/test_cases/functionality-tests.doc differ
index fee0c2b..2e47d29 100644 (file)
    fun:_ZN26QMaemoInternetConnectivity17connectionRequestEv
 }
 
+{
+   Fontconfig_Leak
+   Memcheck:Leak
+   fun:malloc
+   obj:/targets/FREMANTLE_X86/usr/lib/libfontconfig.so.1.3.0
+   obj:/targets/FREMANTLE_X86/usr/lib/libfontconfig.so.1.3.0
+   fun:FcPatternAdd
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtGui.so.4.6.2
+   fun:_ZN13QFontDatabase4loadEPK12QFontPrivatei
+   fun:_ZNK12QFontPrivate15engineForScriptEi
+   fun:_ZNK12QFontMetrics6ascentEv
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtWebKit.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtWebKit.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtWebKit.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtWebKit.so.4.6.2
+}
+{
+   conf_value_to_string_Leak
+   Memcheck:Leak
+   fun:malloc
+   fun:g_malloc
+   fun:g_strdup
+   fun:gconf_value_to_string
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtNetwork.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtNetwork.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtNetwork.so.4.6.2
+   fun:_ZN26QMaemoInternetConnectivity17connectionRequestEv
+   fun:_ZN15QAbstractSocket27connectToHostImplementationERK7QStringt6QFlagsIN9QIODevice12OpenModeFlagEE
+   fun:_ZN15QAbstractSocket11qt_metacallEN11QMetaObject4CallEiPPv
+   fun:_ZN10QTcpSocket11qt_metacallEN11QMetaObject4CallEiPPv
+   fun:_ZN11QMetaObject8metacallEP7QObjectNS_4CallEiPPv
+}
+{
+   FontConfig_Leak
+   Memcheck:Leak
+   fun:malloc
+   obj:/targets/FREMANTLE_X86/usr/lib/libfontconfig.so.1.3.0
+   obj:/targets/FREMANTLE_X86/usr/lib/libfontconfig.so.1.3.0
+   fun:FcPatternAdd
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtGui.so.4.6.2
+   fun:_ZN13QFontDatabase4loadEPK12QFontPrivatei
+   fun:_ZNK12QFontPrivate15engineForScriptEi
+   fun:_ZNK12QFontMetrics6ascentEv
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtWebKit.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtWebKit.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtWebKit.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/qt4-maemo5/lib/libQtWebKit.so.4.6.2
+}
+
+
 
 
 
index 5546a3e..c4e54d9 100644 (file)
@@ -287,8 +287,9 @@ void MainWindow::drawOsmLicense(const QSize &size)
 {
     qDebug() << __PRETTY_FUNCTION__ << size.width() << "x" << size.height();
 
-    m_osmLicense->move(size.width() - m_osmLicense->fontMetrics().width(OSM_LICENSE) - PANEL_PEEK_AMOUNT,
-                        size.height() - m_osmLicense->fontMetrics().height());
+    m_osmLicense->move(size.width() - m_osmLicense->fontMetrics().width(OSM_LICENSE)
+                       - PANEL_PEEK_AMOUNT,
+                       size.height() - m_osmLicense->fontMetrics().height());
 
 }
 
index 0fefdff..143fbac 100644 (file)
@@ -44,7 +44,7 @@ void ZoomButton::mousePressEvent(QMouseEvent *event)
         setMode(QIcon::Selected);
     }
 
-    eventPosition = mapToParent(event->pos());
+    m_eventPosition = mapToParent(event->pos());
 
     m_dragStartTimer->start(DRAG_INIT_TIME);
 }
@@ -65,5 +65,5 @@ void ZoomButton::timerExpired()
     qDebug() << __PRETTY_FUNCTION__;
 
     setMode(QIcon::Normal);
-    emit startDragMode(true, eventPosition);
+    emit startDragMode(true, m_eventPosition);
 }
index b444827..4dc3564 100644 (file)
@@ -43,8 +43,8 @@ public:
      * @param normalIconPictureFileName Normal state Icon image file name
      * @param selectedIconPictureFileName Selected state Icon image file name (optional)
      */
-    ZoomButton(QWidget *parent = 0, QString normalIconPictureFileName = "",
-               QString selectedIconPictureFileName = "");
+    ZoomButton(QWidget *parent = 0, QString normalIconPictureFileName = QString(),
+               QString selectedIconPictureFileName = QString());
 
 /*******************************************************************************
  * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
@@ -90,7 +90,7 @@ signals:
  ******************************************************************************/
 private:
     QTimer *m_dragStartTimer;   ///< Mouse press timer, initiates drag mode
-    QPoint eventPosition;       ///< Position of mousePressEvent
+    QPoint m_eventPosition;       ///< Position of mousePressEvent
 };
 
 #endif // ZOOMBUTTON_H
index c6c81a8..913b32f 100644 (file)
@@ -113,6 +113,11 @@ public slots:
      */
     void setDraggable(bool mode, QPoint eventPosition = QPoint(0,0));
 
+    /**
+    * @brief Slot to redraw the panel after window resize event
+    *
+    * @param size Size of the new screen
+    */
     void screenResized(const QSize &size);
 
 private slots: