diff --git a/src/plugins/debugger/debuggertooltip.cpp b/src/plugins/debugger/debuggertooltip.cpp
index 83025f5fd61808bccd29ce9eb66a9e5d4255653f..4193c146be1a82dee36895ae6b0e3cf995d56d05 100644
--- a/src/plugins/debugger/debuggertooltip.cpp
+++ b/src/plugins/debugger/debuggertooltip.cpp
@@ -34,12 +34,10 @@
 
 #include <QtGui/QApplication>
 #include <QtGui/QDesktopWidget>
-#include <QtGui/QHBoxLayout>
 #include <QtGui/QHeaderView>
 #include <QtGui/QKeyEvent>
 #include <QtGui/QScrollBar>
 #include <QtGui/QTreeView>
-#include <QtGui/QVBoxLayout>
 
 namespace Debugger {
 namespace Internal {
@@ -55,8 +53,7 @@ public:
     QSize sizeHint() const { return m_size; }
 
     void done();
-    void run(const QPoint &point, QAbstractItemModel *model,
-        const QModelIndex &index, const QString &msg);
+    void run(const QPoint &point, const QModelIndex &index);
     int computeHeight(const QModelIndex &index) const;
     Q_SLOT void computeSize();
 
@@ -171,9 +168,9 @@ void ToolTipWidget::done()
     deleteLater();
 }
 
-void ToolTipWidget::run(const QPoint &point, QAbstractItemModel *model,
-    const QModelIndex &index, const QString & /* msg */)
+void ToolTipWidget::run(const QPoint &point, const QModelIndex &index)
 {
+    QAbstractItemModel *model = const_cast<QAbstractItemModel *>(index.model());
     move(point);
     setModel(model);
     computeSize();
@@ -187,13 +184,12 @@ void ToolTipWidget::leaveEvent(QEvent *ev)
         hide();
 }
 
-void showDebuggerToolTip(const QPoint &point, QAbstractItemModel *model,
-        const QModelIndex &index, const QString &msg)
+void showDebuggerToolTip(const QPoint &point, const QModelIndex &index)
 {
-    if (model) {
+    if (index.model()) {
         if (!theToolTipWidget)
             theToolTipWidget = new ToolTipWidget(0);
-        theToolTipWidget->run(point, model, index, msg);
+        theToolTipWidget->run(point, index);
         theToolTipWidget->show();
     } else if (theToolTipWidget) {
         theToolTipWidget->done();
diff --git a/src/plugins/debugger/debuggertooltip.h b/src/plugins/debugger/debuggertooltip.h
index 4dfdbc037947f93a5cc87e9757677046852be28b..d83de48f51650a4f621faaf82dad34f63c128663 100644
--- a/src/plugins/debugger/debuggertooltip.h
+++ b/src/plugins/debugger/debuggertooltip.h
@@ -33,18 +33,14 @@
 #include <QtCore/QtGlobal>
 
 QT_BEGIN_NAMESPACE
-class QAbstractItemModel;
 class QModelIndex;
 class QPoint;
-class QString;
 QT_END_NAMESPACE
 
 namespace Debugger {
 namespace Internal {
 
-void showDebuggerToolTip(const QPoint &point, QAbstractItemModel *model,
-        const QModelIndex &rootIndex, const QString &msg);
-
+void showDebuggerToolTip(const QPoint &point, const QModelIndex &rootIndex);
 void hideDebuggerToolTip(int delay = 0);
 
 } // namespace Internal
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index f3b818127766c27849f97deec814e098cf410863..3ca100a403a7e46b08fb4b565c707e7b7173e7c2 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -3325,7 +3325,7 @@ bool GdbEngine::showToolTip()
         hideDebuggerToolTip();
         return false;
     }
-    showDebuggerToolTip(m_toolTipPos, watchHandler()->model(TooltipsWatch), index, m_toolTipExpression);
+    showDebuggerToolTip(m_toolTipPos, index);
     return true;
 }
 
@@ -3333,14 +3333,14 @@ void GdbEngine::setToolTipExpression(const QPoint &mousePos,
     TextEditor::ITextEditor *editor, int cursorPos)
 {
     if (state() != InferiorStopOk || !isCppEditor(editor)) {
-        //qDebug() << "SUPPRESSING DEBUGGER TOOLTIP, INFERIOR NOT STOPPED/Non Cpp editor";
+        //qDebug() << "SUPPRESSING DEBUGGER TOOLTIP, INFERIOR NOT STOPPED "
+        // " OR NOT A CPPEDITOR";
         return;
     }
 
-    if (debuggerCore()->boolSetting(DebugDebuggingHelpers)) {
-        // minimize interference
+    // Minimize interference.
+    if (debuggerCore()->boolSetting(DebugDebuggingHelpers))
         return;
-    }
 
     m_toolTipPos = mousePos;
     int line, column;