forked from qt-creator/qt-creator
debugger: remove unneeded argument to showToolTip
This commit is contained in:
@@ -34,12 +34,10 @@
|
|||||||
|
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
#include <QtGui/QDesktopWidget>
|
#include <QtGui/QDesktopWidget>
|
||||||
#include <QtGui/QHBoxLayout>
|
|
||||||
#include <QtGui/QHeaderView>
|
#include <QtGui/QHeaderView>
|
||||||
#include <QtGui/QKeyEvent>
|
#include <QtGui/QKeyEvent>
|
||||||
#include <QtGui/QScrollBar>
|
#include <QtGui/QScrollBar>
|
||||||
#include <QtGui/QTreeView>
|
#include <QtGui/QTreeView>
|
||||||
#include <QtGui/QVBoxLayout>
|
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -55,8 +53,7 @@ public:
|
|||||||
QSize sizeHint() const { return m_size; }
|
QSize sizeHint() const { return m_size; }
|
||||||
|
|
||||||
void done();
|
void done();
|
||||||
void run(const QPoint &point, QAbstractItemModel *model,
|
void run(const QPoint &point, const QModelIndex &index);
|
||||||
const QModelIndex &index, const QString &msg);
|
|
||||||
int computeHeight(const QModelIndex &index) const;
|
int computeHeight(const QModelIndex &index) const;
|
||||||
Q_SLOT void computeSize();
|
Q_SLOT void computeSize();
|
||||||
|
|
||||||
@@ -171,9 +168,9 @@ void ToolTipWidget::done()
|
|||||||
deleteLater();
|
deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolTipWidget::run(const QPoint &point, QAbstractItemModel *model,
|
void ToolTipWidget::run(const QPoint &point, const QModelIndex &index)
|
||||||
const QModelIndex &index, const QString & /* msg */)
|
|
||||||
{
|
{
|
||||||
|
QAbstractItemModel *model = const_cast<QAbstractItemModel *>(index.model());
|
||||||
move(point);
|
move(point);
|
||||||
setModel(model);
|
setModel(model);
|
||||||
computeSize();
|
computeSize();
|
||||||
@@ -187,13 +184,12 @@ void ToolTipWidget::leaveEvent(QEvent *ev)
|
|||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void showDebuggerToolTip(const QPoint &point, QAbstractItemModel *model,
|
void showDebuggerToolTip(const QPoint &point, const QModelIndex &index)
|
||||||
const QModelIndex &index, const QString &msg)
|
|
||||||
{
|
{
|
||||||
if (model) {
|
if (index.model()) {
|
||||||
if (!theToolTipWidget)
|
if (!theToolTipWidget)
|
||||||
theToolTipWidget = new ToolTipWidget(0);
|
theToolTipWidget = new ToolTipWidget(0);
|
||||||
theToolTipWidget->run(point, model, index, msg);
|
theToolTipWidget->run(point, index);
|
||||||
theToolTipWidget->show();
|
theToolTipWidget->show();
|
||||||
} else if (theToolTipWidget) {
|
} else if (theToolTipWidget) {
|
||||||
theToolTipWidget->done();
|
theToolTipWidget->done();
|
||||||
|
|||||||
@@ -33,18 +33,14 @@
|
|||||||
#include <QtCore/QtGlobal>
|
#include <QtCore/QtGlobal>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QAbstractItemModel;
|
|
||||||
class QModelIndex;
|
class QModelIndex;
|
||||||
class QPoint;
|
class QPoint;
|
||||||
class QString;
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
void showDebuggerToolTip(const QPoint &point, QAbstractItemModel *model,
|
void showDebuggerToolTip(const QPoint &point, const QModelIndex &rootIndex);
|
||||||
const QModelIndex &rootIndex, const QString &msg);
|
|
||||||
|
|
||||||
void hideDebuggerToolTip(int delay = 0);
|
void hideDebuggerToolTip(int delay = 0);
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -3325,7 +3325,7 @@ bool GdbEngine::showToolTip()
|
|||||||
hideDebuggerToolTip();
|
hideDebuggerToolTip();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
showDebuggerToolTip(m_toolTipPos, watchHandler()->model(TooltipsWatch), index, m_toolTipExpression);
|
showDebuggerToolTip(m_toolTipPos, index);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3333,14 +3333,14 @@ void GdbEngine::setToolTipExpression(const QPoint &mousePos,
|
|||||||
TextEditor::ITextEditor *editor, int cursorPos)
|
TextEditor::ITextEditor *editor, int cursorPos)
|
||||||
{
|
{
|
||||||
if (state() != InferiorStopOk || !isCppEditor(editor)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debuggerCore()->boolSetting(DebugDebuggingHelpers)) {
|
// Minimize interference.
|
||||||
// minimize interference
|
if (debuggerCore()->boolSetting(DebugDebuggingHelpers))
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
m_toolTipPos = mousePos;
|
m_toolTipPos = mousePos;
|
||||||
int line, column;
|
int line, column;
|
||||||
|
|||||||
Reference in New Issue
Block a user