ui: prefill headers from compilation database
dialog for selecting header paths from compilation database
This commit is contained in:
@@ -332,6 +332,7 @@ add_files(
|
||||
utility/AppPath.cpp
|
||||
utility/AppPath.h
|
||||
utility/Cache.h
|
||||
utility/CompilationDatabase.h
|
||||
utility/ConfigManager.cpp
|
||||
utility/ConfigManager.h
|
||||
utility/Property.h
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef UTILITY_COMPLIATION_DATABASE_H
|
||||
#define UTILITY_COMPLIATION_DATABASE_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "utility/file/FilePath.h"
|
||||
|
||||
namespace utility
|
||||
{
|
||||
class CompilationDatabase
|
||||
{
|
||||
public:
|
||||
CompilationDatabase(std::string filename);
|
||||
|
||||
std::vector<FilePath> getAllHeaderPaths();
|
||||
std::vector<FilePath> getHeaderPaths();
|
||||
std::vector<FilePath> getSystemHeaderPaths();
|
||||
std::vector<FilePath> getFrameworkHeaderPaths();
|
||||
|
||||
private:
|
||||
std::string m_filename;
|
||||
std::vector<FilePath> m_headers;
|
||||
std::vector<FilePath> m_systemHeaders;
|
||||
std::vector<FilePath> m_frameworkHeaders;
|
||||
|
||||
void getHeaders();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // UTILITY_COMPLIATION_DATABASE_H
|
||||
@@ -32,6 +32,13 @@ FilePath::FilePath(const boost::filesystem::path& filePath)
|
||||
{
|
||||
}
|
||||
|
||||
FilePath::FilePath(const std::string& filePath, const std::string& base)
|
||||
: m_path(boost::filesystem::absolute(filePath, base))
|
||||
, m_exists(false)
|
||||
, m_checkedExists(false)
|
||||
{
|
||||
}
|
||||
|
||||
boost::filesystem::path FilePath::path() const
|
||||
{
|
||||
return m_path;
|
||||
|
||||
@@ -12,6 +12,7 @@ public:
|
||||
FilePath(const char* filePath);
|
||||
FilePath(const std::string& filePath);
|
||||
FilePath(const boost::filesystem::path& filePath);
|
||||
FilePath(const std::string& filePath, const std::string& base);
|
||||
|
||||
boost::filesystem::path path() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user