QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MapsSettings.cc
Go to the documentation of this file.
1#include "MapsSettings.h"
2
3#include <QtCore/QSettings>
4
6{
7 // Move deprecated keys to new location
8
9 static constexpr const char* kMaxDiskCacheKey = "MaxDiskCache";
10 static constexpr const char* kMaxMemCacheKey = "MaxMemoryCache";
11
12 QSettings deprecatedSettings;
13 QSettings newSettings;
14
15 newSettings.beginGroup(_settingsGroup);
16 if (deprecatedSettings.contains(kMaxDiskCacheKey)) {
17 uint32_t maxDiskCache = deprecatedSettings.value(kMaxDiskCacheKey, 1024).toUInt();
18 deprecatedSettings.remove(kMaxDiskCacheKey);
19 newSettings.setValue("maxCacheDiskSize", maxDiskCache);
20 }
21 if (deprecatedSettings.contains(kMaxMemCacheKey)) {
22 uint32_t maxMemCache = deprecatedSettings.value(kMaxMemCacheKey, 1024).toUInt();
23 deprecatedSettings.remove(kMaxMemCacheKey);
24 newSettings.setValue("maxCacheMemorySize", maxMemCache);
25 }
26
27}
28
#define DECLARE_SETTINGSFACT(CLASS, NAME)
#define DECLARE_SETTINGGROUP(NAME, GROUP)