set config- and data-dir to system-specific paths

This commit is contained in:
plc-user
2025-01-23 18:47:10 +01:00
parent b19fbd2522
commit ba9cd71816
6 changed files with 39 additions and 39 deletions

View File

@@ -22,7 +22,7 @@
#include <QProcess>
#include <QInputDialog>
#include <QMessageBox>
#include <QDir>
#include <QStandardPaths>
/**
* @brief QET_ElementScaler
@@ -113,13 +113,7 @@ QByteArray ElementScaler(const QString &file_path, QWidget *parent)
QString ElementScalerDirPath()
{
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
return (QDir::homePath() + QStringLiteral("/Application Data/qet/binary"));
#elif defined(Q_OS_MACOS)
return (QDir::homePath() + QStringLiteral("/.qet/binary"));
#else
return (QDir::homePath() + QStringLiteral("/.qet/binary"));
#endif
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/binary";
}
/**