smf/smfservermodule/smfcommon/smfcontact.cpp
changeset 26 83d6a149c755
parent 25 a180113055cb
equal deleted inserted replaced
25:a180113055cb 26:83d6a149c755
    18  *
    18  *
    19  */
    19  */
    20 
    20 
    21 #include <QFile>
    21 #include <QFile>
    22 #include <QTextStream>
    22 #include <QTextStream>
    23 
    23 #include <QDebug>
    24 #include "smfcontact.h"
    24 #include "smfcontact.h"
    25 #include "smfcontact_p.h"
    25 #include "smfcontact_p.h"
    26 
    26 
    27 /**
    27 /**
    28  * Constructor with default argument
    28  * Constructor with default argument
   122  * @param aSubType The subtype string
   122  * @param aSubType The subtype string
   123  * @param value Thhe value to be set for the subtype
   123  * @param value Thhe value to be set for the subtype
   124  */
   124  */
   125 void SmfContact::setValue(const QString& aSubType,QVariant& value)
   125 void SmfContact::setValue(const QString& aSubType,QVariant& value)
   126 	{
   126 	{
       
   127 	if(value.isValid())
       
   128 		{
       
   129 		if((value.toInt()>127 && value.toString()!="Polygon") || (value.toInt()<0 && value.toString()!="Polygon"))
       
   130 			{
       
   131 			qDebug()<< "Invalid data in qVariant";
       
   132 			}
       
   133 	else		
   127 	d->m_details.insert(aSubType,value);
   134 	d->m_details.insert(aSubType,value);
       
   135 		}
   128 	}
   136 	}
   129 
   137 
   130 /**
   138 /**
   131  * Method for Externalization. Writes the SmfContact object to 
   139  * Method for Externalization. Writes the SmfContact object to 
   132  * the stream and returns a reference to the stream.
   140  * the stream and returns a reference to the stream.