Merge branch 'master' into raid-support
This commit is contained in:
commit
b620b0caaf
|
@ -14,11 +14,6 @@ Copyright: 2018 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
Copyright: 2020 KDE translators
|
Copyright: 2020 KDE translators
|
||||||
|
|
||||||
### DBus interfaces
|
### DBus interfaces
|
||||||
Files: src/util/org.kde.kpmcore.*.conf
|
Files: src/util/org.kde.kpmcore.helperinterface.conf
|
||||||
License: MIT
|
License: MIT
|
||||||
Copyright: 2018 Andrius Štikonas <andrius@stikonas.eu>
|
Copyright: 2018 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
|
||||||
### KAuth actions
|
|
||||||
Files: src/util/org.kde.kpmcore.externalcommand.actions
|
|
||||||
License: CC0-1.0
|
|
||||||
Copyright: 2018 Andrius Štikonas <andrius@stikonas.eu>
|
|
||||||
|
|
|
@ -5,30 +5,32 @@
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
project(kpmcore)
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
||||||
|
|
||||||
|
# KDE Application Version, managed by release script
|
||||||
|
set (RELEASE_SERVICE_VERSION_MAJOR "21")
|
||||||
|
set (RELEASE_SERVICE_VERSION_MINOR "03")
|
||||||
|
set (RELEASE_SERVICE_VERSION_MICRO "70")
|
||||||
|
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
|
||||||
|
project(kpmcore VERSION ${RELEASE_SERVICE_VERSION})
|
||||||
|
|
||||||
|
set(SOVERSION "11")
|
||||||
|
add_definitions(-D'VERSION="${RELEASE_SERVICE_VERSION}"') #"
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_USE_RELATIVE_PATHS OFF)
|
set(CMAKE_USE_RELATIVE_PATHS OFF)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
set(QT_MIN_VERSION "5.10.0")
|
set(QT_MIN_VERSION "5.14.0")
|
||||||
set(KF5_MIN_VERSION "5.56")
|
set(KF5_MIN_VERSION "5.73")
|
||||||
set(BLKID_MIN_VERSION "2.33.2")
|
set(BLKID_MIN_VERSION "2.33.2")
|
||||||
# Qca-qt5 (tested with botan and ossl backends)
|
# PolkitQt5-1
|
||||||
|
|
||||||
# Runtime
|
# Runtime
|
||||||
# smartmontools 7.0
|
# smartmontools 7.0
|
||||||
|
|
||||||
set(VERSION_MAJOR "4")
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(VERSION_MINOR "2")
|
|
||||||
set(VERSION_RELEASE "0")
|
|
||||||
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE})
|
|
||||||
set(SOVERSION "10")
|
|
||||||
add_definitions(-D'VERSION="${VERSION}"') #"
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
|
||||||
|
@ -42,7 +44,7 @@ include(GenerateExportHeader)
|
||||||
include(ECMSetupVersion)
|
include(ECMSetupVersion)
|
||||||
include(ECMConfiguredInstall)
|
include(ECMConfiguredInstall)
|
||||||
|
|
||||||
ecm_setup_version(${VERSION} VARIABLE_PREFIX KPMCORE
|
ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KPMCORE
|
||||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kpmcore_version.h"
|
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kpmcore_version.h"
|
||||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPMcoreConfigVersion.cmake"
|
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPMcoreConfigVersion.cmake"
|
||||||
SOVERSION ${SOVERSION})
|
SOVERSION ${SOVERSION})
|
||||||
|
@ -56,13 +58,12 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
||||||
|
|
||||||
# Load the frameworks we need
|
# Load the frameworks we need
|
||||||
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
|
||||||
Auth
|
|
||||||
CoreAddons
|
CoreAddons
|
||||||
I18n
|
I18n
|
||||||
WidgetsAddons
|
WidgetsAddons
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(Qca-qt5 REQUIRED)
|
find_package(PolkitQt5-1 REQUIRED)
|
||||||
|
|
||||||
# use sane compile flags
|
# use sane compile flags
|
||||||
add_definitions(
|
add_definitions(
|
||||||
|
@ -107,10 +108,10 @@ install(EXPORT KPMcoreTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KPMc
|
||||||
ki18n_install(po)
|
ki18n_install(po)
|
||||||
|
|
||||||
set_target_properties( kpmcore
|
set_target_properties( kpmcore
|
||||||
PROPERTIES VERSION ${VERSION} SOVERSION ${SOVERSION}
|
PROPERTIES VERSION ${RELEASE_SERVICE_VERSION} SOVERSION ${SOVERSION}
|
||||||
)
|
)
|
||||||
|
|
||||||
message(STATUS "kpmcore ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "kpmcore ${RELEASE_SERVICE_VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ target_link_libraries( kpmcore PUBLIC
|
||||||
${BLKID_LIBRARIES}
|
${BLKID_LIBRARIES}
|
||||||
Qt5::DBus
|
Qt5::DBus
|
||||||
Qt5::Gui
|
Qt5::Gui
|
||||||
qca-qt5
|
|
||||||
KF5::I18n
|
KF5::I18n
|
||||||
KF5::CoreAddons
|
KF5::CoreAddons
|
||||||
KF5::WidgetsAddons
|
KF5::WidgetsAddons
|
||||||
|
|
|
@ -4,7 +4,4 @@
|
||||||
|
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
$EXTRACTRC `find -name \*.rc` >> rc.cpp || exit 11
|
$XGETTEXT $(find -name \*.cc -o -name \*.cpp -o -name \*.h$) -o $podir/kpmcore.pot
|
||||||
$EXTRACTRC `find -name \*.ui` >> rc.cpp || exit 12
|
|
||||||
$XGETTEXT `find -name \*.cc -o -name \*.cpp -o -name \*.h` rc.cpp -o $podir/kpmcore.pot
|
|
||||||
rm -f rc.cpp
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
# SPDX-FileCopyrightText: 2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
function get_files
|
||||||
|
{
|
||||||
|
echo util/org.kde.kpmcore.externalcommand.policy
|
||||||
|
}
|
||||||
|
|
||||||
|
function po_for_file
|
||||||
|
{
|
||||||
|
case "$1" in
|
||||||
|
util/org.kde.kpmcore.externalcommand.policy)
|
||||||
|
echo kpmcore._policy_.po
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function tags_for_file
|
||||||
|
{
|
||||||
|
case "$1" in
|
||||||
|
util/org.kde.kpmcore.externalcommand.policy)
|
||||||
|
echo description
|
||||||
|
echo message
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
|
@ -47,7 +47,7 @@ class LIBKPMCORE_EXPORT CoreBackend : public QObject
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CoreBackend();
|
CoreBackend();
|
||||||
virtual ~CoreBackend();
|
~CoreBackend() override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Device(const Device& other);
|
explicit Device(const Device& other);
|
||||||
virtual ~Device();
|
~Device() override;
|
||||||
|
|
||||||
virtual bool operator==(const Device& other) const;
|
virtual bool operator==(const Device& other) const;
|
||||||
virtual bool operator!=(const Device& other) const;
|
virtual bool operator!=(const Device& other) const;
|
||||||
|
|
|
@ -72,7 +72,7 @@ FstabEntryList readFstabEntries( const QString& fstabPath )
|
||||||
}
|
}
|
||||||
|
|
||||||
QString comment = line.section( QLatin1Char('#'), 1 );
|
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:
|
// We now split the standard components of /etc/fstab entry:
|
||||||
// (0) path, or UUID, or LABEL, etc,
|
// (0) path, or UUID, or LABEL, etc,
|
||||||
|
@ -83,7 +83,7 @@ FstabEntryList readFstabEntries( const QString& fstabPath )
|
||||||
// (5) pass number (optional, defaults to 0), no comment is allowed if omitted,
|
// (5) pass number (optional, defaults to 0), no comment is allowed if omitted,
|
||||||
// (#) comment (optional).
|
// (#) comment (optional).
|
||||||
auto fsSpec = splitLine.at(0);
|
auto fsSpec = splitLine.at(0);
|
||||||
auto mountPoint = splitLine.at(1);
|
auto mountPoint = unescapeSpaces(splitLine.at(1));
|
||||||
auto fsType = splitLine.at(2);
|
auto fsType = splitLine.at(2);
|
||||||
auto options = splitLine.at(3);
|
auto options = splitLine.at(3);
|
||||||
|
|
||||||
|
@ -110,6 +110,22 @@ FstabEntryList readFstabEntries( const QString& fstabPath )
|
||||||
return fstabEntries;
|
return fstabEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString escapeSpaces(const QString& mountPoint)
|
||||||
|
{
|
||||||
|
QString tmp = mountPoint;
|
||||||
|
tmp.replace(QStringLiteral(" "), QStringLiteral("\\040"));
|
||||||
|
tmp.replace(QStringLiteral("\t"), QStringLiteral("\\011"));
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString unescapeSpaces(const QString& mountPoint)
|
||||||
|
{
|
||||||
|
QString tmp = mountPoint;
|
||||||
|
tmp.replace(QStringLiteral("\\040"), QStringLiteral(" "));
|
||||||
|
tmp.replace(QStringLiteral("\\011"), QStringLiteral("\t"));
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
void FstabEntry::setFsSpec(const QString& s)
|
void FstabEntry::setFsSpec(const QString& s)
|
||||||
{
|
{
|
||||||
d->m_fsSpec = s;
|
d->m_fsSpec = s;
|
||||||
|
@ -208,8 +224,8 @@ static QString findBlkIdDevice(const char *token, const QString& value)
|
||||||
free(c);
|
free(c);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(token);
|
Q_UNUSED(token)
|
||||||
Q_UNUSED(value);
|
Q_UNUSED(value)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
|
@ -262,7 +278,7 @@ static void writeEntry(QTextStream& s, const FstabEntry& entry, std::array<unsig
|
||||||
s.setFieldAlignment(QTextStream::AlignLeft);
|
s.setFieldAlignment(QTextStream::AlignLeft);
|
||||||
s.setFieldWidth(columnWidth[0]);
|
s.setFieldWidth(columnWidth[0]);
|
||||||
s << entry.fsSpec()
|
s << entry.fsSpec()
|
||||||
<< qSetFieldWidth(columnWidth[1]) << (entry.mountPoint().isEmpty() ? QStringLiteral("none") : entry.mountPoint())
|
<< qSetFieldWidth(columnWidth[1]) << (entry.mountPoint().isEmpty() ? QStringLiteral("none") : escapeSpaces(entry.mountPoint()))
|
||||||
<< qSetFieldWidth(columnWidth[2]) << entry.type()
|
<< qSetFieldWidth(columnWidth[2]) << entry.type()
|
||||||
<< qSetFieldWidth(columnWidth[3]) << entry.optionsString() << qSetFieldWidth(0)
|
<< qSetFieldWidth(columnWidth[3]) << entry.optionsString() << qSetFieldWidth(0)
|
||||||
<< entry.dumpFreq() << " "
|
<< entry.dumpFreq() << " "
|
||||||
|
|
|
@ -111,6 +111,9 @@ private:
|
||||||
|
|
||||||
typedef QList<FstabEntry> FstabEntryList;
|
typedef QList<FstabEntry> FstabEntryList;
|
||||||
|
|
||||||
|
QString escapeSpaces(const QString& mountPoint);
|
||||||
|
QString unescapeSpaces(const QString& mountPoint);
|
||||||
|
|
||||||
LIBKPMCORE_EXPORT FstabEntryList readFstabEntries(const QString& fstabPath = QStringLiteral("/etc/fstab"));
|
LIBKPMCORE_EXPORT FstabEntryList readFstabEntries(const QString& fstabPath = QStringLiteral("/etc/fstab"));
|
||||||
LIBKPMCORE_EXPORT QStringList possibleMountPoints(const QString& deviceNode, const QString& fstabPath = QStringLiteral("/etc/fstab"));
|
LIBKPMCORE_EXPORT QStringList possibleMountPoints(const QString& deviceNode, const QString& fstabPath = QStringLiteral("/etc/fstab"));
|
||||||
LIBKPMCORE_EXPORT bool writeMountpoints(const FstabEntryList& fstabEntries, const QString& filename = QStringLiteral("/etc/fstab"));
|
LIBKPMCORE_EXPORT bool writeMountpoints(const FstabEntryList& fstabEntries, const QString& filename = QStringLiteral("/etc/fstab"));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2016-2019 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2016-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
||||||
#include "util/globallog.h"
|
#include "util/globallog.h"
|
||||||
#include "util/report.h"
|
#include "util/report.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QStorageInfo>
|
#include <QStorageInfo>
|
||||||
#include <QtMath>
|
#include <QtMath>
|
||||||
|
@ -214,7 +216,7 @@ void LvmDevice::scanSystemLVM(QList<Device*>& devices)
|
||||||
|
|
||||||
// Inform LvmDevice about which physical volumes form that particular LvmDevice
|
// Inform LvmDevice about which physical volumes form that particular LvmDevice
|
||||||
for (const auto &d : lvmList)
|
for (const auto &d : lvmList)
|
||||||
for (const auto &p : qAsConst(LVM::pvList::list()))
|
for (const auto &p : std::as_const(LVM::pvList::list()))
|
||||||
if (p.vgName() == d->name())
|
if (p.vgName() == d->name())
|
||||||
d->physicalVolumes().append(p.partition());
|
d->physicalVolumes().append(p.partition());
|
||||||
|
|
||||||
|
@ -263,7 +265,7 @@ const QStringList LvmDevice::getVGs()
|
||||||
QStringList vgList;
|
QStringList vgList;
|
||||||
QString output = getField(QStringLiteral("vg_name"));
|
QString output = getField(QStringLiteral("vg_name"));
|
||||||
if (!output.isEmpty()) {
|
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) {
|
for (const auto &vgName : vgNameList) {
|
||||||
vgList.append(vgName.trimmed());
|
vgList.append(vgName.trimmed());
|
||||||
}
|
}
|
||||||
|
@ -277,7 +279,7 @@ const QStringList LvmDevice::getLVs(const QString& vgName)
|
||||||
QString cmdOutput = getField(QStringLiteral("lv_path"), vgName);
|
QString cmdOutput = getField(QStringLiteral("lv_path"), vgName);
|
||||||
|
|
||||||
if (cmdOutput.size()) {
|
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) {
|
for (const auto &lvPath : tempPathList) {
|
||||||
lvPathList.append(lvPath.trimmed());
|
lvPathList.append(lvPath.trimmed());
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ class LIBKPMCORE_EXPORT LvmDevice : public VolumeManagerDevice
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit LvmDevice(const QString& name, const QString& iconName = QString());
|
explicit LvmDevice(const QString& name, const QString& iconName = QString());
|
||||||
~LvmDevice();
|
~LvmDevice() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const QStringList deviceNodes() const override;
|
const QStringList deviceNodes() const override;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit OperationStack(QObject* parent = nullptr);
|
explicit OperationStack(QObject* parent = nullptr);
|
||||||
~OperationStack();
|
~OperationStack() override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void operationsChanged();
|
void operationsChanged();
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PartitionNode() {}
|
PartitionNode() {}
|
||||||
virtual ~PartitionNode() {}
|
~PartitionNode() override {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool insert(Partition* partNew);
|
virtual bool insert(Partition* partNew);
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
#include "util/globallog.h"
|
#include "util/globallog.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
@ -592,7 +594,7 @@ QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable)
|
||||||
|
|
||||||
std::sort(partitions.begin(), partitions.end(), [](const Partition* p1, const Partition* p2) { return p1->number() < p2->number(); });
|
std::sort(partitions.begin(), partitions.end(), [](const Partition* p1, const Partition* p2) { return p1->number() < p2->number(); });
|
||||||
|
|
||||||
for (const auto &p : qAsConst(partitions))
|
for (const auto &p : std::as_const(partitions))
|
||||||
stream << *p;
|
stream << *p;
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
#include "ops/createpartitiontableoperation.h"
|
#include "ops/createpartitiontableoperation.h"
|
||||||
#include "util/externalcommand.h"
|
#include "util/externalcommand.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
@ -206,7 +208,7 @@ void SoftwareRAID::scanSoftwareRAID(QList<Device*>& devices)
|
||||||
|
|
||||||
d->setPartitionNodes(partitionNodes);
|
d->setPartitionNodes(partitionNodes);
|
||||||
|
|
||||||
for (const Device* dev : qAsConst(devices)) {
|
for (const Device* dev : std::as_const(devices)) {
|
||||||
if (dev->partitionTable()) {
|
if (dev->partitionTable()) {
|
||||||
for (const Partition* p : dev->partitionTable()->children())
|
for (const Partition* p : dev->partitionTable()->children())
|
||||||
if (getRaidArrayName(p->deviceNode()) == d->deviceNode())
|
if (getRaidArrayName(p->deviceNode()) == d->deviceNode())
|
||||||
|
@ -234,7 +236,7 @@ void SoftwareRAID::scanSoftwareRAID(QList<Device*>& devices)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const QString& name : qAsConst(availableInConf)) {
|
for (const QString& name : std::as_const(availableInConf)) {
|
||||||
SoftwareRAID *raidDevice = new SoftwareRAID(name, SoftwareRAID::Status::Inactive);
|
SoftwareRAID *raidDevice = new SoftwareRAID(name, SoftwareRAID::Status::Inactive);
|
||||||
devices << raidDevice;
|
devices << raidDevice;
|
||||||
}
|
}
|
||||||
|
@ -386,7 +388,7 @@ bool SoftwareRAID::createSoftwareRAID(Report &report,
|
||||||
QStringLiteral("--chunk=") + QString::number(chunkSize),
|
QStringLiteral("--chunk=") + QString::number(chunkSize),
|
||||||
QStringLiteral("--raid-devices=") + QString::number(devicePathList.size()) };
|
QStringLiteral("--raid-devices=") + QString::number(devicePathList.size()) };
|
||||||
|
|
||||||
for (const QString &p : qAsConst(devicePathList)) {
|
for (const QString &p : std::as_const(devicePathList)) {
|
||||||
eraseDeviceMDSuperblock(p);
|
eraseDeviceMDSuperblock(p);
|
||||||
|
|
||||||
args << p;
|
args << p;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2008 Lennart Poettering
|
SPDX-FileCopyrightText: 2008 Lennart Poettering
|
||||||
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2018-2019 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2018-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
@ -9,6 +9,8 @@
|
||||||
#include "smartattributeparseddata.h"
|
#include "smartattributeparseddata.h"
|
||||||
#include "core/smartdiskinformation.h"
|
#include "core/smartdiskinformation.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
@ -615,7 +617,7 @@ static SmartQuirk getQuirk(QString model, QString firmware)
|
||||||
QRegularExpression modelRegex;
|
QRegularExpression modelRegex;
|
||||||
QRegularExpression firmwareRegex;
|
QRegularExpression firmwareRegex;
|
||||||
|
|
||||||
for (const SmartAttributeParsedData::SmartQuirkDataBase &item : qAsConst(db)) {
|
for (const SmartAttributeParsedData::SmartQuirkDataBase &item : std::as_const(db)) {
|
||||||
if (!item.model.isEmpty()) {
|
if (!item.model.isEmpty()) {
|
||||||
modelRegex.setPattern(item.model);
|
modelRegex.setPattern(item.model);
|
||||||
QRegularExpressionMatch match = modelRegex.match(model);
|
QRegularExpressionMatch match = modelRegex.match(model);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2018-2019 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2018-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
#include "core/smartattributeparseddata.h"
|
#include "core/smartattributeparseddata.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
static quint64 u64log2(quint64 n);
|
static quint64 u64log2(quint64 n);
|
||||||
|
|
||||||
|
@ -145,7 +146,7 @@ bool SmartDiskInformation::updatePowerCycle()
|
||||||
/** Validate disk attributes status */
|
/** Validate disk attributes status */
|
||||||
void SmartDiskInformation::validateBadAttributes()
|
void SmartDiskInformation::validateBadAttributes()
|
||||||
{
|
{
|
||||||
for (const SmartAttributeParsedData &attribute : qAsConst(m_Attributes)) {
|
for (const SmartAttributeParsedData &attribute : std::as_const(m_Attributes)) {
|
||||||
if (attribute.prefailure()) {
|
if (attribute.prefailure()) {
|
||||||
if (attribute.goodNowValid() && !attribute.goodNow())
|
if (attribute.goodNowValid() && !attribute.goodNow())
|
||||||
m_BadAttributeNow = true;
|
m_BadAttributeNow = true;
|
||||||
|
@ -161,7 +162,7 @@ void SmartDiskInformation::validateBadAttributes()
|
||||||
SmartAttributeParsedData *SmartDiskInformation::findAttribute(quint32 id)
|
SmartAttributeParsedData *SmartDiskInformation::findAttribute(quint32 id)
|
||||||
{
|
{
|
||||||
SmartAttributeParsedData *attr = nullptr;
|
SmartAttributeParsedData *attr = nullptr;
|
||||||
for (const SmartAttributeParsedData &attribute : qAsConst(m_Attributes)) {
|
for (const SmartAttributeParsedData &attribute : std::as_const(m_Attributes)) {
|
||||||
if (id == attribute.id()) {
|
if (id == attribute.id()) {
|
||||||
attr = new SmartAttributeParsedData(attribute);
|
attr = new SmartAttributeParsedData(attribute);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
||||||
|
SPDX-FileCopyrightText: 2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
@ -12,6 +13,7 @@
|
||||||
#include "util/externalcommand.h"
|
#include "util/externalcommand.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
|
@ -147,7 +149,7 @@ void SmartParser::loadAttributes()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const QJsonValue &value : qAsConst(attributeArray)) {
|
for (const QJsonValue &value : std::as_const(attributeArray)) {
|
||||||
SmartAttributeParsedData parsedObject(m_DiskInformation, value.toObject());
|
SmartAttributeParsedData parsedObject(m_DiskInformation, value.toObject());
|
||||||
m_DiskInformation->addAttribute(parsedObject);
|
m_DiskInformation->addAttribute(parsedObject);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
|
SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
|
||||||
SPDX-FileCopyrightText: 2010 Yuri Chornoivan <yurchor@ukr.net>
|
SPDX-FileCopyrightText: 2010 Yuri Chornoivan <yurchor@ukr.net>
|
||||||
SPDX-FileCopyrightText: 2014-2019 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2014-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac <teo@kde.org>
|
SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac <teo@kde.org>
|
||||||
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2019 Shubham Jangra <aryan100jangid@gmail.com>
|
SPDX-FileCopyrightText: 2019 Shubham Jangra <aryan100jangid@gmail.com>
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
SmartStatus::SmartStatus(const QString &device_path) :
|
SmartStatus::SmartStatus(const QString &device_path) :
|
||||||
m_DevicePath(device_path),
|
m_DevicePath(device_path),
|
||||||
|
@ -144,7 +145,7 @@ void SmartStatus::addAttributes(QList<SmartAttributeParsedData> attr)
|
||||||
{
|
{
|
||||||
m_Attributes.clear();
|
m_Attributes.clear();
|
||||||
|
|
||||||
for (const SmartAttributeParsedData &at : qAsConst(attr)) {
|
for (const SmartAttributeParsedData &at : std::as_const(attr)) {
|
||||||
SmartAttribute sm(at);
|
SmartAttribute sm(at);
|
||||||
m_Attributes.append(sm);
|
m_Attributes.append(sm);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
|
SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
|
||||||
SPDX-FileCopyrightText: 2012-2019 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2012-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac <teo@kde.org>
|
SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac <teo@kde.org>
|
||||||
SPDX-FileCopyrightText: 2017 Pali Rohár <pali.rohar@gmail.com>
|
SPDX-FileCopyrightText: 2017 Pali Rohár <pali.rohar@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2019 Shubham Jangra <aryan100jangid@gmail.com>
|
SPDX-FileCopyrightText: 2019 Shubham Jangra <aryan100jangid@gmail.com>
|
||||||
|
@ -10,6 +10,8 @@
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "fs/filesystemfactory.h"
|
#include "fs/filesystemfactory.h"
|
||||||
#include "fs/filesystem.h"
|
#include "fs/filesystem.h"
|
||||||
|
|
||||||
|
@ -92,7 +94,7 @@ void FileSystemFactory::init()
|
||||||
fileSystems.insert(FileSystem::Type::Xfs, new FS::xfs(-1, -1, -1, QString()));
|
fileSystems.insert(FileSystem::Type::Xfs, new FS::xfs(-1, -1, -1, QString()));
|
||||||
fileSystems.insert(FileSystem::Type::Zfs, new FS::zfs(-1, -1, -1, QString()));
|
fileSystems.insert(FileSystem::Type::Zfs, new FS::zfs(-1, -1, -1, QString()));
|
||||||
|
|
||||||
for (const auto &fs : qAsConst(fileSystems))
|
for (const auto &fs : std::as_const(fileSystems))
|
||||||
fs->init();
|
fs->init();
|
||||||
|
|
||||||
qDeleteAll(m_FileSystems);
|
qDeleteAll(m_FileSystems);
|
||||||
|
|
|
@ -33,7 +33,7 @@ class LIBKPMCORE_EXPORT PartWidgetBase : public QWidget
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PartWidgetBase(QWidget* parent) : QWidget(parent) {}
|
PartWidgetBase(QWidget* parent) : QWidget(parent) {}
|
||||||
virtual ~PartWidgetBase() {}
|
~PartWidgetBase() override {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual qint32 borderWidth() const {
|
virtual qint32 borderWidth() const {
|
||||||
|
|
|
@ -49,7 +49,7 @@ protected:
|
||||||
Job();
|
Job();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~Job() {}
|
~Job() override {}
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void started();
|
void started();
|
||||||
|
|
|
@ -31,37 +31,56 @@
|
||||||
|
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
||||||
|
struct NewOperationPrivate
|
||||||
|
{
|
||||||
|
NewOperationPrivate(Device& d, Partition* p) :
|
||||||
|
m_TargetDevice(d),
|
||||||
|
m_NewPartition(p),
|
||||||
|
m_CreatePartitionJob(new CreatePartitionJob(d, *p)),
|
||||||
|
m_SetPartitionLabelJob(nullptr),
|
||||||
|
m_SetPartitionUUIDJob(nullptr),
|
||||||
|
m_SetPartitionAttributesJob(nullptr),
|
||||||
|
m_CreateFileSystemJob(nullptr),
|
||||||
|
m_SetPartFlagsJob(nullptr),
|
||||||
|
m_SetFileSystemLabelJob(nullptr),
|
||||||
|
m_CheckFileSystemJob(nullptr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Device& m_TargetDevice;
|
||||||
|
Partition* m_NewPartition;
|
||||||
|
CreatePartitionJob* m_CreatePartitionJob;
|
||||||
|
SetPartitionLabelJob* m_SetPartitionLabelJob;
|
||||||
|
SetPartitionUUIDJob* m_SetPartitionUUIDJob;
|
||||||
|
SetPartitionAttributesJob* m_SetPartitionAttributesJob;
|
||||||
|
CreateFileSystemJob* m_CreateFileSystemJob;
|
||||||
|
SetPartFlagsJob* m_SetPartFlagsJob;
|
||||||
|
SetFileSystemLabelJob* m_SetFileSystemLabelJob;
|
||||||
|
CheckFileSystemJob* m_CheckFileSystemJob;
|
||||||
|
};
|
||||||
|
|
||||||
/** Creates a new NewOperation.
|
/** Creates a new NewOperation.
|
||||||
@param d the Device to create a new Partition on
|
@param d the Device to create a new Partition on
|
||||||
@param p pointer to the new Partition to create. May not be nullptr.
|
@param p pointer to the new Partition to create. May not be nullptr.
|
||||||
*/
|
*/
|
||||||
NewOperation::NewOperation(Device& d, Partition* p) :
|
NewOperation::NewOperation(Device& d, Partition* p) :
|
||||||
Operation(),
|
Operation(),
|
||||||
m_TargetDevice(d),
|
d_ptr(std::make_unique<NewOperationPrivate>(d, p))
|
||||||
m_NewPartition(p),
|
|
||||||
m_CreatePartitionJob(new CreatePartitionJob(targetDevice(), newPartition())),
|
|
||||||
m_SetPartitionLabelJob(nullptr),
|
|
||||||
m_SetPartitionUUIDJob(nullptr),
|
|
||||||
m_SetPartitionAttributesJob(nullptr),
|
|
||||||
m_CreateFileSystemJob(nullptr),
|
|
||||||
m_SetPartFlagsJob(nullptr),
|
|
||||||
m_SetFileSystemLabelJob(nullptr),
|
|
||||||
m_CheckFileSystemJob(nullptr)
|
|
||||||
{
|
{
|
||||||
addJob(createPartitionJob());
|
addJob(createPartitionJob());
|
||||||
|
|
||||||
if (!p->label().isEmpty()) {
|
if (!p->label().isEmpty()) {
|
||||||
m_SetPartitionLabelJob = new SetPartitionLabelJob(targetDevice(), newPartition(), p->label());
|
d_ptr->m_SetPartitionLabelJob = new SetPartitionLabelJob(targetDevice(), newPartition(), p->label());
|
||||||
addJob(setPartitionLabelJob());
|
addJob(setPartitionLabelJob());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p->uuid().isEmpty()) {
|
if (!p->uuid().isEmpty()) {
|
||||||
m_SetPartitionUUIDJob = new SetPartitionUUIDJob(targetDevice(), newPartition(), p->uuid());
|
d_ptr->m_SetPartitionUUIDJob = new SetPartitionUUIDJob(targetDevice(), newPartition(), p->uuid());
|
||||||
addJob(setPartitionUUIDJob());
|
addJob(setPartitionUUIDJob());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->attributes()) {
|
if (p->attributes()) {
|
||||||
m_SetPartitionAttributesJob = new SetPartitionAttributesJob(targetDevice(), newPartition(), p->attributes());
|
d_ptr->m_SetPartitionAttributesJob = new SetPartitionAttributesJob(targetDevice(), newPartition(), p->attributes());
|
||||||
addJob(setPartitionAttributesJob());
|
addJob(setPartitionAttributesJob());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,18 +93,18 @@ NewOperation::NewOperation(Device& d, Partition* p) :
|
||||||
// label. The operation stack will merge these operations with this one here
|
// label. The operation stack will merge these operations with this one here
|
||||||
// and if the jobs don't exist things will break.
|
// and if the jobs don't exist things will break.
|
||||||
|
|
||||||
m_CreateFileSystemJob = new CreateFileSystemJob(targetDevice(), newPartition(), fs.label());
|
d_ptr->m_CreateFileSystemJob = new CreateFileSystemJob(targetDevice(), newPartition(), fs.label());
|
||||||
addJob(createFileSystemJob());
|
addJob(createFileSystemJob());
|
||||||
|
|
||||||
if (fs.type() == FileSystem::Type::Lvm2_PV) {
|
if (fs.type() == FileSystem::Type::Lvm2_PV) {
|
||||||
m_SetPartFlagsJob = new SetPartFlagsJob(targetDevice(), newPartition(), PartitionTable::Flag::Lvm);
|
d_ptr->m_SetPartFlagsJob = new SetPartFlagsJob(targetDevice(), newPartition(), PartitionTable::Flag::Lvm);
|
||||||
addJob(setPartFlagsJob());
|
addJob(setPartFlagsJob());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_SetFileSystemLabelJob = new SetFileSystemLabelJob(newPartition(), fs.label());
|
d_ptr->m_SetFileSystemLabelJob = new SetFileSystemLabelJob(newPartition(), fs.label());
|
||||||
addJob(setLabelJob());
|
addJob(setLabelJob());
|
||||||
|
|
||||||
m_CheckFileSystemJob = new CheckFileSystemJob(newPartition());
|
d_ptr->m_CheckFileSystemJob = new CheckFileSystemJob(newPartition());
|
||||||
addJob(checkJob());
|
addJob(checkJob());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +112,67 @@ NewOperation::NewOperation(Device& d, Partition* p) :
|
||||||
NewOperation::~NewOperation()
|
NewOperation::~NewOperation()
|
||||||
{
|
{
|
||||||
if (status() == StatusPending)
|
if (status() == StatusPending)
|
||||||
delete m_NewPartition;
|
delete d_ptr->m_NewPartition;
|
||||||
|
}
|
||||||
|
|
||||||
|
Partition& NewOperation::newPartition()
|
||||||
|
{
|
||||||
|
return *d_ptr->m_NewPartition;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Partition& NewOperation::newPartition() const
|
||||||
|
{
|
||||||
|
return *d_ptr->m_NewPartition;
|
||||||
|
}
|
||||||
|
|
||||||
|
Device& NewOperation::targetDevice()
|
||||||
|
{
|
||||||
|
return d_ptr->m_TargetDevice;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Device& NewOperation::targetDevice() const
|
||||||
|
{
|
||||||
|
return d_ptr->m_TargetDevice;
|
||||||
|
}
|
||||||
|
|
||||||
|
CreatePartitionJob* NewOperation::createPartitionJob()
|
||||||
|
{
|
||||||
|
return d_ptr->m_CreatePartitionJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetPartitionLabelJob* NewOperation::setPartitionLabelJob()
|
||||||
|
{
|
||||||
|
return d_ptr->m_SetPartitionLabelJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetPartitionUUIDJob* NewOperation::setPartitionUUIDJob()
|
||||||
|
{
|
||||||
|
return d_ptr->m_SetPartitionUUIDJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetPartitionAttributesJob* NewOperation::setPartitionAttributesJob()
|
||||||
|
{
|
||||||
|
return d_ptr->m_SetPartitionAttributesJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
CreateFileSystemJob* NewOperation::createFileSystemJob()
|
||||||
|
{
|
||||||
|
return d_ptr->m_CreateFileSystemJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetPartFlagsJob* NewOperation::setPartFlagsJob()
|
||||||
|
{
|
||||||
|
return d_ptr->m_SetPartFlagsJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetFileSystemLabelJob* NewOperation::setLabelJob()
|
||||||
|
{
|
||||||
|
return d_ptr->m_SetFileSystemLabelJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckFileSystemJob* NewOperation::checkJob()
|
||||||
|
{
|
||||||
|
return d_ptr->m_CheckFileSystemJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NewOperation::targets(const Device& d) const
|
bool NewOperation::targets(const Device& d) const
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
struct NewOperationPrivate;
|
||||||
class Device;
|
class Device;
|
||||||
class OperationStack;
|
class OperationStack;
|
||||||
|
|
||||||
|
@ -60,56 +61,23 @@ public:
|
||||||
static Partition* createNew(const Partition& cloneFrom, FileSystem::Type type);
|
static Partition* createNew(const Partition& cloneFrom, FileSystem::Type type);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Partition& newPartition() {
|
Partition& newPartition();
|
||||||
return *m_NewPartition;
|
const Partition& newPartition() const;
|
||||||
}
|
|
||||||
const Partition& newPartition() const {
|
|
||||||
return *m_NewPartition;
|
|
||||||
}
|
|
||||||
|
|
||||||
Device& targetDevice() {
|
Device& targetDevice();
|
||||||
return m_TargetDevice;
|
const Device& targetDevice() const;
|
||||||
}
|
|
||||||
const Device& targetDevice() const {
|
|
||||||
return m_TargetDevice;
|
|
||||||
}
|
|
||||||
|
|
||||||
CreatePartitionJob* createPartitionJob() {
|
CreatePartitionJob* createPartitionJob();
|
||||||
return m_CreatePartitionJob;
|
SetPartitionLabelJob* setPartitionLabelJob();
|
||||||
}
|
SetPartitionUUIDJob* setPartitionUUIDJob();
|
||||||
SetPartitionLabelJob* setPartitionLabelJob() {
|
SetPartitionAttributesJob* setPartitionAttributesJob();
|
||||||
return m_SetPartitionLabelJob;
|
CreateFileSystemJob* createFileSystemJob();
|
||||||
}
|
SetPartFlagsJob* setPartFlagsJob();
|
||||||
SetPartitionUUIDJob* setPartitionUUIDJob() {
|
SetFileSystemLabelJob* setLabelJob();
|
||||||
return m_SetPartitionUUIDJob;
|
CheckFileSystemJob* checkJob();
|
||||||
}
|
|
||||||
SetPartitionAttributesJob* setPartitionAttributesJob() {
|
|
||||||
return m_SetPartitionAttributesJob;
|
|
||||||
}
|
|
||||||
CreateFileSystemJob* createFileSystemJob() {
|
|
||||||
return m_CreateFileSystemJob;
|
|
||||||
}
|
|
||||||
SetPartFlagsJob* setPartFlagsJob() {
|
|
||||||
return m_SetPartFlagsJob;
|
|
||||||
}
|
|
||||||
SetFileSystemLabelJob* setLabelJob() {
|
|
||||||
return m_SetFileSystemLabelJob;
|
|
||||||
}
|
|
||||||
CheckFileSystemJob* checkJob() {
|
|
||||||
return m_CheckFileSystemJob;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Device& m_TargetDevice;
|
std::unique_ptr<NewOperationPrivate> d_ptr;
|
||||||
Partition* m_NewPartition;
|
|
||||||
CreatePartitionJob* m_CreatePartitionJob;
|
|
||||||
SetPartitionLabelJob* m_SetPartitionLabelJob;
|
|
||||||
SetPartitionUUIDJob* m_SetPartitionUUIDJob;
|
|
||||||
SetPartitionAttributesJob* m_SetPartitionAttributesJob;
|
|
||||||
CreateFileSystemJob* m_CreateFileSystemJob;
|
|
||||||
SetPartFlagsJob* m_SetPartFlagsJob;
|
|
||||||
SetFileSystemLabelJob* m_SetFileSystemLabelJob;
|
|
||||||
CheckFileSystemJob* m_CheckFileSystemJob;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -85,7 +85,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Operation();
|
Operation();
|
||||||
virtual ~Operation();
|
~Operation() override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void progress(int);
|
void progress(int);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
|
||||||
SPDX-FileCopyrightText: 2016-2018 Andrius Štikonas <andrius@stikonas.eu>
|
SPDX-FileCopyrightText: 2016-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,8 @@
|
||||||
#include "jobs/movephysicalvolumejob.h"
|
#include "jobs/movephysicalvolumejob.h"
|
||||||
#include "util/helpers.h"
|
#include "util/helpers.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <utility>
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#include "util/externalcommand.h"
|
#include "util/externalcommand.h"
|
||||||
#include "util/helpers.h"
|
#include "util/helpers.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <QDataStream>
|
#include <QDataStream>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
@ -278,7 +280,7 @@ Device* SfdiskBackend::scanDevice(const QString& deviceNode)
|
||||||
{
|
{
|
||||||
QList<Device *> availableDevices = scanDevices();
|
QList<Device *> availableDevices = scanDevices();
|
||||||
|
|
||||||
for (Device *device : qAsConst(availableDevices))
|
for (Device *device : std::as_const(availableDevices))
|
||||||
if (device && device->deviceNode() == deviceNode)
|
if (device && device->deviceNode() == deviceNode)
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
@ -340,7 +342,7 @@ void SfdiskBackend::scanDevicePartitions(Device& d, const QJsonArray& jsonPartit
|
||||||
if (d.partitionTable()->isSectorBased(d))
|
if (d.partitionTable()->isSectorBased(d))
|
||||||
d.partitionTable()->setType(d, PartitionTable::msdos_sectorbased);
|
d.partitionTable()->setType(d, PartitionTable::msdos_sectorbased);
|
||||||
|
|
||||||
for (const Partition *part : qAsConst(partitions))
|
for (const Partition *part : std::as_const(partitions))
|
||||||
PartitionAlignment::isAligned(d, *part);
|
PartitionAlignment::isAligned(d, *part);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ class CoreBackendPartitionTable;
|
||||||
|
|
||||||
class SfdiskDevice : public CoreBackendDevice
|
class SfdiskDevice : public CoreBackendDevice
|
||||||
{
|
{
|
||||||
Q_DISABLE_COPY(SfdiskDevice);
|
Q_DISABLE_COPY(SfdiskDevice)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SfdiskDevice(const Device& d);
|
explicit SfdiskDevice(const Device& d);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-FileCopyrightText: 2008,2012 Volker Lanz <vl@fidra.de>
|
# SPDX-FileCopyrightText: 2008,2012 Volker Lanz <vl@fidra.de>
|
||||||
# SPDX-FileCopyrightText: 2015 Chris Campbell <c.j.campbell@ed.ac.uk>
|
# SPDX-FileCopyrightText: 2015 Chris Campbell <c.j.campbell@ed.ac.uk>
|
||||||
# SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
# SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||||
# SPDX-FileCopyrightText: 2015 Andrius Štikonas <andrius@stikonas.eu>
|
# SPDX-FileCopyrightText: 2015-2020 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
# SPDX-FileCopyrightText: 2018 Huzaifa Faruqui <huzaifafaruqui@gmail.com>
|
# SPDX-FileCopyrightText: 2018 Huzaifa Faruqui <huzaifafaruqui@gmail.com>
|
||||||
# SPDX-FileCopyrightText: 2019 Albert Astals Cid <aacid@kde.org>
|
# SPDX-FileCopyrightText: 2019 Albert Astals Cid <aacid@kde.org>
|
||||||
# SPDX-FileCopyrightText: 2019 Antonio Rojas <arojas@archlinux.org>
|
# SPDX-FileCopyrightText: 2019 Antonio Rojas <arojas@archlinux.org>
|
||||||
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
set(application_interface_xml org.kde.kpmcore.applicationinterface.xml)
|
|
||||||
set(helper_interface_xml org.kde.kpmcore.helperinterface.xml)
|
set(helper_interface_xml org.kde.kpmcore.helperinterface.xml)
|
||||||
|
|
||||||
qt5_generate_dbus_interface(
|
qt5_generate_dbus_interface(
|
||||||
|
@ -24,10 +23,6 @@ qt5_generate_dbus_interface(
|
||||||
OPTIONS -a
|
OPTIONS -a
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
find_package(PolkitQt5-1 REQUIRED)
|
|
||||||
|
|
||||||
qt5_add_dbus_interface(ApplicationInterface_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${application_interface_xml} externalcommand_interface)
|
|
||||||
qt5_add_dbus_interface(HelperInterface_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${helper_interface_xml} externalcommandhelper_interface)
|
qt5_add_dbus_interface(HelperInterface_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${helper_interface_xml} externalcommandhelper_interface)
|
||||||
|
|
||||||
set(UTIL_SRC
|
set(UTIL_SRC
|
||||||
|
@ -51,7 +46,6 @@ set(UTIL_LIB_HDRS
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(kpmcore_externalcommand
|
add_executable(kpmcore_externalcommand
|
||||||
${ApplicationInterface_SRCS}
|
|
||||||
util/externalcommandhelper.cpp
|
util/externalcommandhelper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -64,10 +58,8 @@ add_definitions(
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(kpmcore_externalcommand
|
target_link_libraries(kpmcore_externalcommand
|
||||||
qca-qt5
|
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
Qt5::DBus
|
Qt5::DBus
|
||||||
KF5::AuthCore
|
|
||||||
KF5::I18n
|
KF5::I18n
|
||||||
PolkitQt5-1::Core
|
PolkitQt5-1::Core
|
||||||
)
|
)
|
||||||
|
@ -75,9 +67,8 @@ target_link_libraries(kpmcore_externalcommand
|
||||||
install(TARGETS kpmcore_mdadmupdateconf DESTINATION ${LIBEXEC_INSTALL_DIR})
|
install(TARGETS kpmcore_mdadmupdateconf DESTINATION ${LIBEXEC_INSTALL_DIR})
|
||||||
install(TARGETS kpmcore_externalcommand DESTINATION ${KDE_INSTALL_LIBEXECDIR})
|
install(TARGETS kpmcore_externalcommand DESTINATION ${KDE_INSTALL_LIBEXECDIR})
|
||||||
install( FILES util/org.kde.kpmcore.helperinterface.conf DESTINATION ${KDE_INSTALL_DBUSDIR}/system.d )
|
install( FILES util/org.kde.kpmcore.helperinterface.conf DESTINATION ${KDE_INSTALL_DBUSDIR}/system.d )
|
||||||
install( FILES util/org.kde.kpmcore.applicationinterface.conf DESTINATION ${KDE_INSTALL_DBUSDIR}/system.d )
|
|
||||||
|
|
||||||
kauth_install_actions(org.kde.kpmcore.externalcommand util/org.kde.kpmcore.externalcommand.actions)
|
install( FILES util/org.kde.kpmcore.externalcommand.policy DESTINATION ${POLKITQT-1_POLICY_FILES_INSTALL_DIR})
|
||||||
ecm_install_configured_files(
|
ecm_install_configured_files(
|
||||||
INPUT util/org.kde.kpmcore.helperinterface.service.in
|
INPUT util/org.kde.kpmcore.helperinterface.service.in
|
||||||
DESTINATION ${KDE_INSTALL_DBUSDIR}/system-services
|
DESTINATION ${KDE_INSTALL_DBUSDIR}/system-services
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
explicit ExternalCommand(const QString& cmd = QString(), const QStringList& args = QStringList(), const QProcess::ProcessChannelMode processChannelMode = QProcess::MergedChannels);
|
explicit ExternalCommand(const QString& cmd = QString(), const QStringList& args = QStringList(), const QProcess::ProcessChannelMode processChannelMode = QProcess::MergedChannels);
|
||||||
explicit ExternalCommand(Report& report, const QString& cmd = QString(), const QStringList& args = QStringList(), const QProcess::ProcessChannelMode processChannelMode = QProcess::MergedChannels);
|
explicit ExternalCommand(Report& report, const QString& cmd = QString(), const QStringList& args = QStringList(), const QProcess::ProcessChannelMode processChannelMode = QProcess::MergedChannels);
|
||||||
|
|
||||||
~ExternalCommand();
|
~ExternalCommand() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool copyBlocks(const CopySource& source, CopyTarget& target);
|
bool copyBlocks(const CopySource& source, CopyTarget& target);
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
<!DOCTYPE busconfig PUBLIC
|
|
||||||
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
|
||||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
|
||||||
<busconfig>
|
|
||||||
|
|
||||||
<policy context="default">
|
|
||||||
<allow own="org.kde.kpmcore.applicationinterface"/>
|
|
||||||
</policy>
|
|
||||||
|
|
||||||
<policy user="root">
|
|
||||||
<allow send_destination="org.kde.kpmcore.applicationinterface"
|
|
||||||
send_interface="org.kde.kpmcore.applicationinterface"/>
|
|
||||||
</policy>
|
|
||||||
</busconfig>
|
|
|
@ -1,65 +0,0 @@
|
||||||
[Domain]
|
|
||||||
Icon=partitionmanager
|
|
||||||
|
|
||||||
[org.kde.kpmcore.externalcommand.init]
|
|
||||||
Name=Start external command daemon
|
|
||||||
Name[ast]=Aniciu del degorriu de comandos esternos
|
|
||||||
Name[ca]=Inicia el dimoni d'ordres externes
|
|
||||||
Name[ca@valencia]=Inicia el dimoni d'ordres externes
|
|
||||||
Name[cs]=Spustit démona externích příkazů
|
|
||||||
Name[da]=Start ekstern kommando-dæmon
|
|
||||||
Name[de]=Externen Befehlsdienst starten
|
|
||||||
Name[el]=Εκκίνηση διεργασίας με εξωτερική εντολή
|
|
||||||
Name[en_GB]=Start external command daemon
|
|
||||||
Name[es]=Iniciar el demonio de órdenes externas
|
|
||||||
Name[et]=Välise käsu deemoni käivitamine
|
|
||||||
Name[eu]=Abiarazi kanpoko komandoen daimona
|
|
||||||
Name[fi]=Käynnistä ulkoinen komentopalvelu
|
|
||||||
Name[fr]=Lancer le démon de la commande externe
|
|
||||||
Name[gl]=Iniciar o servizo de orde externa
|
|
||||||
Name[it]=Avvia demone per comando esterno
|
|
||||||
Name[ko]=외부 명령 데몬 시작
|
|
||||||
Name[lt]=Paleisti išorinių komandų tarnybą
|
|
||||||
Name[nl]=Start externe opdrachtdaemon
|
|
||||||
Name[pl]=Rozpocznij usługę zewnętrznego polecenia
|
|
||||||
Name[pt]=Iniciar o servidor de comandos externos
|
|
||||||
Name[pt_BR]=Iniciar comando externo do daemon
|
|
||||||
Name[sk]=Spustiť externé démony príkazov
|
|
||||||
Name[sl]=Zaženite demon za zunanje ukaze
|
|
||||||
Name[sv]=Starta extern kommandodemon
|
|
||||||
Name[uk]=Запуск фонової служби зовнішньої команди
|
|
||||||
Name[x-test]=xxStart external command daemonxx
|
|
||||||
Name[zh_TW]=啟動外部指令守護程式
|
|
||||||
Description=Administrative privileges are required to manage disks
|
|
||||||
Description[ast]=Ríquense los privilexos alministrativos pa xestionar discos
|
|
||||||
Description[ca]=Es requereixen privilegis d'administrador per a gestionar els discs
|
|
||||||
Description[ca@valencia]=Es requereixen privilegis d'administrador per a gestionar els discs
|
|
||||||
Description[cs]=Pro správu disků jsou potřeba práva administrátora
|
|
||||||
Description[da]=Der kræves administrative rettigheder for at håndtere diske
|
|
||||||
Description[de]=Systemverwalterrechte sind zur Verwaltung von Festplatten erforderlich
|
|
||||||
Description[el]=Απαιτούνται δικαιώματα διαχειριστή για τη διαχείριση δίσκων
|
|
||||||
Description[en_GB]=Administrative privileges are required to manage disks
|
|
||||||
Description[es]=Se necesitan permisos de administrador para gestionar discos
|
|
||||||
Description[et]=Ketaste haldamiseks on tarvis administraatori õigusi
|
|
||||||
Description[eu]=Administrazio pribilegioak behar dira diskoak kudeatzeko
|
|
||||||
Description[fi]=Levyjen hallinta vaatii pääkäyttäjäoikeuksia
|
|
||||||
Description[fr]=Vous devez disposer des privilèges d'administrateur pour gérer les disques
|
|
||||||
Description[gl]=Requírense privilexios de administración para xestionar discos.
|
|
||||||
Description[it]=Per gestire il disco sono richiesti privilegi di amministratore
|
|
||||||
Description[ja]=ディスクを管理するには管理者権限が必要です
|
|
||||||
Description[ko]=디스크를 관리하려면 권한이 필요함
|
|
||||||
Description[lt]=Diskų tvarkymui reikalingos administratoriaus teisės
|
|
||||||
Description[nl]=Er zijn administratieve rechten vereist om schijven te beheren
|
|
||||||
Description[pl]=Do zarządzania dyskami wymagane są uprawnienia administratora
|
|
||||||
Description[pt]=São necessários privilégios de administrador para gerir os discos
|
|
||||||
Description[pt_BR]=São necessários privilégios administrativos para gerenciar discos
|
|
||||||
Description[ru]=Для управления дисками требуются права администратора
|
|
||||||
Description[sk]=Na správu diskov sa vyžadujú práva správcu
|
|
||||||
Description[sl]=Za upravljanje diskov so potrebne pravice upravljavca računalnika
|
|
||||||
Description[sv]=Administratörsprivilegier krävs för att hantera diskar
|
|
||||||
Description[uk]=Для керування дисками потрібні права доступу адміністратора (root)
|
|
||||||
Description[x-test]=xxAdministrative privileges are required to manage disksxx
|
|
||||||
Description[zh_CN]=管理磁盘需要管理权限
|
|
||||||
Description[zh_TW]=管理硬碟需要管理員權限
|
|
||||||
Policy=auth_admin
|
|
||||||
Persistence=session
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: none
|
||||||
|
SPDX-License-Identifier: CC0-1.0
|
||||||
|
-->
|
||||||
|
<!DOCTYPE policyconfig PUBLIC
|
||||||
|
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||||
|
<policyconfig>
|
||||||
|
<icon_name>partitionmanager</icon_name>
|
||||||
|
<action id="org.kde.kpmcore.externalcommand.init" >
|
||||||
|
<description>Start external command daemon</description>
|
||||||
|
<description xml:lang="ast">Aniciu del degorriu de comandos esternos</description>
|
||||||
|
<description xml:lang="ca">Inicia el dimoni d'ordres externes</description>
|
||||||
|
<description xml:lang="ca@valencia">Inicia el dimoni d'ordres externes</description>
|
||||||
|
<description xml:lang="el">Εκκίνηση διεργασίας με εξωτερική εντολή</description>
|
||||||
|
<description xml:lang="en_GB">Start external command daemon</description>
|
||||||
|
<description xml:lang="es">Iniciar el demonio de órdenes externas</description>
|
||||||
|
<description xml:lang="fr">Lancer le démon externe de commandes</description>
|
||||||
|
<description xml:lang="it">Avvia demone per comando esterno</description>
|
||||||
|
<description xml:lang="lt">Paleisti išorinių komandų tarnybą</description>
|
||||||
|
<description xml:lang="nl">Start externe opdrachtdaemon</description>
|
||||||
|
<description xml:lang="pt">Iniciar o servidor de comandos externos</description>
|
||||||
|
<description xml:lang="pt_BR">Iniciar comando externo do daemon</description>
|
||||||
|
<description xml:lang="sl">Zaženi demon za zunanje ukaze</description>
|
||||||
|
<description xml:lang="sv">Starta extern kommandodemon</description>
|
||||||
|
<description xml:lang="uk">Запуск фонової служби зовнішньої команди</description>
|
||||||
|
<message>Administrative privileges are required to manage disks</message>
|
||||||
|
<message xml:lang="ast">Ríquense los privilexos alministrativos pa xestionar discos</message>
|
||||||
|
<message xml:lang="ca">Es requereixen privilegis d'administrador per a gestionar els discs</message>
|
||||||
|
<message xml:lang="ca@valencia">Es requereixen privilegis d'administrador per a gestionar els discs</message>
|
||||||
|
<message xml:lang="el">Απαιτούνται δικαιώματα διαχειριστή για τη διαχείριση των δίσκων</message>
|
||||||
|
<message xml:lang="en_GB">Administrative privileges are required to manage disks</message>
|
||||||
|
<message xml:lang="es">Se necesitan permisos de administrador para gestionar discos</message>
|
||||||
|
<message xml:lang="fr">Vous devez disposer des privilèges d'administrateur pour gérer les disques.</message>
|
||||||
|
<message xml:lang="it">Per gestire il disco sono richiesti privilegi amministrativi</message>
|
||||||
|
<message xml:lang="lt">Diskų tvarkymui reikalingos administratoriaus teisės</message>
|
||||||
|
<message xml:lang="nl">Er zijn administratieve rechten vereist om schijven te beheren</message>
|
||||||
|
<message xml:lang="pt">São necessários privilégios de administração para gerir os discos</message>
|
||||||
|
<message xml:lang="pt_BR">São necessários privilégios administrativos para gerenciar discos</message>
|
||||||
|
<message xml:lang="sl">Za upravljanje diskov so potrebne pravice upravljavca računalnika</message>
|
||||||
|
<message xml:lang="sv">Administratörsprivilegier krävs för att hantera diskar</message>
|
||||||
|
<message xml:lang="uk">Для керування дисками потрібні права доступу адміністратора (root)</message>
|
||||||
|
<defaults>
|
||||||
|
<allow_inactive>no</allow_inactive>
|
||||||
|
<allow_active>auth_admin_keep</allow_active>
|
||||||
|
</defaults>
|
||||||
|
</action>
|
||||||
|
</policyconfig>
|
|
@ -36,7 +36,7 @@ class LIBKPMCORE_EXPORT Report : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Report(Report* p, const QString& cmd = QString());
|
explicit Report(Report* p, const QString& cmd = QString());
|
||||||
~Report();
|
~Report() override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void outputChanged();
|
void outputChanged();
|
||||||
|
|
Loading…
Reference in New Issue