Codestyle 55/99355/1
authorAndrey Klimenko <and.klimenko@samsung.com>
Tue, 22 Nov 2016 09:53:40 +0000 (11:53 +0200)
committerAndrey Klimenko <and.klimenko@samsung.com>
Tue, 22 Nov 2016 12:20:37 +0000 (14:20 +0200)
Change-Id: Ic399359ca43e61c1913cc95dfde5ecbec34592e4
Signed-off-by: Andrey Klimenko <and.klimenko@samsung.com>
src/MainApp/MainApp.cpp
test/TC/TestMsgUtils.cpp

index c0e60e8719632c6196135a46c0f9aa5e7702dee4..b316b49f080fb55eb6fc722f6e84285b494119bb 100644 (file)
@@ -37,12 +37,10 @@ MainApp::MainApp()
     , m_pRootController(nullptr)
     , m_NeedToCloseApp(false)
 {
-
 }
 
 MainApp::~MainApp()
 {
-
 }
 
 int MainApp::start(int argc, char *argv[])
@@ -97,13 +95,11 @@ const Window &MainApp::getWindow() const
 
 void MainApp::terminate()
 {
-    if(m_NeedToCloseApp)
+    if (m_NeedToCloseApp)
     {
         // Close app completely
         ui_app_exit();
-    }
-    else if(m_pWindow)
-    {
+    } else if (m_pWindow) {
         // Minimize window:
         m_pWindow->lower();
     }
@@ -115,7 +111,7 @@ bool MainApp::onAppCreate()
     bool res = false;
 
     std::string localePath(PathUtils::getLocalePath());
-    if(!localePath.empty())
+    if (!localePath.empty())
         bindtextdomain(PROJECT_NAME, localePath.c_str());
 
     elm_app_base_scale_set(2.6);
@@ -156,21 +152,21 @@ void MainApp::onAppControl(app_control_h app_control)
 {
     TRACE;
     AppControlCommandRef cmd = AppControlParser::parse(app_control);
-    if(!cmd)
+    if (!cmd)
         return;
 
     app_control_launch_mode_e mode = APP_CONTROL_LAUNCH_MODE_SINGLE;
     app_control_get_launch_mode(app_control, &mode);
     m_NeedToCloseApp = (mode == APP_CONTROL_LAUNCH_MODE_GROUP);
 
-    switch(cmd->getOperationType())
+    switch (cmd->getOperationType())
     {
         case AppControlCommand::OpDefault:
-            if(m_pRootController)
+            if (m_pRootController)
                 m_pRootController->execCmd(std::static_pointer_cast<AppControlDefault>(cmd));
             break;
         case AppControlCommand::OpComposeFamily:
-            if(m_pRootController)
+            if (m_pRootController)
                 m_pRootController->execCmd(std::static_pointer_cast<AppControlCompose>(cmd));
             break;
         case AppControlCommand::OpUnknown:
@@ -190,16 +186,16 @@ void MainApp::updateCharacterOrientation()
 {
     char *lang = nullptr;
     system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &lang);
-    if(lang)
+    if (lang)
     {
         MSG_LOG("Language: ", lang);
         elm_language_set(lang);
         i18n_ulocale_layout_type_e layout = I18N_ULOCALE_LAYOUT_UNKNOWN;
-        if(i18n_ulocale_get_character_orientation(lang, &layout) == I18N_ERROR_NONE)
+        if (i18n_ulocale_get_character_orientation(lang, &layout) == I18N_ERROR_NONE)
         {
-            if(layout == I18N_ULOCALE_LAYOUT_LTR)
+            if (layout == I18N_ULOCALE_LAYOUT_LTR)
                 elm_config_mirrored_set(false);
-            else if(layout == I18N_ULOCALE_LAYOUT_RTL)
+            else if (layout == I18N_ULOCALE_LAYOUT_RTL)
                 elm_config_mirrored_set(true);
             else
             {
index b374b2781169a27bed1f55c8211b8b2e60802389..0e7d2ee72ce471c041f49bcccac6547806ef6fe9 100644 (file)
@@ -104,7 +104,7 @@ TEST(TestMsgUtils, tokenizeRecipients)
     ASSERT_EQ(expectedResult.validResults, actualResult.validResults);
     ASSERT_EQ(expectedResult.invalidResult, actualResult.invalidResult);
 
-    expectedResult = {{{"6238", Msg::MsgAddress::Phone}, {"abc.\"dc,d;\"@mail.com", Msg::MsgAddress::Email},{"+380777777", Msg::MsgAddress::Phone}}, ""};
+    expectedResult = {{{"6238", Msg::MsgAddress::Phone}, {"abc.\"dc,d;\"@mail.com", Msg::MsgAddress::Email}, {"+380777777", Msg::MsgAddress::Phone}}, ""};
     actualResult = Msg::MsgUtils::tokenizeRecipients(",,,6238;abc.\"dc,d;\"@mail.com,+380777777");
     ASSERT_EQ(expectedResult.validResults, actualResult.validResults);
     ASSERT_EQ(expectedResult.invalidResult, actualResult.invalidResult);