Coding style fixes.

This commit is contained in:
Felix Geyer 2012-07-16 17:47:21 +02:00
parent 237d954b65
commit 676be9da16
3 changed files with 14 additions and 15 deletions

View File

@ -155,7 +155,7 @@ void AutoType::performGlobalAutoType(const QList<Database*>& dbList)
}
else if (entryList.size() == 1) {
m_inAutoType = false;
performAutoType(entryList.first().first, 0, entryList.first().second);
performAutoType(entryList.first().first, Q_NULLPTR, entryList.first().second);
}
else {
// TODO: implement

View File

@ -55,6 +55,12 @@ EditEntryWidget::EditEntryWidget(QWidget* parent)
, m_iconsWidget(new EditWidgetIcons())
, m_autoTypeWidget(new QWidget())
, m_historyWidget(new QWidget())
, m_entryAttachments(new EntryAttachments(this))
, m_attachmentsModel(new EntryAttachmentsModel(m_advancedWidget))
, m_entryAttributes(new EntryAttributes(this))
, m_attributesModel(new EntryAttributesModel(m_advancedWidget))
, m_historyModel(new EntryHistoryModel(this))
, m_sortModel(new QSortFilterProxyModel(this))
, m_autoTypeAssoc(new AutoTypeAssociations(this))
, m_autoTypeAssocModel(new AutoTypeAssociationsModel(this))
, m_autoTypeDefaultSequenceGroup(new QButtonGroup(this))
@ -79,16 +85,12 @@ EditEntryWidget::EditEntryWidget(QWidget* parent)
m_historyUi->setupUi(m_historyWidget);
add(tr("History"), m_historyWidget);
m_entryAttachments = new EntryAttachments(this);
m_attachmentsModel = new EntryAttachmentsModel(m_advancedWidget);
m_attachmentsModel->setEntryAttachments(m_entryAttachments);
m_advancedUi->attachmentsView->setModel(m_attachmentsModel);
connect(m_advancedUi->saveAttachmentButton, SIGNAL(clicked()), SLOT(saveCurrentAttachment()));
connect(m_advancedUi->addAttachmentButton, SIGNAL(clicked()), SLOT(insertAttachment()));
connect(m_advancedUi->removeAttachmentButton, SIGNAL(clicked()), SLOT(removeCurrentAttachment()));
m_entryAttributes = new EntryAttributes(this);
m_attributesModel = new EntryAttributesModel(m_advancedWidget);
m_attributesModel->setEntryAttributes(m_entryAttributes);
m_advancedUi->attributesView->setModel(m_attributesModel);
connect(m_advancedUi->addAttributeButton, SIGNAL(clicked()), SLOT(insertAttribute()));
@ -130,9 +132,6 @@ EditEntryWidget::EditEntryWidget(QWidget* parent)
connect(m_autoTypeUi->windowSequenceEdit, SIGNAL(textChanged(QString)),
SLOT(applyCurrentAssoc()));
m_historyModel = new EntryHistoryModel(this);
m_sortModel = new QSortFilterProxyModel(this);
m_sortModel->setSourceModel(m_historyModel);
m_sortModel->setDynamicSortFilter(true);
m_sortModel->setSortLocaleAware(true);

View File

@ -93,7 +93,7 @@ private Q_SLOTS:
private:
bool passwordsEqual();
void setForms(const Entry* entry, bool restore = false);
void setForms(const Entry* entry, bool restore = false);
Entry* m_entry;
Database* m_database;
@ -111,12 +111,12 @@ private:
EditWidgetIcons* const m_iconsWidget;
QWidget* const m_autoTypeWidget;
QWidget* const m_historyWidget;
EntryAttachmentsModel* m_attachmentsModel;
EntryAttributesModel* m_attributesModel;
EntryHistoryModel* m_historyModel;
QSortFilterProxyModel* m_sortModel;
EntryAttachments* m_entryAttachments;
EntryAttributes* m_entryAttributes;
EntryAttachments* const m_entryAttachments;
EntryAttachmentsModel* const m_attachmentsModel;
EntryAttributes* const m_entryAttributes;
EntryAttributesModel* const m_attributesModel;
EntryHistoryModel* const m_historyModel;
QSortFilterProxyModel* const m_sortModel;
QPersistentModelIndex m_currentAttribute;
AutoTypeAssociations* const m_autoTypeAssoc;
AutoTypeAssociationsModel* const m_autoTypeAssocModel;