Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f5cdf449
Commit
f5cdf449
authored
Feb 18, 2016
by
Gus Grubba
Browse files
Windows fixes
parent
f30a47d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/QtLocationPlugin/QGCMapEngine.cpp
View file @
f5cdf449
...
...
@@ -33,6 +33,7 @@ This file is part of the QGROUNDCONTROL project
#include
<QSettings>
#include
<QStandardPaths>
#include
<QDir>
#include
<stdio.h>
#include
"QGCMapEngine.h"
#include
"QGCMapTileSet.h"
...
...
@@ -208,9 +209,7 @@ QGCMapEngine::cacheTile(UrlFactory::MapType type, const QString& hash, const QBy
QString
QGCMapEngine
::
getTileHash
(
UrlFactory
::
MapType
type
,
int
x
,
int
y
,
int
z
)
{
char
hashSource
[
64
];
snprintf
(
hashSource
,
sizeof
(
hashSource
),
"%04d%08d%08d%03d"
,
(
int
)
type
,
x
,
y
,
z
);
return
QString
(
hashSource
);
return
QString
().
sprintf
(
"%04d%08d%08d%03d"
,
(
int
)
type
,
x
,
y
,
z
);
}
//-----------------------------------------------------------------------------
...
...
src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp
View file @
f5cdf449
...
...
@@ -226,9 +226,13 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap ¶meters)
QGeoTileCache
*
pTileCache
=
createTileCacheWithDir
(
cacheDir
);
if
(
pTileCache
)
{
//-- We're basically telling it to use 1kb of disk for cache. It doesn't like
//-- We're basically telling it to use 1kb
(100k for Windows)
of disk for cache. It doesn't like
// values smaller than that and I could not find a way to make it NOT cache.
#ifdef Q_OS_WIN
pTileCache
->
setMaxDiskUsage
(
1024
*
100
);
#else
pTileCache
->
setMaxDiskUsage
(
1024
);
#endif
pTileCache
->
setMaxMemoryUsage
(
memLimit
);
}
}
...
...
src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc
View file @
f5cdf449
...
...
@@ -30,6 +30,7 @@
#include
"QGCMapTileSet.h"
#include
"QGCMapUrlEngine.h"
#include
<QStorageInfo>
#include
<stdio.h>
QGC_LOGGING_CATEGORY
(
QGCMapEngineManagerLog
,
"QGCMapEngineManagerLog"
)
...
...
@@ -378,10 +379,8 @@ QGCMapEngineManager::getUniqueName()
QString
name
;
int
count
=
1
;
while
(
true
)
{
char
numb
[
16
];
snprintf
(
numb
,
sizeof
(
numb
),
"%03d"
,
count
++
);
name
=
test
;
name
+=
numb
;
name
+=
QString
().
sprintf
(
"%03d"
,
count
++
)
;
if
(
!
findName
(
name
))
return
name
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment