TizenRefApp-7698 fixed codestyle in Common/* 27/99027/1
authorAndrey Klimenko <and.klimenko@samsung.com>
Mon, 21 Nov 2016 13:33:15 +0000 (15:33 +0200)
committerAndrey Klimenko <and.klimenko@samsung.com>
Mon, 21 Nov 2016 13:33:15 +0000 (15:33 +0200)
Change-Id: Id58141b895bac24e4a96e0f98ad6d2e791cf56b6
Signed-off-by: Andrey Klimenko <and.klimenko@samsung.com>
89 files changed:
src/Common/AppControl/src/AppControlCompose.cpp
src/Common/AppControl/src/AppControlDefault.cpp
src/Common/AppControl/src/AppControlParser.cpp
src/Common/AppControl/src/AppControlUtils.cpp
src/Common/AppControl/src/ContactEditor.cpp
src/Common/AppControl/src/ContactViewer.cpp
src/Common/AppControl/src/FileViewer.cpp
src/Common/AppControl/src/Share.cpp
src/Common/AppControl/src/VoiceCall.cpp
src/Common/ContactManager/inc/Contact.h
src/Common/ContactManager/inc/ContactList.h
src/Common/ContactManager/src/ContactManager.cpp
src/Common/ContactManager/src/ContactRecord.cpp
src/Common/ContactManager/src/ContactVCardGenerator.cpp
src/Common/ContactManager/src/ContactVCardParser.cpp
src/Common/Controller/src/App.cpp
src/Common/Controller/src/BaseController.cpp
src/Common/Controller/src/FrameController.cpp
src/Common/Controller/src/MbeRecipients.cpp
src/Common/Controller/src/NaviFrameController.cpp
src/Common/Controller/src/SaveAttachments.cpp
src/Common/Controller/src/SaveAttachmentsListItem.cpp
src/Common/Controller/src/ViewItemController.cpp
src/Common/MsgEngine/inc/MsgAttachment.h
src/Common/MsgEngine/inc/MsgEngine.h
src/Common/MsgEngine/src/Message.cpp
src/Common/MsgEngine/src/MessageMms.cpp
src/Common/MsgEngine/src/MessageSMS.cpp
src/Common/MsgEngine/src/MsgConversationItem.cpp
src/Common/MsgEngine/src/MsgEngine.cpp
src/Common/MsgEngine/src/MsgSettings.cpp
src/Common/MsgEngine/src/MsgStorage.cpp
src/Common/MsgEngine/src/MsgThreadItem.cpp
src/Common/MsgEngine/src/MsgTransport.cpp
src/Common/MsgEngine/src/MsgUtils.cpp
src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp
src/Common/MsgEngine/src/private/MessagePrivate.cpp
src/Common/MsgEngine/src/private/MessageSMSPrivate.cpp
src/Common/MsgEngine/src/private/MsgAddressPrivate.cpp
src/Common/MsgEngine/src/private/MsgAttachmentPrivate.cpp
src/Common/MsgEngine/src/private/MsgComposerPrivate.cpp
src/Common/MsgEngine/src/private/MsgConvMediaPrivate.cpp
src/Common/MsgEngine/src/private/MsgConvMediaPrivate.h
src/Common/MsgEngine/src/private/MsgConversationItemPrivate.cpp
src/Common/MsgEngine/src/private/MsgListHandlePrivate.h
src/Common/MsgEngine/src/private/MsgMediaPrivate.cpp
src/Common/MsgEngine/src/private/MsgPagePrivate.cpp
src/Common/MsgEngine/src/private/MsgReportPrivate.cpp
src/Common/MsgEngine/src/private/MsgReportPrivate.h
src/Common/MsgEngine/src/private/MsgSettingsPrivate.cpp
src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp
src/Common/MsgEngine/src/private/MsgStructListPrivate.h
src/Common/MsgEngine/src/private/MsgStructPrivate.h
src/Common/MsgEngine/src/private/MsgThreadItemPrivate.cpp
src/Common/MsgEngine/src/private/MsgTransportPrivate.cpp
src/Common/MsgEngine/src/private/MsgUtilsPrivate.cpp
src/Common/SystemSettingsManager/src/SystemSettingsManager.cpp
src/Common/Utils/inc/LangUtils.h
src/Common/Utils/inc/Logger.h
src/Common/Utils/inc/LoggerImpl.h
src/Common/Utils/inc/PhoneNumberUtils.h
src/Common/Utils/src/FileUtils.cpp
src/Common/Utils/src/HwButtonListener.cpp
src/Common/Utils/src/LoggerImpl.cpp
src/Common/Utils/src/MediaUtils.cpp
src/Common/Utils/src/PathUtils.cpp
src/Common/Utils/src/PhoneNumberUtils.cpp
src/Common/Utils/src/TextDecorator.cpp
src/Common/Utils/src/ThumbnailMaker.cpp
src/Common/Utils/src/TimeUtils.cpp
src/Common/Utils/src/VCalendarParser.cpp
src/Common/View/inc/ListView.h
src/Common/View/inc/MbeRecipientViewItem.h
src/Common/View/inc/PopupList.h
src/Common/View/inc/PopupManager.h
src/Common/View/src/Box.cpp
src/Common/View/src/ContextPopup.cpp
src/Common/View/src/DefaultLayout.cpp
src/Common/View/src/ListItem.cpp
src/Common/View/src/ListView.cpp
src/Common/View/src/MbeRecipientsView.cpp
src/Common/View/src/NaviFrameItem.cpp
src/Common/View/src/NaviFrameView.cpp
src/Common/View/src/NoContentLayout.cpp
src/Common/View/src/Popup.cpp
src/Common/View/src/PopupListItem.cpp
src/Common/View/src/PopupManager.cpp
src/Common/View/src/SelectAllListItem.cpp
src/Common/View/src/View.cpp

index eb85b3178065d8b078dafb3f01ae9bf0bbad1e34..7f68dee94559122c9c7a866e1ac59828d1a7c3bc 100644 (file)
@@ -52,9 +52,9 @@ AppControlCompose::AppControlCompose(const std::string &opMsg, app_control_h han
 {
     MSG_LOG("ComposeType: ", m_ComposeType);
 
-    if(handle)
+    if (handle)
     {
-        switch(m_ComposeType)
+        switch (m_ComposeType)
         {
             case OpCompose:
                 createComposeOp(handle);
@@ -95,10 +95,10 @@ void AppControlCompose::createShareOp(app_control_h handle)
 {
     parseUriShare(handle);
 
-    if(mimeContact == AppControlUtils::getMimeType(handle))
+    if (mimeContact == AppControlUtils::getMimeType(handle))
     {
         std::string idStr = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_ID);
-        if(!idStr.empty())
+        if (!idStr.empty())
         {
             std::string dataType = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_TYPE);
             m_VcfInfo.isMyProfile = (dataType == myProfileDataType);
@@ -106,21 +106,21 @@ void AppControlCompose::createShareOp(app_control_h handle)
         }
     }
 
-    if(m_FileList.empty())
+    if (m_FileList.empty())
     {
         std::string path = AppControlUtils::getExtraData(handle, APP_CONTROL_DATA_PATH);
-        if(!path.empty())
+        if (!path.empty())
             m_FileList.push_back(std::move(path));
     }
 }
 
 void AppControlCompose::createMultiShareOp(app_control_h handle)
 {
-    if(mimeContact == AppControlUtils::getMimeType(handle))
+    if (mimeContact == AppControlUtils::getMimeType(handle))
     {
         std::list<std::string> contactsList;
         AppControlUtils::getExtraDataArray(handle, APP_CONTROL_DATA_ID, contactsList);
-        for(auto it : contactsList)
+        for (auto it : contactsList)
             m_VcfInfo.contactsIdList.push_back(atoi(it.c_str()));
     }
 
@@ -223,17 +223,15 @@ bool AppControlCompose::parseUriShare(app_control_h handle)
             if (cur == "sms" || cur == "mmsto" || cur == "file")
             {
                 m_isMms = (cur == "mmsto" || cur == "file");
-                if(cur == "file" && m_FileList.empty())
+                if (cur == "file" && m_FileList.empty())
                 {
                     std::string prefix("file://");
                     m_FileList.push_back(uriToParse.erase(0, prefix.length()));
                 }
                 res = true;
-            }
-            else
-            {
+            } else {
                 auto it = std::find(m_FileList.begin(), m_FileList.end(), uriToParse);
-                if(it == m_FileList.end())
+                if (it == m_FileList.end())
                     m_FileList.push_back(uriToParse); // no prefix, uri is a path to file itself
             }
         }
index 3e17959f5ccf301e1311fc02d0ab4cc8bfac4dde..429cb7ce93e97db137f18a77ea7b8a073f000bd7 100644 (file)
@@ -38,7 +38,6 @@ AppControlDefault::AppControlDefault(const std::string &opMsg, app_control_h han
 
 AppControlDefault::~AppControlDefault()
 {
-
 }
 
 MsgId AppControlDefault::getMessageId() const
@@ -60,7 +59,7 @@ void AppControlDefault::parse(app_control_h handle)
 {
     char *key = nullptr;
     app_control_get_extra_data(handle, keyType, &key);
-    if(!key)
+    if (!key)
     {
         m_DefaultType = MainType;
         return;
@@ -68,16 +67,16 @@ void AppControlDefault::parse(app_control_h handle)
 
     std::string type = key;
     free(key);
-    if(type == valueNewMsg)
+    if (type == valueNewMsg)
         viewMessage(handle);
-    else if(type == valueSendFailed)
+    else if (type == valueSendFailed)
         m_DefaultType = SendFailedType;
     else
         MSG_LOG("Unknown type!");
 
     char *msgIdStr = nullptr;
     app_control_get_extra_data(handle, keyMsgId, &msgIdStr);
-    if(!msgIdStr)
+    if (!msgIdStr)
         return;
 
     m_MsgId = atoi(msgIdStr);
@@ -88,19 +87,19 @@ bool AppControlDefault::isNotificationPanel(app_control_h handle) const
 {
     char *keyVal = nullptr;
     app_control_get_extra_data(handle, notificationPanel, &keyVal);
-    if(keyVal)
+    if (keyVal)
     {
         free(keyVal);
         return true;
     }
-    else
-        return false;
+
+    return false;
 }
 
 void AppControlDefault::viewMessage(app_control_h handle)
 {
     makeReplyText(handle);
-    if(isNotificationPanel(handle))
+    if (isNotificationPanel(handle))
         m_DefaultType = NotificationType;
     else
         m_DefaultType = m_ReplyText.empty() ? ViewType : ReplyType;
index 117e13329c7fc1739a6484306654f43d7a930591..0c4604b8d20b78620adaed5ccfb5f3eb592e9147 100644 (file)
@@ -55,7 +55,7 @@ AppControlCommandRef AppControlParser::parse(app_control_h handle)
 
     app_control_get_operation(handle, &opStr);
 
-    if(!opStr)
+    if (!opStr)
     {
         MSG_LOG_WARN("app_control operation is null");
         return cmd;
@@ -63,7 +63,7 @@ AppControlCommandRef AppControlParser::parse(app_control_h handle)
 
     AppControlCommand::OperationType opType = getOperation(opStr);
 
-    switch(opType)
+    switch (opType)
     {
         case AppControlCommand::OpDefault:
             cmd = std::make_shared<AppControlDefault>(opStr, handle);
index e9b781ddf607c095bb5ee24ebdc90d2795519b16..54a0ca2cf0eb2f53dd04cbe838ecfc99f12f415a 100644 (file)
@@ -22,9 +22,9 @@ std::string AppControlUtils::getExtraData(app_control_h handle, const std::strin
 {
     std::string res;
     char *val = nullptr;
-    if(APP_CONTROL_ERROR_NONE == app_control_get_extra_data(handle, key.c_str(), &val))
+    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data(handle, key.c_str(), &val))
     {
-        if(val)
+        if (val)
         {
             res = val;
             free(val);
@@ -37,9 +37,9 @@ void AppControlUtils::getExtraDataArray(app_control_h handle, const std::string
 {
     int arrayLength = 0;
     char **pArrayVal = nullptr;
-    if(APP_CONTROL_ERROR_NONE == app_control_get_extra_data_array(handle, key.c_str(), &pArrayVal, &arrayLength))
+    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data_array(handle, key.c_str(), &pArrayVal, &arrayLength))
     {
-        for(int i = 0; i < arrayLength; ++i)
+        for (int i = 0; i < arrayLength; ++i)
         {
             outArray.push_back(pArrayVal[i]);
             free(pArrayVal[i]);
@@ -52,7 +52,7 @@ int AppControlUtils::getExtraDataInt(app_control_h handle, const std::string &ke
 {
     char *val = nullptr;
     int parsed = 0;
-    if(APP_CONTROL_ERROR_NONE == app_control_get_extra_data(handle, key.c_str(), &val) && val)
+    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data(handle, key.c_str(), &val) && val)
     {
         parsed = atoi(val);
         free(val);
@@ -64,18 +64,18 @@ void AppControlUtils::getExtraDataIntArray(app_control_h handle, const std::stri
 {
     int arrayLength = 0;
     char **pArrayVal = nullptr;
-    if(APP_CONTROL_ERROR_NONE == app_control_get_extra_data_array(handle, key.c_str(), &pArrayVal, &arrayLength)
+    if (APP_CONTROL_ERROR_NONE == app_control_get_extra_data_array(handle, key.c_str(), &pArrayVal, &arrayLength)
             && pArrayVal)
     {
         std::string::size_type sz;
-        for(int i = 0; i < arrayLength; ++i)
+        for (int i = 0; i < arrayLength; ++i)
         {
-            if(pArrayVal[i])
+            if (pArrayVal[i])
             {
                 std::string s(pArrayVal[i] ? pArrayVal[i] : "");
                 free(pArrayVal[i]);
                 int parsed = std::stoi(s, &sz);
-                if(sz == s.length())
+                if (sz == s.length())
                 {
                     outArray.push_back(parsed);
                 }
@@ -90,7 +90,7 @@ std::string AppControlUtils::getMimeType(app_control_h handle)
     char *mime = nullptr;
     std::string result;
     app_control_get_mime(handle, &mime);
-    if(mime)
+    if (mime)
     {
         result = mime;
         free(mime);
index d75744f3655f1ae40aeda9426ec8c455c60385e3..9317832b0be572ae46ba79a5a96c16478b55e68e 100644 (file)
@@ -45,19 +45,19 @@ void ContactEditor::setListener(IContactEditorListener *l)
 bool ContactEditor::launch(const std::string &address, Operation operation)
 {
     bool res = false;
-    if(!address.empty())
+    if (!address.empty())
     {
         const char *op = nullptr;
-        if(operation == EditOp)
+        if (operation == EditOp)
             op = APP_CONTROL_OPERATION_EDIT;
-        else if(operation == CreateOp)
+        else if (operation == CreateOp)
             op = APP_CONTROL_OPERATION_ADD;
 
-        if(op)
+        if (op)
         {
-            if(MsgUtils::isValidNumber(address))
+            if (MsgUtils::isValidNumber(address))
                 res = launch(address, op, APP_CONTROL_DATA_PHONE);
-            else if(MsgUtils::isValidEmail(address))
+            else if (MsgUtils::isValidEmail(address))
                 res = launch(address, op, APP_CONTROL_DATA_EMAIL);
         }
     }
@@ -68,7 +68,7 @@ bool ContactEditor::launch(const std::string &address, const char *operation, co
 {
     bool res = false;
     terminate();
-    if(APP_CONTROL_ERROR_NONE == app_control_create(&m_Handle))
+    if (APP_CONTROL_ERROR_NONE == app_control_create(&m_Handle))
     {
         app_control_set_operation(m_Handle, operation);
         app_control_set_mime(m_Handle, mimeContact);
@@ -77,7 +77,7 @@ bool ContactEditor::launch(const std::string &address, const char *operation, co
         int ret = app_control_send_launch_request(m_Handle, APP_CONTROL_RES_CALLBACK(ContactEditor, onResultCb), this);
         MSG_LOG("Result code: ", ret);
         res = ret == APP_CONTROL_ERROR_NONE;
-        if(!res)
+        if (!res)
             terminate();
     }
 
@@ -86,7 +86,7 @@ bool ContactEditor::launch(const std::string &address, const char *operation, co
 
 void ContactEditor::terminate()
 {
-    if(m_Handle)
+    if (m_Handle)
     {
         app_control_send_terminate_request(m_Handle);
         app_control_destroy(m_Handle);
@@ -96,19 +96,19 @@ void ContactEditor::terminate()
 
 void ContactEditor::onResultCb(app_control_h request, app_control_h reply, app_control_result_e result)
 {
-    if(m_Handle)
+    if (m_Handle)
     {
-        if(result == APP_CONTROL_RESULT_SUCCEEDED && m_pListener)
+        if (result == APP_CONTROL_RESULT_SUCCEEDED && m_pListener)
         {
             char *op = nullptr;
             app_control_get_operation(m_Handle, &op);
 
-            if(op)
+            if (op)
             {
                 terminate();
-                if(strcmp(op, APP_CONTROL_OPERATION_EDIT) == 0)
+                if (strcmp(op, APP_CONTROL_OPERATION_EDIT) == 0)
                     m_pListener->onContactChanged(*this);
-                else if(strcmp(op, APP_CONTROL_OPERATION_ADD) == 0)
+                else if (strcmp(op, APP_CONTROL_OPERATION_ADD) == 0)
                     m_pListener->onContactCreated(*this);
                 free(op);
             }
index 37a2e567de1803911b8fcedd779424ac7855ea0a..9be1f167015b1addbd648c7b8586bda32fbf796c 100644 (file)
@@ -32,7 +32,6 @@ namespace
 ContactViewer::ContactViewer()
     : m_Handle()
 {
-
 }
 
 ContactViewer::~ContactViewer()
@@ -48,7 +47,7 @@ ContactViewer &ContactViewer::getInst()
 
 void ContactViewer::reset()
 {
-    if(m_Handle)
+    if (m_Handle)
     {
         app_control_send_terminate_request(m_Handle);
         app_control_destroy(m_Handle);
@@ -61,7 +60,7 @@ bool ContactViewer::launch(int id, ContactAddress::OwnerType ownerType)
     bool res = false;
 
     reset();
-    if(APP_CONTROL_ERROR_NONE == app_control_create(&m_Handle))
+    if (APP_CONTROL_ERROR_NONE == app_control_create(&m_Handle))
     {
         app_control_set_operation(m_Handle, APP_CONTROL_OPERATION_VIEW);
         app_control_set_mime(m_Handle, mimeContact);
@@ -83,7 +82,7 @@ bool ContactViewer::launch(const ContactAddress &address)
 
 const char *ContactViewer::toStr(ContactAddress::OwnerType type)
 {
-    switch(type)
+    switch (type)
     {
         case ContactAddress::PersonType:
             return personContactTypeStr;
index 64401e87ecbfb0def987045dd91af7c9658d007e..0309fac99d4662ccec00af34be567644f4f7ec55 100644 (file)
@@ -29,7 +29,7 @@ FileViewer::FileViewer()
 
 FileViewer::~FileViewer()
 {
-    if(!m_FilePath.empty())
+    if (!m_FilePath.empty())
         FileUtils::remove(m_FilePath);
 }
 
@@ -48,10 +48,10 @@ bool FileViewer::launch(const std::string &file)
     MSG_LOG("File path: ", file);
     MSG_LOG("MIME type: ", mime);
 
-    if(mime.empty() || file.empty())
+    if (mime.empty() || file.empty())
         return false;
 
-    if(APP_CONTROL_ERROR_NONE == app_control_create(&svc_handle))
+    if (APP_CONTROL_ERROR_NONE == app_control_create(&svc_handle))
     {
         app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_VIEW);
         app_control_set_mime(svc_handle, mime.c_str());
@@ -71,11 +71,11 @@ bool FileViewer::launchWithCopy(const std::string &file)
 {
     bool res = false;
         // Remove previous file (correct only for APP_CONTROL_LAUNCH_MODE_GROUP)
-    if(!m_FilePath.empty())
+    if (!m_FilePath.empty())
         FileUtils::remove(m_FilePath);
 
     m_FilePath = FileUtils::addFileToDataDir(file);
-    if(!m_FilePath.empty())
+    if (!m_FilePath.empty())
         res = launch(m_FilePath);
 
     return res;
index cf0df1dfa5df4813ccf885c0200c6a110bb3a3b8..fda98aa1af69024a03c7766792f8a098cf1ce2f4 100644 (file)
@@ -26,7 +26,6 @@ using namespace Msg;
 
 Share::Share()
 {
-
 }
 
 Share::~Share()
@@ -42,7 +41,7 @@ Share &Share::getInst()
 
 void Share::removeFiles()
 {
-    for(auto &&file : m_FileList)
+    for (auto &&file : m_FileList)
     {
         FileUtils::remove(file);
     }
@@ -52,7 +51,7 @@ void Share::removeFiles()
 void Share::addFiles(const std::list<std::string> &files)
 {
     removeFiles();
-    for(auto &&file : files)
+    for (auto &&file : files)
     {
         m_FileList.push_back(FileUtils::addFileToDataDir(file));
     }
@@ -60,22 +59,22 @@ void Share::addFiles(const std::list<std::string> &files)
 
 bool Share::launch(const std::list<std::string> &files)
 {
-    if(files.empty())
+    if (files.empty())
         return false;
 
     bool res = false;
     app_control_h svc_handle = nullptr;
 
-    if(APP_CONTROL_ERROR_NONE == app_control_create(&svc_handle))
+    if (APP_CONTROL_ERROR_NONE == app_control_create(&svc_handle))
     {
         addFiles(files);
         app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_MULTI_SHARE);
         app_control_set_launch_mode(svc_handle, APP_CONTROL_LAUNCH_MODE_GROUP);
 
         std::vector<const char*> nativePaths;
-        for(const std::string &file : m_FileList)
+        for (const std::string &file : m_FileList)
         {
-            if(!file.empty())
+            if (!file.empty())
                 nativePaths.push_back(file.c_str());
         }
 
@@ -91,13 +90,13 @@ bool Share::launch(const std::list<std::string> &files)
 
 bool Share::launch(const std::string &text)
 {
-    if(text.empty())
+    if (text.empty())
         return false;
 
     bool res = false;
     app_control_h svc_handle = nullptr;
 
-    if(APP_CONTROL_ERROR_NONE == app_control_create(&svc_handle))
+    if (APP_CONTROL_ERROR_NONE == app_control_create(&svc_handle))
     {
         app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_SHARE_TEXT);
         app_control_add_extra_data(svc_handle, APP_CONTROL_DATA_TEXT, text.c_str());
index 629f4e10eb1142c8e84d62e6f6f0fd6bda98467d..9ef2813e720447b3717a69e10beda6f878c0e892 100644 (file)
@@ -34,7 +34,7 @@ bool VoiceCall::launch(const std::string &number)
     bool res = false;
     app_control_h svcHandle = nullptr;
 
-    if(APP_CONTROL_ERROR_NONE == app_control_create(&svcHandle))
+    if (APP_CONTROL_ERROR_NONE == app_control_create(&svcHandle))
     {
         app_control_set_operation(svcHandle, APP_CONTROL_OPERATION_CALL);
         std::string phoneNumber = tel + number;
index c41ce0c3578e7ed6b34b4c7919467575c10b8a6a..7fe7c9a707d4ffed127dd63dd050358f5f9aae64 100644 (file)
@@ -55,7 +55,7 @@ namespace Msg
     {
         std::string res;
         int count = getChildCount(_contacts_contact.number);
-        if(count > 0)
+        if (count > 0)
             res = getStr(getChildP(_contacts_contact.number, 0), _contacts_number.number);
         return res;
     }
@@ -64,7 +64,7 @@ namespace Msg
     {
         std::string res;
         int count = getChildCount(_contacts_contact.email);
-        if(count > 0)
+        if (count > 0)
             res = getStr(getChildP(_contacts_contact.number, 0), _contacts_email.email);
         return res;
     }
@@ -77,7 +77,7 @@ namespace Msg
     inline std::string Contact::getAddress() const
     {
         std::string address = getPhoneNumber();
-        if(address.empty())
+        if (address.empty())
             address = getEmail();
         return address;
     }
index 1be18a5fdbc78f0ecfc1fac3d5cec3210414cc85..e06fbd6ebf402e09fe9745f52c48e5a773ffb176 100644 (file)
@@ -37,7 +37,7 @@ namespace Msg
 
             ~ContactList()
             {
-                if(m_List)
+                if (m_List)
                     contacts_list_destroy(m_List, true);
             }
 
index 5a8a1996389d8d83d65fbafac36c0183fb45f542..5c0befdbc28a6c00b2716eff3ec79b68f3e97f33 100644 (file)
@@ -31,7 +31,7 @@
         MSG_LOG("");
         m_AddressMap.reserve(mapReservSize);
         int error = contacts_connect();
-        if(error != 0)
+        if (error != 0)
         {
             MSG_LOG_ERROR(whatError(error));
         }
     {
         MSG_LOG("");
         int error = contacts_db_remove_changed_cb(_contacts_contact._uri, contactChangedCb, this);
-        if(error != 0)
+        if (error != 0)
             MSG_LOG_ERROR(whatError(error));
 
         error = contacts_disconnect();
-        if(error != 0)
+        if (error != 0)
             MSG_LOG_ERROR(whatError(error));
     }
 
     std::string ContactManager::whatError(int error)
     {
-        switch(error)
+        switch (error)
         {
             case CONTACTS_ERROR_NONE:
                 return "CONTACTS_ERROR_NONE";
     ContactMyProfileNumberRef ContactManager::getContactMyProfileNumber(const std::string &number)
     {
         auto myProfile = getOwnerProfile();
-        if(!myProfile)
+        if (!myProfile)
             return nullptr;
 
         contacts_record_h rec = myProfile->getRecord();
         contacts_record_get_child_record_count(rec, _contacts_my_profile.number, &count);
         std::string normalizedNumber = PhoneNumberUtils::getInst().getNormalizedNumber(number);
 
-        for(int i =0; i < count; ++i)
+        for (int i =0; i < count; ++i)
         {
             contacts_record_h child = nullptr;
             contacts_record_get_child_record_at_p(rec, _contacts_my_profile.number, i, &child);
-            if(child)
+            if (child)
             {
                 char *num = nullptr;
                 contacts_record_get_str_p(child, _contacts_number.number, &num);
-                if(num)
+                if (num)
                 {
                     std::string curNum = PhoneNumberUtils::getInst().getNormalizedNumber(num);
-                    if(normalizedNumber == curNum)
+                    if (normalizedNumber == curNum)
                     {
                         contacts_record_h clonedRec = nullptr;
                         contacts_record_clone(child, &clonedRec);
-                        if(clonedRec)
+                        if (clonedRec)
                             return std::make_shared<ContactMyProfileNumber>(true, *myProfile, clonedRec);
                     }
                 }
     ContactMyProfileEmailRef ContactManager::getContactMyProfileEmail(const std::string &email)
     {
         auto myProfile = getOwnerProfile();
-        if(!myProfile)
+        if (!myProfile)
             return nullptr;
 
         contacts_record_h rec = myProfile->getRecord();
         int count = 0;
         contacts_record_get_child_record_count(rec, _contacts_my_profile.email, &count);
 
-        for(int i =0; i < count; ++i)
+        for (int i =0; i < count; ++i)
         {
             contacts_record_h child = nullptr;
             contacts_record_get_child_record_at_p(rec, _contacts_my_profile.email, i, &child);
-            if(child)
+            if (child)
             {
                 char *curEmail = nullptr;
                 contacts_record_get_str_p(child, _contacts_email.email, &curEmail);
-                if(curEmail)
+                if (curEmail)
                 {
-                   if(strcasecmp(email.c_str(), curEmail) == 0)
+                   if (strcasecmp(email.c_str(), curEmail) == 0)
                    {
                        contacts_record_h clonedRec = nullptr;
                        contacts_record_clone(child, &clonedRec);
-                       if(clonedRec)
+                       if (clonedRec)
                            return std::make_shared<ContactMyProfileEmail>(true, *myProfile, clonedRec);
                    }
                 }
 
     ContactMyProfileRef ContactManager::getOwnerProfile()
     {
-        if(!m_OwnerProfile)
+        if (!m_OwnerProfile)
         {
             contacts_list_h list = nullptr;
             contacts_record_h myProfile = nullptr;
             contacts_db_get_all_records(_contacts_my_profile._uri, 0, 1, &list);
-            if(list)
+            if (list)
             {
                 contacts_list_get_current_record_p(list, &myProfile);
                 contacts_list_destroy(list, false);
             }
-            if(myProfile)
+            if (myProfile)
                 m_OwnerProfile.reset(new ContactMyProfile(true, myProfile));
         }
         return m_OwnerProfile;
     {
         ContactManager *self = static_cast<ContactManager *>(user_data);
         self->invalidateCache();
-        for(auto listener : self->m_Listeners)
+        for (auto listener : self->m_Listeners)
         {
             listener->onContactChanged();
         }
     {
         ContactManager *self = static_cast<ContactManager *>(user_data);
         self->invalidateCache();
-        for(auto listener : self->m_Listeners)
+        for (auto listener : self->m_Listeners)
         {
             listener->onContactChanged();
         }
     void ContactManager::addListener(IContactManagerListener &listener)
     {
         auto found = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
-        if(found == m_Listeners.end())
+        if (found == m_Listeners.end())
         {
             m_Listeners.push_back(&listener);
         }
     void ContactManager::removeListener(IContactManagerListener &listener)
     {
         auto found = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
-        if(found != m_Listeners.end())
+        if (found != m_Listeners.end())
         {
             m_Listeners.erase(found);
         }
         };
 
         int ctRrr = contacts_query_set_projection(query, numberProjection, sizeof(numberProjection) / sizeof(unsigned int));
-        if(ctRrr == CONTACTS_ERROR_NONE)
+        if (ctRrr == CONTACTS_ERROR_NONE)
             ctRrr = contacts_db_get_records_with_query(query, 0, 0, &list);
 
         contacts_filter_destroy(filter);
         contacts_query_destroy(query);
 
-        while(ctRrr == CONTACTS_ERROR_NONE)
+        while (ctRrr == CONTACTS_ERROR_NONE)
         {
             int contactId = 0;
 
             contacts_list_get_current_record_p(list, &crValue);
-            if(crValue)
+            if (crValue)
             {
                 contacts_record_get_int(crValue, _contacts_person_number.person_id, &contactId);
-                if(contactId > 0)
+                if (contactId > 0)
                     cResValue = crValue;
                 else
                     contacts_record_destroy(crValue, true);
         };
 
         int ctRrr = contacts_query_set_projection(query, numberProjection, sizeof(numberProjection) / sizeof(unsigned int));
-        if(ctRrr == CONTACTS_ERROR_NONE)
+        if (ctRrr == CONTACTS_ERROR_NONE)
             ctRrr = contacts_db_get_records_with_query(query, 0, 0, &list);
 
         contacts_filter_destroy(filter);
         contacts_query_destroy(query);
 
-        while(ctRrr == CONTACTS_ERROR_NONE)
+        while (ctRrr == CONTACTS_ERROR_NONE)
         {
             int contactId = 0;
 
             contacts_list_get_current_record_p(list, &crValue);
-            if(crValue)
+            if (crValue)
             {
                 contacts_record_get_int(crValue, _contacts_person_email.person_id, &contactId);
-                if(contactId > 0)
+                if (contactId > 0)
                     cResValue = crValue;
                 else
                     contacts_record_destroy(crValue, true);
     ContactAddressRef ContactManager::getAddress(const std::string &address)
     {
         auto it = m_AddressMap.find(address);
-        if(m_AddressMap.end() == it)
+        if (m_AddressMap.end() == it)
         {
             bool isNumber = MsgUtils::isValidNumber(address);
 
             // ContactPerson:
             ContactAddressRef contactAddress;
-            if(isNumber)
+            if (isNumber)
                 contactAddress = getContactPersonNumber(address);
             else
                 contactAddress = getContactPersonEmail(address);
 
             // MyProfile:
-            #if(0)
-            if(!contactAddress)
+            #if (0)
+            if (!contactAddress)
             {
-                if(isNumber)
+                if (isNumber)
                     contactAddress = getContactMyProfileNumber(address);
                 else
                     contactAddress = getContactMyProfileEmail(address);
index 004dcd6b4ba96de43ad47d6b722d1a4b7df4b233..8645af74c6951a77ae3a9799951cc9b0d614954e 100644 (file)
@@ -26,7 +26,7 @@ ContactRecord::ContactRecord(bool release, contacts_record_h record)
 
 ContactRecord::~ContactRecord()
 {
-    if(m_Record && m_Release)
+    if (m_Record && m_Release)
     {
         contacts_record_destroy(m_Record, true);
         m_Record = nullptr;
index 6a12bc7ff89aab141f6732cc53836799fbc2f4e8..aa0630bb74e6872fe60d81ce37f419b10d01568c 100644 (file)
@@ -33,7 +33,7 @@ std::string ContactManager::makeVcard(const int personId, bool myProfile)
     contacts_record_h record = nullptr;
     std::string vcardContent;
 
-    if(contacts_db_get_record((myProfile ? _contacts_my_profile._uri : _contacts_person._uri), personId, &record) != CONTACTS_ERROR_NONE)
+    if (contacts_db_get_record((myProfile ? _contacts_my_profile._uri : _contacts_person._uri), personId, &record) != CONTACTS_ERROR_NONE)
     {
         MSG_LOG_ERROR("contacts_db_get_record() failed");
         record = nullptr;
@@ -41,7 +41,7 @@ std::string ContactManager::makeVcard(const int personId, bool myProfile)
     }
     vcardContent = createContactContent(record, myProfile);
 
-    if(record)
+    if (record)
         contacts_record_destroy(record, true);
 
     return vcardContent;
@@ -51,7 +51,7 @@ std::string ContactManager::makeVcard(const std::list<int> &idList)
 {
     std::string vcardContent;
     vcardContent.reserve(idList.size() * avgLengthOfContent);
-    for(auto it : idList)
+    for (auto it : idList)
         vcardContent += createContentForContactList(it);
 
     return vcardContent;
@@ -63,7 +63,7 @@ std::string ContactManager::createContactContent(contacts_record_h record, bool
 
     myProfile ? contacts_vcard_make_from_my_profile(record, &vcardBuff) : contacts_vcard_make_from_person(record, &vcardBuff);
 
-    if(!vcardBuff)
+    if (!vcardBuff)
     {
         MSG_LOG_ERROR("vcardBuff is NULL");
         return std::string();
@@ -77,7 +77,7 @@ std::string ContactManager::createContactContent(contacts_record_h record, bool
 std::string ContactManager::createContentForContactList(int personId)
 {
     contacts_record_h record = nullptr;
-    if(contacts_db_get_record(_contacts_person._uri, personId, &record) != CONTACTS_ERROR_NONE)
+    if (contacts_db_get_record(_contacts_person._uri, personId, &record) != CONTACTS_ERROR_NONE)
     {
         MSG_LOG_ERROR("contacts_db_get_record() failed!");
         record = nullptr;
index 92cea221177176ce8d34097eb128c33879243e10..370d0530557203c96380f6eda2da1e8d23803f5e 100644 (file)
@@ -29,7 +29,7 @@ std::list<ContactRef> ContactManager::parseVcard(const std::string &filePath)
 {
     std::list<ContactRef> res;
 
-    if(filePath.empty())
+    if (filePath.empty())
         return res;
 
     int parseRes = contacts_vcard_parse_to_contact_foreach
@@ -44,8 +44,7 @@ std::list<ContactRef> ContactManager::parseVcard(const std::string &filePath)
             list->emplace_back(recRef);
             return true;
         },
-        &res
-    );
+        &res);
 
     MSG_LOG("Parse result: ", parseRes);
     return res;
index be2f17dbb3bbd4b82a3ee05b4d074687c888158e..eec80b9c03bb94789c80a52dba20c7740384dc4a 100644 (file)
@@ -34,7 +34,7 @@ App::App()
     , m_IsPause(true)
 {
     int serviceResult = m_Engine.openService();
-    if(serviceResult != MESSAGES_ERROR_NONE)
+    if (serviceResult != MESSAGES_ERROR_NONE)
     {
         MSG_ENGINE_WHAT_ERROR(serviceResult);
         MSG_LOG_ERROR("Service handle open error = ", serviceResult);
@@ -86,7 +86,7 @@ const MsgEngine &App::getMsgEngine() const
 
 ContactManager &App::getContactManager()
 {
-    if(!m_pContactManager)
+    if (!m_pContactManager)
         m_pContactManager = new ContactManager;
     return *m_pContactManager;
 }
@@ -98,7 +98,7 @@ const ContactManager &App::getContactManager() const
 
 PopupManager &App::getPopupManager()
 {
-    if(!m_pPopupManager)
+    if (!m_pPopupManager)
         m_pPopupManager = new PopupManager(getWindow());
     return *m_pPopupManager;
 }
@@ -110,7 +110,7 @@ const PopupManager &App::getPopupManager() const
 
 ThumbnailMaker &App::getThumbnailMaker()
 {
-    if(!m_pThumbnailMaker)
+    if (!m_pThumbnailMaker)
         m_pThumbnailMaker = new ThumbnailMaker(*this);
     return *m_pThumbnailMaker;
 }
@@ -122,7 +122,7 @@ const ThumbnailMaker &App::getThumbnailMaker() const
 
 SystemSettingsManager &App::getSysSettingsManager()
 {
-    if(!m_pSysSettingsManager)
+    if (!m_pSysSettingsManager)
         m_pSysSettingsManager = new SystemSettingsManager;
     return *m_pSysSettingsManager;
 }
@@ -140,14 +140,14 @@ void App::exit()
 void App::addListener(IAppListener &l)
 {
     auto found = std::find(m_Listeners.begin(), m_Listeners.end(), &l);
-    if(found == m_Listeners.end())
+    if (found == m_Listeners.end())
         m_Listeners.push_back(&l);
 }
 
 void App::removeListener(IAppListener &l)
 {
     auto found = std::find(m_Listeners.begin(), m_Listeners.end(), &l);
-    if(found != m_Listeners.end())
+    if (found != m_Listeners.end())
         m_Listeners.erase(found);
 }
 
@@ -158,10 +158,10 @@ bool App::isPause() const
 
 void App::pause()
 {
-    if(!m_IsPause)
+    if (!m_IsPause)
     {
         m_IsPause = true;
-        for(IAppListener *l : m_Listeners)
+        for (IAppListener *l : m_Listeners)
             l->onAppPause();
         updateActiveNotifPolicy();
         getPopupManager().onPause();
@@ -170,11 +170,11 @@ void App::pause()
 
 void App::resume()
 {
-    if(m_IsPause)
+    if (m_IsPause)
     {
         m_IsPause = false;
         updateActiveNotifPolicy();
-        for(IAppListener *l : m_Listeners)
+        for (IAppListener *l : m_Listeners)
             l->onAppResume();
     }
 }
index f8c1913413b7f79074f906fe0f2b6f160251405b..e91fd2afed247fce80b11a3349e9f2c9b3a22119 100644 (file)
@@ -46,12 +46,10 @@ BaseController &BaseController::getParent()
 
 void BaseController::onPause()
 {
-
 }
 
 void BaseController::onResume()
 {
-
 }
 
 MsgEngine &BaseController::getMsgEngine()
index 4edc18673d58363e6956faaccecc13fddae3d1e6..09fe6214f2716ea3d5a146f0c0171d4a5e0a2b3d 100644 (file)
@@ -52,18 +52,18 @@ void FrameController::pop()
 void FrameController::setNaviBarTitle(const MsgAddressList &addressList)
 {
     std::string title;
-    if(!addressList.isEmpty())
+    if (!addressList.isEmpty())
     {
         std::string firstAddress = addressList[0].getAddress();
         ContactAddressRef contactPersonAddress = getApp().getContactManager().getContactAddress(firstAddress);
-        if(contactPersonAddress)
+        if (contactPersonAddress)
             title = contactPersonAddress->getDispName();
 
-        if(title.empty())
+        if (title.empty())
             title = firstAddress;
 
         int hidenAddresses = addressList.getLength() - 1;
-        if(hidenAddresses > 0)
+        if (hidenAddresses > 0)
         {
             title += " + " + std::to_string(hidenAddresses);
             getNaviBar().showButton(NaviExpandButtonId, true);
@@ -75,7 +75,7 @@ void FrameController::setNaviBarTitle(const MsgAddressList &addressList)
 
 void FrameController::pause()
 {
-    if(!m_IsPause)
+    if (!m_IsPause)
     {
         m_IsPause = true;
         onPause();
@@ -84,7 +84,7 @@ void FrameController::pause()
 
 void FrameController::resume()
 {
-    if(m_IsPause && !getApp().isPause())
+    if (m_IsPause && !getApp().isPause())
     {
         m_IsPause = false;
         onResume();
index 5dbab6b788de4ec5fd732e4bc5c77a6cd5ec0e67..40bd0e875ce2f14f71a25b45396cc5c768133d00 100644 (file)
@@ -37,9 +37,9 @@ std::string MbeRecipients::getDispName(const std::string &address) const
 {
     std::string dispName;
     ContactAddressRef contactAddress = m_App.getContactManager().getContactAddress(address);
-    if(contactAddress)
+    if (contactAddress)
         dispName = contactAddress->getDispName();
-    if(dispName.empty())
+    if (dispName.empty())
         dispName = address;
     return dispName;
 }
@@ -47,7 +47,7 @@ std::string MbeRecipients::getDispName(const std::string &address) const
 void MbeRecipients::updateItemsDispName()
 {
     auto items = getItems();
-    for(MbeRecipientItem *item: items)
+    for (MbeRecipientItem *item: items)
     {
         item->setDispName(getDispName(item->getAddress()));
     }
@@ -57,7 +57,7 @@ void MbeRecipients::update(const MsgAddressList &addressList)
 {
     clear();
     int addrListLen = addressList.getLength();
-    for(int i = 0; i < addrListLen; i++)
+    for (int i = 0; i < addrListLen; i++)
     {
         const MsgAddress &addr = addressList.at(i);
         appendItem(addr.getAddress(), addr.getAddressType());
@@ -67,10 +67,10 @@ void MbeRecipients::update(const MsgAddressList &addressList)
 void MbeRecipients::update(ThreadId threadId)
 {
     clear();
-    if(threadId.isValid())
+    if (threadId.isValid())
     {
         MsgAddressListRef addrList = m_App.getMsgEngine().getStorage().getAddressList(threadId);
-        if(addrList)
+        if (addrList)
             update(*addrList);
     }
 }
@@ -82,29 +82,25 @@ MbeRecipients::AppendItemStatus MbeRecipients::appendItem(const std::string &add
 
 MbeRecipients::AppendItemStatus MbeRecipients::appendItem(const std::string &address, const std::string &dispName, MsgAddress::AddressType addressType)
 {
-    if(getItemsCount() >= m_App.getMsgEngine().getSettings().getMaxRecipientCount())
+    if (getItemsCount() >= m_App.getMsgEngine().getSettings().getMaxRecipientCount())
         return TooManyRecipStatus;
 
     AppendItemStatus result = SuccessStatus;
-    if(!isRecipientExists(address))
+    if (!isRecipientExists(address))
     {
-        if(addressType == MsgAddress::UnknownAddressType)
+        if (addressType == MsgAddress::UnknownAddressType)
             addressType = MsgUtils::getAddressType(address);
 
-        if(addressType == MsgAddress::Phone || addressType == MsgAddress::Email)
+        if (addressType == MsgAddress::Phone || addressType == MsgAddress::Email)
         {
             result = SuccessStatus;
             MbeRecipientItem *item = new MbeRecipientItem(address, dispName, addressType);
             MbeRecipientsView::appendItem(*item);
-        }
-        else
-        {
+        } else {
             result = InvalidRecipStatus;
             MSG_LOG("invalid recipient: ", address);
         }
-    }
-    else
-    {
+    } else {
         result = DuplicatedStatus;
     }
     return result;
@@ -113,10 +109,10 @@ MbeRecipients::AppendItemStatus MbeRecipients::appendItem(const std::string &add
 bool MbeRecipients::isRecipientExists(const std::string& address) const
 {
     auto recipientList = getItems();
-    for(auto pViewItem : recipientList)
+    for (auto pViewItem : recipientList)
     {
         MbeRecipientItem *pItem = dynamic_cast<MbeRecipientItem*>(pViewItem);
-        if(pItem && pItem->getAddress() == address)
+        if (pItem && pItem->getAddress() == address)
             return true;
     }
 
index 8bce70684e5e023d62cb2e3101f95606de77c06c..565ca2bba227100146ef19ad0a764dc0609c11ca 100644 (file)
@@ -42,7 +42,7 @@ NaviFrameController::~NaviFrameController()
 
 void NaviFrameController::pop(FrameController &frame)
 {
-    if(isLastFrame())
+    if (isLastFrame())
         getApp().exit();
     else
     {
@@ -60,7 +60,7 @@ bool NaviFrameController::prepare(const AppControlCommand &cmd)
 {
     MSG_LOG("Execute app. control command: ", cmd.getOperationMsg());
     std::string errorMsg;
-    if(!getMsgEngine().isReady(errorMsg))
+    if (!getMsgEngine().isReady(errorMsg))
     {
         notification_status_message_post(errorMsg.c_str());
         return false;
@@ -70,26 +70,24 @@ bool NaviFrameController::prepare(const AppControlCommand &cmd)
 
 void NaviFrameController::execCmd(const AppControlDefaultRef &cmd)
 {
-    if(prepare(*cmd))
+    if (prepare(*cmd))
     {
         AppControlDefault::DefaultType type = cmd->getDefaultType();
 
         MsgThread *thread = getTopFrame<MsgThread>(); // Check if thread is open
-        if(!thread)
+        if (!thread)
             insertToBottom(*new MsgThread(*this)); // Push thread list to the bottom
 
         Conversation *conv = getTopFrame<Conversation>(); // Check if conversation is open
         MessageRef msg = getMsgEngine().getStorage().getMessage(cmd->getMessageId()); //To avoid opening conversation if MsgId is invalid
-        if(type != AppControlDefault::MainType && msg != nullptr)
+        if (type != AppControlDefault::MainType && msg != nullptr)
         {
-            if(conv)
+            if (conv)
             {
                 promote(*conv);
                 conv->execCmd(cmd);
-            }
-            else if(!conv)
-            {
-                if(type == AppControlDefault::ViewType || type == AppControlDefault::ReplyType || isUnreadNotificationSingle(type))
+            } else if (!conv) {
+                if (type == AppControlDefault::ViewType || type == AppControlDefault::ReplyType || isUnreadNotificationSingle(type))
                 {
                     Conversation *conversation = new Conversation(*this);
                     push(*conversation);
@@ -102,15 +100,13 @@ void NaviFrameController::execCmd(const AppControlDefaultRef &cmd)
 
 void NaviFrameController::execCmd(const AppControlComposeRef &cmd)
 {
-    if(prepare(*cmd))
+    if (prepare(*cmd))
     {
         Conversation *conv = getTopFrame<Conversation>();
-        if(conv)
+        if (conv)
         {
             promote(*conv);
-        }
-        else
-        {
+        } else {
             conv = new Conversation(*this);
             push(*conv);
         }
@@ -122,10 +118,10 @@ template<typename T>
 T *NaviFrameController::getTopFrame() const
 {
     auto items = getItems();
-    for(auto item = items.rbegin(); item != items.rend(); ++item)
+    for (auto item = items.rbegin(); item != items.rend(); ++item)
     {
         T *frame = dynamic_cast<T*>(*item);
-        if(frame)
+        if (frame)
             return frame;
     }
     return nullptr;
@@ -144,7 +140,7 @@ bool NaviFrameController::isUnreadNotificationSingle(AppControlDefault::DefaultT
 void NaviFrameController::onHwBackButtonClicked()
 {
     auto *top = getTopFrame();
-    if(top)
+    if (top)
         pop(*top);
 }
 
@@ -165,14 +161,14 @@ void NaviFrameController::onResume(NaviFrameItem &item)
 void NaviFrameController::onAppPause()
 {
     auto *top = getTopFrame();
-    if(top)
+    if (top)
         top->pause();
 }
 
 void NaviFrameController::onAppResume()
 {
     auto *top = getTopFrame();
-    if(top)
+    if (top)
         top->resume();
 }
 
index 988f60da833fcf4a15ef477cf7329fc8de9da275..b4f0f36f5c09a02c1fa321453a28bc3413973a96 100644 (file)
@@ -69,7 +69,7 @@ void SaveAttachments::createList()
     m_pList->show();
 
     fillList();
-    if(m_pList->getItemsCount() > 1)
+    if (m_pList->getItemsCount() > 1)
         showSelectAllItem();
 
     m_pList->checkAllItems(false);
@@ -79,13 +79,13 @@ void SaveAttachments::fillList()
 {
     MessageMmsRef mms = std::dynamic_pointer_cast<MessageMms>(getMsgEngine().getStorage().getMessage(m_Id));
     const MsgPageList &pageList = mms->getPageList();
-    for(int i = 0; i < pageList.getLength(); ++i)
+    for (int i = 0; i < pageList.getLength(); ++i)
     {
         const MsgMediaList &mediaList = pageList.at(i).getMediaList();
-        for(int j = 0; j < mediaList.getLength(); ++j)
+        for (int j = 0; j < mediaList.getLength(); ++j)
         {
             MsgMedia::Type type = mediaList.at(j).getType();
-            if(type != MsgMedia::TextType && type != MsgMedia::UnknownType)
+            if (type != MsgMedia::TextType && type != MsgMedia::UnknownType)
             {
                 appendItem(mediaList.at(j).getFileName(), mediaList.at(j).getFilePath(), nullptr, this);
             }
@@ -93,7 +93,7 @@ void SaveAttachments::fillList()
     }
 
     const MsgAttachmentList &attachmentList = mms->getAttachmentList();
-    for(int i = 0; i < attachmentList.getLength(); ++i)
+    for (int i = 0; i < attachmentList.getLength(); ++i)
     {
         appendItem(attachmentList.at(i).getFileName(), attachmentList.at(i).getFilePath(), nullptr, this);
     }
@@ -107,7 +107,7 @@ void SaveAttachments::appendItem(const std::string &text, const std::string &pat
 void SaveAttachments::updateSelectItemsTitle()
 {
     int checked = getAttachmentsCheckedCount();
-    if(checked > 0)
+    if (checked > 0)
         getNaviBar().setTitle(msgArgs("IDS_MSG_HEADER_PD_SELECTED_ABB3", checked));
     else
         getNaviBar().setTitle(msgt("IDS_MSG_HEADER_SELECT_ITEMS_ABB3"));
@@ -117,9 +117,9 @@ int SaveAttachments::getAttachmentsCheckedCount() const
 {
     auto items = m_pList->getItems<SaveAttachmentsListItem>();
     int count = 0;
-    for(SaveAttachmentsListItem *item : items)
+    for (SaveAttachmentsListItem *item : items)
     {
-        if(item->isCheckable() && item->getCheckedState())
+        if (item->isCheckable() && item->getCheckedState())
             ++count;
     }
     return count;
@@ -128,7 +128,7 @@ int SaveAttachments::getAttachmentsCheckedCount() const
 void SaveAttachments::showSelectAllItem()
 {
     SelectAllListItem *item = dynamic_cast<SelectAllListItem*>(m_pList->getFirstItem());
-    if(!item)
+    if (!item)
     {
         item = new SelectAllListItem;
         m_pList->prependItem(*item);
@@ -137,7 +137,7 @@ void SaveAttachments::showSelectAllItem()
 
 void SaveAttachments::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
 {
-    switch(buttonId)
+    switch (buttonId)
     {
         case NaviCancelButtonId:
             onHwBackButtonClicked();
@@ -159,7 +159,7 @@ void SaveAttachments::onNaviOkButtonClicked()
 
     bool result = saveCheckedItems();
 
-    if(result)
+    if (result)
         notification_status_message_post(msg("IDS_MSG_TPOP_ATTACHMENTS_SAVED_IN_MY_FILES_DOWNLOADS").cStr());
     else
         showSavingFailedPopup();
@@ -175,7 +175,7 @@ void SaveAttachments::onHwBackButtonClicked()
 void SaveAttachments::onListItemChecked(ListItem &listItem)
 {
     MSG_LOG("");
-    if(SelectAllListItem *it = dynamic_cast<SelectAllListItem*>(&listItem))
+    if (SelectAllListItem *it = dynamic_cast<SelectAllListItem*>(&listItem))
         checkSelectAllItem(*it);
     else
         checkItem(listItem);
@@ -198,12 +198,12 @@ void SaveAttachments::checkItem(ListItem &item)
 
 void SaveAttachments::updateSelectAllItem()
 {
-    if(m_pList->getItems().size() > 1)
+    if (m_pList->getItems().size() > 1)
     {
         bool allChecked = areAllItemsChecked();
 
         SelectAllListItem *selectAllItem = dynamic_cast<SelectAllListItem*>(m_pList->getFirstItem());
-        if(selectAllItem)
+        if (selectAllItem)
             selectAllItem->setCheckedState(allChecked, true);
     }
 }
@@ -213,9 +213,9 @@ bool SaveAttachments::areAllItemsChecked() const
     ListItemCollection items = m_pList->getItems();
 
     auto item = items.empty() ? items.begin() : ++items.begin();
-    for(; item != items.end(); ++item)
+    for (; item != items.end(); ++item)
     {
-        if((*item)->isCheckable() && !(*item)->getCheckedState())
+        if ((*item)->isCheckable() && !(*item)->getCheckedState())
             return false;
     }
     return true;
@@ -224,9 +224,9 @@ bool SaveAttachments::areAllItemsChecked() const
 bool SaveAttachments::shouldEnableSaveBtn() const
 {
     ListItemCollection items = m_pList->getItems();
-    for(auto *item : items)
+    for (auto *item : items)
     {
-        if(item->isCheckable() && item->getCheckedState())
+        if (item->isCheckable() && item->getCheckedState())
             return true;
     }
     return false;
@@ -240,9 +240,9 @@ bool SaveAttachments::saveCheckedItems()
     auto items = m_pList->getItems<SaveAttachmentsListItem>();
     std::list<std::string> files;
 
-    for(auto *item : items)
+    for (auto *item : items)
     {
-        if(item->isCheckable() && item->getCheckedState())
+        if (item->isCheckable() && item->getCheckedState())
             files.push_back(item->getFilePath());
     }
 
index cdeeac3271084974d3409cf42be630749f14529f..d5809c06753bf442196d6920eca1c6bd2bde0819 100644 (file)
@@ -45,7 +45,7 @@ SaveAttachmentsListItem::~SaveAttachmentsListItem()
 
 std::string SaveAttachmentsListItem::getText(ListItem &item, const char *part)
 {
-    if(!strcmp(part, namePart))
+    if (!strcmp(part, namePart))
         return m_FileName;
 
     return "";
index 5a237c84cb0a8c2efd41f57228f12013a0be225a..74415b9d7dacc6fec09ad0655316765a2cb452af 100644 (file)
@@ -26,10 +26,8 @@ ViewItemController::ViewItemController(App &app)
 ViewItemController::ViewItemController(BaseController *parent)
     : BaseController(parent)
 {
-
 }
 
 ViewItemController::~ViewItemController()
 {
-
 }
index 1b2c60c2e2faf0e51285cf1036146935614b1178..27978b8188e48506d58c2394ce12ecdccbd7dfda 100644 (file)
@@ -25,7 +25,7 @@ namespace Msg
     class MsgAttachment;
     typedef std::shared_ptr<MsgAttachment> MsgAttachmentRef;
     typedef MsgList<MsgAttachment> MsgAttachmentList;
-    typedef std::shared_ptr<MsgList<MsgAttachment>>MsgAttachmentListRef;
+    typedef std::shared_ptr<MsgList<MsgAttachment>> MsgAttachmentListRef;
 
     class MsgAttachment
     {
@@ -35,7 +35,6 @@ namespace Msg
             virtual std::string getFileName() const = 0;
             virtual int getFileSize() const = 0;
             virtual std::string getMime() const = 0;
-
             virtual void setFilePath(const std::string &path) = 0;
     };
 }
index dac9d80967b0676662a3b61c1c3a63f8b6a01ea4..cc3d0a44a0df79b8c3e05c9ac9129e34eacc091d 100644 (file)
@@ -99,7 +99,6 @@ namespace Msg
         #else
             messages_service_h m_MsgHandle;
         #endif
-
     };
 }
 
index cfbce2c5f7244c184d683730d0f8e5f8d7e8f6ae..e082e6fc0f85098da03699ad9da064dcc9ceb8af 100644 (file)
@@ -21,6 +21,5 @@ using namespace Msg;
 
 Message::~Message()
 {
-
 }
 
index dbe7d3042bdc208e425f660050f795c35ecd2225..4d8c6e516d5cfd1a5d59f0771f41c94435cdc75c 100644 (file)
@@ -20,5 +20,4 @@ using namespace Msg;
 
 MessageMms::~MessageMms()
 {
-
 }
index 82f548074066026c46bc45c7ef654694ba91aa28..8f43a0c1c2b0a2eb561806ae90d4de84dcedc8d9 100644 (file)
@@ -20,11 +20,9 @@ using namespace Msg;
 
 MessageSMS::MessageSMS()
 {
-
 }
 
 MessageSMS::~MessageSMS()
 {
-
 }
 
index 32370f392889c398add78d3df6eebf9a3529dc97..240b27bb700a30fa2fa790c58511badfde284e70 100644 (file)
@@ -20,5 +20,4 @@ using namespace Msg;
 
 MsgConversationItem::~MsgConversationItem()
 {
-
 }
index da8e7dadde137950992f9b8794c02660136bf842..5a0bd11afb0fd3fea67a497d558e90bc5cf6c1cc 100644 (file)
@@ -45,7 +45,7 @@ MsgEngine::~MsgEngine()
 int MsgEngine::openService()
 {
     TRACE;
-    if(m_MsgHandle)
+    if (m_MsgHandle)
     {
         MSG_LOG_ERROR("Handle already has been opened");
     }
@@ -64,7 +64,7 @@ int MsgEngine::openService()
 
        result = messages_open_service(&m_MsgHandle);
 
-       /*      if(result == MESSAGES_ERROR_NONE)
+       /*      if (result == MESSAGES_ERROR_NONE)
        {
                m_Storage.reset(new MsgStorage(m_ServiceHandle));
        }*/
