Skip to content

Commit

Permalink
feat: add crashes option only on X11
Browse files Browse the repository at this point in the history
It's not useful on Wayland.
  • Loading branch information
romangg committed Dec 5, 2023
1 parent 7b094e3 commit e404865
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions main.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ inline void app_create_about_data()

inline void app_setup_command_line(QCommandLineParser* parser)
{
QCommandLineOption crashesOption(
"crashes", i18n("Indicate that KWin has recently crashed n times"), QStringLiteral("n"));

parser->setApplicationDescription(i18n("KDE window manager"));
parser->addOption(crashesOption);
KAboutData::applicationData().setupCommandLine(parser);
}

Expand Down
4 changes: 4 additions & 0 deletions main_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,16 @@ int main(int argc, char* argv[])

KWin::app_create_about_data();

QCommandLineOption crashesOption(
"crashes", i18n("Indicate that KWin has recently crashed n times"), QStringLiteral("n"));
QCommandLineOption replaceOption(
QStringLiteral("replace"),
i18n("Replace already-running ICCCM2.0-compliant window manager"));

QCommandLineParser parser;
KWin::app_setup_command_line(&parser);

parser.addOption(crashesOption);
parser.addOption(replaceOption);

parser.process(a);
Expand Down

0 comments on commit e404865

Please sign in to comment.