Commit b3a97624 authored by Laurent Montel's avatar Laurent Montel 😁

Fix save restore size

parent 950b31a6
......@@ -28,7 +28,9 @@
#include <KLocalizedString>
#include <KSharedConfig>
#include <KMessageBox>
namespace {
static const char myConfigGroupName[] = "FollowUpReminderInfoDialog";
}
FollowUpReminderInfoConfigWidget::FollowUpReminderInfoConfigWidget(const KSharedConfigPtr &config, QWidget *parent, const QVariantList &args)
: Akonadi::AgentConfigurationBase(config, parent, args)
......@@ -67,3 +69,15 @@ bool FollowUpReminderInfoConfigWidget::save() const
return mWidget->save();
}
QSize FollowUpReminderInfoConfigWidget::restoreDialogSize() const
{
auto group = config()->group(myConfigGroupName);
const QSize size = group.readEntry("Size", QSize(800, 600));
return size;
}
void FollowUpReminderInfoConfigWidget::saveDialogSize(const QSize &size)
{
auto group = config()->group(myConfigGroupName);
group.writeEntry("Size", size);
}
......@@ -41,6 +41,8 @@ public:
bool save() const override;
void load() override;
QSize restoreDialogSize() const override;
void saveDialogSize(const QSize &size) override;
private:
FollowUpReminderInfoWidget *mWidget = nullptr;
};
......
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