@@ -76,7 +76,7 @@ int MsgEngine::openService()
 int MsgEngine::closeService()
 {
     int result = 0;
-    if(m_MsgHandle)
+    if (m_MsgHandle)
     {
 #ifdef TIZEN_PRIVATE_API
         result = msg_close_msg_handle(&m_MsgHandle);
@@ -92,7 +92,7 @@ int MsgEngine::closeService()
 bool MsgEngine::isReady(std::string &errorMsg) const
 {
 #ifdef TIZEN_PRIVATE_API
-    if(!m_MsgHandle)
+    if (!m_MsgHandle)
     {
         errorMsg = handleIsNullStr;
         return false;
@@ -130,7 +130,7 @@ const MsgTransport &MsgEngine::getTransport() const
 
 MsgSettings &MsgEngine::getSettings()
 {
-    if(!m_Settings.get())
+    if (!m_Settings.get())
         m_Settings.reset(new MsgSettingsPrivate(m_MsgHandle));
     return *m_Settings;
 }
@@ -155,7 +155,7 @@ const MsgComposer &MsgEngine::getComposer() const
 std::string MsgEngine::whatError(int error)
 {
 #ifdef TIZEN_PRIVATE_API
-    switch(error)
+    switch (error)
     {
         case MSG_SUCCESS:
             return "MSG_SUCCESS";
@@ -358,7 +358,7 @@ std::string MsgEngine::whatError(int error)
     }
 
 #else
-    switch(error)
+    switch (error)
     {
         case MESSAGES_ERROR_NONE:
             return "MESSAGES_ERROR_NONE";
@@ -418,16 +418,16 @@ void MsgEngine::calculateTextMetric(const std::string &text, MsgTextMetric &text
     int bytesInChar = 1;
     textMetric.reset();
 
-    if(!text.empty())
+    if (!text.empty())
     {
-        if(msg_util_calculate_text_length(text.c_str(), MSG_ENCODE_AUTO, &textLen, &segmentLen, &encode) != 0)
+        if (msg_util_calculate_text_length(text.c_str(), MSG_ENCODE_AUTO, &textLen, &segmentLen, &encode) != 0)
         {
             MSG_LOG_ERROR("msg_util_calculate_text_length returns error");
         }
 
         textMetric.bytes = textLen;
 
-        switch(encode)
+        switch (encode)
         {
             case MSG_ENCODE_UCS2:
                 bytesInChar = 2;
@@ -447,15 +447,15 @@ void MsgEngine::calculateTextMetric(const std::string &text, MsgTextMetric &text
         segmentLen /= bytesInChar;
     }
 
-    if(segmentLen == 0)
+    if (segmentLen == 0)
         segmentLen = encode == MSG_ENCODE_UCS2 ? maxUnicodeLen : maxGsm7Len;
 
-    if(textLen == 0)
+    if (textLen == 0)
         textLen = text.length() / bytesInChar;
 
     textMetric.segmentsCount = (textLen / (segmentLen + 1)) + 1;
 
-    if(textLen > 0)
+    if (textLen > 0)
         textMetric.charsLeft = segmentLen - (textLen % (segmentLen + 1));
     else
         textMetric.charsLeft = maxGsm7Len;
index 3f1a601a5d5a52721835c80f804b54fde0301460..47ea37d42b4183e2879d9b11b386f0452173e249 100644 (file)
@@ -26,12 +26,10 @@ const int defaultMaxAttachmentsCount = 10;
 
 MsgSettings::MsgSettings()
 {
-
 }
 
 MsgSettings::~MsgSettings()
 {
-
 }
 
 int MsgSettings::getMessageTextMaxChar() const
@@ -52,7 +50,7 @@ int MsgSettings::getAttachmentsMaxCount() const
 void MsgSettings::addListener(IMsgSettingsListener &listener)
 {
     auto itr = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
-    if(itr == m_Listeners.end())
+    if (itr == m_Listeners.end())
     {
         m_Listeners.push_back(&listener);
     }
@@ -61,7 +59,7 @@ void MsgSettings::addListener(IMsgSettingsListener &listener)
 void MsgSettings::removeListener(IMsgSettingsListener &listener)
 {
     auto itr = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
-    if(itr != m_Listeners.end())
+    if (itr != m_Listeners.end())
     {
         m_Listeners.erase(itr);
     }
index 1dd33a084a25380d7821607b3dc066e62aa0596a..192173b0decee5304d6a5ffb9f9206c3742976bb 100644 (file)
@@ -33,7 +33,7 @@ MsgStorage::~MsgStorage()
 void MsgStorage::addListener(IMsgStorageListener &listener)
 {
     auto itr = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
-    if(itr == m_Listeners.end())
+    if (itr == m_Listeners.end())
     {
         m_Listeners.push_back(&listener);
     }
@@ -42,7 +42,7 @@ void MsgStorage::addListener(IMsgStorageListener &listener)
 void MsgStorage::removeListener(IMsgStorageListener &listener)
 {
     auto itr = std::find(m_Listeners.begin(), m_Listeners.end(), &listener);
-    if(itr != m_Listeners.end())
+    if (itr != m_Listeners.end())
     {
         m_Listeners.erase(itr);
     }
@@ -50,18 +50,18 @@ void MsgStorage::removeListener(IMsgStorageListener &listener)
 
 bool MsgStorage::hasEmail(ThreadId id)
 {
-    if(!id.isValid())
+    if (!id.isValid())
         return false;
 
     const MsgAddressListRef addressList = getAddressList(id);
-    if(addressList)
+    if (addressList)
     {
-        for(int i = 0; i < addressList->getLength(); ++i)
+        for (int i = 0; i < addressList->getLength(); ++i)
         {
             const MsgAddress &msgAddr = addressList->at(i);
-            if(msgAddr.getAddressType() == MsgAddress::Email)
+            if (msgAddr.getAddressType() == MsgAddress::Email)
                 return true;
-            else if(MsgUtils::isValidEmail(msgAddr.getAddress()))
+            else if (MsgUtils::isValidEmail(msgAddr.getAddress()))
                 return true;
         }
     }
index b4f53e7f4c68f614c875f884101bdde701f8abd6..0654ba1e1f5309539ee778a0c9d833be392f0157 100644 (file)
@@ -20,6 +20,5 @@ using namespace Msg;
 
 MsgThreadItem::~MsgThreadItem()
 {
-
 }
 
index 47a70a6961492d68f16892472a7643b8514433d5..c922d893a9507908485a7188049caa031755e3e9 100644 (file)
@@ -20,12 +20,10 @@ using Msg::MsgTransport;
 
 MsgTransport::MsgTransport()
 {
-
 }
 
 MsgTransport::~MsgTransport()
 {
-
 }
 
 MsgTransport::SendResult MsgTransport::sendMessage(MessageRef &msg, ThreadId *threadId)
index 7c04b7ceb2929e0932bc8992fbc9c361ec954303..71fcb38d7681c2355d4139af133511d960c41f8d 100644 (file)
@@ -40,21 +40,19 @@ TokenizedRecipients MsgUtils::tokenizeRecipients(const std::string &inputText)
     std::string token;
     MsgAddress::AddressType addressType = MsgAddress::UnknownAddressType;
 
-    while(begin != end)
+    while (begin != end)
     {
-        if(begin != std::string::npos)
+        if (begin != std::string::npos)
         {
             token = inputText.substr(begin, end != std::string::npos ? end-begin : std::string::npos);
             begin = inputText.find_first_not_of(delimiters, end);
             result.invalidResult.append(token);
             addressType = getAddressType(result.invalidResult);
-            if(addressType != MsgAddress::UnknownAddressType)
+            if (addressType != MsgAddress::UnknownAddressType)
             {
                 result.validResults.push_back(std::make_pair(result.invalidResult, addressType));
                 result.invalidResult.clear();
-            }
-            else if(end != std::string::npos)
-            {
+            } else if (end != std::string::npos) {
                 result.invalidResult.append(inputText.substr(end, begin != std::string::npos ? begin-end : std::string::npos));
             }
             end = inputText.find_first_of(delimiters, begin);
@@ -66,20 +64,20 @@ TokenizedRecipients MsgUtils::tokenizeRecipients(const std::string &inputText)
 
 bool MsgUtils::isValidNumber(const std::string &address)
 {
-    if(address.empty())
+    if (address.empty())
         return false;
 
     std::regex numTemplate(numberRegex);
-    return std::regex_match(address,numTemplate);
+    return std::regex_match(address, numTemplate);
 }
 
 bool MsgUtils::isValidEmail(const std::string &address)
 {
-    if(address.empty() || address.length() > emailAddrLenMax)
+    if (address.empty() || address.length() > emailAddrLenMax)
         return false;
 
     std::regex emailTemplate(emailRegex);
-    return std::regex_match(address,emailTemplate);
+    return std::regex_match(address, emailTemplate);
 }
 
 bool MsgUtils::isValidAddress(const std::string &address)
@@ -89,12 +87,12 @@ bool MsgUtils::isValidAddress(const std::string &address)
 
 MsgAddress::AddressType MsgUtils::getAddressType(const std::string &address)
 {
-    if(isValidNumber(address))
+    if (isValidNumber(address))
     {
         return MsgAddress::Phone;
     }
 
-    if(isValidEmail(address))
+    if (isValidEmail(address))
     {
         return MsgAddress::Email;
     }
@@ -105,9 +103,9 @@ MsgAddress::AddressType MsgUtils::getAddressType(const std::string &address)
 std::string MsgUtils::makeNormalizedNumber(const std::string &number)
 {
     std::string normalizedNumber;
-    for(auto symbol : number)
+    for (auto symbol : number)
     {
-        if(isdigit(symbol) || symbol == '*' || symbol == '#' || symbol == '+')
+        if (isdigit(symbol) || symbol == '*' || symbol == '#' || symbol == '+')
         {
             normalizedNumber += symbol;
         }
@@ -118,9 +116,9 @@ std::string MsgUtils::makeNormalizedNumber(const std::string &number)
 std::string MsgUtils::makeCleanedNumber(const std::string &number)
 {
     std::string cleanedNumber;
-    for(auto symbol : number)
+    for (auto symbol : number)
     {
-        if(isdigit(symbol))
+        if (isdigit(symbol))
             cleanedNumber += symbol;
     }
     return cleanedNumber;
@@ -128,7 +126,7 @@ std::string MsgUtils::makeCleanedNumber(const std::string &number)
 
 bool MsgUtils::isMms(Message::Type type)
 {
-    switch(type)
+    switch (type)
     {
         case Message::MT_MMS:
         case Message::MT_MMS_Noti:
@@ -147,17 +145,15 @@ std::string MsgUtils::makeKbStr(long long bytes)
 {
     const long long kb = 1024; // Bytes in kb
     long long sizeKb = 0;
-    if(bytes <= kb)
+    if (bytes <= kb)
     {
         sizeKb = 1;
-    }
-    else
-    {
+    } else {
         sizeKb =  bytes / kb;
         long long sizeB = bytes % kb;
-        if(sizeB >= (kb / 2))
+        if (sizeB >= (kb / 2))
             ++sizeKb;
     }
-    return std::to_string(sizeKb) + " " + (std::string)msg("IDS_MSGF_BODY_MSGSIZE_KB");
 
+    return std::to_string(sizeKb) + " " + (std::string)msg("IDS_MSGF_BODY_MSGSIZE_KB");
 }
index d08866e6160d1aa383dbb504e3d881ea2235c9eb..5a167222c59e11bab7f91ef1aa6dad9cd6f59240 100644 (file)
@@ -31,10 +31,10 @@ MessageMmsPrivate::MessageMmsPrivate(bool release, msg_struct_t msgStruct, msg_s
     , m_Page(false)
     , m_Attachment(false)
 {
-    if(!m_MmsStruct)
+    if (!m_MmsStruct)
     {
         m_MmsStruct = msg_create_struct(MSG_STRUCT_MMS);
-        if(msgStruct)
+        if (msgStruct)
         {
             msg_get_mms_struct(m_MsgStruct, m_MmsStruct);
         }
@@ -59,7 +59,7 @@ msg_struct_t MessageMmsPrivate::getMmsStruct() const
 
 MessageMmsPrivate::~MessageMmsPrivate()
 {
-    if(m_MmsStruct)
+    if (m_MmsStruct)
     {
         msg_release_struct(&m_MmsStruct);
     }
@@ -83,19 +83,19 @@ std::string MessageMmsPrivate::getText() const
     std::string result;
     int size = pageList.getLength();
 
-    for(int i = 0; i < size; ++i)
+    for (int i = 0; i < size; ++i)
     {
         const MsgMediaList &mediaList = pageList.at(i).getMediaList();
 
         int sizeList = mediaList.getLength();
-        for(int j = 0; j < sizeList; ++j)
+        for (int j = 0; j < sizeList; ++j)
         {
-            if(mediaList[j].getType() == MsgMedia::TextType)
+            if (mediaList[j].getType() == MsgMedia::TextType)
             {
                 std::string str = FileUtils::readTextFile(mediaList[j].getFilePath());
-                if(!str.empty())
+                if (!str.empty())
                 {
-                    if(i > 0 && !result.empty())
+                    if (i > 0 && !result.empty())
                         result.append("\n");
 
                     result += std::move(str);
@@ -112,14 +112,14 @@ int MessageMmsPrivate::getMediaCount() const
     int result = 0;
 
     int size = pageList.getLength();
-    for(int i = 0; i < size; ++i)
+    for (int i = 0; i < size; ++i)
     {
         const MsgMediaList &mediaList = pageList.at(i).getMediaList();
 
         int sizeList = mediaList.getLength();
-        for(int j = 0; j < sizeList; ++j)
+        for (int j = 0; j < sizeList; ++j)
         {
-            if(mediaList[j].getType() != MsgMedia::TextType && mediaList[j].getType() != MsgMedia::UnknownType)
+            if (mediaList[j].getType() != MsgMedia::TextType && mediaList[j].getType() != MsgMedia::UnknownType)
                 ++result;
         }
     }
@@ -169,7 +169,7 @@ int MessageMmsPrivate::getSize() const
 {
     int msgSize = 0;
     int res = msg_get_int_value(m_MmsStruct, MSG_MMS_HEADER_SIZE_INT, &msgSize); // Size in bytes
-    if(res != MSG_SUCCESS || msgSize <= 0)
+    if (res != MSG_SUCCESS || msgSize <= 0)
         msgSize = MessagePrivate::getSize();
     return msgSize;
 }
index ddd8c09a7259bec69aec8b7460cfafaa46744f9d..075dc1d0844fedb47c367cd2cdb9d0032153d69e 100644 (file)
@@ -61,7 +61,7 @@ MsgAddressPrivate &MessagePrivate::addAddress()
 void MessagePrivate::addAddresses(const MsgAddressList &list)
 {
     int len = list.getLength();
-    for(int i = 0; i < len; ++i)
+    for (int i = 0; i < len; ++i)
     {
         MsgAddressPrivate &newAddr = MessagePrivate::addAddress();
         newAddr.setFields(list[i]);
@@ -102,7 +102,7 @@ void MessagePrivate::setText(const std::string &text)
 
 std::string MessagePrivate::getText() const
 {
-    if(isMms())
+    if (isMms())
         return MsgUtilsPrivate::getStr(m_MsgStruct, MSG_MESSAGE_MMS_TEXT_STR, MAX_MSG_TEXT_LEN);
     else
         return MsgUtilsPrivate::getStr(m_MsgStruct, MSG_MESSAGE_SMS_DATA_STR, MAX_MSG_DATA_LEN);
@@ -146,7 +146,7 @@ void MessagePrivate::setSubject(const std::string &text)
 
 void MessagePrivate::setMessageStorageType(Message::MessageStorageType msgStorage)
 {
-    switch(msgStorage)
+    switch (msgStorage)
     {
         case Message::MS_Phone:
             msg_set_int_value(m_MsgStruct, MSG_MESSAGE_STORAGE_ID_INT, MSG_STORAGE_PHONE);
@@ -170,7 +170,6 @@ Message::MessageStorageType MessagePrivate::getMessageStorageType() const
 
 void MessagePrivate::commit()
 {
-
 }
 
 bool MessagePrivate::isMms() const
index ef4419e01a6e1174f406da804957880996087e83..8aabfad3d2b3b89556093f522a1437c91bdc507b 100644 (file)
@@ -31,7 +31,6 @@ MessageSMSPrivate::MessageSMSPrivate(bool release, msg_struct_t msgStruct)
     : MessagePrivate(release, msgStruct)
     , MessageSMS()
 {
-
 }
 
 MessageSMSPrivate::~MessageSMSPrivate()
index 3d5ef68e72bd3d28b609c8ab3cfd273eb950b5d0..88a2a141670f8d2a071b57716cf859ede9705406 100644 (file)
@@ -25,12 +25,10 @@ MsgAddressPrivate::MsgAddressPrivate(bool release, msg_struct_t msgStruct)
     : MsgStructPrivate(release, msgStruct)
     , MsgAddress()
 {
-
 }
 
 MsgAddressPrivate::~MsgAddressPrivate()
 {
-
 }
 
 std::string MsgAddressPrivate::getAddress() const
index 50047806132a55c7b02da9343b4b336b0bbcce1f..10d1b91569a376fd5ca0a96eae3ac0e0928cbe1d 100644 (file)
@@ -29,7 +29,6 @@ MsgAttachmentPrivate::MsgAttachmentPrivate(bool release, msg_struct_t msgStruct)
 
 MsgAttachmentPrivate::~MsgAttachmentPrivate()
 {
-
 }
 
 std::string MsgAttachmentPrivate::getFilePath() const
@@ -47,7 +46,7 @@ int MsgAttachmentPrivate::getFileSize() const
     int size = 0;
     msg_get_int_value(m_MsgStruct, MSG_MMS_ATTACH_FILESIZE_INT, &size);
 
-    if(size == 0)
+    if (size == 0)
     {
         MSG_LOG_WARN("File ", getFilePath(), " size = 0, trying to get real file size");
         size = (int)FileUtils::getFileSize(getFilePath());
index 05f9262f0e81f16f0182adac48ed8690b2be70b1..70c8571ce844d248df5fde366cb0a6fe37133898 100644 (file)
@@ -27,19 +27,17 @@ using namespace Msg;
 
 MsgComposerPrivate::MsgComposerPrivate()
 {
-
 }
 
 MsgComposerPrivate::~MsgComposerPrivate()
 {
-
 }
 
 MessageSMSRef MsgComposerPrivate::createSms()
 {
     MessageSMSRef smsRef;
     msg_struct_t msgInfo = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
-    if(msgInfo)
+    if (msgInfo)
     {
         msg_set_int_value(msgInfo, MSG_MESSAGE_TYPE_INT, MSG_TYPE_SMS);
 
@@ -53,7 +51,7 @@ MessageMmsRef MsgComposerPrivate::createMms()
 {
     MessageMmsRef mmsRef;
     msg_struct_t msgInfo = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
-    if(msgInfo)
+    if (msgInfo)
     {
         msg_set_int_value(msgInfo, MSG_MESSAGE_TYPE_INT, MSG_TYPE_MMS);
         msg_struct_t mmsStruct = msg_create_struct(MSG_STRUCT_MMS);
index efe9f3263df7d648e625e455aed0b99ded3baf2d..8b342649d8377d6cae7eb1060f613e7a80b25120 100644 (file)
@@ -23,12 +23,10 @@ MsgConvMediaPrivate::MsgConvMediaPrivate(bool release, msg_struct_t msgStruct)
     : MsgStructPrivate(release, msgStruct)
     , MsgConvMedia()
 {
-
 }
 
 MsgConvMediaPrivate::~MsgConvMediaPrivate()
 {
-
 }
 
 std::string MsgConvMediaPrivate::getMime() const
index ffd8ab14a56102ea64389f2ee7f0ffeb6e5cd244..6351835c0f5ff32421cd8eb32ff20eb6e7b0a3d8 100644 (file)
@@ -37,7 +37,6 @@ namespace Msg
             virtual std::string getThumbPath() const;
             virtual std::string getContentId() const;
             virtual std::string getContentLocation() const;
-
     };
 
     typedef class MsgListHandlePrivate<MsgConvMediaPrivate, MsgConvMedia> MsgConvMediaListHandlePrivate;
index d7415f9cf03c7253ceae1f76cbed1b76068dd989..2981a96f09f71b5421559eeb0c07563283c8dab9 100644 (file)
@@ -27,12 +27,10 @@ MsgConversationItemPrivate::MsgConversationItemPrivate(bool release, msg_struct_
     : MsgStructPrivate(release, msgStruct)
     , m_MultipartList(false)
 {
-
 }
 
 MsgConversationItemPrivate::~MsgConversationItemPrivate()
 {
-
 }
 
 MsgId MsgConversationItemPrivate::getMsgId() const
index 92d714562a25427d5011553ebdf04c7085043d91..28e3869c18d8cd59f013c7888e4953e7bdc9051b 100644 (file)
@@ -38,7 +38,7 @@ namespace Msg
 
             virtual ~MsgListHandlePrivate()
             {
-                if(m_Release && m_List)
+                if (m_Release && m_List)
                 {
                     msg_list_free(m_List);
                 }
index 0d189b458928dc6eb27057aaeb0dadaea91edc10..da043e9b0cd41aef10a3e18a9a4455099adc89a5 100644 (file)
@@ -32,7 +32,6 @@ MsgMediaPrivate::MsgMediaPrivate(bool release, msg_struct_t msgStruct)
 
 MsgMediaPrivate::~MsgMediaPrivate()
 {
-
 }
 
 MsgMediaPrivate::Type MsgMediaPrivate::getType() const
@@ -61,7 +60,7 @@ void MsgMediaPrivate::setType(Type type)
 {
     msg_set_int_value(m_MsgStruct, MSG_MMS_MEDIA_TYPE_INT, MsgUtilsPrivate::smilTypeToNative(type));
 
-    switch(type)
+    switch (type)
     {
         case ImageType:
         case VideoType:
index 038eb244d9200c441ce786f0f1c31b5c5874f8e7..b7ae9a8c17b777b1fa1efb62b279c854a7cbc8d1 100644 (file)
@@ -23,7 +23,6 @@ MsgPagePrivate::MsgPagePrivate(bool release, msg_struct_t msgStruct)
     , m_MediaList(false)
     , m_Media(false)
 {
-
 }
 
 MsgPagePrivate::~MsgPagePrivate()
index 92d8a46aa27a6a4da8f6a24cacbd7876460319de..4c0a20c5d1c16bdf1e99b8bf85ee7ea267b1015c 100644 (file)
@@ -25,12 +25,10 @@ MsgReportPrivate::MsgReportPrivate(bool release, msg_struct_t msgStruct)
     : MsgStructPrivate(release, msgStruct)
     , MsgReport()
 {
-
 }
 
 MsgReportPrivate::~MsgReportPrivate()
 {
-
 }
 
 std::string MsgReportPrivate::getAddress() const
index d4ffae8e054909a27cc30753ae4989c6b0a745b7..6885c6c7d39550d872451b85ae463ea994452470 100644 (file)
@@ -37,7 +37,6 @@ namespace Msg
             virtual ReadStatus getReadStatus() const;
             virtual Type getType() const;
             virtual time_t getTime() const;
-
     };
 
     typedef class MsgListHandlePrivate<MsgReportPrivate, MsgReport> MsgReportListHandlePrivate;
index bc2737a78a052f7015dbecdd70981221965254a6..9f649a135557ce9d52f2cca3aeb64f278be94938 100644 (file)
@@ -62,10 +62,10 @@ void MsgSettingsPrivate::init()
 
 void MsgSettingsPrivate::finit()
 {
-    if(m_pActiveNotifJob)
+    if (m_pActiveNotifJob)
     {
         ecore_job_del(m_pActiveNotifJob);
-        m_pActiveNotifJob= nullptr;
+        m_pActiveNotifJob = nullptr;
         vconf_set_int(VCONFKEY_MESSAGE_ACTIVATED_CONVERSATION_ID, m_ActiveNotifValue);
         MSG_LOG("ActiveNotifValue = ", m_ActiveNotifValue);
     }
@@ -109,20 +109,18 @@ int MsgSettingsPrivate::getMaxMmsSize() const
 {
     int res = 0;
     msg_struct_t setting = msg_create_struct(MSG_STRUCT_SETTING_MSGSIZE_OPT);
-    if(msg_get_msgsize_opt(m_ServiceHandle, setting) == 0)
+    if (msg_get_msgsize_opt(m_ServiceHandle, setting) == 0)
         msg_get_int_value(setting, MSG_MESSAGE_SIZE_INT, &res);
     msg_release_struct(&setting);
 
     // Standard MMS has size 307200 bytes
     const int kb = 1024;
 
-    if(res > 0)
+    if (res > 0)
     {
         res *= kb;
         res -= 5 * kb; // header size
-    }
-    else
-    {
+    } else {
         res = MAX_MSG_DATA_LEN * kb;
     }
 
@@ -151,7 +149,7 @@ void MsgSettingsPrivate::setRingtoneType(RingtoneType type)
 {
     msg_set_int_value(m_GeneralOpt, MSG_GENERAL_RINGTONE_TYPE_INT, MsgUtilsPrivate::ringtoneTypeToNative(type));
     msg_set_general_opt(m_ServiceHandle, m_GeneralOpt);
-    for(auto listener: m_Listeners)
+    for (auto listener: m_Listeners)
     {
         listener->onRingtoneChanged(*this);
     }
@@ -168,7 +166,7 @@ void MsgSettingsPrivate::setRingtone(const std::string &soundPath)
 {
     MsgUtilsPrivate::setStr(m_GeneralOpt, MSG_GENERAL_RINGTONE_PATH_STR, soundPath);
     msg_set_general_opt(m_ServiceHandle, m_GeneralOpt);
-    for(auto listener: m_Listeners)
+    for (auto listener: m_Listeners)
     {
         listener->onRingtoneChanged(*this);
     }
@@ -233,7 +231,7 @@ bool MsgSettingsPrivate::getMmsReadReport() const
 
 void MsgSettingsPrivate::setMmsAutoRetr(bool value)
 {
-    int retrType= value ? MSG_HOME_AUTO_DOWNLOAD : MSG_HOME_MANUAL;
+    int retrType = value ? MSG_HOME_AUTO_DOWNLOAD : MSG_HOME_MANUAL;
     msg_set_int_value(m_MmsRecvOpt, MSG_MMS_RECVOPT_HOME_RETRIEVE_TYPE_INT, retrType);
     msg_set_mms_recv_opt(m_ServiceHandle, m_MmsRecvOpt);
 }
@@ -277,7 +275,7 @@ void MsgSettingsPrivate::setActiveNotifPolicy(ThreadId id)
 void MsgSettingsPrivate::addJobSetActiveNotifPolicy(int value)
 {
     m_ActiveNotifValue = value;
-    if(!m_pActiveNotifJob)
+    if (!m_pActiveNotifJob)
     {
         m_pActiveNotifJob = ecore_job_add
         (
@@ -288,7 +286,6 @@ void MsgSettingsPrivate::addJobSetActiveNotifPolicy(int value)
                 vconf_set_int(VCONFKEY_MESSAGE_ACTIVATED_CONVERSATION_ID, self->m_ActiveNotifValue);
                 MSG_LOG("ActiveNotifValue = ", self->m_ActiveNotifValue);
             },
-            this
-        );
+            this);
     }
 }
index a9a09af5a04051871de18c448d93ca95709bb99a..6c2bea185e133208ed2d6e7d38b3043712399302 100644 (file)
@@ -43,7 +43,7 @@ MsgStoragePrivate::MsgStoragePrivate(msg_handle_t serviceHandle)
 template <typename T>
 void MsgStoragePrivate::notifyListeners(const T& delta, ListenerMethod<T> method)
 {
-    for(auto listener: m_Listeners)
+    for (auto listener: m_Listeners)
     {
         (listener->*method)(delta);
     }
@@ -58,12 +58,12 @@ void MsgStoragePrivate::msg_storage_change_cb(msg_handle_t handle, msg_storage_c
     int count = pMsgIdList->nCount;
     msgIdList.reserve(count);
 
-    for(int i = 0; i < count; ++i)
+    for (int i = 0; i < count; ++i)
     {
         msgIdList.push_back(pMsgIdList->msgIdList[i]);
     }
 
-    switch(storageChangeType)
+    switch (storageChangeType)
     {
         case MSG_STORAGE_CHANGE_UPDATE:
             self->notifyListeners(msgIdList, &IMsgStorageListener::onMsgStorageUpdate);
@@ -86,7 +86,7 @@ void MsgStoragePrivate::msg_thread_change_cb(msg_handle_t handle, msg_storage_ch
     MsgStoragePrivate *self = static_cast<MsgStoragePrivate *>(user_param);
     ThreadId tId = static_cast<ThreadId>(threadId);
 
-    switch(storageChangeType)
+    switch (storageChangeType)
     {
         case MSG_STORAGE_CHANGE_UPDATE:
             self->notifyListeners(tId, &IMsgStorageListener::onMsgStorageThreadUpdate);
@@ -118,7 +118,7 @@ MsgThreadListRef MsgStoragePrivate::getThreadList()
     int error = msg_get_thread_view_list(m_ServiceHandle, sortRule, &msgList);
     msg_release_struct(&sortRule);
 
-    if(error == 0)
+    if (error == 0)
     {
         res.reset(new MsgThreadStructListPrivate(true, msgList));
     }
@@ -138,7 +138,7 @@ MessageSMSListRef MsgStoragePrivate::getSimMsgList()
     msg_set_int_value(listCond, MSG_LIST_CONDITION_SIM_INDEX_INT, 1);
     msg_set_int_value(listCond, MSG_LIST_CONDITION_STORAGE_ID_INT, MSG_STORAGE_SIM);
 
-    if(msg_get_message_list2(m_ServiceHandle, listCond, &msgList) == 0)
+    if (msg_get_message_list2(m_ServiceHandle, listCond, &msgList) == 0)
     {
         res.reset(new SmsStructListPrivate(true, msgList));
     }
@@ -150,18 +150,14 @@ ThreadId MsgStoragePrivate::getThreadId(const MsgAddressList &addressList)
 {
     msg_thread_id_t id = ThreadId::invalidId;
 
-    if(const MsgAddressListHandlePrivate *privateList = dynamic_cast<const MsgAddressListHandlePrivate*>(&addressList))
+    if (const MsgAddressListHandlePrivate *privateList = dynamic_cast<const MsgAddressListHandlePrivate*>(&addressList))
     {
         msg_list_handle_t handleList = *privateList;
         msg_get_thread_id_by_address2(m_ServiceHandle, handleList, &id);
-    }
-    else if(const MsgAddressStructListPrivate *privateList = dynamic_cast<const MsgAddressStructListPrivate*>(&addressList))
-    {
+    } else if (const MsgAddressStructListPrivate *privateList = dynamic_cast<const MsgAddressStructListPrivate*>(&addressList)) {
         msg_struct_list_s msgStructList = *privateList;
         msg_get_thread_id_by_address(m_ServiceHandle, &msgStructList, &id);
-    }
-    else
-    {
+    } else {
         assert(false);
     }
 
@@ -173,9 +169,9 @@ ThreadId MsgStoragePrivate::getThreadId(const std::list<std::string> &addressLis
     msg_thread_id_t tid = ThreadId::invalidId;
     msg_struct_t msgInfo = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
 
-    if(msgInfo)
+    if (msgInfo)
     {
-        for(auto &addr : addressList)
+        for (auto &addr : addressList)
         {
             MsgAddress::AddressType type = MsgUtils::getAddressType(addr);
             msg_struct_t tmpAddr = nullptr;
@@ -190,7 +186,7 @@ ThreadId MsgStoragePrivate::getThreadId(const std::list<std::string> &addressLis
 
         msg_list_handle_t addrList = nullptr;
         msg_get_list_handle(msgInfo, MSG_MESSAGE_ADDR_LIST_HND, (void **)&addrList);
-        if(addrList)
+        if (addrList)
             msg_get_thread_id_by_address2(m_ServiceHandle, addrList, &tid);
 
         msg_release_struct(&msgInfo);
@@ -212,12 +208,12 @@ MsgThreadListRef MsgStoragePrivate::searchThread(const std::string &word)
     msg_struct_list_s searchList = {};
 
     msg_error_t error = msg_search_message_for_thread_view(m_ServiceHandle, word.c_str(), &searchList);
-    if(error != 0)
+    if (error != 0)
     {
         MSG_LOG_ERROR("msg_search_message_for_thread_view error ", error);
     }
 
-    if(error == 0)
+    if (error == 0)
         res.reset(new MsgThreadStructListPrivate(true, searchList));
 
     return res;
@@ -236,12 +232,12 @@ int MsgStoragePrivate::getUnreadThreadCount() const
     msg_get_thread_view_list(m_ServiceHandle, sortRule, &peerList);
     msg_release_struct(&sortRule);
 
-    for(int i = 0; i < peerList.nCount; i++)
+    for (int i = 0; i < peerList.nCount; i++)
     {
         int unreadCnt = 0;
         msg_get_int_value(peerList.msg_struct_info[i], MSG_THREAD_UNREAD_COUNT_INT, &unreadCnt);
 
-        if(unreadCnt > 0)
+        if (unreadCnt > 0)
             unreadThreadCount++;
     }
 
@@ -252,7 +248,7 @@ MsgThreadItemRef MsgStoragePrivate::getThread(ThreadId id)
 {
     MsgThreadItemRef res;
     msg_struct_t thread = msg_create_struct(MSG_STRUCT_THREAD_INFO);
-    if(msg_get_thread(m_ServiceHandle, id, thread) == 0)
+    if (msg_get_thread(m_ServiceHandle, id, thread) == 0)
     {
         res.reset(new MsgThreadItemPrivate(true, thread));
     }
@@ -270,7 +266,7 @@ MsgConversationListRef MsgStoragePrivate::getConversationList(ThreadId id)
     msg_struct_list_s convList = {};
     int error = msg_get_conversation_view_list(m_ServiceHandle, id, &convList);
 
-    if(error == 0)
+    if (error == 0)
     {
         res.reset(new MsgConversationStructListPrivate(true, convList));
     }
@@ -281,12 +277,10 @@ MsgConversationItemRef MsgStoragePrivate::getConversationItem(MsgId id)
 {
     MsgConversationItemRef res;
     msg_struct_t convItem = msg_create_struct(MSG_STRUCT_CONV_INFO);
-    if(msg_get_conversation(m_ServiceHandle, id, convItem) == 0)
+    if (msg_get_conversation(m_ServiceHandle, id, convItem) == 0)
     {
         res.reset(new MsgConversationItemPrivate(true, convItem));
-    }
-    else
-    {
+    } else {
         msg_release_struct(&convItem);
     }
 
@@ -299,7 +293,7 @@ MessageRef MsgStoragePrivate::getMessage(MsgId id)
     msg_struct_t msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
     msg_struct_t sendOpt = msg_create_struct(MSG_STRUCT_SENDOPT);
 
-    if(msg_get_message(m_ServiceHandle, id, msg, sendOpt) == 0)
+    if (msg_get_message(m_ServiceHandle, id, msg, sendOpt) == 0)
     {
         int nativeType = MSG_TYPE_INVALID;
         msg_get_int_value(msg, MSG_MESSAGE_TYPE_INT, &nativeType);
@@ -309,9 +303,7 @@ MessageRef MsgStoragePrivate::getMessage(MsgId id)
             msgRef = std::make_shared<MessageMmsPrivate>(true, msg);
         else
             msgRef = std::make_shared<MessageSMSPrivate>(true, msg);
-    }
-    else
-    {
+    } else {
         msg_release_struct(&msg);
     }
     msg_release_struct(&sendOpt);
@@ -320,7 +312,7 @@ MessageRef MsgStoragePrivate::getMessage(MsgId id)
 
 MsgId MsgStoragePrivate::saveMessage(Message &msg, bool updateExisting, StorageResult *result)
 {
-    if(result)
+    if (result)
         *result = StorageFail;
 
     MsgId newMsgId;
@@ -330,23 +322,21 @@ MsgId MsgStoragePrivate::saveMessage(Message &msg, bool updateExisting, StorageR
     msg_set_bool_value(sendOpt, MSG_SEND_OPT_SETTING_BOOL, false);
 
     msgPriv.commit();
-    if(msgPriv.getId().isValid() && updateExisting)
+    if (msgPriv.getId().isValid() && updateExisting)
     {
         int err = msg_update_message(m_ServiceHandle, msgPriv, sendOpt);
-        if(result)
+        if (result)
             *result = MsgUtilsPrivate::nativeToStorageResult(err);
-        if(err == MSG_SUCCESS)
+        if (err == MSG_SUCCESS)
             newMsgId = msg.getId();
-    }
-    else
-    {
+    } else {
         newMsgId = msg_add_message(m_ServiceHandle, msgPriv, sendOpt);
-        if(newMsgId > 0)
+        if (newMsgId > 0)
         {
             int err = msg_move_msg_to_storage(m_ServiceHandle, newMsgId, msg.getMessageStorageType());
-            if(result)
+            if (result)
                 *result = MsgUtilsPrivate::nativeToStorageResult(err);
-            if(err != MSG_SUCCESS)
+            if (err != MSG_SUCCESS)
             {
                 MSG_LOG_WARN("Can't move msg to storage, error = ", MsgEngine::whatError(err));
                 deleteMessage(newMsgId);
@@ -368,7 +358,7 @@ bool MsgStoragePrivate::deleteMessages(const MsgIdList &idList)
     msg_id_list_s internalIdList;
 
     internalIdList.nCount = idList.size();
-    if(internalIdList.nCount <= 0)
+    if (internalIdList.nCount <= 0)
         return false;
 
     msg_message_id_t ids[internalIdList.nCount];
@@ -391,7 +381,7 @@ MessageListRef MsgStoragePrivate::searchMessage(const std::string &word)
     msg_error_t error = msg_get_message_list2(m_ServiceHandle, listCond, &searchList);
     msg_release_struct(&listCond);
 
-    if(error == 0)
+    if (error == 0)
         res.reset(new MessageStructListPrivate(true, searchList));
 
     return res;
@@ -423,7 +413,7 @@ bool MsgStoragePrivate::isReadReportChecked(MsgId msgId)
 
     msg_get_message(m_ServiceHandle, msgId, msgInfo, sendOpt);
     msg_get_struct_handle(sendOpt, MSG_SEND_OPT_MMS_OPT_HND, &mmsSendOpt);
-    if(mmsSendOpt)
+    if (mmsSendOpt)
         msg_get_bool_value(mmsSendOpt, MSG_MMS_SENDOPTION_READ_REQUEST_BOOL, &readFlag);
 
     msg_release_struct(&msgInfo);
@@ -451,7 +441,7 @@ ThreadId MsgStoragePrivate::getThreadId(MsgId id)
     msg_struct_t msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO);
     msg_struct_t sendOpt = msg_create_struct(MSG_STRUCT_SENDOPT);
 
-    if(msg_get_message(m_ServiceHandle, id, msg, sendOpt) == 0)
+    if (msg_get_message(m_ServiceHandle, id, msg, sendOpt) == 0)
         msg_get_int_value(msg, MSG_MESSAGE_THREAD_ID_INT, &threadId);
 
     msg_release_struct(&msg);
index 773e31eb99bbb419c0cfe7480b011d5c24598b20..8044209d89195a6ed0c74fb9875e534199e64299 100644 (file)
@@ -40,7 +40,7 @@ namespace Msg
 
             virtual ~MsgStructListPrivate()
             {
-                if(m_Release && m_List.nCount)
+                if (m_Release && m_List.nCount)
                 {
                     msg_release_list_struct(&m_List);
                 }
index ff4f3f12f3dea2276a3869f983ff14754e8f4e23..c106b998b840c74dd6b3f3644a493cedd013cb83 100644 (file)
@@ -48,7 +48,7 @@ namespace Msg
 
     inline MsgStructPrivate::~MsgStructPrivate()
     {
-        if(m_Release && m_MsgStruct)
+        if (m_Release && m_MsgStruct)
         {
             msg_release_struct(&m_MsgStruct);
         }
index 6025f8405c9444fa3a77539d17bf0ced6b63dede..b906f03a2f131a177b44f6386cb3d6ad718c7421 100644 (file)
@@ -28,12 +28,10 @@ MsgThreadItemPrivate::MsgThreadItemPrivate(bool release, msg_struct_t msgStruct)
     : MsgStructPrivate(release, msgStruct)
     , MsgThreadItem()
 {
-
 }
 
 MsgThreadItemPrivate::~MsgThreadItemPrivate()
 {
-
 }
 
 ThreadId MsgThreadItemPrivate::getId() const
index d5fe3b935a22ab0692989282e118a6f30a99ce5b..a6baac719537987152f529b529b8c421feb93e10 100644 (file)
@@ -26,12 +26,10 @@ MsgTransportPrivate::MsgTransportPrivate(msg_handle_t serviceHandle)
     : MsgTransport()
     , m_ServiceHandle(serviceHandle)
 {
-
 }
 
 MsgTransportPrivate::~MsgTransportPrivate()
 {
-
 }
 
 MsgTransport::SendResult MsgTransportPrivate::sendMessage(Message &msg, ThreadId *threadId)
@@ -48,22 +46,20 @@ MsgTransport::SendResult MsgTransportPrivate::sendMessage(Message &msg, ThreadId
 
     msg_set_struct_handle(req, MSG_REQUEST_MESSAGE_HND, privMsg);
 
-    if(privMsg.isMms())
+    if (privMsg.isMms())
     {
         MSG_LOG("Sending MMS");
         err = msg_mms_send_message(m_ServiceHandle, req);
-    }
-    else
-    {
+    } else {
         MSG_LOG("Sending SMS");
         err = msg_sms_send_message(m_ServiceHandle, req);
     }
 
-    if(threadId)
+    if (threadId)
         msg_get_thread_id_by_address2(m_ServiceHandle, privMsg.getAddressList(), (msg_thread_id_t*)threadId);
     msg_release_struct(&req);
 
-    MsgTransport::SendResult sendRes= MsgUtilsPrivate::nativeToSendResult(err);
+    MsgTransport::SendResult sendRes = MsgUtilsPrivate::nativeToSendResult(err);
     MSG_LOG("Send result: ", sendRes);
     return sendRes;
 }
@@ -85,7 +81,7 @@ MsgTransport::SendResult MsgTransportPrivate::retrieveMessage(MsgId msgId)
     msg_release_struct(&sendOpt);
     msg_release_struct(&req);
 
-    MsgTransport::SendResult sendRes= MsgUtilsPrivate::nativeToSendResult(err);
+    MsgTransport::SendResult sendRes = MsgUtilsPrivate::nativeToSendResult(err);
     MSG_LOG("Send result: ", sendRes);
     return sendRes;
 }
@@ -93,7 +89,7 @@ MsgTransport::SendResult MsgTransportPrivate::retrieveMessage(MsgId msgId)
 MsgTransport::SendResult MsgTransportPrivate::sendReadReport(MsgId msgId, MsgReport::ReadStatus status)
 {
     msg_error_t err = msg_mms_send_read_report(m_ServiceHandle, msgId, MsgUtilsPrivate::reportReadReportStatusToNative(status));
-    MsgTransport::SendResult sendRes= MsgUtilsPrivate::nativeToSendResult(err);
+    MsgTransport::SendResult sendRes = MsgUtilsPrivate::nativeToSendResult(err);
     MSG_LOG("Send result: ", sendRes);
     return sendRes;
 }
index 592197586b83898f1bb86ec089e9ef217a62e935..fe86a248e0cec7bd766a4e0863e78555b5cf3b32 100644 (file)
@@ -21,7 +21,7 @@ using namespace Msg;
 
 int MsgUtilsPrivate::directionToNative(Message::Direction direction)
 {
-    switch(direction)
+    switch (direction)
     {
         case Message::MD_Sent:
             return MSG_DIRECTION_TYPE_MO;
@@ -35,7 +35,7 @@ int MsgUtilsPrivate::directionToNative(Message::Direction direction)
 
 Message::Direction MsgUtilsPrivate::nativeToDirection(int direction)
 {
-    switch(direction)
+    switch (direction)
     {
         case MSG_DIRECTION_TYPE_MO:
             return Message::MD_Sent;
@@ -49,7 +49,7 @@ Message::Direction MsgUtilsPrivate::nativeToDirection(int direction)
 
 Message::MessageStorageType MsgUtilsPrivate::nativeToMessageStorage(int id)
 {
-    switch(id)
+    switch (id)
     {
         case MSG_STORAGE_PHONE:
             return Message::MS_Phone;
@@ -63,7 +63,7 @@ Message::MessageStorageType MsgUtilsPrivate::nativeToMessageStorage(int id)
 
 int MsgUtilsPrivate::addressTypeToNative(MsgAddress::AddressType type)
 {
-    switch(type)
+    switch (type)
     {
         case MsgAddress::Phone:
             return MSG_ADDRESS_TYPE_PLMN;
@@ -79,7 +79,7 @@ int MsgUtilsPrivate::addressTypeToNative(MsgAddress::AddressType type)
 
 MsgAddress::AddressType MsgUtilsPrivate::nativeToAddressType(int type)
 {
-    switch(type)
+    switch (type)
     {
         case MSG_ADDRESS_TYPE_PLMN:
             return MsgAddress::Phone;
@@ -96,7 +96,7 @@ MsgAddress::AddressType MsgUtilsPrivate::nativeToAddressType(int type)
 
 MsgReport::DeliveryStatus MsgUtilsPrivate::nativeToReportDeliveryStatus(int status)
 {
-    switch(status)
+    switch (status)
     {
         case MSG_DELIVERY_REPORT_SUCCESS:
             return MsgReport::StatusSuccess;
@@ -115,7 +115,7 @@ MsgReport::DeliveryStatus MsgUtilsPrivate::nativeToReportDeliveryStatus(int stat
 
 MsgReport::ReadStatus MsgUtilsPrivate::nativeToReportReadStatus(int status)
 {
-    switch(status)
+    switch (status)
     {
         case MSG_READ_REPORT_IS_READ:
             return MsgReport::ReadStatusIsRead;
@@ -134,7 +134,7 @@ MsgReport::ReadStatus MsgUtilsPrivate::nativeToReportReadStatus(int status)
 
 int MsgUtilsPrivate::reportReadReportStatusToNative(MsgReport::ReadStatus status)
 {
-    switch(status)
+    switch (status)
     {
         case MsgReport::ReadStatusIsRead:
             return MSG_READ_REPORT_IS_READ;
@@ -153,7 +153,7 @@ int MsgUtilsPrivate::reportReadReportStatusToNative(MsgReport::ReadStatus status
 
 MsgReport::Type MsgUtilsPrivate::nativeToReportType(int type)
 {
-    switch(type)
+    switch (type)
     {
         case MSG_REPORT_TYPE_READ:
             return MsgReport::TypeRead;
@@ -169,7 +169,7 @@ MsgReport::Type MsgUtilsPrivate::nativeToReportType(int type)
 
 int MsgUtilsPrivate::recipientTypeToNative(MsgAddress::RecipientType type)
 {
-    switch(type)
+    switch (type)
     {
         case MsgAddress::To:
             return MSG_RECIPIENTS_TYPE_TO;
@@ -188,7 +188,7 @@ int MsgUtilsPrivate::recipientTypeToNative(MsgAddress::RecipientType type)
 
 MsgAddress::RecipientType MsgUtilsPrivate::nativeToRecipientType(int type)
 {
-    switch(type)
+    switch (type)
     {
         case MSG_RECIPIENTS_TYPE_TO:
             return MsgAddress::To;
@@ -207,7 +207,7 @@ MsgAddress::RecipientType MsgUtilsPrivate::nativeToRecipientType(int type)
 
 Message::Type MsgUtilsPrivate::nativeToMessageType(int type)
 {
-    switch(type)
+    switch (type)
     {
         case MSG_TYPE_SMS:
         case MSG_TYPE_SMS_CB:
@@ -241,7 +241,7 @@ Message::Type MsgUtilsPrivate::nativeToMessageType(int type)
 
 MsgMedia::Type MsgUtilsPrivate::nativeToSmilType(int type)
 {
-    switch(type)
+    switch (type)
     {
         case MMS_SMIL_MEDIA_IMG:
             return MsgMedia::ImageType;
@@ -257,7 +257,7 @@ MsgMedia::Type MsgUtilsPrivate::nativeToSmilType(int type)
 
 int MsgUtilsPrivate::smilTypeToNative(MsgMedia::Type type)
 {
-    switch(type)
+    switch (type)
     {
         case MsgMedia::ImageType:
             return MMS_SMIL_MEDIA_IMG;
@@ -277,7 +277,7 @@ std::string MsgUtilsPrivate::getStr(msg_struct_t msgStruct, int field, int maxSt
 {
     std::string res;
     char buf[maxStrLen + 1];
-    if(msg_get_str_value(msgStruct, field, buf, maxStrLen) == 0)
+    if (msg_get_str_value(msgStruct, field, buf, maxStrLen) == 0)
     {
         res.assign(buf);
     }
@@ -291,7 +291,7 @@ int MsgUtilsPrivate::setStr(msg_struct_t msgStruct, int field, const std::string
 
 Message::NetworkStatus MsgUtilsPrivate::nativeToNetworkStatus(int status)
 {
-    switch(status)
+    switch (status)
     {
         case MSG_NETWORK_NOT_SEND:
             return Message::NS_Not_Send;
@@ -334,7 +334,7 @@ Message::NetworkStatus MsgUtilsPrivate::nativeToNetworkStatus(int status)
 
 int MsgUtilsPrivate::activeNotifPolicyToNative(MsgSettings::ActiveNotifPolicy policy)
 {
-    switch(policy)
+    switch (policy)
     {
         case MsgSettings::AppBackgroundPolicy:
             return -1;
@@ -348,7 +348,7 @@ int MsgUtilsPrivate::activeNotifPolicyToNative(MsgSettings::ActiveNotifPolicy po
 
 MsgTransport::SendResult MsgUtilsPrivate::nativeToSendResult(int sendRes)
 {
-    switch(sendRes)
+    switch (sendRes)
     {
         case MSG_SUCCESS:
             return MsgTransport::SendSuccess;
@@ -367,7 +367,7 @@ MsgTransport::SendResult MsgUtilsPrivate::nativeToSendResult(int sendRes)
 
 MsgSettings::RingtoneType MsgUtilsPrivate::nativeToRingtoneType(int type)
 {
-    switch(type)
+    switch (type)
     {
         case MSG_RINGTONE_TYPE_SILENT:
             return MsgSettings::SilentRingtone;
@@ -381,7 +381,7 @@ MsgSettings::RingtoneType MsgUtilsPrivate::nativeToRingtoneType(int type)
 
 int MsgUtilsPrivate::ringtoneTypeToNative(MsgSettings::RingtoneType type)
 {
-    switch(type)
+    switch (type)
     {
         case MsgSettings::SilentRingtone:
             return MSG_RINGTONE_TYPE_SILENT;
@@ -396,7 +396,7 @@ int MsgUtilsPrivate::ringtoneTypeToNative(MsgSettings::RingtoneType type)
 MsgStorage::StorageResult MsgUtilsPrivate::nativeToStorageResult(int resultCode)
 {
     MsgStorage::StorageResult res = MsgStorage::StorageFail;
-    switch(resultCode)
+    switch (resultCode)
     {
         case MSG_SUCCESS:
             res = MsgStorage::StorageSuccess;
index fc266ab8ed7e51a87aaaa6492750c9e19ba09189..57a33fc928fb5ed8ea597f1e02f4a6ac865537cd 100644 (file)
@@ -39,7 +39,7 @@ SystemSettingsManager::SystemSettingsManager()
 
 SystemSettingsManager::~SystemSettingsManager()
 {
-    if(m_TelHandleList.handle != nullptr)
+    if (m_TelHandleList.handle != nullptr)
         telephony_deinit(&m_TelHandleList);
 
     deinitDpmHandle();
@@ -47,7 +47,7 @@ SystemSettingsManager::~SystemSettingsManager()
 
 void SystemSettingsManager::prepareTel()
 {
-    if(m_TelHandleList.handle != nullptr)
+    if (m_TelHandleList.handle != nullptr)
         return;
     int err = telephony_init(&m_TelHandleList);
     MSG_LOG("telephony_init = ", err);
@@ -56,14 +56,14 @@ void SystemSettingsManager::prepareTel()
 void SystemSettingsManager::addListener(ISystemSettingsManager &l)
 {
     auto it = std::find(m_Listeners.begin(), m_Listeners.end(), &l);
-    if(it == m_Listeners.end())
+    if (it == m_Listeners.end())
         m_Listeners.push_back(&l);
 }
 
 void SystemSettingsManager::removeListener(ISystemSettingsManager&l)
 {
     auto it = std::find(m_Listeners.begin(), m_Listeners.end(), &l);
-    if(it != m_Listeners.end())
+    if (it != m_Listeners.end())
         m_Listeners.erase(it);
 }
 
@@ -72,7 +72,7 @@ bool SystemSettingsManager::isSimInserted() const
     bool res = false;
     const_cast<SystemSettingsManager*>(this)->prepareTel();
 
-    if(m_TelHandleList.count > 0)
+    if (m_TelHandleList.count > 0)
     {
         telephony_h handle = m_TelHandleList.handle[0];
         telephony_sim_state_e simState = TELEPHONY_SIM_STATE_UNAVAILABLE;
@@ -89,11 +89,11 @@ bool SystemSettingsManager::isSimActive() const
     bool res = false;
     const_cast<SystemSettingsManager*>(this)->prepareTel();
 
-    if(m_TelHandleList.count > 0)
+    if (m_TelHandleList.count > 0)
     {
         telephony_h telHandle = m_TelHandleList.handle[0];
         telephony_network_service_state_e servState;
-        if(telephony_network_get_service_state(telHandle, &servState) == TELEPHONY_ERROR_NONE)
+        if (telephony_network_get_service_state(telHandle, &servState) == TELEPHONY_ERROR_NONE)
         {
             res = (servState == TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE);
             MSG_LOG("servState = ", servState);
@@ -112,7 +112,7 @@ bool SystemSettingsManager::isMobileDataEnabled() const
 
 void SystemSettingsManager::onTimeFormatChanged()
 {
-    for(ISystemSettingsManager *it : m_Listeners)
+    for (ISystemSettingsManager *it : m_Listeners)
     {
         it->onTimeFormatChanged();
     }
@@ -120,7 +120,7 @@ void SystemSettingsManager::onTimeFormatChanged()
 
 void SystemSettingsManager::onLanguageChanged()
 {
-    for(ISystemSettingsManager *it : m_Listeners)
+    for (ISystemSettingsManager *it : m_Listeners)
     {
         it->onLanguageChanged();
     }
index c5e11b03590be53e8bbe32fdc470e4529394b737..6d38a0be14b633518d868b3698b5cba3ecdbbe19 100644 (file)
@@ -71,9 +71,9 @@ namespace Msg
             : m_pMsg(m_Buf)
         {
             va_list args;
-            va_start (args, domainName);
+            va_start(args, domainName);
             vsnprintf(m_Buf, maxBufSize, dgettext(domainName, stringId), args);
-            va_end (args);
+            va_end(args);
         }
 
         const char *get() const
index 6413d1a58519d092b4a3fa04c75b7b80df26e70a..a0ab67ac0ee55bf4e6f3a19765834e8981f22102 100644 (file)
@@ -41,7 +41,7 @@
         loggerImpl(LogPriority::WARN, LOGGER_TAG, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__);
 
 #define MSG_ASSERT(expr, ...)\
-        if(!(expr)) { MSG_LOG_ERROR(__VA_ARGS__); } \
+        if (!(expr)) { MSG_LOG_ERROR(__VA_ARGS__); } \
         assert(expr)
 
 #endif /* LOGGER_H_ */
index 516d6c08bee7a2b25e34e471e6949d3b5e41f690..20f7440db4359c78ec939804632baa6765044f96 100644 (file)
@@ -42,7 +42,7 @@ void loggerImpl(LogPriority prior
 {
     std::ostringstream messageStr;
     std::initializer_list<bool> { (messageStr << msg, true)... };
-    dlog_print( static_cast<log_priority>(prior)
+    dlog_print(static_cast<log_priority>(prior)
               , tag, "%s: %s(%d) -> %s", file, function, line
               , messageStr.str().c_str());
 }
index 40f4278893056d6264db849e9fad80fb297d94d5..83a9a0b54057090a337012220aab395d6b1186c9 100644 (file)
@@ -32,7 +32,6 @@ namespace Msg
             ~PhoneNumberUtils();
             PhoneNumberUtils& operator=(PhoneNumberUtils&) = delete;
             PhoneNumberUtils(PhoneNumberUtils&) = delete;
-
     };
 }
 
index 90b1cc9983ce89bf92447b993c895db692ebf8b8..923e595baec9718a4c911363eb52075d9256de95 100755 (executable)
@@ -38,7 +38,7 @@ long long FileUtils::getFileSize(const std::string &file)
     long long size = 0;
 
     struct stat st = {};
-    if(stat(file.c_str(), &st) == 0)
+    if (stat(file.c_str(), &st) == 0)
     {
         size = st.st_size;
     }
@@ -67,19 +67,19 @@ bool FileUtils::copy(const std::string &src, const std::string &dst)
     bool ret = true;
 
     f1 = fopen(src.c_str(), "rb");
-    if(!f1)
+    if (!f1)
         return false;
 
     f2 = fopen(dst.c_str(), "wb");
-    if(!f2)
+    if (!f2)
     {
         fclose(f1);
         return false;
     }
 
-    while((num = fread(buf, 1, sizeof(buf), f1)) > 0)
+    while ((num = fread(buf, 1, sizeof(buf), f1)) > 0)
     {
-        if(fwrite(buf, 1, num, f2) != num)
+        if (fwrite(buf, 1, num, f2) != num)
         {
             ret = false;
         }
@@ -104,18 +104,16 @@ bool FileUtils::makeDir(const std::string &dir)
 std::string FileUtils::addFileToDataDir(const std::string &path)
 {
     std::string newPath;
-    if(isExists(path))
+    if (isExists(path))
     {
         std::string dataPath = PathUtils::getDataPath("");
-        if(path.find(dataPath) != std::string::npos)
+        if (path.find(dataPath) != std::string::npos)
         {
             newPath = path;
             MSG_LOG("File is already exists: ", newPath);
-        }
-        else
-        {
+        } else {
             newPath = FileUtils::genUniqueFilePath(dataPath, path);
-            if(!copy(path, newPath))
+            if (!copy(path, newPath))
                 newPath.clear();
         }
     }
@@ -147,21 +145,19 @@ void FileUtils::splitPath(const std::string &path, std::string &basePath,
 {
     auto pos = path.find_last_of('/');
 
-    if(pos != std::string::npos)
+    if (pos != std::string::npos)
         basePath = path.substr(0, pos + 1);
 
     std::string name;
     name = path.substr(pos + 1);
 
     pos = name.find_last_of('.');
-    if(pos != std::string::npos)
+    if (pos != std::string::npos)
     {
         extension = name.substr(pos + 1);
-        if(pos != 0)
+        if (pos != 0)
             fileName = name.substr(0, pos);
-    }
-    else
-    {
+    } else {
         fileName = name;
     }
 }
@@ -179,17 +175,17 @@ bool FileUtils::remove(const std::string &path, bool removeCurrentDir)
     struct dirent *dirData = nullptr;
     DIR *dp = opendir(path.c_str());
 
-    if(dp)
+    if (dp)
     {
-        while(true)
+        while (true)
         {
             dirData = nullptr;
             readdir_r(dp, &ep, &dirData);
 
-            if(dirData == nullptr)
+            if (dirData == nullptr)
                 break;
 
-            if(strcmp(dirData->d_name, ".") != 0 && strcmp(dirData->d_name, "..") != 0)
+            if (strcmp(dirData->d_name, ".") != 0 && strcmp(dirData->d_name, "..") != 0)
             {
                 std::string child = path + "/" + dirData->d_name;
                 res &= remove(child, true);
@@ -197,13 +193,11 @@ bool FileUtils::remove(const std::string &path, bool removeCurrentDir)
         }
 
         closedir(dp);
-        if(removeCurrentDir)
+        if (removeCurrentDir)
         {
             res &= rmdir(path.c_str()) == 0;
         }
-    }
-    else
-    {
+    } else {
         res &= unlink(path.c_str()) == 0;
     }
 
@@ -219,7 +213,7 @@ std::string FileUtils::readTextFile(const std::string &path)
 bool FileUtils::writeTextFile(const std::string &path, const std::string &text)
 {
     std::ofstream file(path, std::ofstream::trunc | std::ofstream::binary | std::ofstream::out);
-    if(file.is_open())
+    if (file.is_open())
        file << text;
     return file.is_open() && file.good();
 }
@@ -236,16 +230,16 @@ std::string FileUtils::genUniqueFilePath(const std::string &storagePath, const s
     do
     {
         res = storagePath;
-        if(res.back() != '/')
+        if (res.back() != '/')
             res += '/';
 
         res += name;
-        if(i > 0)
+        if (i > 0)
             res += "-" + std::to_string(i);
-        if(!ext.empty())
+        if (!ext.empty())
             res += '.' + ext;
         ++i;
-    } while(isExists(res));
+    } while (isExists(res));
     return res;
 }
 
@@ -256,11 +250,11 @@ std::string FileUtils::getMimeType(const std::string &filePath)
     std::string name;
     std::string ext;
     splitPath(filePath, base, name, ext);
-    if(!ext.empty())
+    if (!ext.empty())
     {
         char *mime = nullptr;
         mime_type_get_mime_type(ext.c_str(), &mime);
-        if(mime)
+        if (mime)
         {
             res = mime;
             std::transform(res.begin(), res.end(), res.begin(), ::tolower);
@@ -277,7 +271,7 @@ static bool saveFileToStoragePrivate(const std::string &file)
     std::string dowloadPath = PathUtils::getDownloadPath();
     std::string filePathDst = FileUtils::genUniqueFilePath(dowloadPath, file);
 
-    if(FileUtils::copy(file, filePathDst))
+    if (FileUtils::copy(file, filePathDst))
         res = media_content_scan_file(filePathDst.c_str()) == MEDIA_CONTENT_ERROR_NONE;
 
     return res;
@@ -286,10 +280,10 @@ static bool saveFileToStoragePrivate(const std::string &file)
 bool FileUtils::saveFilesToStorage(const std::list<std::string> &files)
 {
     bool res = true;
-    if(media_content_connect() != 0)
+    if (media_content_connect() != 0)
         return false;
 
-    for(const std::string &file : files)
+    for (const std::string &file : files)
     {
         res &= saveFileToStoragePrivate(file);
     }
@@ -299,7 +293,7 @@ bool FileUtils::saveFilesToStorage(const std::list<std::string> &files)
 
 bool FileUtils::saveFileToStorage(const std::string &file)
 {
-    if(media_content_connect() != 0)
+    if (media_content_connect() != 0)
         return false;
 
     bool res = saveFileToStoragePrivate(file);
index 1d6b2a9873a6b44884d1fa5d9f783fceab26593a..360a4551a50f6afeefaba9f45dec88acb056737e 100644 (file)
@@ -33,14 +33,12 @@ static void more_event_cb(void *data, Evas_Object *obj, void *event_info)
 
 void IHwButtonListener::setHwButtonListener(Evas_Object * obj, IHwButtonListener *listener)
 {
-    if(listener)
+    if (listener)
     {
         setHwButtonListener(obj, nullptr);
         eext_object_event_callback_add(obj, EEXT_CALLBACK_MORE, more_event_cb, listener);
         eext_object_event_callback_add(obj, EEXT_CALLBACK_BACK, back_event_cb, listener);
-    }
-    else
-    {
+    } else {
         eext_object_event_callback_del(obj, EEXT_CALLBACK_MORE, more_event_cb);
         eext_object_event_callback_del(obj, EEXT_CALLBACK_BACK, back_event_cb);
     }
index c7792427ae54a750849b9e9c5791629a8195e515..d1f89bc0e326b68171967bd2d0a870ca9bbc0396 100644 (file)
@@ -28,7 +28,7 @@ LoggerImpl::LoggerImpl(const char *tag, const char *file, const char *function,
     , m_File(file)
     , m_Function(function)
 {
-    dlog_print( defaultPriority
+    dlog_print(defaultPriority
               , m_Tag.c_str()
               , enterFraseFormat.c_str()
               , m_File.c_str()
@@ -38,7 +38,7 @@ LoggerImpl::LoggerImpl(const char *tag, const char *file, const char *function,
 
 LoggerImpl::~LoggerImpl()
 {
-    dlog_print( defaultPriority
+    dlog_print(defaultPriority
               , m_Tag.c_str()
               , leaveFraseFormat.c_str()
               , m_File.c_str()
index 23249cb7caf43f86cef302261293bcb6f33e206c..8ffa83bdd2002e84162968974c8630c7511654ea 100644 (file)
@@ -38,10 +38,10 @@ namespace
             MetadataExtractor(const std::string &path)
                 : m_Metadata()
             {
-                if(FileUtils::isExists(path))
+                if (FileUtils::isExists(path))
                 {
                     metadata_extractor_create(&m_Metadata);
-                    if(metadata_extractor_set_path(m_Metadata, path.c_str()) != 0)
+                    if (metadata_extractor_set_path(m_Metadata, path.c_str()) != 0)
                     {
                         metadata_extractor_destroy(m_Metadata);
                         m_Metadata = nullptr;
@@ -51,7 +51,7 @@ namespace
 
             ~MetadataExtractor()
             {
-                if(m_Metadata)
+                if (m_Metadata)
                     metadata_extractor_destroy(m_Metadata);
             }
 
@@ -71,7 +71,7 @@ namespace
                 std::string res;
                 char *cStr = nullptr;
                 metadata_extractor_get_metadata(m_Metadata, attr, &cStr);
-                if(cStr)
+                if (cStr)
                 {
                     res = cStr;
                     free(cStr);
@@ -94,7 +94,7 @@ std::string MediaUtils::getTitle(const std::string &path)
     std::string fileName = FileUtils::getFileName(path);
 
     MetadataExtractor extractor(path);
-    if(!extractor.isValid())
+    if (!extractor.isValid())
         return fileName;
 
     std::string title = extractor.getStr(METADATA_TITLE);
@@ -105,7 +105,7 @@ int MediaUtils::getDuration(const std::string &uri)
 {
     MetadataExtractor extractor(uri);
     int duration = 0;
-    if(extractor.isValid())
+    if (extractor.isValid())
     {
         duration = extractor.getInt(METADATA_DURATION);
         MSG_LOG("Duration msec: ", duration);
@@ -120,7 +120,7 @@ int MediaUtils::getDurationSec(const std::string &uri)
     MSG_LOG("File: ", uri);
     MSG_LOG("Duration sec: ", sec);
 
-    if(sec < 0)
+    if (sec < 0)
         return 0;
 
     return sec;
@@ -129,7 +129,7 @@ int MediaUtils::getDurationSec(const std::string &uri)
 bool MediaUtils::getVideoFrame(const std::string &videoFilePath, const std::string &imageFilePath)
 {
     MetadataExtractor extractor(videoFilePath);
-    if(!extractor.isValid())
+    if (!extractor.isValid())
         return false;
 
     int videoW = extractor.getInt(METADATA_VIDEO_WIDTH);
@@ -142,13 +142,13 @@ bool MediaUtils::getVideoFrame(const std::string &videoFilePath, const std::stri
     MSG_LOG("File: ", videoFilePath);
     MSG_LOG("Frame: width = ", videoW, " height = ", videoH, " size = ", thumbSize);
 
-    if(thumbnail)
+    if (thumbnail)
     {
         const int quality = 90; // JPEG image quality(1 ~ 100)
         image_util_encode_h encode_h = {};
         bool isOk = false;
         isOk = image_util_encode_create(IMAGE_UTIL_JPEG, &encode_h) == IMAGE_UTIL_ERROR_NONE;
-        if(!isOk)
+        if (!isOk)
         {
             free(thumbnail);
             return false;
@@ -159,7 +159,7 @@ bool MediaUtils::getVideoFrame(const std::string &videoFilePath, const std::stri
         isOk &= image_util_encode_set_quality(encode_h, quality) == IMAGE_UTIL_ERROR_NONE;
         isOk &= image_util_encode_set_input_buffer(encode_h, (unsigned char *)thumbnail) == IMAGE_UTIL_ERROR_NONE;
         isOk &= image_util_encode_set_output_path(encode_h, imageFilePath.c_str()) == IMAGE_UTIL_ERROR_NONE;
-        if(!isOk)
+        if (!isOk)
         {
             image_util_encode_destroy(encode_h);
             free(thumbnail);
@@ -177,13 +177,13 @@ bool MediaUtils::getVideoFrame(const std::string &videoFilePath, const std::stri
 bool MediaUtils::getFrameSize(const std::string &videoFilePath, int &width, int &height)
 {
     MetadataExtractor extractor(videoFilePath);
-    if(!extractor.isValid())
+    if (!extractor.isValid())
         return false;
 
     width = extractor.getInt(METADATA_VIDEO_WIDTH);
     height = extractor.getInt(METADATA_VIDEO_HEIGHT);
     int orient = extractor.getInt(METADATA_ROTATE);
-    if(orient == 90 || orient == 270)
+    if (orient == 90 || orient == 270)
         std::swap(width, height);
 
     MSG_LOG("File: ", videoFilePath);
@@ -208,26 +208,26 @@ long long MediaUtils::downgradeImageQuality(const std::string &imagePath)
     std::ofstream outputFile;
 
     exifData = exif_data_new_from_file(imagePath.c_str());
-    if(exifData)
+    if (exifData)
     {
         exif_data_save_data(exifData, &exifBuff, &exifBuffLen);
     }
 
     res = image_util_decode_create(&decode_h);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_decode_set_input_path(decode_h, imagePath.c_str());
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         image_util_decode_destroy(decode_h);
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_decode_set_output_buffer(decode_h, &buffer);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         image_util_decode_destroy(decode_h);
         return FileUtils::getFileSize(imagePath);
@@ -235,47 +235,47 @@ long long MediaUtils::downgradeImageQuality(const std::string &imagePath)
 
     res = image_util_decode_run(decode_h, &width, &height, nullptr);
     image_util_decode_destroy(decode_h);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_encode_create(IMAGE_UTIL_JPEG, &encode_h);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_encode_set_resolution(encode_h, width, height);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         image_util_encode_destroy(encode_h);
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_encode_set_quality(encode_h, QUALITY);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         image_util_encode_destroy(encode_h);
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_encode_set_input_buffer(encode_h, buffer);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         image_util_encode_destroy(encode_h);
         return FileUtils::getFileSize(imagePath);
     }
 
     res = image_util_encode_set_output_buffer(encode_h, &jpegBuff);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         image_util_encode_destroy(encode_h);
         return FileUtils::getFileSize(imagePath);
     }
     res = image_util_encode_run(encode_h, &jpegBuffLen);
     image_util_encode_destroy(encode_h);
-    if(res != IMAGE_UTIL_ERROR_NONE)
+    if (res != IMAGE_UTIL_ERROR_NONE)
     {
         free(buffer);
         free(jpegBuff);
@@ -283,14 +283,14 @@ long long MediaUtils::downgradeImageQuality(const std::string &imagePath)
     }
 
     outputFile.open(imagePath.c_str());
-    if(!outputFile.is_open())
+    if (!outputFile.is_open())
     {
         MSG_LOG_ERROR("Can't open file for write");
         free(buffer);
         free(jpegBuff);
         return FileUtils::getFileSize(imagePath);
     }
-    if(exifData)
+    if (exifData)
     {
         // Write EXIF header
         outputFile.write((char *)EXIF_HEADER, EXIF_HEADER_LEN);
@@ -303,9 +303,7 @@ long long MediaUtils::downgradeImageQuality(const std::string &imagePath)
         outputFile.write((char *)jpegBuff + JPEG_HEADER_OFFSET, jpegBuffLen - JPEG_HEADER_OFFSET);
         free(exifBuff);
         exif_data_unref(exifData);
-    }
-    else
-    {
+    } else {
         // Write JPEG image data
         outputFile.write((char *)jpegBuff, jpegBuffLen);
     }
index 2ae764e4e1a218d7b587b7cf6ab3ec617c2e7dc1..569acdf34181b0e0cfa4fde0d44d19bde8d6792e 100644 (file)
@@ -27,10 +27,10 @@ std::string PathUtils::getResourcePath(const std::string &filePath)
 {
     std::string res;
     static std::string basePath;
-    if(basePath.empty())
+    if (basePath.empty())
     {
         char *path = app_get_resource_path();
-        if(path)
+        if (path)
         {
             basePath = path;
             free(path);
@@ -47,10 +47,10 @@ std::string PathUtils::getDataPath(const std::string &filePath)
 {
     std::string res;
     static std::string basePath;
-    if(basePath.empty())
+    if (basePath.empty())
     {
         char *path = app_get_data_path();
-        if(path)
+        if (path)
         {
             basePath = path;
             free(path);
@@ -67,7 +67,7 @@ std::string PathUtils::getResourcePath()
 {
     std::string res;
     char* resPath = app_get_resource_path();
-    if(resPath)
+    if (resPath)
     {
         res = resPath;
         free(resPath);
@@ -79,7 +79,7 @@ std::string PathUtils::getResourcePath()
 std::string PathUtils::getLocalePath()
 {
     std::string resPath(getResourcePath());
-    if(!resPath.empty())
+    if (!resPath.empty())
     {
         resPath.append("locale");
     }
@@ -89,7 +89,7 @@ std::string PathUtils::getLocalePath()
 
 static bool storageCb(int storageId, storage_type_e type, storage_state_e state, const char *path, void *userData)
 {
-    if(type == STORAGE_TYPE_INTERNAL)
+    if (type == STORAGE_TYPE_INTERNAL)
     {
         int *internalStorage = (int *)userData;
         *internalStorage = storageId;
@@ -102,17 +102,17 @@ const std::string &PathUtils::getDownloadPath()
 {
     static std::string downloadPath;
 
-    if(!downloadPath.empty())
+    if (!downloadPath.empty())
         return downloadPath;
 
     char *dirPath = nullptr;
     int storageId = -1;
 
     int error = storage_foreach_device_supported(storageCb, &storageId);
-    if(error == STORAGE_ERROR_NONE)
+    if (error == STORAGE_ERROR_NONE)
         storage_get_directory(storageId, STORAGE_DIRECTORY_DOWNLOADS, &dirPath);
 
-    if(dirPath)
+    if (dirPath)
     {
         downloadPath = dirPath;
         free(dirPath);
index 18b87273ec7e912033354c3b8533a027ef955599..b9c6bb0e1f994a0879c98722c094020646d17f05 100644 (file)
@@ -33,7 +33,7 @@ using namespace Msg;
      std::string res;
      char *normalizedNum = nullptr;
      phone_number_get_normalized_number(number.c_str(), &normalizedNum);
-     if(normalizedNum)
+     if (normalizedNum)
      {
          res = normalizedNum;
          free(normalizedNum);
index d4e90be25ffb138d456838495e99945fae01eda5..491adcf2a16e6e321c973a276e7f49cc8150142b 100644 (file)
@@ -34,7 +34,7 @@ namespace
 {
     const char *alignAsString(TextAlign align)
     {
-        switch(align)
+        switch (align)
         {
             case TextAlign::Center:
                 return "center";
@@ -64,7 +64,6 @@ TextStyle::TextStyle(int size, const std::string &color, TextAlign align)
     , m_Align(align)
     , m_Size(size)
 {
-
 }
 
 TextStyle::~TextStyle()
@@ -142,17 +141,17 @@ std::string TextDecorator::makePlainText(const std::string &text)
 
 std::string TextDecorator::highlightKeyword(std::string str, const std::string &searchWord, bool *foundRes)
 {
-    if(foundRes)
+    if (foundRes)
         *foundRes = false;
 
-    if(str.empty() || searchWord.empty())
+    if (str.empty() || searchWord.empty())
         return std::move(str);
 
     char *found = strcasestr((char*)str.c_str(), (char*)searchWord.c_str());
-    if(!found)
+    if (!found)
         return str;
 
-    if(foundRes)
+    if (foundRes)
         *foundRes = true;
 
     std::string res;
index aefcb14cbc6f02c6563a2dc08a68c859f186423e..5f3c38232c32cb3399fe74e15700f4a614808c3d 100644 (file)
@@ -41,7 +41,7 @@ ThumbnailMaker::ThumbnailMaker(App &app)
     m_ContactsMap.reserve(defaultCache);
     m_OriginsMap.reserve(defaultCache);
 
-    for(int i = 0; i <= maxStaticThumbId; i++)
+    for (int i = 0; i <= maxStaticThumbId; i++)
     {
         getThumbId((DefaultThumbs)i);
     }
@@ -65,14 +65,12 @@ ThumbId ThumbnailMaker::getThumbId(const std::string &address)
 
 ThumbId ThumbnailMaker::getThumbIdFromFile(const std::string &path)
 {
-    if(path.empty())
+    if (path.empty())
     {
         return getThumbId(SingleThumb);
-    }
-    else
-    {
+    } else {
         auto it = m_ContactsMap.find(path);
-        if(it != m_ContactsMap.end())
+        if (it != m_ContactsMap.end())
             return it->second;
 
         Evas_Object *origin = makeOriginThumb(m_App.getWindow(), path);
@@ -85,19 +83,15 @@ ThumbId ThumbnailMaker::getThumbIdFromFile(const std::string &path)
 ThumbId ThumbnailMaker::getThumbId(DefaultThumbs thumb)
 {
     auto it = m_ContactsMap.find(defaultThumbsToStr(thumb));
-    if(it != m_ContactsMap.end())
+    if (it != m_ContactsMap.end())
     {
         return it->second;
-    }
-    else
-    {
+    } else {
         Evas_Object *origin = nullptr;
-        if(thumb != OwnerThumb)
+        if (thumb != OwnerThumb)
         {
             origin = makeDefaultOriginThumb(m_App.getWindow(), defaultThumbsToPath(thumb));
-        }
-        else
-        {
+        } else {
             ContactMyProfileRef ownerProfile = m_App.getContactManager().getOwnerProfile();
             origin = ownerProfile ? makeOriginThumb(m_App.getWindow(), ownerProfile->getThumbnailPath()) :
                                     makeDefaultOriginThumb(m_App.getWindow(), defaultThumbsToPath(SingleThumb));
@@ -111,7 +105,7 @@ ThumbId ThumbnailMaker::getThumbId(DefaultThumbs thumb)
 Evas_Object *ThumbnailMaker::getThumb(Evas_Object *parent, ThumbId id, int thumbSize)
 {
     auto it = m_OriginsMap.find(id);
-    if(it == m_OriginsMap.end())
+    if (it == m_OriginsMap.end())
     {
         MSG_LOG_ERROR("Invalid thumbnail id");
         return nullptr;
@@ -185,23 +179,23 @@ void ThumbnailMaker::invalidate()
     // m_OriginsMap:
     auto originsIt = m_OriginsMap.begin();
 
-    for(; originsIt != m_OriginsMap.end();)
+    for (; originsIt != m_OriginsMap.end();)
     {
-        if(originsIt->first > maxStaticThumbId)
+        if (originsIt->first > maxStaticThumbId)
         {
             MSG_LOG(originsIt->first);
             evas_object_del(originsIt->second);
             originsIt = m_OriginsMap.erase(originsIt);
-        }
-        else
+        } else {
             ++originsIt;
+        }
     }
 
     // m_ContactsMap:
     auto contactsIt = m_ContactsMap.begin();
-    for(; contactsIt != m_ContactsMap.end();)
+    for (; contactsIt != m_ContactsMap.end();)
     {
-        if(contactsIt->second > maxStaticThumbId)
+        if (contactsIt->second > maxStaticThumbId)
             contactsIt = m_ContactsMap.erase(contactsIt);
         else
             ++contactsIt;
index 41529e46ee6b485c92f60b40eeec3abecfe5d786..3c0b855cd89d44303a59f1edc2d4289ef2f1c5a8 100644 (file)
@@ -63,13 +63,11 @@ std::string TimeUtils::makeThreadTimeString(time_t msgTime)
 
     bool isToday = (curDay - msgDay == 0);
 
-    if(isToday)
+    if (isToday)
     {
         const std::string &timeFormat = getTimeFormat() == TimeFormat24H  ? time24H : time12H;
         return getFormattedDate(locale, getDateBestPattern(locale, timeFormat), msgTime);
-    }
-    else
-    {
+    } else {
         bool notThisYear = (msgTimeTm.tm_year - curTimeTm.tm_year != 0);
         const std::string &date = notThisYear ? dateListYear : dateListDefault;
         return getFormattedDate(locale, getDateBestPattern(locale, date), msgTime);
@@ -142,7 +140,7 @@ std::string TimeUtils::makeCalEventString(int year, int month, int mday, int hou
 int TimeUtils::getTimeFormat()
 {
     bool timeFormat = false;
-    if(system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &timeFormat) < 0)
+    if (system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &timeFormat) < 0)
         return TimeFormatUnknown;
     return timeFormat ? TimeFormat24H : TimeFormat12H;
 }
@@ -154,18 +152,16 @@ const std::string &TimeUtils::getDefaultLocale()
     char *str = nullptr;
     system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &str);
 
-    if(str)
+    if (str)
     {
         i18n_ulocale_set_default(str);
         res = str;
         size_t i = res.find(".");
-        if(i != std::string::npos)
+        if (i != std::string::npos)
             res = res.substr(i);
 
         free(str);
-    }
-    else
-    {
+    } else {
         res.clear();
     }
     return res;
@@ -180,16 +176,14 @@ std::string TimeUtils::getTimezone()
     if (len != -1)
     {
         buf[len] = '\0';
-    }
-    else
-    {
+    } else {
         MSG_LOG_ERROR("Getting default timezone failed, use system settings value");
 
         std::string res;
         char *time_zone = nullptr;
 
         system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &time_zone);
-        if(time_zone)
+        if (time_zone)
         {
             res = time_zone;
             free(time_zone);
@@ -258,13 +252,13 @@ std::string TimeUtils::getFormattedDate(const std::string &locale, const std::st
         MSG_LOG_ERROR("default timezone set error");
 
     /* convert time_t to UDate, if it is */
-    if(time)
+    if (time)
         date = (i18n_udate)time * 1000;
     else
         i18n_ucalendar_get_now(&date);
 
     dateFormat = getDateFormat(locale, uBestPattern, &status);
-    if(status == I18N_ERROR_NONE)
+    if (status == I18N_ERROR_NONE)
     {
         /* get formatted string */
         i18n_udate_format_date(dateFormat, date, formatted, formattedCapacity, nullptr, &formattedLength);
index 6ad232c0b4f5c81c4c61ad524c5c55beec4b41c9..ccc0d9a8a80109a92a88ab803c08d1b402c99c47 100644 (file)
@@ -27,18 +27,16 @@ CalendarEvent::CalendarEvent(calendar_record_h record)
 {
     char *summary = nullptr;
     calendar_record_get_str_p(record, _calendar_event.summary, &summary);
-    if(summary)
+    if (summary)
         m_Summary = summary;
 
     calendar_time_s start = {};
-    if(calendar_record_get_caltime(record, _calendar_event.start_time, &start) == 0)
+    if (calendar_record_get_caltime(record, _calendar_event.start_time, &start) == 0)
     {
-        if(start.type == CALENDAR_TIME_UTIME) // Unix time
+        if (start.type == CALENDAR_TIME_UTIME) // Unix time
         {
             m_StartDate = TimeUtils::makeCalEventString(start.time.utime);
-        }
-        else // Local time
-        {
+        } else { // Local time
             m_StartDate = TimeUtils::makeCalEventString
             (
                 start.time.date.year,
@@ -46,8 +44,7 @@ CalendarEvent::CalendarEvent(calendar_record_h record)
                 start.time.date.mday,
                 start.time.date.hour,
                 start.time.date.minute,
-                nullptr
-            );
+                nullptr);
         }
     }
 }
@@ -80,7 +77,7 @@ VCalendarParser &VCalendarParser::getInst()
 
 std::list<CalendarEvent> VCalendarParser::parse(const std::string &filePath)
 {
-    if(filePath.empty())
+    if (filePath.empty())
         return {};
 
     std::list<CalendarEvent> list;
@@ -94,20 +91,20 @@ std::list<CalendarEvent> VCalendarParser::parse(const std::string &filePath)
     calendar_list_get_count(records, &count);
     calendar_list_first(records);
 
-    for(int i = 0; i < count; ++i)
+    for (int i = 0; i < count; ++i)
     {
         calendar_record_h record = nullptr;
         calendar_list_get_current_record_p(records, &record);
-        if(record)
+        if (record)
         {
             char *viewUri = nullptr;
             calendar_record_get_uri_p(record, &viewUri);
-            if(viewUri && !strcmp(viewUri, _calendar_event._uri))
+            if (viewUri && !strcmp(viewUri, _calendar_event._uri))
                 list.emplace_back(record);
         }
     }
 
-    if(records)
+    if (records)
         calendar_list_destroy(records, true);
 
     return list;
index 9ef94ef5f95903987d575cc9400c80cff2b4afda..fe3596c8b05cfc889fe157da795b66026475799c 100644 (file)
@@ -292,13 +292,13 @@ namespace Msg
         std::vector<T*> list;
         list.reserve(elm_genlist_items_count(getEo()));
         Elm_Object_Item *elmItem = elm_genlist_first_item_get(getEo());
-        while(elmItem)
+        while (elmItem)
         {
             void *data = elm_object_item_data_get(elmItem);
-            if(data)
+            if (data)
             {
                 T *listItem = dynamic_cast<T*>(static_cast<ListItem*>(data));
-                if(listItem)
+                if (listItem)
                     list.push_back(listItem);
             }
             elmItem = elm_genlist_item_next_get(elmItem);
@@ -316,7 +316,7 @@ namespace Msg
         {
             next = getNextItem(*next);
             res = dynamic_cast<T*>(next);
-        } while(next && !res);
+        } while (next && !res);
 
         return res;
     }
@@ -330,7 +330,7 @@ namespace Msg
         {
             prev = getPrevItem(*prev);
             res = dynamic_cast<T*>(prev);
-        } while(prev && !res);
+        } while (prev && !res);
 
         return res;
     }
index 6765fb8446ed70ed78eb06f1b4b4f1dfe11c2c25..3d54c21d93588256dd5721d48df0d4e8930fbed1 100644 (file)
@@ -112,7 +112,7 @@ namespace Msg
     inline void MbeRecipientItem::setDispName(const std::string &dispName)
     {
         m_DispName = dispName;
-        if(getElmObjItem())
+        if (getElmObjItem())
             setText(dispName);
     }
 }
index f6f84a65b9d9247833ee5405f64593a2e880f26d..a0d4a037c89781a2cee6cde19f903c2d5899cdc1 100644 (file)
@@ -38,7 +38,7 @@ namespace Msg
             };
         public:
             PopupList(Evas_Object *parent, PopupListType type = ListPopup);
-            PopupList(PopupManager &parent, PopupListType type= ListPopup);
+            PopupList(PopupManager &parent, PopupListType type = ListPopup);
             virtual ~PopupList();
 
             /**
index 4ed0f47579f95392f0ea36001abc392a8bface96..9e1f807f9f1583f9c3b6e4502864268737989356 100644 (file)
@@ -86,7 +86,7 @@ namespace Msg
              * @param[in] new popup owner
              * @return popup created.
              */
-            Popup &getPopup(void *newOwner = nullptr );
+            Popup &getPopup(void *newOwner = nullptr);
 
             /**
              * @brief Creates specific popup.
index c51187b4fe74a298a823d9d25031c537eb7b5f2a..d4a429c021ec9c386103bceacb32ce4152302e99 100644 (file)
@@ -29,5 +29,4 @@ Box::Box(Evas_Object *parent)
 
 Box::~Box()
 {
-
 }
index 43e44791f05ad3a12e139d299b4d9b199b2ff1dc..d9369b074396199db57b26bab77be0a100a3235f 100644 (file)
@@ -27,7 +27,6 @@ ContextPopupItem::ContextPopupItem(ContextPopup &parent, int id, ContextPopupIte
     , m_pUserCb(userCb)
     , m_pUserData(userData)
 {
-
 }
 
 ContextPopupItem::~ContextPopupItem()
@@ -56,12 +55,10 @@ ContextPopupItem *ContextPopup::appendItem(const std::string &text, Evas_Object
     ContextPopupItem *newItem = new ContextPopupItem(*this, id, cb, userData);
     Elm_Object_Item *elmItem = elm_ctxpopup_item_append(getEo(), text.c_str(), icon, on_item_pressed_cb, newItem);
 
-    if(elmItem)
+    if (elmItem)
     {
         newItem->setElmObjItem(elmItem);
-    }
-    else
-    {
+    } else {
         delete newItem;
         newItem = nullptr;
     }
@@ -109,7 +106,7 @@ void ContextPopup::on_dismissed_cb(void *data, Evas_Object *obj, void *event_inf
 void ContextPopup::on_item_pressed_cb(void *data, Evas_Object *obj, void *event_info)
 {
     ContextPopupItem *item = static_cast<ContextPopupItem*>(data);
-    if(item && item->m_pUserCb)
+    if (item && item->m_pUserCb)
         item->m_pUserCb(*item, item->m_pUserData);
 }
 
index f790ed17054241402737432e63f61116aee38ba0..723b0bdd60fed69f633849a21571f6d98ddc148d 100644 (file)
@@ -32,7 +32,6 @@ DefaultLayout::DefaultLayout(Evas_Object *parent)
 
 DefaultLayout::~DefaultLayout()
 {
-
 }
 
 void DefaultLayout::setContent(Evas_Object *obj)
@@ -53,13 +52,11 @@ void DefaultLayout::setFloatingButton(Evas_Object *obj)
 
 void DefaultLayout::showFloatingButton(bool show)
 {
-    if(show)
+    if (show)
     {
         View::setContent(m_pFloatingBtn, floatingPart, true);
         evas_object_show(m_pFloatingBtn);
-    }
-    else
-    {
+    } else {
         View::unsetContent(floatingPart);
         evas_object_hide(m_pFloatingBtn);
     }
index b6d335df947347074c48e60de4940250c7c3e697..6b7ea69237c73d6de0b12cfbdd7f2efcd9d6441b 100644 (file)
@@ -37,7 +37,7 @@ ListItemStyle::ListItemStyle(const char *itemStyle, const char *decorateItemStyl
 ListItemStyle::~ListItemStyle()
 {
     unregisterCallback();
-    if(m_pGenlistItemClass)
+    if (m_pGenlistItemClass)
         elm_genlist_item_class_free(m_pGenlistItemClass);
 }
 
@@ -50,7 +50,7 @@ ListItemStyleRef ListItemStyle::create(const char *itemStyle,
 
 void ListItemStyle::setStyle(const char * itemStyle, const char * decorateItemStyle, const char * decorateAllItemStyle)
 {
-    if(!m_pGenlistItemClass)
+    if (!m_pGenlistItemClass)
         return;
 
     m_pGenlistItemClass->decorate_all_item_style  = decorateAllItemStyle;
@@ -60,7 +60,7 @@ void ListItemStyle::setStyle(const char * itemStyle, const char * decorateItemSt
 
 void ListItemStyle::registerCallback()
 {
-    if(!m_pGenlistItemClass)
+    if (!m_pGenlistItemClass)
         return;
 
     m_pGenlistItemClass->func.text_get = &ListItem::elm_gen_item_text_get_cb;
@@ -72,7 +72,7 @@ void ListItemStyle::registerCallback()
 
 void ListItemStyle::unregisterCallback()
 {
-    if(!m_pGenlistItemClass)
+    if (!m_pGenlistItemClass)
         return;
 
     m_pGenlistItemClass->func.text_get = nullptr;
@@ -95,7 +95,6 @@ ListItem::ListItem(const ListItemStyleRef &itemStyle, Elm_Genlist_Item_Type type
 ListItem::ListItem(Elm_Genlist_Item_Type type)
     : ListItem(ListItemStyleRef(), type)
 {
-
 }
 
 ListItem::~ListItem()
@@ -126,7 +125,7 @@ char *ListItem::elm_gen_item_text_get_cb(void *data, Evas_Object *obj, const cha
 {
     ListItem *self = static_cast<ListItem*>(data);
 
-    if(self)
+    if (self)
     {
         std::string text = self->getText(*self, part);
         return text.empty() ? nullptr : strdup(text.c_str());
@@ -139,13 +138,13 @@ Evas_Object *ListItem::elm_gen_item_content_get_cb(void * data, Evas_Object * ob
 {
     ListItem *self = static_cast<ListItem*>(data);
 
-    if(!self)
+    if (!self)
         return nullptr;
 
-    if(self->getOwner()->getCheckMode())
+    if (self->getOwner()->getCheckMode())
     {
         const char *checkPart = self->getCheckPart(*self);
-        if(checkPart && strcmp(checkPart, part) == 0)
+        if (checkPart && strcmp(checkPart, part) == 0)
         {
             return self->addCheck();
         }
@@ -235,7 +234,7 @@ void ListItem::setExpanded(bool expand)
 
 void ListItem::update()
 {
-    if(m_ItemStyle->m_pGenlistItemClass != elm_genlist_item_item_class_get(getElmObjItem()))
+    if (m_ItemStyle->m_pGenlistItemClass != elm_genlist_item_item_class_get(getElmObjItem()))
         elm_genlist_item_item_class_update(getElmObjItem(), m_ItemStyle->m_pGenlistItemClass);
     elm_genlist_item_update(getElmObjItem());
 }
@@ -283,7 +282,7 @@ void ListItem::elm_gen_item_del_cb(void *data, Evas_Object *obj)
 {
     ListItem *self = static_cast<ListItem*>(data);
 
-    if(self)
+    if (self)
         self->onDelete(*self);
 }
 
index cab9346cf261f3510da6d9c904c55bf23a4d65d7..007d1585c71f36d9136b4ea40276d22e4773b6e4 100644 (file)
@@ -109,14 +109,13 @@ bool ListView::sortedInsertItem(ListItem &listItem, ListItem *parent)
             int res = 0;
             ListItem *item1 = (ListItem*)elm_object_item_data_get((Elm_Object_Item*)data1);
             ListItem *item2 = (ListItem*)elm_object_item_data_get((Elm_Object_Item*)data2);
-            if(item1->m_pOwner->m_CmpFunc)
+            if (item1->m_pOwner->m_CmpFunc)
                 res = item1->m_pOwner->m_CmpFunc(*item1, *item2);
 
             return res;
         },
         on_item_selected_cb,
-        this
-    );
+        this);
 
     listItem.setElmObjItem(elmItem);
     return elmItem != nullptr;
@@ -136,11 +135,11 @@ ListItemCollection ListView::getItems() const
 {
     ListItemCollection list;
     Elm_Object_Item *elmItem = elm_genlist_first_item_get(getEo());
-    while(elmItem)
+    while (elmItem)
     {
         void *data = elm_object_item_data_get(elmItem);
         MSG_ASSERT(data, "Genlist item data is NULL");
-        if(data)
+        if (data)
         {
             ListItem *listItem = static_cast<ListItem *>(data);
             list.push_back(listItem);
@@ -155,7 +154,7 @@ ListItemCollection ListView::getRealizedItems() const
 {
     ListItemCollection collection;
     Eina_List *list = elm_genlist_realized_items_get(getEo());
-    if(list)
+    if (list)
     {
         void *obj = nullptr;
         Eina_List *l = nullptr;
@@ -247,12 +246,12 @@ void ListView::notifyListener(void *data, Evas_Object *obj, void *event_info, Li
     ListItem *item = ListItem::staticCast<ListItem*>(event_info);
     MSG_ASSERT(item, "Item is null");
 
-    if(item)
+    if (item)
     {
         ListView *owner = item->getOwner();
         MSG_ASSERT(owner, "ListItem::owner is null");
 
-        if(owner && owner->m_pListener)
+        if (owner && owner->m_pListener)
             (owner->m_pListener->*method)(*item);
     }
 }
@@ -269,7 +268,7 @@ bool ListView::getCheckMode() const
 
 void ListView::checkAllItems(bool check,  bool updateFullItem)
 {
-    for(ListItem *item: getItems())
+    for (ListItem *item: getItems())
     {
         item->setCheckedState(check, false);
     }
@@ -277,7 +276,7 @@ void ListView::checkAllItems(bool check,  bool updateFullItem)
     if (updateFullItem)
         updateRealizedItems();
     else
-        for(ListItem *item: getRealizedItems())
+        for (ListItem *item: getRealizedItems())
         {
             item->updateFields(item->getCheckPart(*item), ELM_GENLIST_ITEM_FIELD_ALL);
         }
@@ -303,13 +302,11 @@ void ListView::on_item_selected_cb(void *data, Evas_Object *obj, void *event_inf
     ListItem *item = ListItem::staticCast<ListItem*>(event_info);
 
     item->setSelected(false);
-    if(item->getOwner()->getCheckMode() && item->isCheckable())
+    if (item->getOwner()->getCheckMode() && item->isCheckable())
     {
         item->changeCheckedState(true);
         notifyListener(data, obj, event_info, &IListViewListener::onListItemChecked);
-    }
-    else
-    {
+    } else {
         notifyListener(data, obj, event_info, &IListViewListener::onListItemSelected);
     }
 }
@@ -330,6 +327,6 @@ void ListView::on_longpressed_cb(void *data, Evas_Object *obj, void *event_info)
 {
     ListItem *item = ListItem::staticCast<ListItem*>(event_info);
     item->setSelected(false);
-    if(!item->getOwner()->getCheckMode())
+    if (!item->getOwner()->getCheckMode())
         notifyListener(data, obj, event_info, &IListViewListener::onListItemLongPressed);
 }
index 2589998bb6f22661d910d22bc3094241ede5fe11..5260edc11a734e69af44100225fd1687b5bad103 100644 (file)
@@ -36,7 +36,7 @@ MbeRecipientsView::MbeRecipientsView(Evas_Object *parent)
 
 MbeRecipientsView::~MbeRecipientsView()
 {
-    if(m_pChangedJob)
+    if (m_pChangedJob)
     {
         ecore_job_del(m_pChangedJob);
         m_pChangedJob = nullptr;
@@ -53,7 +53,7 @@ int MbeRecipientsView::getItemsCount() const
 {
     unsigned int res = 0;
     const Eina_List* items = elm_multibuttonentry_items_get(getEo());
-    if(items)
+    if (items)
         res = eina_list_count(items);
     return res;
 }
@@ -63,7 +63,7 @@ std::vector<MbeRecipientItem*> MbeRecipientsView::getItems() const
     std::vector<MbeRecipientItem*> res;
 
     Elm_Object_Item *elmItem = elm_multibuttonentry_first_item_get(getEo());
-    while(elmItem)
+    while (elmItem)
     {
         MbeRecipientItem *item = static_cast<MbeRecipientItem*>(elm_object_item_data_get(elmItem));
         res.push_back(item);
@@ -103,16 +103,15 @@ void MbeRecipientsView::onMbeItemClicked(Evas_Object *obj, void *eventInfo)
 
 void MbeRecipientsView::onMbeChanged(Evas_Object *obj, void *eventInfo)
 {
-    if(!m_pChangedJob)
+    if (!m_pChangedJob)
         m_pChangedJob = ecore_job_add
         (
             [](void *data)
             {
                 MbeRecipientsView *self = static_cast<MbeRecipientsView*>(data);
                 self->m_pChangedJob = nullptr;
-                if(self->m_pListener)
+                if (self->m_pListener)
                     self->m_pListener->onMbeChanged();
             },
-            this
-        );
+            this);
 }
index 2a98e4431a40c42d91ccd57fe253de811ee6d93d..a49bc76645b8b7fbd893a6ff34555cd87302d490 100644 (file)
@@ -90,9 +90,7 @@ void NaviFrameItem::setTitleVisibility(bool visible)
     {
         setContent(*m_pNaviBar, naviTitlePart);
         evas_object_show(*m_pNaviBar);
-    }
-    else
-    {
+    } else {
         evas_object_hide(elm_object_item_part_content_unset(getElmObjItem(), naviTitlePart));
     }
 }
@@ -147,7 +145,7 @@ std::string NaviFrameItem::NaviBar::getTitle() const
 
 void NaviFrameItem::NaviBar::getButton(NaviButtonId id)
 {
-    if(!m_ButtonList[id].button)
+    if (!m_ButtonList[id].button)
     {
         Evas_Object *btn = elm_button_add(getEo());
         m_ButtonList[id].button = btn;
@@ -160,25 +158,23 @@ void NaviFrameItem::NaviBar::getButton(NaviButtonId id)
 
 void NaviFrameItem::NaviBar::showButton(NaviButtonId id, bool value)
 {
-    if(value)
+    if (value)
     {
         getButton(id);
 
-        if(getContent(m_ButtonList[id].part) != m_ButtonList[id].button)
+        if (getContent(m_ButtonList[id].part) != m_ButtonList[id].button)
             setContent(m_ButtonList[id].button, m_ButtonList[id].part);
         setButtonColor(id, m_CurrentColor);
         evas_object_show(m_ButtonList[id].button);
-    }
-    else
-    {
-        if(getContent(m_ButtonList[id].part) == m_ButtonList[id].button)
+    } else {
+        if (getContent(m_ButtonList[id].part) == m_ButtonList[id].button)
         {
             evas_object_del(m_ButtonList[id].button);
             m_ButtonList[id].button = nullptr;
         }
     }
 
-    switch(id)
+    switch (id)
     {
         case NaviCancelButtonId:
             showCancelButtonPart(value);
@@ -209,7 +205,7 @@ void NaviFrameItem::NaviBar::disabledButton(NaviButtonId id, bool value)
 {
     elm_object_disabled_set(m_ButtonList[id].button, value);
 
-    if(m_CurrentColor == NaviBlueColorId)
+    if (m_CurrentColor == NaviBlueColorId)
         return;
 
     TextStyle style;
@@ -223,21 +219,19 @@ void NaviFrameItem::NaviBar::disabledButton(NaviButtonId id, bool value)
 
 void NaviFrameItem::NaviBar::showCancelButtonPart(bool value)
 {
-    if(value)
+    if (value)
     {
         emitSignal("cancel,show,btn", "*");
-    }
-    else if(getContent(cancelButtonPart) == nullptr)
-    {
+    } else if (getContent(cancelButtonPart) == nullptr) {
         emitSignal("left,clear", "*");
     }
 }
 
 void NaviFrameItem::NaviBar::showOkButtonPart(bool value)
 {
-    if(value)
+    if (value)
         emitSignal("done,show,btn", "*");
-    else if(getContent(okButtonPart) == nullptr)
+    else if (getContent(okButtonPart) == nullptr)
         emitSignal("right,clear", "*");
 }
 
@@ -249,20 +243,20 @@ void NaviFrameItem::NaviBar::showCenterButtonPart(bool value)
 
 void NaviFrameItem::NaviBar::showPrevButtonPart(bool value)
 {
-    if(value)
+    if (value)
         emitSignal("back,show,btn", "*");
-    else if(getContent(prevButtonPart) == nullptr)
+    else if (getContent(prevButtonPart) == nullptr)
         emitSignal("left,clear", "*");
 
-    if(getContent(downButtonPart) == nullptr)
+    if (getContent(downButtonPart) == nullptr)
         emitSignal("empty,right,show", "*");
 }
 
 void NaviFrameItem::NaviBar::showDownButtonPart(bool value)
 {
-    if(value)
+    if (value)
         emitSignal("down,show,btn", "*");
-    else if(getContent(downButtonPart) == nullptr)
+    else if (getContent(downButtonPart) == nullptr)
         emitSignal("right,clear", "*");
 }
 
@@ -286,7 +280,7 @@ void NaviFrameItem::onAttached(ViewItem &item)
 
 void NaviFrameItem::NaviBar::setColor(NaviColorId id)
 {
-    switch(id)
+    switch (id)
     {
         case NaviBlueColorId:
             emitSignal("title,color,blue", "*");
@@ -308,7 +302,7 @@ void NaviFrameItem::NaviBar::setButtonText(NaviButtonId id, const std::string &t
     // Note that, button's color is opposite to title's color
     TextStyle style;
 
-    switch(m_CurrentColor)
+    switch (m_CurrentColor)
     {
         case NaviBlueColorId:
             style.setColor(textColorWhiteTitleButtons);
@@ -335,7 +329,7 @@ void NaviFrameItem::NaviBar::setButtonColor(NaviButtonId id, NaviColorId titleCo
     // Note that, button's color is opposite to title's color
     if (id == NaviPrevButtonId || id == NaviExpandButtonId)
     {
-        switch(titleColor)
+        switch (titleColor)
         {
             case NaviBlueColorId:
                 emitSignal(m_ButtonList[id].button, "button,color,white", "*");
@@ -348,12 +342,10 @@ void NaviFrameItem::NaviBar::setButtonColor(NaviButtonId id, NaviColorId titleCo
             default:
                 break;
         }
-    }
-    else
-    {
+    } else {
         TextStyle style;
 
-        switch(titleColor)
+        switch (titleColor)
         {
             case NaviBlueColorId:
                 style.setColor(textColorWhiteTitleButtons);
index 5444a99c6711bc1dc11cd7d2ce1bb9ff00b42751..bae61a88af0a700d6a4c4a3a8af443edcf433bbe 100644 (file)
@@ -39,7 +39,6 @@ NaviFrameView::NaviFrameView(View &parent)
 
 NaviFrameView::~NaviFrameView()
 {
-
 }
 
 void NaviFrameView::create(Evas_Object *parent)
@@ -52,14 +51,14 @@ void NaviFrameView::create(Evas_Object *parent)
 void NaviFrameView::pause()
 {
     NaviFrameItem *top = getTopFrame();
-    if(top)
+    if (top)
         onPause(*top);
 }
 
 void NaviFrameView::resume()
 {
     NaviFrameItem *top = getTopFrame();
-    if(top)
+    if (top)
         onResume(*top);
 }
 
@@ -76,8 +75,8 @@ NaviFrameItem *NaviFrameView::getTopFrame() const
 int NaviFrameView::getItemsCount() const
 {
     int res = 0;
-    Eina_List *list= elm_naviframe_items_get(getEo());
-    if(list)
+    Eina_List *list = elm_naviframe_items_get(getEo());
+    if (list)
     {
         res = eina_list_count(list);
         eina_list_free(list);
@@ -88,9 +87,9 @@ int NaviFrameView::getItemsCount() const
 NaviFrameItemList NaviFrameView::getItems() const
 {
     NaviFrameItemList result;
-    Eina_List *list= elm_naviframe_items_get(getEo());
+    Eina_List *list = elm_naviframe_items_get(getEo());
 
-    if(list)
+    if (list)
     {
         Eina_List *l = nullptr;
         void *obj = nullptr;
@@ -130,7 +129,7 @@ void NaviFrameView::push(NaviFrameItem &item, View &content)
 void NaviFrameView::pop()
 {
     auto *topFrame = getTopFrame();
-    if(topFrame)
+    if (topFrame)
         pop(*topFrame);
 }
 
@@ -138,21 +137,17 @@ void NaviFrameView::pop(NaviFrameItem &item)
 {
     // Workaround solution to avoid rejected JIRA issue: http://suprem.sec.samsung.net/jira/browse/TSAM-6776
     item.m_IsPopping = true;
-    if(getTransitionStatus())
+    if (getTransitionStatus())
     {
         m_ItemsToDelete.push_back(&item);
-    }
-    else
-    {
-        if(getTopFrame() == &item)
+    } else {
+        if (getTopFrame() == &item)
         {
             m_TransitionStatus = getItemsCount() > 1;
             pause();
             elm_naviframe_item_pop(getEo());
             resume();
-        }
-        else
-        {
+        } else {
             pause();
             item.destroy();
             resume();
@@ -165,13 +160,11 @@ void NaviFrameView::insertToBottom(NaviFrameItem &item)
     Elm_Object_Item *before = elm_naviframe_bottom_item_get(getEo());
     Elm_Object_Item *insert = nullptr;
 
-    if(before)
+    if (before)
     {
         insert = elm_naviframe_item_insert_before(getEo(), before, nullptr, nullptr, nullptr, nullptr, naviTitleStyleEmpty);
         item.setElmObjItem(insert);
-    }
-    else
-    {
+    } else {
         m_TransitionStatus = !isEmpty();
         pause();
         insert = elm_naviframe_item_push(getEo(), nullptr, nullptr, nullptr, nullptr, naviTitleStyleEmpty);
@@ -183,7 +176,7 @@ void NaviFrameView::insertToBottom(NaviFrameItem &item)
 void NaviFrameView::promote(NaviFrameItem &item)
 {
     bool isTop = &item == getTopFrame();
-    if(!isTop)
+    if (!isTop)
     {
         m_TransitionStatus = true;
         pause();
@@ -199,15 +192,15 @@ void NaviFrameView::onTransitionFinished(Evas_Object *obj, void *eventInfo)
 
     auto *transFinishedItem = ViewItem::staticCast<NaviFrameItem*>(eventInfo);
 
-    for(NaviFrameItem *item: m_ItemsToDelete)
+    for (NaviFrameItem *item: m_ItemsToDelete)
     {
-        if(item == transFinishedItem)
+        if (item == transFinishedItem)
             transFinishedItem = nullptr;
         item->destroy();
     }
     m_ItemsToDelete.clear();
 
-    if(transFinishedItem)
+    if (transFinishedItem)
         transFinishedItem->onTransitionFinished(*transFinishedItem);
 }
 
index 79446f4f751de64f57783b54681d483803e8f3d4..e7fa83ef395a18e7afbc3ada6b9c8e3c728f5642 100644 (file)
@@ -26,7 +26,6 @@ NoContentLayout::NoContentLayout(Evas_Object *parent)
 
 NoContentLayout::~NoContentLayout()
 {
-
 }
 
 void NoContentLayout::setText(const TText &text)
index b00fd20e90232ff856cfb57513cc9ca10e1894a5..55fa604db5e1742512e6e5301eede221f9e9d924 100644 (file)
@@ -55,7 +55,7 @@ Popup::Popup(PopupManager &parent)
 Popup::~Popup()
 {
     MSG_LOG("Destructor");
-    if(m_pShowIdler)
+    if (m_pShowIdler)
     {
         ecore_idler_del(m_pShowIdler);
         m_pShowIdler = nullptr;
@@ -80,7 +80,7 @@ void Popup::create(Evas_Object *parent)
 
 void Popup::destroy()
 {
-    if(m_pManager)
+    if (m_pManager)
         m_pManager->reset();
     else
         View::destroy();
@@ -151,7 +151,7 @@ Evas_Object *Popup::addButton(const TText &text, int buttonId, PopupButtonCb but
     elm_object_style_set(btn, buttonStyle);
     View::setContent(btn, ss.str().c_str());
 
-    if(elm_object_part_content_get(getEo(), ss.str().c_str()))
+    if (elm_object_part_content_get(getEo(), ss.str().c_str()))
     {
         ++m_CurrentButtonIndex;
         evas_object_show(btn);
@@ -160,9 +160,7 @@ Evas_Object *Popup::addButton(const TText &text, int buttonId, PopupButtonCb but
         evas_object_data_set(btn, buttonCbDataKey, userData);
         evas_object_smart_callback_add(btn, "clicked", on_button_clicked, this);
         setText(btn, text);
-    }
-    else
-    {
+    } else {
         MSG_LOG_ERROR("Can't set content to part: ", ss.str());
         evas_object_del(btn);
         btn = nullptr;
@@ -193,13 +191,11 @@ void Popup::setTitle(const TText &title)
 
 void Popup::show(bool deferred)
 {
-    if(!deferred)
+    if (!deferred)
     {
         View::show();
-    }
-    else
-    {
-        if(!m_pShowIdler)
+    } else {
+        if (!m_pShowIdler)
         {
             m_pShowIdler = ecore_idler_add
             (
@@ -210,8 +206,7 @@ void Popup::show(bool deferred)
                     self->View::show();
                     return false; // Delete idler
                 },
-                this
-            );
+                this);
         }
     }
 }
@@ -219,7 +214,7 @@ void Popup::show(bool deferred)
 void Popup::on_button_clicked(void *data, Evas_Object *obj, void *event_info)
 {
     PopupButtonCb cb = (PopupButtonCb)evas_object_data_get(obj, buttonCbKey);
-    if(cb)
+    if (cb)
     {
         void *userData = evas_object_data_get(obj, buttonCbDataKey);
         auto *popup = static_cast<Popup*>(data);
@@ -231,7 +226,7 @@ void Popup::on_button_clicked(void *data, Evas_Object *obj, void *event_info)
 void Popup::on_popup_block_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
     auto *popup = static_cast<Popup*>(data);
-    if(popup->m_OutsideTapDismiss)
+    if (popup->m_OutsideTapDismiss)
         popup->destroy();
 }
 
index 556a3559c9a153a86b1c041acec2821cb5a7283c..9e9d0b5c615817c15d3e616018ff20986bf1a0a3 100644 (file)
@@ -51,7 +51,7 @@ PopupTextListItem::~PopupTextListItem()
 
 std::string PopupTextListItem::getText(ListItem &item, const char *part)
 {
-    if(strcmp(part, "elm.text") == 0)
+    if (strcmp(part, "elm.text") == 0)
         return m_Text;
     return std::string();
 }
@@ -73,7 +73,7 @@ const char *PopupCheckListItem::getCheckPart(ListItem &item)
 
 std::string PopupCheckListItem::getText(ListItem &item, const char *part)
 {
-    if(strcmp(part, "elm.text") == 0)
+    if (strcmp(part, "elm.text") == 0)
         return m_Text;
     return std::string();
 }
index c57b4962d2269a53155e91fb372e494725e8a362..0036b513c8655b66f3c9aa088f918ae9e770c19c 100644 (file)
@@ -40,9 +40,9 @@ PopupManager::~PopupManager()
 
 void PopupManager::reset(void *popupOwner)
 {
-    if(!popupOwner || (popupOwner == m_pPopupOwner))
+    if (!popupOwner || (popupOwner == m_pPopupOwner))
     {
-        if(m_pPopup)
+        if (m_pPopup)
         {
             m_pPopup->View::destroy();
             m_pPopup = nullptr;
@@ -54,7 +54,7 @@ void PopupManager::reset(void *popupOwner)
 void PopupManager::reset(Popup &popup, void *newOwner)
 {
     m_pPopupOwner = newOwner;
-    if(&popup != m_pPopup)
+    if (&popup != m_pPopup)
     {
         reset();
         eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, SMART_CALLBACK(PopupManager, onHwBackButtonPopupClicked), this);
index a1332ad843e70dfef463354b067a87d98442fdd4..448e8fa24eb89a9248d0b2f39e2ef77539544d27 100644 (file)
@@ -44,7 +44,7 @@ const char *SelectAllListItem::getCheckPart(ListItem &item)
 
 std::string SelectAllListItem::getText(ListItem &item, const char *part)
 {
-    if(strcmp(part, textPart) == 0)
+    if (strcmp(part, textPart) == 0)
     {
         return msg("IDS_MSG_MBODY_SELECT_ALL");
     }
index 0dfa475d7e884a7d0c04d7fadeba4ca95ea041a1..7ccdfd8b791b2e29dc86f2c8cd70b93d0b1fc8f3 100644 (file)
@@ -53,12 +53,10 @@ Evas_Object_Event_Cb View::getCb(Evas_Callback_Type type)
 void View::setEventCb(Evas_Callback_Type type)
 {
     Evas_Object_Event_Cb cb = getCb(type);
-    if(cb)
+    if (cb)
     {
         evas_object_event_callback_add(m_pEo, type, cb, this);
-    }
-    else
-    {
+    } else {
         MSG_LOG_ERROR("Not implemented");
         assert(false);
     }
@@ -66,14 +64,14 @@ void View::setEventCb(Evas_Callback_Type type)
 
 void View::setEo(Evas_Object *eo)
 {
-    if(m_pEo)
+    if (m_pEo)
     {
         MSG_LOG_ERROR("m_pEo not null");
         assert(false);
     }
 
     m_pEo = eo;
-    if(eo)
+    if (eo)
     {
         setData(this);
         setEventCb(EVAS_CALLBACK_FREE);
@@ -84,12 +82,10 @@ void View::setEo(Evas_Object *eo)
 void View::unsetEventCb(Evas_Callback_Type type)
 {
     Evas_Object_Event_Cb cb = getCb(type);
-    if(cb)
+    if (cb)
     {
         evas_object_event_callback_del(m_pEo, type, cb);
-    }
-    else
-    {
+    } else {
         MSG_LOG_ERROR("Not implemented");
         assert(false);
     }
@@ -105,14 +101,14 @@ Evas_Object *View::setContent(Evas_Object *content, const char *part, bool saveO
 void View::on_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
     View *view = static_cast<View*>(data);
-    if(view)
+    if (view)
         view->onViewDestroyed();
 }
 
 void View::on_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
     View *view = static_cast<View*>(data);
-    if(view)
+    if (view)
         view->onBeforeDelete(*view);
 }
 
@@ -136,7 +132,7 @@ void View::processSignal(Evas_Object *obj)
 void View::emitSignal(Evas_Object *obj, const char *emission, const char *source, bool async)
 {
     elm_object_signal_emit(obj, emission, source);
-    if(!async)
+    if (!async)
         processSignal(obj);
 }
 
@@ -160,12 +156,12 @@ void *View::getData(Evas_Object *obj)
 
 std::string Msg::markupToUtf8(const char *str)
 {
-    if(!str)
+    if (!str)
         return std::string();
 
     std::string res;
     char *markup = elm_entry_markup_to_utf8(str);
-    if(markup)
+    if (markup)
     {
         res = markup;
         free(markup);
@@ -176,12 +172,12 @@ std::string Msg::markupToUtf8(const char *str)
 
 std::string Msg::utf8ToMarkup(const char *str)
 {
-    if(!str)
+    if (!str)
         return std::string();
 
     std::string res;
     char *markup = elm_entry_utf8_to_markup(str);
-    if(markup)
+    if (markup)
     {
         res = markup;
         free(markup);