[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [libkdepim/Applications/16.08] src/addressline/completionorder: Fix layout
From:       Montel Laurent <montel () kde ! org>
Date:       2016-08-10 6:39:11
Message-ID: E1bXNAV-0003tf-Hx () code ! kde ! org
[Download RAW message or body]

Git commit 4a59837eebafae960caa2723187035047913b9b1 by Montel Laurent.
Committed on 10/08/2016 at 06:39.
Pushed by mlaurent into branch 'Applications/16.08'.

Fix layout

M  +11   -14   src/addressline/completionorder/completionordereditor.cpp

http://commits.kde.org/libkdepim/4a59837eebafae960caa2723187035047913b9b1

diff --git a/src/addressline/completionorder/completionordereditor.cpp \
b/src/addressline/completionorder/completionordereditor.cpp index bd12911..f7de67e \
                100644
--- a/src/addressline/completionorder/completionordereditor.cpp
+++ b/src/addressline/completionorder/completionordereditor.cpp
@@ -67,29 +67,26 @@ CompletionOrderEditor::CompletionOrderEditor(KLDAP::LdapClientSearch \
*ldapSearch  : QDialog(parent), d(new KPIM::CompletionOrderEditorPrivate)
 {
     setWindowTitle(i18n("Edit Completion Order"));
-    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);
-    connect(buttonBox, &QDialogButtonBox::accepted, this, \
                &CompletionOrderEditor::slotOk);
-    connect(buttonBox, &QDialogButtonBox::rejected, this, \
                &CompletionOrderEditor::reject);
-    okButton->setDefault(true);
-
-    QWidget *page = new QWidget(this);
-    QHBoxLayout *pageHBoxLayout = new QHBoxLayout(page);
-    pageHBoxLayout->setMargin(0);
+    QVBoxLayout *mainLayout = new QVBoxLayout(this);
 
     d->mCompletionOrderWidget = new CompletionOrderWidget(this);
     d->mCompletionOrderWidget->setObjectName(QStringLiteral("completionorderwidget"));
  
     mainLayout->addWidget(d->mCompletionOrderWidget);
-    mainLayout->addWidget(buttonBox);
 
     d->mCompletionOrderWidget->setLdapClientSearch(ldapSearch);
 
     d->mCompletionOrderWidget->loadCompletionItems();
+
+    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);
+    connect(buttonBox, &QDialogButtonBox::accepted, this, \
&CompletionOrderEditor::slotOk); +    connect(buttonBox, &QDialogButtonBox::rejected, \
this, &CompletionOrderEditor::reject); +    okButton->setDefault(true);
+    mainLayout->addWidget(buttonBox);
+
     readConfig();
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic