Don't use values() in foreach. Also, use qDeleteAll() if possible.
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=954970
This commit is contained in:
parent
0bbf53b534
commit
2c2587902e
|
@ -43,9 +43,7 @@ FileSystemFactory::FileSystems FileSystemFactory::m_FileSystems;
|
|||
/** Initializes the instance. */
|
||||
void FileSystemFactory::init()
|
||||
{
|
||||
foreach(FileSystem* fs, m_FileSystems.values())
|
||||
delete fs;
|
||||
|
||||
qDeleteAll(m_FileSystems);
|
||||
m_FileSystems.clear();
|
||||
|
||||
m_FileSystems.insert(FileSystem::Ext2, new FS::ext2(-1, -1, -1, QString()));
|
||||
|
|
|
@ -38,12 +38,12 @@ FileSystemSupportDialog::FileSystemSupportDialog(QWidget* parent) :
|
|||
setMainWidget(&dialogWidget());
|
||||
setCaption(i18nc("@title:window", "File System Support"));
|
||||
setButtons(KDialog::Ok);
|
||||
|
||||
|
||||
resize(dialogWidget().width(), dialogWidget().height());
|
||||
|
||||
setupDialog();
|
||||
setupConnections();
|
||||
|
||||
|
||||
restoreDialogSize(KConfigGroup(KGlobal::config(), "fileSystemSupportDialog"));
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ void FileSystemSupportDialog::setupDialog()
|
|||
|
||||
dialogWidget().tree().clear();
|
||||
|
||||
foreach(const FileSystem* fs, FileSystemFactory::map().values())
|
||||
foreach(const FileSystem* fs, FileSystemFactory::map())
|
||||
{
|
||||
if (fs->type() == FileSystem::Unknown || fs->type() == FileSystem::Extended)
|
||||
continue;
|
||||
|
|
|
@ -61,7 +61,7 @@ NewDialog::~NewDialog()
|
|||
void NewDialog::setupDialog()
|
||||
{
|
||||
QStringList fsNames;
|
||||
foreach (const FileSystem* fs, FileSystemFactory::map().values())
|
||||
foreach (const FileSystem* fs, FileSystemFactory::map())
|
||||
if (fs->supportCreate() != FileSystem::SupportNone && fs->type() != FileSystem::Extended)
|
||||
fsNames.append(fs->name());
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ void PartPropsDialog::setupFileSystemComboBox()
|
|||
QString selected;
|
||||
QStringList fsNames;
|
||||
|
||||
foreach(const FileSystem* fs, FileSystemFactory::map().values())
|
||||
foreach(const FileSystem* fs, FileSystemFactory::map())
|
||||
if (fs->supportCreate() != FileSystem::SupportNone && partition().capacity() >= fs->minCapacity() && partition().capacity() <= fs->maxCapacity())
|
||||
{
|
||||
QString name = fs->name();
|
||||
|
|
Loading…
Reference in New Issue