mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 17:15:09 -07:00
[Client] Route cockatrice:// link clicks from chat to the intent chain (#7136)
* [Client] Route cockatrice:// link clicks from chat to the intent chain A cockatrice:// link clicked in chat is currently handed to the OS (or does nothing in-process). Clicks now emit a cockatriceLinkActivated signal that travels ChatView -> Tab -> TabSupervisor -> MainWindow, which feeds the URL through the same IntentUrlParser the OS activation path uses, so the join runs entirely in-process. card/user schemes and all other links behave as before. * [Client] Route cockatrice:// link clicks from the in-game chat to the intent chain * [Client] Reuse one IntentUrlParser instance for cockatrice:// links Took 59 seconds --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
3de7882f0c
commit
60ee81cfbe
10 changed files with 25 additions and 0 deletions
|
|
@ -406,6 +406,7 @@ int TabSupervisor::myAddTab(Tab *tab, QAction *manager)
|
|||
{
|
||||
connect(tab, &TabGame::userEvent, this, &TabSupervisor::tabUserEvent);
|
||||
connect(tab, &TabGame::tabTextChanged, this, &TabSupervisor::updateTabText);
|
||||
connect(tab, &TabGame::cockatriceLinkActivated, this, &TabSupervisor::cockatriceLinkActivated);
|
||||
|
||||
QString tabText = tab->getTabText();
|
||||
int idx = addTab(tab, sanitizeTabName(tabText));
|
||||
|
|
@ -851,6 +852,7 @@ void TabSupervisor::addRoomTab(const ServerInfo_Room &info, bool setCurrent)
|
|||
connect(tab, &TabRoom::maximizeClient, this, &TabSupervisor::maximizeMainWindow);
|
||||
connect(tab, &TabRoom::roomClosing, this, &TabSupervisor::roomLeft);
|
||||
connect(tab, &TabRoom::openMessageDialog, this, &TabSupervisor::addMessageTab);
|
||||
connect(tab, &TabRoom::cockatriceLinkActivated, this, &TabSupervisor::cockatriceLinkActivated);
|
||||
myAddTab(tab);
|
||||
roomTabs.insert(info.room_id(), tab);
|
||||
if (setCurrent) {
|
||||
|
|
@ -924,6 +926,7 @@ TabMessage *TabSupervisor::addMessageTab(const QString &receiverName, bool focus
|
|||
tab = new TabMessage(this, client, *userInfo, otherUser, userOnline);
|
||||
connect(tab, &TabMessage::talkClosing, this, &TabSupervisor::talkLeft);
|
||||
connect(tab, &TabMessage::maximizeClient, this, &TabSupervisor::maximizeMainWindow);
|
||||
connect(tab, &TabMessage::cockatriceLinkActivated, this, &TabSupervisor::cockatriceLinkActivated);
|
||||
myAddTab(tab);
|
||||
messageTabs.insert(receiverName, tab);
|
||||
if (focus) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue