From 480430ed16d2494637e40626016c11b0d57826bd Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 31 May 2020 18:40:45 +0200 Subject: [PATCH] Renamed C++ header and source files to use proper C++ file extensions. --- src/CMakeLists.txt | 72 +++++++++---------- src/{autocomplete.cc => autocomplete.cpp} | 4 +- src/{autocomplete.h => autocomplete.hpp} | 6 +- src/{cmake.cc => cmake.cpp} | 12 ++-- src/{cmake.h => cmake.hpp} | 0 ...mpile_commands.cc => compile_commands.cpp} | 6 +- ...ompile_commands.h => compile_commands.hpp} | 0 src/{config.cc => config.cpp} | 8 +-- src/{config.h => config.hpp} | 2 +- src/{ctags.cc => ctags.cpp} | 10 +-- src/{ctags.h => ctags.hpp} | 0 src/{debug_lldb.cc => debug_lldb.cpp} | 8 +-- src/{debug_lldb.h => debug_lldb.hpp} | 2 +- src/{dialogs.cc => dialogs.cpp} | 2 +- src/{dialogs.h => dialogs.hpp} | 0 src/{dialogs_unix.cc => dialogs_unix.cpp} | 2 +- src/{dialogs_win.cc => dialogs_win.cpp} | 6 +- src/{directories.cc => directories.cpp} | 14 ++-- src/{directories.h => directories.hpp} | 4 +- src/{dispatcher.cc => dispatcher.cpp} | 2 +- src/{dispatcher.h => dispatcher.hpp} | 2 +- src/{documentation.cc => documentation.cpp} | 2 +- src/{documentation.h => documentation.hpp} | 0 src/{entrybox.cc => entrybox.cpp} | 2 +- src/{entrybox.h => entrybox.hpp} | 2 +- src/{files.h => files.hpp} | 0 src/{filesystem.cc => filesystem.cpp} | 2 +- src/{filesystem.h => filesystem.hpp} | 0 src/{git.cc => git.cpp} | 2 +- src/{git.h => git.hpp} | 2 +- src/{grep.cc => grep.cpp} | 10 +-- src/{grep.h => grep.hpp} | 0 src/{info.cc => info.cpp} | 2 +- src/{info.h => info.hpp} | 0 src/{juci.cc => juci.cpp} | 20 +++--- src/{juci.h => juci.hpp} | 0 src/{menu.cc => menu.cpp} | 4 +- src/{menu.h => menu.hpp} | 0 src/{meson.cc => meson.cpp} | 12 ++-- src/{meson.h => meson.hpp} | 0 src/{mutex.h => mutex.hpp} | 0 src/{notebook.cc => notebook.cpp} | 18 ++--- src/{notebook.h => notebook.hpp} | 4 +- src/{project.cc => project.cpp} | 32 ++++----- src/{project.h => project.hpp} | 6 +- src/{project_build.cc => project_build.cpp} | 6 +- src/{project_build.h => project_build.hpp} | 4 +- ...lection_dialog.cc => selection_dialog.cpp} | 2 +- ...election_dialog.h => selection_dialog.hpp} | 2 +- src/{snippets.cc => snippets.cpp} | 8 +-- src/{snippets.h => snippets.hpp} | 0 src/{source.cc => source.cpp} | 22 +++--- src/{source.h => source.hpp} | 6 +- src/{source_base.cc => source_base.cpp} | 16 ++--- src/{source_base.h => source_base.hpp} | 4 +- src/{source_clang.cc => source_clang.cpp} | 26 +++---- src/{source_clang.h => source_clang.hpp} | 10 +-- src/{source_diff.cc => source_diff.cpp} | 10 +-- src/{source_diff.h => source_diff.hpp} | 8 +-- src/{source_generic.cc => source_generic.cpp} | 12 ++-- src/{source_generic.h => source_generic.hpp} | 6 +- ...otocol.cc => source_language_protocol.cpp} | 20 +++--- ...rotocol.h => source_language_protocol.hpp} | 6 +- ...ce_spellcheck.cc => source_spellcheck.cpp} | 8 +-- ...rce_spellcheck.h => source_spellcheck.hpp} | 2 +- src/{terminal.cc => terminal.cpp} | 12 ++-- src/{terminal.h => terminal.hpp} | 8 +-- src/{tooltips.cc => tooltips.cpp} | 12 ++-- src/{tooltips.h => tooltips.hpp} | 2 +- src/{usages_clang.cc => usages_clang.cpp} | 12 ++-- src/{usages_clang.h => usages_clang.hpp} | 2 +- src/{utility.cc => utility.cpp} | 2 +- src/{utility.h => utility.hpp} | 0 src/{window.cc => window.cpp} | 30 ++++---- src/{window.h => window.hpp} | 2 +- src/{window_macos.h => window_macos.hpp} | 0 tests/CMakeLists.txt | 44 ++++++------ ...ake_build_test.cc => cmake_build_test.cpp} | 18 ++--- ...ands_test.cc => compile_commands_test.cpp} | 2 +- ...ctags_grep_test.cc => ctags_grep_test.cpp} | 40 +++++------ ...filesystem_test.cc => filesystem_test.cpp} | 2 +- tests/{git_test.cc => git_test.cpp} | 6 +- tests/{lldb_test.cc => lldb_test.cpp} | 2 +- ...son_build_test.cc => meson_build_test.cpp} | 4 +- tests/{process_test.cc => process_test.cpp} | 0 ...ce_clang_test.cc => source_clang_test.cpp} | 6 +- ...eneric_test.cc => source_generic_test.cpp} | 2 +- ...source_key_test.cc => source_key_test.cpp} | 4 +- tests/{source_test.cc => source_test.cpp} | 4 +- tests/stubs/config.cc | 3 - tests/stubs/config.cpp | 3 + tests/stubs/{dialogs.cc => dialogs.cpp} | 2 +- .../stubs/{directories.cc => directories.cpp} | 2 +- tests/stubs/{info.cc => info.cpp} | 2 +- tests/stubs/{notebook.cc => notebook.cpp} | 2 +- tests/stubs/{project.cc => project.cpp} | 2 +- ...lection_dialog.cc => selection_dialog.cpp} | 2 +- tests/{terminal_test.cc => terminal_test.cpp} | 2 +- tests/{tooltips_test.cc => tooltips_test.cpp} | 2 +- ...es_clang_test.cc => usages_clang_test.cpp} | 8 +-- 100 files changed, 353 insertions(+), 353 deletions(-) rename src/{autocomplete.cc => autocomplete.cpp} (98%) rename src/{autocomplete.h => autocomplete.hpp} (97%) rename src/{cmake.cc => cmake.cpp} (98%) rename src/{cmake.h => cmake.hpp} (100%) rename src/{compile_commands.cc => compile_commands.cpp} (99%) rename src/{compile_commands.h => compile_commands.hpp} (100%) rename src/{config.cc => config.cpp} (99%) rename src/{config.h => config.hpp} (99%) rename src/{ctags.cc => ctags.cpp} (98%) rename src/{ctags.h => ctags.hpp} (100%) rename src/{debug_lldb.cc => debug_lldb.cpp} (99%) rename src/{debug_lldb.h => debug_lldb.hpp} (99%) rename src/{dialogs.cc => dialogs.cpp} (99%) rename src/{dialogs.h => dialogs.hpp} (100%) rename src/{dialogs_unix.cc => dialogs_unix.cpp} (98%) rename src/{dialogs_win.cc => dialogs_win.cpp} (98%) rename src/{directories.cc => directories.cpp} (99%) rename src/{directories.h => directories.hpp} (98%) rename src/{dispatcher.cc => dispatcher.cpp} (96%) rename src/{dispatcher.h => dispatcher.hpp} (97%) rename src/{documentation.cc => documentation.cpp} (99%) rename src/{documentation.h => documentation.hpp} (100%) rename src/{entrybox.cc => entrybox.cpp} (99%) rename src/{entrybox.h => entrybox.hpp} (98%) rename src/{files.h => files.hpp} (100%) rename src/{filesystem.cc => filesystem.cpp} (99%) rename src/{filesystem.h => filesystem.hpp} (100%) rename src/{git.cc => git.cpp} (99%) rename src/{git.h => git.hpp} (99%) rename src/{grep.cc => grep.cpp} (97%) rename src/{grep.h => grep.hpp} (100%) rename src/{info.cc => info.cpp} (98%) rename src/{info.h => info.hpp} (100%) rename src/{juci.cc => juci.cpp} (94%) rename src/{juci.h => juci.hpp} (100%) rename src/{menu.cc => menu.cpp} (99%) rename src/{menu.h => menu.hpp} (100%) rename src/{meson.cc => meson.cpp} (96%) rename src/{meson.h => meson.hpp} (100%) rename src/{mutex.h => mutex.hpp} (100%) rename src/{notebook.cc => notebook.cpp} (98%) rename src/{notebook.h => notebook.hpp} (98%) rename src/{project.cc => project.cpp} (99%) rename src/{project.h => project.hpp} (98%) rename src/{project_build.cc => project_build.cpp} (98%) rename src/{project_build.h => project_build.hpp} (98%) rename src/{selection_dialog.cc => selection_dialog.cpp} (99%) rename src/{selection_dialog.h => selection_dialog.hpp} (99%) rename src/{snippets.cc => snippets.cpp} (94%) rename src/{snippets.h => snippets.hpp} (100%) rename src/{source.cc => source.cpp} (99%) rename src/{source.h => source.hpp} (98%) rename src/{source_base.cc => source_base.cpp} (99%) rename src/{source_base.h => source_base.hpp} (99%) rename src/{source_clang.cc => source_clang.cpp} (99%) rename src/{source_clang.h => source_clang.hpp} (97%) rename src/{source_diff.cc => source_diff.cpp} (99%) rename src/{source_diff.h => source_diff.hpp} (95%) rename src/{source_generic.cc => source_generic.cpp} (98%) rename src/{source_generic.h => source_generic.hpp} (93%) rename src/{source_language_protocol.cc => source_language_protocol.cpp} (99%) rename src/{source_language_protocol.h => source_language_protocol.hpp} (98%) rename src/{source_spellcheck.cc => source_spellcheck.cpp} (99%) rename src/{source_spellcheck.h => source_spellcheck.hpp} (98%) rename src/{terminal.cc => terminal.cpp} (99%) rename src/{terminal.h => terminal.hpp} (95%) rename src/{tooltips.cc => tooltips.cpp} (99%) rename src/{tooltips.h => tooltips.hpp} (99%) rename src/{usages_clang.cc => usages_clang.cpp} (99%) rename src/{usages_clang.h => usages_clang.hpp} (99%) rename src/{utility.cc => utility.cpp} (72%) rename src/{utility.h => utility.hpp} (100%) rename src/{window.cc => window.cpp} (99%) rename src/{window.h => window.hpp} (97%) rename src/{window_macos.h => window_macos.hpp} (100%) rename tests/{cmake_build_test.cc => cmake_build_test.cpp} (85%) rename tests/{compile_commands_test.cc => compile_commands_test.cpp} (98%) rename tests/{ctags_grep_test.cc => ctags_grep_test.cpp} (86%) rename tests/{filesystem_test.cc => filesystem_test.cpp} (99%) rename tests/{git_test.cc => git_test.cpp} (95%) rename tests/{lldb_test.cc => lldb_test.cpp} (99%) rename tests/{meson_build_test.cc => meson_build_test.cpp} (97%) rename tests/{process_test.cc => process_test.cpp} (100%) rename tests/{source_clang_test.cc => source_clang_test.cpp} (99%) rename tests/{source_generic_test.cc => source_generic_test.cpp} (99%) rename tests/{source_key_test.cc => source_key_test.cpp} (99%) rename tests/{source_test.cc => source_test.cpp} (99%) delete mode 100644 tests/stubs/config.cc create mode 100644 tests/stubs/config.cpp rename tests/stubs/{dialogs.cc => dialogs.cpp} (88%) rename tests/stubs/{directories.cc => directories.cpp} (90%) rename tests/stubs/{info.cc => info.cpp} (75%) rename tests/stubs/{notebook.cc => notebook.cpp} (90%) rename tests/stubs/{project.cc => project.cpp} (68%) rename tests/stubs/{selection_dialog.cc => selection_dialog.cpp} (97%) rename tests/{terminal_test.cc => terminal_test.cpp} (98%) rename tests/{tooltips_test.cc => tooltips_test.cpp} (99%) rename tests/{usages_clang_test.cc => usages_clang_test.cpp} (99%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 074255f..86eadb9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,32 +1,32 @@ # Files used both in ../src and ../tests set(JUCI_SHARED_FILES - autocomplete.cc - cmake.cc - compile_commands.cc - ctags.cc - dispatcher.cc - documentation.cc - filesystem.cc - git.cc - grep.cc - menu.cc - meson.cc - project_build.cc - snippets.cc - source.cc - source_base.cc - source_clang.cc - source_diff.cc - source_generic.cc - source_language_protocol.cc - source_spellcheck.cc - terminal.cc - tooltips.cc - usages_clang.cc - utility.cc + autocomplete.cpp + cmake.cpp + compile_commands.cpp + ctags.cpp + dispatcher.cpp + documentation.cpp + filesystem.cpp + git.cpp + grep.cpp + menu.cpp + meson.cpp + project_build.cpp + snippets.cpp + source.cpp + source_base.cpp + source_clang.cpp + source_diff.cpp + source_generic.cpp + source_language_protocol.cpp + source_spellcheck.cpp + terminal.cpp + tooltips.cpp + usages_clang.cpp + utility.cpp ) if(LIBLLDB_FOUND) - list(APPEND JUCI_SHARED_FILES debug_lldb.cc) + list(APPEND JUCI_SHARED_FILES debug_lldb.cpp) endif() add_library(juci_shared STATIC ${JUCI_SHARED_FILES}) target_link_libraries(juci_shared @@ -42,17 +42,17 @@ target_link_libraries(juci_shared ) set(JUCI_FILES - config.cc - dialogs.cc - dialogs_unix.cc - directories.cc - entrybox.cc - info.cc - juci.cc - notebook.cc - project.cc - selection_dialog.cc - window.cc + config.cpp + dialogs.cpp + dialogs_unix.cpp + directories.cpp + entrybox.cpp + info.cpp + juci.cpp + notebook.cpp + project.cpp + selection_dialog.cpp + window.cpp ) if(APPLE) list(APPEND JUCI_FILES window_macos.m) diff --git a/src/autocomplete.cc b/src/autocomplete.cpp similarity index 98% rename from src/autocomplete.cc rename to src/autocomplete.cpp index a55f97c..8e7cbfe 100644 --- a/src/autocomplete.cc +++ b/src/autocomplete.cpp @@ -1,5 +1,5 @@ -#include "autocomplete.h" -#include "selection_dialog.h" +#include "autocomplete.hpp" +#include "selection_dialog.hpp" Autocomplete::Autocomplete(Gtk::TextView *view, bool &interactive_completion, guint &last_keyval, bool pass_buffer_and_strip_word) : view(view), interactive_completion(interactive_completion), pass_buffer_and_strip_word(pass_buffer_and_strip_word) { diff --git a/src/autocomplete.h b/src/autocomplete.hpp similarity index 97% rename from src/autocomplete.h rename to src/autocomplete.hpp index 6a2f995..08a8552 100644 --- a/src/autocomplete.h +++ b/src/autocomplete.hpp @@ -1,7 +1,7 @@ #pragma once -#include "dispatcher.h" -#include "mutex.h" -#include "tooltips.h" +#include "dispatcher.hpp" +#include "mutex.hpp" +#include "tooltips.hpp" #include #include diff --git a/src/cmake.cc b/src/cmake.cpp similarity index 98% rename from src/cmake.cc rename to src/cmake.cpp index e77e741..b38274a 100644 --- a/src/cmake.cc +++ b/src/cmake.cpp @@ -1,9 +1,9 @@ -#include "cmake.h" -#include "compile_commands.h" -#include "config.h" -#include "dialogs.h" -#include "filesystem.h" -#include "terminal.h" +#include "cmake.hpp" +#include "compile_commands.hpp" +#include "config.hpp" +#include "dialogs.hpp" +#include "filesystem.hpp" +#include "terminal.hpp" #include CMake::CMake(const boost::filesystem::path &path) { diff --git a/src/cmake.h b/src/cmake.hpp similarity index 100% rename from src/cmake.h rename to src/cmake.hpp diff --git a/src/compile_commands.cc b/src/compile_commands.cpp similarity index 99% rename from src/compile_commands.cc rename to src/compile_commands.cpp index 9e3482d..8a0b928 100644 --- a/src/compile_commands.cc +++ b/src/compile_commands.cpp @@ -1,7 +1,7 @@ -#include "compile_commands.h" +#include "compile_commands.hpp" #include "clangmm.h" -#include "config.h" -#include "terminal.h" +#include "config.hpp" +#include "terminal.hpp" #include #include #include diff --git a/src/compile_commands.h b/src/compile_commands.hpp similarity index 100% rename from src/compile_commands.h rename to src/compile_commands.hpp diff --git a/src/config.cc b/src/config.cpp similarity index 99% rename from src/config.cc rename to src/config.cpp index 57a6c08..f6ca554 100644 --- a/src/config.cc +++ b/src/config.cpp @@ -1,7 +1,7 @@ -#include "config.h" -#include "files.h" -#include "filesystem.h" -#include "terminal.h" +#include "config.hpp" +#include "files.hpp" +#include "filesystem.hpp" +#include "terminal.hpp" #include #include #include diff --git a/src/config.h b/src/config.hpp similarity index 99% rename from src/config.h rename to src/config.hpp index 5d9c596..1f87cf3 100644 --- a/src/config.h +++ b/src/config.hpp @@ -1,5 +1,5 @@ #pragma once -#include "dispatcher.h" +#include "dispatcher.hpp" #include #include #include diff --git a/src/ctags.cc b/src/ctags.cpp similarity index 98% rename from src/ctags.cc rename to src/ctags.cpp index 3ef0dd9..60082dc 100644 --- a/src/ctags.cc +++ b/src/ctags.cpp @@ -1,8 +1,8 @@ -#include "ctags.h" -#include "config.h" -#include "filesystem.h" -#include "project_build.h" -#include "terminal.h" +#include "ctags.hpp" +#include "config.hpp" +#include "filesystem.hpp" +#include "project_build.hpp" +#include "terminal.hpp" #include #include diff --git a/src/ctags.h b/src/ctags.hpp similarity index 100% rename from src/ctags.h rename to src/ctags.hpp diff --git a/src/debug_lldb.cc b/src/debug_lldb.cpp similarity index 99% rename from src/debug_lldb.cc rename to src/debug_lldb.cpp index 812f81f..06f2b57 100644 --- a/src/debug_lldb.cc +++ b/src/debug_lldb.cpp @@ -1,12 +1,12 @@ -#include "debug_lldb.h" +#include "debug_lldb.hpp" #include #ifdef __APPLE__ #include #endif -#include "config.h" -#include "filesystem.h" +#include "config.hpp" +#include "filesystem.hpp" #include "process.hpp" -#include "terminal.h" +#include "terminal.hpp" #include #include diff --git a/src/debug_lldb.h b/src/debug_lldb.hpp similarity index 99% rename from src/debug_lldb.h rename to src/debug_lldb.hpp index 2824d79..21ea9ac 100644 --- a/src/debug_lldb.h +++ b/src/debug_lldb.hpp @@ -1,5 +1,5 @@ #pragma once -#include "mutex.h" +#include "mutex.hpp" #include #include #include diff --git a/src/dialogs.cc b/src/dialogs.cpp similarity index 99% rename from src/dialogs.cc rename to src/dialogs.cpp index be57184..7d86d1a 100644 --- a/src/dialogs.cc +++ b/src/dialogs.cpp @@ -1,4 +1,4 @@ -#include "dialogs.h" +#include "dialogs.hpp" #include Dialog::Message::Message(const std::string &text) : Gtk::Window(Gtk::WindowType::WINDOW_POPUP) { diff --git a/src/dialogs.h b/src/dialogs.hpp similarity index 100% rename from src/dialogs.h rename to src/dialogs.hpp diff --git a/src/dialogs_unix.cc b/src/dialogs_unix.cpp similarity index 98% rename from src/dialogs_unix.cc rename to src/dialogs_unix.cpp index c797594..fe2dc94 100644 --- a/src/dialogs_unix.cc +++ b/src/dialogs_unix.cpp @@ -1,4 +1,4 @@ -#include "dialogs.h" +#include "dialogs.hpp" std::string Dialog::open_folder(const boost::filesystem::path &path) { return gtk_dialog(path, "Open Folder", diff --git a/src/dialogs_win.cc b/src/dialogs_win.cpp similarity index 98% rename from src/dialogs_win.cc rename to src/dialogs_win.cpp index 092acc1..f026825 100644 --- a/src/dialogs_win.cc +++ b/src/dialogs_win.cpp @@ -1,6 +1,6 @@ -#include "dialogs.h" -#include "juci.h" -#include "singletons.h" +#include "dialogs.hpp" +#include "juci.hpp" +#include "singletons.hpp" #undef NTDDI_VERSION #define NTDDI_VERSION NTDDI_VISTA diff --git a/src/directories.cc b/src/directories.cpp similarity index 99% rename from src/directories.cc rename to src/directories.cpp index cd97181..0cdc3e4 100644 --- a/src/directories.cc +++ b/src/directories.cpp @@ -1,10 +1,10 @@ -#include "directories.h" -#include "entrybox.h" -#include "filesystem.h" -#include "notebook.h" -#include "source.h" -#include "terminal.h" -#include "utility.h" +#include "directories.hpp" +#include "entrybox.hpp" +#include "filesystem.hpp" +#include "notebook.hpp" +#include "source.hpp" +#include "terminal.hpp" +#include "utility.hpp" #include bool Directories::TreeStore::row_drop_possible_vfunc(const Gtk::TreeModel::Path &path, const Gtk::SelectionData &selection_data) const { diff --git a/src/directories.h b/src/directories.hpp similarity index 98% rename from src/directories.h rename to src/directories.hpp index d7b004c..c40e0d1 100644 --- a/src/directories.h +++ b/src/directories.hpp @@ -1,7 +1,7 @@ #pragma once #include "boost/filesystem.hpp" -#include "dispatcher.h" -#include "git.h" +#include "dispatcher.hpp" +#include "git.hpp" #include #include #include diff --git a/src/dispatcher.cc b/src/dispatcher.cpp similarity index 96% rename from src/dispatcher.cc rename to src/dispatcher.cpp index c122576..1e1b555 100644 --- a/src/dispatcher.cc +++ b/src/dispatcher.cpp @@ -1,4 +1,4 @@ -#include "dispatcher.h" +#include "dispatcher.hpp" #include Dispatcher::Dispatcher() { diff --git a/src/dispatcher.h b/src/dispatcher.hpp similarity index 97% rename from src/dispatcher.h rename to src/dispatcher.hpp index 4765972..fe8981c 100644 --- a/src/dispatcher.h +++ b/src/dispatcher.hpp @@ -1,5 +1,5 @@ #pragma once -#include "mutex.h" +#include "mutex.hpp" #include #include #include diff --git a/src/documentation.cc b/src/documentation.cpp similarity index 99% rename from src/documentation.cc rename to src/documentation.cpp index f5a2023..6d1b597 100644 --- a/src/documentation.cc +++ b/src/documentation.cpp @@ -1,4 +1,4 @@ -#include "documentation.h" +#include "documentation.hpp" #include std::string Documentation::CppReference::get_url(const std::string &symbol) noexcept { diff --git a/src/documentation.h b/src/documentation.hpp similarity index 100% rename from src/documentation.h rename to src/documentation.hpp diff --git a/src/entrybox.cc b/src/entrybox.cpp similarity index 99% rename from src/entrybox.cc rename to src/entrybox.cpp index 8ebdd63..1558900 100644 --- a/src/entrybox.cc +++ b/src/entrybox.cpp @@ -1,4 +1,4 @@ -#include "entrybox.h" +#include "entrybox.hpp" std::unordered_map> EntryBox::entry_histories; diff --git a/src/entrybox.h b/src/entrybox.hpp similarity index 98% rename from src/entrybox.h rename to src/entrybox.hpp index 2c5f339..893e077 100644 --- a/src/entrybox.h +++ b/src/entrybox.hpp @@ -1,6 +1,6 @@ #pragma once -#include "gtkmm.h" #include +#include #include #include #include diff --git a/src/files.h b/src/files.hpp similarity index 100% rename from src/files.h rename to src/files.hpp diff --git a/src/filesystem.cc b/src/filesystem.cpp similarity index 99% rename from src/filesystem.cc rename to src/filesystem.cpp index 2ddee9c..10b4820 100644 --- a/src/filesystem.cc +++ b/src/filesystem.cpp @@ -3,7 +3,7 @@ #include #include -#include "filesystem.h" +#include "filesystem.hpp" //Only use on small files std::string filesystem::read(const std::string &path) { diff --git a/src/filesystem.h b/src/filesystem.hpp similarity index 100% rename from src/filesystem.h rename to src/filesystem.hpp diff --git a/src/git.cc b/src/git.cpp similarity index 99% rename from src/git.cc rename to src/git.cpp index bcfff61..1c61326 100644 --- a/src/git.cc +++ b/src/git.cpp @@ -1,4 +1,4 @@ -#include "git.h" +#include "git.hpp" #include #include diff --git a/src/git.h b/src/git.hpp similarity index 99% rename from src/git.h rename to src/git.hpp index 0dd6b7b..9a67414 100644 --- a/src/git.h +++ b/src/git.hpp @@ -1,5 +1,5 @@ #pragma once -#include "mutex.h" +#include "mutex.hpp" #include #include #include diff --git a/src/grep.cc b/src/grep.cpp similarity index 97% rename from src/grep.cc rename to src/grep.cpp index ff67ba1..510fe9f 100644 --- a/src/grep.cc +++ b/src/grep.cpp @@ -1,8 +1,8 @@ -#include "grep.h" -#include "config.h" -#include "filesystem.h" -#include "project_build.h" -#include "terminal.h" +#include "grep.hpp" +#include "config.hpp" +#include "filesystem.hpp" +#include "project_build.hpp" +#include "terminal.hpp" Grep::Grep(const boost::filesystem::path &path, const std::string &pattern, bool case_sensitive, bool extended_regex) { auto build = Project::Build::create(path); diff --git a/src/grep.h b/src/grep.hpp similarity index 100% rename from src/grep.h rename to src/grep.hpp diff --git a/src/info.cc b/src/info.cpp similarity index 98% rename from src/info.cc rename to src/info.cpp index 8ec46d8..539101a 100644 --- a/src/info.cc +++ b/src/info.cpp @@ -1,4 +1,4 @@ -#include "info.h" +#include "info.hpp" Info::Info() { set_hexpand(false); diff --git a/src/info.h b/src/info.hpp similarity index 100% rename from src/info.h rename to src/info.hpp diff --git a/src/juci.cc b/src/juci.cpp similarity index 94% rename from src/juci.cc rename to src/juci.cpp index 8322596..86038cb 100644 --- a/src/juci.cc +++ b/src/juci.cpp @@ -1,17 +1,17 @@ -#include "juci.h" -#include "config.h" -#include "directories.h" -#include "filesystem.h" -#include "menu.h" -#include "notebook.h" -#include "terminal.h" -#include "window.h" +#include "juci.hpp" +#include "config.hpp" +#include "directories.hpp" +#include "filesystem.hpp" +#include "menu.hpp" +#include "notebook.hpp" +#include "terminal.hpp" +#include "window.hpp" #ifndef _WIN32 #include #endif #ifdef __APPLE__ -#include "dispatcher.h" -#include "window_macos.h" +#include "dispatcher.hpp" +#include "window_macos.hpp" #endif int Application::on_command_line(const Glib::RefPtr &cmd) { diff --git a/src/juci.h b/src/juci.hpp similarity index 100% rename from src/juci.h rename to src/juci.hpp diff --git a/src/menu.cc b/src/menu.cpp similarity index 99% rename from src/menu.cc rename to src/menu.cpp index 91851fb..2769949 100644 --- a/src/menu.cc +++ b/src/menu.cpp @@ -1,5 +1,5 @@ -#include "menu.h" -#include "config.h" +#include "menu.hpp" +#include "config.hpp" #include #include diff --git a/src/menu.h b/src/menu.hpp similarity index 100% rename from src/menu.h rename to src/menu.hpp diff --git a/src/meson.cc b/src/meson.cpp similarity index 96% rename from src/meson.cc rename to src/meson.cpp index 300c286..47b9f87 100644 --- a/src/meson.cc +++ b/src/meson.cpp @@ -1,9 +1,9 @@ -#include "meson.h" -#include "compile_commands.h" -#include "config.h" -#include "dialogs.h" -#include "filesystem.h" -#include "terminal.h" +#include "meson.hpp" +#include "compile_commands.hpp" +#include "config.hpp" +#include "dialogs.hpp" +#include "filesystem.hpp" +#include "terminal.hpp" #include Meson::Meson(const boost::filesystem::path &path) { diff --git a/src/meson.h b/src/meson.hpp similarity index 100% rename from src/meson.h rename to src/meson.hpp diff --git a/src/mutex.h b/src/mutex.hpp similarity index 100% rename from src/mutex.h rename to src/mutex.hpp diff --git a/src/notebook.cc b/src/notebook.cpp similarity index 98% rename from src/notebook.cc rename to src/notebook.cpp index b8a7dda..94fdd66 100644 --- a/src/notebook.cc +++ b/src/notebook.cpp @@ -1,13 +1,13 @@ -#include "notebook.h" -#include "config.h" -#include "filesystem.h" -#include "gtksourceview-3.0/gtksourceview/gtksourcemap.h" -#include "project.h" -#include "selection_dialog.h" -#include "source_clang.h" -#include "source_generic.h" -#include "source_language_protocol.h" +#include "notebook.hpp" +#include "config.hpp" +#include "filesystem.hpp" +#include "project.hpp" +#include "selection_dialog.hpp" +#include "source_clang.hpp" +#include "source_generic.hpp" +#include "source_language_protocol.hpp" #include +#include #include Notebook::TabLabel::TabLabel(const std::function &on_close) { diff --git a/src/notebook.h b/src/notebook.hpp similarity index 98% rename from src/notebook.h rename to src/notebook.hpp index 4c8db79..5a58749 100644 --- a/src/notebook.h +++ b/src/notebook.hpp @@ -1,6 +1,6 @@ #pragma once -#include "gtkmm.h" -#include "source.h" +#include "source.hpp" +#include #include #include #include diff --git a/src/project.cc b/src/project.cpp similarity index 99% rename from src/project.cc rename to src/project.cpp index 256d449..4829272 100644 --- a/src/project.cc +++ b/src/project.cpp @@ -1,22 +1,22 @@ -#include "project.h" -#include "config.h" -#include "directories.h" -#include "filesystem.h" -#include "menu.h" -#include "mutex.h" -#include "notebook.h" -#include "selection_dialog.h" -#include "terminal.h" +#include "project.hpp" +#include "config.hpp" +#include "directories.hpp" +#include "filesystem.hpp" +#include "menu.hpp" +#include "mutex.hpp" +#include "notebook.hpp" +#include "selection_dialog.hpp" +#include "terminal.hpp" #include #ifdef JUCI_ENABLE_DEBUG -#include "debug_lldb.h" +#include "debug_lldb.hpp" #endif -#include "ctags.h" -#include "info.h" -#include "snippets.h" -#include "source_clang.h" -#include "source_language_protocol.h" -#include "usages_clang.h" +#include "ctags.hpp" +#include "info.hpp" +#include "snippets.hpp" +#include "source_clang.hpp" +#include "source_language_protocol.hpp" +#include "usages_clang.hpp" #include boost::filesystem::path Project::debug_last_stop_file_path; diff --git a/src/project.h b/src/project.hpp similarity index 98% rename from src/project.h rename to src/project.hpp index 7c914c5..32a51f2 100644 --- a/src/project.h +++ b/src/project.hpp @@ -1,7 +1,7 @@ #pragma once -#include "dispatcher.h" -#include "project_build.h" -#include "tooltips.h" +#include "dispatcher.hpp" +#include "project_build.hpp" +#include "tooltips.hpp" #include #include #include diff --git a/src/project_build.cc b/src/project_build.cpp similarity index 98% rename from src/project_build.cc rename to src/project_build.cpp index 2b2b854..3c5b9a6 100644 --- a/src/project_build.cc +++ b/src/project_build.cpp @@ -1,6 +1,6 @@ -#include "project_build.h" -#include "config.h" -#include "filesystem.h" +#include "project_build.hpp" +#include "config.hpp" +#include "filesystem.hpp" #include std::unique_ptr Project::Build::create(const boost::filesystem::path &path) { diff --git a/src/project_build.h b/src/project_build.hpp similarity index 98% rename from src/project_build.h rename to src/project_build.hpp index 56f9047..8b0ab7d 100644 --- a/src/project_build.h +++ b/src/project_build.hpp @@ -1,6 +1,6 @@ #pragma once -#include "cmake.h" -#include "meson.h" +#include "cmake.hpp" +#include "meson.hpp" #include namespace Project { diff --git a/src/selection_dialog.cc b/src/selection_dialog.cpp similarity index 99% rename from src/selection_dialog.cc rename to src/selection_dialog.cpp index a63a4bf..54e2905 100644 --- a/src/selection_dialog.cc +++ b/src/selection_dialog.cpp @@ -1,4 +1,4 @@ -#include "selection_dialog.h" +#include "selection_dialog.hpp" #include SelectionDialogBase::ListViewText::ListViewText(bool use_markup) : Gtk::TreeView(), use_markup(use_markup) { diff --git a/src/selection_dialog.h b/src/selection_dialog.hpp similarity index 99% rename from src/selection_dialog.h rename to src/selection_dialog.hpp index 860b023..99a9893 100644 --- a/src/selection_dialog.h +++ b/src/selection_dialog.hpp @@ -1,6 +1,6 @@ #pragma once -#include "gtkmm.h" #include +#include #include class SelectionDialogBase { diff --git a/src/snippets.cc b/src/snippets.cpp similarity index 94% rename from src/snippets.cc rename to src/snippets.cpp index 5b8bac3..ee3e57d 100644 --- a/src/snippets.cc +++ b/src/snippets.cpp @@ -1,7 +1,7 @@ -#include "snippets.h" -#include "config.h" -#include "filesystem.h" -#include "terminal.h" +#include "snippets.hpp" +#include "config.hpp" +#include "filesystem.hpp" +#include "terminal.hpp" #include void Snippets::load() { diff --git a/src/snippets.h b/src/snippets.hpp similarity index 100% rename from src/snippets.h rename to src/snippets.hpp diff --git a/src/source.cc b/src/source.cpp similarity index 99% rename from src/source.cc rename to src/source.cpp index 4c0165f..b81298b 100644 --- a/src/source.cc +++ b/src/source.cpp @@ -1,14 +1,14 @@ -#include "source.h" -#include "config.h" -#include "ctags.h" -#include "directories.h" -#include "filesystem.h" -#include "git.h" -#include "info.h" -#include "menu.h" -#include "selection_dialog.h" -#include "terminal.h" -#include "utility.h" +#include "source.hpp" +#include "config.hpp" +#include "ctags.hpp" +#include "directories.hpp" +#include "filesystem.hpp" +#include "git.hpp" +#include "info.hpp" +#include "menu.hpp" +#include "selection_dialog.hpp" +#include "terminal.hpp" +#include "utility.hpp" #include #include #include diff --git a/src/source.h b/src/source.hpp similarity index 98% rename from src/source.h rename to src/source.hpp index 6f8800e..e640dda 100644 --- a/src/source.h +++ b/src/source.hpp @@ -1,7 +1,7 @@ #pragma once -#include "source_diff.h" -#include "source_spellcheck.h" -#include "tooltips.h" +#include "source_diff.hpp" +#include "source_spellcheck.hpp" +#include "tooltips.hpp" #include #include #include diff --git a/src/source_base.cc b/src/source_base.cpp similarity index 99% rename from src/source_base.cc rename to src/source_base.cpp index 10c1740..6cf0672 100644 --- a/src/source_base.cc +++ b/src/source_base.cpp @@ -1,11 +1,11 @@ -#include "source_base.h" -#include "config.h" -#include "filesystem.h" -#include "git.h" -#include "info.h" -#include "selection_dialog.h" -#include "terminal.h" -#include "utility.h" +#include "source_base.hpp" +#include "config.hpp" +#include "filesystem.hpp" +#include "git.hpp" +#include "info.hpp" +#include "selection_dialog.hpp" +#include "terminal.hpp" +#include "utility.hpp" #include #include #include diff --git a/src/source_base.h b/src/source_base.hpp similarity index 99% rename from src/source_base.h rename to src/source_base.hpp index 8020fce..8283f07 100644 --- a/src/source_base.h +++ b/src/source_base.hpp @@ -1,7 +1,7 @@ #pragma once -#include "mutex.h" -#include "snippets.h" +#include "mutex.hpp" +#include "snippets.hpp" #include #include #include diff --git a/src/source_clang.cc b/src/source_clang.cpp similarity index 99% rename from src/source_clang.cc rename to src/source_clang.cpp index 126a945..269df76 100644 --- a/src/source_clang.cc +++ b/src/source_clang.cpp @@ -1,18 +1,18 @@ -#include "source_clang.h" -#include "config.h" -#include "project_build.h" -#include "terminal.h" +#include "source_clang.hpp" +#include "config.hpp" +#include "project_build.hpp" +#include "terminal.hpp" #ifdef JUCI_ENABLE_DEBUG -#include "debug_lldb.h" +#include "debug_lldb.hpp" #endif -#include "compile_commands.h" -#include "ctags.h" -#include "dialogs.h" -#include "documentation.h" -#include "filesystem.h" -#include "info.h" -#include "selection_dialog.h" -#include "usages_clang.h" +#include "compile_commands.hpp" +#include "ctags.hpp" +#include "dialogs.hpp" +#include "documentation.hpp" +#include "filesystem.hpp" +#include "info.hpp" +#include "selection_dialog.hpp" +#include "usages_clang.hpp" const std::regex include_regex(R"(^[ \t]*#[ \t]*include[ \t]*[<"]([^<>"]+)[>"].*$)"); diff --git a/src/source_clang.h b/src/source_clang.hpp similarity index 97% rename from src/source_clang.h rename to src/source_clang.hpp index e3b86b9..d447aa3 100644 --- a/src/source_clang.h +++ b/src/source_clang.hpp @@ -1,10 +1,10 @@ #pragma once -#include "autocomplete.h" +#include "autocomplete.hpp" #include "clangmm.h" -#include "dispatcher.h" -#include "mutex.h" -#include "source.h" -#include "terminal.h" +#include "dispatcher.hpp" +#include "mutex.hpp" +#include "source.hpp" +#include "terminal.hpp" #include #include #include diff --git a/src/source_diff.cc b/src/source_diff.cpp similarity index 99% rename from src/source_diff.cc rename to src/source_diff.cpp index fa5db84..19482df 100644 --- a/src/source_diff.cc +++ b/src/source_diff.cpp @@ -1,8 +1,8 @@ -#include "source_diff.h" -#include "config.h" -#include "filesystem.h" -#include "info.h" -#include "terminal.h" +#include "source_diff.hpp" +#include "config.hpp" +#include "filesystem.hpp" +#include "info.hpp" +#include "terminal.hpp" #include Source::DiffView::Renderer::Renderer() : Gsv::GutterRenderer() { diff --git a/src/source_diff.h b/src/source_diff.hpp similarity index 95% rename from src/source_diff.h rename to src/source_diff.hpp index fa8ce6e..4d6027a 100644 --- a/src/source_diff.h +++ b/src/source_diff.hpp @@ -1,8 +1,8 @@ #pragma once -#include "dispatcher.h" -#include "git.h" -#include "mutex.h" -#include "source_base.h" +#include "dispatcher.hpp" +#include "git.hpp" +#include "mutex.hpp" +#include "source_base.hpp" #include #include #include diff --git a/src/source_generic.cc b/src/source_generic.cpp similarity index 98% rename from src/source_generic.cc rename to src/source_generic.cpp index 9054af9..60eeab2 100644 --- a/src/source_generic.cc +++ b/src/source_generic.cpp @@ -1,9 +1,9 @@ -#include "source_generic.h" -#include "filesystem.h" -#include "info.h" -#include "selection_dialog.h" -#include "snippets.h" -#include "terminal.h" +#include "source_generic.hpp" +#include "filesystem.hpp" +#include "info.hpp" +#include "selection_dialog.hpp" +#include "snippets.hpp" +#include "terminal.hpp" #include Source::GenericView::GenericView(const boost::filesystem::path &file_path, const Glib::RefPtr &language) : BaseView(file_path, language), View(file_path, language, true), autocomplete(this, interactive_completion, last_keyval, false) { diff --git a/src/source_generic.h b/src/source_generic.hpp similarity index 93% rename from src/source_generic.h rename to src/source_generic.hpp index 6a0c141..3e462fa 100644 --- a/src/source_generic.h +++ b/src/source_generic.hpp @@ -1,8 +1,8 @@ #pragma once -#include "autocomplete.h" -#include "mutex.h" -#include "source.h" +#include "autocomplete.hpp" +#include "mutex.hpp" +#include "source.hpp" #include namespace Source { diff --git a/src/source_language_protocol.cc b/src/source_language_protocol.cpp similarity index 99% rename from src/source_language_protocol.cc rename to src/source_language_protocol.cpp index deaeb36..7999a81 100644 --- a/src/source_language_protocol.cc +++ b/src/source_language_protocol.cpp @@ -1,15 +1,15 @@ -#include "source_language_protocol.h" -#include "filesystem.h" -#include "info.h" -#include "notebook.h" -#include "project.h" -#include "selection_dialog.h" -#include "terminal.h" +#include "source_language_protocol.hpp" +#include "filesystem.hpp" +#include "info.hpp" +#include "notebook.hpp" +#include "project.hpp" +#include "selection_dialog.hpp" +#include "terminal.hpp" #ifdef JUCI_ENABLE_DEBUG -#include "debug_lldb.h" +#include "debug_lldb.hpp" #endif -#include "config.h" -#include "menu.h" +#include "config.hpp" +#include "menu.hpp" #include #include #include diff --git a/src/source_language_protocol.h b/src/source_language_protocol.hpp similarity index 98% rename from src/source_language_protocol.h rename to src/source_language_protocol.hpp index ad9c0bf..800734e 100644 --- a/src/source_language_protocol.h +++ b/src/source_language_protocol.hpp @@ -1,8 +1,8 @@ #pragma once -#include "autocomplete.h" -#include "mutex.h" +#include "autocomplete.hpp" +#include "mutex.hpp" #include "process.hpp" -#include "source.h" +#include "source.hpp" #include #include #include diff --git a/src/source_spellcheck.cc b/src/source_spellcheck.cpp similarity index 99% rename from src/source_spellcheck.cc rename to src/source_spellcheck.cpp index aaf9a72..b08bc19 100644 --- a/src/source_spellcheck.cc +++ b/src/source_spellcheck.cpp @@ -1,7 +1,7 @@ -#include "source_spellcheck.h" -#include "config.h" -#include "info.h" -#include "selection_dialog.h" +#include "source_spellcheck.hpp" +#include "config.hpp" +#include "info.hpp" +#include "selection_dialog.hpp" #include AspellConfig *Source::SpellCheckView::spellcheck_config = nullptr; diff --git a/src/source_spellcheck.h b/src/source_spellcheck.hpp similarity index 98% rename from src/source_spellcheck.h rename to src/source_spellcheck.hpp index 0760389..ab4d4ee 100644 --- a/src/source_spellcheck.h +++ b/src/source_spellcheck.hpp @@ -1,5 +1,5 @@ #pragma once -#include "source_base.h" +#include "source_base.hpp" #include namespace Source { diff --git a/src/terminal.cc b/src/terminal.cpp similarity index 99% rename from src/terminal.cc rename to src/terminal.cpp index a9d6cf5..82ed845 100644 --- a/src/terminal.cc +++ b/src/terminal.cpp @@ -1,9 +1,9 @@ -#include "terminal.h" -#include "config.h" -#include "filesystem.h" -#include "info.h" -#include "notebook.h" -#include "project.h" +#include "terminal.hpp" +#include "config.hpp" +#include "filesystem.hpp" +#include "info.hpp" +#include "notebook.hpp" +#include "project.hpp" #include #include #include diff --git a/src/terminal.h b/src/terminal.hpp similarity index 95% rename from src/terminal.h rename to src/terminal.hpp index 3001f9c..4d0ec58 100644 --- a/src/terminal.h +++ b/src/terminal.hpp @@ -1,11 +1,11 @@ #pragma once -#include "dispatcher.h" -#include "gtkmm.h" -#include "mutex.h" +#include "dispatcher.hpp" +#include "mutex.hpp" #include "process.hpp" -#include "source_base.h" +#include "source_base.hpp" #include #include +#include #include #include diff --git a/src/tooltips.cc b/src/tooltips.cpp similarity index 99% rename from src/tooltips.cc rename to src/tooltips.cpp index 1ad7951..b98b75d 100644 --- a/src/tooltips.cc +++ b/src/tooltips.cpp @@ -1,9 +1,9 @@ -#include "tooltips.h" -#include "config.h" -#include "filesystem.h" -#include "info.h" -#include "notebook.h" -#include "selection_dialog.h" +#include "tooltips.hpp" +#include "config.hpp" +#include "filesystem.hpp" +#include "info.hpp" +#include "notebook.hpp" +#include "selection_dialog.hpp" #include #include diff --git a/src/tooltips.h b/src/tooltips.hpp similarity index 99% rename from src/tooltips.h rename to src/tooltips.hpp index 5da3d7f..2db8ea5 100644 --- a/src/tooltips.h +++ b/src/tooltips.hpp @@ -1,6 +1,6 @@ #pragma once -#include "gtkmm.h" #include +#include #include #include #include diff --git a/src/usages_clang.cc b/src/usages_clang.cpp similarity index 99% rename from src/usages_clang.cc rename to src/usages_clang.cpp index aa0572f..f19bc18 100644 --- a/src/usages_clang.cc +++ b/src/usages_clang.cpp @@ -1,9 +1,9 @@ -#include "usages_clang.h" -#include "compile_commands.h" -#include "config.h" -#include "dialogs.h" -#include "filesystem.h" -#include "utility.h" +#include "usages_clang.hpp" +#include "compile_commands.hpp" +#include "config.hpp" +#include "dialogs.hpp" +#include "filesystem.hpp" +#include "utility.hpp" #include #include #include diff --git a/src/usages_clang.h b/src/usages_clang.hpp similarity index 99% rename from src/usages_clang.h rename to src/usages_clang.hpp index 0ecd960..82c2b5f 100644 --- a/src/usages_clang.h +++ b/src/usages_clang.hpp @@ -1,6 +1,6 @@ #pragma once #include "clangmm.h" -#include "mutex.h" +#include "mutex.hpp" #include #include #include diff --git a/src/utility.cc b/src/utility.cpp similarity index 72% rename from src/utility.cc rename to src/utility.cpp index 370ed3c..8689c68 100644 --- a/src/utility.cc +++ b/src/utility.cpp @@ -1,4 +1,4 @@ -#include "utility.h" +#include "utility.hpp" ScopeGuard::~ScopeGuard() { if(on_exit) diff --git a/src/utility.h b/src/utility.hpp similarity index 100% rename from src/utility.h rename to src/utility.hpp diff --git a/src/window.cc b/src/window.cpp similarity index 99% rename from src/window.cc rename to src/window.cpp index 30b34b1..e794097 100644 --- a/src/window.cc +++ b/src/window.cpp @@ -1,20 +1,20 @@ -#include "window.h" -#include "config.h" +#include "window.hpp" +#include "config.hpp" #ifdef JUCI_ENABLE_DEBUG -#include "debug_lldb.h" +#include "debug_lldb.hpp" #endif -#include "compile_commands.h" -#include "dialogs.h" -#include "directories.h" -#include "entrybox.h" -#include "filesystem.h" -#include "grep.h" -#include "info.h" -#include "menu.h" -#include "notebook.h" -#include "project.h" -#include "selection_dialog.h" -#include "terminal.h" +#include "compile_commands.hpp" +#include "dialogs.hpp" +#include "directories.hpp" +#include "entrybox.hpp" +#include "filesystem.hpp" +#include "grep.hpp" +#include "info.hpp" +#include "menu.hpp" +#include "notebook.hpp" +#include "project.hpp" +#include "selection_dialog.hpp" +#include "terminal.hpp" Window::Window() { Gsv::init(); diff --git a/src/window.h b/src/window.hpp similarity index 97% rename from src/window.h rename to src/window.hpp index f36f149..a04ce44 100644 --- a/src/window.h +++ b/src/window.hpp @@ -1,5 +1,5 @@ #pragma once -#include "source_base.h" +#include "source_base.hpp" #include #include #include diff --git a/src/window_macos.h b/src/window_macos.hpp similarity index 100% rename from src/window_macos.h rename to src/window_macos.hpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c9e162a..90dbf07 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,75 +12,75 @@ include_directories( ) add_library(test_stubs OBJECT - stubs/config.cc - stubs/dialogs.cc - stubs/directories.cc - stubs/info.cc - stubs/notebook.cc - stubs/project.cc - stubs/selection_dialog.cc + stubs/config.cpp + stubs/dialogs.cpp + stubs/directories.cpp + stubs/info.cpp + stubs/notebook.cpp + stubs/project.cpp + stubs/selection_dialog.cpp ) -add_executable(process_test process_test.cc $) +add_executable(process_test process_test.cpp $) target_link_libraries(process_test juci_shared) add_test(process_test process_test) -add_executable(compile_commands_test compile_commands_test.cc $) +add_executable(compile_commands_test compile_commands_test.cpp $) target_link_libraries(compile_commands_test juci_shared) add_test(compile_commands_test compile_commands_test) -add_executable(filesystem_test filesystem_test.cc $) +add_executable(filesystem_test filesystem_test.cpp $) target_link_libraries(filesystem_test juci_shared) add_test(filesystem_test filesystem_test) -add_executable(cmake_build_test cmake_build_test.cc $) +add_executable(cmake_build_test cmake_build_test.cpp $) target_link_libraries(cmake_build_test juci_shared) add_test(cmake_build_test cmake_build_test) -add_executable(meson_build_test meson_build_test.cc $) +add_executable(meson_build_test meson_build_test.cpp $) target_link_libraries(meson_build_test juci_shared) add_test(meson_build_test meson_build_test) -add_executable(source_test source_test.cc $) +add_executable(source_test source_test.cpp $) target_link_libraries(source_test juci_shared) add_test(source_test source_test) -add_executable(source_clang_test source_clang_test.cc $) +add_executable(source_clang_test source_clang_test.cpp $) target_link_libraries(source_clang_test juci_shared) add_test(source_clang_test source_clang_test) -add_executable(source_generic_test source_generic_test.cc $) +add_executable(source_generic_test source_generic_test.cpp $) target_link_libraries(source_generic_test juci_shared) add_test(source_generic_test source_generic_test) -add_executable(source_key_test source_key_test.cc $) +add_executable(source_key_test source_key_test.cpp $) target_link_libraries(source_key_test juci_shared) add_test(source_key_test source_key_test) -add_executable(terminal_test terminal_test.cc $) +add_executable(terminal_test terminal_test.cpp $) target_link_libraries(terminal_test juci_shared) add_test(terminal_test terminal_test) -add_executable(usages_clang_test usages_clang_test.cc $) +add_executable(usages_clang_test usages_clang_test.cpp $) target_link_libraries(usages_clang_test juci_shared) add_test(usages_clang_test usages_clang_test) if(LIBLLDB_FOUND) - add_executable(lldb_test lldb_test.cc $) + add_executable(lldb_test lldb_test.cpp $) target_link_libraries(lldb_test juci_shared) add_test(lldb_test lldb_test) add_subdirectory("lldb_test_files") endif() -add_executable(git_test git_test.cc $) +add_executable(git_test git_test.cpp $) target_link_libraries(git_test juci_shared) add_test(git_test git_test) -add_executable(ctags_grep_test ctags_grep_test.cc $) +add_executable(ctags_grep_test ctags_grep_test.cpp $) target_link_libraries(ctags_grep_test juci_shared) add_test(ctags_grep_test ctags_grep_test) -add_executable(tooltips_test tooltips_test.cc $) +add_executable(tooltips_test tooltips_test.cpp $) target_link_libraries(tooltips_test juci_shared) add_test(tooltips_test tooltips_test) diff --git a/tests/cmake_build_test.cc b/tests/cmake_build_test.cpp similarity index 85% rename from tests/cmake_build_test.cc rename to tests/cmake_build_test.cpp index 757e899..1ae9066 100644 --- a/tests/cmake_build_test.cc +++ b/tests/cmake_build_test.cpp @@ -1,7 +1,7 @@ -#include "cmake.h" -#include "config.h" +#include "cmake.hpp" +#include "config.hpp" #include "process.hpp" -#include "project_build.h" +#include "project_build.hpp" #include #include @@ -19,14 +19,14 @@ int main() { g_assert(process.get_exit_status() == 0); g_assert(cmake.get_executable(project_path / "build", project_path) == ""); - g_assert(cmake.get_executable(project_path / "build" / "non_existing_file.cc", project_path) == ""); + g_assert(cmake.get_executable(project_path / "build" / "non_existing_file.cpp", project_path) == ""); } { CMake cmake(project_path / "src"); g_assert(cmake.get_executable(project_path / "build", project_path / "src") == project_path / "build" / "src" / "juci"); - g_assert(cmake.get_executable(project_path / "build", project_path / "src" / "cmake.cc") == project_path / "build" / "src" / "juci"); - g_assert(cmake.get_executable(project_path / "build", project_path / "src" / "juci.cc") == project_path / "build" / "src" / "juci"); - g_assert(cmake.get_executable(project_path / "build", project_path / "src" / "non_existing_file.cc") == project_path / "build" / "src" / "juci"); + g_assert(cmake.get_executable(project_path / "build", project_path / "src" / "cmake.cpp") == project_path / "build" / "src" / "juci"); + g_assert(cmake.get_executable(project_path / "build", project_path / "src" / "juci.cpp") == project_path / "build" / "src" / "juci"); + g_assert(cmake.get_executable(project_path / "build", project_path / "src" / "non_existing_file.cpp") == project_path / "build" / "src" / "juci"); } { CMake cmake(tests_path); @@ -37,8 +37,8 @@ int main() { g_assert(functions_parameters.at(0).second.at(0) == "juci"); g_assert(cmake.get_executable(project_path / "build", tests_path).parent_path() == project_path / "build" / "tests"); - g_assert(cmake.get_executable(project_path / "build", tests_path / "cmake_build_test.cc") == project_path / "build" / "tests" / "cmake_build_test"); - g_assert(cmake.get_executable(project_path / "build", tests_path / "non_existing_file.cc").parent_path() == project_path / "build" / "tests"); + g_assert(cmake.get_executable(project_path / "build", tests_path / "cmake_build_test.cpp") == project_path / "build" / "tests" / "cmake_build_test"); + g_assert(cmake.get_executable(project_path / "build", tests_path / "non_existing_file.cpp").parent_path() == project_path / "build" / "tests"); } auto build = Project::Build::create(tests_path); diff --git a/tests/compile_commands_test.cc b/tests/compile_commands_test.cpp similarity index 98% rename from tests/compile_commands_test.cc rename to tests/compile_commands_test.cpp index d88538a..fd0f5b2 100644 --- a/tests/compile_commands_test.cc +++ b/tests/compile_commands_test.cpp @@ -1,4 +1,4 @@ -#include "compile_commands.h" +#include "compile_commands.hpp" #include #include #include diff --git a/tests/ctags_grep_test.cc b/tests/ctags_grep_test.cpp similarity index 86% rename from tests/ctags_grep_test.cc rename to tests/ctags_grep_test.cpp index 8f78584..0cf3d23 100644 --- a/tests/ctags_grep_test.cc +++ b/tests/ctags_grep_test.cpp @@ -1,6 +1,6 @@ -#include "config.h" -#include "ctags.h" -#include "grep.h" +#include "config.hpp" +#include "ctags.hpp" +#include "grep.hpp" #include #include #include @@ -38,7 +38,7 @@ int main() { { auto location = ctags.get_location(line, false); g_assert(location.source == "void ctags_grep_test_function() {"); - g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location.line, ==, 7); g_assert_cmpint(location.index, ==, 5); g_assert(location.symbol == "ctags_grep_test_function"); @@ -48,7 +48,7 @@ int main() { { auto location = ctags.get_location(line, true); g_assert(location.source == "void ctags_grep_test_function() {"); - g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location.line, ==, 7); g_assert_cmpint(location.index, ==, 5); g_assert(location.symbol == "ctags_grep_test_function"); @@ -71,7 +71,7 @@ int main() { { auto location = ctags.get_location(line, false); g_assert(location.source == "void ctags_grep_test_function() {"); - g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location.line, ==, 7); g_assert_cmpint(location.index, ==, 5); g_assert(location.symbol == "ctags_grep_test_function"); @@ -81,7 +81,7 @@ int main() { { auto location = ctags.get_location(line, true); g_assert(location.source == "void ctags_grep_test_function() {"); - g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location.line, ==, 7); g_assert_cmpint(location.index, ==, 5); g_assert(location.symbol == "ctags_grep_test_function"); @@ -104,7 +104,7 @@ int main() { { auto location = ctags.get_location(line, false); g_assert(location.source == "void ctags_grep_test_function2() {"); - g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(ctags.project_path / location.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location.line, ==, 11); g_assert_cmpint(location.index, ==, 7); g_assert(location.symbol == "ctags_grep_test_function2"); @@ -128,43 +128,43 @@ int main() { if(line.find("ctags_grep_test_function") != std::string::npos) { { auto location = grep.get_location(line, true, true); - g_assert(location.markup == "tests/ctags_grep_test.cc:8:void ctags_grep_test_function() {"); - g_assert(grep.project_path / location.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(location.markup == "tests/ctags_grep_test.cpp:8:void ctags_grep_test_function() {"); + g_assert(grep.project_path / location.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location.line, ==, 7); g_assert_cmpint(location.offset, ==, 5); { auto location2 = grep.get_location(location.markup, false, true); - g_assert(location2.markup == "tests/ctags_grep_test.cc:8:void ctags_grep_test_function() {"); - g_assert(grep.project_path / location2.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(location2.markup == "tests/ctags_grep_test.cpp:8:void ctags_grep_test_function() {"); + g_assert(grep.project_path / location2.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location2.line, ==, 7); g_assert_cmpint(location2.offset, ==, 5); } } { auto location = grep.get_location(line, true, false); - g_assert(location.markup == "tests/ctags_grep_test.cc:8:void ctags_grep_test_function() {"); - g_assert(grep.project_path / location.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(location.markup == "tests/ctags_grep_test.cpp:8:void ctags_grep_test_function() {"); + g_assert(grep.project_path / location.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location.line, ==, 7); g_assert_cmpint(location.offset, ==, 0); { auto location2 = grep.get_location(location.markup, false, false); - g_assert(location2.markup == "tests/ctags_grep_test.cc:8:void ctags_grep_test_function() {"); - g_assert(grep.project_path / location2.file_path == tests_path / "ctags_grep_test.cc"); + g_assert(location2.markup == "tests/ctags_grep_test.cpp:8:void ctags_grep_test_function() {"); + g_assert(grep.project_path / location2.file_path == tests_path / "ctags_grep_test.cpp"); g_assert_cmpint(location2.line, ==, 7); g_assert_cmpint(location2.offset, ==, 0); } } { - auto location = grep.get_location(line, true, true, (boost::filesystem::path("tests") / "ctags_grep_test.cc").string()); - g_assert(location.markup == "tests/ctags_grep_test.cc:8:void ctags_grep_test_function() {"); - g_assert(grep.project_path / location.file_path == tests_path / "ctags_grep_test.cc"); + auto location = grep.get_location(line, true, true, (boost::filesystem::path("tests") / "ctags_grep_test.cpp").string()); + g_assert(location.markup == "tests/ctags_grep_test.cpp:8:void ctags_grep_test_function() {"); + g_assert(grep.project_path / location.file_path == tests_path / "ctags_grep_test.cpp"); g_assert(location); g_assert_cmpint(location.line, ==, 7); g_assert_cmpint(location.offset, ==, 5); } { auto location = grep.get_location(line, true, true, "CMakeLists.txt"); - g_assert(location.markup == "tests/ctags_grep_test.cc:8:void ctags_grep_test_function() {"); + g_assert(location.markup == "tests/ctags_grep_test.cpp:8:void ctags_grep_test_function() {"); g_assert(location.file_path.empty()); g_assert(!location); } diff --git a/tests/filesystem_test.cc b/tests/filesystem_test.cpp similarity index 99% rename from tests/filesystem_test.cc rename to tests/filesystem_test.cpp index 9f1c5ce..6ffb164 100644 --- a/tests/filesystem_test.cc +++ b/tests/filesystem_test.cpp @@ -1,4 +1,4 @@ -#include "filesystem.h" +#include "filesystem.hpp" #include int main() { diff --git a/tests/git_test.cc b/tests/git_test.cpp similarity index 95% rename from tests/git_test.cc rename to tests/git_test.cpp index 8005086..7d60c09 100644 --- a/tests/git_test.cc +++ b/tests/git_test.cpp @@ -1,4 +1,4 @@ -#include "git.h" +#include "git.hpp" #include #include #include @@ -18,8 +18,8 @@ int main() { auto status = repository->get_status(); - auto diff = repository->get_diff((boost::filesystem::path("tests") / "git_test.cc")); - auto lines = diff.get_lines("#include added\n#include \"git.h\"\n#include modified\n#include \n"); + auto diff = repository->get_diff((boost::filesystem::path("tests") / "git_test.cpp")); + auto lines = diff.get_lines("#include added\n#include \"git.hpp\"\n#include modified\n#include \n"); g_assert_cmpuint(lines.added.size(), ==, 1); g_assert_cmpuint(lines.modified.size(), ==, 1); g_assert_cmpuint(lines.removed.size(), ==, 1); diff --git a/tests/lldb_test.cc b/tests/lldb_test.cpp similarity index 99% rename from tests/lldb_test.cc rename to tests/lldb_test.cpp index ba52adb..213e277 100644 --- a/tests/lldb_test.cc +++ b/tests/lldb_test.cpp @@ -1,4 +1,4 @@ -#include "debug_lldb.h" +#include "debug_lldb.hpp" #include #include #include diff --git a/tests/meson_build_test.cc b/tests/meson_build_test.cpp similarity index 97% rename from tests/meson_build_test.cc rename to tests/meson_build_test.cpp index 726c2d9..e043fe1 100644 --- a/tests/meson_build_test.cc +++ b/tests/meson_build_test.cpp @@ -1,5 +1,5 @@ -#include "meson.h" -#include "project.h" +#include "meson.hpp" +#include "project.hpp" #include int main() { diff --git a/tests/process_test.cc b/tests/process_test.cpp similarity index 100% rename from tests/process_test.cc rename to tests/process_test.cpp diff --git a/tests/source_clang_test.cc b/tests/source_clang_test.cpp similarity index 99% rename from tests/source_clang_test.cc rename to tests/source_clang_test.cpp index af941b6..46f931b 100644 --- a/tests/source_clang_test.cc +++ b/tests/source_clang_test.cpp @@ -1,6 +1,6 @@ -#include "config.h" -#include "filesystem.h" -#include "source_clang.h" +#include "config.hpp" +#include "filesystem.hpp" +#include "source_clang.hpp" #include std::string main_error = R"(int main() { diff --git a/tests/source_generic_test.cc b/tests/source_generic_test.cpp similarity index 99% rename from tests/source_generic_test.cc rename to tests/source_generic_test.cpp index bddf5e6..db204b8 100644 --- a/tests/source_generic_test.cc +++ b/tests/source_generic_test.cpp @@ -1,4 +1,4 @@ -#include "source_generic.h" +#include "source_generic.hpp" #include int main() { diff --git a/tests/source_key_test.cc b/tests/source_key_test.cpp similarity index 99% rename from tests/source_key_test.cc rename to tests/source_key_test.cpp index 47541e2..552809d 100644 --- a/tests/source_key_test.cc +++ b/tests/source_key_test.cpp @@ -1,5 +1,5 @@ -#include "config.h" -#include "source.h" +#include "config.hpp" +#include "source.hpp" #include //Requires display server to work diff --git a/tests/source_test.cc b/tests/source_test.cpp similarity index 99% rename from tests/source_test.cc rename to tests/source_test.cpp index dfda1fb..71e9f13 100644 --- a/tests/source_test.cc +++ b/tests/source_test.cpp @@ -1,5 +1,5 @@ -#include "filesystem.h" -#include "source.h" +#include "filesystem.hpp" +#include "source.hpp" #include std::string hello_world = R"(#include diff --git a/tests/stubs/config.cc b/tests/stubs/config.cc deleted file mode 100644 index a84fe7a..0000000 --- a/tests/stubs/config.cc +++ /dev/null @@ -1,3 +0,0 @@ -#include "config.h" - -Config::Config() {} diff --git a/tests/stubs/config.cpp b/tests/stubs/config.cpp new file mode 100644 index 0000000..0445e5d --- /dev/null +++ b/tests/stubs/config.cpp @@ -0,0 +1,3 @@ +#include "config.hpp" + +Config::Config() {} diff --git a/tests/stubs/dialogs.cc b/tests/stubs/dialogs.cpp similarity index 88% rename from tests/stubs/dialogs.cc rename to tests/stubs/dialogs.cpp index e6508f4..087cb5e 100644 --- a/tests/stubs/dialogs.cc +++ b/tests/stubs/dialogs.cpp @@ -1,4 +1,4 @@ -#include "dialogs.h" +#include "dialogs.hpp" Dialog::Message::Message(const std::string &text) : Gtk::Window(Gtk::WindowType::WINDOW_POPUP) {} diff --git a/tests/stubs/directories.cc b/tests/stubs/directories.cpp similarity index 90% rename from tests/stubs/directories.cc rename to tests/stubs/directories.cpp index 114be94..1c7bee0 100644 --- a/tests/stubs/directories.cc +++ b/tests/stubs/directories.cpp @@ -1,4 +1,4 @@ -#include "directories.h" +#include "directories.hpp" Directories::Directories() : ListViewText(1) {} diff --git a/tests/stubs/info.cc b/tests/stubs/info.cpp similarity index 75% rename from tests/stubs/info.cc rename to tests/stubs/info.cpp index efd146e..fc6d6e7 100644 --- a/tests/stubs/info.cc +++ b/tests/stubs/info.cpp @@ -1,4 +1,4 @@ -#include "info.h" +#include "info.hpp" Info::Info() {} diff --git a/tests/stubs/notebook.cc b/tests/stubs/notebook.cpp similarity index 90% rename from tests/stubs/notebook.cc rename to tests/stubs/notebook.cpp index d61218f..7e75b38 100644 --- a/tests/stubs/notebook.cc +++ b/tests/stubs/notebook.cpp @@ -1,4 +1,4 @@ -#include "notebook.h" +#include "notebook.hpp" Notebook::Notebook() {} diff --git a/tests/stubs/project.cc b/tests/stubs/project.cpp similarity index 68% rename from tests/stubs/project.cc rename to tests/stubs/project.cpp index da4d3ca..15a6b7e 100644 --- a/tests/stubs/project.cc +++ b/tests/stubs/project.cpp @@ -1,3 +1,3 @@ -#include "project.h" +#include "project.hpp" std::shared_ptr Project::current; diff --git a/tests/stubs/selection_dialog.cc b/tests/stubs/selection_dialog.cpp similarity index 97% rename from tests/stubs/selection_dialog.cc rename to tests/stubs/selection_dialog.cpp index 83c6d1a..f46d7d0 100644 --- a/tests/stubs/selection_dialog.cc +++ b/tests/stubs/selection_dialog.cpp @@ -1,4 +1,4 @@ -#include "selection_dialog.h" +#include "selection_dialog.hpp" SelectionDialogBase::ListViewText::ListViewText(bool use_markup) {} diff --git a/tests/terminal_test.cc b/tests/terminal_test.cpp similarity index 98% rename from tests/terminal_test.cc rename to tests/terminal_test.cpp index 5e04a0e..6d25e24 100644 --- a/tests/terminal_test.cc +++ b/tests/terminal_test.cpp @@ -1,4 +1,4 @@ -#include "terminal.h" +#include "terminal.hpp" #include #include diff --git a/tests/tooltips_test.cc b/tests/tooltips_test.cpp similarity index 99% rename from tests/tooltips_test.cc rename to tests/tooltips_test.cpp index d33d9e6..6b1ad95 100644 --- a/tests/tooltips_test.cc +++ b/tests/tooltips_test.cpp @@ -1,4 +1,4 @@ -#include "tooltips.h" +#include "tooltips.hpp" #include #include diff --git a/tests/usages_clang_test.cc b/tests/usages_clang_test.cpp similarity index 99% rename from tests/usages_clang_test.cc rename to tests/usages_clang_test.cpp index 61c7076..6b8ec4d 100644 --- a/tests/usages_clang_test.cc +++ b/tests/usages_clang_test.cpp @@ -1,8 +1,8 @@ #include "clangmm.h" -#include "compile_commands.h" -#include "meson.h" -#include "project.h" -#include "usages_clang.h" +#include "compile_commands.hpp" +#include "meson.hpp" +#include "project.hpp" +#include "usages_clang.hpp" #include #include #include