Coding style fixes.

This commit is contained in:
Felix Geyer
2012-04-28 21:42:23 +02:00
parent 3649c7753c
commit 599d60270d
7 changed files with 29 additions and 29 deletions

View File

@@ -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();

View File

@@ -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();

View File

@@ -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));

View File

@@ -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);

View File

@@ -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();

View File

@@ -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);

View File

@@ -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();