mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									6e43642610
								
							
						
					
					
						commit
						52b8cb5aa9
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -127,6 +127,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), | ||||||
| 	setupItemOnScene(); | 	setupItemOnScene(); | ||||||
| 	addItemsToScene(); | 	addItemsToScene(); | ||||||
| 	scene()->installEventFilter(this); | 	scene()->installEventFilter(this); | ||||||
|  | #ifndef SUBSURFACE_MOBILE | ||||||
| 	QAction *action = NULL; | 	QAction *action = NULL; | ||||||
| #define ADD_ACTION(SHORTCUT, Slot)                                  \ | #define ADD_ACTION(SHORTCUT, Slot)                                  \ | ||||||
| 	action = new QAction(this);                                 \ | 	action = new QAction(this);                                 \ | ||||||
|  | @ -143,6 +144,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), | ||||||
| 	ADD_ACTION(Qt::Key_Left, keyLeftAction()); | 	ADD_ACTION(Qt::Key_Left, keyLeftAction()); | ||||||
| 	ADD_ACTION(Qt::Key_Right, keyRightAction()); | 	ADD_ACTION(Qt::Key_Right, keyRightAction()); | ||||||
| #undef ADD_ACTION | #undef ADD_ACTION | ||||||
|  | #endif // SUBSURFACE_MOBILE
 | ||||||
| 
 | 
 | ||||||
| #if !defined(QT_NO_DEBUG) && defined(SHOW_PLOT_INFO_TABLE) | #if !defined(QT_NO_DEBUG) && defined(SHOW_PLOT_INFO_TABLE) | ||||||
| 	QTableView *diveDepthTableView = new QTableView(); | 	QTableView *diveDepthTableView = new QTableView(); | ||||||
|  | @ -1153,10 +1155,12 @@ void ProfileWidget2::setAddState() | ||||||
| 	DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance(); | 	DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance(); | ||||||
| 	connect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot())); | 	connect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot())); | ||||||
| 	connect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(replot())); | 	connect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(replot())); | ||||||
|  | #ifndef SUBSURFACE_MOBILE | ||||||
| 	connect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), | 	connect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), | ||||||
| 		this, SLOT(pointInserted(const QModelIndex &, int, int))); | 		this, SLOT(pointInserted(const QModelIndex &, int, int))); | ||||||
| 	connect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), | 	connect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), | ||||||
| 		this, SLOT(pointsRemoved(const QModelIndex &, int, int))); | 		this, SLOT(pointsRemoved(const QModelIndex &, int, int))); | ||||||
|  | #endif | ||||||
| 	/* show the same stuff that the profile shows. */ | 	/* show the same stuff that the profile shows. */ | ||||||
| 	currentState = ADD; /* enable the add state. */ | 	currentState = ADD; /* enable the add state. */ | ||||||
| 	diveCeiling->setVisible(true); | 	diveCeiling->setVisible(true); | ||||||
|  | @ -1573,11 +1577,12 @@ void ProfileWidget2::disconnectTemporaryConnections() | ||||||
| 	disconnect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot())); | 	disconnect(plannerModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(replot())); | ||||||
| 	disconnect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(replot())); | 	disconnect(plannerModel, SIGNAL(cylinderModelEdited()), this, SLOT(replot())); | ||||||
| 
 | 
 | ||||||
|  | #ifndef SUBSURFACE_MOBILE | ||||||
| 	disconnect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), | 	disconnect(plannerModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), | ||||||
| 		   this, SLOT(pointInserted(const QModelIndex &, int, int))); | 		   this, SLOT(pointInserted(const QModelIndex &, int, int))); | ||||||
| 	disconnect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), | 	disconnect(plannerModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), | ||||||
| 		   this, SLOT(pointsRemoved(const QModelIndex &, int, int))); | 		   this, SLOT(pointsRemoved(const QModelIndex &, int, int))); | ||||||
| 
 | #endif | ||||||
| 	Q_FOREACH (QAction *action, actionsForKeys.values()) { | 	Q_FOREACH (QAction *action, actionsForKeys.values()) { | ||||||
| 		action->setShortcut(QKeySequence()); | 		action->setShortcut(QKeySequence()); | ||||||
| 		action->setShortcutContext(Qt::WidgetShortcut); | 		action->setShortcutContext(Qt::WidgetShortcut); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue