A few small changes, correct dialog title, change memory preallocation, explain file IO a bit.
This commit is contained in:
+2
-2
@@ -47,12 +47,12 @@ CANFrameModel::CANFrameModel(QObject *parent)
|
|||||||
if (QSysInfo::WordSize > 32)
|
if (QSysInfo::WordSize > 32)
|
||||||
{
|
{
|
||||||
qDebug() << "64 bit OS detected. Requesting a large preallocation";
|
qDebug() << "64 bit OS detected. Requesting a large preallocation";
|
||||||
preallocSize = 50000000;
|
preallocSize = 20000000;
|
||||||
}
|
}
|
||||||
else //if compiling for 32 bit you can't ask for gigabytes of preallocation so tone it down.
|
else //if compiling for 32 bit you can't ask for gigabytes of preallocation so tone it down.
|
||||||
{
|
{
|
||||||
qDebug() << "32 bit OS detected. Requesting a much restricted prealloc";
|
qDebug() << "32 bit OS detected. Requesting a much restricted prealloc";
|
||||||
preallocSize = 5000000;
|
preallocSize = 4000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
frames.reserve(preallocSize);
|
frames.reserve(preallocSize);
|
||||||
|
|||||||
+8
-2
@@ -22,6 +22,14 @@ class FrameFileIO: public QObject
|
|||||||
public:
|
public:
|
||||||
FrameFileIO();
|
FrameFileIO();
|
||||||
|
|
||||||
|
//these present a GUI to the user and allow them to pick the file to load/save
|
||||||
|
//The QString returns the filename that was selected and so is really a sort of return value
|
||||||
|
//The QVector is used as either the target for loading or the source for saving.
|
||||||
|
//These routines call the below loading/saving functions so no need to use them directly if you don't want.
|
||||||
|
static bool loadFrameFile(QString &, QVector<CANFrame>*);
|
||||||
|
static bool saveFrameFile(QString &, const QVector<CANFrame>*);
|
||||||
|
|
||||||
|
//These do the actual loading and saving and can be used directly if you'd prefer
|
||||||
static bool loadCRTDFile(QString, QVector<CANFrame>*);
|
static bool loadCRTDFile(QString, QVector<CANFrame>*);
|
||||||
static bool loadNativeCSVFile(QString, QVector<CANFrame>*);
|
static bool loadNativeCSVFile(QString, QVector<CANFrame>*);
|
||||||
static bool loadGenericCSVFile(QString, QVector<CANFrame>*);
|
static bool loadGenericCSVFile(QString, QVector<CANFrame>*);
|
||||||
@@ -40,8 +48,6 @@ public:
|
|||||||
static bool saveIXXATFile(QString, const QVector<CANFrame>*);
|
static bool saveIXXATFile(QString, const QVector<CANFrame>*);
|
||||||
static bool saveCANDOFile(QString, const QVector<CANFrame>*);
|
static bool saveCANDOFile(QString, const QVector<CANFrame>*);
|
||||||
static bool saveVehicleSpyFile(QString, const QVector<CANFrame>*);
|
static bool saveVehicleSpyFile(QString, const QVector<CANFrame>*);
|
||||||
static bool loadFrameFile(QString &, QVector<CANFrame>*);
|
|
||||||
static bool saveFrameFile(QString &, const QVector<CANFrame>*);
|
|
||||||
static bool loadCanDumpFile(QString, QVector<CANFrame>*);
|
static bool loadCanDumpFile(QString, QVector<CANFrame>*);
|
||||||
static bool loadPCANFile(QString, QVector<CANFrame>*);
|
static bool loadPCANFile(QString, QVector<CANFrame>*);
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Firmware Updater</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item alignment="Qt::AlignHCenter">
|
<item alignment="Qt::AlignHCenter">
|
||||||
|
|||||||
Reference in New Issue
Block a user