Add "Copy Link Address" context menu

Allows copying just the link address of a hyperlink.
This commit is contained in:
Kai Uwe Broulik
2024-12-05 13:41:04 +01:00
parent 3356e6c6cf
commit c585f3d8ae
8 changed files with 43 additions and 6 deletions

View File

@@ -232,7 +232,8 @@ public:
/**
* @brief Show a context menu for the given event.
*/
Q_INVOKABLE void viewEventMenu(const QString &eventId, NeoChatRoom *room, NeochatRoomMember *sender, const QString &selectedText = {});
Q_INVOKABLE void
viewEventMenu(const QString &eventId, NeoChatRoom *room, NeochatRoomMember *sender, const QString &selectedText = {}, const QString &hoveredLink = {});
ChatDocumentHandler *chatDocumentHandler() const;
void setChatDocumentHandler(ChatDocumentHandler *handler);
@@ -313,7 +314,8 @@ Q_SIGNALS:
MessageComponentType::Type messageComponentType,
const QString &plainText,
const QString &htmlText,
const QString &selectedText);
const QString &selectedText,
const QString &hoveredLink);
/**
* @brief Request to show a menu for the given media event.