mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 11:33:55 -07:00
Fix Windows Portable Crash (#5371)
This commit is contained in:
parent
716bc00533
commit
24a0dac420
1 changed files with 4 additions and 4 deletions
|
|
@ -118,6 +118,9 @@ GeneralSettingsPage::GeneralSettingsPage()
|
||||||
QPushButton *tokenDatabasePathButton = new QPushButton("...");
|
QPushButton *tokenDatabasePathButton = new QPushButton("...");
|
||||||
connect(tokenDatabasePathButton, SIGNAL(clicked()), this, SLOT(tokenDatabasePathButtonClicked()));
|
connect(tokenDatabasePathButton, SIGNAL(clicked()), this, SLOT(tokenDatabasePathButtonClicked()));
|
||||||
|
|
||||||
|
// Required init here to avoid crashing on Portable builds
|
||||||
|
resetAllPathsButton = new QPushButton;
|
||||||
|
|
||||||
bool isPortable = settings.getIsPortableBuild();
|
bool isPortable = settings.getIsPortableBuild();
|
||||||
if (isPortable) {
|
if (isPortable) {
|
||||||
deckPathEdit->setEnabled(false);
|
deckPathEdit->setEnabled(false);
|
||||||
|
|
@ -134,7 +137,6 @@ GeneralSettingsPage::GeneralSettingsPage()
|
||||||
customCardDatabasePathButton->setVisible(false);
|
customCardDatabasePathButton->setVisible(false);
|
||||||
tokenDatabasePathButton->setVisible(false);
|
tokenDatabasePathButton->setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
resetAllPathsButton = new QPushButton;
|
|
||||||
connect(resetAllPathsButton, SIGNAL(clicked()), this, SLOT(resetAllPathsClicked()));
|
connect(resetAllPathsButton, SIGNAL(clicked()), this, SLOT(resetAllPathsClicked()));
|
||||||
allPathsResetLabel = new QLabel(tr("All paths have been reset"));
|
allPathsResetLabel = new QLabel(tr("All paths have been reset"));
|
||||||
allPathsResetLabel->setVisible(false);
|
allPathsResetLabel->setVisible(false);
|
||||||
|
|
@ -302,9 +304,7 @@ void GeneralSettingsPage::retranslateUi()
|
||||||
updateNotificationCheckBox.setText(tr("Notify if a feature supported by the server is missing in my client"));
|
updateNotificationCheckBox.setText(tr("Notify if a feature supported by the server is missing in my client"));
|
||||||
newVersionOracleCheckBox.setText(tr("Automatically run Oracle when running a new version of Cockatrice"));
|
newVersionOracleCheckBox.setText(tr("Automatically run Oracle when running a new version of Cockatrice"));
|
||||||
showTipsOnStartup.setText(tr("Show tips on startup"));
|
showTipsOnStartup.setText(tr("Show tips on startup"));
|
||||||
if (resetAllPathsButton) {
|
resetAllPathsButton->setText(tr("Reset all paths"));
|
||||||
resetAllPathsButton->setText(tr("Reset all paths"));
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto &settings = SettingsCache::instance();
|
const auto &settings = SettingsCache::instance();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue