mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-19 22:42:23 -05:00
Replaced Uuid with QUuid
This commit is contained in:
parent
dcece140a0
commit
ad4423d226
49 changed files with 413 additions and 612 deletions
|
|
@ -34,7 +34,7 @@
|
|||
#endif
|
||||
|
||||
IconStruct::IconStruct()
|
||||
: uuid(Uuid())
|
||||
: uuid(QUuid())
|
||||
, number(0)
|
||||
{
|
||||
}
|
||||
|
|
@ -127,13 +127,10 @@ IconStruct EditWidgetIcons::state()
|
|||
void EditWidgetIcons::reset()
|
||||
{
|
||||
m_database = nullptr;
|
||||
m_currentUuid = Uuid();
|
||||
m_currentUuid = QUuid();
|
||||
}
|
||||
|
||||
void EditWidgetIcons::load(const Uuid& currentUuid,
|
||||
Database* database,
|
||||
const IconStruct& iconStruct,
|
||||
const QString& url)
|
||||
void EditWidgetIcons::load(const QUuid& currentUuid, Database* database, const IconStruct& iconStruct, const QString& url)
|
||||
{
|
||||
Q_ASSERT(database);
|
||||
Q_ASSERT(!currentUuid.isNull());
|
||||
|
|
@ -145,7 +142,7 @@ void EditWidgetIcons::load(const Uuid& currentUuid,
|
|||
m_customIconModel->setIcons(database->metadata()->customIconsScaledPixmaps(),
|
||||
database->metadata()->customIconsOrder());
|
||||
|
||||
Uuid iconUuid = iconStruct.uuid;
|
||||
QUuid iconUuid = iconStruct.uuid;
|
||||
if (iconUuid.isNull()) {
|
||||
int iconNumber = iconStruct.number;
|
||||
m_ui->defaultIconsView->setCurrentIndex(m_defaultIconModel->index(iconNumber, 0));
|
||||
|
|
@ -380,9 +377,9 @@ bool EditWidgetIcons::addCustomIcon(const QImage& icon)
|
|||
scaledicon = icon.scaled(128, 128);
|
||||
}
|
||||
|
||||
Uuid uuid = m_database->metadata()->findCustomIcon(scaledicon);
|
||||
QUuid uuid = m_database->metadata()->findCustomIcon(scaledicon);
|
||||
if (uuid.isNull()) {
|
||||
uuid = Uuid::random();
|
||||
uuid = QUuid::createUuid();
|
||||
m_database->metadata()->addCustomIcon(uuid, scaledicon);
|
||||
m_customIconModel->setIcons(m_database->metadata()->customIconsScaledPixmaps(),
|
||||
m_database->metadata()->customIconsOrder());
|
||||
|
|
@ -405,7 +402,7 @@ void EditWidgetIcons::removeCustomIcon()
|
|||
if (m_database) {
|
||||
QModelIndex index = m_ui->customIconsView->currentIndex();
|
||||
if (index.isValid()) {
|
||||
Uuid iconUuid = m_customIconModel->uuidFromIndex(index);
|
||||
QUuid iconUuid = m_customIconModel->uuidFromIndex(index);
|
||||
|
||||
const QList<Entry*> allEntries = m_database->rootGroup()->entriesRecursive(true);
|
||||
QList<Entry*> entriesWithSameIcon;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue