-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1341 add file selector plugin #1342
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/2)
}; | ||
} // namespace | ||
|
||
static std::optional<std::string> showFileSelector(FileSelectorState& state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no template named optional
in namespace std
{ | ||
if (!state.showFileSelector) | ||
{ | ||
return std::nullopt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no member named nullopt
in namespace std
fs::relative(state.currentPath, fs::current_path().parent_path().parent_path() / "tools" / "tesseratos") | ||
.string(); | ||
|
||
std::replace(relativePath.begin(), relativePath.end(), '\\', '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no member named replace
in namespace std
{ | ||
// Filter files and directories based on search query | ||
std::string fileName = entry.path().filename().string(); | ||
if (strlen(searchBuffer) > 0 && fileName.find(searchBuffer) == std::string::npos) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statement should be inside braces
if (strlen(searchBuffer) > 0 && fileName.find(searchBuffer) == std::string::npos) | |
if (strlen(searchBuffer) > 0 && fileName.find(searchBuffer) == std::string::npos) { |
std::string fileName = entry.path().filename().string(); | ||
if (strlen(searchBuffer) > 0 && fileName.find(searchBuffer) == std::string::npos) | ||
continue; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statement should be inside braces
} | |
selectedFilePath = fs::relative(selectedFilePath, fs::current_path().parent_path().parent_path() / | ||
"tools" / "tesseratos") | ||
.string(); | ||
std::replace(selectedFilePath.begin(), selectedFilePath.end(), '\\', '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no member named replace
in namespace std
} | ||
} | ||
|
||
if (state.isGridMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statement should be inside braces
if (state.isGridMode) | |
if (state.isGridMode) { |
|
||
if (state.isGridMode) | ||
ImGui::NextColumn(); // Move to next column in grid layout | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statement should be inside braces
} | |
} | |
} |
ImGui::NextColumn(); // Move to next column in grid layout | ||
} | ||
|
||
if (state.isGridMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statement should be inside braces
if (state.isGridMode) | |
if (state.isGridMode) { |
|
||
if (state.isGridMode) | ||
ImGui::Columns(1); // End grid layout | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statement should be inside braces
} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (2/2)
std::string selectedFile = state.selectedFile; | ||
state.selectedFile.clear(); | ||
state.showFileSelector = false; | ||
return selectedFile; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no viable conversion from returned value of type std::string
(aka basic_string<char>
) to function return type int
} | ||
|
||
ImGui::End(); | ||
return std::nullopt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no member named nullopt
in namespace std
return std::nullopt; | ||
} | ||
|
||
static std::optional<std::string> createFileSelectorButton(FileSelectorState& state, const char* label) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no template named optional
in namespace std
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1342 +/- ##
=======================================
Coverage 41.53% 41.54%
=======================================
Files 437 437
Lines 32850 32850
Branches 3820 3820
=======================================
+ Hits 13645 13646 +1
+ Misses 19205 19204 -1 ☔ View full report in Codecov by Sentry. |
2521a9f
to
a47cace
Compare
a47cace
to
bca83a6
Compare
Description
Add file selector plugin
Checklist