Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Oct 16, 2023
1 parent c84821a commit 4ba24c5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion plotjuggler_app/curvelist_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down
6 changes: 3 additions & 3 deletions plotjuggler_app/curvetree_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion plotjuggler_app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ std::vector<std::string> MergeArguments(const std::vector<std::string>& 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<std::string> new_args;
new_args.push_back(args.front());
Expand Down
10 changes: 5 additions & 5 deletions plotjuggler_app/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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("*")))
Expand All @@ -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);
Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion plotjuggler_app/plot_docker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> sizes;

for (int i = 0; i < splitter_count; i++)
Expand Down
2 changes: 1 addition & 1 deletion plotjuggler_app/transforms/function_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion plotjuggler_app/tree_completer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion plotjuggler_plugins/PluginsZcm/dataload_zcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4ba24c5

Please sign in to comment.