Change recalc cksum defaults implementation
These are the existing and desired defaults - * GUI: recalcCksum = true * PCAP import test: recalcCksum = false With the existing implementation, doing PCAP import in 'raw' mode twice would lead to recalcCksum being checked in the dialog the second time. This was because we were always forcing it to be true for the GUI case without checking for anything.
This commit is contained in:
parent
735e960dcb
commit
b0a81fb231
@ -50,15 +50,14 @@ PcapImportOptionsDialog::PcapImportOptionsDialog(QVariantMap *options)
|
||||
options_ = options;
|
||||
|
||||
viaPdml->setChecked(options_->value("ViaPdml").toBool());
|
||||
// XXX: By default this key is absent - so that pcap import tests
|
||||
// evaluate to false and hence show minimal diffs.
|
||||
// However, for the GUI user, this should be enabled by default.
|
||||
recalculateCksums->setChecked(
|
||||
options_->value("RecalculateCksums").toBool());
|
||||
options_->value("RecalculateCksums", QVariant(true))
|
||||
.toBool());
|
||||
doDiff->setChecked(options_->value("DoDiff").toBool());
|
||||
|
||||
// XXX: By default this is false - for pcap import tests to show
|
||||
// minimal diffs. However, for the user, this should be enabled
|
||||
// by default
|
||||
recalculateCksums->setChecked(true);
|
||||
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
}
|
||||
|
||||
@ -78,7 +77,6 @@ void PcapImportOptionsDialog::accept()
|
||||
PcapFileFormat::PcapFileFormat()
|
||||
{
|
||||
importOptions_.insert("ViaPdml", true);
|
||||
importOptions_.insert("RecalculateCksums", false);
|
||||
importOptions_.insert("DoDiff", true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user