Use QClipboard::supportsSelection instead of ifdefs
This commit is contained in:
		
							parent
							
								
									d4c99701b5
								
							
						
					
					
						commit
						cffa5e11d8
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -454,13 +454,12 @@ Text::StateResult FlatLabel::dragActionFinish(const QPoint &p, Qt::MouseButton b | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| #if defined Q_OS_UNIX && !defined Q_OS_MAC | 	if (QGuiApplication::clipboard()->supportsSelection() | ||||||
| 	if (!_selection.empty()) { | 		&& !_selection.empty()) { | ||||||
| 		TextUtilities::SetClipboardText( | 		TextUtilities::SetClipboardText( | ||||||
| 			_text.toTextForMimeData(_selection), | 			_text.toTextForMimeData(_selection), | ||||||
| 			QClipboard::Selection); | 			QClipboard::Selection); | ||||||
| 	} | 	} | ||||||
| #endif // Q_OS_UNIX && !Q_OS_MAC
 |  | ||||||
| 
 | 
 | ||||||
| 	return state; | 	return state; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ilya Fedin
						Ilya Fedin