Add JobQueue list to DebugWindow
This commit is contained in:
parent
52528f650c
commit
8a60abdfc9
@ -20,6 +20,7 @@
|
|||||||
#include "utils/Retranslator.h"
|
#include "utils/Retranslator.h"
|
||||||
#include "utils/qjsonmodel.h"
|
#include "utils/qjsonmodel.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
|
#include "Job.h"
|
||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
|
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
@ -46,6 +47,19 @@ DebugWindow::DebugWindow()
|
|||||||
jsonModel->loadJson( QJsonDocument::fromVariant( gs->m ).toJson() );
|
jsonModel->loadJson( QJsonDocument::fromVariant( gs->m ).toJson() );
|
||||||
globalStorageView->expandAll();
|
globalStorageView->expandAll();
|
||||||
|
|
||||||
|
jobQueueText->setReadOnly( true );
|
||||||
|
connect( JobQueue::instance(), &JobQueue::queueChanged,
|
||||||
|
[ this ]( const QList< Calamares::job_ptr >& jobs )
|
||||||
|
{
|
||||||
|
QStringList text;
|
||||||
|
foreach( auto job, jobs )
|
||||||
|
{
|
||||||
|
text.append( job->prettyName() );
|
||||||
|
}
|
||||||
|
|
||||||
|
jobQueueText->setText( text.join( '\n' ) );
|
||||||
|
} );
|
||||||
|
|
||||||
CALAMARES_RETRANSLATE( retranslateUi( this ); )
|
CALAMARES_RETRANSLATE( retranslateUi( this ); )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,11 +14,35 @@
|
|||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>GlobalStorage</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="globalStorageView"/>
|
<widget class="QTreeView" name="globalStorageView"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>JobQueue</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="jobQueueText"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user