Remove usermanual when building for Android

Our usermanual is based on webkit, and thats not supported in Qt for
Android. We should probably replace it with a Android native webview
somehow.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-03-26 23:35:24 +01:00 committed by Dirk Hohndel
parent 42df3528a0
commit 605cff32a5
5 changed files with 17 additions and 4 deletions

View file

@ -38,6 +38,9 @@
#include "about.h" #include "about.h"
#include "printdialog.h" #include "printdialog.h"
#include "divelogimportdialog.h" #include "divelogimportdialog.h"
#ifndef NO_USERMANUAL
#include "usermanual.h"
#endif
MainWindow *MainWindow::m_Instance = NULL; MainWindow *MainWindow::m_Instance = NULL;
@ -85,6 +88,9 @@ MainWindow::MainWindow() : QMainWindow(),
ui.layoutWidget->hide(); ui.layoutWidget->hide();
ui.menuView->removeAction(ui.actionViewGlobe); ui.menuView->removeAction(ui.actionViewGlobe);
#endif #endif
#ifdef NO_USERMANUAL
ui.menuHelp->removeAction(ui.actionUserManual);
#endif
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
@ -554,10 +560,12 @@ void MainWindow::on_actionAboutSubsurface_triggered()
void MainWindow::on_actionUserManual_triggered() void MainWindow::on_actionUserManual_triggered()
{ {
#ifndef NO_USERMANUAL
if (!helpView) { if (!helpView) {
helpView = new UserManual(); helpView = new UserManual();
} }
helpView->show(); helpView->show();
#endif
} }
QString MainWindow::filter() QString MainWindow::filter()

View file

@ -12,7 +12,6 @@
#include <QUrl> #include <QUrl>
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "usermanual.h"
struct DiveList; struct DiveList;
class QSortFilterProxyModel; class QSortFilterProxyModel;
@ -156,7 +155,7 @@ private:
Ui::MainWindow ui; Ui::MainWindow ui;
QAction *actionNextDive; QAction *actionNextDive;
QAction *actionPreviousDive; QAction *actionPreviousDive;
UserManual *helpView; QMainWindow *helpView;
QTreeView *yearlyStats; QTreeView *yearlyStats;
QAbstractItemModel *yearlyStatsModel; QAbstractItemModel *yearlyStatsModel;
CurrentState state; CurrentState state;

View file

@ -29,5 +29,4 @@ private:
Ui::UserManual *ui; Ui::UserManual *ui;
void search(QString, QWebPage::FindFlags); void search(QString, QWebPage::FindFlags);
}; };
#endif // USERMANUAL_H #endif // USERMANUAL_H

View file

@ -139,7 +139,7 @@ isEmpty(LIBGIT2DEVEL) {
link_pkgconfig: packagesExist(libiconv): PKGCONFIG += libiconv link_pkgconfig: packagesExist(libiconv): PKGCONFIG += libiconv
# disable things when were on android # disable things when were on android
contains(QMAKE_PLATFORM, android): DEFINES += NO_MARBLE contains(QMAKE_PLATFORM, android): DEFINES += NO_MARBLE NO_USERMANUAL
# #
# Find libmarble # Find libmarble

View file

@ -76,6 +76,8 @@ HEADERS = \
qt-ui/profile/divetooltipitem.h \ qt-ui/profile/divetooltipitem.h \
qt-ui/profile/ruleritem.h qt-ui/profile/ruleritem.h
android: HEADERS -= qt-ui/usermanual.h
SOURCES = \ SOURCES = \
deco.c \ deco.c \
device.c \ device.c \
@ -146,6 +148,8 @@ else: linux*: SOURCES += linux.c
mac: SOURCES += macos.c mac: SOURCES += macos.c
win32: SOURCES += windows.c win32: SOURCES += windows.c
android: SOURCES -= qt-ui/usermanual.cpp
FORMS = \ FORMS = \
qt-ui/about.ui \ qt-ui/about.ui \
qt-ui/divecomputermanagementdialog.ui \ qt-ui/divecomputermanagementdialog.ui \
@ -163,6 +167,9 @@ FORMS = \
qt-ui/divelogimportdialog.ui \ qt-ui/divelogimportdialog.ui \
qt-ui/usermanual.ui qt-ui/usermanual.ui
# Usermanual isn't supported on android right now
android: FORMS -= qt-ui/usermanual.ui
RESOURCES = subsurface.qrc RESOURCES = subsurface.qrc
TRANSLATIONS = \ TRANSLATIONS = \