Skip to content

Commit

Permalink
TagsEdit code improvements and crash fix
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
libklein authored and droidmonkey committed Dec 21, 2024
1 parent 0cb0373 commit 4016df4
Show file tree
Hide file tree
Showing 4 changed files with 454 additions and 391 deletions.
2 changes: 1 addition & 1 deletion src/gui/EntryPreviewWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ void EntryPreviewWidget::updateEntryGeneralTab()
const TimeInfo entryTime = m_currentEntry->timeInfo();
const QString expires = entryTime.expires() ? Clock::toString(entryTime.expiryTime().toLocalTime()) : tr("Never");
m_ui->entryExpirationLabel->setText(expires);
m_ui->entryTagsList->tags(m_currentEntry->tagList());
m_ui->entryTagsList->setTags(m_currentEntry->tagList());
m_ui->entryTagsList->setReadOnly(true);
}

Expand Down
4 changes: 2 additions & 2 deletions src/gui/entry/EditEntryWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,8 @@ void EditEntryWidget::setForms(Entry* entry, bool restore)
m_mainUi->usernameComboBox->lineEdit()->setReadOnly(m_history);
m_mainUi->urlEdit->setReadOnly(m_history);
m_mainUi->passwordEdit->setReadOnly(m_history);
m_mainUi->tagsList->tags(entry->tagList());
m_mainUi->tagsList->completion(m_db->tagList());
m_mainUi->tagsList->setTags(entry->tagList());
m_mainUi->tagsList->setCompletion(m_db->tagList());
m_mainUi->expireCheck->setEnabled(!m_history);
m_mainUi->expireDatePicker->setReadOnly(m_history);
m_mainUi->revealNotesButton->setIcon(icons()->onOffIcon("password-show", false));
Expand Down
Loading

0 comments on commit 4016df4

Please sign in to comment.