mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	diveplanner.cpp cleanup
* Add missing DivePlannerPointsModel::tempDive to the constructor initialize list. * ExpanderGraphics class: Construct pointer-variable members into initialize list, Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									9eb47602dd
								
							
						
					
					
						commit
						2d3e48f4ae
					
				
					 1 changed files with 8 additions and 9 deletions
				
			
		|  | @ -1117,7 +1117,7 @@ int DivePlannerPointsModel::rowCount(const QModelIndex& parent) const | ||||||
| 	return divepoints.count(); | 	return divepoints.count(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| DivePlannerPointsModel::DivePlannerPointsModel(QObject* parent): QAbstractTableModel(parent), mode(NOTHING), stagingDive(NULL) | DivePlannerPointsModel::DivePlannerPointsModel(QObject* parent): QAbstractTableModel(parent), mode(NOTHING), tempDive(NULL), stagingDive(NULL) | ||||||
| { | { | ||||||
| 	diveplan.dp = NULL; | 	diveplan.dp = NULL; | ||||||
| } | } | ||||||
|  | @ -1508,13 +1508,14 @@ void DivePlannerPointsModel::createPlan() | ||||||
| 	CylindersModel::instance()->update(); | 	CylindersModel::instance()->update(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ExpanderGraphics::ExpanderGraphics(QGraphicsItem* parent): QGraphicsRectItem(parent) | ExpanderGraphics::ExpanderGraphics(QGraphicsItem* parent) : QGraphicsRectItem(parent), | ||||||
|  | 	icon(new QGraphicsPixmapItem(this)), | ||||||
|  | 	increaseBtn(new Button(0, this)), | ||||||
|  | 	decreaseBtn(new Button(0, this)), | ||||||
|  | 	bg(new QGraphicsPixmapItem(this)), | ||||||
|  | 	leftWing(new QGraphicsPixmapItem(this)), | ||||||
|  | 	rightWing(new QGraphicsPixmapItem(this)) | ||||||
| { | { | ||||||
| 	icon = new QGraphicsPixmapItem(this); |  | ||||||
| 	bg = new QGraphicsPixmapItem(this); |  | ||||||
| 	leftWing = new QGraphicsPixmapItem(this); |  | ||||||
| 	rightWing = new QGraphicsPixmapItem(this); |  | ||||||
| 
 |  | ||||||
| 	QPixmap p; | 	QPixmap p; | ||||||
| 	#define CREATE(item, pixmap) \ | 	#define CREATE(item, pixmap) \ | ||||||
| 	p = QPixmap(QString( pixmap ));\ | 	p = QPixmap(QString( pixmap ));\ | ||||||
|  | @ -1526,8 +1527,6 @@ ExpanderGraphics::ExpanderGraphics(QGraphicsItem* parent): QGraphicsRectItem(par | ||||||
| 	CREATE(rightWing, ":right_wing"); | 	CREATE(rightWing, ":right_wing"); | ||||||
| 	#undef CREATE | 	#undef CREATE | ||||||
| 
 | 
 | ||||||
| 	decreaseBtn = new Button(0, this); |  | ||||||
| 	increaseBtn = new Button(0, this); |  | ||||||
| 	decreaseBtn->setPixmap(QPixmap(":arrow_down")); | 	decreaseBtn->setPixmap(QPixmap(":arrow_down")); | ||||||
| 	increaseBtn->setPixmap(QPixmap(":arrow_up")); | 	increaseBtn->setPixmap(QPixmap(":arrow_up")); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue