Changeset View
Changeset View
Standalone View
Standalone View
addons/close-except-like/close_confirm_dialog.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 65 | { | |||
---|---|---|---|---|---|
90 | m_docs_tree->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents); | 90 | m_docs_tree->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents); | ||
91 | m_docs_tree->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents); | 91 | m_docs_tree->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents); | ||
92 | 92 | | |||
93 | m_dont_ask_again->setText(i18nc("option:check", "Do not ask again")); | 93 | m_dont_ask_again->setText(i18nc("option:check", "Do not ask again")); | ||
94 | // NOTE If we are here, it means that 'Show Confirmation' action is enabled, | 94 | // NOTE If we are here, it means that 'Show Confirmation' action is enabled, | ||
95 | // so not needed to read config... | 95 | // so not needed to read config... | ||
96 | assert("Sanity check" && show_confirmation_action->isChecked()); | 96 | assert("Sanity check" && show_confirmation_action->isChecked()); | ||
97 | m_dont_ask_again->setCheckState(Qt::Unchecked); | 97 | m_dont_ask_again->setCheckState(Qt::Unchecked); | ||
98 | connect(m_dont_ask_again, SIGNAL(toggled(bool)), show_confirmation_action, SLOT(toggle())); | 98 | connect(m_dont_ask_again, &QCheckBox::toggled, show_confirmation_action, &KToggleAction::toggle); | ||
99 | 99 | | |||
100 | // Update documents list according checkboxes | 100 | // Update documents list according checkboxes | ||
101 | connect(this, SIGNAL(accepted()), this, SLOT(updateDocsList())); | 101 | connect(this, &CloseConfirmDialog::accepted, this, &CloseConfirmDialog::updateDocsList); | ||
102 | 102 | | |||
103 | KConfigGroup gcg(KSharedConfig::openConfig(), "kate-close-except-like-CloseConfirmationDialog"); | 103 | KConfigGroup gcg(KSharedConfig::openConfig(), "kate-close-except-like-CloseConfirmationDialog"); | ||
104 | KWindowConfig::restoreWindowSize(windowHandle(),gcg); // restore dialog geometry from config | 104 | KWindowConfig::restoreWindowSize(windowHandle(),gcg); // restore dialog geometry from config | ||
105 | } | 105 | } | ||
106 | 106 | | |||
107 | CloseConfirmDialog::~CloseConfirmDialog() | 107 | CloseConfirmDialog::~CloseConfirmDialog() | ||
108 | { | 108 | { | ||
109 | KConfigGroup gcg(KSharedConfig::openConfig(), "kate-close-except-like-CloseConfirmationDialog"); | 109 | KConfigGroup gcg(KSharedConfig::openConfig(), "kate-close-except-like-CloseConfirmationDialog"); | ||
Show All 22 Lines |