Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
main.cpp File Reference
#include "main.h"
#include "client/crash/crash_reporter.h"
#include "client/network/update/card_spoiler/spoiler_background_updater.h"
#include "client/settings/cache_settings.h"
#include "client/sound_engine.h"
#include "client/url_scheme_event_filter.h"
#include "database/interface/settings_card_preference_provider.h"
#include "interface/intents/intent.h"
#include "interface/intents/intent_open_local_deck.h"
#include "interface/logger.h"
#include "interface/pixel_map_generator.h"
#include "interface/theme_manager.h"
#include "interface/widgets/dialogs/dlg_crash_report.h"
#include "interface/window_main.h"
#include "libcockatrice/card/database/card_database.h"
#include "libcockatrice/rng/rng_abstract.h"
#include "single_instance_manager.h"
#include "version_string.h"
#include <QApplication>
#include <QByteArray>
#include <QByteArrayView>
#include <QCommandLineOption>
#include <QCommandLineParser>
#include <QCoreApplication>
#include <QCryptographicHash>
#include <QDebug>
#include <QFileInfo>
#include <QGuiApplication>
#include <QIcon>
#include <QList>
#include <QLocale>
#include <QMessageBox>
#include <QMessageLogger>
#include <QNetworkInterface>
#include <QObject>
#include <QRegularExpression>
#include <QRegularExpressionMatch>
#include <QSharedPointer>
#include <QString>
#include <QStringList>
#include <QStringLiteral>
#include <QTranslator>
#include <QUrl>
#include <QtGlobal>
#include <algorithm>
#include <libcockatrice/card/database/card_database_manager.h>
#include <libcockatrice/rng/rng_sfmt.h>
#include <libcockatrice/settings/card_database_settings.h>
#include <libcockatrice/settings/interface_settings.h>
#include <libcockatrice/settings/network_settings.h>
#include <libcockatrice/settings/personal_settings.h>
#include <libcockatrice/utility/cryptoutil.h>
#include <libcockatrice/utility/translation_loader.h>
#include <qlogging.h>
#include <qnamespace.h>
#include <qsystemdetection.h>

Functions

static void CockatriceLogger (QtMsgType type, const QMessageLogContext &ctx, const QString &message)
void installNewTranslator ()
QString const generateClientID ()
static QString redactActivationUrl (const QString &url)
static void runCrashReportFlow (CrashReporter &crashReporter, QWidget *parent, int attachedEnvelopes)
 Run the startup crash-report flow for an unclean exit (or –simulate-crash).
int main (int argc, char *argv[])

Variables

QTranslator * translator
QTranslator * qtTranslator
RNG_Abstract * rng
SoundEngine * soundEngine
QSystemTrayIcon * trayIcon
ThemeManager * themeManager
const QString translationPrefix = "cockatrice"
QString translationPath

Function Documentation

◆ CockatriceLogger()

void CockatriceLogger ( QtMsgType type,
const QMessageLogContext & ctx,
const QString & message )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateClientID()

QString const generateClientID ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ installNewTranslator()

void installNewTranslator ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int argc,
char * argv[] )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ redactActivationUrl()

QString redactActivationUrl ( const QString & url)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ runCrashReportFlow()

void runCrashReportFlow ( CrashReporter & crashReporter,
QWidget * parent,
int attachedEnvelopes )
static

Run the startup crash-report flow for an unclean exit (or –simulate-crash).

With a configured DSN the SDK owns capture and upload (consent-gated); with an empty DSN the flow falls back to a local mock file. AlwaysSend uploads silently (the log was folded into the pending native envelope(s) at startup); Ask offers the dialog; NeverSend skips silently.

Parameters
attachedEnvelopesnumber of pending native envelopes that already carry the redacted log, so an AlwaysSend run only sends a standalone log event when no crash event existed.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ qtTranslator

QTranslator * qtTranslator

◆ rng

◆ soundEngine

SoundEngine* soundEngine

◆ themeManager

ThemeManager* themeManager

◆ translationPath

QString translationPath

◆ translationPrefix

const QString translationPrefix = "cockatrice"

◆ translator

QTranslator* translator

◆ trayIcon

QSystemTrayIcon* trayIcon