From a1bdcc666c9a6a503efbfc0b04cb925624274698 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Date: Thu, 25 Nov 2010 10:38:32 +0100
Subject: [PATCH] Debugger: Add STL types slot to gui test app.

Fix warnings.
---
 tests/manual/gdbdebugger/gui/mainwindow.cpp | 37 ++++++++++++++++++++-
 tests/manual/gdbdebugger/gui/mainwindow.h   |  2 ++
 tests/manual/gdbdebugger/gui/mainwindow.ui  |  8 ++++-
 3 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/tests/manual/gdbdebugger/gui/mainwindow.cpp b/tests/manual/gdbdebugger/gui/mainwindow.cpp
index 2581ac52ddb..1cb112fdc38 100644
--- a/tests/manual/gdbdebugger/gui/mainwindow.cpp
+++ b/tests/manual/gdbdebugger/gui/mainwindow.cpp
@@ -81,6 +81,7 @@ void MainWindow::simpleBP(int inc, const QString &inx)
     QString x = "h\"allo";
     QString *xp = &x;
     qDebug() << inc << inx << *xp;
+    Q_UNUSED(array)
 }
 
 void MainWindow::on_actionDialog_triggered()
@@ -148,6 +149,22 @@ void MainWindow::complexBP(int *inc, QString inx)
 
     qDebug() << inc << inx << dir.absoluteFilePath();
     //statusBar()->showMessage(x);
+    Q_UNUSED(cc)
+    Q_UNUSED(np)
+    Q_UNUSED(c)
+    Q_UNUSED(uc)
+    Q_UNUSED(s)
+    Q_UNUSED(us)
+    Q_UNUSED(ip)
+    Q_UNUSED(ipc)
+    Q_UNUSED(ui)
+    Q_UNUSED(l)
+    Q_UNUSED(ul)
+    Q_UNUSED(i64)
+    Q_UNUSED(iu64)
+    Q_UNUSED(r)
+    Q_UNUSED(d)
+    Q_UNUSED(xr)
 }
 
 void MainWindow::on_actionCrash_triggered()
@@ -305,6 +322,7 @@ void MainWindow::on_actionExtTypes_triggered()
     stringSet.insert("S1");
     stringSet.insert("S2");
     qDebug() << *(spsl.front()) << hidden;
+    Q_UNUSED(wwr)
 }
 
 void MainWindow::on_actionForeach_triggered()
@@ -329,10 +347,12 @@ void Foo::MainWindow::on_actionScopes_triggered()
     int x = 0;
     if (x == 0) {
         int x = 1;
+        Q_UNUSED(x)
     } else {
         int x = 2;
+        Q_UNUSED(x)
     }
-    qDebug() << x;
+    qDebug() << x;    
 }
 
 void Foo::MainWindow::on_actionLongString_triggered()
@@ -343,4 +363,19 @@ void Foo::MainWindow::on_actionLongString_triggered()
         s += incr;
         qDebug() <<s;
     }
+
+}
+
+void Foo::MainWindow::on_actionStdTypes_triggered()
+{
+    std::string stdString = "s";
+    std::wstring stdWString = L"ws";
+    std::map<std::string, std::string> stdStringStringMap;
+    stdStringStringMap.insert(std::map<std::string, std::string>::value_type(stdString, stdString));
+    std::map<std::wstring, std::wstring> stdStringWStringMap;
+    stdStringWStringMap.insert(std::map<std::wstring, std::wstring>::value_type(stdWString, stdWString));
+    std::set<std::string> stringSet;
+    std::list<std::string> stringList;
+    std::vector<std::string> stringVector(1, "bla");
+    std::vector<std::wstring> wStringVector(1, L"bla");
 }
diff --git a/tests/manual/gdbdebugger/gui/mainwindow.h b/tests/manual/gdbdebugger/gui/mainwindow.h
index 274e8c53d88..617c4044345 100644
--- a/tests/manual/gdbdebugger/gui/mainwindow.h
+++ b/tests/manual/gdbdebugger/gui/mainwindow.h
@@ -69,6 +69,8 @@ private slots:
     void on_actionCrash_triggered();
     void on_actionSimpleBP_triggered();
 
+    void on_actionStdTypes_triggered();
+
 private:
     void terminateThread();
     int m_w;
diff --git a/tests/manual/gdbdebugger/gui/mainwindow.ui b/tests/manual/gdbdebugger/gui/mainwindow.ui
index 6c3a9da11d3..892b1b092b6 100644
--- a/tests/manual/gdbdebugger/gui/mainwindow.ui
+++ b/tests/manual/gdbdebugger/gui/mainwindow.ui
@@ -20,7 +20,7 @@
      <x>0</x>
      <y>0</y>
      <width>600</width>
-     <height>23</height>
+     <height>27</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">
@@ -46,6 +46,7 @@
    <addaction name="actionAssert"/>
    <addaction name="actionScopes"/>
    <addaction name="actionLongString"/>
+   <addaction name="actionStdTypes"/>
   </widget>
   <widget class="QStatusBar" name="statusBar"/>
   <widget class="QToolBar" name="toolBar">
@@ -151,6 +152,11 @@
     <string>LongString</string>
    </property>
   </action>
+  <action name="actionStdTypes">
+   <property name="text">
+    <string>stdTypes</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <resources/>
-- 
GitLab