diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-07-21 19:06:12 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-07-21 19:06:12 +0300 |
commit | cebd0347a02844b1f3b3f496e4722b30a9393d47 (patch) | |
tree | b259b96734fa57053386e3c7fbb4f286edaac1bf /vcl/source/app | |
parent | 8e71604ebde7092dc026521fc5a414686777cb38 (diff) |
Our log area checking Clang plugin requires it to be a string literal
And even if that wasn't a problem, we don't use a macro for the log area
anywhere else in the codebase, so why suddenly introduce such a convention
here? What's the gain from that? On the contrary, haven't we been *reducing*
the amount of pointless #define FOO "foo" style stuff?
Change-Id: I1247dc499136cdf3ae1921e6ffe7c7f63d57cfc1
Diffstat (limited to 'vcl/source/app')
-rw-r--r-- | vcl/source/app/IconThemeScanner.cxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/vcl/source/app/IconThemeScanner.cxx b/vcl/source/app/IconThemeScanner.cxx index 29d3cd7d8ff9..4599260222da 100644 --- a/vcl/source/app/IconThemeScanner.cxx +++ b/vcl/source/app/IconThemeScanner.cxx @@ -21,20 +21,18 @@ namespace vcl { namespace { -const char *LOG_AREA = "vcl.app"; - // set the status of a file. Returns false if the status could not be determined. bool set_file_status(osl::FileStatus& status, const OUString& file) { osl::DirectoryItem dirItem; osl::FileBase::RC retvalGet = osl::DirectoryItem::get(file, dirItem); if (retvalGet != osl::FileBase::E_None) { - SAL_WARN(LOG_AREA, "Could not determine status for file '" << file << "'."); + SAL_WARN("vcl.app", "Could not determine status for file '" << file << "'."); return false; } osl::FileBase::RC retvalStatus = dirItem.getFileStatus(status); if (retvalStatus != osl::FileBase::E_None) { - SAL_WARN(LOG_AREA, "Could not determine status for file '" << file << "'."); + SAL_WARN("vcl.app", "Could not determine status for file '" << file << "'."); return false; } return true; @@ -45,7 +43,7 @@ OUString convert_to_absolute_path(const OUString& path) salhelper::LinkResolver resolver(0); osl::FileBase::RC rc = resolver.fetchFileStatus(path); if (rc != osl::FileBase::E_None) { - SAL_WARN(LOG_AREA, "Could not resolve path '" << path << "' to search for icon themes."); + SAL_WARN("vcl.app", "Could not resolve path '" << path << "' to search for icon themes."); throw std::runtime_error("Provided a recursive symlink to a icon theme directory that could not be resolved."); } return resolver.m_aStatus.getFileURL(); @@ -66,13 +64,13 @@ IconThemeScanner::ScanDirectoryForIconThemes(const OUString& path) } if (!fileStatus.isDirectory()) { - SAL_INFO(LOG_AREA, "Cannot search for icon themes in '"<< path << "'. It is not a directory."); + SAL_INFO("vcl.app", "Cannot search for icon themes in '"<< path << "'. It is not a directory."); return false; } std::vector<OUString> iconThemePaths = ReadIconThemesFromPath(path); if (iconThemePaths.empty()) { - SAL_WARN(LOG_AREA, "Could not find any icon themes in the provided directory ('" <<path<<"'."); + SAL_WARN("vcl.app", "Could not find any icon themes in the provided directory ('" <<path<<"'."); return false; } mFoundIconThemes.clear(); @@ -89,10 +87,10 @@ IconThemeScanner::AddIconThemeByPath(const OUString &url) if (!IconThemeInfo::UrlCanBeParsed(url)) { return false; } - SAL_INFO(LOG_AREA, "Found a file that seems to be an icon theme: '" << url << "'" ); + SAL_INFO("vcl.app", "Found a file that seems to be an icon theme: '" << url << "'" ); IconThemeInfo newTheme(url); mFoundIconThemes.push_back(newTheme); - SAL_INFO(LOG_AREA, "Adding the file as '" << newTheme.GetDisplayName() << + SAL_INFO("vcl.app", "Adding the file as '" << newTheme.GetDisplayName() << "' with id '" << newTheme.GetThemeId() << "'."); return true; } @@ -101,7 +99,7 @@ IconThemeScanner::AddIconThemeByPath(const OUString &url) IconThemeScanner::ReadIconThemesFromPath(const OUString& dir) { std::vector<OUString> found; - SAL_INFO(LOG_AREA, "Scanning directory '" << dir << " for icon themes."); + SAL_INFO("vcl.app", "Scanning directory '" << dir << " for icon themes."); osl::Directory dirToScan(dir); osl::FileBase::RC retvalOpen = dirToScan.open(); @@ -131,7 +129,7 @@ IconThemeScanner::FileIsValidIconTheme(const OUString& filename) { // check whether we can construct a IconThemeInfo from it if (!IconThemeInfo::UrlCanBeParsed(filename)) { - SAL_INFO(LOG_AREA, "File '" << filename << "' does not seem to be an icon theme."); + SAL_INFO("vcl.app", "File '" << filename << "' does not seem to be an icon theme."); return false; } @@ -194,7 +192,7 @@ IconThemeScanner::GetIconThemeInfo(const OUString& themeId) std::vector<IconThemeInfo>::iterator info = std::find_if(mFoundIconThemes.begin(), mFoundIconThemes.end(), SameTheme(themeId)); if (info == mFoundIconThemes.end()) { - SAL_WARN(LOG_AREA, "Requested information for icon theme with id '" << themeId + SAL_WARN("vcl.app", "Requested information for icon theme with id '" << themeId << "' which does not exist."); throw std::runtime_error("Requested information on not-installed icon theme"); } |