From 206465494078bb78a5b39b0593b84e8bb55c440c Mon Sep 17 00:00:00 2001 From: Andrey Klimenko Date: Tue, 22 Nov 2016 11:53:40 +0200 Subject: [PATCH] Codestyle Change-Id: Ic399359ca43e61c1913cc95dfde5ecbec34592e4 Signed-off-by: Andrey Klimenko --- src/MainApp/MainApp.cpp | 26 +++++++++++--------------- test/TC/TestMsgUtils.cpp | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/MainApp/MainApp.cpp b/src/MainApp/MainApp.cpp index c0e60e87..b316b49f 100644 --- a/src/MainApp/MainApp.cpp +++ b/src/MainApp/MainApp.cpp @@ -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(cmd)); break; case AppControlCommand::OpComposeFamily: - if(m_pRootController) + if (m_pRootController) m_pRootController->execCmd(std::static_pointer_cast(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 { diff --git a/test/TC/TestMsgUtils.cpp b/test/TC/TestMsgUtils.cpp index b374b278..0e7d2ee7 100644 --- a/test/TC/TestMsgUtils.cpp +++ b/test/TC/TestMsgUtils.cpp @@ -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); -- 2.34.1