Repository navigation
refactor: remove Qt dependency from OpenMS core library - #8965
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…ile counts) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Addresses reviewer feedback: TOPP tools and tests that directly include Qt headers need explicit Qt6::Core link deps after removing it from libOpenMS PUBLIC dependencies. Also removes false positive OpenSwathWorkflow.cpp from String interop list. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Stale includes (PSMFeatureExtractor, NucleicAcidSearchEngine, 7 tests) can simply be removed. Only targets actively using Qt need explicit Qt6::Core link deps. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Add Section 2: CMake config changes (cmake_findExternalLibs, OpenMSConfig.cmake.in, AUTOMOC) - Move OpenSwathWorkflow.cpp to String interop migration list - Expand stale includes list (MapStatistics, FeatureFinderMultiplex, LuciphorAdapter, MaRaClusterAdapter, QCExporter/Importer/Merger, Resampler) - Correct active-Qt TOPP tools to 11 (not ~18) - Note GUI header usage (FileWatcher.h) - Add explicit <QString> include to Qt5Port.h Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
10 tasks covering: Qt5Port.h free functions, GUI lib migration (~60 files), TOPP tool migration (12 files), stale include cleanup (~17 files), core lib Qt removal, explicit Qt linking, CMake config updates, and final verification. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Convert all .toQString() member calls in src/openms_gui/ to use the toQString() free function from Qt5Port.h. Also convert String(qstring) implicit conversions to fromQString(qstring) where the argument is a QString. Add #include <OpenMS/VISUAL/MISC/Qt5Port.h> to all affected files. 60 files changed, 346 .toQString() member calls converted plus ~15 String(qstring) implicit conversions. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Replace .toQString() calls with QString::fromStdString() for Qt-bound values, and remove round-trip .toQString() calls where the result was passed back to functions expecting String. Replace String(qstring_expr) with qstring_expr.toStdString() for QString-to-String conversions. These tools link only OpenMS (not OpenMS_GUI) and cannot use Qt5Port.h, so the conversions are inlined directly. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Part A: Remove QString constructor and toQString() test sections from String_test.cpp; add cassert to replace Qt transitive include - Part B: Replace .toQString() with QString::fromStdString() in MzMLSqliteHandler_test, PythonInfo_test, and ToolDescriptionFile_test - Part C: Remove unused Qt includes from MzMLSqliteSwathHandler_test, StringListUtils_test, SqMassFile_test, OPXLHelper_test, DataValue_test, SiriusFragmentAnnotation_test, and XQuestResultXMLFile_test Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
After removing Qt6::Core from libOpenMS PUBLIC deps, TOPP tools and tests that directly include Qt headers need explicit Qt6::Core linkage. Also fix three latent QString->OpenMS::String assignment errors in QCEmbedder, QCExtractor, QCShrinker, ToolDescriptionFile_test, and PeptideIndexing_test that were exposed by the stricter dependency boundary. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Replace all implicit/explicit QString-to-OpenMS::String conversions with fromQString() calls after removal of String(const QString&) constructor. Adds #include <OpenMS/VISUAL/MISC/Qt5Port.h> where needed. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Fix implicit String(const QString&) constructor usages that were missed in the initial GUI migration. Includes signal/slot adapter in TOPPView, fromQString() calls in 57 GUI files, and inline .toStdString() in QCEmbedder/Extractor/Shrinker and 2 test files. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove OpenMS_QT_COMPONENTS cache variable and Qt6 find_dependency from OpenMSConfig.cmake.in so downstream consumers of only libOpenMS are not forced to find Qt. Make AUTOMOC conditional on Qt6::moc being available. Update knime_package_support.cmake to use literal Core instead of the removed variable. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- deps-macos.sh: move qtbase into --skip-gui-deps conditional - deps-ubuntu.sh: add --skip-gui-deps flag, move Qt6 packages into conditional block - pyproject.toml: remove qtbase/qtsvg from macOS wheel build deps (pyOpenMS builds with WITH_GUI=OFF) - knime_package_support.cmake: remove redundant find_package(Qt6) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRemoved Qt6::Core as a transitive dependency of libOpenMS, deleted QString-based OpenMS::String APIs, added GUI-only conversion helpers, migrated GUI/TOPP call sites to use helpers or explicit std/QString conversions, and made Qt discovery/linkage conditional in CMake and CI. Changes
Sequence Diagram(s)sequenceDiagram
participant Consumer as Downstream Consumer
participant OpenMS as libOpenMS
participant CMake as OpenMS CMake config
participant GUI as openms_gui / TOPP
participant Qt as Qt6
Consumer->>OpenMS: find_package(OpenMS)
OpenMS->>CMake: load OpenMSConfig.cmake
CMake-->>Consumer: expose libOpenMS targets (without Qt6::Core)
opt GUI/TOPP needs Qt
Consumer->>GUI: build/link GUI or TOPP tool
GUI->>CMake: request Qt discovery (conditional)
CMake->>Qt: find_package(Qt6 Core) (QUIET)
Qt-->>GUI: provide Qt targets (if present)
end
Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/openms_gui/source/VISUAL/TOPPASOutputVertex.cpp (1)
69-85:⚠️ Potential issue | 🔴 CriticalGuard empty incoming-edge lists before dereferencing them.
Lines 74-75 dereference
inEdgesBegin()before checking whether any input edge exists. An unconnected output vertex can therefore hit undefined behavior when resolving the folder path instead of throwingMissingInformation.Suggested fix
if (output_folder_name_.isEmpty()) { - TOPPASEdge* e = *inEdgesBegin(); - if (e == nullptr) + const auto it = inEdgesBegin(); + if (it == inEdgesEnd()) { throw Exception::MissingInformation(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "To open the output folder, an input edge is required to knit a folder name."); } + TOPPASEdge* e = *it; const TOPPASVertex* tv = e->getSourceVertex();🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/source/VISUAL/TOPPASOutputVertex.cpp` around lines 69 - 85, getOutputDir() dereferences *inEdgesBegin() before ensuring there is any incoming edge, causing UB for unconnected vertices; modify the function to check for no incoming edges (e.g. compare inEdgesBegin() to inEdgesEnd() or use the container's empty() check) before dereferencing, and if empty throw the same Exception::MissingInformation used later; update the branch that currently does TOPPASEdge* e = *inEdgesBegin() to only dereference after that guard so the error path is taken for unconnected output vertices.src/openms_gui/source/VISUAL/TVIdentificationViewController.cpp (1)
241-265:⚠️ Potential issue | 🔴 CriticalFix the off-by-one color index before rendering multi-formula annotations.
iis pre-incremented here, so the first visible formula skipscols[0], and on Line 247 the fifth formula hitscols[5], which is out of bounds for a 5-element array. That is UB in the annotation path.🛠️ Proposed fix
- Size i = 0; + Size shown = 0; for (map<String, StringList>::iterator ith = formula_to_names.begin(); ith!= formula_to_names.end(); ++ith) { - if (++i == cols.size()) - { // at this point, this is the 4th entry.. which we don't show any more... - text += String("<b><span style=\"color:") + fromQString(cols[i].name()) + "\">..." + Size(distance(formula_to_names.begin(), formula_to_names.end()) - 4 + 1) + " more</span></b><br>"; + if (shown == 4) + { + text += String("<b><span style=\"color:") + fromQString(cols.back().name()) + "\">..." + Size(formula_to_names.size() - shown) + " more</span></b><br>"; break; } - text += String("<b><span style=\"color:") + fromQString(cols[i].name()) + "\">" + ith->first + "</span></b><br>\n"; + const QColor& current_color = cols[shown]; + text += String("<b><span style=\"color:") + fromQString(current_color.name()) + "\">" + ith->first + "</span></b><br>\n"; // carets for isotope profile EmpiricalFormula ef(ith->first); IsotopeDistribution id = ef.getIsotopeDistribution(CoarseIsotopePatternGenerator(3)); // three isotopes at most double int_factor = peak_int / id.begin()->getIntensity(); Annotation1DCaret<Peak1D>::PositionsType points; @@ auto ditem = new Annotation1DCaret<Peak1D>(points, QString(), - cols[i], + current_color, toQString(String(getCurrentLayer().param.getValue("peak_color").toString()))); + ++shown;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/source/VISUAL/TVIdentificationViewController.cpp` around lines 241 - 265, The loop currently pre-increments i (using ++i) which skips cols[0] and can index past cols (UB); change the loop to not pre-increment: treat i as the current color index (start i = 0), replace the pre-increment condition if (++i == cols.size()) with a check if (i == cols.size() - 1) (or if (i+1 == cols.size()) when computing the "more" count) to detect the final visible slot, use cols[i] and cols[i].name() for rendering the current formula, and then increment i++ at the end of the loop body (before continuing) so the next iteration uses the next color; update usages around formula_to_names iteration and the Annotation1DCaret<Peak1D> creation to rely on this corrected index behavior.
🧹 Nitpick comments (7)
src/openms_gui/source/VISUAL/TOPPASSplitterVertex.cpp (1)
14-14: Include added for commented-out code only.
Qt5Port.his included but only used in a commented-out line (line 48). Consider removing this include unless you plan to uncomment that code.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/source/VISUAL/TOPPASSplitterVertex.cpp` at line 14, The include Qt5Port.h is currently only referenced by commented-out code in TOPPASSplitterVertex.cpp (the commented line around line 48), so remove the unnecessary `#include` <OpenMS/VISUAL/MISC/Qt5Port.h> to avoid dead includes; alternatively, if the commented code is intended to be re-enabled, uncomment and update the code that relies on Qt5Port.h (search for the commented usage near the TOPPASSplitterVertex class) — prefer removing the include if the code remains commented.src/openms_gui/include/OpenMS/VISUAL/FileWatcher.h (2)
18-19: Duplicate#include <map>detected.The header
<map>is included twice: once on line 19 and again on line 25. Remove one of them.♻️ Proposed fix
`#include` <OpenMS/VISUAL/MISC/Qt5Port.h> -#include <map> //Qt `#include` <QtCore/QFileSystemWatcher> //STL `#include` <map>Also applies to: 25-25
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/include/OpenMS/VISUAL/FileWatcher.h` around lines 18 - 19, Remove the duplicated include of the C++ header <map> in FileWatcher.h: locate the two occurrences of "#include <map>" (one near the top alongside "#include <OpenMS/VISUAL/MISC/Qt5Port.h>") and delete one so only a single "#include <map>" remains in the header; ensure no other includes or forward declarations are accidentally altered.
29-29: Redundant forward declaration.
class String;is forward-declared on line 29, butOpenMS/DATASTRUCTURES/String.his already included on line 17, making this forward declaration unnecessary.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/include/OpenMS/VISUAL/FileWatcher.h` at line 29, Remove the redundant forward declaration "class String;" from FileWatcher.h; since OpenMS/DATASTRUCTURES/String.h is already included (providing the String type), delete the standalone forward declaration in the OpenMS::FileWatcher header to avoid redundancy and potential confusion.src/openms_gui/source/VISUAL/LayerListView.cpp (1)
82-82: Minor: RedundantString()wrapper.
DataValue::toString()already returnsOpenMS::String, so the explicitString(...)wrapper is unnecessary.♻️ Suggested simplification
- icon.fill(QColor(toQString(String(layer.param.getValue("peak_color").toString())))); + icon.fill(QColor(toQString(layer.param.getValue("peak_color").toString())));🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/source/VISUAL/LayerListView.cpp` at line 82, Remove the redundant String(...) wrapper around the DataValue::toString() call in LayerListView.cpp: replace icon.fill(QColor(toQString(String(layer.param.getValue("peak_color").toString())))); with a call that passes the existing OpenMS::String directly, e.g. icon.fill(QColor(toQString(layer.param.getValue("peak_color").toString()))); so the code uses layer.param.getValue("peak_color").toString() without the extra String(...) construction.src/openms_gui/source/VISUAL/TableView.cpp (1)
151-153: Pre-existing duplicate condition detected.Lines 151-153 are an exact duplicate of lines 147-149 (both check
Qt::DisplayRole). This second branch is unreachable dead code. While not introduced by this PR, consider removing it in a follow-up cleanup.♻️ Suggested removal
else if (ti->data(Qt::DisplayRole).isValid()) { str_list << ti->data(Qt::DisplayRole).toString(); } - else if (ti->data(Qt::DisplayRole).isValid()) - { - str_list << ti->data(Qt::DisplayRole).toString(); - } else🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/source/VISUAL/TableView.cpp` around lines 151 - 153, Remove the unreachable duplicate branch that checks ti->data(Qt::DisplayRole) and appends to str_list: locate the second "else if (ti->data(Qt::DisplayRole).isValid()) { str_list << ti->data(Qt::DisplayRole).toString(); }" in TableView.cpp (inside the method handling item data collection where variable ti and str_list are used) and delete that entire else-if block so only the first DisplayRole branch remains; ensure surrounding else/if flow remains syntactically correct and no other behavior is altered.src/openms_gui/source/VISUAL/OutputDirectory.cpp (1)
58-58: Consider extracting repeated conversion to avoid duplication.The expression calls
fromQString(getDirectory())twice. While functionally correct, this could be simplified for clarity and minor efficiency.♻️ Optional refactor to reduce duplication
void OutputDirectory::showFileDialog() { - QString dir = File::exists(File::path(fromQString(getDirectory()))) ? toQString(File::path(fromQString(getDirectory()))) : ""; + String path = File::path(fromQString(getDirectory())); + QString dir = File::exists(path) ? toQString(path) : ""; QString selected_dir = QFileDialog::getExistingDirectory(this, tr("Select output directory"), dir);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/source/VISUAL/OutputDirectory.cpp` at line 58, The line in OutputDirectory.cpp duplicates the conversion from QString to std::string by calling fromQString(getDirectory()) twice when initializing dir; store the result of fromQString(getDirectory()) in a local variable (e.g., auto dirStr = fromQString(getDirectory())), then call File::path(dirStr) and File::exists(File::path(dirStr)) and use toQString(File::path(dirStr)) to set dir, eliminating the duplicated fromQString call and improving clarity and minor performance.src/openms_gui/source/VISUAL/TOPPASScene.cpp (1)
1309-1315: Use the OpenMS logging path here too.This error branch still writes straight to
std::cerrand usesstd::endl. Since this function is part of the TOPPAS logging flow, please keep it on the OpenMS logging utilities as well and avoid the forced flush.As per coding guidelines, "Use OpenMS logging macros and
OpenMS::LogStream; avoidstd::cout/errdirectly; avoidstd::endlfor performance (use\n) in C++".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms_gui/source/VISUAL/TOPPASScene.cpp` around lines 1309 - 1315, Replace the direct std::cerr write in TOPPASScene::writeToLogFile_ with the OpenMS logging utilities: use OpenMS logging macros or OpenMS::LogStream (e.g. OPENMS_LOG_ERROR or LogStream) to log the "Could not write to logfile" message and append '\n' instead of using std::endl; keep the same file name payload (fromQString(logfile.fileName())) so the error text is unchanged but routed through OpenMS logging.
🤖 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_gui/source/VISUAL/SpectraIDViewTab.cpp`:
- Line 911: Remove the unused local variable assignment by deleting the line
that declares "String s = fromQString(headers.join(';'));" in
SpectraIDViewTab.cpp (the unused variable "s" created from headers.join(';') is
leftover debug code); if the string was intended for further use, instead use
the result directly where needed (e.g., pass fromQString(headers.join(';')) to
the consumer) or store it in a properly named variable that is used.
In `@src/openms_gui/source/VISUAL/VISUALIZER/ContactPersonVisualizer.cpp`:
- Around line 49-58: ContactPersonVisualizer::store currently persists last
name, institution, email, contact info, URL and address but forgets to save the
first name; modify ContactPersonVisualizer::store to read firstname_->text(),
convert via fromQString and call ptr_->setFirstName(...) before assigning temp_
= (*ptr_) so edits to the firstname_ field are persisted (this mirrors update_()
which sets firstname_->setText(...)).
In `@src/topp/INIUpdater.cpp`:
- Around line 214-221: The backup-failure branch for in-place TOPPAS updates
does not record the failed infile in the failed_ collection, so add the same
failure tracking used in the INI path: before returning in the QFile::rename
failure block inside the TOPPAS branch (where outfile.empty(), variables infile,
new_name are used), append the infile (or its normalized form used elsewhere) to
failed_ (e.g., failed_.push_back(infile)) so the failed update is included in
the final summary.
---
Outside diff comments:
In `@src/openms_gui/source/VISUAL/TOPPASOutputVertex.cpp`:
- Around line 69-85: getOutputDir() dereferences *inEdgesBegin() before ensuring
there is any incoming edge, causing UB for unconnected vertices; modify the
function to check for no incoming edges (e.g. compare inEdgesBegin() to
inEdgesEnd() or use the container's empty() check) before dereferencing, and if
empty throw the same Exception::MissingInformation used later; update the branch
that currently does TOPPASEdge* e = *inEdgesBegin() to only dereference after
that guard so the error path is taken for unconnected output vertices.
In `@src/openms_gui/source/VISUAL/TVIdentificationViewController.cpp`:
- Around line 241-265: The loop currently pre-increments i (using ++i) which
skips cols[0] and can index past cols (UB); change the loop to not
pre-increment: treat i as the current color index (start i = 0), replace the
pre-increment condition if (++i == cols.size()) with a check if (i ==
cols.size() - 1) (or if (i+1 == cols.size()) when computing the "more" count) to
detect the final visible slot, use cols[i] and cols[i].name() for rendering the
current formula, and then increment i++ at the end of the loop body (before
continuing) so the next iteration uses the next color; update usages around
formula_to_names iteration and the Annotation1DCaret<Peak1D> creation to rely on
this corrected index behavior.
---
Nitpick comments:
In `@src/openms_gui/include/OpenMS/VISUAL/FileWatcher.h`:
- Around line 18-19: Remove the duplicated include of the C++ header <map> in
FileWatcher.h: locate the two occurrences of "#include <map>" (one near the top
alongside "#include <OpenMS/VISUAL/MISC/Qt5Port.h>") and delete one so only a
single "#include <map>" remains in the header; ensure no other includes or
forward declarations are accidentally altered.
- Line 29: Remove the redundant forward declaration "class String;" from
FileWatcher.h; since OpenMS/DATASTRUCTURES/String.h is already included
(providing the String type), delete the standalone forward declaration in the
OpenMS::FileWatcher header to avoid redundancy and potential confusion.
In `@src/openms_gui/source/VISUAL/LayerListView.cpp`:
- Line 82: Remove the redundant String(...) wrapper around the
DataValue::toString() call in LayerListView.cpp: replace
icon.fill(QColor(toQString(String(layer.param.getValue("peak_color").toString()))));
with a call that passes the existing OpenMS::String directly, e.g.
icon.fill(QColor(toQString(layer.param.getValue("peak_color").toString()))); so
the code uses layer.param.getValue("peak_color").toString() without the extra
String(...) construction.
In `@src/openms_gui/source/VISUAL/OutputDirectory.cpp`:
- Line 58: The line in OutputDirectory.cpp duplicates the conversion from
QString to std::string by calling fromQString(getDirectory()) twice when
initializing dir; store the result of fromQString(getDirectory()) in a local
variable (e.g., auto dirStr = fromQString(getDirectory())), then call
File::path(dirStr) and File::exists(File::path(dirStr)) and use
toQString(File::path(dirStr)) to set dir, eliminating the duplicated fromQString
call and improving clarity and minor performance.
In `@src/openms_gui/source/VISUAL/TableView.cpp`:
- Around line 151-153: Remove the unreachable duplicate branch that checks
ti->data(Qt::DisplayRole) and appends to str_list: locate the second "else if
(ti->data(Qt::DisplayRole).isValid()) { str_list <<
ti->data(Qt::DisplayRole).toString(); }" in TableView.cpp (inside the method
handling item data collection where variable ti and str_list are used) and
delete that entire else-if block so only the first DisplayRole branch remains;
ensure surrounding else/if flow remains syntactically correct and no other
behavior is altered.
In `@src/openms_gui/source/VISUAL/TOPPASScene.cpp`:
- Around line 1309-1315: Replace the direct std::cerr write in
TOPPASScene::writeToLogFile_ with the OpenMS logging utilities: use OpenMS
logging macros or OpenMS::LogStream (e.g. OPENMS_LOG_ERROR or LogStream) to log
the "Could not write to logfile" message and append '\n' instead of using
std::endl; keep the same file name payload (fromQString(logfile.fileName())) so
the error text is unchanged but routed through OpenMS logging.
In `@src/openms_gui/source/VISUAL/TOPPASSplitterVertex.cpp`:
- Line 14: The include Qt5Port.h is currently only referenced by commented-out
code in TOPPASSplitterVertex.cpp (the commented line around line 48), so remove
the unnecessary `#include` <OpenMS/VISUAL/MISC/Qt5Port.h> to avoid dead includes;
alternatively, if the commented code is intended to be re-enabled, uncomment and
update the code that relies on Qt5Port.h (search for the commented usage near
the TOPPASSplitterVertex class) — prefer removing the include if the code
remains commented.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c79219ed-549b-4d9d-adb7-9dc500899835
📒 Files selected for processing (130)
cmake/OpenMSConfig.cmake.incmake/add_library_macros.cmakecmake/cmake_findExternalLibs.cmakecmake/knime_package_support.cmakedocs/superpowers/plans/2026-03-20-remove-qt-from-core.mddocs/superpowers/specs/2026-03-20-remove-qt-from-core-lib-design.mdsrc/openms/CMakeLists.txtsrc/openms/include/OpenMS/DATASTRUCTURES/String.hsrc/openms/source/APPLICATIONS/TOPPBase.cppsrc/openms/source/DATASTRUCTURES/String.cppsrc/openms_gui/include/OpenMS/VISUAL/ANNOTATION/Annotation1DPeakItem.hsrc/openms_gui/include/OpenMS/VISUAL/FileWatcher.hsrc/openms_gui/include/OpenMS/VISUAL/MISC/Qt5Port.hsrc/openms_gui/source/VISUAL/APPLICATIONS/GUITOOLS/TOPPAS.cppsrc/openms_gui/source/VISUAL/APPLICATIONS/GUITOOLS/TOPPView.cppsrc/openms_gui/source/VISUAL/APPLICATIONS/INIFileEditorWindow.cppsrc/openms_gui/source/VISUAL/APPLICATIONS/MISC/QApplicationTOPP.cppsrc/openms_gui/source/VISUAL/APPLICATIONS/TOPPASBase.cppsrc/openms_gui/source/VISUAL/APPLICATIONS/TOPPViewBase.cppsrc/openms_gui/source/VISUAL/DIALOGS/DataFilterDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/FLASHDeconvTabWidget.cppsrc/openms_gui/source/VISUAL/DIALOGS/LayerStatisticsDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/Plot2DGoToDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/PythonModuleRequirement.cppsrc/openms_gui/source/VISUAL/DIALOGS/PythonSelector.cppsrc/openms_gui/source/VISUAL/DIALOGS/SpectrumAlignmentDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/SwathTabWidget.cppsrc/openms_gui/source/VISUAL/DIALOGS/TOPPASIOMappingDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/TOPPASToolConfigDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/TOPPViewOpenDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/TOPPViewPrefDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/TheoreticalSpectrumGenerationDialog.cppsrc/openms_gui/source/VISUAL/DIALOGS/ToolsDialog.cppsrc/openms_gui/source/VISUAL/EnhancedTabBarWidgetInterface.cppsrc/openms_gui/source/VISUAL/FileWatcher.cppsrc/openms_gui/source/VISUAL/FilterList.cppsrc/openms_gui/source/VISUAL/InputFile.cppsrc/openms_gui/source/VISUAL/InputFileList.cppsrc/openms_gui/source/VISUAL/LayerData1DPeak.cppsrc/openms_gui/source/VISUAL/LayerDataBase.cppsrc/openms_gui/source/VISUAL/LayerListView.cppsrc/openms_gui/source/VISUAL/ListEditor.cppsrc/openms_gui/source/VISUAL/LogWindow.cppsrc/openms_gui/source/VISUAL/MISC/ExternalProcessMBox.cppsrc/openms_gui/source/VISUAL/MISC/FilterableList.cppsrc/openms_gui/source/VISUAL/MISC/GUIHelpers.cppsrc/openms_gui/source/VISUAL/OutputDirectory.cppsrc/openms_gui/source/VISUAL/Painter1DBase.cppsrc/openms_gui/source/VISUAL/Painter2DBase.cppsrc/openms_gui/source/VISUAL/ParamEditor.cppsrc/openms_gui/source/VISUAL/Plot1DCanvas.cppsrc/openms_gui/source/VISUAL/Plot2DCanvas.cppsrc/openms_gui/source/VISUAL/Plot3DCanvas.cppsrc/openms_gui/source/VISUAL/Plot3DOpenGLCanvas.cppsrc/openms_gui/source/VISUAL/PlotCanvas.cppsrc/openms_gui/source/VISUAL/PlotWidget.cppsrc/openms_gui/source/VISUAL/RecentFilesMenu.cppsrc/openms_gui/source/VISUAL/SpectraIDViewTab.cppsrc/openms_gui/source/VISUAL/SpectraTreeTab.cppsrc/openms_gui/source/VISUAL/TOPPASEdge.cppsrc/openms_gui/source/VISUAL/TOPPASInputFileListVertex.cppsrc/openms_gui/source/VISUAL/TOPPASMergerVertex.cppsrc/openms_gui/source/VISUAL/TOPPASOutputFileListVertex.cppsrc/openms_gui/source/VISUAL/TOPPASOutputFolderVertex.cppsrc/openms_gui/source/VISUAL/TOPPASOutputVertex.cppsrc/openms_gui/source/VISUAL/TOPPASResources.cppsrc/openms_gui/source/VISUAL/TOPPASScene.cppsrc/openms_gui/source/VISUAL/TOPPASSplitterVertex.cppsrc/openms_gui/source/VISUAL/TOPPASToolVertex.cppsrc/openms_gui/source/VISUAL/TOPPASVertex.cppsrc/openms_gui/source/VISUAL/TOPPASWidget.cppsrc/openms_gui/source/VISUAL/TVDIATreeTabController.cppsrc/openms_gui/source/VISUAL/TVIdentificationViewController.cppsrc/openms_gui/source/VISUAL/TVToolDiscovery.cppsrc/openms_gui/source/VISUAL/TableView.cppsrc/openms_gui/source/VISUAL/TreeView.cppsrc/openms_gui/source/VISUAL/VISUALIZER/AcquisitionInfoVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/AcquisitionVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/ContactPersonVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/DataProcessingVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/DocumentIdentifierVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/ExperimentalSettingsVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/GradientVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/HPLCVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/InstrumentVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/MetaInfoVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/PeptideIdentificationVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/ProteinIdentificationVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/SampleVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/SoftwareVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/SourceFileVisualizer.cppsrc/openms_gui/source/VISUAL/VISUALIZER/SpectrumSettingsVisualizer.cppsrc/tests/class_tests/openms/CMakeLists.txtsrc/tests/class_tests/openms/source/DataValue_test.cppsrc/tests/class_tests/openms/source/MzMLSqliteHandler_test.cppsrc/tests/class_tests/openms/source/MzMLSqliteSwathHandler_test.cppsrc/tests/class_tests/openms/source/OPXLHelper_test.cppsrc/tests/class_tests/openms/source/PeptideIndexing_test.cppsrc/tests/class_tests/openms/source/PythonInfo_test.cppsrc/tests/class_tests/openms/source/SiriusFragmentAnnotation_test.cppsrc/tests/class_tests/openms/source/SqMassFile_test.cppsrc/tests/class_tests/openms/source/StringListUtils_test.cppsrc/tests/class_tests/openms/source/String_test.cppsrc/tests/class_tests/openms/source/ToolDescriptionFile_test.cppsrc/tests/class_tests/openms/source/XQuestResultXMLFile_test.cppsrc/topp/AssayGeneratorMetaboSirius.cppsrc/topp/CMakeLists.txtsrc/topp/CometAdapter.cppsrc/topp/ExecutePipeline.cppsrc/topp/FeatureFinderMultiplex.cppsrc/topp/GenericWrapper.cppsrc/topp/IDRipper.cppsrc/topp/INIUpdater.cppsrc/topp/ImageCreator.cppsrc/topp/LuciphorAdapter.cppsrc/topp/MaRaClusterAdapter.cppsrc/topp/MapStatistics.cppsrc/topp/MetaProSIP.cppsrc/topp/MzMLSplitter.cppsrc/topp/NucleicAcidSearchEngine.cppsrc/topp/OpenSwathFileSplitter.cppsrc/topp/OpenSwathWorkflow.cppsrc/topp/PSMFeatureExtractor.cppsrc/topp/QCEmbedder.cppsrc/topp/QCExporter.cppsrc/topp/QCExtractor.cppsrc/topp/QCImporter.cppsrc/topp/QCMerger.cppsrc/topp/QCShrinker.cppsrc/topp/Resampler.cpp
💤 Files with no reviewable changes (21)
- src/tests/class_tests/openms/source/SqMassFile_test.cpp
- src/topp/QCExporter.cpp
- cmake/OpenMSConfig.cmake.in
- src/tests/class_tests/openms/source/XQuestResultXMLFile_test.cpp
- src/topp/NucleicAcidSearchEngine.cpp
- src/tests/class_tests/openms/source/SiriusFragmentAnnotation_test.cpp
- src/tests/class_tests/openms/source/MzMLSqliteSwathHandler_test.cpp
- src/topp/QCImporter.cpp
- src/tests/class_tests/openms/source/StringListUtils_test.cpp
- src/topp/Resampler.cpp
- src/tests/class_tests/openms/source/DataValue_test.cpp
- src/topp/MapStatistics.cpp
- src/topp/PSMFeatureExtractor.cpp
- src/openms/CMakeLists.txt
- src/tests/class_tests/openms/source/OPXLHelper_test.cpp
- src/topp/QCMerger.cpp
- src/openms/source/APPLICATIONS/TOPPBase.cpp
- src/topp/LuciphorAdapter.cpp
- src/openms/source/DATASTRUCTURES/String.cpp
- src/topp/FeatureFinderMultiplex.cpp
- src/openms/include/OpenMS/DATASTRUCTURES/String.h
Qt6::Core find_package is now QUIET instead of REQUIRED — when Qt is not installed (e.g., pyOpenMS wheel builds), cmake configures successfully and only libOpenMS is built. TOPP tools and tests that need Qt6::Core are guarded with if(TARGET Qt6::Core). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Replace Qt types (QDir, QFile, QStringList) with std equivalents (std::filesystem, std::vector<std::string>) and remove Qt6::Core link dependency from these test targets. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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/tests/class_tests/openms/source/FIAMSScheduler_test.cpp`:
- Line 49: Replace the use of std::filesystem::current_path().string() when
building tmp_dir in FIAMSScheduler_test.cpp with
std::filesystem::current_path().generic_string() so the constructed String
tmp_dir uses forward-slash separators consistently (i.e., change the expression
that sets tmp_dir to use generic_string() + "/" to avoid mixed
backslash/forward-slash paths).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f3eb9b1d-3b3a-4e15-b195-fbb3511c31b0
📒 Files selected for processing (6)
src/tests/class_tests/openms/CMakeLists.txtsrc/tests/class_tests/openms/source/FIAMSScheduler_test.cppsrc/tests/class_tests/openms/source/MzMLSqliteHandler_test.cppsrc/tests/class_tests/openms/source/PeptideIndexing_test.cppsrc/tests/class_tests/openms/source/PythonInfo_test.cppsrc/tests/class_tests/openms/source/ToolDescriptionFile_test.cpp
✅ Files skipped from review due to trivial changes (3)
- src/tests/class_tests/openms/CMakeLists.txt
- src/tests/class_tests/openms/source/MzMLSqliteHandler_test.cpp
- src/tests/class_tests/openms/source/PeptideIndexing_test.cpp
🚧 Files skipped from review as they are similar to previous changes (2)
- src/tests/class_tests/openms/source/PythonInfo_test.cpp
- src/tests/class_tests/openms/source/ToolDescriptionFile_test.cpp
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…arators) - ContactPersonVisualizer::store(): persist first name field (was skipped) - INIUpdater: track TOPPAS backup failures in failed_ list for summary - FIAMSScheduler_test: use generic_string() to avoid mixed path separators Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
On Windows, std::filesystem::path uses wstring internally and cannot implicitly convert from OpenMS::String. Wrap with std::string() to match the pattern used in other test files. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Use brace initialization for std::filesystem::path to prevent the compiler from interpreting the declaration as a function prototype. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add missing changelog entries for: - BREAKING: Qt string API removal from String/DataValue (#8940) - BREAKING: Qt6::Core removed from libOpenMS PUBLIC CMake deps (#8965) - BREAKING: Transitive includes trimmed from KERNEL/METADATA headers (#8946) - Fix: segfault in FeatureLinkerUnlabeledKD with charge_merging=Any (#8944) Co-authored-by: Copilot <[email protected]>
Add missing changelog entries for: - BREAKING: Qt string API removal from String/DataValue (#8940) - BREAKING: Qt6::Core removed from libOpenMS PUBLIC CMake deps (#8965) - BREAKING: Transitive includes trimmed from KERNEL/METADATA headers (#8946) - Fix: segfault in FeatureLinkerUnlabeledKD with charge_merging=Any (#8944) Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
After the Qt removal refactoring (#8937-#8940, #8965), Qt6::Core is no longer a dependency of libOpenMS itself. Update AGENTS.md to reflect that Qt6 is required only for TOPP tools and GUI (openms_gui) builds, and is optional when building only the core library or pyOpenMS. Co-authored-by: Copilot <[email protected]>
…8977) After the Qt removal refactoring (#8937-#8940, #8965), Qt6::Core is no longer a dependency of libOpenMS itself. Update AGENTS.md to reflect that Qt6 is required only for TOPP tools and GUI (openms_gui) builds, and is optional when building only the core library or pyOpenMS. Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
… throws (#9334) - Drop the "If you want safe conversions, use QtByteArray" line -- Qt has been removed from OpenMS core (PR #8965), the reference is stale and misleading. - Add @InGroup FileIO. - Surface the three throw paths on compressString / compressData (OutOfMemory, InvalidValue, ConversionError), verified against ZlibCompression.cpp:36-48. - Tighten the uncompressData doc: spell out the two code paths (known vs unknown output size) and document the nr_bytes==0 shortcut (ZlibCompression.cpp:55-58). Note that the "actual size smaller than output_size" path resizes and logs informational (not a throw) (ZlibCompression.cpp:64-71). - Promote uncompressString from a one-line "Convencience" (typo) summary to a proper block that delegates @throws to uncompressData. No behaviour change. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Summary
String(const QString&)constructor andtoQString()method from coreOpenMS::StringclassQt6::CorefromlibOpenMSpublic dependencies — the core library no longer links or depends on QttoQString()/fromQString()free functions inQt5Port.h(openms_gui) as compatibility layerlibOpenMSdon't need QtQt6::Corelink deps for TOPP tools and tests that directly use Qt headersBreaking change: Downstream C++ code using
String(qstr)orstr.toQString()must switch toQt5Port.hfree functions or directQString::fromStdString()/.toStdString()conversions.Motivation
pyOpenMS and other non-GUI consumers should not require Qt as a transitive dependency. After prior PRs replaced QDir/QFile (#8938), QProcess (#8939), QDateTime (#8937), and QJson (#8936), only String/QString interop remained. This PR completes the effort.
Test plan
nm -D libOpenMS.so | grep qstringreturns zero hitsctestfull suite passes🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Summary by CodeRabbit
Refactor
Build System
Documentation
Chores / CI
Tests