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 6abc5ebb authored by Laurent Montel's avatar Laurent Montel 😁

Add parent

parent 72a27cb4
...@@ -31,9 +31,8 @@ ...@@ -31,9 +31,8 @@
ImageScalingTestWidget::ImageScalingTestWidget(QWidget *parent) ImageScalingTestWidget::ImageScalingTestWidget(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
QHBoxLayout *lay = new QHBoxLayout; QHBoxLayout *lay = new QHBoxLayout(this);
lay->addWidget(new MessageComposer::ImageScalingWidget); lay->addWidget(new MessageComposer::ImageScalingWidget(this));
setLayout(lay);
} }
ImageScalingTestWidget::~ImageScalingTestWidget() ImageScalingTestWidget::~ImageScalingTestWidget()
......
...@@ -49,8 +49,7 @@ RecipientsPicker::RecipientsPicker(QWidget *parent) ...@@ -49,8 +49,7 @@ RecipientsPicker::RecipientsPicker(QWidget *parent)
setObjectName(QStringLiteral("RecipientsPicker")); setObjectName(QStringLiteral("RecipientsPicker"));
setWindowTitle(i18n("Select Recipient")); setWindowTitle(i18n("Select Recipient"));
QVBoxLayout *mainLayout = new QVBoxLayout; QVBoxLayout *mainLayout = new QVBoxLayout(this);
setLayout(mainLayout);
mView = new Akonadi::EmailAddressSelectionWidget(this); mView = new Akonadi::EmailAddressSelectionWidget(this);
mainLayout->addWidget(mView); mainLayout->addWidget(mView);
......
...@@ -37,10 +37,9 @@ using namespace MessageList::Core; ...@@ -37,10 +37,9 @@ using namespace MessageList::Core;
QuickSearchLine::QuickSearchLine(QWidget *parent) QuickSearchLine::QuickSearchLine(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
QVBoxLayout *vbox = new QVBoxLayout; QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(0); vbox->setMargin(0);
vbox->setSpacing(0); vbox->setSpacing(0);
setLayout(vbox);
QWidget *w = new QWidget; QWidget *w = new QWidget;
QHBoxLayout *hbox = new QHBoxLayout; QHBoxLayout *hbox = new QHBoxLayout;
......
...@@ -107,8 +107,7 @@ ConfigureAggregationsDialog::ConfigureAggregationsDialog(QWidget *parent) ...@@ -107,8 +107,7 @@ ConfigureAggregationsDialog::ConfigureAggregationsDialog(QWidget *parent)
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
setWindowModality(Qt::ApplicationModal); // FIXME: Sure ? setWindowModality(Qt::ApplicationModal); // FIXME: Sure ?
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QVBoxLayout *mainLayout = new QVBoxLayout; QVBoxLayout *mainLayout = new QVBoxLayout(this);
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true); okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return); okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
......
...@@ -98,9 +98,8 @@ ConfigureThemesDialog::ConfigureThemesDialog(QWidget *parent) ...@@ -98,9 +98,8 @@ ConfigureThemesDialog::ConfigureThemesDialog(QWidget *parent)
{ {
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
setWindowModality(Qt::ApplicationModal); // FIXME: Sure ? setWindowModality(Qt::ApplicationModal); // FIXME: Sure ?
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true); okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return); okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
......
...@@ -69,9 +69,8 @@ ThemeColumnPropertiesDialog::ThemeColumnPropertiesDialog(QWidget *parent, Theme: ...@@ -69,9 +69,8 @@ ThemeColumnPropertiesDialog::ThemeColumnPropertiesDialog(QWidget *parent, Theme:
{ {
//setAttribute( Qt::WA_DeleteOnClose ); //setAttribute( Qt::WA_DeleteOnClose );
setWindowModality(Qt::ApplicationModal); // FIXME: Sure ? setWindowModality(Qt::ApplicationModal); // FIXME: Sure ?
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); QVBoxLayout *mainLayout = new QVBoxLayout(this);
QVBoxLayout *mainLayout = new QVBoxLayout; QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true); okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return); okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
......
...@@ -45,16 +45,16 @@ ScamDetectionDetailsDialog::ScamDetectionDetailsDialog(QWidget *parent) ...@@ -45,16 +45,16 @@ ScamDetectionDetailsDialog::ScamDetectionDetailsDialog(QWidget *parent)
{ {
setWindowTitle(i18n("Details")); setWindowTitle(i18n("Details"));
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); QVBoxLayout *mainLayout = new QVBoxLayout(this);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
QPushButton *user1Button = new QPushButton; QPushButton *user1Button = new QPushButton(this);
buttonBox->addButton(user1Button, QDialogButtonBox::ActionRole); buttonBox->addButton(user1Button, QDialogButtonBox::ActionRole);
connect(buttonBox, &QDialogButtonBox::accepted, this, &ScamDetectionDetailsDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &ScamDetectionDetailsDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ScamDetectionDetailsDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &ScamDetectionDetailsDialog::reject);
KGuiItem::assign(user1Button, KStandardGuiItem::saveAs()); KGuiItem::assign(user1Button, KStandardGuiItem::saveAs());
setModal(false); setModal(false);
mDetails = new KPIMTextEdit::RichTextEditorWidget; mDetails = new KPIMTextEdit::RichTextEditorWidget(this);
mainLayout->addWidget(mDetails); mainLayout->addWidget(mDetails);
mainLayout->addWidget(buttonBox); mainLayout->addWidget(buttonBox);
mDetails->setReadOnly(true); mDetails->setReadOnly(true);
......
...@@ -39,7 +39,7 @@ ScamDetectionWebEngineTestWidget::ScamDetectionWebEngineTestWidget(const QString ...@@ -39,7 +39,7 @@ ScamDetectionWebEngineTestWidget::ScamDetectionWebEngineTestWidget(const QString
{ {
mScamDetection = new MessageViewer::ScamDetectionWebEngine(this); mScamDetection = new MessageViewer::ScamDetectionWebEngine(this);
QVBoxLayout *lay = new QVBoxLayout; QVBoxLayout *lay = new QVBoxLayout(this);
mScamWarningWidget = new MessageViewer::ScamDetectionWarningWidget(); mScamWarningWidget = new MessageViewer::ScamDetectionWarningWidget();
mScamWarningWidget->setUseInTestApps(true); mScamWarningWidget->setUseInTestApps(true);
lay->addWidget(mScamWarningWidget); lay->addWidget(mScamWarningWidget);
...@@ -58,8 +58,6 @@ ScamDetectionWebEngineTestWidget::ScamDetectionWebEngineTestWidget(const QString ...@@ -58,8 +58,6 @@ ScamDetectionWebEngineTestWidget::ScamDetectionWebEngineTestWidget(const QString
connect(openFile, &QPushButton::clicked, this, &ScamDetectionWebEngineTestWidget::slotOpenHtml); connect(openFile, &QPushButton::clicked, this, &ScamDetectionWebEngineTestWidget::slotOpenHtml);
hbox->addWidget(openFile); hbox->addWidget(openFile);
lay->addLayout(hbox); lay->addLayout(hbox);
setLayout(lay);
} }
ScamDetectionWebEngineTestWidget::~ScamDetectionWebEngineTestWidget() ScamDetectionWebEngineTestWidget::~ScamDetectionWebEngineTestWidget()
......
...@@ -59,8 +59,7 @@ using namespace MessageViewer; ...@@ -59,8 +59,7 @@ using namespace MessageViewer;
MailSourceViewTextBrowserWidget::MailSourceViewTextBrowserWidget(QWidget *parent) MailSourceViewTextBrowserWidget::MailSourceViewTextBrowserWidget(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
QVBoxLayout *lay = new QVBoxLayout; QVBoxLayout *lay = new QVBoxLayout(this);
setLayout(lay);
lay->setMargin(0); lay->setMargin(0);
mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget; mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget;
mTextToSpeechWidget->setObjectName(QStringLiteral("texttospeech")); mTextToSpeechWidget->setObjectName(QStringLiteral("texttospeech"));
......
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