Commit f8d9c9e2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add debug info

parent 31eba380
......@@ -99,7 +99,7 @@ void CreatePhishingUrlDataBaseJobTest::shouldParseResult_data()
value.newClientState = QStringLiteral("ChAIBRADGAEiAzAwMSiAEDABEAFGpqhd");
value.sha256 = QStringLiteral("YSgoRtsRlgHDqDA3LAhM1gegEpEzs1TjzU33vqsR8iM=");
value.additionList = additionList;
value.removalList = removalList;
//value.removalList = removalList;
QTest::newRow("test1") << QStringLiteral("test1.json") << WebEngineViewer::CreatePhishingUrlDataBaseJob::ValidData << value;
}
......
......@@ -338,8 +338,26 @@ bool UpdateDataBaseInfo::operator==(const UpdateDataBaseInfo &other) const {
qDebug() << " platformType "<<platformType << " other.platformType "<< other.platformType;
qDebug() << " newClientState "<<newClientState << " other.newClientState "<< other.newClientState;
qDebug() << " threatType "<<threatType << " other.threatType "<< other.threatType;
qDebug() << " removalList" << removalList.count() << " other.removalList " << other.removalList.count();
qDebug() << " additionList" << additionList.count() << " other.additionList " << other.additionList.count();
}
return val;
}
bool Removal::operator==(const Removal &other) const {
bool value = (indexes == other.indexes);
if (!value) {
qDebug() << " indexes "<<indexes << " other.indexes " << other.indexes;
}
return value;
}
bool Addition::operator==(const Addition &other) const {
bool value = (hashString == other.hashString) &&
(prefixSize == other.prefixSize);
if (!value) {
qDebug() << "hashString " << hashString << " other.hashString "<<other.hashString;
qDebug() << "prefixSize " << prefixSize << " other.prefixSize "<<other.prefixSize;
}
return val;
return value;
}
......@@ -38,10 +38,7 @@ struct Addition {
bool isValid() const {
return !hashString.isEmpty() && (prefixSize > 0);
}
bool operator==(const Addition &other) const {
return (hashString == other.hashString) &&
(prefixSize == other.prefixSize);
}
bool operator==(const Addition &other) const;
QByteArray hashString;
int prefixSize;
......@@ -53,9 +50,7 @@ struct Removal {
}
bool operator==(const Removal &other) const {
return (indexes == other.indexes);
}
bool operator==(const Removal &other) const;
bool isValid() const {
return !indexes.isEmpty();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment