diff --git a/src/config-kexi.h.cmake b/src/config-kexi.h.cmake --- a/src/config-kexi.h.cmake +++ b/src/config-kexi.h.cmake @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2006-2016 Jarosław Staniek + Copyright (C) 2006-2018 Jarosław Staniek This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -102,6 +102,7 @@ //! @brief If defined, support for project templates is enabled in Kexi #cmakedefine KEXI_PROJECT_TEMPLATES +#ifndef KEXI_MOBILE //! @def KEXI_AUTORISE_TABBED_TOOLBAR //! @brief If defined, tabs in the main tabbed toolbar autorise in Kexi #cmakedefine KEXI_AUTORISE_TABBED_TOOLBAR @@ -112,6 +113,7 @@ //! on Windows and macOS. //! @note Non-plasma Linux desktops still default to the simple replacement at runtime. #cmakedefine KEXI_USE_KFILEWIDGET +#endif // !KEXI_MOBILE //! @def KEXI_FORM_CURSOR_PROPERTY_SUPPORT //! @brief If defined, "cursor" property is displayed in the form designer diff --git a/src/kexiutils/CMakeLists.txt b/src/kexiutils/CMakeLists.txt --- a/src/kexiutils/CMakeLists.txt +++ b/src/kexiutils/CMakeLists.txt @@ -61,13 +61,13 @@ KF5::I18n KF5::ItemViews # KCategorizedView KCategoryDrawer KDb - PRIVATE - KF5::KIOFileWidgets # KFileWidget::getStartUrl(), KRecentDirs ) if(SHOULD_BUILD_KEXI_DESKTOP_APP) target_link_libraries(kexiutils PUBLIC KF5::KIOWidgets #for KRun... + PRIVATE + KF5::KIOFileWidgets # KFileWidget::getStartUrl(), KRecentDirs ) #target_link_libraries(kexiutils LINK_INTERFACE_LIBRARIES KF5::KIOWidgets) endif() diff --git a/src/kexiutils/utils.h b/src/kexiutils/utils.h --- a/src/kexiutils/utils.h +++ b/src/kexiutils/utils.h @@ -241,6 +241,7 @@ KEXIUTILS_EXPORT QUrl getSaveImageUrl(QWidget *parent = 0, const QString &caption = QString(), const QUrl &directory = QUrl()); +#ifndef KEXI_MOBILE /** * This method implements the logic to determine the user's default directory * to be listed. E.g. the documents directory, home directory or a recently @@ -274,6 +275,7 @@ * @todo Make it independent of KIOFileWidgets */ KEXIUTILS_EXPORT void addRecentDir(const QString &fileClass, const QString &directory); +#endif // !KEXI_MOBILE /*! Displays a "The file %1 already exists. Do you want to overwrite it?" Yes/No message box. @a parent is used as a parent of the message box. diff --git a/src/kexiutils/utils.cpp b/src/kexiutils/utils.cpp --- a/src/kexiutils/utils.cpp +++ b/src/kexiutils/utils.cpp @@ -63,17 +63,17 @@ #include #ifndef KEXI_MOBILE -#include +#include +#include #include #include +#include #endif #include #include #include -#include #include #include -#include #if HAVE_LANGINFO_H #include @@ -326,6 +326,7 @@ } } +#ifndef KEXI_MOBILE QUrl KexiUtils::getStartUrl(const QUrl &startDirOrVariable, QString *recentDirClass) { QUrl result; @@ -347,6 +348,7 @@ { KRecentDirs::add(fileClass, directory); } +#endif bool KexiUtils::askForFileOverwriting(const QString& filePath, QWidget *parent) { @@ -742,7 +744,12 @@ tristate KexiUtils::openHyperLink(const QUrl &url, QWidget *parent, const OpenHyperlinkOptions &options) { -#ifndef KEXI_MOBILE +#ifdef KEXI_MOBILE + //! @todo + Q_UNUSED(url) + Q_UNUSED(parent) + Q_UNUSED(options) +#else if (url.isLocalFile()) { QFileInfo fileInfo(url.toLocalFile()); if (!fileInfo.exists()) { diff --git a/src/mobile/KexiMobileMainWindow.h b/src/mobile/KexiMobileMainWindow.h --- a/src/mobile/KexiMobileMainWindow.h +++ b/src/mobile/KexiMobileMainWindow.h @@ -45,7 +45,8 @@ virtual void acceptProjectClosingRequested(bool *cancel); virtual void acceptPropertySetEditing(); virtual KActionCollection* actionCollection() const; - virtual void addSearchableModel(KexiSearchableModel*); + void addSearchableModel(KexiSearchableModel *model) ; + void removeSearchableModel(KexiSearchableModel *model) override; virtual void addToolBarAction(const QString& toolBarName, QAction* action); virtual QList< QAction* > allActions() const; virtual void appendWidgetToToolbar(const QString& name, QWidget* widget); diff --git a/src/mobile/KexiMobileMainWindow.cpp b/src/mobile/KexiMobileMainWindow.cpp --- a/src/mobile/KexiMobileMainWindow.cpp +++ b/src/mobile/KexiMobileMainWindow.cpp @@ -364,9 +364,14 @@ return true; } -void KexiMobileMainWindow::addSearchableModel(KexiSearchableModel*) +void KexiMobileMainWindow::addSearchableModel(KexiSearchableModel *model) { + Q_UNUSED(model) +} +void KexiMobileMainWindow::removeSearchableModel(KexiSearchableModel *model) +{ + Q_UNUSED(model) } tristate KexiMobileMainWindow::getNewObjectInfo(KexiPart::Item*, const QString&, KexiPart::Part*, bool, bool*, const QString&)