Commit 49bf5453 authored by Laurent Montel's avatar Laurent Montel 😁

Fix Bug 379030 - regression: mail HTML settings gone

FIXED-IN: 5.6.0
BUG: 379030
parent 12da0656
...@@ -35,7 +35,7 @@ MessageFormattingWidgetTest::MessageFormattingWidgetTest(QObject *parent) ...@@ -35,7 +35,7 @@ MessageFormattingWidgetTest::MessageFormattingWidgetTest(QObject *parent)
void MessageFormattingWidgetTest::shouldHaveDefaultValue() void MessageFormattingWidgetTest::shouldHaveDefaultValue()
{ {
MessageFormattingWidget w; Akonadi::MessageFormattingWidget w;
QLabel *label = w.findChild<QLabel *>(QStringLiteral("label")); QLabel *label = w.findChild<QLabel *>(QStringLiteral("label"));
QVERIFY(label); QVERIFY(label);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "web/weblistwidget.h" #include "web/weblistwidget.h"
#include "categorieseditwidget.h" #include "categorieseditwidget.h"
#include "../widgets/imagewidget.h" #include "../widgets/imagewidget.h"
#include "messageformattingwidget.h"
using namespace Akonadi; using namespace Akonadi;
...@@ -89,6 +90,11 @@ GeneralInfoWidget::GeneralInfoWidget(QWidget *parent) ...@@ -89,6 +90,11 @@ GeneralInfoWidget::GeneralInfoWidget(QWidget *parent)
mCategoriesWidget->setObjectName(QStringLiteral("categories")); mCategoriesWidget->setObjectName(QStringLiteral("categories"));
categoryWidgetLayout->addWidget(mCategoriesWidget); categoryWidgetLayout->addWidget(mCategoriesWidget);
leftLayout->addWidget(categoryWidget); leftLayout->addWidget(categoryWidget);
mMessageFormattingWidget = new MessageFormattingWidget(this);
mMessageFormattingWidget->setObjectName(QStringLiteral("mMessageFormattingWidget"));
leftLayout->addWidget(mMessageFormattingWidget);
leftLayout->addStretch(1); leftLayout->addStretch(1);
rightLayout->addStretch(1); rightLayout->addStretch(1);
} }
...@@ -118,6 +124,7 @@ void GeneralInfoWidget::loadContact(const KContacts::Addressee &contact) ...@@ -118,6 +124,7 @@ void GeneralInfoWidget::loadContact(const KContacts::Addressee &contact)
mNickNameWidget->loadContact(contact); mNickNameWidget->loadContact(contact);
mPhotoWidget->loadContact(contact); mPhotoWidget->loadContact(contact);
mCategoriesWidget->loadContact(contact); mCategoriesWidget->loadContact(contact);
mMessageFormattingWidget->loadContact(contact);
} }
void GeneralInfoWidget::storeContact(KContacts::Addressee &contact) const void GeneralInfoWidget::storeContact(KContacts::Addressee &contact) const
...@@ -130,6 +137,7 @@ void GeneralInfoWidget::storeContact(KContacts::Addressee &contact) const ...@@ -130,6 +137,7 @@ void GeneralInfoWidget::storeContact(KContacts::Addressee &contact) const
mNickNameWidget->storeContact(contact); mNickNameWidget->storeContact(contact);
mPhotoWidget->storeContact(contact); mPhotoWidget->storeContact(contact);
mCategoriesWidget->storeContact(contact); mCategoriesWidget->storeContact(contact);
mMessageFormattingWidget->storeContact(contact);
} }
void GeneralInfoWidget::setReadOnly(bool readOnly) void GeneralInfoWidget::setReadOnly(bool readOnly)
...@@ -142,4 +150,5 @@ void GeneralInfoWidget::setReadOnly(bool readOnly) ...@@ -142,4 +150,5 @@ void GeneralInfoWidget::setReadOnly(bool readOnly)
mNickNameWidget->setReadOnly(readOnly); mNickNameWidget->setReadOnly(readOnly);
mPhotoWidget->setReadOnly(readOnly); mPhotoWidget->setReadOnly(readOnly);
mCategoriesWidget->setReadOnly(readOnly); mCategoriesWidget->setReadOnly(readOnly);
mMessageFormattingWidget->setReadOnly(readOnly);
} }
...@@ -40,6 +40,7 @@ class MessagingListWidget; ...@@ -40,6 +40,7 @@ class MessagingListWidget;
class MailListWidget; class MailListWidget;
class NameWidget; class NameWidget;
class NicknameWidget; class NicknameWidget;
class MessageFormattingWidget;
class GeneralInfoWidget : public QWidget class GeneralInfoWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
...@@ -63,6 +64,7 @@ private: ...@@ -63,6 +64,7 @@ private:
NameWidget *mNameWidget; NameWidget *mNameWidget;
NicknameWidget *mNickNameWidget; NicknameWidget *mNickNameWidget;
CategoriesEditWidget *mCategoriesWidget; CategoriesEditWidget *mCategoriesWidget;
MessageFormattingWidget *mMessageFormattingWidget;
}; };
} }
#endif // GENERALINFOWIDGET_H #endif // GENERALINFOWIDGET_H
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLabel> #include <QLabel>
using namespace Akonadi;
MessageFormattingWidget::MessageFormattingWidget(QWidget *parent) MessageFormattingWidget::MessageFormattingWidget(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include "akonadicontact_private_export.h" #include "akonadicontact_private_export.h"
class QComboBox; class QComboBox;
class QCheckBox; class QCheckBox;
namespace Akonadi
{
class AKONADI_CONTACTS_TESTS_EXPORT MessageFormattingWidget : public QWidget class AKONADI_CONTACTS_TESTS_EXPORT MessageFormattingWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
...@@ -42,5 +44,5 @@ private: ...@@ -42,5 +44,5 @@ private:
QComboBox *mMailPreferFormatting; QComboBox *mMailPreferFormatting;
QCheckBox *mAllowRemoteContent; QCheckBox *mAllowRemoteContent;
}; };
}
#endif // MESSAGEFORMATTINGWIDGET_H #endif // MESSAGEFORMATTINGWIDGET_H
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