forked from qt-creator/qt-creator
debugger: rework the searchable view
This reverts most of commit 32ec60958d
and keeps the tree widgets fully accessible.
Change-Id: I34422c175bc43261bb8fe48e0130acb71cdfd721
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -57,18 +57,17 @@
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
ModulesWindow::ModulesWindow(QWidget *parent)
|
||||
: BaseWindow(parent)
|
||||
ModulesTreeView::ModulesTreeView(QWidget *parent)
|
||||
: BaseTreeView(parent)
|
||||
{
|
||||
setWindowTitle(tr("Modules"));
|
||||
treeView()->setSortingEnabled(true);
|
||||
setSortingEnabled(true);
|
||||
setAlwaysAdjustColumnsAction(debuggerCore()->action(AlwaysAdjustModulesColumnWidths));
|
||||
|
||||
connect(treeView(), SIGNAL(activated(QModelIndex)),
|
||||
connect(this, SIGNAL(activated(QModelIndex)),
|
||||
SLOT(moduleActivated(QModelIndex)));
|
||||
}
|
||||
|
||||
void ModulesWindow::moduleActivated(const QModelIndex &index)
|
||||
void ModulesTreeView::moduleActivated(const QModelIndex &index)
|
||||
{
|
||||
DebuggerEngine *engine = debuggerCore()->currentEngine();
|
||||
QTC_ASSERT(engine, return);
|
||||
@@ -76,11 +75,11 @@ void ModulesWindow::moduleActivated(const QModelIndex &index)
|
||||
engine->gotoLocation(index.sibling(index.row(), 1).data().toString());
|
||||
}
|
||||
|
||||
void ModulesWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
void ModulesTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
||||
{
|
||||
QString name;
|
||||
QString fileName;
|
||||
QModelIndex index = treeView()->indexAt(ev->pos());
|
||||
QModelIndex index = indexAt(ev->pos());
|
||||
if (index.isValid())
|
||||
index = index.sibling(index.row(), 0);
|
||||
if (index.isValid()) {
|
||||
@@ -174,5 +173,11 @@ void ModulesWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
handleBaseContextAction(act);
|
||||
}
|
||||
|
||||
ModulesWindow::ModulesWindow()
|
||||
: BaseWindow(new ModulesTreeView)
|
||||
{
|
||||
setWindowTitle(tr("Modules"));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
Reference in New Issue
Block a user