Commit 4394b916 authored by Laurent Montel's avatar Laurent Montel 😁

Add parent

parent bef737f1
......@@ -60,10 +60,10 @@ EventEdit::EventEdit(QWidget *parent)
hbox->setSpacing(2);
vbox->addLayout(hbox);
QLabel *lab = new QLabel(i18n("Event:"));
QLabel *lab = new QLabel(i18n("Event:"), this);
hbox->addWidget(lab);
mEventEdit = new QLineEdit;
mEventEdit = new QLineEdit(this);
mEventEdit->setClearButtonEnabled(true);
mEventEdit->setObjectName(QStringLiteral("eventedit"));
mEventEdit->setFocus();
......@@ -73,7 +73,7 @@ EventEdit::EventEdit(QWidget *parent)
hbox->addSpacing(5);
mCollectionCombobox = new Akonadi::CollectionComboBox(_k_eventEditStubModel);
mCollectionCombobox = new Akonadi::CollectionComboBox(_k_eventEditStubModel, this);
mCollectionCombobox->setAccessRightsFilter(Akonadi::Collection::CanCreateItem);
mCollectionCombobox->setMinimumWidth(250);
mCollectionCombobox->setMimeTypeFilter(QStringList() << KCalCore::Event::eventMimeType());
......@@ -92,10 +92,10 @@ EventEdit::EventEdit(QWidget *parent)
hbox->setSpacing(2);
vbox->addLayout(hbox);
lab = new QLabel(i18n("Start:"));
lab = new QLabel(i18n("Start:"), this);
hbox->addWidget(lab);
QDateTime currentDateTime = QDateTime::currentDateTime();
mStartDateTimeEdit = new EventDateTimeWidget;
mStartDateTimeEdit = new EventDateTimeWidget(this);
mStartDateTimeEdit->setObjectName(QStringLiteral("startdatetimeedit"));
mStartDateTimeEdit->setDateTime(currentDateTime);
#ifndef QT_NO_ACCESSIBILITY
......@@ -106,9 +106,9 @@ EventEdit::EventEdit(QWidget *parent)
hbox->addSpacing(5);
lab = new QLabel(i18n("End:"));
lab = new QLabel(i18n("End:"), this);
hbox->addWidget(lab);
mEndDateTimeEdit = new EventDateTimeWidget;
mEndDateTimeEdit = new EventDateTimeWidget(this);
mEndDateTimeEdit->setObjectName(QStringLiteral("enddatetimeedit"));
mEndDateTimeEdit->setDateTime(currentDateTime.addSecs(3600));
#ifndef QT_NO_ACCESSIBILITY
......@@ -128,7 +128,7 @@ EventEdit::EventEdit(QWidget *parent)
hbox->addStretch(1);
mSaveButton = new QPushButton(QIcon::fromTheme(QStringLiteral("appointment-new")), i18n("&Save"));
mSaveButton = new QPushButton(QIcon::fromTheme(QStringLiteral("appointment-new")), i18n("&Save"), this);
mSaveButton->setObjectName(QStringLiteral("save-button"));
mSaveButton->setEnabled(false);
#ifndef QT_NO_ACCESSIBILITY
......@@ -137,7 +137,7 @@ EventEdit::EventEdit(QWidget *parent)
connect(mSaveButton, &QPushButton::clicked, this, &EventEdit::slotReturnPressed);
hbox->addWidget(mSaveButton);
mOpenEditorButton = new QPushButton(i18n("Open &editor..."));
mOpenEditorButton = new QPushButton(i18n("Open &editor..."), this);
#ifndef QT_NO_ACCESSIBILITY
mOpenEditorButton->setAccessibleDescription(i18n("Open event editor, where more details can be changed."));
#endif
......@@ -146,7 +146,7 @@ EventEdit::EventEdit(QWidget *parent)
connect(mOpenEditorButton, &QPushButton::clicked, this, &EventEdit::slotOpenEditor);
hbox->addWidget(mOpenEditorButton);
QPushButton *btn = new QPushButton;
QPushButton *btn = new QPushButton(this);
KGuiItem::assign(btn, KStandardGuiItem::cancel());
btn->setObjectName(QStringLiteral("close-button"));
#ifndef QT_NO_ACCESSIBILITY
......
......@@ -55,10 +55,10 @@ NoteEdit::NoteEdit(QWidget *parent)
hbox->setSpacing(2);
vbox->addLayout(hbox);
QLabel *lab = new QLabel(i18n("Note:"));
QLabel *lab = new QLabel(i18n("Note:"), this);
hbox->addWidget(lab);
mNoteEdit = new QLineEdit;
mNoteEdit = new QLineEdit(this);
mNoteEdit->setClearButtonEnabled(true);
mNoteEdit->setObjectName(QStringLiteral("noteedit"));
mNoteEdit->setFocus();
......@@ -68,7 +68,7 @@ NoteEdit::NoteEdit(QWidget *parent)
hbox->addSpacing(5);
mCollectionCombobox = new Akonadi::CollectionComboBox(_k_noteEditStubModel);
mCollectionCombobox = new Akonadi::CollectionComboBox(_k_noteEditStubModel, this);
mCollectionCombobox->setAccessRightsFilter(Akonadi::Collection::CanCreateItem);
mCollectionCombobox->setMinimumWidth(250);
mCollectionCombobox->setMimeTypeFilter(QStringList() << Akonadi::NoteUtils::noteMimeType());
......@@ -96,7 +96,7 @@ NoteEdit::NoteEdit(QWidget *parent)
hbox->addStretch(1);
mSaveButton = new QPushButton(QIcon::fromTheme(QStringLiteral("view-pim-notes")), i18n("&Save"));
mSaveButton = new QPushButton(QIcon::fromTheme(QStringLiteral("view-pim-notes")), i18n("&Save"), this);
mSaveButton->setObjectName(QStringLiteral("save-button"));
mSaveButton->setEnabled(false);
#ifndef QT_NO_ACCESSIBILITY
......@@ -105,7 +105,7 @@ NoteEdit::NoteEdit(QWidget *parent)
connect(mSaveButton, &QPushButton::clicked, this, &NoteEdit::slotReturnPressed);
hbox->addWidget(mSaveButton);
QPushButton *btn = new QPushButton;
QPushButton *btn = new QPushButton(this);
KGuiItem::assign(btn, KStandardGuiItem::cancel());
btn->setObjectName(QStringLiteral("close-button"));
#ifndef QT_NO_ACCESSIBILITY
......
......@@ -64,10 +64,10 @@ TodoEdit::TodoEdit(QWidget *parent)
hbox->setSpacing(2);
vbox->addLayout(hbox);
QLabel *lab = new QLabel(i18n("Todo:"));
QLabel *lab = new QLabel(i18n("Todo:"), this);
hbox->addWidget(lab);
mNoteEdit = new QLineEdit;
mNoteEdit = new QLineEdit(this);
mNoteEdit->setClearButtonEnabled(true);
mNoteEdit->setObjectName(QStringLiteral("noteedit"));
mNoteEdit->setFocus();
......@@ -77,7 +77,7 @@ TodoEdit::TodoEdit(QWidget *parent)
hbox->addSpacing(5);
mCollectionCombobox = new Akonadi::CollectionComboBox(_k_todoEditStubModel);
mCollectionCombobox = new Akonadi::CollectionComboBox(_k_todoEditStubModel, this);
mCollectionCombobox->setAccessRightsFilter(Akonadi::Collection::CanCreateItem);
mCollectionCombobox->setMinimumWidth(250);
mCollectionCombobox->setMimeTypeFilter(QStringList() << KCalCore::Todo::todoMimeType());
......@@ -96,7 +96,7 @@ TodoEdit::TodoEdit(QWidget *parent)
vbox->addLayout(hbox);
hbox->addStretch(1);
mSaveButton = new QPushButton(QIcon::fromTheme(QStringLiteral("task-new")), i18n("&Save"));
mSaveButton = new QPushButton(QIcon::fromTheme(QStringLiteral("task-new")), i18n("&Save"), this);
mSaveButton->setObjectName(QStringLiteral("save-button"));
mSaveButton->setEnabled(false);
#ifndef QT_NO_ACCESSIBILITY
......@@ -105,7 +105,7 @@ TodoEdit::TodoEdit(QWidget *parent)
connect(mSaveButton, &QPushButton::clicked, this, &TodoEdit::slotReturnPressed);
hbox->addWidget(mSaveButton);
mOpenEditorButton = new QPushButton(i18n("Open &editor..."));
mOpenEditorButton = new QPushButton(i18n("Open &editor..."), this);
mOpenEditorButton->setObjectName(QStringLiteral("open-editor-button"));
#ifndef QT_NO_ACCESSIBILITY
mOpenEditorButton->setAccessibleDescription(i18n("Open todo editor, where more details can be changed."));
......@@ -114,7 +114,7 @@ TodoEdit::TodoEdit(QWidget *parent)
connect(mOpenEditorButton, &QPushButton::clicked, this, &TodoEdit::slotOpenEditor);
hbox->addWidget(mOpenEditorButton);
QPushButton *btn = new QPushButton;
QPushButton *btn = new QPushButton(this);
KGuiItem::assign(btn, KStandardGuiItem::cancel());
btn->setObjectName(QStringLiteral("close-button"));
#ifndef QT_NO_ACCESSIBILITY
......
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