mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Updated opmap lib and opmap plugin to use the Utils::StoragePath correctly.
This commit is contained in:
parent
a97efad8f9
commit
262cc805b0
@ -1,3 +1,4 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
|
||||
SUBDIRS = src \
|
||||
|
@ -1,4 +1,5 @@
|
||||
DESTDIR = ../build
|
||||
|
||||
QT += network
|
||||
QT += sql
|
||||
CONFIG += staticlib
|
||||
@ -6,3 +7,4 @@ TEMPLATE = lib
|
||||
UI_DIR = uics
|
||||
MOC_DIR = mocs
|
||||
OBJECTS_DIR = objs
|
||||
INCLUDEPATH +=../../../../libs/
|
||||
|
@ -25,6 +25,7 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "cache.h"
|
||||
#include "utils/pathutils.h"
|
||||
#include <QSettings>
|
||||
|
||||
namespace core {
|
||||
@ -53,11 +54,7 @@ namespace core {
|
||||
{
|
||||
if(cache.isNull()|cache.isEmpty())
|
||||
{
|
||||
QSettings set(QSettings::IniFormat, QSettings::UserScope,QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS"));
|
||||
QDir dir(set.fileName());
|
||||
QFileInfo f(dir.absolutePath());
|
||||
f.dir().absolutePath();
|
||||
cache=f.dir().absolutePath()+QDir::separator()+"mapscache"+QDir::separator();
|
||||
cache= Utils::PathUtils().GetStoragePath()+"mapscache"+QDir::separator();
|
||||
setCacheLocation(cache);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
include (../common.pri)
|
||||
|
||||
include(../../../utils/utils.pri)
|
||||
|
||||
|
||||
SOURCES += opmaps.cpp \
|
||||
pureimagecache.cpp \
|
||||
pureimage.cpp \
|
||||
|
@ -42,11 +42,6 @@ OPMapGadgetConfiguration::OPMapGadgetConfiguration(QString classId, QSettings*
|
||||
m_cacheLocation(Utils::PathUtils().GetStoragePath() + "mapscache" + QDir::separator()),
|
||||
m_uavSymbol(QString::fromUtf8(":/uavs/images/mapquad.png"))
|
||||
{
|
||||
QSettings set(QSettings::IniFormat, QSettings::UserScope,QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS"));
|
||||
QDir dir(set.fileName());
|
||||
QFileInfo f(dir.absolutePath());
|
||||
f.dir().absolutePath();
|
||||
m_cacheLocation=f.dir().absolutePath()+QDir::separator() + "mapscache" + QDir::separator();
|
||||
|
||||
//if a saved configuration exists load it
|
||||
if(qSettings != 0) {
|
||||
|
@ -109,11 +109,7 @@ void OPMapGadgetOptionsPage::on_pushButtonCacheDefaults_clicked()
|
||||
m_page->accessModeComboBox->setCurrentIndex(index);
|
||||
|
||||
m_page->checkBoxUseMemoryCache->setChecked(true);
|
||||
QSettings set(QSettings::IniFormat, QSettings::UserScope,QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS"));
|
||||
QDir dir(set.fileName());
|
||||
QFileInfo f(dir.absolutePath());
|
||||
f.dir().absolutePath();
|
||||
m_page->lineEditCacheLocation->setPath(f.dir().absolutePath()+QDir::separator() + "mapscache" + QDir::separator());
|
||||
m_page->lineEditCacheLocation->setPath(Utils::PathUtils().GetStoragePath() + "mapscache" + QDir::separator());
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user