mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Coding style fixes.
This commit is contained in:
@@ -38,11 +38,11 @@ public:
|
|||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void modified();
|
void modified();
|
||||||
void keyModified(QString key);
|
void keyModified(const QString& key);
|
||||||
void aboutToBeAdded(QString key);
|
void aboutToBeAdded(const QString& key);
|
||||||
void added(QString key);
|
void added(const QString& key);
|
||||||
void aboutToBeRemoved(QString key);
|
void aboutToBeRemoved(const QString& key);
|
||||||
void removed(QString key);
|
void removed(const QString& key);
|
||||||
void aboutToBeReset();
|
void aboutToBeReset();
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ public:
|
|||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void modified();
|
void modified();
|
||||||
void defaultKeyModified();
|
void defaultKeyModified();
|
||||||
void customKeyModified(QString key);
|
void customKeyModified(const QString& key);
|
||||||
void aboutToBeAdded(QString key);
|
void aboutToBeAdded(const QString& key);
|
||||||
void added(QString key);
|
void added(const QString& key);
|
||||||
void aboutToBeRemoved(QString key);
|
void aboutToBeRemoved(const QString& key);
|
||||||
void removed(QString key);
|
void removed(const QString& key);
|
||||||
void aboutToRename(QString oldKey, QString newKey);
|
void aboutToRename(const QString& oldKey, const QString& newKey);
|
||||||
void renamed(QString oldKey, QString newKey);
|
void renamed(const QString& oldKey, const QString& newKey);
|
||||||
void aboutToBeReset();
|
void aboutToBeReset();
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class CategoryListViewDelegate : public QStyledItemDelegate
|
|||||||
public:
|
public:
|
||||||
explicit CategoryListViewDelegate(QObject *parent) : QStyledItemDelegate(parent) {}
|
explicit CategoryListViewDelegate(QObject *parent) : QStyledItemDelegate(parent) {}
|
||||||
|
|
||||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
|
||||||
{
|
{
|
||||||
QSize size = QStyledItemDelegate::sizeHint(option, index);
|
QSize size = QStyledItemDelegate::sizeHint(option, index);
|
||||||
size.setHeight(qMax(size.height(), 22));
|
size.setHeight(qMax(size.height(), 22));
|
||||||
|
|||||||
@@ -100,13 +100,13 @@ QVariant EntryAttachmentsModel::data(const QModelIndex& index, int role) const
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryAttachmentsModel::attachmentChange(QString key)
|
void EntryAttachmentsModel::attachmentChange(const QString& key)
|
||||||
{
|
{
|
||||||
int row = m_entryAttachments->keys().indexOf(key);
|
int row = m_entryAttachments->keys().indexOf(key);
|
||||||
Q_EMIT dataChanged(index(row, 0), index(row, columnCount()-1));
|
Q_EMIT dataChanged(index(row, 0), index(row, columnCount()-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryAttachmentsModel::attachmentAboutToAdd(QString key)
|
void EntryAttachmentsModel::attachmentAboutToAdd(const QString& key)
|
||||||
{
|
{
|
||||||
QList<QString> rows = m_entryAttachments->keys();
|
QList<QString> rows = m_entryAttachments->keys();
|
||||||
rows.append(key);
|
rows.append(key);
|
||||||
@@ -120,7 +120,7 @@ void EntryAttachmentsModel::attachmentAdd()
|
|||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryAttachmentsModel::attachmentAboutToRemove(QString key)
|
void EntryAttachmentsModel::attachmentAboutToRemove(const QString& key)
|
||||||
{
|
{
|
||||||
int row = m_entryAttachments->keys().indexOf(key);
|
int row = m_entryAttachments->keys().indexOf(key);
|
||||||
beginRemoveRows(QModelIndex(), row, row);
|
beginRemoveRows(QModelIndex(), row, row);
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ public:
|
|||||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void attachmentChange(QString key);
|
void attachmentChange(const QString& key);
|
||||||
void attachmentAboutToAdd(QString key);
|
void attachmentAboutToAdd(const QString& key);
|
||||||
void attachmentAdd();
|
void attachmentAdd();
|
||||||
void attachmentAboutToRemove(QString key);
|
void attachmentAboutToRemove(const QString& key);
|
||||||
void attachmentRemove();
|
void attachmentRemove();
|
||||||
void aboutToReset();
|
void aboutToReset();
|
||||||
void reset();
|
void reset();
|
||||||
|
|||||||
@@ -141,14 +141,14 @@ QString EntryAttributesModel::keyByIndex(const QModelIndex& index) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryAttributesModel::attributeChange(QString key)
|
void EntryAttributesModel::attributeChange(const QString& key)
|
||||||
{
|
{
|
||||||
int row = m_attributes.indexOf(key);
|
int row = m_attributes.indexOf(key);
|
||||||
Q_ASSERT(row != -1);
|
Q_ASSERT(row != -1);
|
||||||
Q_EMIT dataChanged(index(row, 0), index(row, columnCount()-1));
|
Q_EMIT dataChanged(index(row, 0), index(row, columnCount()-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryAttributesModel::attributeAboutToAdd(QString key)
|
void EntryAttributesModel::attributeAboutToAdd(const QString& key)
|
||||||
{
|
{
|
||||||
QList<QString> rows = m_attributes;
|
QList<QString> rows = m_attributes;
|
||||||
rows.append(key);
|
rows.append(key);
|
||||||
@@ -163,7 +163,7 @@ void EntryAttributesModel::attributeAdd()
|
|||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryAttributesModel::attributeAboutToRemove(QString key)
|
void EntryAttributesModel::attributeAboutToRemove(const QString& key)
|
||||||
{
|
{
|
||||||
int row = m_attributes.indexOf(key);
|
int row = m_attributes.indexOf(key);
|
||||||
beginRemoveRows(QModelIndex(), row, row);
|
beginRemoveRows(QModelIndex(), row, row);
|
||||||
@@ -175,7 +175,7 @@ void EntryAttributesModel::attributeRemove()
|
|||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryAttributesModel::attributeAboutToRename(QString oldKey, QString newKey)
|
void EntryAttributesModel::attributeAboutToRename(const QString& oldKey, const QString& newKey)
|
||||||
{
|
{
|
||||||
int oldRow = m_attributes.indexOf(oldKey);
|
int oldRow = m_attributes.indexOf(oldKey);
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ void EntryAttributesModel::attributeAboutToRename(QString oldKey, QString newKey
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryAttributesModel::attributeRename(QString oldKey, QString newKey)
|
void EntryAttributesModel::attributeRename(const QString& oldKey, const QString& newKey)
|
||||||
{
|
{
|
||||||
Q_UNUSED(oldKey);
|
Q_UNUSED(oldKey);
|
||||||
|
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ public:
|
|||||||
QString keyByIndex(const QModelIndex& index) const;
|
QString keyByIndex(const QModelIndex& index) const;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void attributeChange(QString key);
|
void attributeChange(const QString& key);
|
||||||
void attributeAboutToAdd(QString key);
|
void attributeAboutToAdd(const QString& key);
|
||||||
void attributeAdd();
|
void attributeAdd();
|
||||||
void attributeAboutToRemove(QString key);
|
void attributeAboutToRemove(const QString& key);
|
||||||
void attributeRemove();
|
void attributeRemove();
|
||||||
void attributeAboutToRename(QString oldKey, QString newKey);
|
void attributeAboutToRename(const QString& oldKey, const QString& newKey);
|
||||||
void attributeRename(QString oldKey, QString newKey);
|
void attributeRename(const QString& oldKey, const QString& newKey);
|
||||||
void aboutToReset();
|
void aboutToReset();
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user