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
f6658d4a
Commit
f6658d4a
authored
Aug 11, 2019
by
murata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FactSystem: Change NULL or 0 to nullptr
parent
efb4427b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
20 deletions
+20
-20
Fact.h
src/FactSystem/Fact.h
+4
-4
FactGroup.cc
src/FactSystem/FactGroup.cc
+4
-4
FactGroup.h
src/FactSystem/FactGroup.h
+2
-2
FactMetaData.cc
src/FactSystem/FactMetaData.cc
+2
-2
FactSystemTestBase.cc
src/FactSystem/FactSystemTestBase.cc
+2
-2
FactValueSliderListModel.h
src/FactSystem/FactValueSliderListModel.h
+1
-1
ParameterManager.cc
src/FactSystem/ParameterManager.cc
+5
-5
No files found.
src/FactSystem/Fact.h
View file @
f6658d4a
...
...
@@ -30,13 +30,13 @@ class Fact : public QObject
Q_OBJECT
public:
Fact
(
QObject
*
parent
=
NULL
);
Fact
(
int
componentId
,
QString
name
,
FactMetaData
::
ValueType_t
type
,
QObject
*
parent
=
NULL
);
Fact
(
const
Fact
&
other
,
QObject
*
parent
=
NULL
);
Fact
(
QObject
*
parent
=
nullptr
);
Fact
(
int
componentId
,
QString
name
,
FactMetaData
::
ValueType_t
type
,
QObject
*
parent
=
nullptr
);
Fact
(
const
Fact
&
other
,
QObject
*
parent
=
nullptr
);
/// Creates a Fact using the name and type from metaData. Also calls QGCCorePlugin::adjustSettingsMetaData allowing
/// custom builds to override the metadata.
Fact
(
const
QString
&
settingsGroup
,
FactMetaData
*
metaData
,
QObject
*
parent
=
NULL
);
Fact
(
const
QString
&
settingsGroup
,
FactMetaData
*
metaData
,
QObject
*
parent
=
nullptr
);
const
Fact
&
operator
=
(
const
Fact
&
other
);
...
...
src/FactSystem/FactGroup.cc
View file @
f6658d4a
...
...
@@ -53,19 +53,19 @@ void FactGroup::_setupTimer()
Fact
*
FactGroup
::
getFact
(
const
QString
&
name
)
{
Fact
*
fact
=
NULL
;
Fact
*
fact
=
nullptr
;
if
(
name
.
contains
(
"."
))
{
QStringList
parts
=
name
.
split
(
"."
);
if
(
parts
.
count
()
!=
2
)
{
qWarning
()
<<
"Only single level of hierarchy supported"
;
return
NULL
;
return
nullptr
;
}
FactGroup
*
factGroup
=
getFactGroup
(
parts
[
0
]);
if
(
!
factGroup
)
{
qWarning
()
<<
"Unknown FactGroup"
<<
parts
[
0
];
return
NULL
;
return
nullptr
;
}
return
factGroup
->
getFact
(
parts
[
1
]);
...
...
@@ -83,7 +83,7 @@ Fact* FactGroup::getFact(const QString& name)
FactGroup
*
FactGroup
::
getFactGroup
(
const
QString
&
name
)
{
FactGroup
*
factGroup
=
NULL
;
FactGroup
*
factGroup
=
nullptr
;
if
(
_nameToFactGroupMap
.
contains
(
name
))
{
factGroup
=
_nameToFactGroupMap
[
name
];
...
...
src/FactSystem/FactGroup.h
View file @
f6658d4a
...
...
@@ -26,8 +26,8 @@ class FactGroup : public QObject
Q_OBJECT
public:
FactGroup
(
int
updateRateMsecs
,
const
QString
&
metaDataFile
,
QObject
*
parent
=
NULL
);
FactGroup
(
int
updateRateMsecs
,
QObject
*
parent
=
NULL
);
FactGroup
(
int
updateRateMsecs
,
const
QString
&
metaDataFile
,
QObject
*
parent
=
nullptr
);
FactGroup
(
int
updateRateMsecs
,
QObject
*
parent
=
nullptr
);
Q_PROPERTY
(
QStringList
factNames
READ
factNames
CONSTANT
)
Q_PROPERTY
(
QStringList
factGroupNames
READ
factGroupNames
CONSTANT
)
...
...
src/FactSystem/FactMetaData.cc
View file @
f6658d4a
...
...
@@ -933,7 +933,7 @@ const FactMetaData::AppSettingsTranslation_s* FactMetaData::_findAppSettingsDist
return
pAppSettingsTranslation
;
}
}
return
NULL
;
return
nullptr
;
}
const
FactMetaData
::
AppSettingsTranslation_s
*
FactMetaData
::
_findAppSettingsAreaUnitsTranslation
(
const
QString
&
rawUnits
)
...
...
@@ -953,7 +953,7 @@ const FactMetaData::AppSettingsTranslation_s* FactMetaData::_findAppSettingsArea
}
}
return
NULL
;
return
nullptr
;
}
QVariant
FactMetaData
::
metersToAppSettingsDistanceUnits
(
const
QVariant
&
meters
)
...
...
src/FactSystem/FactSystemTestBase.cc
View file @
f6658d4a
...
...
@@ -48,7 +48,7 @@ void FactSystemTestBase::_parameter_default_component_id_test(void)
{
QVERIFY
(
_vehicle
->
parameterManager
()
->
parameterExists
(
FactSystem
::
defaultComponentId
,
"RC_MAP_THROTTLE"
));
Fact
*
fact
=
_vehicle
->
parameterManager
()
->
getParameter
(
FactSystem
::
defaultComponentId
,
"RC_MAP_THROTTLE"
);
QVERIFY
(
fact
!=
NULL
);
QVERIFY
(
fact
!=
nullptr
);
QVariant
factValue
=
fact
->
rawValue
();
QCOMPARE
(
factValue
.
isValid
(),
true
);
...
...
@@ -59,7 +59,7 @@ void FactSystemTestBase::_parameter_specific_component_id_test(void)
{
QVERIFY
(
_vehicle
->
parameterManager
()
->
parameterExists
(
MAV_COMP_ID_AUTOPILOT1
,
"RC_MAP_THROTTLE"
));
Fact
*
fact
=
_vehicle
->
parameterManager
()
->
getParameter
(
MAV_COMP_ID_AUTOPILOT1
,
"RC_MAP_THROTTLE"
);
QVERIFY
(
fact
!=
NULL
);
QVERIFY
(
fact
!=
nullptr
);
QVariant
factValue
=
fact
->
rawValue
();
QCOMPARE
(
factValue
.
isValid
(),
true
);
QCOMPARE
(
factValue
.
toInt
(),
3
);
...
...
src/FactSystem/FactValueSliderListModel.h
View file @
f6658d4a
...
...
@@ -19,7 +19,7 @@ class FactValueSliderListModel : public QAbstractListModel
Q_OBJECT
public:
FactValueSliderListModel
(
Fact
&
fact
,
QObject
*
parent
=
NULL
);
FactValueSliderListModel
(
Fact
&
fact
,
QObject
*
parent
=
nullptr
);
~
FactValueSliderListModel
();
/// The initial value of the Fact at the meta data specified decimal place precision
...
...
src/FactSystem/ParameterManager.cc
View file @
f6658d4a
...
...
@@ -35,7 +35,7 @@ const char* ParameterManager::_jsonParamValueKey = "value";
ParameterManager
::
ParameterManager
(
Vehicle
*
vehicle
)
:
QObject
(
vehicle
)
,
_vehicle
(
vehicle
)
,
_mavlink
(
NULL
)
,
_mavlink
(
nullptr
)
,
_loadProgress
(
0.0
)
,
_parametersReady
(
false
)
,
_missingParameters
(
false
)
...
...
@@ -45,7 +45,7 @@ ParameterManager::ParameterManager(Vehicle* vehicle)
,
_metaDataAddedToFacts
(
false
)
,
_logReplay
(
vehicle
->
priorityLink
()
&&
vehicle
->
priorityLink
()
->
isLogReplay
())
,
_parameterSetMajorVersion
(
-
1
)
,
_parameterMetaData
(
NULL
)
,
_parameterMetaData
(
nullptr
)
,
_prevWaitingReadParamIndexCount
(
0
)
,
_prevWaitingReadParamNameCount
(
0
)
,
_prevWaitingWriteParamNameCount
(
0
)
...
...
@@ -330,7 +330,7 @@ void ParameterManager::_parameterUpdate(int vehicleId, int componentId, QString
_dataMutex
.
unlock
();
Fact
*
fact
=
NULL
;
Fact
*
fact
=
nullptr
;
if
(
_mapParameterName2Variant
[
componentId
].
contains
(
parameterName
))
{
fact
=
_mapParameterName2Variant
[
componentId
][
parameterName
].
value
<
Fact
*>
();
}
...
...
@@ -1052,7 +1052,7 @@ void ParameterManager::_clearMetaData(void)
{
if
(
_parameterMetaData
)
{
_parameterMetaData
->
deleteLater
();
_parameterMetaData
=
NULL
;
_parameterMetaData
=
nullptr
;
}
}
...
...
@@ -1288,7 +1288,7 @@ void ParameterManager::cacheMetaDataFile(const QString& metaDataFile, MAV_AUTOPI
// Find the cache hit closest to this new file
int
cacheMajorVersion
,
cacheMinorVersion
;
QString
cacheHit
=
ParameterManager
::
parameterMetaDataFile
(
NULL
,
firmwareType
,
newMajorVersion
,
cacheMajorVersion
,
cacheMinorVersion
);
QString
cacheHit
=
ParameterManager
::
parameterMetaDataFile
(
nullptr
,
firmwareType
,
newMajorVersion
,
cacheMajorVersion
,
cacheMinorVersion
);
qCDebug
(
ParameterManagerLog
)
<<
"ParameterManager::cacheMetaDataFile cacheHit file:firmware:major;minor"
<<
cacheHit
<<
cacheMajorVersion
<<
cacheMinorVersion
;
bool
cacheNewFile
=
false
;
...
...
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