[Client] Reuse one IntentUrlParser instance for cockatrice:// links

Took 59 seconds
This commit is contained in:
Lukas Brübach 2026-08-17 01:01:35 +02:00
parent bffe4f1490
commit 3bb355278d
2 changed files with 3 additions and 1 deletions

View file

@ -498,6 +498,7 @@ MainWindow::MainWindow(QWidget *parent)
pixmapCacheSizeChanged(SettingsCache::instance().cacheStorage().getPixmapCacheSize()); pixmapCacheSizeChanged(SettingsCache::instance().cacheStorage().getPixmapCacheSize());
connectionController = new ConnectionController(this, this); connectionController = new ConnectionController(this, this);
urlParser = new IntentUrlParser(this, this);
createActions(); createActions();
createMenus(); createMenus();
@ -865,7 +866,6 @@ void MainWindow::showWindowIfHidden()
void MainWindow::handleCockatriceLink(const QString &url) void MainWindow::handleCockatriceLink(const QString &url)
{ {
auto urlParser = new IntentUrlParser(this, this);
urlParser->handle(url); urlParser->handle(url);
} }

View file

@ -56,6 +56,7 @@ class TabSupervisor;
class WndSets; class WndSets;
class DlgTipOfTheDay; class DlgTipOfTheDay;
struct ContextConnectToServer; struct ContextConnectToServer;
class IntentUrlParser;
class MainWindow : public QMainWindow class MainWindow : public QMainWindow
{ {
@ -140,6 +141,7 @@ private:
*aOpenSettingsFolder; *aOpenSettingsFolder;
TabSupervisor *tabSupervisor; TabSupervisor *tabSupervisor;
IntentUrlParser *urlParser;
WndSets *wndSets; WndSets *wndSets;
ConnectionController *connectionController; ConnectionController *connectionController;
LocalServer *localServer; LocalServer *localServer;