diff --git a/ChangeLog b/ChangeLog index fb4b8388..72f488ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22491,3 +22491,6 @@ RPM package. 2021-10-02 Fred Gleason Changed the default QStyle to 'plastique'. +2021-10-02 Fred Gleason + * Fixed a bug in rdlogmanager(1) that broke the '--show-styles' and + '-style ' command-line switches. diff --git a/lib/rdcmd_switch.cpp b/lib/rdcmd_switch.cpp index 3bc5ff6b..694e5fe2 100644 --- a/lib/rdcmd_switch.cpp +++ b/lib/rdcmd_switch.cpp @@ -103,6 +103,13 @@ RDCmdSwitch::RDCmdSwitch(int argc,char *argv[],const QString &modname, if(value=="-d") { switch_debug=true; } + if((value=="-show-styles")||(value=="--show-styles")) { + QStringList styles=QStyleFactory::keys(); + for(int i=0;i=2) { if(f0.at(0).left(1)=="-") { diff --git a/rdlogmanager/rdlogmanager.cpp b/rdlogmanager/rdlogmanager.cpp index 3101c0f3..b534e1ae 100644 --- a/rdlogmanager/rdlogmanager.cpp +++ b/rdlogmanager/rdlogmanager.cpp @@ -292,6 +292,16 @@ int main(int argc,char *argv[]) RDCmdSwitch *cmd= new RDCmdSwitch(argc,argv,"rdlogmanager",RDLOGMANAGER_USAGE); for(unsigned i=0;ikeys();i++) { + if((cmd->key(i)=="-display")||(cmd->key(i)=="-style")) { + // Pass through to QApplication + if(i>=(cmd->keys()-1)) { + fprintf(stderr,"rdlogmanager: missing argument to \"%s\"\n", + cmd->key(i).toUtf8().constData()); + exit(RDApplication::ExitInvalidOption); + } + i++; + cmd->setProcessed(i,true); + } if (cmd->key(i)=="-P") { cmd_protect_existing = true; cmd->setProcessed(i,true);