Use qAsConst and required Qt 5.7.1.
This commit is contained in:
parent
bf38d67e1b
commit
7f5e592ba9
|
@ -21,7 +21,7 @@ set(CMAKE_USE_RELATIVE_PATHS OFF)
|
|||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||
set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOL "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" FORCE)
|
||||
|
||||
set(QT_MIN_VERSION "5.6.1")
|
||||
set(QT_MIN_VERSION "5.7.1")
|
||||
# Check KPMcore dependency when bumping
|
||||
set(VERSION_MAJOR "3")
|
||||
set(VERSION_MINOR "0")
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "config/advancedpagewidget.h"
|
||||
|
||||
#include <backend/corebackendmanager.h>
|
||||
|
||||
#include <util/helpers.h>
|
||||
|
||||
#include <QComboBox>
|
||||
|
@ -36,7 +35,6 @@ AdvancedPageWidget::AdvancedPageWidget(QWidget* parent) :
|
|||
QString AdvancedPageWidget::backend() const
|
||||
{
|
||||
const KService::List services = CoreBackendManager::self()->list();
|
||||
|
||||
for (const auto &p : services)
|
||||
if (p->name() == comboBackend().currentText())
|
||||
return p->library();
|
||||
|
@ -47,7 +45,6 @@ QString AdvancedPageWidget::backend() const
|
|||
void AdvancedPageWidget::setBackend(const QString& name)
|
||||
{
|
||||
const KService::List services = CoreBackendManager::self()->list();
|
||||
|
||||
for (const auto &p : services)
|
||||
if (p->library() == name)
|
||||
comboBackend().setCurrentIndex(comboBackend().findText(p->name()));
|
||||
|
|
|
@ -53,7 +53,7 @@ void GeneralPageWidget::setupDialog()
|
|||
|
||||
qSort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||
|
||||
for (const auto &fsName : fsNames)
|
||||
for (const auto &fsName : qAsConst(fsNames))
|
||||
comboDefaultFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
||||
|
||||
setDefaultFileSystem(GuiHelpers::defaultFileSystem());
|
||||
|
|
|
@ -50,7 +50,7 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog(QWidget* parent, QString& vgNam
|
|||
|
||||
void CreateVolumeGroupDialog::setupDialog()
|
||||
{
|
||||
for (const auto &p : LVM::pvList) // FIXME: qAsConst
|
||||
for (const auto &p : qAsConst(LVM::pvList))
|
||||
if (!p.isLuks() && p.vgName() == QString() && !LvmDevice::s_DirtyPVs.contains(p.partition()))
|
||||
dialogWidget().listPV().addPartition(*p.partition(), false);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ void NewDialog::setupDialog()
|
|||
|
||||
qSort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||
|
||||
foreach (const auto &fsName, fsNames)
|
||||
for (const auto &fsName : qAsConst(fsNames))
|
||||
dialogWidget().comboFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
||||
|
||||
QString selected = FileSystem::nameForType(GuiHelpers::defaultFileSystem());
|
||||
|
|
|
@ -312,7 +312,7 @@ void PartPropsDialog::setupFileSystemComboBox()
|
|||
|
||||
qSort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
|
||||
|
||||
for (const auto &fsName : fsNames)
|
||||
for (const auto &fsName : qAsConst(fsNames))
|
||||
dialogWidget().fileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
|
||||
|
||||
dialogWidget().fileSystem().setCurrentIndex(dialogWidget().fileSystem().findText(selected));
|
||||
|
|
|
@ -51,7 +51,7 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog(QWidget* parent, VolumeManagerD
|
|||
void ResizeVolumeGroupDialog::setupDialog()
|
||||
{
|
||||
if (dialogWidget().volumeType().currentText() == QStringLiteral("LVM")) {
|
||||
for (const auto &p : LVM::pvList) { // FIXME: qAsConst
|
||||
for (const auto &p : qAsConst(LVM::pvList)) {
|
||||
if (p.isLuks())
|
||||
continue;
|
||||
if (p.vgName() == device()->name())
|
||||
|
|
Loading…
Reference in New Issue