mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	core: add ability to get underlying dive to DiveObjectHelper
This feels a bit like cheating, but if we need to be able to make modifications to the underlying dive and only have the helper object (for example inside of a view model), doing everything through the helper object can turn into a real performance issue. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									583d8d653a
								
							
						
					
					
						commit
						66184d58e8
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		|  | @ -81,6 +81,11 @@ int DiveObjectHelper::id() const | |||
| 	return m_dive->id; | ||||
| } | ||||
| 
 | ||||
| struct dive *DiveObjectHelper::getDive() const | ||||
| { | ||||
| 	return m_dive; | ||||
| } | ||||
| 
 | ||||
| QString DiveObjectHelper::date() const | ||||
| { | ||||
| 	QDateTime localTime = QDateTime::fromMSecsSinceEpoch(1000*m_dive->when, Qt::UTC); | ||||
|  |  | |||
|  | @ -56,6 +56,7 @@ public: | |||
| 	~DiveObjectHelper(); | ||||
| 	int number() const; | ||||
| 	int id() const; | ||||
| 	struct dive *getDive() const; | ||||
| 	int rating() const; | ||||
| 	int visibility() const; | ||||
| 	QString date() const; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue