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