[libcalamares] Remove Typedefs.h
- This small header file contained a few unrelated typedefs. Move those typedefs to the classes they relate to. This **does** mean that some consumers need to #include something else instead. - Use type names more consistently. Editorial: why are **pages** responsible for creating the jobs?
This commit is contained in:
parent
a99eccf19d
commit
9331a25905
@ -20,8 +20,6 @@
|
|||||||
#ifndef CALAMARESAPPLICATION_H
|
#ifndef CALAMARESAPPLICATION_H
|
||||||
#define CALAMARESAPPLICATION_H
|
#define CALAMARESAPPLICATION_H
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
class CalamaresWindow;
|
class CalamaresWindow;
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
#include "Job.h"
|
#include "Job.h"
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
|
@ -20,9 +20,10 @@
|
|||||||
#define CALAMARES_JOB_H
|
#define CALAMARES_JOB_H
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QSharedPointer>
|
||||||
|
|
||||||
namespace Calamares {
|
namespace Calamares {
|
||||||
|
|
||||||
@ -97,6 +98,9 @@ private:
|
|||||||
bool m_emergency = false;
|
bool m_emergency = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
using job_ptr = QSharedPointer< Job >;
|
||||||
|
using JobList = QList< job_ptr >;
|
||||||
|
|
||||||
} // namespace Calamares
|
} // namespace Calamares
|
||||||
|
|
||||||
#endif // CALAMARES_JOB_H
|
#endif // CALAMARES_JOB_H
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#define CALAMARES_JOBQUEUE_H
|
#define CALAMARES_JOBQUEUE_H
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Typedefs.h"
|
#include "Job.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
|
||||||
*
|
|
||||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
|
||||||
*
|
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Calamares is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef TYPEDEFS_H
|
|
||||||
#define TYPEDEFS_H
|
|
||||||
|
|
||||||
#include <QList>
|
|
||||||
#include <QSharedPointer>
|
|
||||||
|
|
||||||
namespace Calamares
|
|
||||||
{
|
|
||||||
class Job;
|
|
||||||
|
|
||||||
typedef QSharedPointer< Job > job_ptr;
|
|
||||||
using JobList = QList< job_ptr >;
|
|
||||||
|
|
||||||
class ViewStep;
|
|
||||||
typedef QList< ViewStep* > ViewStepList;
|
|
||||||
|
|
||||||
} //ns
|
|
||||||
|
|
||||||
#endif // TYPEDEFS_H
|
|
@ -22,7 +22,6 @@
|
|||||||
#define BRANDING_H
|
#define BRANDING_H
|
||||||
|
|
||||||
#include "UiDllMacro.h"
|
#include "UiDllMacro.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include "utils/NamedSuffix.h"
|
#include "utils/NamedSuffix.h"
|
||||||
|
|
||||||
|
@ -21,19 +21,14 @@
|
|||||||
#define VIEWMANAGER_H
|
#define VIEWMANAGER_H
|
||||||
|
|
||||||
#include "UiDllMacro.h"
|
#include "UiDllMacro.h"
|
||||||
#include "Typedefs.h"
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
|
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
|
||||||
class ViewStep;
|
|
||||||
class ExecutionViewStep;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The ViewManager class handles progression through view pages.
|
* @brief The ViewManager class handles progression through view pages.
|
||||||
* @note Singleton object, only use through ViewManager::instance().
|
* @note Singleton object, only use through ViewManager::instance().
|
||||||
|
@ -20,11 +20,10 @@
|
|||||||
#ifndef CALAMARES_MODULE_H
|
#ifndef CALAMARES_MODULE_H
|
||||||
#define CALAMARES_MODULE_H
|
#define CALAMARES_MODULE_H
|
||||||
|
|
||||||
|
#include "Job.h"
|
||||||
#include "Requirement.h"
|
#include "Requirement.h"
|
||||||
#include "UiDllMacro.h"
|
#include "UiDllMacro.h"
|
||||||
|
|
||||||
#include <Typedefs.h>
|
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#define MODULELOADER_H
|
#define MODULELOADER_H
|
||||||
|
|
||||||
#include "Requirement.h"
|
#include "Requirement.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
#ifndef VIEWSTEP_H
|
#ifndef VIEWSTEP_H
|
||||||
#define VIEWSTEP_H
|
#define VIEWSTEP_H
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
|
||||||
#include "Typedefs.h"
|
#include "Job.h"
|
||||||
#include "UiDllMacro.h"
|
#include "UiDllMacro.h"
|
||||||
|
|
||||||
#include "modulesystem/Requirement.h"
|
#include "modulesystem/Requirement.h"
|
||||||
@ -159,6 +160,7 @@ protected:
|
|||||||
QString m_instanceKey;
|
QString m_instanceKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
using ViewStepList = QList< ViewStep* >;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // VIEWSTEP_H
|
#endif // VIEWSTEP_H
|
||||||
|
@ -24,13 +24,11 @@
|
|||||||
#ifndef KEYBOARDPAGE_H
|
#ifndef KEYBOARDPAGE_H
|
||||||
#define KEYBOARDPAGE_H
|
#define KEYBOARDPAGE_H
|
||||||
|
|
||||||
#include "keyboardwidget/keyboardglobal.h"
|
#include "Job.h"
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
#include <QWidget>
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
@ -50,7 +48,7 @@ public:
|
|||||||
|
|
||||||
QString prettyStatus() const;
|
QString prettyStatus() const;
|
||||||
|
|
||||||
QList< Calamares::job_ptr > createJobs( const QString& xOrgConfFileName,
|
Calamares::JobList createJobs( const QString& xOrgConfFileName,
|
||||||
const QString& convertedKeymapPath,
|
const QString& convertedKeymapPath,
|
||||||
bool writeEtcDefaultKeyboard );
|
bool writeEtcDefaultKeyboard );
|
||||||
|
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
#ifndef LOCALEPAGE_H
|
#ifndef LOCALEPAGE_H
|
||||||
#define LOCALEPAGE_H
|
#define LOCALEPAGE_H
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include "LocaleConfiguration.h"
|
#include "LocaleConfiguration.h"
|
||||||
|
#include "Job.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ public:
|
|||||||
|
|
||||||
QString prettyStatus() const;
|
QString prettyStatus() const;
|
||||||
|
|
||||||
QList< Calamares::job_ptr > createJobs();
|
Calamares::JobList createJobs();
|
||||||
|
|
||||||
QMap< QString, QString > localesMap();
|
QMap< QString, QString > localesMap();
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "PackageModel.h"
|
#include "PackageModel.h"
|
||||||
#include "PackageTreeItem.h"
|
#include "PackageTreeItem.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include <QAbstractButton>
|
#include <QAbstractButton>
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
#ifdef DEBUG_PARTITION_LAME
|
#ifdef DEBUG_PARTITION_LAME
|
||||||
#include "JobExample.h"
|
#include "JobExample.h"
|
||||||
#endif
|
#endif
|
||||||
#include "Typedefs.h"
|
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
// KPMcore
|
// KPMcore
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
#include "core/KPMHelpers.h"
|
#include "core/KPMHelpers.h"
|
||||||
#include "core/PartitionLayout.h"
|
#include "core/PartitionLayout.h"
|
||||||
#include "core/PartitionModel.h"
|
#include "core/PartitionModel.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
#include "Job.h"
|
||||||
|
|
||||||
// KPMcore
|
// KPMcore
|
||||||
#include <kpmcore/core/lvmdevice.h>
|
#include <kpmcore/core/lvmdevice.h>
|
||||||
@ -172,7 +173,7 @@ public:
|
|||||||
* requested by the user.
|
* requested by the user.
|
||||||
* @return a list of jobs.
|
* @return a list of jobs.
|
||||||
*/
|
*/
|
||||||
QList< Calamares::job_ptr > jobs() const;
|
Calamares::JobList jobs() const;
|
||||||
|
|
||||||
bool hasRootMountPoint() const;
|
bool hasRootMountPoint() const;
|
||||||
|
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
#include "core/PartUtils.h"
|
#include "core/PartUtils.h"
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
// KPMcore
|
// KPMcore
|
||||||
#include <kpmcore/core/partitiontable.h>
|
#include <kpmcore/core/partitiontable.h>
|
||||||
#include <kpmcore/fs/filesystem.h>
|
#include <kpmcore/fs/filesystem.h>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef SUMMARYPAGE_H
|
#ifndef SUMMARYPAGE_H
|
||||||
#define SUMMARYPAGE_H
|
#define SUMMARYPAGE_H
|
||||||
|
|
||||||
#include "Typedefs.h"
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
@ -24,9 +24,8 @@
|
|||||||
#ifndef USERSPAGE_H
|
#ifndef USERSPAGE_H
|
||||||
#define USERSPAGE_H
|
#define USERSPAGE_H
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include "CheckPWQuality.h"
|
#include "CheckPWQuality.h"
|
||||||
|
#include "Job.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ public:
|
|||||||
|
|
||||||
bool isReady();
|
bool isReady();
|
||||||
|
|
||||||
QList< Calamares::job_ptr > createJobs( const QStringList& defaultGroupsList );
|
Calamares::JobList createJobs( const QStringList& defaultGroupsList );
|
||||||
|
|
||||||
void onActivate();
|
void onActivate();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user