Remove redundant includes and refactor

This commit is contained in:
Shubham Jangra 2019-06-10 23:07:06 +05:30
parent 2627d476f4
commit 4229b02fd2
63 changed files with 25 additions and 223 deletions

View File

@ -22,10 +22,6 @@
#include "fs/filesystem.h"
#include <QtGlobal>
class QString;
namespace FS
{
/** An APFS file system.

View File

@ -22,10 +22,6 @@
#include "fs/filesystem.h"
#include <QtGlobal>
class QString;
namespace FS
{
/** A Bitlocker encrypted file system.

View File

@ -23,7 +23,6 @@
#include "util/report.h"
#include <QRegularExpression>
#include <QString>
#include <QTemporaryDir>
#include <KLocalizedString>

View File

@ -16,20 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_BTRFS_H)
#ifndef KPMCORE_BTRFS_H
#define KPMCORE_BTRFS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A btrfs file system.

View File

@ -21,8 +21,6 @@
#include "util/externalcommand.h"
#include "util/capacity.h"
#include <QString>
namespace FS
{
FileSystem::CommandSupportType exfat::m_GetUsed = FileSystem::cmdSupportNone;

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_EXFAT_H)
#ifndef KPMCORE_EXFAT_H
#define KPMCORE_EXFAT_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** An exfat file system.

View File

@ -22,7 +22,6 @@
#include "util/capacity.h"
#include <QRegularExpression>
#include <QString>
namespace FS
{

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_EXT2_H)
#ifndef KPMCORE_EXT2_H
#define KPMCORE_EXT2_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** An ext2 file system.

View File

@ -20,8 +20,6 @@
#include "util/externalcommand.h"
#include "util/capacity.h"
#include <QStringList>
namespace FS
{
ext3::ext3(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :

View File

@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_EXT3_H)
#ifndef KPMCORE_EXT3_H
#define KPMCORE_EXT3_H
@ -23,12 +23,8 @@
#include "fs/ext2.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** An ext3 file system.

View File

@ -20,8 +20,6 @@
#include "util/externalcommand.h"
#include "util/capacity.h"
#include <QStringList>
namespace FS
{
ext4::ext4(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label) :

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_EXT4_H)
#ifndef KPMCORE_EXT4_H
#define KPMCORE_EXT4_H
#include "util/libpartitionmanagerexport.h"
#include "fs/ext2.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** An ext4 file system.

View File

@ -15,18 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_EXTENDED_H)
#ifndef KPMCORE_EXTENDED_H
#define KPMCORE_EXTENDED_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class QString;
namespace FS
{
/** An extended file system.

View File

@ -23,7 +23,6 @@
#include <cmath>
#include <QString>
#include <QTemporaryDir>
#include <QUuid>

View File

@ -22,12 +22,8 @@
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A f2fs file system.

View File

@ -26,8 +26,6 @@
#include <QRegularExpression>
#include <QRegularExpressionValidator>
#include <QString>
#include <QStringList>
#include <ctime>

View File

@ -23,12 +23,8 @@
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A fat12 file system.

View File

@ -24,9 +24,6 @@
#include <KLocalizedString>
#include <QString>
#include <QStringList>
#include <ctime>
namespace FS

View File

@ -23,8 +23,6 @@
class Report;
class QString;
namespace FS
{
/** A fat16 file system.

View File

@ -20,8 +20,6 @@
#include "util/externalcommand.h"
#include "util/capacity.h"
#include <QStringList>
#include <ctime>
namespace FS

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_FAT32_H)
#ifndef KPMCORE_FAT32_H
#define KPMCORE_FAT32_H
#include "util/libpartitionmanagerexport.h"
#include "fs/fat16.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A fat32 file system.

View File

@ -23,8 +23,6 @@
#include "util/libpartitionmanagerexport.h"
#include <QList>
#include <QStringList>
#include <QString>
#include <QtGlobal>
#include <QUrl>

View File

@ -20,8 +20,6 @@
#include "fs/filesystem.h"
#include <QString>
class FileSystemPrivate {
public:
FileSystem::Type m_Type;

View File

@ -23,9 +23,6 @@
#include "util/libpartitionmanagerexport.h"
#include <QMap>
#include <QtGlobal>
class QString;
/** Factory to create instances of FileSystem.
@author Volker Lanz <vl@fidra.de>

View File

@ -21,8 +21,6 @@
#include "util/externalcommand.h"
#include "util/capacity.h"
#include <QStringList>
namespace FS
{
FileSystem::CommandSupportType hfs::m_GetUsed = FileSystem::cmdSupportNone;

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_HFS_H)
#ifndef KPMCORE_HFS_H
#define KPMCORE_HFS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** An hfs file system.

View File

@ -21,8 +21,6 @@
#include "util/externalcommand.h"
#include "util/capacity.h"
#include <QStringList>
namespace FS
{
FileSystem::CommandSupportType hfsplus::m_GetLabel = FileSystem::cmdSupportNone;

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_HFSPLUS_H)
#ifndef KPMCORE_HFSPLUS_H
#define KPMCORE_HFSPLUS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** An hfsplus file system.

View File

@ -19,8 +19,6 @@
#include "util/capacity.h"
#include <QString>
namespace FS
{
FileSystem::CommandSupportType hpfs::m_GetUsed = FileSystem::cmdSupportNone;

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_HPFS_H)
#ifndef KPMCORE_HPFS_H
#define KPMCORE_HPFS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A hpfs file system.

View File

@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_ISO9660_H)
#ifndef KPMCORE_ISO9660_H
#define KPMCORE_ISO9660_H
#include "util/libpartitionmanagerexport.h"
@ -25,8 +24,6 @@
class Report;
class QString;
namespace FS
{
/** A iso9660 file system.

View File

@ -22,7 +22,6 @@
#include "util/capacity.h"
#include <QRegularExpression>
#include <QStringList>
#include <QTemporaryDir>
#include <KLocalizedString>

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_JFS_H)
#ifndef KPMCORE_JFS_H
#define KPMCORE_JFS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A JFS file system.

View File

@ -24,8 +24,6 @@
class Report;
class QString;
namespace FS
{
/** A linux_raid_member file system.

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_LINUXSWAP_H)
#ifndef KPMCORE_LINUXSWAP_H
#define KPMCORE_LINUXSWAP_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A linux swap pseudo file system.

View File

@ -37,7 +37,6 @@
#include <QRegularExpression>
#include <QPointer>
#include <QStorageInfo>
#include <QString>
#include <QUuid>
#include <QWidget>

View File

@ -24,11 +24,8 @@
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
class QWidget;
namespace FS

View File

@ -15,18 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_LUKS2_H)
#ifndef KPMCORE_LUKS2_H
#define KPMCORE_LUKS2_H
#include "util/libpartitionmanagerexport.h"
#include "fs/luks.h"
#include <QtGlobal>
class QString;
namespace FS
{
/** A LUKS2 crypto file system.

View File

@ -22,8 +22,6 @@
#include "util/externalcommand.h"
#include "util/capacity.h"
#include <QString>
#include <KLocalizedString>
namespace FS

View File

@ -16,8 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_LVM2_PV_H)
#ifndef KPMCORE_LVM2_PV_H
#define KPMCORE_LVM2_PV_H
#include "util/libpartitionmanagerexport.h"
@ -25,10 +24,7 @@
#include "core/partition.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
/** Stores information about LVM PV or potentially encrypted LVM PV
* @author Andrius Štikonas <andrius@stikonas.eu>

View File

@ -25,7 +25,6 @@
#include <cmath>
#include <QRegularExpression>
#include <QString>
#include <QTemporaryDir>
#include <QUuid>

View File

@ -16,20 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_NILFS2_H)
#ifndef KPMCORE_NILFS2_H
#define KPMCORE_NILFS2_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A nilfs2 file system.

View File

@ -26,8 +26,6 @@
#include <KLocalizedString>
#include <QRegularExpression>
#include <QString>
#include <QStringList>
#include <QFile>
#include <algorithm>

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_NTFS_H)
#ifndef KPMCORE_NTFS_H
#define KPMCORE_NTFS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** An NTFS file system.

View File

@ -22,7 +22,6 @@
#include "util/capacity.h"
#include <QRegularExpression>
#include <QString>
namespace FS
{

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_OCFS2_H)
#ifndef KPMCORE_OCFS2_H
#define KPMCORE_OCFS2_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A ocfs2 file system.

View File

@ -22,7 +22,6 @@
#include "util/externalcommand.h"
#include <QRegularExpression>
#include <QStringList>
namespace FS
{

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_REISER4_H)
#ifndef KPMCORE_REISER4_H
#define KPMCORE_REISER4_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A Reiser4 file system.

View File

@ -22,8 +22,6 @@
#include "util/capacity.h"
#include <QRegularExpression>
#include <QString>
#include <QStringList>
#include <QUuid>
namespace FS

View File

@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_REISERFS_H)
#ifndef KPMCORE_REISERFS_H
#define KPMCORE_REISERFS_H
#include "util/libpartitionmanagerexport.h"
@ -25,12 +24,8 @@
#include "util/capacity.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A ReiserFS file system.

View File

@ -25,8 +25,6 @@
#include <QRegularExpression>
#include <QRegularExpressionValidator>
#include <QString>
#include <QStringList>
namespace FS
{

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_UDF_H)
#ifndef KPMCORE_UDF_H
#define KPMCORE_UDF_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A udf file system.

View File

@ -15,18 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_UFS_H)
#ifndef KPMCORE_UFS_H
#define KPMCORE_UFS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class QString;
namespace FS
{
/** A UFS file system.

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_UNFORMATTED_H)
#ifndef KPMCORE_UNFORMATTED_H
#define KPMCORE_UNFORMATTED_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A pseudo file system for unformatted partitions.

View File

@ -22,8 +22,6 @@
#include "fs/filesystem.h"
#include <QtGlobal>
namespace FS
{
/** A pseudo file system for partitions whose file system we cannot determine.

View File

@ -23,8 +23,6 @@
#include "util/report.h"
#include <QRegularExpression>
#include <QString>
#include <QStringList>
#include <QTemporaryDir>
#include <KLocalizedString>

View File

@ -15,20 +15,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_XFS_H)
#ifndef KPMCORE_XFS_H
#define KPMCORE_XFS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** An XFS file system.

View File

@ -22,8 +22,6 @@
#include "util/capacity.h"
#include "util/report.h"
#include <QString>
namespace FS
{
FileSystem::CommandSupportType zfs::m_GetUsed = FileSystem::cmdSupportNone;

View File

@ -16,20 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
*************************************************************************/
#if !defined(KPMCORE_ZFS_H)
#ifndef KPMCORE_ZFS_H
#define KPMCORE_ZFS_H
#include "util/libpartitionmanagerexport.h"
#include "fs/filesystem.h"
#include <QtGlobal>
class Report;
class QString;
namespace FS
{
/** A zfs file system.

View File

@ -36,8 +36,6 @@
#include <QEventLoop>
#include <QtGlobal>
#include <QStandardPaths>
#include <QString>
#include <QStringList>
#include <QTimer>
#include <QThread>
#include <QVariant>

View File

@ -23,8 +23,6 @@
#include <QDebug>
#include <QProcess>
#include <QString>
#include <QStringList>
#include <QtGlobal>
#include <QThread>
#include <QVariant>

View File

@ -22,7 +22,6 @@
#include <QCoreApplication>
#include <QDebug>
#include <QFile>
#include <QString>
#include <QTime>
#include <QVariant>

View File

@ -24,7 +24,6 @@
#include <KAuth>
#include <QEventLoop>
#include <QString>
#include <QProcess>
using namespace KAuth;