mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-05 11:54:59 -04:00
parent
55e4889053
commit
122051c91c
1 changed files with 6 additions and 13 deletions
|
@ -109,21 +109,12 @@ EntryView::EntryView(QWidget* parent)
|
||||||
header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
|
||||||
connect(header(), SIGNAL(customContextMenuRequested(QPoint)), SLOT(showHeaderMenu(QPoint)));
|
connect(header(), SIGNAL(customContextMenuRequested(QPoint)), SLOT(showHeaderMenu(QPoint)));
|
||||||
// clang-format off
|
|
||||||
connect(header(), SIGNAL(sectionCountChanged(int, int)), SIGNAL(viewStateChanged()));
|
connect(header(), SIGNAL(sectionCountChanged(int, int)), SIGNAL(viewStateChanged()));
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
connect(header(), SIGNAL(sectionMoved(int, int, int)), SIGNAL(viewStateChanged()));
|
connect(header(), SIGNAL(sectionMoved(int, int, int)), SIGNAL(viewStateChanged()));
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
connect(header(), SIGNAL(sectionResized(int, int, int)), SIGNAL(viewStateChanged()));
|
connect(header(), SIGNAL(sectionResized(int, int, int)), SIGNAL(viewStateChanged()));
|
||||||
// clang-format on
|
connect(header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), SLOT(sortIndicatorChanged(int, Qt::SortOrder)));
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), SLOT(sortIndicatorChanged(int,Qt::SortOrder)));
|
|
||||||
// clang-format on
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntryView::contextMenuShortcutPressed()
|
void EntryView::contextMenuShortcutPressed()
|
||||||
|
@ -358,6 +349,8 @@ QByteArray EntryView::viewState() const
|
||||||
*/
|
*/
|
||||||
bool EntryView::setViewState(const QByteArray& state)
|
bool EntryView::setViewState(const QByteArray& state)
|
||||||
{
|
{
|
||||||
|
// Reset to unsorted first (https://bugreports.qt.io/browse/QTBUG-86694)
|
||||||
|
header()->setSortIndicator(-1, Qt::AscendingOrder);
|
||||||
bool status = header()->restoreState(state);
|
bool status = header()->restoreState(state);
|
||||||
resetFixedColumns();
|
resetFixedColumns();
|
||||||
m_columnsNeedRelayout = state.isEmpty();
|
m_columnsNeedRelayout = state.isEmpty();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue