store settings to different locations for different Qt versions

This commit is contained in:
Axel Kohlmeyer
2023-10-13 06:00:29 -04:00
parent 6195be5af7
commit 3ebcb0f6f1

View File

@ -84,9 +84,13 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) :
// use $HOME if we get dropped to "/" like on macOS // use $HOME if we get dropped to "/" like on macOS
if (current_dir == "/") current_dir = QDir::homePath(); if (current_dir == "/") current_dir = QDir::homePath();
#define stringify(x) myxstr(x)
#define myxstr(x) #x
QCoreApplication::setOrganizationName("The LAMMPS Developers"); QCoreApplication::setOrganizationName("The LAMMPS Developers");
QCoreApplication::setOrganizationDomain("lammps.org"); QCoreApplication::setOrganizationDomain("lammps.org");
QCoreApplication::setApplicationName("LAMMPS GUI"); QCoreApplication::setApplicationName("LAMMPS GUI - QT" stringify(QT_VERSION_MAJOR));
#undef stringify
#undef myxstr
// restore and initialize settings // restore and initialize settings
QSettings settings; QSettings settings;