mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Undo: remove unrelated include in command_divelist.cpp
This file included "desktop-widgets/divelistview.h" without needing it. If we want to use the undo commands on mobile we shouldn't include desktop headers. Therefore, remove the include. This has the unintended side-effect that the Qt debug headers are not included indirectly anymore. Thus, change a few "qWarning() << ..." instances to "qWarning(...)". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									1163fd18c4
								
							
						
					
					
						commit
						8db3e5cd59
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -2,7 +2,6 @@ | ||||||
| 
 | 
 | ||||||
| #include "command_divelist.h" | #include "command_divelist.h" | ||||||
| #include "command_private.h" | #include "command_private.h" | ||||||
| #include "desktop-widgets/divelistview.h" |  | ||||||
| #include "core/divelist.h" | #include "core/divelist.h" | ||||||
| #include "core/display.h" // for amount_selected
 | #include "core/display.h" // for amount_selected
 | ||||||
| #include "core/qthelper.h" | #include "core/qthelper.h" | ||||||
|  | @ -39,7 +38,7 @@ DiveToAdd DiveListBase::removeDive(struct dive *d, std::vector<OwningTripPtr> &t | ||||||
| 
 | 
 | ||||||
| 	int idx = get_divenr(d); | 	int idx = get_divenr(d); | ||||||
| 	if (idx < 0) | 	if (idx < 0) | ||||||
| 		qWarning() << "Deletion of unknown dive!"; | 		qWarning("Deletion of unknown dive!"); | ||||||
| 
 | 
 | ||||||
| 	res.dive.reset(unregister_dive(idx));		// Remove dive from backend
 | 	res.dive.reset(unregister_dive(idx));		// Remove dive from backend
 | ||||||
| 
 | 
 | ||||||
|  | @ -889,7 +888,7 @@ MergeDives::MergeDives(const QVector <dive *> &dives) | ||||||
| 	// Just a safety check - if there's not two or more dives - do nothing
 | 	// Just a safety check - if there's not two or more dives - do nothing
 | ||||||
| 	// The caller should have made sure that this doesn't happen.
 | 	// The caller should have made sure that this doesn't happen.
 | ||||||
| 	if (dives.count() < 2) { | 	if (dives.count() < 2) { | ||||||
| 		qWarning() << "Merging less than two dives"; | 		qWarning("Merging less than two dives"); | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -931,7 +930,7 @@ MergeDives::MergeDives(const QVector <dive *> &dives) | ||||||
| 	if (idx < 0 || idx + num > dive_table.nr) { | 	if (idx < 0 || idx + num > dive_table.nr) { | ||||||
| 		// It was the callers responsibility to pass only known dives.
 | 		// It was the callers responsibility to pass only known dives.
 | ||||||
| 		// Something is seriously wrong - give up.
 | 		// Something is seriously wrong - give up.
 | ||||||
| 		qWarning() << "Merging unknown dives"; | 		qWarning("Merging unknown dives"); | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
| 	// std::equal compares two ranges. The parameters are (begin_range1, end_range1, begin_range2).
 | 	// std::equal compares two ranges. The parameters are (begin_range1, end_range1, begin_range2).
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue