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:
parent
77cdbcc351
commit
8c47b39535
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user