Added some debug traces
authorKaj Wallin <kaj.wallin@ixonos.com>
Wed, 31 Mar 2010 12:04:36 +0000 (15:04 +0300)
committerKaj Wallin <kaj.wallin@ixonos.com>
Wed, 31 Mar 2010 12:04:36 +0000 (15:04 +0300)
src/ui/mainwindow.cpp
src/ui/mainwindow.h
tests/testUI/testtabs/testtabs

index 15d74ef..ada24b9 100644 (file)
@@ -28,6 +28,7 @@
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
 {
+    qDebug() << __PRETTY_FUNCTION__;
     QWidget *widget = new QWidget;
     setCentralWidget(widget);
     createViews();
@@ -44,9 +45,7 @@ MainWindow::MainWindow(QWidget *parent)
 
 MainWindow::~MainWindow()
 {
-    /**
-    *   Add delete's if you get memory leak warnings with cppcheck
-    */
+    qDebug() << __PRETTY_FUNCTION__;
     delete toListViewAct;
     delete toMapViewAct;
     delete situareViews;
@@ -55,6 +54,7 @@ MainWindow::~MainWindow()
 
 void MainWindow::createMenus()
 {
+    qDebug() << __PRETTY_FUNCTION__;
     toListViewAct = new QAction(tr("List"), this);
     connect(toListViewAct, SIGNAL(triggered()), this, SLOT(toListView()));
     toMapViewAct = new QAction(tr("Map"), this);
@@ -66,6 +66,7 @@ void MainWindow::createMenus()
 
 void MainWindow::createViews()
 {
+    qDebug() << __PRETTY_FUNCTION__;
     situareViews = new QStackedWidget(this);
     situareViews->addWidget(new SituareListView(this));
     situareViews->addWidget(new SituareMapView(this));
@@ -73,6 +74,7 @@ void MainWindow::createViews()
 
 void MainWindow::toListView()
 {
+    qDebug() << __PRETTY_FUNCTION__;
     this->situareViews->setCurrentIndex(0);
     infoLabel->setText(tr("Current: %1").arg(situareViews->currentIndex()));
     this->setWindowTitle("List");
@@ -80,6 +82,7 @@ void MainWindow::toListView()
 
 void MainWindow::toMapView()
 {
+    qDebug() << __PRETTY_FUNCTION__;
     this->situareViews->setCurrentIndex(1);
     infoLabel->setText(tr("Current: %1").arg(situareViews->currentIndex()));
     this->setWindowTitle("Map");
index 30e272a..602f7fb 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <QtGui/QMainWindow>
 #include <QWidget>
+#include <QDebug>
 
 class QLabel;
 class QStackedWidget;
@@ -44,6 +45,14 @@ public:
     ~MainWindow();
 
     /**
+    * @brief Widget Stack object for the List and Map Views
+    *
+    * @var situareViews
+    */
+    QStackedWidget *situareViews;
+
+private:
+    /**
     * @brief Private method to create List and Map views as a stacked widget
     *
     * @fn createViews
@@ -72,13 +81,6 @@ public:
     QAction *toMapViewAct;
 
     /**
-    * @brief Widget Stack object for the List and Map Views
-    *
-    * @var situareViews
-    */
-    QStackedWidget *situareViews;
-
-    /**
     * @brief DUMMY LABEL, REMOVE WHEN BOTH VIEWS ARE COMPLETE
     *
     * @var infoLabel
@@ -94,7 +96,7 @@ public slots:
     */
     void toListView();
     /**
-    * @brief Private slots, which initiates toMapViewAct action
+    * @brief Private slot, which initiates toMapViewAct action
     *
     * @fn toMapView
     */
index 2a002e0..5c780c2 100755 (executable)
Binary files a/tests/testUI/testtabs/testtabs and b/tests/testUI/testtabs/testtabs differ