diff options
author | Sebastian Kügler <sebas@kde.org> | 2015-11-12 01:37:18 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-11 19:05:33 -0800 |
commit | 52b8cb5aa98d8de1d41ce2a2b3fc16e542451df3 (patch) | |
tree | d9c55f175c4db36c5573d881747d764506cf8ff8 /profile-widget | |
parent | 6e43642610d6542aa3a4def3aea50823d3437579 (diff) | |
download | subsurface-52b8cb5aa98d8de1d41ce2a2b3fc16e542451df3.tar.gz |
profilewidget2: Only add actions in desktop version
This fixes a bunch of warnings in the mobile version where these slots
are not defined (see the corresponding header's conditionals).
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index ca9eead95..eae4b3f21 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -127,6 +127,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), setupItemOnScene(); addItemsToScene(); scene()->installEventFilter(this); +#ifndef SUBSURFACE_MOBILE QAction *action = NULL; #define ADD_ACTION(SHORTCUT, Slot) \ action = new QAction(this); \ @@ -143,6 +144,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), ADD_ACTION(Qt::Key_Left, keyLeftAction()); ADD_ACTION(Qt::Key_Right, keyRightAction()); #undef ADD_ACTION +#endif // SUBSURFACE_MOBILE #if !defined(QT_NO_DEBUG) && defined(SHOW_PLOT_INFO_TABLE) QTableView *diveDepthTableView = new QTableView(); @@ -1153,10 +1155,12 @@ void ProfileWidget2::setAddState() DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance(); connect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot())); connect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(replot())); +#ifndef SUBSURFACE_MOBILE connect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(pointInserted(const QModelIndex &, int, int))); connect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(pointsRemoved(const QModelIndex &, int, int))); +#endif /* show the same stuff that the profile shows. */ currentState = ADD; /* enable the add state. */ diveCeiling->setVisible(true); @@ -1573,11 +1577,12 @@ void ProfileWidget2::disconnectTemporaryConnections() disconnect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot())); disconnect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(replot())); +#ifndef SUBSURFACE_MOBILE disconnect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(pointInserted(const QModelIndex &, int, int))); disconnect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SLOT(pointsRemoved(const QModelIndex &, int, int))); - +#endif Q_FOREACH (QAction *action, actionsForKeys.values()) { action->setShortcut(QKeySequence()); action->setShortcutContext(Qt::WidgetShortcut); |