Skip to content

Commit 19b60bd

Browse files
libkleindroidmonkey
authored andcommitted
TagsEdit code improvements and crash fix
Fix crash when pressing home on empty tag field Move completer to TagsEdit. Move cursor blink status to TagsEdit. Move paint implementation to impl. Simplify calcRect and drawTag. Hide editing_index and cursor position. Fix bug where an empty tag was shown if the tag edit was unfocused. Fix a bug where the scollbar was not updated when a tag was removed. Hide remaining TextEdit internal fields. Refactor to use QLinkedList. Remove obsolete EmptyTagIterator. Encapsulate tags and selected index in tags manager.
1 parent 0cb0373 commit 19b60bd

File tree

4 files changed

+454
-399
lines changed

4 files changed

+454
-399
lines changed

src/gui/EntryPreviewWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ void EntryPreviewWidget::updateEntryGeneralTab()
402402
const TimeInfo entryTime = m_currentEntry->timeInfo();
403403
const QString expires = entryTime.expires() ? Clock::toString(entryTime.expiryTime().toLocalTime()) : tr("Never");
404404
m_ui->entryExpirationLabel->setText(expires);
405-
m_ui->entryTagsList->tags(m_currentEntry->tagList());
405+
m_ui->entryTagsList->setTags(m_currentEntry->tagList());
406406
m_ui->entryTagsList->setReadOnly(true);
407407
}
408408

src/gui/entry/EditEntryWidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,8 @@ void EditEntryWidget::setForms(Entry* entry, bool restore)
948948
m_mainUi->usernameComboBox->lineEdit()->setReadOnly(m_history);
949949
m_mainUi->urlEdit->setReadOnly(m_history);
950950
m_mainUi->passwordEdit->setReadOnly(m_history);
951-
m_mainUi->tagsList->tags(entry->tagList());
952-
m_mainUi->tagsList->completion(m_db->tagList());
951+
m_mainUi->tagsList->setTags(entry->tagList());
952+
m_mainUi->tagsList->setCompletion(m_db->tagList());
953953
m_mainUi->expireCheck->setEnabled(!m_history);
954954
m_mainUi->expireDatePicker->setReadOnly(m_history);
955955
m_mainUi->revealNotesButton->setIcon(icons()->onOffIcon("password-show", false));

0 commit comments

Comments
 (0)