mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 02:53:25 -08:00
Mock: DlgCrashReport preview dialog (no account needed, redacted log preview), CrashReportingMode Ask/Always/Never setting in DebugSettings, --simulate-crash flag and Help-menu preview entry. Send writes a local mock JSON only. Vendor sentry-native 0.17.3 via FetchContent behind WITH_CRASH_REPORTING (breakpad everywhere, backend none under sanitizers) plus a CrashReporter facade with early init and post-loop shutdown. DSN is a placeholder: empty CMake default with COCKATRICE_SENTRY_DSN env override, so SDK init is skipped and mock behavior is unchanged until a real DSN is configured. CI prerequisites riding here so every layer below builds green: libcurl dev plus CA bundles in the Linux images and CodeQL env, sentry Qt integration off (its own find_package cannot see the macOS thin Qt layout), and the StrFunc Using construction makensis requires. Tests: ctest green, format clean, code plus UI gates PASS.
110 lines
3.1 KiB
C++
110 lines
3.1 KiB
C++
#ifndef COCKATRICE_GENERAL_SETTINGS_PAGE_H
|
|
#define COCKATRICE_GENERAL_SETTINGS_PAGE_H
|
|
|
|
#include "abstract_settings_page.h"
|
|
|
|
#include <QCheckBox>
|
|
#include <QComboBox>
|
|
#include <QLabel>
|
|
#include <QLoggingCategory>
|
|
#include <QSpinBox>
|
|
#include <QString>
|
|
#include <QStringList>
|
|
#include <qtmetamacros.h>
|
|
|
|
class QGroupBox;
|
|
class QLineEdit;
|
|
class QPushButton;
|
|
|
|
inline Q_LOGGING_CATEGORY(GeneralSettingsPageLog, "general_settings_page");
|
|
|
|
class GeneralSettingsPage : public AbstractSettingsPage
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
GeneralSettingsPage();
|
|
void retranslateUi() override;
|
|
|
|
static QStringList findQmFiles();
|
|
static QString languageName(const QString &lang);
|
|
|
|
signals:
|
|
/// Request to re-import the card database with the newly selected card language
|
|
void cardDatabaseUpdateRequested();
|
|
|
|
private slots:
|
|
void deckPathButtonClicked();
|
|
void filtersPathButtonClicked();
|
|
void replaysPathButtonClicked();
|
|
void picsPathButtonClicked();
|
|
void cardDatabasePathButtonClicked();
|
|
void customCardDatabaseButtonClicked();
|
|
void tokenDatabasePathButtonClicked();
|
|
void resetAllPathsClicked();
|
|
void languageBoxChanged(int index);
|
|
void cardLanguageBoxChanged(int index);
|
|
void cardSearchLanguageBoxChanged(int index);
|
|
void updateStartupServerControlsVisibility();
|
|
|
|
private:
|
|
QGroupBox *languageGroupBox;
|
|
QGroupBox *versionGroupBox;
|
|
QGroupBox *crashReportingGroupBox;
|
|
QGroupBox *cardDatabaseGroupBox;
|
|
QGroupBox *startupGroupBox;
|
|
QGroupBox *pathsGroupBox;
|
|
|
|
QLabel languageLabel;
|
|
QComboBox languageBox;
|
|
QLabel advertiseTranslationPageLabel;
|
|
|
|
QLabel cardLanguageLabel;
|
|
QComboBox cardLanguageBox;
|
|
QLabel cardLanguageNoteLabel;
|
|
|
|
QLabel cardSearchLanguageLabel;
|
|
QComboBox cardSearchLanguageBox;
|
|
|
|
QLabel updateReleaseChannelLabel;
|
|
QComboBox updateReleaseChannelBox;
|
|
QCheckBox startupUpdateCheckCheckBox;
|
|
QCheckBox updateNotificationCheckBox;
|
|
QCheckBox newVersionOracleCheckBox;
|
|
|
|
QLabel crashReportingLabel;
|
|
QComboBox crashReportingBox;
|
|
|
|
QLabel startupCardUpdateCheckBehaviorLabel;
|
|
QComboBox startupCardUpdateCheckBehaviorSelector;
|
|
QLabel cardUpdateCheckIntervalLabel;
|
|
QSpinBox cardUpdateCheckIntervalSpinBox;
|
|
QLabel lastCardUpdateCheckDateLabel;
|
|
QCheckBox cardDatabaseUpdateTrayNotificationCheckBox;
|
|
|
|
QCheckBox showTipsOnStartup;
|
|
QLabel startupTabLabel;
|
|
QComboBox startupTabSelector;
|
|
QLabel startupServerLabel;
|
|
QComboBox startupServerSelector;
|
|
QLabel startupRoomLabel;
|
|
QLineEdit *startupRoomNameEdit;
|
|
|
|
QLabel deckPathLabel;
|
|
QLabel filtersPathLabel;
|
|
QLabel replaysPathLabel;
|
|
QLabel picsPathLabel;
|
|
QLabel cardDatabasePathLabel;
|
|
QLabel customCardDatabasePathLabel;
|
|
QLabel tokenDatabasePathLabel;
|
|
QLineEdit *deckPathEdit;
|
|
QLineEdit *filtersPathEdit;
|
|
QLineEdit *replaysPathEdit;
|
|
QLineEdit *picsPathEdit;
|
|
QLineEdit *cardDatabasePathEdit;
|
|
QLineEdit *customCardDatabasePathEdit;
|
|
QLineEdit *tokenDatabasePathEdit;
|
|
QPushButton *resetAllPathsButton;
|
|
QLabel *allPathsResetLabel;
|
|
};
|
|
|
|
#endif // COCKATRICE_GENERAL_SETTINGS_PAGE_H
|