Verified Commit a6cc4b55 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

debug console: Sort windows tree model

Now you can see properties like 'minimizable' and 'minimized' literally next
to each other, not on the other end of a view.
parent ca7a2cde
Pipeline #217223 failed with stage
in 17 minutes and 35 seconds
......@@ -46,6 +46,7 @@
#include <QMetaType>
#include <QMouseEvent>
#include <QScopeGuard>
#include <QSortFilterProxyModel>
#include <QtConcurrentRun>
#include <wayland-server-core.h>
......@@ -592,8 +593,15 @@ DebugConsole::DebugConsole()
{
setAttribute(Qt::WA_ShowWithoutActivating);
m_ui->setupUi(this);
auto windowsModel = new DebugConsoleModel(this);
QSortFilterProxyModel *proxyWindowsModel = new QSortFilterProxyModel(this);
proxyWindowsModel->setSourceModel(windowsModel);
m_ui->windowsView->setModel(proxyWindowsModel);
m_ui->windowsView->sortByColumn(0, Qt::AscendingOrder);
m_ui->windowsView->header()->setSortIndicatorShown(true);
m_ui->windowsView->setItemDelegate(new DebugConsoleDelegate(this));
m_ui->windowsView->setModel(new DebugConsoleModel(this));
m_ui->surfacesView->setModel(new SurfaceTreeModel(this));
m_ui->clipboardContent->setModel(new DataSourceModel(this));
m_ui->primaryContent->setModel(new DataSourceModel(this));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment