Sort items in file system combo boxes case insensitively.
BUG: 191739 svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=963992
This commit is contained in:
parent
4b3394d482
commit
3c0d91f9d9
|
@ -27,6 +27,7 @@
|
|||
#include "fs/filesystemfactory.h"
|
||||
|
||||
#include "util/capacity.h"
|
||||
#include "util/helpers.h"
|
||||
|
||||
#include <kdebug.h>
|
||||
|
||||
|
@ -65,7 +66,7 @@ void NewDialog::setupDialog()
|
|||
if (fs->supportCreate() != FileSystem::SupportNone && fs->type() != FileSystem::Extended)
|
||||
fsNames.append(fs->name());
|
||||
|
||||
qSort(fsNames);
|
||||
qSort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||
dialogWidget().comboFileSystem().addItems(fsNames);
|
||||
QString selected = FileSystem::nameForType(FileSystem::defaultFileSystem());
|
||||
dialogWidget().comboFileSystem().setCurrentIndex(dialogWidget().comboFileSystem().findText(selected));
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
#include "core/device.h"
|
||||
|
||||
#include "fs/filesystemfactory.h"
|
||||
|
||||
#include "util/capacity.h"
|
||||
#include "util/helpers.h"
|
||||
|
||||
#include <kmessagebox.h>
|
||||
#include <kdebug.h>
|
||||
|
@ -279,7 +281,7 @@ void PartPropsDialog::setupFileSystemComboBox()
|
|||
fsNames.append(name);
|
||||
}
|
||||
|
||||
qSort(fsNames);
|
||||
qSort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||
|
||||
dialogWidget().fileSystem().addItems(fsNames);
|
||||
dialogWidget().fileSystem().setCurrentIndex(dialogWidget().fileSystem().findText(selected));
|
||||
|
|
|
@ -73,10 +73,14 @@ KAboutData* createPartitionManagerAboutData()
|
|||
KAboutData::License_GPL,
|
||||
ki18nc("@info:credit", "(c) 2008, 2009 Volker Lanz")
|
||||
);
|
||||
|
||||
|
||||
about->addAuthor(ki18nc("@info:credit", "Volker Lanz"), KLocalizedString(), "vl@fidra.de");
|
||||
about->setHomepage("http://www.partitionmanager.org");
|
||||
|
||||
return about;
|
||||
}
|
||||
|
||||
bool caseInsensitiveLessThan(const QString& s1, const QString& s2)
|
||||
{
|
||||
return s1.toLower() < s2.toLower();
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "util/libpartitionmanagerexport.h"
|
||||
|
||||
class KAboutData;
|
||||
class QString;
|
||||
|
||||
LIBPARTITIONMANAGERPRIVATE_EXPORT void registerMetaTypes();
|
||||
LIBPARTITIONMANAGERPRIVATE_EXPORT void unblockSigChild();
|
||||
|
@ -31,4 +32,6 @@ LIBPARTITIONMANAGERPRIVATE_EXPORT bool checkPermissions();
|
|||
|
||||
LIBPARTITIONMANAGERPRIVATE_EXPORT KAboutData* createPartitionManagerAboutData();
|
||||
|
||||
LIBPARTITIONMANAGERPRIVATE_EXPORT bool caseInsensitiveLessThan(const QString& s1, const QString& s2);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue