ui: Separated QtCodeSnippet and added QtCodeFile to display filename

This commit is contained in:
Eberhard Graether
2014-07-04 10:13:41 +02:00
parent 042a508422
commit 9297ea6d6d
9 changed files with 114 additions and 10 deletions
+4
View File
@@ -44,3 +44,7 @@ bool FileSystem::exists(const std::string& path)
return boost::filesystem::exists(boost::filesystem::path(path));
}
std::string FileSystem::fileName(const std::string& path)
{
return boost::filesystem::path(path).filename().generic_string();
}
+2
View File
@@ -11,6 +11,8 @@ public:
const std::string& path, const std::vector<std::string>& extensions
);
static bool exists(const std::string& path);
static std::string fileName(const std::string& path);
private:
static bool isValidExtension(const std::string& filepath, const std::vector<std::string>& extensions);
};