mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Include some extradata info on Seabear import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
d7cf3408e5
commit
ccf916344b
3 changed files with 81 additions and 0 deletions
|
@ -1582,6 +1582,37 @@ int parse_seabear_header(const char *filename, char **params, int pnr)
|
|||
}
|
||||
f.seek(0);
|
||||
|
||||
/*
|
||||
* Grabbing some fields for the extradata
|
||||
*/
|
||||
|
||||
while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) {
|
||||
QString needle = "//Firmware Version: ";
|
||||
if (parseLine.contains(needle)) {
|
||||
params[pnr++] = strdup("Firmware");
|
||||
params[pnr++] = strdup(parseLine.replace(needle, QString::fromLatin1("")).prepend("\"").append("\"").toUtf8().data());
|
||||
}
|
||||
}
|
||||
f.seek(0);
|
||||
|
||||
while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) {
|
||||
QString needle = "//Serial number: ";
|
||||
if (parseLine.contains(needle)) {
|
||||
params[pnr++] = strdup("Serial");
|
||||
params[pnr++] = strdup(parseLine.replace(needle, QString::fromLatin1("")).prepend("\"").append("\"").toUtf8().data());
|
||||
}
|
||||
}
|
||||
f.seek(0);
|
||||
|
||||
while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) {
|
||||
QString needle = "//GF: ";
|
||||
if (parseLine.contains(needle)) {
|
||||
params[pnr++] = strdup("GF");
|
||||
params[pnr++] = strdup(parseLine.replace(needle, QString::fromLatin1("")).prepend("\"").append("\"").toUtf8().data());
|
||||
}
|
||||
}
|
||||
f.seek(0);
|
||||
|
||||
while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue