[partition] Unmap mount-point special strings

- Reverse "(no mount point)" to the empty string
 - Provide convenience pointer-taking function
This commit is contained in:
Adriaan de Groot 2018-05-15 06:30:18 -04:00
parent a4997c4be8
commit a49c39bb53
4 changed files with 24 additions and 8 deletions

View file

@ -24,6 +24,7 @@
#include "GlobalStorage.h"
#include "JobQueue.h"
#include "utils/Logger.h"
#include <QComboBox>
@ -55,3 +56,12 @@ standardMountPoints(QComboBox& combo, const QString& selected)
else
combo.setCurrentText( selected );
}
QString
selectedMountPoint(QComboBox& combo)
{
cDebug() << "Selected mount point" << combo.currentIndex() << combo.currentText();
if ( combo.currentIndex() == 0 )
return QString();
return combo.currentText();
}