Commit 8a7fb18b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add parent directly

parent cb1c5b8b
......@@ -43,8 +43,7 @@ MergeContactsDialog::MergeContactsDialog(QWidget *parent)
setWindowTitle(i18n("Select Contacts to merge"));
mButtonBox = new QDialogButtonBox(QDialogButtonBox::Close);
mButtonBox->setObjectName(QStringLiteral("buttonbox"));
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
connect(mButtonBox, &QDialogButtonBox::rejected, this, &MergeContactsDialog::reject);
readConfig();
......
......@@ -41,9 +41,8 @@ SearchDuplicateResultWidget::SearchDuplicateResultWidget(QWidget *parent)
: QWidget(parent),
mIndexListContact(0)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setMargin(0);
setLayout(mainLayout);
QSplitter *splitter = new QSplitter;
splitter->setObjectName(QStringLiteral("splitter"));
......
......@@ -25,9 +25,8 @@ using namespace KABMergeContacts;
MergeContactSelectInformationWidget::MergeContactSelectInformationWidget(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setMargin(0);
setLayout(mainLayout);
}
MergeContactSelectInformationWidget::~MergeContactSelectInformationWidget()
......
......@@ -31,12 +31,11 @@ MergeContactSelectListWidget::MergeContactSelectListWidget(QWidget *parent)
: QWidget(parent),
mConflictType(MergeContacts::None)
{
QVBoxLayout *vbox = new QVBoxLayout;
setLayout(vbox);
mTitle = new QLabel;
QVBoxLayout *vbox = new QVBoxLayout(this);
mTitle = new QLabel(this);
mTitle->setObjectName(QStringLiteral("title"));
vbox->addWidget(mTitle);
mSelectListWidget = new QListWidget;
mSelectListWidget = new QListWidget(this);
mSelectListWidget->setObjectName(QStringLiteral("listwidget"));
vbox->addWidget(mSelectListWidget);
}
......
......@@ -31,8 +31,7 @@ ShortUrlConfigureDialog::ShortUrlConfigureDialog(QWidget *parent)
{
setWindowTitle(i18n("Configure engine"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::RestoreDefaults);
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);
......
......@@ -33,10 +33,9 @@ AttendeeSelector::AttendeeSelector(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Select Attendees"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QWidget *mainWidget = new QWidget(this);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
mainLayout->addWidget(mainWidget);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
......
......@@ -30,7 +30,7 @@ using namespace MessageViewer;
DefaultGrantleeHeaderStyleInterface::DefaultGrantleeHeaderStyleInterface(MessageViewer::HeaderStylePlugin *plugin, QObject *parent)
: MessageViewer::HeaderStyleInterface(plugin, parent)
{
qDebug()<<" DefaultGrantleeHeaderStyleInterface"<<this;
}
DefaultGrantleeHeaderStyleInterface::~DefaultGrantleeHeaderStyleInterface()
......@@ -40,7 +40,7 @@ DefaultGrantleeHeaderStyleInterface::~DefaultGrantleeHeaderStyleInterface()
void DefaultGrantleeHeaderStyleInterface::createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac)
{
qDebug()<<" void DefaultGrantleeHeaderStyleInterface::createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac)";
const QStringList defaultThemePath = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("messageviewer/defaultthemes/"), QStandardPaths::LocateDirectory);
if (!defaultThemePath.isEmpty()) {
const QString themeName = DefaultGrantleeHeaderStylePluginSettings::self()->themeName();
......@@ -63,6 +63,7 @@ void DefaultGrantleeHeaderStyleInterface::activateAction()
void DefaultGrantleeHeaderStyleInterface::slotDefaultGrantleeHeaders()
{
qDebug()<<" void DefaultGrantleeHeaderStyleInterface::slotDefaultGrantleeHeaders()************";
mHeaderStylePlugin->headerStyle()->setTheme(mDefaultTheme);
slotStyleChanged();
}
......@@ -50,10 +50,9 @@ using namespace MessageViewer;
EventEdit::EventEdit(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout;
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(5);
vbox->setSpacing(2);
setLayout(vbox);
QHBoxLayout *hbox = new QHBoxLayout;
hbox->setMargin(0);
......
......@@ -45,10 +45,9 @@ using namespace MessageViewer;
NoteEdit::NoteEdit(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout;
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(5);
vbox->setSpacing(2);
setLayout(vbox);
QHBoxLayout *hbox = new QHBoxLayout;
hbox->setMargin(0);
......
......@@ -48,10 +48,9 @@ using namespace MessageViewer;
TodoEdit::TodoEdit(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout;
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(5);
vbox->setSpacing(2);
setLayout(vbox);
mMsgWidget = new KMessageWidget(this);
mMsgWidget->setCloseButtonVisible(true);
......
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