GIT_SILENT Fixup validation in interactiveconsole cli parser

wilder-5.24
Alexander Lohnau 4 years ago
parent aeb9c19795
commit f8decaebb6
No known key found for this signature in database
GPG Key ID: 1F58708D54A003E7
  1. 9
      interactiveconsole/main.cpp

@ -21,14 +21,13 @@ int main(int argc, char **argv)
parser.addOption(kwinOpt);
parser.addHelpOption();
parser.process(app);
if (parser.isSet(kwinOpt)) {
if (parser.isSet(plasmaOpt) && parser.isSet(kwinOpt)) {
qWarning() << "Only one mode can be specified when launching the interactive console";
exit(1);
} else if (parser.isSet(kwinOpt)) {
mode = InteractiveConsole::KWinConsole;
} else if (parser.isSet(plasmaOpt)) {
mode = InteractiveConsole::PlasmaConsole;
} else if (parser.isSet(plasmaOpt) && parser.isSet(kwinOpt)) {
qWarning() << "Only one mode can be specified when launching the interactive console";
exit(1);
}
// set to delete on close
auto console = new InteractiveConsole(mode);

Loading…
Cancel
Save