Fixed crasher in varianttype, whitespaces inconsistency
authorMarek Timko <marek.timko@ixonos.com>
Sun, 1 Dec 2013 20:38:23 +0000 (21:38 +0100)
committerMarek Timko <marek.timko@ixonos.com>
Sun, 1 Dec 2013 20:38:23 +0000 (21:38 +0100)
Signed-off-by: Marek Timko <marek.timko@ixonos.com>
lib/abstractroutingengine.h
lib/vehicleproperty.h
plugins/dbus/varianttype.cpp

index 46e2a09..489a9ab 100644 (file)
@@ -50,7 +50,7 @@ class AsyncPropertyRequest
 {
 public:
        AsyncPropertyRequest()
-               :property(VehicleProperty::NoValue),timeout(10000)
+               :property(VehicleProperty::NoValue),zoneFilter(Zone::None), timeout(10000)
        {
 
        }
index 86b5ff8..876ce22 100644 (file)
@@ -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;
 
index 047c6e7..b713820 100644 (file)
@@ -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();