From 7adc1aa2be4c03f89577ad3d798b34a7ad61ec66 Mon Sep 17 00:00:00 2001 From: Marek Timko Date: Sun, 1 Dec 2013 21:38:23 +0100 Subject: Fixed crasher in varianttype, whitespaces inconsistency Signed-off-by: Marek Timko --- lib/abstractroutingengine.h | 2 +- lib/vehicleproperty.h | 7 ++++--- plugins/dbus/varianttype.cpp | 6 +----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/abstractroutingengine.h b/lib/abstractroutingengine.h index 46e2a093..489a9abf 100644 --- a/lib/abstractroutingengine.h +++ b/lib/abstractroutingengine.h @@ -50,7 +50,7 @@ class AsyncPropertyRequest { public: AsyncPropertyRequest() - :property(VehicleProperty::NoValue),timeout(10000) + :property(VehicleProperty::NoValue),zoneFilter(Zone::None), timeout(10000) { } diff --git a/lib/vehicleproperty.h b/lib/vehicleproperty.h index 86b5ff83..876ce223 100644 --- a/lib/vehicleproperty.h +++ b/lib/vehicleproperty.h @@ -274,11 +274,12 @@ public: * \brief factory constructs a static instance of VehicleProperty. This should be called once before VehicleProperty is used in the app */ static void factory(); + /*! * - * \brief destroys static instance of VehicleProperty. This should be called at application shutdown - */ - static void shutdown(); + * \brief destroys static instance of VehicleProperty. This should be called at application shutdown + */ + static void shutdown(); typedef std::string Property; diff --git a/plugins/dbus/varianttype.cpp b/plugins/dbus/varianttype.cpp index 047c6e78..b7138209 100644 --- a/plugins/dbus/varianttype.cpp +++ b/plugins/dbus/varianttype.cpp @@ -44,11 +44,7 @@ GVariant *VariantType::toGVariant() { if(!value()) { - AbstractPropertyType* v = VehicleProperty::getPropertyTypeForPropertyNameValue(mAmbPropertyName); - - setValue(v); - - delete v; //TODO: Needs to be veriefied if it will CRASH here. Does setValue() take ownership ??? + setValue(VehicleProperty::getPropertyTypeForPropertyNameValue(mAmbPropertyName)); } auto v = value(); -- cgit v1.2.1