Skip to content

Commit

Permalink
Fix missing text in cmdline parse error popup (Linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
slipher committed May 19, 2024
1 parent 501ca91 commit 54ada3f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);

// The font is already needed to display our arg parsing error on Linux
int fontId = QFontDatabase::addApplicationFont(":resources/Roboto-Regular.ttf");
if (fontId == -1) {
qDebug() << "Failed to register Roboto font";
} else {
QFont font("Roboto");
font.setPointSize(10);
app.setFont(font);
}

CommandLineOptions options = getCommandLineOptions(app);
if (!options.logFilename.isEmpty()) {
logFile.setFileName(options.logFilename);
Expand Down Expand Up @@ -198,14 +208,6 @@ int main(int argc, char *argv[])
return 0;
}

int fontId = QFontDatabase::addApplicationFont(":resources/Roboto-Regular.ttf");
if (fontId == -1) {
qDebug() << "Failed to register Roboto font";
} else {
QFont font("Roboto");
font.setPointSize(10);
app.setFont(font);
}
SplashController splashController(
options.relaunchCommand, options.updateUpdaterVersion, options.connectUrl, settings);
splashController.checkForUpdate();
Expand Down

0 comments on commit 54ada3f

Please sign in to comment.