Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
e3267222
Commit
e3267222
authored
May 31, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding some Qt version checks
parent
fe015311
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
+56
-0
qgeotiledmappingmanagerengineqgc.cpp
src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp
+33
-0
qgeotiledmappingmanagerengineqgc.h
src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.h
+21
-0
main.cc
src/main.cc
+2
-0
No files found.
src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.cpp
View file @
e3267222
...
...
@@ -46,7 +46,11 @@
#include <QtLocation/private/qgeocameracapabilities_p.h>
#include <QtLocation/private/qgeomaptype_p.h>
#if QT_VERSION < 0x050500
#include <QtLocation/private/qgeotiledmapdata_p.h>
#else
#include <QtLocation/private/qgeotiledmap_p.h>
#endif
#include <QDir>
#include <QStandardPaths>
...
...
@@ -54,6 +58,14 @@
#include "qgeotilefetcherqgc.h"
#include "OpenPilotMaps.h"
#if QT_VERSION >= 0x050500
QGeoTiledMapQGC
::
QGeoTiledMapQGC
(
QGeoTiledMappingManagerEngine
*
engine
,
QObject
*
parent
)
:
QGeoTiledMap
(
engine
,
parent
)
{
}
#endif
QGeoTiledMappingManagerEngineQGC
::
QGeoTiledMappingManagerEngineQGC
(
const
QVariantMap
&
parameters
,
QGeoServiceProvider
::
Error
*
error
,
QString
*
errorString
)
:
QGeoTiledMappingManagerEngine
()
{
...
...
@@ -151,13 +163,34 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian
*
error
=
QGeoServiceProvider
::
NoError
;
errorString
->
clear
();
#if QT_VERSION >= 0x050500
if
(
parameters
.
contains
(
QStringLiteral
(
"mapping.copyright"
)))
m_customCopyright
=
parameters
.
value
(
QStringLiteral
(
"mapping.copyright"
)).
toString
().
toLatin1
();
#endif
}
QGeoTiledMappingManagerEngineQGC
::~
QGeoTiledMappingManagerEngineQGC
()
{
}
#if QT_VERSION < 0x050500
QGeoMapData
*
QGeoTiledMappingManagerEngineQGC
::
createMapData
()
{
return
new
QGeoTiledMapData
(
this
,
0
);
}
#else
QGeoMap
*
QGeoTiledMappingManagerEngineQGC
::
createMap
()
{
return
new
QGeoTiledMapQGC
(
this
);
}
QString
QGeoTiledMappingManagerEngineQGC
::
customCopyright
()
const
{
return
m_customCopyright
;
}
#endif
src/QtLocationPlugin/qgeotiledmappingmanagerengineqgc.h
View file @
e3267222
...
...
@@ -48,15 +48,36 @@
#define QGEOTILEDMAPPINGMANAGERENGINEGOOGLE_H
#include <QtLocation/QGeoServiceProvider>
#if QT_VERSION >= 0x050500
#include <QtLocation/private/qgeotiledmap_p.h>
#endif
#include <QtLocation/private/qgeotiledmappingmanagerengine_p.h>
#if QT_VERSION >= 0x050500
class
QGeoTiledMapQGC
:
public
QGeoTiledMap
{
Q_OBJECT
public:
QGeoTiledMapQGC
(
QGeoTiledMappingManagerEngine
*
engine
,
QObject
*
parent
=
0
);
};
#endif
class
QGeoTiledMappingManagerEngineQGC
:
public
QGeoTiledMappingManagerEngine
{
Q_OBJECT
public:
QGeoTiledMappingManagerEngineQGC
(
const
QVariantMap
&
parameters
,
QGeoServiceProvider
::
Error
*
error
,
QString
*
errorString
);
~
QGeoTiledMappingManagerEngineQGC
();
#if QT_VERSION < 0x050500
QGeoMapData
*
createMapData
();
#else
QGeoMap
*
createMap
();
QString
customCopyright
()
const
;
#endif
private:
#if QT_VERSION >= 0x050500
QString
m_customCopyright
;
#endif
};
#endif // QGEOTILEDMAPPINGMANAGERENGINEGOOGLE_H
src/main.cc
View file @
e3267222
...
...
@@ -87,9 +87,11 @@ int main(int argc, char *argv[])
{
#ifdef Q_OS_MAC
#ifndef __ios__
// Prevent Apple's app nap from screwing us over
// tip: the domain can be cross-checked on the command line with <defaults domains>
QProcess
::
execute
(
"defaults write org.qgroundcontrol.qgroundcontrol NSAppSleepDisabled -bool YES"
);
#endif
#endif
// install the message handler
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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