Commit 358697be authored by Carlos Alves's avatar Carlos Alves
Browse files

Fix dbus sessionList

Order the list by tab order.

ISSUE: #13
FIXED-IN: 20.12
parent 5f006d89
......@@ -1044,8 +1044,11 @@ QStringList ViewManager::sessionList()
{
QStringList ids;
for (auto sdsp : _sessionMap) {
ids.append( QString::number( sdsp->session()->sessionId() ) );
for (int i = 0; i < _viewContainer->count(); i++) {
auto terminaldisplayList = _viewContainer->widget(i)->findChildren<TerminalDisplay *>();
for (auto *terminaldisplay : terminaldisplayList) {
ids.append(QString::number(terminaldisplay->sessionController()->session()->sessionId()));
}
}
return ids;
......
......@@ -251,7 +251,7 @@ public Q_SLOTS:
/**
* DBus slot that returns the unique ids of the sessions in the
* current view. The returned list is not sorted.
* current view. The returned list is ordered by tab.
* QList<int> is not printable by qdbus so we use QStringList
*/
Q_SCRIPTABLE QStringList sessionList();
......
Markdown is supported
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