diff --git a/canframemodel.cpp b/canframemodel.cpp index 3a4d198..496a165 100644 --- a/canframemodel.cpp +++ b/canframemodel.cpp @@ -156,7 +156,7 @@ void CANFrameModel::clearFrames() //Is this safe? Maybe not but if we don't change it then that's OK //Is it the best C++ practice? Probably not. This breaks the MVC paradigm //but, it's for a good cause. -QList* CANFrameModel::getListReference() +QVector* CANFrameModel::getListReference() { return &frames; } diff --git a/canframemodel.h b/canframemodel.h index bea2174..21c6d68 100644 --- a/canframemodel.h +++ b/canframemodel.h @@ -3,6 +3,7 @@ #include #include +#include #include "can_structs.h" #include "dbchandler.h" @@ -26,11 +27,11 @@ public: void setDBCHandler(DBCHandler *); void setInterpetMode(bool); void setOverwriteMode(bool); - QList *getListReference(); + QVector *getListReference(); private: - QList frames; + QVector frames; DBCHandler *dbcHandler; bool interpretFrames; //should we use the dbcHandler? bool overwriteDups; //should we display all frames or only the newest for each ID? diff --git a/flowviewwindow.cpp b/flowviewwindow.cpp index 4c9b1b1..4eea706 100644 --- a/flowviewwindow.cpp +++ b/flowviewwindow.cpp @@ -5,7 +5,7 @@ const QColor FlowViewWindow::graphColors[8] = {Qt::blue, Qt::green, Qt::black, Q Qt::gray, Qt::yellow, Qt::cyan, Qt::darkMagenta}; -FlowViewWindow::FlowViewWindow(QList *frames, QWidget *parent) : +FlowViewWindow::FlowViewWindow(QVector *frames, QWidget *parent) : QDialog(parent), ui(new Ui::FlowViewWindow) { diff --git a/flowviewwindow.h b/flowviewwindow.h index 8ad175e..f1cc229 100644 --- a/flowviewwindow.h +++ b/flowviewwindow.h @@ -13,7 +13,7 @@ class FlowViewWindow : public QDialog Q_OBJECT public: - explicit FlowViewWindow(QList *frames, QWidget *parent = 0); + explicit FlowViewWindow(QVector *frames, QWidget *parent = 0); ~FlowViewWindow(); private slots: @@ -32,7 +32,7 @@ private: Ui::FlowViewWindow *ui; QList foundID; QList frameCache; - QList *modelFrames; + QVector *modelFrames; unsigned char refBytes[8]; unsigned char currBytes[8]; int currentPosition; diff --git a/frameinfowindow.cpp b/frameinfowindow.cpp index 109d956..7b3385e 100644 --- a/frameinfowindow.cpp +++ b/frameinfowindow.cpp @@ -2,7 +2,7 @@ #include "ui_frameinfowindow.h" #include -FrameInfoWindow::FrameInfoWindow(QList *frames, QWidget *parent) : +FrameInfoWindow::FrameInfoWindow(QVector *frames, QWidget *parent) : QDialog(parent), ui(new Ui::FrameInfoWindow) { diff --git a/frameinfowindow.h b/frameinfowindow.h index ca5593a..0a9a0f8 100644 --- a/frameinfowindow.h +++ b/frameinfowindow.h @@ -14,7 +14,7 @@ class FrameInfoWindow : public QDialog Q_OBJECT public: - explicit FrameInfoWindow(QList *frames, QWidget *parent = 0); + explicit FrameInfoWindow(QVector *frames, QWidget *parent = 0); ~FrameInfoWindow(); private slots: @@ -25,7 +25,7 @@ private: QList foundID; QList frameCache; - QList *modelFrames; + QVector *modelFrames; void refreshIDList(); }; diff --git a/frameplaybackwindow.cpp b/frameplaybackwindow.cpp index 14ee853..5405487 100644 --- a/frameplaybackwindow.cpp +++ b/frameplaybackwindow.cpp @@ -2,7 +2,7 @@ #include "ui_frameplaybackwindow.h" #include -FramePlaybackWindow::FramePlaybackWindow(QList *frames, QWidget *parent) : +FramePlaybackWindow::FramePlaybackWindow(QVector *frames, QWidget *parent) : QDialog(parent), ui(new Ui::FramePlaybackWindow) { diff --git a/frameplaybackwindow.h b/frameplaybackwindow.h index d4a8be3..d962457 100644 --- a/frameplaybackwindow.h +++ b/frameplaybackwindow.h @@ -15,7 +15,7 @@ class FramePlaybackWindow : public QDialog Q_OBJECT public: - explicit FramePlaybackWindow(QList *frames, QWidget *parent = 0); + explicit FramePlaybackWindow(QVector *frames, QWidget *parent = 0); ~FramePlaybackWindow(); private slots: @@ -40,7 +40,7 @@ private: Ui::FramePlaybackWindow *ui; QList foundID; QList frameCache; - QList *modelFrames; + QVector *modelFrames; int currentPosition; QTimer *playbackTimer; bool playbackActive; diff --git a/framesenderwindow.cpp b/framesenderwindow.cpp index ab6f292..77392cb 100644 --- a/framesenderwindow.cpp +++ b/framesenderwindow.cpp @@ -2,7 +2,7 @@ #include "ui_framesenderwindow.h" #include "utility.h" -FrameSenderWindow::FrameSenderWindow(QList *frames, QWidget *parent) : +FrameSenderWindow::FrameSenderWindow(QVector *frames, QWidget *parent) : QDialog(parent), ui(new Ui::FrameSenderWindow) { diff --git a/framesenderwindow.h b/framesenderwindow.h index ff6ad39..2360240 100644 --- a/framesenderwindow.h +++ b/framesenderwindow.h @@ -15,7 +15,7 @@ class FrameSenderWindow : public QDialog Q_OBJECT public: - explicit FrameSenderWindow(QList *frames, QWidget *parent = 0); + explicit FrameSenderWindow(QVector *frames, QWidget *parent = 0); ~FrameSenderWindow(); private slots: @@ -26,7 +26,7 @@ private: Ui::FrameSenderWindow *ui; QList sendingData; QList frameCache; - QList *modelFrames; + QVector *modelFrames; QTimer *intervalTimer; void doModifiers(int); diff --git a/graphingwindow.cpp b/graphingwindow.cpp index 3d7fdd1..3d84ca2 100644 --- a/graphingwindow.cpp +++ b/graphingwindow.cpp @@ -3,7 +3,7 @@ #include "newgraphdialog.h" #include -GraphingWindow::GraphingWindow(QList *frames, QWidget *parent) : +GraphingWindow::GraphingWindow(QVector *frames, QWidget *parent) : QDialog(parent), ui(new Ui::GraphingWindow) { diff --git a/graphingwindow.h b/graphingwindow.h index afe8e65..4748049 100644 --- a/graphingwindow.h +++ b/graphingwindow.h @@ -29,7 +29,7 @@ class GraphingWindow : public QDialog Q_OBJECT public: - explicit GraphingWindow(QList *, QWidget *parent = 0); + explicit GraphingWindow(QVector *, QWidget *parent = 0); ~GraphingWindow(); private slots: @@ -50,7 +50,7 @@ private slots: private: Ui::GraphingWindow *ui; QList frameCache; - QList *modelFrames; + QVector *modelFrames; QList graphParams; QPen selectedPen; diff --git a/mainwindow.cpp b/mainwindow.cpp index 5a3fbd7..515aca6 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -248,7 +248,7 @@ void MainWindow::loadCRTDFile(QString filename) void MainWindow::saveCRTDFile(QString filename) { QFile *outFile = new QFile(filename); - QList *frames = model->getListReference(); + QVector *frames = model->getListReference(); if (!outFile->open(QIODevice::WriteOnly | QIODevice::Text)) return; @@ -328,7 +328,7 @@ void MainWindow::loadNativeCSVFile(QString filename) void MainWindow::saveNativeCSVFile(QString filename) { QFile *outFile = new QFile(filename); - QList *frames = model->getListReference(); + QVector *frames = model->getListReference(); if (!outFile->open(QIODevice::WriteOnly | QIODevice::Text)) return;