2022-09-27 Fred Gleason <fredg@paravelsystems.com>

* Added a '--list-styles' directive to all Rivendell modules.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2022-09-27 13:52:00 -04:00
parent 631e337f63
commit 00a913e991
2 changed files with 11 additions and 0 deletions

View File

@ -23391,3 +23391,5 @@
* Modified rdlogedit(1) when creating a new log to default the
'Service' dropdown in the 'Add Log' dialog to the currently selected
service.
2022-09-27 Fred Gleason <fredg@paravelsystems.com>
* Added a '--list-styles' directive to all Rivendell modules.

View File

@ -23,6 +23,7 @@
#include <QApplication>
#include <QProcess>
#include <QStyleFactory>
#include "dbversion.h"
#include "rdapplication.h"
@ -158,6 +159,14 @@ bool RDCoreApplication::open(QString *err_msg,RDCoreApplication::ErrorType *err_
}
app_cmd_switch->setProcessed(i,true);
}
if(app_cmd_switch->key(i)=="--list-styles") {
QStringList f0=QStyleFactory::keys();
printf("Available styles:\n");
for(int j=0;j<f0.size();j++) {
printf(" %s\n",f0.at(j).toUtf8().constData());
}
exit(0);
}
}
//