mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-27 06:47:02 -05:00
Fix build failure with Qt5.6 (#8829)
With Qt 5.6, build fails with error below. This is because in Qt 5.6, the 3rd argument is not optional. Starting from Qt 5.7 the default value for the 3rd argument is nullptr, so setting it to nullptr. https://doc.qt.io/archives/qt-5.6/qaction.html#QAction-2 https://doc.qt.io/archives/qt-5.7/qaction.html#QAction-2 Error: src/gui/tag/TagView.cpp:79:38: error: no matching constructor for initialization of 'QAction' auto action = menu.exec({new QAction(icons()->icon("trash"), tr("Remove Search"))}, mapToGlobal(pos)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
7bdcf05fc3
commit
18857cb60b
@ -76,14 +76,14 @@ void TagView::contextMenuRequested(const QPoint& pos)
|
||||
if (type == TagModel::SAVED_SEARCH) {
|
||||
// Allow deleting saved searches
|
||||
QMenu menu;
|
||||
auto action = menu.exec({new QAction(icons()->icon("trash"), tr("Remove Search"))}, mapToGlobal(pos));
|
||||
auto action = menu.exec({new QAction(icons()->icon("trash"), tr("Remove Search"), nullptr)}, mapToGlobal(pos));
|
||||
if (action) {
|
||||
m_db->metadata()->deleteSavedSearch(index.data(Qt::DisplayRole).toString());
|
||||
}
|
||||
} else if (type == TagModel::TAG) {
|
||||
// Allow removing tags from all entries in a database
|
||||
QMenu menu;
|
||||
auto action = menu.exec({new QAction(icons()->icon("trash"), tr("Remove Tag"))}, mapToGlobal(pos));
|
||||
auto action = menu.exec({new QAction(icons()->icon("trash"), tr("Remove Tag"), nullptr)}, mapToGlobal(pos));
|
||||
if (action) {
|
||||
auto tag = index.data(Qt::DisplayRole).toString();
|
||||
auto ans = MessageBox::question(this,
|
||||
|
Loading…
x
Reference in New Issue
Block a user