regularize application startup. use Qt's command line parser support

This commit is contained in:
Axel Kohlmeyer
2024-08-23 03:16:48 -04:00
parent 1b339b84e1
commit a20997b7cd
2 changed files with 26 additions and 24 deletions

View File

@ -40,7 +40,6 @@
#include <QGuiApplication>
#include <QLabel>
#include <QLineEdit>
#include <QLocale>
#include <QMessageBox>
#include <QProcess>
#include <QProgressBar>
@ -76,9 +75,6 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) :
prefdialog(nullptr), lammpsstatus(nullptr), varwindow(nullptr), wizard(nullptr),
runner(nullptr), is_running(false), run_counter(0)
{
// enforce using the plain ASCII C locale within the GUI.
QLocale::setDefault(QLocale("C"));
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// register QList<QString> only needed for Qt5
qRegisterMetaTypeStreamOperators<QList<QString>>("QList<QString>");
@ -95,14 +91,6 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) :
if (current_dir == "/") current_dir = QDir::homePath();
inspectList.clear();
#define stringify(x) myxstr(x)
#define myxstr(x) #x
QCoreApplication::setOrganizationName("The LAMMPS Developers");
QCoreApplication::setOrganizationDomain("lammps.org");
QCoreApplication::setApplicationName("LAMMPS-GUI - QT" stringify(QT_VERSION_MAJOR));
#undef stringify
#undef myxstr
// restore and initialize settings
QSettings settings;