src: move set app path to linux includes

This commit is contained in:
Andreas Stallinger
2016-03-08 13:01:00 +01:00
parent cabdb69956
commit 90c0d15d20
3 changed files with 11 additions and 6 deletions
-4
View File
@@ -35,10 +35,6 @@ void init()
void prepare(int argc, char *argv[])
{
if (AppPath::getAppPath().empty())
{
AppPath::setAppPath(QCoreApplication::applicationDirPath().toStdString() + "/");
}
setup(argc, argv);
init();
@@ -1,6 +1,7 @@
#ifndef INCLUDES_DEFAULT_H
#define INCLUDES_DEFAULT_H
#include <QCoreApplication>
#include "utility/AppPath.h"
#include "utility/UserPaths.h"
#include "utility/file/FilePath.h"
@@ -9,7 +10,12 @@
void setup(int argc, char *argv[])
{
std::string userdir(std::getenv("HOME"));
if (AppPath::getAppPath().empty())
{
AppPath::setAppPath(QCoreApplication::applicationDirPath().toStdString() + "/");
}
std::string userdir(std::getenv("HOME"));
if(isTrial())
{
userdir.append("/.config/coatitrial/");