[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
|
||||
#define CALAMARESAPPLICATION_H
|
||||
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
class CalamaresWindow;
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <QVariant>
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
#include "Job.h"
|
||||
|
||||
namespace Calamares
|
||||
|
@ -20,9 +20,10 @@
|
||||
#define CALAMARES_JOB_H
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
|
||||
namespace Calamares {
|
||||
|
||||
@ -97,6 +98,9 @@ private:
|
||||
bool m_emergency = false;
|
||||
};
|
||||
|
||||
using job_ptr = QSharedPointer< Job >;
|
||||
using JobList = QList< job_ptr >;
|
||||
|
||||
} // namespace Calamares
|
||||
|
||||
#endif // CALAMARES_JOB_H
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define CALAMARES_JOBQUEUE_H
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
#include "Job.h"
|
||||
|
||||
#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
|
||||
|
||||
#include "UiDllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include "utils/NamedSuffix.h"
|
||||
|
||||
|
@ -21,19 +21,14 @@
|
||||
#define VIEWMANAGER_H
|
||||
|
||||
#include "UiDllMacro.h"
|
||||
#include "Typedefs.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QPushButton>
|
||||
#include <QStackedWidget>
|
||||
|
||||
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
class ViewStep;
|
||||
class ExecutionViewStep;
|
||||
|
||||
/**
|
||||
* @brief The ViewManager class handles progression through view pages.
|
||||
* @note Singleton object, only use through ViewManager::instance().
|
||||
|
@ -20,11 +20,10 @@
|
||||
#ifndef CALAMARES_MODULE_H
|
||||
#define CALAMARES_MODULE_H
|
||||
|
||||
#include "Job.h"
|
||||
#include "Requirement.h"
|
||||
#include "UiDllMacro.h"
|
||||
|
||||
#include <Typedefs.h>
|
||||
|
||||
#include <QStringList>
|
||||
#include <QVariant>
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
#define MODULELOADER_H
|
||||
|
||||
#include "Requirement.h"
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
|
@ -20,10 +20,11 @@
|
||||
#ifndef VIEWSTEP_H
|
||||
#define VIEWSTEP_H
|
||||
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QSize>
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "Job.h"
|
||||
#include "UiDllMacro.h"
|
||||
|
||||
#include "modulesystem/Requirement.h"
|
||||
@ -159,6 +160,7 @@ protected:
|
||||
QString m_instanceKey;
|
||||
};
|
||||
|
||||
using ViewStepList = QList< ViewStep* >;
|
||||
}
|
||||
|
||||
#endif // VIEWSTEP_H
|
||||
|
@ -24,13 +24,11 @@
|
||||
#ifndef KEYBOARDPAGE_H
|
||||
#define KEYBOARDPAGE_H
|
||||
|
||||
#include "keyboardwidget/keyboardglobal.h"
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "Job.h"
|
||||
|
||||
#include <QListWidgetItem>
|
||||
#include <QWidget>
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -50,7 +48,7 @@ public:
|
||||
|
||||
QString prettyStatus() const;
|
||||
|
||||
QList< Calamares::job_ptr > createJobs( const QString& xOrgConfFileName,
|
||||
Calamares::JobList createJobs( const QString& xOrgConfFileName,
|
||||
const QString& convertedKeymapPath,
|
||||
bool writeEtcDefaultKeyboard );
|
||||
|
||||
|
@ -20,9 +20,8 @@
|
||||
#ifndef LOCALEPAGE_H
|
||||
#define LOCALEPAGE_H
|
||||
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include "LocaleConfiguration.h"
|
||||
#include "Job.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -44,7 +43,7 @@ public:
|
||||
|
||||
QString prettyStatus() const;
|
||||
|
||||
QList< Calamares::job_ptr > createJobs();
|
||||
Calamares::JobList createJobs();
|
||||
|
||||
QMap< QString, QString > localesMap();
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include "PackageModel.h"
|
||||
#include "PackageTreeItem.h"
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QNetworkAccessManager>
|
||||
|
@ -50,7 +50,6 @@
|
||||
#ifdef DEBUG_PARTITION_LAME
|
||||
#include "JobExample.h"
|
||||
#endif
|
||||
#include "Typedefs.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
// KPMcore
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include "core/KPMHelpers.h"
|
||||
#include "core/PartitionLayout.h"
|
||||
#include "core/PartitionModel.h"
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include "Job.h"
|
||||
|
||||
// KPMcore
|
||||
#include <kpmcore/core/lvmdevice.h>
|
||||
@ -172,7 +173,7 @@ public:
|
||||
* requested by the user.
|
||||
* @return a list of jobs.
|
||||
*/
|
||||
QList< Calamares::job_ptr > jobs() const;
|
||||
Calamares::JobList jobs() const;
|
||||
|
||||
bool hasRootMountPoint() const;
|
||||
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
#include "core/PartUtils.h"
|
||||
|
||||
#include "Typedefs.h"
|
||||
|
||||
// KPMcore
|
||||
#include <kpmcore/core/partitiontable.h>
|
||||
#include <kpmcore/fs/filesystem.h>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef SUMMARYPAGE_H
|
||||
#define SUMMARYPAGE_H
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
|
@ -24,9 +24,8 @@
|
||||
#ifndef USERSPAGE_H
|
||||
#define USERSPAGE_H
|
||||
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include "CheckPWQuality.h"
|
||||
#include "Job.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -44,7 +43,7 @@ public:
|
||||
|
||||
bool isReady();
|
||||
|
||||
QList< Calamares::job_ptr > createJobs( const QStringList& defaultGroupsList );
|
||||
Calamares::JobList createJobs( const QStringList& defaultGroupsList );
|
||||
|
||||
void onActivate();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user