Meaningful text from BootLoaderModel.
This commit is contained in:
parent
abe7e79c5f
commit
fa2b577236
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -102,3 +103,14 @@ BootLoaderModel::update()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
BootLoaderModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( role == Qt::DisplayRole )
|
||||
return tr( "%1 (%2)" )
|
||||
.arg( QStandardItemModel::data( index, Qt::DisplayRole ).toString() )
|
||||
.arg( QStandardItemModel::data( index, BootLoaderModel::BootLoaderPathRole ).toString() );
|
||||
return QStandardItemModel::data( index, role );
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -48,6 +49,8 @@ public:
|
||||
|
||||
void update();
|
||||
|
||||
QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const override;
|
||||
|
||||
private:
|
||||
QList< Device* > m_devices;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user