Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qgroundcontrol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Platzgummer
qgroundcontrol
Commits
97abff09
Commit
97abff09
authored
8 years ago
by
Gus Grubba
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #3513 from dogmaphobic/tileCache
Making tile cache description not mandatory.
parents
87551cf2
ede3eb57
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/QtLocationPlugin/QGCTileCacheWorker.cpp
+9
-2
9 additions, 2 deletions
src/QtLocationPlugin/QGCTileCacheWorker.cpp
with
9 additions
and
2 deletions
src/QtLocationPlugin/QGCTileCacheWorker.cpp
+
9
−
2
View file @
97abff09
...
...
@@ -302,6 +302,9 @@ QGCCacheWorker::_getTileSets(QGCMapTask* mtask)
while
(
query
.
next
())
{
QString
name
=
query
.
value
(
"name"
).
toString
();
QString
desc
=
query
.
value
(
"description"
).
toString
();
//-- Original database had description as NOT NULL
if
(
desc
.
isEmpty
())
desc
=
" "
;
QGCCachedTileSet
*
set
=
new
QGCCachedTileSet
(
name
,
desc
);
set
->
setId
(
query
.
value
(
"setID"
).
toULongLong
());
set
->
setMapTypeStr
(
query
.
value
(
"typeStr"
).
toString
());
...
...
@@ -409,11 +412,15 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
quint32
actual_count
=
0
;
QGCCreateTileSetTask
*
task
=
static_cast
<
QGCCreateTileSetTask
*>
(
mtask
);
QSqlQuery
query
(
*
_db
);
QString
desc
=
task
->
tileSet
()
->
description
();
//-- Original database had description as NOT NULL
if
(
desc
.
isEmpty
())
desc
=
" "
;
query
.
prepare
(
"INSERT INTO TileSets("
"name, description, typeStr, topleftLat, topleftLon, bottomRightLat, bottomRightLon, minZoom, maxZoom, type, numTiles, tilesSize, thumbNail, thumbW, thumbH, date"
") VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
);
query
.
addBindValue
(
task
->
tileSet
()
->
name
());
query
.
addBindValue
(
task
->
tileSet
()
->
description
()
);
query
.
addBindValue
(
desc
);
query
.
addBindValue
(
task
->
tileSet
()
->
mapTypeStr
());
query
.
addBindValue
(
task
->
tileSet
()
->
topleftLat
());
query
.
addBindValue
(
task
->
tileSet
()
->
topleftLon
());
...
...
@@ -665,7 +672,7 @@ QGCCacheWorker::_createDB()
"CREATE TABLE IF NOT EXISTS TileSets ("
"setID INTEGER PRIMARY KEY NOT NULL, "
"name TEXT NOT NULL UNIQUE, "
"description TEXT
NOT NULL
, "
"description TEXT, "
"typeStr TEXT, "
"topleftLat REAL DEFAULT 0.0, "
"topleftLon REAL DEFAULT 0.0, "
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment