Fixed couple bugs and memory leaks from panels new_info_panels
authorKaj Wallin <kaj.wallin@ixonos.com>
Mon, 10 May 2010 06:00:42 +0000 (09:00 +0300)
committerKaj Wallin <kaj.wallin@ixonos.com>
Mon, 10 May 2010 06:00:42 +0000 (09:00 +0300)
Reviewed by:

situare.supp
src/ui/friendlistpanel.cpp
src/ui/mapviewscreen.cpp
src/ui/panelsidebar.cpp
src/ui/userpanel.cpp

index 41685db..174a5a7 100644 (file)
    obj:/targets/FREMANTLE_X86/opt/lib/libQtWebKit.so.4.6.2
    obj:/targets/FREMANTLE_X86/opt/lib/libQtWebKit.so.4.6.2
 }
-
-
-
+{
+   TransWrite_at_X11
+   Memcheck:Param
+   write(buf)
+   obj:/targets/FREMANTLE_X86/lib/libpthread-2.5.so
+   fun:_X11TransWrite
+   obj:/targets/FREMANTLE_X86/usr/lib/libX11.so.6.2.0
+   fun:_XReply
+   fun:XGetWindowProperty
+   obj:/targets/FREMANTLE_X86/opt/lib/libQtGui.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/lib/libQtGui.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/lib/libQtGui.so.4.6.2
+   obj:/targets/FREMANTLE_X86/opt/lib/libQtGui.so.4.6.2
+   fun:_ZN12QApplicationD1Ev
+   fun:main
+}
index 830f0e2..cfd2402 100644 (file)
@@ -55,11 +55,11 @@ FriendListPanel::FriendListPanel(QWidget *parent)
 
     m_friendsPanelTransitionOpen = m_friendsPanelStateClosed->addTransition(
             m_friendsPanelExpandButton, SIGNAL(clicked()), m_friendsPanelStateOpened);
-    m_friendsPanelTransitionOpen->addAnimation(new QPropertyAnimation(this, "pos"));
+    m_friendsPanelTransitionOpen->addAnimation(new QPropertyAnimation(this, "pos", this));
 
     m_friendsPanelTransitionClose = m_friendsPanelStateOpened->addTransition(
             m_friendsPanelExpandButton, SIGNAL(clicked()), m_friendsPanelStateClosed);
-    m_friendsPanelTransitionClose->addAnimation(new QPropertyAnimation(this, "pos"));
+    m_friendsPanelTransitionClose->addAnimation(new QPropertyAnimation(this, "pos", this));
 
     m_friendsPanelStateMachine->start();
 }
index 54517e1..4e9f398 100644 (file)
@@ -71,23 +71,6 @@ MapViewScreen::MapViewScreen(QWidget *parent)
 
 
     QHBoxLayout *mapViewLayout = new QHBoxLayout;
-    //DEBUG
-//    QVBoxLayout *mapControlLayout = new QVBoxLayout;
-//    QWidget *mapControl = new QWidget(this);
-//    mapControl->setLayout(mapControlLayout);
-//    search = new QPushButton("Search", this);
-//    zoomOut = new QPushButton("-", this);
-//    zoomIn = new QPushButton("+", this);
-//    mapControlLayout->addWidget(&latLine);
-//    mapControlLayout->addWidget(&lonLine);
-//    mapControlLayout->addWidget(search);
-//    mapControlLayout->addWidget(zoomIn);
-//    mapControlLayout->addWidget(zoomOut);
-//    mapViewLayout->addWidget(mapControl);
-//    connect(search, SIGNAL(clicked()), this, SLOT(searchMap()));
-//    connect(zoomIn, SIGNAL(clicked()), mapEngine, SLOT(zoomIn()));
-//    connect(zoomOut, SIGNAL(clicked()), mapEngine, SLOT(zoomOut()));
-    //DEBUG
 
     osmLicense = new QLabel(this);
     osmLicense->setAttribute(Qt::WA_TranslucentBackground, true);
@@ -137,7 +120,7 @@ void MapViewScreen::friendsLocationsReady(QList<User *> &friendsList)
 
 void MapViewScreen::drawOsmLicense(int width, int height)
 {
-    qWarning() << __PRETTY_FUNCTION__ << width << "x" << height;
+    qDebug() << __PRETTY_FUNCTION__ << width << "x" << height;
     osmLicense->move(width - osmLicense->fontMetrics().width(OSM_LICENSE) - PANEL_PEEK_AMOUNT,
                      height - osmLicense->fontMetrics().height());
 }
index 1865933..87d63c5 100644 (file)
@@ -58,7 +58,9 @@ void PanelSideBar::paintEvent(QPaintEvent *)
 
 void PanelSideBar::reDrawSidebar(int width, int height)
 {
+    Q_UNUSED(height);
     qDebug() << __PRETTY_FUNCTION__;
-    if(this->objectName() == "left");
-    this->move(width-21,0);
+    if(this->objectName() == "SidePanelRight") {
+        this->move(width-21,0);
+    }
 }
index 3e8913f..4caeefb 100644 (file)
@@ -34,13 +34,6 @@ UserInfoPanel::UserInfoPanel(QWidget *parent)
     m_userPanelVBox->addWidget(m_userPanelLabel);
 
  //   this->setAutoFillBackground(true);
-//    this->setAttribute(Qt::WA_TranslucentBackground);
-//    this->setWindowOpacity(0.5); //DEFUNCT
-
-//    QPalette userPanelPalette;
-//    userPanelPalette.setBrush(this->backgroundRole(),
-//                              QBrush(QImage(":/res/personal_info_bckgrnd.png")));
-//    this->setPalette(userPanelPalette);
 
     m_userPanelStateMachine = new QStateMachine(this);
     m_userPanelStateClosed = new QState(m_userPanelStateMachine);
@@ -54,11 +47,11 @@ UserInfoPanel::UserInfoPanel(QWidget *parent)
 
     m_userPanelTransitionOpen = m_userPanelStateClosed->addTransition(
             m_userPanelExpandButton, SIGNAL(clicked()), m_userPanelStateOpened);
-    m_userPanelTransitionOpen->addAnimation(new QPropertyAnimation(this, "pos"));
+    m_userPanelTransitionOpen->addAnimation(new QPropertyAnimation(this, "pos", this));
 
     m_userPanelTransitionClose = m_userPanelStateOpened->addTransition(
             m_userPanelExpandButton, SIGNAL(clicked()), m_userPanelStateClosed);
-    m_userPanelTransitionClose->addAnimation(new QPropertyAnimation(this, "pos"));
+    m_userPanelTransitionClose->addAnimation(new QPropertyAnimation(this, "pos", this));
 
     m_userPanelStateMachine->start();
     this->setObjectName("UserPanel");