Skip to content
Snippets Groups Projects
Commit 6da1b072 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: make threadsviews sortable


Change-Id: I9abdcc76d406f806de0d617aa731f97adde97060
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent c071ef4c
No related branches found
No related tags found
No related merge requests found
......@@ -33,11 +33,13 @@
#ifndef DEBUGGER_MODULESHANDLER_H
#define DEBUGGER_MODULESHANDLER_H
#include <QtCore/QVector>
#include <QtCore/QObject>
#include <QtCore/QAbstractItemModel>
#include <QtCore/QObject>
#include <QtCore/QVector>
QT_FORWARD_DECLARE_CLASS(QSortFilterProxyModel)
QT_BEGIN_NAMESPACE
class QSortFilterProxyModel;
QT_END_NAMESPACE
namespace Debugger {
namespace Internal {
......
......@@ -38,6 +38,7 @@
#include <QtCore/QDebug>
#include <QtCore/QTextStream>
#include <QtGui/QSortFilterProxyModel>
namespace Debugger {
namespace Internal {
......@@ -107,6 +108,8 @@ ThreadsHandler::ThreadsHandler()
{
m_resetLocationScheduled = false;
m_contentsValid = false;
m_proxyModel = new QSortFilterProxyModel(this);
m_proxyModel->setSourceModel(this);
}
int ThreadsHandler::rowCount(const QModelIndex &parent) const
......@@ -339,5 +342,10 @@ void ThreadsHandler::resetLocation()
}
}
QAbstractItemModel *ThreadsHandler::model()
{
return m_proxyModel;
}
} // namespace Internal
} // namespace Debugger
......@@ -38,6 +38,10 @@
#include "threaddata.h"
QT_BEGIN_NAMESPACE
class QSortFilterProxyModel;
QT_END_NAMESPACE
////////////////////////////////////////////////////////////////////////
//
// ThreadsHandler
......@@ -65,7 +69,7 @@ public:
void setThreads(const Threads &threads);
void removeAll();
Threads threads() const;
QAbstractItemModel *model() { return this; }
QAbstractItemModel *model();
// Clear out all frame information
void notifyRunning();
......@@ -91,6 +95,8 @@ private:
bool m_resetLocationScheduled;
bool m_contentsValid;
QSortFilterProxyModel *m_proxyModel;
};
} // namespace Internal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment