Repository navigation
refactor: replace QDir/QFile/QFileInfo with std::filesystem - #8938
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughReplaces Qt filesystem/string usages with std::filesystem and OpenMS utilities across many files; adds OpenMS::to_path and PathUtils.h; updates File public APIs to use Changes
Sequence Diagram(s)Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (5)
src/openms/include/OpenMS/SYSTEM/PathUtils.h (1)
16-18: Align the new public header docs with the required Doxygen format.Please add explicit
@briefand parameter tags for this public utility function.As per coding guidelines, `src/openms/include/**/*.h` requires “Doxygen documentation with `@brief` required ...; document parameters with `[in]`, `[out]`, `[in,out]` tags”.📝 Minimal doc-format update
- /// Convert a UTF-8 std::string to std::filesystem::path safely on all platforms. - /// On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8. + /** + `@brief` Convert a UTF-8 std::string to a std::filesystem::path safely on all platforms. + `@param`[in] s UTF-8 encoded input path string. + + On Windows, std::filesystem::path(std::string) uses the current code page, not UTF-8. + */ inline std::filesystem::path to_path(const std::string& s)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/include/OpenMS/SYSTEM/PathUtils.h` around lines 16 - 18, Update the Doxygen for the public utility to_path in PathUtils.h: add an explicit `@brief` describing that it converts a UTF-8 std::string to std::filesystem::path safely across platforms, add a `@param`[in] s tag stating s is the input UTF-8 encoded string, and add a `@return` tag describing the returned std::filesystem::path; ensure tags follow the project's Doxygen style and appear above the inline std::filesystem::path to_path(const std::string& s) declaration.src/openms/include/OpenMS/SYSTEM/File.h (1)
110-110: Please add a migration note for this exported API signature change.
File::copyDirRecursivelyandFile::removeDirnow requireString, so a short changelog/migration note will help external consumers update quickly.Also applies to: 126-126
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/include/OpenMS/SYSTEM/File.h` at line 110, Add a short migration note documenting the API signature change for File::copyDirRecursively and File::removeDir (they now take OpenMS::String instead of the previous type), showing the old call signature and the new one, explain how to convert existing code (e.g., wrap or cast/construct Strings from std::string or char*), and add this note to the project changelog/release notes and any API compatibility/migration document so external consumers can update their code quickly.src/openms/source/MATH/STATISTICS/PosteriorErrorProbabilityModel.cpp (1)
293-305: Consider extracting duplicated directory creation logic.This block is identical to lines 101-113 in
fitGumbelGauss. While not blocking, extracting this to a helper method would reduce duplication and improve maintainability.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/source/MATH/STATISTICS/PosteriorErrorProbabilityModel.cpp` around lines 293 - 305, The directory-check-and-create block duplicated in PosteriorErrorProbabilityModel.cpp (the one using to_path(String(param_.getValue("out_plot").toString())), parent_path(), fs::exists and File::makeDir) and the identical block in fitGumbelGauss should be extracted into a small helper (e.g. ensureOutputDirectoryExists or makeParentDirForPath) that takes the target path or the param value and returns bool (or throws) on failure; replace both occurrences with calls to that helper, preserve the same logging via OPENMS_LOG_ERROR on failure, and keep existing semantics (use to_path, parent_path, check empty parent_dir, try File::makeDir if not exists).src/openms/source/APPLICATIONS/ToolHandler.cpp (2)
289-289: Consider usingSizeinstead ofsize_tfor consistency with OpenMS conventions.The coding guidelines prefer
Size/SignedSizefor STL.size()values. This applies here and at line 314.♻️ Suggested change
- for (size_t i = 0; i < files.size(); ++i) + for (Size i = 0; i < files.size(); ++i)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/source/APPLICATIONS/ToolHandler.cpp` at line 289, The for-loop uses raw size_t for iterating over files (for (size_t i = 0; i < files.size(); ++i)); change the loop index type to OpenMS::Size (or just Size if using the OpenMS namespace) to follow project conventions when comparing to .size(), and similarly replace any other occurrences (e.g., the loop at line 314) that use size_t for .size() results so all iterations use Size (or SignedSize where negative values are needed).
328-380: LGTM! Clean migration from Qt to std/OpenMS types.The refactored
getExternalToolConfigFiles_()andgetInternalToolConfigFiles_()correctly useStringListandFile::fileList()for directory enumeration. Thefull_path=trueparameter ensures absolute paths are returned, and results are automatically sorted byFile::fileList.Optional: These two functions share nearly identical structure (paths setup, OS-specific handling, env var check, file collection). If this pattern appears elsewhere or maintenance becomes a concern, consider extracting a helper:
StringList getToolConfigFilesFromPaths_(const StringList& base_paths, const char* env_var);,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/source/APPLICATIONS/ToolHandler.cpp` around lines 328 - 380, Both getExternalToolConfigFiles_() and getInternalToolConfigFiles_() duplicate path-building and file-collection logic; extract that common logic into a helper like getToolConfigFilesFromPaths_(const StringList& base_paths, const char* env_var) and update getExternalToolConfigFiles_() and getInternalToolConfigFiles_() to build their base_paths (including OS-specific subdir and optional env var) and then call this helper which calls File::fileList(..., "*.ttd", ..., true) and returns the consolidated sorted StringList; ensure the helper is used by both functions and preserves the current behavior and return type.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/source/FEATUREFINDER/FeatureFinderAlgorithmPicked.cpp`:
- Around line 233-235: The call to File::makeDir("debug/features") can fail
silently and cause subsequent log_.open("debug/log.txt") to misbehave; update
the code around File::makeDir and log_.open so you check the boolean/result from
File::makeDir("debug/features") and handle failures explicitly (e.g., log an
error via log_.error or std::cerr, attempt to create a fallback directory, or
throw an exception) before proceeding to call log_.open("debug/log.txt"); ensure
the logic in the constructor or initialization path that contains File::makeDir
and log_.open (the block using File::makeDir and member log_) branches
appropriately on failure so debug logging does not silently degrade.
In `@src/openms/source/FORMAT/DATAACCESS/SiriusFragmentAnnotation.cpp`:
- Line 329: The code constructs an ifstream using sirius_result_file.string(),
which forces conversion to a native string and can lose UTF-8 on Windows; change
the construction to pass the std::filesystem::path directly (i.e., construct the
ifstream with the path object used in the expression creating
fragment_annotation_file) so that the path's UTF-8-aware representation is
preserved when opening the file.
In `@src/openms/source/FORMAT/HANDLERS/MzMLSqliteHandler.cpp`:
- Around line 934-936: The code calls
std::filesystem::remove(OpenMS::to_path(filename_), ec) and ignores ec (so a
stale DB may remain); update the MzMLSqliteHandler code to check ec after the
remove call and fail fast: if ec indicates an error, log or throw an informative
exception (including filename_ and ec.message()/ec.value()) and abort opening
the SQLite file rather than proceeding to the later CREATE TABLE steps; ensure
you reference the same symbols (filename_, ec,
std::filesystem::remove/OpenMS::to_path) and propagate the error out of the
current method so callers see the file-operation failure.
In `@src/openms/source/SYSTEM/File.cpp`:
- Around line 287-291: File::removeDir currently calls fs::remove_all just like
File::removeDirRecursively, making both functions recursive and risking
unintended deletion; change File::removeDir to use fs::remove (non‑recursive)
and keep error handling identical (use the same std::error_code ec and check ec)
so removeDir fails on non‑empty directories while File::removeDirRecursively
continues to use fs::remove_all; update the call in File::removeDir from
fs::remove_all(to_path(dir_name), ec) to fs::remove(to_path(dir_name), ec) and
run tests that exercise both File::removeDir and File::removeDirRecursively.
---
Nitpick comments:
In `@src/openms/include/OpenMS/SYSTEM/File.h`:
- Line 110: Add a short migration note documenting the API signature change for
File::copyDirRecursively and File::removeDir (they now take OpenMS::String
instead of the previous type), showing the old call signature and the new one,
explain how to convert existing code (e.g., wrap or cast/construct Strings from
std::string or char*), and add this note to the project changelog/release notes
and any API compatibility/migration document so external consumers can update
their code quickly.
In `@src/openms/include/OpenMS/SYSTEM/PathUtils.h`:
- Around line 16-18: Update the Doxygen for the public utility to_path in
PathUtils.h: add an explicit `@brief` describing that it converts a UTF-8
std::string to std::filesystem::path safely across platforms, add a `@param`[in] s
tag stating s is the input UTF-8 encoded string, and add a `@return` tag
describing the returned std::filesystem::path; ensure tags follow the project's
Doxygen style and appear above the inline std::filesystem::path to_path(const
std::string& s) declaration.
In `@src/openms/source/APPLICATIONS/ToolHandler.cpp`:
- Line 289: The for-loop uses raw size_t for iterating over files (for (size_t i
= 0; i < files.size(); ++i)); change the loop index type to OpenMS::Size (or
just Size if using the OpenMS namespace) to follow project conventions when
comparing to .size(), and similarly replace any other occurrences (e.g., the
loop at line 314) that use size_t for .size() results so all iterations use Size
(or SignedSize where negative values are needed).
- Around line 328-380: Both getExternalToolConfigFiles_() and
getInternalToolConfigFiles_() duplicate path-building and file-collection logic;
extract that common logic into a helper like getToolConfigFilesFromPaths_(const
StringList& base_paths, const char* env_var) and update
getExternalToolConfigFiles_() and getInternalToolConfigFiles_() to build their
base_paths (including OS-specific subdir and optional env var) and then call
this helper which calls File::fileList(..., "*.ttd", ..., true) and returns the
consolidated sorted StringList; ensure the helper is used by both functions and
preserves the current behavior and return type.
In `@src/openms/source/MATH/STATISTICS/PosteriorErrorProbabilityModel.cpp`:
- Around line 293-305: The directory-check-and-create block duplicated in
PosteriorErrorProbabilityModel.cpp (the one using
to_path(String(param_.getValue("out_plot").toString())), parent_path(),
fs::exists and File::makeDir) and the identical block in fitGumbelGauss should
be extracted into a small helper (e.g. ensureOutputDirectoryExists or
makeParentDirForPath) that takes the target path or the param value and returns
bool (or throws) on failure; replace both occurrences with calls to that helper,
preserve the same logging via OPENMS_LOG_ERROR on failure, and keep existing
semantics (use to_path, parent_path, check empty parent_dir, try File::makeDir
if not exists).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 33178448-d20e-44f1-ba0f-e3eab38407d8
📒 Files selected for processing (25)
src/openms/include/OpenMS/APPLICATIONS/ToolHandler.hsrc/openms/include/OpenMS/SYSTEM/File.hsrc/openms/include/OpenMS/SYSTEM/PathUtils.hsrc/openms/include/OpenMS/SYSTEM/sources.cmakesrc/openms/source/ANALYSIS/ID/FIAMSScheduler.cppsrc/openms/source/ANALYSIS/ID/IDRipper.cppsrc/openms/source/APPLICATIONS/TOPPBase.cppsrc/openms/source/APPLICATIONS/ToolHandler.cppsrc/openms/source/CONCEPT/ClassTest.cppsrc/openms/source/CONCEPT/FuzzyStringComparator.cppsrc/openms/source/FEATUREFINDER/FeatureFinderAlgorithmPicked.cppsrc/openms/source/FORMAT/DATAACCESS/SiriusFragmentAnnotation.cppsrc/openms/source/FORMAT/ExperimentalDesignFile.cppsrc/openms/source/FORMAT/HANDLERS/MzMLSqliteHandler.cppsrc/openms/source/FORMAT/MascotGenericFile.cppsrc/openms/source/FORMAT/QcMLFile.cppsrc/openms/source/MATH/STATISTICS/PosteriorErrorProbabilityModel.cppsrc/openms/source/METADATA/DocumentIdentifier.cppsrc/openms/source/METADATA/ExperimentalDesign.cppsrc/openms/source/QC/MQEvidenceExporter.cppsrc/openms/source/QC/MQMsmsExporter.cppsrc/openms/source/SYSTEM/File.cppsrc/openms/source/SYSTEM/JavaInfo.cppsrc/openms/source/SYSTEM/PythonInfo.cppsrc/openms/source/SYSTEM/UpdateCheck.cpp
💤 Files with no reviewable changes (1)
- src/openms/source/METADATA/ExperimentalDesign.cpp
| File::makeDir("debug/features"); | ||
| log_.open("debug/log.txt"); | ||
| } |
There was a problem hiding this comment.
Handle debug directory creation failure explicitly.
If File::makeDir("debug/features") fails, debug logging/output silently degrades.
🔧 Suggested hardening
if (debug_)
{
- File::makeDir("debug/features");
+ if (!File::makeDir("debug/features"))
+ {
+ OPENMS_LOG_WARN << "Could not create debug/features directory. Debug artifacts may be incomplete.\n";
+ }
log_.open("debug/log.txt");
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/openms/source/FEATUREFINDER/FeatureFinderAlgorithmPicked.cpp` around
lines 233 - 235, The call to File::makeDir("debug/features") can fail silently
and cause subsequent log_.open("debug/log.txt") to misbehave; update the code
around File::makeDir and log_.open so you check the boolean/result from
File::makeDir("debug/features") and handle failures explicitly (e.g., log an
error via log_.error or std::cerr, attempt to create a fallback directory, or
throw an exception) before proceeding to call log_.open("debug/log.txt"); ensure
the logic in the constructor or initialization path that contains File::makeDir
and log_.open (the block using File::makeDir and member log_) branches
appropriately on failure so debug logging does not silently degrade.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/source/ANALYSIS/ID/IDRipper.cpp`:
- Line 77: Replace the direct std::filesystem::path construction from a
std::string when setting this->out_basename to avoid code-page issues on
Windows; use the UTF-8 aware to_path() helper with the same input
(origin_fullname) and call .stem().string() on its result so non-ASCII basenames
are handled correctly (update the assignment that sets this->out_basename in
IDRipper.cpp where the current line uses
std::filesystem::path(std::string(this->origin_fullname)).stem().string()).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0569901c-ebdf-471f-8143-31811f052d00
📒 Files selected for processing (5)
src/openms/source/ANALYSIS/ID/IDRipper.cppsrc/openms/source/FORMAT/QcMLFile.cppsrc/openms/source/METADATA/DocumentIdentifier.cppsrc/openms/source/SYSTEM/JavaInfo.cppsrc/openms/source/SYSTEM/PythonInfo.cpp
🚧 Files skipped from review as they are similar to previous changes (4)
- src/openms/source/SYSTEM/PythonInfo.cpp
- src/openms/source/FORMAT/QcMLFile.cpp
- src/openms/source/SYSTEM/JavaInfo.cpp
- src/openms/source/METADATA/DocumentIdentifier.cpp
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/source/FORMAT/ExperimentalDesignFile.cpp`:
- Line 29: The path construction for spec_file is inconsistent and not UTF-8
safe; replace the fs::path(std::string(spec_file)) usage with the project's
UTF‑8 safe helper (i.e., call to_path(spec_file)) in the conditional that checks
if the spec file is relative (the same pattern used for to_path(tsv_file) on
line 36) so the code uses to_path for both spec_file and tsv_file.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7668dbe6-a5b5-4091-8320-f08cafeca0d8
📒 Files selected for processing (2)
src/openms/source/FORMAT/ExperimentalDesignFile.cppsrc/openms/source/FORMAT/MascotGenericFile.cpp
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/source/FORMAT/MascotGenericFile.cpp`:
- Around line 425-426: Include PathUtils.h at the top of MascotGenericFile.cpp
and replace the direct std::string(filename) conversion with the UTF-8-safe
helper: construct fileinfo using to_path(filename) (e.g., std::filesystem::path
fileinfo{ to_path(filename) }) so the stem() call used for filtered_filename
(and the regex replacement using non_alnum) correctly handles non-ASCII Windows
paths.
In `@src/openms/source/FORMAT/QcMLFile.cpp`:
- Line 1054: Replace the direct std::filesystem::path construction with the
UTF-8-safe helper: when building base_name from user input (variable
inputfile_raw) in QcMLFile.cpp (where base_name is assigned), call
OpenMS::to_path(inputfile_raw) instead of
std::filesystem::path(std::string(inputfile_raw)) so the path conversion is safe
on Windows; ensure you then call .stem().string() on the result as before to
produce base_name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ef06b2d8-2904-4d7a-91a5-e82b430f5629
📒 Files selected for processing (2)
src/openms/source/FORMAT/MascotGenericFile.cppsrc/openms/source/FORMAT/QcMLFile.cpp
Introduces PathUtils.h with to_path() for UTF-8 safe path construction. Rewrites File.cpp to use std::filesystem for all file operations. File::fileList() results explicitly sorted (directory_iterator is unordered). Uses lexically_normal() for cleanPath (lexical only, no filesystem access). Handles UpdateCheck.cpp Qt removal (QDir, QFileInfo, QDateTime, QSysInfo). Removes QDir/QFile/QFileInfo from ~20 secondary files in the core library. Changes copyDirRecursively/removeDir signatures from QString& to String&. ToolHandler returns StringList instead of QStringList for config files. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…onstruction GCC 13 doesn't accept implicit conversion from OpenMS::String (which inherits std::string) to std::filesystem::path. Explicit std::string() cast resolves the issue on all platforms. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
ExperimentalDesignFile.cpp and MascotGenericFile.cpp also pass OpenMS::String to fs::path constructor which GCC 13 rejects. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
std::filesystem::path fileinfo(std::string(filename)) is parsed as a function declaration. Use brace initialization instead. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
… QcMLFile The Qt QFileInfo include was removed but toQString() calls remained, causing incomplete type errors. String already supports comparison operators directly. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…ring PR 3 (filesystem) removed the QDir include from TOPPBase.cpp but QDateTime was provided transitively. Add it back explicitly since the QDateTime calls remain (removed in PR 2, not this PR). Also fix write_file.toStdString() - String is already std::string. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
std::filesystem::absolute("") throws "Invalid argument" on Linux.
QFileInfo("").absoluteFilePath() returned the current directory.
Match Qt behavior by returning current_path() for empty input.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
cc5ed05 to
b55df44
Compare
Replace std::filesystem::path(std::string(...)) with to_path() from PathUtils.h in all files touched by this PR. Ensures consistent UTF-8 path handling on Windows. Files: QcMLFile, DocumentIdentifier, PythonInfo, JavaInfo, IDRipper, MascotGenericFile, ExperimentalDesignFile Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
File::removeDir now uses fs::remove (non-recursive) instead of fs::remove_all, matching the original QDir::rmdir behavior that only removes empty directories. File::removeDirRecursively continues to use fs::remove_all. Also removes QDir usage and .toQString() calls from File_test.cpp, replacing QDir::mkpath with File::makeDir. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- readable()/writable() on Unix now use access(R_OK)/access(W_OK) instead of checking permission bits. This checks actual access for the current user, matching the original QFileInfo behavior. - Updated File.h doc comments: removeDir is non-recursive (empty dirs only), removeDirRecursively removes contents recursively. - Removed unused BuildInfo.h include from UpdateCheck.cpp. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Avoids .string() which loses UTF-8 on Windows. std::ifstream accepts std::filesystem::path directly since C++17. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Log a warning if the pre-existing SQLite file cannot be removed before creating tables. The original Qt code also ignored the QFile::remove() return, but a warning helps diagnose issues like locked files. Not a throw — preserves existing error contract. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Qt always returned forward slashes on all platforms. std::filesystem path::string() returns backslashes on Windows. Switch to generic_string() in functions that return paths to callers: - File::absolutePath() - File::find() (cleanPath replacement) - File::fileList() full_path mode - File::getTempDirectory() - File::copyDirRecursively() recursive calls - ExperimentalDesignFile, TOPPBase, PosteriorErrorProbabilityModel Filenames (stem/filename) keep .string() since they have no separators. FuzzyStringComparator keeps .make_preferred().string() intentionally for IDE-clickable native-separator error output. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
On Windows, fs::absolute("/data/foo") prepends the current drive
letter (e.g. "D:/data/foo"). Qt's QFileInfo treated paths starting
with '/' as already absolute on all platforms. Preserve this behavior
so stored paths like "/data/experiments/test.featureXML" are not
modified on Windows.
Fixes FeatureMapArrowIO_test and ConsensusMapArrowIO_test on Windows.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…ifier
On Windows, std::filesystem::path("/data/foo").is_relative() returns
true (no drive letter), but Qt treated such paths as absolute.
This caused setLoadedFilePath to call absolutePath() and prepend
the drive letter, breaking Parquet metadata round-trips.
Fix at the call site (DocumentIdentifier) in addition to the
File::absolutePath guard, for defense in depth.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1. Revert removeDir to fs::remove_all (recursive) — the original Qt removeDir was also recursive, so fs::remove was a behavior change. 2. Add '/'-prefix absolute path check to ExperimentalDesignFile (same Windows is_relative() issue as DocumentIdentifier). 3. Normalize USERPROFILE backslashes to forward slashes in getUserDirectory() and getOpenMSHomePath() to match Qt convention. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add changelog entries for three Qt-removal refactors merged since the last sync (2026-03-19): - #8937: QDateTime/QDate/QSysInfo/QLocale replaced with std::chrono (BREAKING: QDate constructor removed from Date class) - #8938: QDir/QFile/QFileInfo replaced with std::filesystem (BREAKING: copyDirRecursively/removeDir signatures, ToolHandler return type) - #8939: QProcess/QObject replaced with boost::process (BREAKING: ExternalProcess/TOPPBase/RWrapper APIs; boost-process added) Co-authored-by: Copilot <[email protected]>
Document the incremental Qt removal from libOpenMS core library: - QDateTime/QDate/QSysInfo/QLocale replaced by std::chrono (#8937) - QDir/QFile/QFileInfo replaced by std::filesystem (#8938) - QProcess/QObject replaced by boost::process (#8939) - QJsonDocument/QJsonObject replaced by nlohmann/json (#8936) These changes landed after the 2026-03-19 changelog sync and represent significant steps toward making Qt6 optional for the core library. Co-authored-by: Copilot <[email protected]>
Add changelog entries for three Qt-removal refactors merged since the last sync (2026-03-19): - #8937: QDateTime/QDate/QSysInfo/QLocale replaced with std::chrono (BREAKING: QDate constructor removed from Date class) - #8938: QDir/QFile/QFileInfo replaced with std::filesystem (BREAKING: copyDirRecursively/removeDir signatures, ToolHandler return type) - #8939: QProcess/QObject replaced with boost::process (BREAKING: ExternalProcess/TOPPBase/RWrapper APIs; boost-process added) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <[email protected]>
Document the incremental Qt removal from libOpenMS core library: - QDateTime/QDate/QSysInfo/QLocale replaced by std::chrono (#8937) - QDir/QFile/QFileInfo replaced by std::filesystem (#8938) - QProcess/QObject replaced by boost::process (#8939) - QJsonDocument/QJsonObject replaced by nlohmann/json (#8936) These changes landed after the 2026-03-19 changelog sync and represent significant steps toward making Qt6 optional for the core library. Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Timo Sachsenberg <[email protected]>
…9207) std::filesystem::rename fails with EXDEV across filesystems, unlike Qt's QFile::rename which silently copied and removed. PR #8938 replaced the Qt call without preserving that fallback, breaking TOPP adapters (CometAdapter -pin_out, MSGFPlusAdapter -mzid_out) that move files from a tmp dir to a bind-mounted output — a common container layout. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Summary
to_path()for UTF-8 safe path construction on all platformsfileList()explicitly sorts results (directory_iterator is unordered, unlike QDir)lexically_normal()for cleanPath (lexical only, matching Qt behavior)_access_s()for ACL-aware permission checksTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit