mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
example 'meshtastic': add proper local data paths on desktop
This commit is contained in:
parent
4fc8ee3ca8
commit
bc2e23b4bd
9 changed files with 44 additions and 15 deletions
|
|
@ -146,6 +146,17 @@ QVariant QT::sqlQuery(const QVariant& vQuery, const QVariant& vValues) {
|
|||
|
||||
// etc
|
||||
|
||||
QVariant QT::dataPath() {
|
||||
// for desktop
|
||||
static QString path;
|
||||
if (path.isEmpty()) {
|
||||
path = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation);
|
||||
path.truncate(path.lastIndexOf(QChar('/')));
|
||||
path.append("/cl-meshtastic/data/");
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
QVariant QT::localIp() {
|
||||
// Returns the local IP string. Private networks may use:
|
||||
// 10.*.*.*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue