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.
32 lines
542 B
C++
32 lines
542 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() + "qtmovies";
|
|
}
|
|
|
|
return(szPath);
|
|
}
|
|
|
|
QStringList cleanList(const QStringList& list)
|
|
{
|
|
QStringList list1;
|
|
|
|
for(int x = 0;x < list.count();x++)
|
|
{
|
|
if(!list.at(x).isEmpty())
|
|
list1.append(list.at(x));
|
|
}
|
|
return(list1);
|
|
}
|