Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

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

Fix configure dialog size

parent cd78dd68
......@@ -18,7 +18,8 @@
*/
#include "kontactconfiguredialog.h"
#include <KConfig>
#include <KSharedConfig>
#include <QDBusReply>
#include <QDBusInterface>
#include "kontact_debug.h"
......@@ -36,6 +37,9 @@ KontactConfigureDialog::KontactConfigureDialog(QWidget *parent)
KontactConfigureDialog::~KontactConfigureDialog()
{
KConfigGroup group(KSharedConfig::openConfig(), "KontactConfigureDialog");
group.writeEntry("width", width());
group.writeEntry("height", height());
}
void KontactConfigureDialog::emitConfigChanged()
......@@ -76,3 +80,10 @@ void KontactConfigureDialog::slotOk()
emitConfigChanged();
}
QSize KontactConfigureDialog::sizeHint() const
{
KConfigGroup group(KSharedConfig::openConfig(), "KontactConfigureDialog");
const int width = group.readEntry("width", 800);
const int height = group.readEntry("height", 600);
return QSize(width, height);
}
......@@ -33,6 +33,9 @@ public:
explicit KontactConfigureDialog(QWidget *parent = nullptr);
~KontactConfigureDialog();
protected:
QSize sizeHint() const override;
protected Q_SLOTS:
/** @reimplemented */
void slotApply();
......@@ -40,6 +43,7 @@ protected Q_SLOTS:
/** @reimplemented */
void slotOk();
void emitConfigChanged();
};
}
......
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