[partition] Make the "no mount point" a placeholder
This commit is contained in:
parent
d8c875f351
commit
fbcd1ffbbe
@ -18,6 +18,7 @@
|
|||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
|
#include <QLineEdit>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
|
|
||||||
QStringList
|
QStringList
|
||||||
@ -37,7 +38,7 @@ void
|
|||||||
standardMountPoints( QComboBox& combo )
|
standardMountPoints( QComboBox& combo )
|
||||||
{
|
{
|
||||||
combo.clear();
|
combo.clear();
|
||||||
combo.addItem( QObject::tr( "(no mount point)" ) );
|
combo.lineEdit()->setPlaceholderText( QObject::tr( "(no mount point)" ) );
|
||||||
combo.addItems( standardMountPoints() );
|
combo.addItems( standardMountPoints() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ standardMountPoints( QComboBox& combo, const QString& selected )
|
|||||||
QString
|
QString
|
||||||
selectedMountPoint( QComboBox& combo )
|
selectedMountPoint( QComboBox& combo )
|
||||||
{
|
{
|
||||||
if ( combo.currentIndex() == 0 )
|
if ( combo.currentIndex() == -1 )
|
||||||
{
|
{
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
@ -63,7 +64,7 @@ setSelectedMountPoint( QComboBox& combo, const QString& selected )
|
|||||||
{
|
{
|
||||||
if ( selected.isEmpty() )
|
if ( selected.isEmpty() )
|
||||||
{
|
{
|
||||||
combo.setCurrentIndex( 0 ); // (no mount point)
|
combo.setCurrentIndex( -1 ); // (no mount point)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user