mirror of https://github.com/KDE/kasts.git
Move models to dedicated directory
This commit is contained in:
parent
59c4894639
commit
117f314d0d
|
@ -3,27 +3,27 @@
|
|||
|
||||
set(SRCS_base
|
||||
main.cpp
|
||||
feedsmodel.cpp
|
||||
entriesmodel.cpp
|
||||
fetcher.cpp
|
||||
database.cpp
|
||||
entry.cpp
|
||||
feed.cpp
|
||||
author.cpp
|
||||
enclosure.cpp
|
||||
enclosuredownloadjob.cpp
|
||||
queuemodel.cpp
|
||||
episodemodel.cpp
|
||||
downloadmodel.cpp
|
||||
datamanager.cpp
|
||||
audiomanager.cpp
|
||||
powermanagementinterface.cpp
|
||||
errorlogmodel.cpp
|
||||
error.cpp
|
||||
podcastsearchmodel.cpp
|
||||
enclosuredownloadjob.cpp
|
||||
storagemanager.cpp
|
||||
storagemovejob.cpp
|
||||
models/feedsmodel.cpp
|
||||
models/entriesmodel.cpp
|
||||
models/queuemodel.cpp
|
||||
models/episodemodel.cpp
|
||||
models/downloadmodel.cpp
|
||||
models/errorlogmodel.cpp
|
||||
models/podcastsearchmodel.cpp
|
||||
mpris2/mpris2.cpp
|
||||
powermanagementinterface.cpp
|
||||
resources.qrc
|
||||
)
|
||||
|
||||
|
@ -41,13 +41,6 @@ ecm_qt_declare_logging_category(SRCS_base
|
|||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "downloadmodellogging.h"
|
||||
IDENTIFIER "kastsDownloadModel"
|
||||
CATEGORY_NAME "org.kde.kasts.downloadmodel"
|
||||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "enclosurelogging.h"
|
||||
IDENTIFIER "kastsEnclosure"
|
||||
|
@ -55,13 +48,6 @@ ecm_qt_declare_logging_category(SRCS_base
|
|||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "storagemovejoblogging.h"
|
||||
IDENTIFIER "kastsStorageMoveJob"
|
||||
CATEGORY_NAME "org.kde.kasts.storagemovejob"
|
||||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "feedlogging.h"
|
||||
IDENTIFIER "kastsFeed"
|
||||
|
@ -76,6 +62,20 @@ ecm_qt_declare_logging_category(SRCS_base
|
|||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "models/downloadmodellogging.h"
|
||||
IDENTIFIER "kastsDownloadModel"
|
||||
CATEGORY_NAME "org.kde.kasts.downloadmodel"
|
||||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "models/queuemodellogging.h"
|
||||
IDENTIFIER "kastsQueueModel"
|
||||
CATEGORY_NAME "org.kde.kasts.queuemodel"
|
||||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "powermanagementinterfacelogging.h"
|
||||
IDENTIFIER "kastsPowerManagementInterface"
|
||||
|
@ -84,16 +84,16 @@ ecm_qt_declare_logging_category(SRCS_base
|
|||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "queuemodellogging.h"
|
||||
IDENTIFIER "kastsQueueModel"
|
||||
CATEGORY_NAME "org.kde.kasts.queuemodel"
|
||||
HEADER "storagemanagerlogging.h"
|
||||
IDENTIFIER "kastsStorageManager"
|
||||
CATEGORY_NAME "org.kde.kasts.storagemanager"
|
||||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
ecm_qt_declare_logging_category(SRCS_base
|
||||
HEADER "storagemanagerlogging.h"
|
||||
IDENTIFIER "kastsStorageManager"
|
||||
CATEGORY_NAME "org.kde.kasts.storagemanager"
|
||||
HEADER "storagemovejoblogging.h"
|
||||
IDENTIFIER "kastsStorageMoveJob"
|
||||
CATEGORY_NAME "org.kde.kasts.storagemovejob"
|
||||
DEFAULT_SEVERITY Info
|
||||
)
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
#include "audiologging.h"
|
||||
#include "datamanager.h"
|
||||
#include "errorlogmodel.h"
|
||||
#include "feed.h"
|
||||
#include "models/errorlogmodel.h"
|
||||
#include "powermanagementinterface.h"
|
||||
#include "settingsmanager.h"
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "database.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
|
@ -15,8 +17,6 @@
|
|||
#include <QXmlStreamReader>
|
||||
#include <QXmlStreamWriter>
|
||||
|
||||
#include "database.h"
|
||||
|
||||
#define TRUE_OR_RETURN(x) \
|
||||
if (!x) \
|
||||
return false;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QSqlQuery>
|
||||
|
||||
class Database : public QObject
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "datamanager.h"
|
||||
#include "datamanagerlogging.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
|
@ -17,7 +18,6 @@
|
|||
|
||||
#include "audiomanager.h"
|
||||
#include "database.h"
|
||||
#include "datamanagerlogging.h"
|
||||
#include "entry.h"
|
||||
#include "feed.h"
|
||||
#include "fetcher.h"
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "episodemodel.h"
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
#include "models/episodemodel.h"
|
||||
|
||||
class Entry;
|
||||
class Feed;
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
#include "audiomanager.h"
|
||||
#include "database.h"
|
||||
#include "datamanager.h"
|
||||
#include "downloadmodel.h"
|
||||
#include "enclosuredownloadjob.h"
|
||||
#include "entry.h"
|
||||
#include "error.h"
|
||||
#include "errorlogmodel.h"
|
||||
#include "fetcher.h"
|
||||
#include "models/downloadmodel.h"
|
||||
#include "models/errorlogmodel.h"
|
||||
#include "settingsmanager.h"
|
||||
#include "storagemanager.h"
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
#include "author.h"
|
||||
#include "database.h"
|
||||
#include "datamanager.h"
|
||||
#include "entriesmodel.h"
|
||||
#include "error.h"
|
||||
#include "feed.h"
|
||||
#include "feedlogging.h"
|
||||
#include "fetcher.h"
|
||||
#include "models/entriesmodel.h"
|
||||
|
||||
Feed::Feed(const QString &feedurl)
|
||||
: QObject(nullptr)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include "fetcher.h"
|
||||
#include "fetcherlogging.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <QDateTime>
|
||||
|
@ -23,7 +24,6 @@
|
|||
|
||||
#include "database.h"
|
||||
#include "enclosure.h"
|
||||
#include "fetcherlogging.h"
|
||||
#include "kasts-version.h"
|
||||
#include "settingsmanager.h"
|
||||
#include "storagemanager.h"
|
||||
|
|
14
src/main.cpp
14
src/main.cpp
|
@ -35,18 +35,18 @@
|
|||
#include "author.h"
|
||||
#include "database.h"
|
||||
#include "datamanager.h"
|
||||
#include "downloadmodel.h"
|
||||
#include "entriesmodel.h"
|
||||
#include "entry.h"
|
||||
#include "episodemodel.h"
|
||||
#include "errorlogmodel.h"
|
||||
#include "feed.h"
|
||||
#include "feedsmodel.h"
|
||||
#include "fetcher.h"
|
||||
#include "kasts-version.h"
|
||||
#include "models/downloadmodel.h"
|
||||
#include "models/entriesmodel.h"
|
||||
#include "models/episodemodel.h"
|
||||
#include "models/errorlogmodel.h"
|
||||
#include "models/feedsmodel.h"
|
||||
#include "models/podcastsearchmodel.h"
|
||||
#include "models/queuemodel.h"
|
||||
#include "mpris2/mpris2.h"
|
||||
#include "podcastsearchmodel.h"
|
||||
#include "queuemodel.h"
|
||||
#include "settingsmanager.h"
|
||||
#include "storagemanager.h"
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "downloadmodel.h"
|
||||
#include "models/downloadmodel.h"
|
||||
#include "models/downloadmodellogging.h"
|
||||
|
||||
#include "datamanager.h"
|
||||
#include "downloadmodellogging.h"
|
||||
#include "episodemodel.h"
|
||||
|
||||
DownloadModel::DownloadModel()
|
|
@ -5,10 +5,11 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "models/entriesmodel.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "datamanager.h"
|
||||
#include "entriesmodel.h"
|
||||
#include "entry.h"
|
||||
#include "feed.h"
|
||||
|
|
@ -4,7 +4,8 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "episodemodel.h"
|
||||
#include "models/episodemodel.h"
|
||||
|
||||
#include "datamanager.h"
|
||||
#include "entry.h"
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "errorlogmodel.h"
|
||||
#include "models/errorlogmodel.h"
|
||||
|
||||
#include <QSqlQuery>
|
||||
|
|
@ -5,6 +5,8 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "models/feedsmodel.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QModelIndex>
|
||||
#include <QSqlQuery>
|
||||
|
@ -13,7 +15,6 @@
|
|||
|
||||
#include "database.h"
|
||||
#include "datamanager.h"
|
||||
#include "feedsmodel.h"
|
||||
#include "fetcher.h"
|
||||
|
||||
FeedsModel::FeedsModel(QObject *parent)
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "podcastsearchmodel.h"
|
||||
#include "models/podcastsearchmodel.h"
|
||||
|
||||
#include <QCryptographicHash>
|
||||
#include <QDateTime>
|
|
@ -12,8 +12,8 @@
|
|||
#include <QObject>
|
||||
#include <QVariant>
|
||||
|
||||
#include "errorlogmodel.h"
|
||||
#include "feed.h"
|
||||
#include "models/errorlogmodel.h"
|
||||
|
||||
class PodcastSearchModel : public QAbstractListModel
|
||||
{
|
|
@ -4,14 +4,15 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "models/queuemodel.h"
|
||||
#include "models/queuemodellogging.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
|
||||
#include "audiomanager.h"
|
||||
#include "datamanager.h"
|
||||
#include "entry.h"
|
||||
#include "queuemodel.h"
|
||||
#include "queuemodellogging.h"
|
||||
|
||||
QueueModel::QueueModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
|
@ -42,10 +42,7 @@ Kirigami.ScrollablePage {
|
|||
width: Kirigami.Units.gridUnit * 20
|
||||
anchors.centerIn: parent
|
||||
|
||||
text: episodeType === EpisodeModel.All ? i18n("No Episodes Available")
|
||||
: episodeType === EpisodeModel.New ? i18n("No New Episodes")
|
||||
: episodeType === EpisodeModel.Unread ? i18n("No Unplayed Episodes")
|
||||
: i18n("No Episodes Available")
|
||||
text: i18n("No Episodes Available")
|
||||
}
|
||||
|
||||
Component {
|
||||
|
@ -57,7 +54,6 @@ Kirigami.ScrollablePage {
|
|||
|
||||
EpisodeModel {
|
||||
id: episodeModel
|
||||
type: episodeType
|
||||
}
|
||||
|
||||
ListView {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "storagemanager.h"
|
||||
#include "storagemanagerlogging.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
#include <QCryptographicHash>
|
||||
|
@ -17,7 +18,6 @@
|
|||
|
||||
#include "enclosure.h"
|
||||
#include "settingsmanager.h"
|
||||
#include "storagemanagerlogging.h"
|
||||
#include "storagemovejob.h"
|
||||
|
||||
StorageManager::StorageManager()
|
||||
|
|
|
@ -4,14 +4,15 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "storagemovejob.h"
|
||||
#include "storagemovejoblogging.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QTimer>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#include "storagemovejob.h"
|
||||
#include "storagemovejoblogging.h"
|
||||
|
||||
StorageMoveJob::StorageMoveJob(const QString &from, const QString &to, QStringList &list, QObject *parent)
|
||||
: KJob(parent)
|
||||
|
|
Loading…
Reference in New Issue