mirror of https://github.com/procxx/kepka.git
				
				
				
			Remove FlatLabel::_contextExpandLinksMode.
This commit is contained in:
		
							parent
							
								
									ff51423125
								
							
						
					
					
						commit
						0f0c3b7461
					
				|  | @ -226,10 +226,6 @@ void FlatLabel::setContextCopyText(const QString ©Text) { | ||||||
| 	_contextCopyText = copyText; | 	_contextCopyText = copyText; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void FlatLabel::setExpandLinksMode(ExpandLinksMode mode) { |  | ||||||
| 	_contextExpandLinksMode = mode; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void FlatLabel::setBreakEverywhere(bool breakEverywhere) { | void FlatLabel::setBreakEverywhere(bool breakEverywhere) { | ||||||
| 	_breakEverywhere = breakEverywhere; | 	_breakEverywhere = breakEverywhere; | ||||||
| } | } | ||||||
|  | @ -366,7 +362,7 @@ Text::StateResult FlatLabel::dragActionFinish(const QPoint &p, Qt::MouseButton b | ||||||
| 
 | 
 | ||||||
| #if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 | #if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 | ||||||
| 	if (!_selection.empty()) { | 	if (!_selection.empty()) { | ||||||
| 		QApplication::clipboard()->setText(_text.originalText(_selection, _contextExpandLinksMode), QClipboard::Selection); | 		QApplication::clipboard()->setText(_text.originalText(_selection, ExpandLinksAll), QClipboard::Selection); | ||||||
| 	} | 	} | ||||||
| #endif // Q_OS_LINUX32 || Q_OS_LINUX64
 | #endif // Q_OS_LINUX32 || Q_OS_LINUX64
 | ||||||
| 
 | 
 | ||||||
|  | @ -437,7 +433,7 @@ void FlatLabel::keyPressEvent(QKeyEvent *e) { | ||||||
| 	} else if (e->key() == Qt::Key_E && e->modifiers().testFlag(Qt::ControlModifier)) { | 	} else if (e->key() == Qt::Key_E && e->modifiers().testFlag(Qt::ControlModifier)) { | ||||||
| 		auto selection = _selection.empty() ? (_contextMenu ? _savedSelection : _selection) : _selection; | 		auto selection = _selection.empty() ? (_contextMenu ? _savedSelection : _selection) : _selection; | ||||||
| 		if (!selection.empty()) { | 		if (!selection.empty()) { | ||||||
| 			QApplication::clipboard()->setText(_text.originalText(selection, _contextExpandLinksMode), QClipboard::FindBuffer); | 			QApplication::clipboard()->setText(_text.originalText(selection, ExpandLinksAll), QClipboard::FindBuffer); | ||||||
| 		} | 		} | ||||||
| #endif // Q_OS_MAC
 | #endif // Q_OS_MAC
 | ||||||
| 	} | 	} | ||||||
|  | @ -573,12 +569,12 @@ void FlatLabel::showContextMenu(QContextMenuEvent *e, ContextMenuReason reason) | ||||||
| void FlatLabel::onCopySelectedText() { | void FlatLabel::onCopySelectedText() { | ||||||
| 	const auto selection = _selection.empty() ? (_contextMenu ? _savedSelection : _selection) : _selection; | 	const auto selection = _selection.empty() ? (_contextMenu ? _savedSelection : _selection) : _selection; | ||||||
| 	if (!selection.empty()) { | 	if (!selection.empty()) { | ||||||
| 		QApplication::clipboard()->setText(_text.toString(selection, _contextExpandLinksMode)); | 		QApplication::clipboard()->setText(_text.toString(selection, ExpandLinksAll)); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void FlatLabel::onCopyContextText() { | void FlatLabel::onCopyContextText() { | ||||||
| 	QApplication::clipboard()->setText(_text.toString(AllTextSelection, _contextExpandLinksMode)); | 	QApplication::clipboard()->setText(_text.toString(AllTextSelection, ExpandLinksAll)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void FlatLabel::onTouchSelect() { | void FlatLabel::onTouchSelect() { | ||||||
|  |  | ||||||
|  | @ -105,7 +105,6 @@ public: | ||||||
| 	void setSelectable(bool selectable); | 	void setSelectable(bool selectable); | ||||||
| 	void setDoubleClickSelectsParagraph(bool doubleClickSelectsParagraph); | 	void setDoubleClickSelectsParagraph(bool doubleClickSelectsParagraph); | ||||||
| 	void setContextCopyText(const QString ©Text); | 	void setContextCopyText(const QString ©Text); | ||||||
| 	void setExpandLinksMode(ExpandLinksMode mode); |  | ||||||
| 	void setBreakEverywhere(bool breakEverywhere); | 	void setBreakEverywhere(bool breakEverywhere); | ||||||
| 
 | 
 | ||||||
| 	int naturalWidth() const override; | 	int naturalWidth() const override; | ||||||
|  | @ -207,7 +206,6 @@ private: | ||||||
| 
 | 
 | ||||||
| 	Ui::PopupMenu *_contextMenu = nullptr; | 	Ui::PopupMenu *_contextMenu = nullptr; | ||||||
| 	QString _contextCopyText; | 	QString _contextCopyText; | ||||||
| 	ExpandLinksMode _contextExpandLinksMode = ExpandLinksAll; |  | ||||||
| 
 | 
 | ||||||
| 	ClickHandlerFilter _clickHandlerFilter; | 	ClickHandlerFilter _clickHandlerFilter; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue