SidebarGenerator adding GTA V Folder from Environment value
This commit is contained in:
parent
b1155cb2a7
commit
de863c922a
1 changed files with 8 additions and 5 deletions
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include "SidebarGenerator.h"
|
#include "SidebarGenerator.h"
|
||||||
#include "StandardPaths.h"
|
#include "StandardPaths.h"
|
||||||
|
#include "AppEnv.h"
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
@ -40,11 +41,13 @@ QList<QUrl> SidebarGenerator::generateSidebarUrls(QList<QUrl> sidebarUrls)
|
||||||
dir.setPath(StandardPaths::documentsLocation());
|
dir.setPath(StandardPaths::documentsLocation());
|
||||||
if (dir.exists())
|
if (dir.exists())
|
||||||
{
|
{
|
||||||
sidebarUrls.append(QUrl::fromLocalFile(dir.absolutePath()));
|
}
|
||||||
if (dir.cd("Rockstar Games/GTA V"))
|
|
||||||
{
|
bool gameFolderExists;
|
||||||
sidebarUrls << QUrl::fromLocalFile(dir.absolutePath());
|
QString gameFolder = AppEnv::getGameFolder(&gameFolderExists);
|
||||||
}
|
if (gameFolderExists)
|
||||||
|
{
|
||||||
|
QUrl::fromLocalFile(gameFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
dir.setPath(StandardPaths::desktopLocation());
|
dir.setPath(StandardPaths::desktopLocation());
|
||||||
|
|
Loading…
Reference in a new issue