phoneapp/phonestringloader/tsrc/ut_phonestringloader/unit_tests.cpp
changeset 78 baacf668fe89
parent 21 92ab7f8d0eab
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
    19 #include <QtGui>
    19 #include <QtGui>
    20 #include <hbapplication.h>
    20 #include <hbapplication.h>
    21 #include <QSignalSpy>
    21 #include <QSignalSpy>
    22 //#include <hbglobal_p.h>
    22 //#include <hbglobal_p.h>
    23 #include <stringloader.h>
    23 #include <stringloader.h>
    24 #include "phoneaction.h"
       
    25 #include "phoneresourceadapter.h"
    24 #include "phoneresourceadapter.h"
    26 
    25 
    27 class TestPhoneStringLoader : public QObject
    26 class TestPhoneStringLoader : public QObject
    28 {
    27 {
    29     Q_OBJECT
    28     Q_OBJECT
    68         m_resource_adapter = new PhoneResourceAdapter;
    67         m_resource_adapter = new PhoneResourceAdapter;
    69     
    68     
    70     return m_resource_adapter;
    69     return m_resource_adapter;
    71 }
    70 }
    72 
    71 
    73 QMap<PhoneAction::ActionType, PhoneAction *> PhoneResourceAdapter::convert (int symbianResourceId, ...)
    72 QString PhoneResourceAdapter::convert (int symbianResourceId, ...)
    74 {
    73 {
    75     m_resourceId = symbianResourceId;
    74     m_resourceId = symbianResourceId;
    76     m_convertCalled = true;
    75     m_convertCalled = true;
    77     QMap<PhoneAction::ActionType, PhoneAction *> map;
    76     QString ret = "";
    78     if (m_set_text_map) {
    77     if (m_set_text_map) {
    79         PhoneAction *text = new PhoneAction;
    78         ret = tr("Test");
    80         text->setText(tr("Test"));
       
    81         map[PhoneAction::Text] = text; 
       
    82     }
    79     }
    83         
    80     
    84     return map;
    81     return ret;
    85 }
    82 }
    86 
    83 
    87 TestPhoneStringLoader::TestPhoneStringLoader ()
    84 TestPhoneStringLoader::TestPhoneStringLoader ()
    88 {
    85 {
    89 }
    86 }