Commit 49cf7c0f authored by Laurent Montel's avatar Laurent Montel 😁

Add explicit parent

parent b13b9843
......@@ -41,38 +41,38 @@ DesktopFilePage::DesktopFilePage(const QString &defaultFileName, DesktopFilePage
mExtraDisplayHeaders(0)
{
QGridLayout *lay = new QGridLayout;
QLabel *lab = new QLabel(i18n("Name:"));
mName = new QLineEdit;
QLabel *lab = new QLabel(i18n("Name:"), this);
mName = new QLineEdit(this);
mName->setReadOnly(true);
int row = 0;
lay->addWidget(lab, row, 0);
lay->addWidget(mName, row, 1);
++row;
lab = new QLabel(i18n("Author:"));
mAuthor = new QLineEdit;
lab = new QLabel(i18n("Author:"), this);
mAuthor = new QLineEdit(this);
mAuthor->setClearButtonEnabled(true);
lay->addWidget(lab, row, 0);
lay->addWidget(mAuthor, row, 1);
++row;
lab = new QLabel(i18n("Email:"));
mEmail = new QLineEdit;
lab = new QLabel(i18n("Email:"), this);
mEmail = new QLineEdit(this);
mEmail->setClearButtonEnabled(true);
lay->addWidget(lab, row, 0);
lay->addWidget(mEmail, row, 1);
++row;
lab = new QLabel(i18n("Description:"));
mDescription = new KPIMTextEdit::PlainTextEditorWidget;
mDescription = new KPIMTextEdit::PlainTextEditorWidget(this);
mDescription->editor()->setSearchSupport(false);
lay->addWidget(lab, row, 0);
lay->addWidget(mDescription, row, 1);
if (options & SpecifyFileName) {
++row;
lab = new QLabel(i18n("Filename:"));
mFilename = new QLineEdit;
lab = new QLabel(i18n("Filename:"), this);
mFilename = new QLineEdit(this);
mFilename->setText(defaultFileName);
connect(mFilename, &QLineEdit::textChanged, this, &DesktopFilePage::slotFileNameChanged);
lay->addWidget(lab, row, 0);
......@@ -81,7 +81,7 @@ DesktopFilePage::DesktopFilePage(const QString &defaultFileName, DesktopFilePage
++row;
lab = new QLabel(i18n("Version:"));
mVersion = new QLineEdit;
mVersion = new QLineEdit(this);
mVersion->setClearButtonEnabled(true);
mVersion->setText(QStringLiteral("0.1"));
lay->addWidget(lab, row, 0);
......@@ -89,16 +89,16 @@ DesktopFilePage::DesktopFilePage(const QString &defaultFileName, DesktopFilePage
++row;
if (options & ExtraDisplayVariables) {
lab = new QLabel(i18n("Extract Headers:"));
lab = new QLabel(i18n("Extract Headers:"), this);
lay->addWidget(lab, row, 0);
++row;
lab = new QLabel(QStringLiteral("<qt><b>") + i18n("Be careful, Grantlee does not support '-' in variable name. So when you want to add extra header as \"X-Original-To\" add \"X-Original-To\" in list, but use \"XOriginalTo\" as variable in Grantlee (remove '-' in name).") + QStringLiteral("</b></qt>"));
lab = new QLabel(QStringLiteral("<qt><b>") + i18n("Be careful, Grantlee does not support '-' in variable name. So when you want to add extra header as \"X-Original-To\" add \"X-Original-To\" in list, but use \"XOriginalTo\" as variable in Grantlee (remove '-' in name).") + QStringLiteral("</b></qt>"), this);
lab->setWordWrap(true);
lay->addWidget(lab, row, 0, 1, 2);
++row;
mExtraDisplayHeaders = new KEditListWidget;
mExtraDisplayHeaders = new KEditListWidget(this);
lay->addWidget(mExtraDisplayHeaders, row, 0, 1, 2);
connect(mExtraDisplayHeaders, &KEditListWidget::changed, this, &DesktopFilePage::slotExtraDisplayHeadersChanged);
} else {
......
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