1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Cleanup unused includes

Fix loadScreens -> loadInstalledContent renaming
This commit is contained in:
Elias 2019-02-07 14:27:13 +01:00
parent 5c530f5e13
commit 3a32d64b28
3 changed files with 4 additions and 11 deletions

View File

@ -3,21 +3,13 @@
#include <QFontDatabase> #include <QFontDatabase>
#include <QGuiApplication> #include <QGuiApplication>
#include <QIcon> #include <QIcon>
#include <QLibrary>
#include <QObject> #include <QObject>
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QQmlContext> #include <QQmlContext>
#include <QQmlEngine> #include <QQmlEngine>
#include <QThread>
#include <QQuickView>
#include <QScreen>
#include <QStringList> #include <QStringList>
#include <QUrl> #include <QUrl>
#include <QVariant>
#include <QWindow>
#include <QtGlobal> #include <QtGlobal>
#include <QtQuick/QQuickItem>
#include <QtWebEngine> #include <QtWebEngine>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -90,8 +82,7 @@ int main(int argc, char* argv[])
mainWindowEngine.rootContext()->setContextProperty("screenPlaySettings", &settings); mainWindowEngine.rootContext()->setContextProperty("screenPlaySettings", &settings);
mainWindowEngine.load(QUrl(QStringLiteral("qrc:/main.qml"))); mainWindowEngine.load(QUrl(QStringLiteral("qrc:/main.qml")));
installedListFilter.sortByRoleType("All"); installedListModel.loadInstalledContent();
installedListModel.loadScreens();
// Instead of setting "renderType: Text.NativeRendering" every time // Instead of setting "renderType: Text.NativeRendering" every time
// we can set it here once :) // we can set it here once :)

View File

@ -2,8 +2,10 @@
InstalledListFilter::InstalledListFilter(InstalledListModel* ilm) InstalledListFilter::InstalledListFilter(InstalledListModel* ilm)
{ {
setSourceModel(ilm); setSourceModel(ilm);
setFilterRole(InstalledListModel::InstalledRole::TitleRole); setFilterRole(InstalledListModel::InstalledRole::TitleRole);
sortByRoleType("All");
} }
void InstalledListFilter::sortByRoleType(QString type) void InstalledListFilter::sortByRoleType(QString type)

View File

@ -227,7 +227,7 @@ public slots:
m_localStoragePath = cleanedPath.toString(); m_localStoragePath = cleanedPath.toString();
emit localStoragePathChanged(cleanedPath.toString()); emit localStoragePathChanged(cleanedPath.toString());
m_ilm->reset(); m_ilm->reset();
m_ilm->loadScreens(); m_ilm->loadInstalledContent();
} }
void setDecoder(QString decoder) void setDecoder(QString decoder)