mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 16:59:44 -05:00
no "Share" tab without WITH_XC_KEESHARE
if KeePassXC is compiled with WITH_XC_KEESHARE=OFF, the "Share" tab of the EntryPreviewWidget for groups is removed from the GUI completely. closes #3619.
This commit is contained in:
parent
957ba90073
commit
c2b16c663f
@ -72,6 +72,10 @@ EntryPreviewWidget::EntryPreviewWidget(QWidget* parent)
|
||||
m_ui->groupCloseButton->setIcon(filePath()->icon("actions", "dialog-close"));
|
||||
connect(m_ui->groupCloseButton, SIGNAL(clicked()), SLOT(hide()));
|
||||
connect(m_ui->groupTabWidget, SIGNAL(tabBarClicked(int)), SLOT(updateTabIndexes()), Qt::QueuedConnection);
|
||||
|
||||
#if !defined(WITH_XC_KEESHARE)
|
||||
removeTab(m_ui->groupTabWidget, m_ui->groupShareTab);
|
||||
#endif
|
||||
}
|
||||
|
||||
EntryPreviewWidget::~EntryPreviewWidget()
|
||||
@ -376,6 +380,13 @@ void EntryPreviewWidget::openEntryUrl()
|
||||
}
|
||||
}
|
||||
|
||||
void EntryPreviewWidget::removeTab(QTabWidget* tabWidget, QWidget* widget)
|
||||
{
|
||||
const int tabIndex = tabWidget->indexOf(widget);
|
||||
Q_ASSERT(tabIndex != -1);
|
||||
tabWidget->removeTab(tabIndex);
|
||||
}
|
||||
|
||||
void EntryPreviewWidget::setTabEnabled(QTabWidget* tabWidget, QWidget* widget, bool enabled)
|
||||
{
|
||||
const int tabIndex = tabWidget->indexOf(widget);
|
||||
|
@ -67,6 +67,7 @@ private slots:
|
||||
void openEntryUrl();
|
||||
|
||||
private:
|
||||
void removeTab(QTabWidget* tabWidget, QWidget* widget);
|
||||
void setTabEnabled(QTabWidget* tabWidget, QWidget* widget, bool enabled);
|
||||
|
||||
static QPixmap preparePixmap(const QPixmap& pixmap, int size);
|
||||
|
Loading…
Reference in New Issue
Block a user