Commit ab48bc4f authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

make KIO optional on Android and required everywhere else

parent f5170ed6
Pipeline #71650 passed with stage
in 17 seconds
......@@ -136,9 +136,14 @@ set_package_properties(KF5Package PROPERTIES
TYPE RECOMMENDED)
find_package(KF5KIO ${REQUIRED_KF5_VERSION} CONFIG QUIET)
if (ANDROID)
set(KIO_DEPENDENCY_TYPE OPTIONAL)
else()
set(KIO_DEPENDENCY_TYPE REQUIRED)
endif()
set_package_properties(KF5KIO PROPERTIES
DESCRIPTION "File management libraries used for file browsing."
TYPE RECOMMENDED)
TYPE ${KIO_DEPENDENCY_TYPE})
find_package(UPNPQT CONFIG QUIET)
set_package_properties(UPNPQT PROPERTIES
......
......@@ -27,6 +27,7 @@ Elisa has the following dependencies:
* KF5CoreAddons (required version >= 5.70.0), Qt addon library with a collection of non-GUI utilities.
* KF5Config (required version >= 5.70.0), Persistent platform-independent application settings.
* KF5IconThemes (required version >= 5.70.0), Support for icon themes.
* KF5KIO (required version >= 5.70.0), File management libraries used for file browsing. Optional on Android.
* ECM (required version >= 1.6.0)
* Qt5Core
......@@ -38,7 +39,6 @@ Elisa has the following dependencies:
* KF5XmlGui (required version >= 5.70.0), Framework for managing menu and toolbar actions.
* KF5ConfigWidgets (required version >= 5.70.0), Widgets for configuration dialogs.
* KF5Package (required version >= 5.70.0), KF5 package management library needed to get the configuration dialogs.
* KF5KIO (required version >= 5.70.0), File management libraries used for file browsing.
* LIBVLC, libvlc allows to play music in Elisa, <https://www.videolan.org/vlc/libvlc.html>
-- OPTIONAL:
......
......@@ -35,7 +35,10 @@
#include <KColorSchemeManager>
#include <KCoreAddons/KAboutData>
#if defined KF5KIO_FOUND && KF5KIO_FOUND
#include <KIO/OpenFileManagerWindowJob>
#endif
#include <QQmlEngine>
#include <QQmlComponent>
......@@ -552,7 +555,11 @@ bool ElisaApplication::eventFilter(QObject *object, QEvent *event)
void ElisaApplication::showInFolder(QUrl filePath)
{
#if defined KF5KIO_FOUND && KF5KIO_FOUND
KIO::highlightInFileManager({filePath});
#else
Q_UNUSED(filePath)
#endif
}
const DataTypes::EntryDataList &ElisaApplication::arguments() const
......
......@@ -12,8 +12,12 @@
#include "viewsLogging.h"
#include "models/datamodel.h"
#include "models/gridviewproxymodel.h"
#if defined KF5KIO_FOUND && KF5KIO_FOUND
#include "models/filebrowsermodel.h"
#include "models/filebrowserproxymodel.h"
#endif
#include "elisa_settings.h"
#include <KI18n/KLocalizedString>
......@@ -286,9 +290,14 @@ void ViewManager::openViewFromData(const ViewParameters &viewParamaters)
{
case FileBrowserModel:
{
#if defined KF5KIO_FOUND && KF5KIO_FOUND
newModel = new ::FileBrowserModel;
auto *realProxyModel = new FileBrowserProxyModel;
proxyModel = realProxyModel;
#else
newModel = nullptr;
proxyModel = nullptr;
#endif
break;
}
case GenericDataModel:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment