Skip to content

Commit 9fe667e

Browse files
committed
fix warning and includes
1 parent a55906e commit 9fe667e

File tree

12 files changed

+36
-31
lines changed

12 files changed

+36
-31
lines changed

plotjuggler_app/curvelist_panel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ QString StringifyArray(QString str)
407407

408408
QString CurveListPanel::getTreeName(QString name)
409409
{
410-
auto parts = name.split('/', QString::SplitBehavior::SkipEmptyParts);
410+
auto parts = name.split('/', PJ::SkipEmptyParts);
411411

412412
QString out;
413413
for (int i = 0; i < parts.size(); i++)

plotjuggler_app/curvetree_view.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void CurveTreeView::addItem(const QString& group_name, const QString& tree_name,
8585
QStringList parts;
8686
if (use_separator)
8787
{
88-
parts = tree_name.split('/', QString::SplitBehavior::SkipEmptyParts);
88+
parts = tree_name.split('/', PJ::SkipEmptyParts);
8989
}
9090
else
9191
{
@@ -99,7 +99,7 @@ void CurveTreeView::addItem(const QString& group_name, const QString& tree_name,
9999

100100
bool prefix_is_group = tree_name.startsWith(group_name);
101101
bool hasGroup = !group_name.isEmpty();
102-
auto group_parts = group_name.split('/', QString::SplitBehavior::SkipEmptyParts);
102+
auto group_parts = group_name.split('/', PJ::SkipEmptyParts);
103103

104104
if (hasGroup && !prefix_is_group)
105105
{
@@ -213,7 +213,7 @@ bool CurveTreeView::applyVisibilityFilter(const QString& search_string)
213213
bool updated = false;
214214
_hidden_count = 0;
215215

216-
QStringList spaced_items = search_string.split(' ', QString::SkipEmptyParts);
216+
QStringList spaced_items = search_string.split(' ', PJ::SkipEmptyParts);
217217

218218
auto hideFunc = [&](QTreeWidgetItem* item) {
219219
QString name = item->data(0, Qt::UserRole).toString();

plotjuggler_app/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ QPixmap getFunnySplashscreen()
158158
std::vector<std::string> MergeArguments(const std::vector<std::string>& args)
159159
{
160160
#ifdef PJ_DEFAULT_ARGS
161-
auto default_cmdline_args =
162-
QString(PJ_DEFAULT_ARGS).split(" ", QString::SkipEmptyParts);
161+
auto default_cmdline_args = QString(PJ_DEFAULT_ARGS).split(" ", PJ::SkipEmptyParts);
163162

164163
std::vector<std::string> new_args;
165164
new_args.push_back(args.front());

plotjuggler_app/mainwindow.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ MainWindow::MainWindow(const QCommandLineParser& commandline_parser, QWidget* pa
9191
if (commandline_parser.isSet("enabled_plugins"))
9292
{
9393
_enabled_plugins =
94-
commandline_parser.value("enabled_plugins").split(";", QString::SkipEmptyParts);
94+
commandline_parser.value("enabled_plugins").split(";", PJ::SkipEmptyParts);
9595
// Treat the command-line parameter '--enabled_plugins *' to mean all plugings are
9696
// enabled
9797
if ((_enabled_plugins.size() == 1) && (_enabled_plugins.contains("*")))
@@ -102,7 +102,7 @@ MainWindow::MainWindow(const QCommandLineParser& commandline_parser, QWidget* pa
102102
if (commandline_parser.isSet("disabled_plugins"))
103103
{
104104
_disabled_plugins =
105-
commandline_parser.value("disabled_plugins").split(";", QString::SkipEmptyParts);
105+
commandline_parser.value("disabled_plugins").split(";", PJ::SkipEmptyParts);
106106
}
107107

108108
_curvelist_widget = new CurveListPanel(_mapped_plot_data, _transform_functions, this);
@@ -240,7 +240,7 @@ MainWindow::MainWindow(const QCommandLineParser& commandline_parser, QWidget* pa
240240

241241
//------------ Load plugins -------------
242242
auto plugin_extra_folders =
243-
commandline_parser.value("plugin_folders").split(";", QString::SkipEmptyParts);
243+
commandline_parser.value("plugin_folders").split(";", PJ::SkipEmptyParts);
244244

245245
_default_streamer = commandline_parser.value("start_streamer");
246246

@@ -3196,7 +3196,7 @@ void MainWindow::on_buttonSaveLayout_clicked()
31963196
if (file.open(QIODevice::WriteOnly))
31973197
{
31983198
QTextStream stream(&file);
3199-
stream << doc.toString() << endl;
3199+
stream << doc.toString() << "\n";
32003200
}
32013201
}
32023202

plotjuggler_app/transforms/function_editor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ void FunctionEditorWidget::onLineEditTab2FilterChanged()
918918
}
919919
else
920920
{
921-
QStringList spaced_items = filter_text.split(' ', QString::SkipEmptyParts);
921+
QStringList spaced_items = filter_text.split(' ', PJ::SkipEmptyParts);
922922
for (const auto& [name, plotdata] : _plot_map_data.numeric)
923923
{
924924
bool show = true;

plotjuggler_app/transforms/lua_custom_function.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "custom_function.h"
55
#include "sol.hpp"
66

7+
#include <mutex>
8+
79
class LuaCustomFunction : public CustomFunction
810
{
911
public:

plotjuggler_app/tree_completer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class TreeModel : public QAbstractItemModel {
7272
}
7373
7474
void addToTree(const QString& name, int reference_row) {
75-
auto parts = name.split('/', QString::SplitBehavior::SkipEmptyParts);
75+
auto parts = name.split('/', PJ::SkipEmptyParts);
7676
if (parts.size() == 0) {
7777
return;
7878
}

plotjuggler_base/include/PlotJuggler/plotdata.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "plotdatabase.h"
1111
#include "timeseries.h"
1212
#include "stringseries.h"
13+
#include <any>
1314

1415
namespace PJ
1516
{

plotjuggler_base/include/PlotJuggler/plotdatabase.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,13 @@
77
#ifndef PJ_PLOTDATA_BASE_H
88
#define PJ_PLOTDATA_BASE_H
99

10-
#include <vector>
1110
#include <memory>
1211
#include <string>
13-
#include <map>
14-
#include <mutex>
1512
#include <deque>
1613
#include <type_traits>
17-
#include <iostream>
1814
#include <cmath>
1915
#include <cstdlib>
2016
#include <unordered_map>
21-
#include <set>
22-
#include <string_view>
23-
#include <any>
2417
#include <optional>
2518
#include <QVariant>
2619

@@ -32,6 +25,12 @@ struct Range
3225
double max;
3326
};
3427

28+
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
29+
const auto SkipEmptyParts = Qt::SkipEmptyParts;
30+
#else
31+
const auto SkipEmptyParts = QString::SkipEmptyParts;
32+
#endif
33+
3534
typedef std::optional<Range> RangeOpt;
3635

3736
// Attributes supported by the GUI.

plotjuggler_plugins/DataLoadCSV/dataload_csv.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
#include "datetimehelp.h"
12
#include "dataload_csv.h"
3+
24
#include <QTextStream>
35
#include <QFile>
46
#include <QMessageBox>
@@ -9,8 +11,9 @@
911
#include <QInputDialog>
1012
#include <QPushButton>
1113
#include <QSyntaxStyle>
14+
1215
#include <array>
13-
#include "datetimehelp.h"
16+
#include <set>
1417

1518
#include <QStandardItemModel>
1619

0 commit comments

Comments
 (0)