From: Sangyoon Jang Date: Tue, 27 Dec 2016 07:48:27 +0000 (+0900) Subject: Fix code style X-Git-Tag: accepted/tizen/3.0.m2/mobile/20170104.122116^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_3.0.m2_mobile;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Fix code style Remove errors/warnings from tools/check-coding-styles. Change-Id: Idd2a1faca15b8ac48049c20ebfe758a4917f152f Signed-off-by: Sangyoon Jang --- diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 0eebf85..73f212f 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "hybrid/hybrid_installer.h" -#include "hybrid/shared_dirs.h" #include #include @@ -76,6 +75,7 @@ #include #include "hybrid/hybrid_backend_data.h" +#include "hybrid/shared_dirs.h" #include "hybrid/step/configuration/step_merge_tpk_config.h" #include "hybrid/step/configuration/step_merge_tpk_privileges.h" #include "hybrid/step/configuration/step_stash_tpk_config.h" diff --git a/src/lib/wgt_archive_info.cc b/src/lib/wgt_archive_info.cc index bcaa43b..aeed341 100644 --- a/src/lib/wgt_archive_info.cc +++ b/src/lib/wgt_archive_info.cc @@ -38,7 +38,7 @@ bool ExtractPackageArchive(const char* file_path, const bf::path& tmp_dir) { return true; } -bool GetPackageInfo(wgt::parse::WidgetConfigParser& parser, +bool GetPackageInfo(const wgt::parse::WidgetConfigParser& parser, package_manager_pkg_detail_info_t* info) { auto widget_info = std::static_pointer_cast( @@ -66,7 +66,7 @@ bool GetPackageInfo(wgt::parse::WidgetConfigParser& parser, return true; } -bool GetPrivilegesInfo(wgt::parse::WidgetConfigParser& parser, +bool GetPrivilegesInfo(const wgt::parse::WidgetConfigParser& parser, package_manager_pkg_detail_info_t* info) { auto privileges_info = std::static_pointer_cast( @@ -83,8 +83,8 @@ bool GetPrivilegesInfo(wgt::parse::WidgetConfigParser& parser, return true; } -bool GetLabelInfo(wgt::parse::WidgetConfigParser& parser, const char* locale, - package_manager_pkg_detail_info_t* info) { +bool GetLabelInfo(const wgt::parse::WidgetConfigParser& parser, + const char* locale, package_manager_pkg_detail_info_t* info) { auto widget_info = std::static_pointer_cast( parser.GetManifestData(wgt::parse::WidgetInfo::Key())); @@ -106,7 +106,7 @@ bool GetLabelInfo(wgt::parse::WidgetConfigParser& parser, const char* locale, return false; } -bool GetDescriptionInfo(wgt::parse::WidgetConfigParser& parser, +bool GetDescriptionInfo(const wgt::parse::WidgetConfigParser& parser, const char* locale, package_manager_pkg_detail_info_t* info) { auto widget_info = std::static_pointer_cast( @@ -161,8 +161,8 @@ bool ReadIcon(const bf::path& icon, const bf::path& tmp_dir, return true; } -bool GetIconInfo(wgt::parse::WidgetConfigParser& parser, - bf::path& tmp_dir, package_manager_pkg_detail_info_t* info) { +bool GetIconInfo(const wgt::parse::WidgetConfigParser& parser, + const bf::path& tmp_dir, package_manager_pkg_detail_info_t* info) { auto icons_info = std::static_pointer_cast( parser.GetManifestData(wgt::parse::ApplicationIconsInfo::Key())); diff --git a/src/lib/wgt_archive_info.h b/src/lib/wgt_archive_info.h index 3882f78..e2bf8d1 100644 --- a/src/lib/wgt_archive_info.h +++ b/src/lib/wgt_archive_info.h @@ -20,4 +20,4 @@ class WgtArchiveInfo : public common_installer::Singleton { SCOPE_LOG_TAG(WgtArchiveInfo) }; -#endif // LIB_WGT_ARCHIVE_INFO +#endif // LIB_WGT_ARCHIVE_INFO_H_ diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc index f86a813..2d14a1f 100644 --- a/src/unit_tests/smoke_test.cc +++ b/src/unit_tests/smoke_test.cc @@ -592,8 +592,10 @@ TEST_F(SmokeTest, RDSMode) { ValidatePackage(pkgid, {appid}); // Check delta modifications - ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / "res" / "wgt" / "DELETED")); - ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / "res" / "wgt" / "ADDED")); + ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / + "res" / "wgt" / "DELETED")); + ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / + "res" / "wgt" / "ADDED")); ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED", "2\n")); } @@ -635,16 +637,17 @@ TEST_F(SmokeTest, DeltaMode) { // Check delta modifications ASSERT_FALSE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / - "res" / "wgt" / "DELETED")); + "res" / "wgt" / "DELETED")); ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / - "res" / "wgt" / "ADDED")); + "res" / "wgt" / "ADDED")); ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / - "res" / "wgt" / "css" / "style.css")); // NOLINT + "res" / "wgt" / "css" / "style.css")); ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / - "res" / "wgt" / "images" / "tizen_32.png")); // NOLINT + "res" / "wgt" / "images" / "tizen_32.png")); ASSERT_TRUE(bf::exists(GetPackageRoot(pkgid, kTestUserId) / - "res" / "wgt" / "js" / "main.js")); // NOLINT - ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED", "version 2\n")); // NOLINT + "res" / "wgt" / "js" / "main.js")); + ASSERT_TRUE(ValidateFileContentInPackage( + pkgid, "res/wgt/MODIFIED", "version 2\n")); } TEST_F(SmokeTest, RecoveryMode_ForInstallation) { diff --git a/src/wgt/shared_dirs.h b/src/wgt/shared_dirs.h index 2b75e91..61bb319 100644 --- a/src/wgt/shared_dirs.h +++ b/src/wgt/shared_dirs.h @@ -2,8 +2,8 @@ // Use of this source code is governed by an apache-2.0 license that can be // found in the LICENSE file. -#ifndef HYBRID_SHARED_DIRS_H_ -#define HYBRID_SHARED_DIRS_H_ +#ifndef WGT_SHARED_DIRS_H_ +#define WGT_SHARED_DIRS_H_ #include @@ -17,4 +17,4 @@ const std::vector WgtAdditionalSharedDirs = { } // namespace filesystem } // namespace wgt -#endif // HYBRID_SHARED_DIRS_H_ +#endif // WGT_SHARED_DIRS_H_ diff --git a/src/wgt/wgt_app_query_interface.h b/src/wgt/wgt_app_query_interface.h index b8ed790..3610da9 100644 --- a/src/wgt/wgt_app_query_interface.h +++ b/src/wgt/wgt_app_query_interface.h @@ -5,12 +5,12 @@ #ifndef WGT_WGT_APP_QUERY_INTERFACE_H_ #define WGT_WGT_APP_QUERY_INTERFACE_H_ +#include + #include #include -#include - namespace wgt { /** diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index b1dcd43..e90da5c 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "wgt/wgt_installer.h" -#include "wgt/shared_dirs.h" #include @@ -78,6 +77,7 @@ #include +#include "wgt/shared_dirs.h" #include "wgt/step/configuration/step_check_rds_manifest.h" #include "wgt/step/configuration/step_check_start_files.h" #include "wgt/step/configuration/step_parse.h"