Browse Source

Use Qt::SplitBehavior

Old version QString::SplitBehavious is now deprecated.
release/20.12 v4.2.0
Andrius Štikonas 4 months ago
parent
commit
85396708f4
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      CMakeLists.txt
  2. +1
    -1
      src/core/fstab.cpp
  3. +2
    -2
      src/core/lvmdevice.cpp

+ 1
- 1
CMakeLists.txt View File

@ -13,7 +13,7 @@ set(CMAKE_USE_RELATIVE_PATHS OFF)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
# Dependencies
set(QT_MIN_VERSION "5.10.0")
set(QT_MIN_VERSION "5.14.0")
set(KF5_MIN_VERSION "5.56")
set(BLKID_MIN_VERSION "2.33.2")
# PolkitQt5-1


+ 1
- 1
src/core/fstab.cpp View File

@ -72,7 +72,7 @@ FstabEntryList readFstabEntries( const QString& fstabPath )
}
QString comment = line.section( QLatin1Char('#'), 1 );
QStringList splitLine = line.section( QLatin1Char('#'), 0, 0 ).split( QRegularExpression(QStringLiteral("[\\s]+")), QString::SkipEmptyParts );
QStringList splitLine = line.section( QLatin1Char('#'), 0, 0 ).split( QRegularExpression(QStringLiteral("[\\s]+")), Qt::SkipEmptyParts );
// We now split the standard components of /etc/fstab entry:
// (0) path, or UUID, or LABEL, etc,


+ 2
- 2
src/core/lvmdevice.cpp View File

@ -264,7 +264,7 @@ const QStringList LvmDevice::getVGs()
QStringList vgList;
QString output = getField(QStringLiteral("vg_name"));
if (!output.isEmpty()) {
const QStringList vgNameList = output.split(QLatin1Char('\n'), QString::SkipEmptyParts);
const QStringList vgNameList = output.split(QLatin1Char('\n'), Qt::SkipEmptyParts);
for (const auto &vgName : vgNameList) {
vgList.append(vgName.trimmed());
}
@ -278,7 +278,7 @@ const QStringList LvmDevice::getLVs(const QString& vgName)
QString cmdOutput = getField(QStringLiteral("lv_path"), vgName);
if (cmdOutput.size()) {
const QStringList tempPathList = cmdOutput.split(QLatin1Char('\n'), QString::SkipEmptyParts);
const QStringList tempPathList = cmdOutput.split(QLatin1Char('\n'), Qt::SkipEmptyParts);
for (const auto &lvPath : tempPathList) {
lvPathList.append(lvPath.trimmed());
}


Loading…
Cancel
Save