You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
378 B
C++
22 lines
378 B
C++
#include "common.h"
|
|
|
|
#include <QSettings>
|
|
#include <QDir>
|
|
|
|
|
|
QString rootPath()
|
|
{
|
|
QSettings settings;
|
|
QString szPath = settings.value("database", QVariant::fromValue(QString("%HOME%"))).toString();
|
|
|
|
if(!szPath.compare("%HOME%") || szPath.isEmpty())
|
|
{
|
|
QDir dir;
|
|
szPath = QDir::homePath() + QDir::separator() + "qtpartlist";
|
|
|
|
dir.mkpath(szPath);
|
|
}
|
|
|
|
return(szPath);
|
|
}
|