A few small changes, correct dialog title, change memory preallocation, explain file IO a bit.

This commit is contained in:
Collin Kidder
2016-12-13 22:35:29 -05:00
parent b7a1afcd8f
commit 8f12802657
3 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -47,12 +47,12 @@ CANFrameModel::CANFrameModel(QObject *parent)
if (QSysInfo::WordSize > 32)
{
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.
{
qDebug() << "32 bit OS detected. Requesting a much restricted prealloc";
preallocSize = 5000000;
preallocSize = 4000000;
}
frames.reserve(preallocSize);
+8 -2
View File
@@ -22,6 +22,14 @@ class FrameFileIO: public QObject
public:
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 loadNativeCSVFile(QString, QVector<CANFrame>*);
static bool loadGenericCSVFile(QString, QVector<CANFrame>*);
@@ -40,8 +48,6 @@ public:
static bool saveIXXATFile(QString, const QVector<CANFrame>*);
static bool saveCANDOFile(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 loadPCANFile(QString, QVector<CANFrame>*);
+1 -1
View File
@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>Firmware Updater</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item alignment="Qt::AlignHCenter">