diff --git a/juci/CMakeLists.txt b/juci/CMakeLists.txt index bffb5f8..d4f326d 100644 --- a/juci/CMakeLists.txt +++ b/juci/CMakeLists.txt @@ -127,8 +127,8 @@ link_directories( ${LIBCLANG_LIBRARY_DIRS} ) #module: -#set_target_properties(${module} PROPERTIES PREFIX "" -# LIBRARY_OUTPUT_DIRECTORY "/usr/lib/python2.7/dist-packages/") +set_target_properties(${module} PROPERTIES PREFIX "" + LIBRARY_OUTPUT_DIRECTORY "/usr/lib/python2.7/dist-packages/") target_link_libraries(${module} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES}) #executable: target_link_libraries(${project_name} ${LIVCLANG_LIBRARIES} ${LCL_LIBRARIES} ${GTKMM_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) diff --git a/juci/source.cc b/juci/source.cc index 670a647..95307e2 100644 --- a/juci/source.cc +++ b/juci/source.cc @@ -38,9 +38,9 @@ void Source::View::ApplyConfig(const Source::Config &config) { } } -void Source::View::OnOpenFile(std::vector &locations, +void Source::View::OnOpenFile(std::vector &locations, const Source::Config &config) { - ApplyConfig(config); + /* ApplyConfig(config); Glib::RefPtr buffer = get_buffer(); for (auto &loc : locations) { string type = std::to_string(loc.kind()); @@ -71,6 +71,7 @@ void Source::View::OnOpenFile(std::vector &locations, begin_iter, end_iter); } } + */ } @@ -194,10 +195,7 @@ void Source::Controller::OnOpenFile(const string &filepath) { arguments.emplace_back(lol[a].c_str()); } } - boost::timer::auto_cpu_timer timer; clang::TranslationUnit tu(true, filepath, arguments); - timer.~auto_cpu_timer(); - boost::timer::auto_cpu_timer timer2; clang::SourceLocation start(&tu, filepath, start_offset); clang::SourceLocation end(&tu, filepath, end_offset); clang::SourceRange range(&start, &end); @@ -211,7 +209,6 @@ void Source::Controller::OnOpenFile(const string &filepath) { loc.get_location_info(NULL, &line, &column, NULL); } - timer2.~auto_cpu_timer(); // std::cout << t.elapsed().user << std::endl; // model().SetSourceLocations(tu.getSourceLocations()); // view().OnOpenFile(model().getSourceLocations(), model().theme()); diff --git a/juci/source.h b/juci/source.h index 2457556..9b5406d 100644 --- a/juci/source.h +++ b/juci/source.h @@ -52,7 +52,7 @@ namespace Source { View(); string UpdateLine(); void ApplyConfig(const Config &config); - void OnOpenFile(std::vector &locations, + void OnOpenFile(std::vector &locations, const Config &config); private: string GetLine(const Gtk::TextIter &begin); @@ -65,8 +65,8 @@ namespace Source { Config& config(); const string filepath(); void SetFilePath(const string &filepath); - void SetSourceLocations( const std::vector &locations); - std::vector& getSourceLocations() { + void SetSourceLocations( const std::vector &locations); + std::vector& getSourceLocations() { return locations_; }