mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
Fix dbus sessionList
Order the list by tab order. ISSUE: #13 FIXED-IN: 20.12
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user