aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-03-26 23:35:24 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-27 10:41:52 -0700
commit605cff32a51bf8b5b7dba73fc18622afded39539 (patch)
tree86649ccbd29ffc5fef10a7b8442cad9868d6c41e
parent42df3528a07bbd097226151cb50c122210f47bf9 (diff)
downloadsubsurface-605cff32a51bf8b5b7dba73fc18622afded39539.tar.gz
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>
-rw-r--r--qt-ui/mainwindow.cpp8
-rw-r--r--qt-ui/mainwindow.h3
-rw-r--r--qt-ui/usermanual.h1
-rw-r--r--subsurface-configure.pri2
-rw-r--r--subsurface.pro7
5 files changed, 17 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index e1b9d3e4f..5b4e9b43d 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -38,6 +38,9 @@
#include "about.h"
#include "printdialog.h"
#include "divelogimportdialog.h"
+#ifndef NO_USERMANUAL
+#include "usermanual.h"
+#endif
MainWindow *MainWindow::m_Instance = NULL;
@@ -85,6 +88,9 @@ MainWindow::MainWindow() : QMainWindow(),
ui.layoutWidget->hide();
ui.menuView->removeAction(ui.actionViewGlobe);
#endif
+#ifdef NO_USERMANUAL
+ ui.menuHelp->removeAction(ui.actionUserManual);
+#endif
}
MainWindow::~MainWindow()
@@ -554,10 +560,12 @@ void MainWindow::on_actionAboutSubsurface_triggered()
void MainWindow::on_actionUserManual_triggered()
{
+#ifndef NO_USERMANUAL
if (!helpView) {
helpView = new UserManual();
}
helpView->show();
+#endif
}
QString MainWindow::filter()
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index e249398db..51e03c3b8 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -12,7 +12,6 @@
#include <QUrl>
#include "ui_mainwindow.h"
-#include "usermanual.h"
struct DiveList;
class QSortFilterProxyModel;
@@ -156,7 +155,7 @@ private:
Ui::MainWindow ui;
QAction *actionNextDive;
QAction *actionPreviousDive;
- UserManual *helpView;
+ QMainWindow *helpView;
QTreeView *yearlyStats;
QAbstractItemModel *yearlyStatsModel;
CurrentState state;
diff --git a/qt-ui/usermanual.h b/qt-ui/usermanual.h
index 280ca3896..7692a1143 100644
--- a/qt-ui/usermanual.h
+++ b/qt-ui/usermanual.h
@@ -29,5 +29,4 @@ private:
Ui::UserManual *ui;
void search(QString, QWebPage::FindFlags);
};
-
#endif // USERMANUAL_H
diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index 28c567f4e..14e5cef67 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -139,7 +139,7 @@ isEmpty(LIBGIT2DEVEL) {
link_pkgconfig: packagesExist(libiconv): PKGCONFIG += libiconv
# disable things when were on android
-contains(QMAKE_PLATFORM, android): DEFINES += NO_MARBLE
+contains(QMAKE_PLATFORM, android): DEFINES += NO_MARBLE NO_USERMANUAL
#
# Find libmarble
diff --git a/subsurface.pro b/subsurface.pro
index df5f796bf..baf1341b3 100644
--- a/subsurface.pro
+++ b/subsurface.pro
@@ -76,6 +76,8 @@ HEADERS = \
qt-ui/profile/divetooltipitem.h \
qt-ui/profile/ruleritem.h
+android: HEADERS -= qt-ui/usermanual.h
+
SOURCES = \
deco.c \
device.c \
@@ -146,6 +148,8 @@ else: linux*: SOURCES += linux.c
mac: SOURCES += macos.c
win32: SOURCES += windows.c
+android: SOURCES -= qt-ui/usermanual.cpp
+
FORMS = \
qt-ui/about.ui \
qt-ui/divecomputermanagementdialog.ui \
@@ -163,6 +167,9 @@ FORMS = \
qt-ui/divelogimportdialog.ui \
qt-ui/usermanual.ui
+# Usermanual isn't supported on android right now
+android: FORMS -= qt-ui/usermanual.ui
+
RESOURCES = subsurface.qrc
TRANSLATIONS = \