Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TagsEdit code improvements and crash fix #11346

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
27 changes: 21 additions & 6 deletions src/gui/EntryPreviewWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>530</width>
<height>257</height>
<height>296</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
Expand Down Expand Up @@ -260,8 +260,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>157</width>
<height>63</height>
<width>152</width>
<height>57</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
Expand Down Expand Up @@ -481,13 +481,28 @@
</layout>
</item>
<item row="2" column="1" colspan="5">
<widget class="TagsEdit" name="entryTagsList" native="true">
<widget class="TagsEdit" name="entryTagsList">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>80</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
<enum>Qt::NoFocus</enum>
</property>
<property name="accessibleName">
<string>Tags list</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="1" column="5">
Expand Down Expand Up @@ -1218,7 +1233,7 @@
</customwidget>
<customwidget>
<class>TagsEdit</class>
<extends>QWidget</extends>
<extends>QScrollArea</extends>
<header>gui/tag/TagsEdit.h</header>
<container>1</container>
</customwidget>
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
22 changes: 20 additions & 2 deletions src/gui/entry/EditEntryWidgetMain.ui
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,31 @@
</widget>
</item>
<item row="5" column="1">
<widget class="TagsEdit" name="tagsList" native="true">
<widget class="TagsEdit" name="tagsList">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>70</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="accessibleName">
<string>Tags list</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="7" column="1">
Expand Down Expand Up @@ -345,7 +363,7 @@
<customwidgets>
<customwidget>
<class>TagsEdit</class>
<extends>QWidget</extends>
<extends>QScrollArea</extends>
<header>gui/tag/TagsEdit.h</header>
<container>1</container>
</customwidget>
Expand Down
Loading
Loading