mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Bluetooth: remember all data during a scan on macOS
Since we trigger a scan even without the dialog to pick the right device, we need to remember all devices that we find. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									38cda08819
								
							
						
					
					
						commit
						a5416b9bea
					
				
					 1 changed files with 5 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -177,12 +177,11 @@ void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
 | 
			
		|||
		qDebug() << id.toByteArray();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
#if defined(Q_OS_IOS) || defined(Q_OS_WIN)
 | 
			
		||||
	// On Desktop this is called when "Save" button is clicked. All
 | 
			
		||||
	// DeviceInfo are stored as data on the ui list items.
 | 
			
		||||
	// On mobile (iOS) the current ConnectionListModel does not support
 | 
			
		||||
	// additional data, so just save all discovered devices.
 | 
			
		||||
 | 
			
		||||
#if defined(Q_OS_IOS) || defined(Q_OS_MACOS) || defined(Q_OS_WIN)
 | 
			
		||||
	// on Windows, macOS and iOS we need to scan in order to be able to access a device;
 | 
			
		||||
	// let's remember the information we scanned on this run so we can at least
 | 
			
		||||
	// refer back to it and don't need to open the separate scanning dialog every
 | 
			
		||||
	// time we try to download from a BT/BLE dive computer.
 | 
			
		||||
	saveBtDeviceInfo(btDeviceAddress(&device, false), device);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue