1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

use GetDataPath instead of hardcoding

This commit is contained in:
LibrePilot Packager 2015-07-12 00:18:25 +01:00 committed by James Duley
parent 77cdbcc351
commit 8c47b39535
2 changed files with 4 additions and 8 deletions

View File

@ -31,6 +31,8 @@
#include <QtCore/QDir>
#include <QtCore/QCoreApplication>
#include "utils/pathutils.h"
namespace Core {
namespace Internal {
// The Core Singleton
@ -125,15 +127,9 @@ SettingsDatabase *CoreImpl::settingsDatabase() const
return m_mainwindow->settingsDatabase();
}
#ifdef Q_OS_MAC
# define SHARE_PATH "/../Resources"
#else
# define SHARE_PATH "/../share/openpilotgcs"
#endif
QString CoreImpl::resourcePath() const
{
return QDir::cleanPath(QCoreApplication::applicationDirPath() + QLatin1String(SHARE_PATH));
return QDir::cleanPath(Utils::GetDataPath());
}
IContext *CoreImpl::currentContextObject() const

View File

@ -30,7 +30,7 @@
ModelViewGadgetConfiguration::ModelViewGadgetConfiguration(QString classId, QSettings *qSettings, QObject *parent) :
IUAVGadgetConfiguration(classId, parent),
m_acFilename("../share/openpilotgcs/models/planes/Easystar/EasyStar.3ds"),
m_acFilename(Utils::GetDataPath() + QString("models/planes/Easystar/EasyStar.3ds")),
m_bgFilename(""),
m_enableVbo(false)
{