Fix merging browser keys
* Introduce protected custom data function to prevent loss during merge operations
This commit is contained in:
committed by
Jonathan White
parent
48bf4fb85d
commit
e367c6df95
@@ -22,6 +22,8 @@
|
||||
|
||||
const QString CustomData::LastModified = QStringLiteral("_LAST_MODIFIED");
|
||||
const QString CustomData::Created = QStringLiteral("_CREATED");
|
||||
const QString CustomData::BrowserKeyPrefix = QStringLiteral("KPXC_BROWSER_");
|
||||
const QString CustomData::BrowserLegacyKeyPrefix = QStringLiteral("Public Key: ");
|
||||
|
||||
CustomData::CustomData(QObject* parent)
|
||||
: QObject(parent)
|
||||
@@ -128,6 +130,11 @@ QDateTime CustomData::getLastModified() const
|
||||
return {};
|
||||
}
|
||||
|
||||
bool CustomData::isProtectedCustomData(const QString& key) const
|
||||
{
|
||||
return key.startsWith(CustomData::BrowserKeyPrefix) || key.startsWith(CustomData::Created);
|
||||
}
|
||||
|
||||
bool CustomData::operator==(const CustomData& other) const
|
||||
{
|
||||
return (m_data == other.m_data);
|
||||
|
||||
Reference in New Issue
Block a user