Commit 0dbc7294 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Create method for readSettings/writeSettings

parent 97720a97
......@@ -95,6 +95,16 @@ VCardExportSelectionWidget::VCardExportSelectionWidget(QWidget *parent)
"name shown correctly in GMail or Android." ) );
layout->addWidget( mDisplayNameBox, 5, 0, 1, 2 );
readSettings();
}
VCardExportSelectionWidget::~VCardExportSelectionWidget()
{
writeSettings();
}
void VCardExportSelectionWidget::readSettings()
{
KConfig config( QLatin1String("kaddressbookrc") );
const KConfigGroup group( &config, "XXPortVCard" );
......@@ -104,10 +114,9 @@ VCardExportSelectionWidget::VCardExportSelectionWidget(QWidget *parent)
mEncryptionKeys->setChecked( group.readEntry( "ExportEncryptionKeys", true ) );
mPictureBox->setChecked( group.readEntry( "ExportPictureFields", true ) );
mDisplayNameBox->setChecked( group.readEntry( "ExportDisplayName", false ) );
}
VCardExportSelectionWidget::~VCardExportSelectionWidget()
void VCardExportSelectionWidget::writeSettings()
{
KConfig config( QLatin1String("kaddressbookrc") );
KConfigGroup group( &config, "XXPortVCard" );
......
......@@ -41,6 +41,8 @@ public:
ExportFields exportType() const;
private:
void readSettings();
void writeSettings();
QCheckBox *mPrivateBox;
QCheckBox *mBusinessBox;
QCheckBox *mOtherBox;
......
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