mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	ssrf: move functions from mobile-helper to mobile-main
Move few mobile only functions from mobile-helper to mobile-main remove subsurface-mobile-helper file structure is now subsurface-*-main.cpp + subsurface-helper.cpp Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
		
							parent
							
								
									2c402b0fcf
								
							
						
					
					
						commit
						fe38a768f2
					
				
					 4 changed files with 19 additions and 45 deletions
				
			
		|  | @ -290,7 +290,6 @@ if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable") | |||
| 		mobile-widgets/qml/kirigami/src/libkirigami/platformtheme.cpp | ||||
| 		mobile-widgets/qml/kirigami/src/libkirigami/tabletmodewatcher.cpp | ||||
| 		subsurface-mobile-main.cpp | ||||
| 		subsurface-mobile-helper.cpp | ||||
| 		subsurface-helper.cpp | ||||
| 		profile-widget/qmlprofile.cpp | ||||
| 		map-widget/qmlmapwidgethelper.cpp | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ DEFINES += SUBSURFACE_MOBILE BT_SUPPORT BLE_SUPPORT | |||
| CONFIG += c++11 | ||||
| 
 | ||||
| SOURCES += ../../subsurface-mobile-main.cpp \ | ||||
| 	../../subsurface-mobile-helper.cpp \ | ||||
| 	../../subsurface-helper.cpp \ | ||||
| 	../../map-widget/qmlmapwidgethelper.cpp \ | ||||
| 	../../core/cloudstorage.cpp \ | ||||
| 	../../core/configuredivecomputerthreads.cpp \ | ||||
|  |  | |||
|  | @ -1,43 +0,0 @@ | |||
| // SPDX-License-Identifier: GPL-2.0
 | ||||
| /* qt-gui.cpp */ | ||||
| /* Qt UI implementation */ | ||||
| #include "core/display.h" | ||||
| #include "core/qthelper.h" | ||||
| 
 | ||||
| #include <QApplication> | ||||
| #include <QDesktopWidget> | ||||
| #include <QNetworkProxy> | ||||
| #include <QLibraryInfo> | ||||
| 
 | ||||
| 
 | ||||
| #include <QQuickWindow> | ||||
| #include <QScreen> | ||||
| #include <QQmlApplicationEngine> | ||||
| #include <QQmlContext> | ||||
| #include <QSortFilterProxyModel> | ||||
| #include "mobile-widgets/qmlmanager.h" | ||||
| #include "qt-models/gpslistmodel.h" | ||||
| #include "qt-models/messagehandlermodel.h" | ||||
| #include "core/settings/qPref.h" | ||||
| 
 | ||||
| #include "mobile-widgets/qml/kirigami/src/kirigamiplugin.h" | ||||
| 
 | ||||
| #include "core/ssrf.h" | ||||
| 
 | ||||
| void set_non_bt_addresses() { | ||||
| #if defined(Q_OS_ANDROID) | ||||
| 	connectionListModel.addAddress("FTDI"); | ||||
| #elif defined(Q_OS_LINUX) // since this is in the else, it does NOT include Android
 | ||||
| 	connectionListModel.addAddress("/dev/ttyS0"); | ||||
| 	connectionListModel.addAddress("/dev/ttyS1"); | ||||
| 	connectionListModel.addAddress("/dev/ttyS2"); | ||||
| 	connectionListModel.addAddress("/dev/ttyS3"); | ||||
| 	// this makes debugging so much easier - use the simulator
 | ||||
| 	connectionListModel.addAddress("/tmp/ttyS1"); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| bool haveFilesOnCommandLine() | ||||
| { | ||||
| 	return false; | ||||
| } | ||||
|  | @ -115,3 +115,21 @@ int main(int argc, char **argv) | |||
| 	free_prefs(); | ||||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
| void set_non_bt_addresses() { | ||||
| #if defined(Q_OS_ANDROID) | ||||
| 	connectionListModel.addAddress("FTDI"); | ||||
| #elif defined(Q_OS_LINUX) // since this is in the else, it does NOT include Android
 | ||||
| 	connectionListModel.addAddress("/dev/ttyS0"); | ||||
| 	connectionListModel.addAddress("/dev/ttyS1"); | ||||
| 	connectionListModel.addAddress("/dev/ttyS2"); | ||||
| 	connectionListModel.addAddress("/dev/ttyS3"); | ||||
| 	// this makes debugging so much easier - use the simulator
 | ||||
| 	connectionListModel.addAddress("/tmp/ttyS1"); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| bool haveFilesOnCommandLine() | ||||
| { | ||||
| 	return false; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue