Commit 5873e1ba authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove old workaround

parent f8b603d7
Pipeline #79566 passed with stage
in 23 minutes and 54 seconds
......@@ -59,14 +59,14 @@ AccountsPage::AccountsPage(QWidget *parent, const QVariantList &args)
//
// "Receiving" tab:
//
auto receivingTab = new ReceivingTab();
auto receivingTab = new AccountsPageReceivingTab();
addTab(receivingTab, i18nc("@title:tab Tab page where the user configures accounts to receive mail", "Receiving"));
connect(receivingTab, &ReceivingTab::accountListChanged, this, &AccountsPage::accountListChanged);
connect(receivingTab, &AccountsPageReceivingTab::accountListChanged, this, &AccountsPage::accountListChanged);
//
// "Sending" tab:
//
auto sendingTab = new SendingTab();
auto sendingTab = new AccountsPageSendingTab();
addTab(sendingTab, i18nc("@title:tab Tab page where the user configures accounts to send mail", "Sending"));
//
......@@ -78,7 +78,7 @@ AccountsPage::AccountsPage(QWidget *parent, const QVariantList &args)
AccountsPageSendingTab::~AccountsPageSendingTab() = default;
QString AccountsPage::SendingTab::helpAnchor() const
QString AccountsPageSendingTab::helpAnchor() const
{
return QStringLiteral("configure-accounts-sending");
}
......@@ -133,7 +133,7 @@ AccountsPageSendingTab::AccountsPageSendingTab(QWidget *parent)
connect(mUndoSendComboBox, qOverload<int>(&QComboBox::activated), this, &AccountsPageSendingTab::slotEmitChanged);
}
void AccountsPage::SendingTab::doLoadFromGlobalSettings()
void AccountsPageSendingTab::doLoadFromGlobalSettings()
{
mSendOnCheckCombo->setCurrentIndex(KMailSettings::self()->sendOnCheck());
loadWidget(mConfirmSendCheck, KMailSettings::self()->confirmBeforeSendItem());
......@@ -142,7 +142,7 @@ void AccountsPage::SendingTab::doLoadFromGlobalSettings()
mUndoSendComboBox->setDelay(KMailSettings::self()->undoSendDelay());
}
void AccountsPage::SendingTab::doLoadOther()
void AccountsPageSendingTab::doLoadOther()
{
mSendMethodCombo->setCurrentIndex(MessageComposer::MessageComposerSettings::self()->sendImmediate() ? 0 : 1);
loadWidget(mConfirmSendCheck, KMailSettings::self()->confirmBeforeSendItem());
......@@ -151,7 +151,7 @@ void AccountsPage::SendingTab::doLoadOther()
mUndoSendComboBox->setDelay(KMailSettings::self()->undoSendDelay());
}
void AccountsPage::SendingTab::save()
void AccountsPageSendingTab::save()
{
KMailSettings::self()->setSendOnCheck(mSendOnCheckCombo->currentIndex());
saveCheckBox(mConfirmSendCheck, KMailSettings::self()->confirmBeforeSendItem());
......@@ -161,7 +161,7 @@ void AccountsPage::SendingTab::save()
KMailSettings::self()->setUndoSendDelay(mUndoSendComboBox->delay());
}
QString AccountsPage::ReceivingTab::helpAnchor() const
QString AccountsPageReceivingTab::helpAnchor() const
{
return QStringLiteral("configure-accounts-receiving");
}
......@@ -329,7 +329,7 @@ void AccountsPageReceivingTab::slotOfflineOnShutdownChanged(bool checked)
slotEmitChanged();
}
void AccountsPage::ReceivingTab::slotEditNotifications()
void AccountsPageReceivingTab::slotEditNotifications()
{
const auto instance = Akonadi::AgentManager::self()->instance(QStringLiteral("akonadi_newmailnotifier_agent"));
if (instance.isValid()) {
......@@ -339,14 +339,14 @@ void AccountsPage::ReceivingTab::slotEditNotifications()
}
}
void AccountsPage::ReceivingTab::doLoadFromGlobalSettings()
void AccountsPageReceivingTab::doLoadFromGlobalSettings()
{
if (mNewMailNotifierInterface) {
mAccountsReceiving.mVerboseNotificationCheck->setChecked(mNewMailNotifierInterface->verboseMailNotification());
}
}
void AccountsPage::ReceivingTab::save()
void AccountsPageReceivingTab::save()
{
// Save Mail notification settings
if (mNewMailNotifierInterface) {
......
......@@ -108,10 +108,6 @@ public:
explicit AccountsPage(QWidget *parent = nullptr, const QVariantList &args = {});
QString helpAnchor() const override;
// hrmpf. moc doesn't like nested classes with slots/signals...:
using SendingTab = AccountsPageSendingTab;
using ReceivingTab = AccountsPageReceivingTab;
Q_SIGNALS:
void accountListChanged(const QStringList &);
};
......
......@@ -30,10 +30,10 @@ QString MiscPage::helpAnchor() const
MiscPage::MiscPage(QWidget *parent, const QVariantList &args)
: ConfigModuleWithTabs(parent, args)
{
auto folderTab = new FolderTab();
auto folderTab = new MiscPageFolderTab();
addTab(folderTab, i18n("Folders"));
auto inviteTab = new InviteTab();
auto inviteTab = new MiscPageInviteTab();
addTab(inviteTab, i18n("Invitations"));
auto printingTab = new MiscPagePrintingTab();
......@@ -76,7 +76,7 @@ MiscPageFolderTab::MiscPageFolderTab(QWidget *parent)
connect(mMMTab.mDeleteMessagesWithoutConfirmation, &QCheckBox::toggled, this, &MiscPageFolderTab::slotEmitChanged);
}
void MiscPage::FolderTab::doLoadFromGlobalSettings()
void MiscPageFolderTab::doLoadFromGlobalSettings()
{
loadWidget(mMMTab.mExcludeImportantFromExpiry, KMailSettings::self()->excludeImportantMailFromExpiryItem());
// default = "Loop in current folder"
......@@ -93,13 +93,13 @@ void MiscPage::FolderTab::doLoadFromGlobalSettings()
doLoadOther();
}
void MiscPage::FolderTab::doLoadOther()
void MiscPageFolderTab::doLoadOther()
{
loadWidget(mMMTab.mEmptyTrashCheck, KMailSettings::self()->emptyTrashOnExitItem());
mOnStartupOpenFolder->setCollection(Akonadi::Collection(KMailSettings::self()->startupFolder()));
}
void MiscPage::FolderTab::save()
void MiscPageFolderTab::save()
{
saveCheckBox(mMMTab.mEmptyTrashCheck, KMailSettings::self()->emptyTrashOnExitItem());
saveComboBox(mMMTab.mActionEnterFolder, KMailSettings::self()->actionEnterFolderItem());
......@@ -125,17 +125,17 @@ MiscPageInviteTab::MiscPageInviteTab(QWidget *parent)
connect(mInvitationUi, &MessageViewer::InvitationSettings::changed, this, &MiscPageInviteTab::slotEmitChanged);
}
void MiscPage::InviteTab::doLoadFromGlobalSettings()
void MiscPageInviteTab::doLoadFromGlobalSettings()
{
mInvitationUi->doLoadFromGlobalSettings();
}
void MiscPage::InviteTab::save()
void MiscPageInviteTab::save()
{
mInvitationUi->save();
}
void MiscPage::InviteTab::doResetToDefaultsOther()
void MiscPageInviteTab::doResetToDefaultsOther()
{
mInvitationUi->doResetToDefaultsOther();
}
......
......@@ -59,9 +59,6 @@ class KMAIL_EXPORT MiscPage : public ConfigModuleWithTabs
public:
explicit MiscPage(QWidget *parent = nullptr, const QVariantList &args = {});
QString helpAnchor() const override;
using FolderTab = MiscPageFolderTab;
using InviteTab = MiscPageInviteTab;
};
class MiscPagePrintingTab : public ConfigModuleTab
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment