From 4ba24c591a9a84fbfb6c0329b787d73f98a2b23b Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Mon, 16 Oct 2023 14:21:38 +0200 Subject: [PATCH] fix some warnings --- plotjuggler_app/curvelist_panel.cpp | 2 +- plotjuggler_app/curvetree_view.cpp | 6 +++--- plotjuggler_app/main.cpp | 2 +- plotjuggler_app/mainwindow.cpp | 10 +++++----- plotjuggler_app/plot_docker.cpp | 2 +- plotjuggler_app/transforms/function_editor.cpp | 2 +- plotjuggler_app/tree_completer.h | 2 +- plotjuggler_plugins/PluginsZcm/dataload_zcm.cpp | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/plotjuggler_app/curvelist_panel.cpp b/plotjuggler_app/curvelist_panel.cpp index 9abf72e9d..445e91d66 100644 --- a/plotjuggler_app/curvelist_panel.cpp +++ b/plotjuggler_app/curvelist_panel.cpp @@ -407,7 +407,7 @@ QString StringifyArray(QString str) QString CurveListPanel::getTreeName(QString name) { - auto parts = name.split('/', QString::SplitBehavior::SkipEmptyParts); + auto parts = name.split('/', Qt::SkipEmptyParts); QString out; for (int i = 0; i < parts.size(); i++) diff --git a/plotjuggler_app/curvetree_view.cpp b/plotjuggler_app/curvetree_view.cpp index eb367080f..1bf4f38b5 100644 --- a/plotjuggler_app/curvetree_view.cpp +++ b/plotjuggler_app/curvetree_view.cpp @@ -85,7 +85,7 @@ void CurveTreeView::addItem(const QString& group_name, const QString& tree_name, QStringList parts; if (use_separator) { - parts = tree_name.split('/', QString::SplitBehavior::SkipEmptyParts); + parts = tree_name.split('/', Qt::SkipEmptyParts); } else { @@ -99,7 +99,7 @@ void CurveTreeView::addItem(const QString& group_name, const QString& tree_name, bool prefix_is_group = tree_name.startsWith(group_name); bool hasGroup = !group_name.isEmpty(); - auto group_parts = group_name.split('/', QString::SplitBehavior::SkipEmptyParts); + auto group_parts = group_name.split('/', Qt::SkipEmptyParts); if (hasGroup && !prefix_is_group) { @@ -213,7 +213,7 @@ bool CurveTreeView::applyVisibilityFilter(const QString& search_string) bool updated = false; _hidden_count = 0; - QStringList spaced_items = search_string.split(' ', QString::SkipEmptyParts); + QStringList spaced_items = search_string.split(' ', Qt::SkipEmptyParts); auto hideFunc = [&](QTreeWidgetItem* item) { QString name = item->data(0, Qt::UserRole).toString(); diff --git a/plotjuggler_app/main.cpp b/plotjuggler_app/main.cpp index 13e3dfd11..b13fda7b1 100644 --- a/plotjuggler_app/main.cpp +++ b/plotjuggler_app/main.cpp @@ -132,7 +132,7 @@ std::vector MergeArguments(const std::vector& args) { #ifdef PJ_DEFAULT_ARGS auto default_cmdline_args = - QString(PJ_DEFAULT_ARGS).split(" ", QString::SkipEmptyParts); + QString(PJ_DEFAULT_ARGS).split(" ", Qt::SkipEmptyParts); std::vector new_args; new_args.push_back(args.front()); diff --git a/plotjuggler_app/mainwindow.cpp b/plotjuggler_app/mainwindow.cpp index 46e22fa09..aacc103ee 100644 --- a/plotjuggler_app/mainwindow.cpp +++ b/plotjuggler_app/mainwindow.cpp @@ -93,7 +93,7 @@ MainWindow::MainWindow(const QCommandLineParser& commandline_parser, QWidget* pa if (commandline_parser.isSet("enabled_plugins")) { _enabled_plugins = - commandline_parser.value("enabled_plugins").split(";", QString::SkipEmptyParts); + commandline_parser.value("enabled_plugins").split(";", Qt::SkipEmptyParts); // Treat the command-line parameter '--enabled_plugins *' to mean all plugings are // enabled if ((_enabled_plugins.size() == 1) && (_enabled_plugins.contains("*"))) @@ -104,7 +104,7 @@ MainWindow::MainWindow(const QCommandLineParser& commandline_parser, QWidget* pa if (commandline_parser.isSet("disabled_plugins")) { _disabled_plugins = - commandline_parser.value("disabled_plugins").split(";", QString::SkipEmptyParts); + commandline_parser.value("disabled_plugins").split(";", Qt::SkipEmptyParts); } _curvelist_widget = new CurveListPanel(_mapped_plot_data, _transform_functions, this); @@ -240,7 +240,7 @@ MainWindow::MainWindow(const QCommandLineParser& commandline_parser, QWidget* pa //------------ Load plugins ------------- auto plugin_extra_folders = - commandline_parser.value("plugin_folders").split(";", QString::SkipEmptyParts); + commandline_parser.value("plugin_folders").split(";", Qt::SkipEmptyParts); _default_streamer = commandline_parser.value("start_streamer"); @@ -2065,7 +2065,7 @@ bool MainWindow::loadLayoutFromFile(QString filename) QDomElement datasources_elem = datafile_elem.firstChildElement("selected_" "datasources"); QString topics_list = datasources_elem.attribute("value"); - info.selected_datasources = topics_list.split(";", QString::SkipEmptyParts); + info.selected_datasources = topics_list.split(";", Qt::SkipEmptyParts); auto plugin_elem = datafile_elem.firstChildElement("plugin"); info.plugin_config.appendChild(info.plugin_config.importNode(plugin_elem, true)); @@ -3184,7 +3184,7 @@ void MainWindow::on_pushButtonSaveLayout_clicked() if (file.open(QIODevice::WriteOnly)) { QTextStream stream(&file); - stream << doc.toString() << endl; + stream << doc.toString() << Qt::endl; } } diff --git a/plotjuggler_app/plot_docker.cpp b/plotjuggler_app/plot_docker.cpp index 17f8af225..fa87b8043 100644 --- a/plotjuggler_app/plot_docker.cpp +++ b/plotjuggler_app/plot_docker.cpp @@ -169,7 +169,7 @@ void PlotDocker::restoreSplitter(QDomElement elem, DockWidget* widget) (orientation == Qt::Horizontal) ? widgets[i]->width() : widgets[i]->height(); } - auto sizes_str = elem.attribute("sizes").splitRef(";", QString::SkipEmptyParts); + auto sizes_str = elem.attribute("sizes").splitRef(";", Qt::SkipEmptyParts); QList sizes; for (int i = 0; i < splitter_count; i++) diff --git a/plotjuggler_app/transforms/function_editor.cpp b/plotjuggler_app/transforms/function_editor.cpp index d05716373..8557a6798 100644 --- a/plotjuggler_app/transforms/function_editor.cpp +++ b/plotjuggler_app/transforms/function_editor.cpp @@ -918,7 +918,7 @@ void FunctionEditorWidget::onLineEditTab2FilterChanged() } else { - QStringList spaced_items = filter_text.split(' ', QString::SkipEmptyParts); + QStringList spaced_items = filter_text.split(' ', Qt::SkipEmptyParts); for (const auto& [name, plotdata] : _plot_map_data.numeric) { bool show = true; diff --git a/plotjuggler_app/tree_completer.h b/plotjuggler_app/tree_completer.h index c2c1f6925..78328da1b 100644 --- a/plotjuggler_app/tree_completer.h +++ b/plotjuggler_app/tree_completer.h @@ -72,7 +72,7 @@ class TreeModel : public QAbstractItemModel { } void addToTree(const QString& name, int reference_row) { - auto parts = name.split('/', QString::SplitBehavior::SkipEmptyParts); + auto parts = name.split('/', Qt::SkipEmptyParts); if (parts.size() == 0) { return; } diff --git a/plotjuggler_plugins/PluginsZcm/dataload_zcm.cpp b/plotjuggler_plugins/PluginsZcm/dataload_zcm.cpp index ab0a17417..621ad79c8 100644 --- a/plotjuggler_plugins/PluginsZcm/dataload_zcm.cpp +++ b/plotjuggler_plugins/PluginsZcm/dataload_zcm.cpp @@ -110,7 +110,7 @@ static int processInputLog(const string& logpath, if (verbose) { if (lastPrintPercent != 100 && !interrupted) cout << "\r" << "Percent Complete: 100" << flush; - cout << endl; + cout << Qt::endl; } if (interrupted) progress_dialog.cancel();