summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-01 12:03:16 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-01 12:03:16 (GMT)
commit282cec8151f9d6bda3664f4cad11e926e1f72061 (patch)
tree9362e0e1f5fe2d8d918f1e766beb19a5b1d4a370
parentcaadee6a926a688314c4d16bde9e6693d3a23000 (diff)
Add parent directly
-rw-r--r--src/autocorrection/autocorrection.cpp1
-rw-r--r--src/storageservice/authdialog/storageauthviewdialog.cpp7
-rw-r--r--src/storageservice/authdialog/storageauthviewwidget.cpp3
-rw-r--r--src/storageservice/dialog/storageservicechecknamedialog.cpp3
-rw-r--r--src/storageservice/dialog/storageservicedeletedialog.cpp3
-rw-r--r--src/templatewidgets/templateeditdialog.cpp3
-rw-r--r--src/translator/translatordebugdialog.cpp10
-rw-r--r--src/widgets/annotationdialog.cpp3
8 files changed, 14 insertions, 19 deletions
diff --git a/src/autocorrection/autocorrection.cpp b/src/autocorrection/autocorrection.cpp
index 41be4bb..5c729c8 100644
--- a/src/autocorrection/autocorrection.cpp
+++ b/src/autocorrection/autocorrection.cpp
@@ -775,6 +775,7 @@ void AutoCorrection::uppercaseFirstCharOfSentence()
int position = mCursor.selectionEnd();
const QString text = mCursor.selectedText();
+ qDebug()<<" text :"<< text << "position " << position << " block.position()" << block.position() << " startPos "<<startPos << mCursor.atStart();
if (text.isEmpty()) {// start of a paragraph
if (!excludeToUppercase(mWord)) {
diff --git a/src/storageservice/authdialog/storageauthviewdialog.cpp b/src/storageservice/authdialog/storageauthviewdialog.cpp
index 0303770..cfeb750 100644
--- a/src/storageservice/authdialog/storageauthviewdialog.cpp
+++ b/src/storageservice/authdialog/storageauthviewdialog.cpp
@@ -29,16 +29,15 @@ StorageAuthViewDialog::StorageAuthViewDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Authorize"));
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &StorageAuthViewDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &StorageAuthViewDialog::reject);
- mView = new StorageAuthViewWidget;
+ mView = new StorageAuthViewWidget(this);
mainLayout->addWidget(mView);
mainLayout->addWidget(buttonBox);
diff --git a/src/storageservice/authdialog/storageauthviewwidget.cpp b/src/storageservice/authdialog/storageauthviewwidget.cpp
index 4815b35..14e8f82 100644
--- a/src/storageservice/authdialog/storageauthviewwidget.cpp
+++ b/src/storageservice/authdialog/storageauthviewwidget.cpp
@@ -26,7 +26,7 @@ using namespace PimCommon;
StorageAuthViewWidget::StorageAuthViewWidget(QWidget *parent)
: QWidget(parent)
{
- QVBoxLayout *lay = new QVBoxLayout;
+ QVBoxLayout *lay = new QVBoxLayout(this);
lay->setMargin(0);
mWebView = new StorageAuthWebView;
mProgressBar = new QProgressBar;
@@ -37,7 +37,6 @@ StorageAuthViewWidget::StorageAuthViewWidget(QWidget *parent)
connect(mWebView, &StorageAuthWebView::loadFinished, this, &StorageAuthViewWidget::slotLoadFinished);
lay->addWidget(mWebView);
lay->addWidget(mProgressBar);
- setLayout(lay);
}
StorageAuthViewWidget::~StorageAuthViewWidget()
diff --git a/src/storageservice/dialog/storageservicechecknamedialog.cpp b/src/storageservice/dialog/storageservicechecknamedialog.cpp
index e139e20..35566f8 100644
--- a/src/storageservice/dialog/storageservicechecknamedialog.cpp
+++ b/src/storageservice/dialog/storageservicechecknamedialog.cpp
@@ -34,8 +34,7 @@ StorageServiceCheckNameDialog::StorageServiceCheckNameDialog(QWidget *parent)
{
setWindowTitle(i18n("New name"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/src/storageservice/dialog/storageservicedeletedialog.cpp b/src/storageservice/dialog/storageservicedeletedialog.cpp
index 88312ce..55ef5f0 100644
--- a/src/storageservice/dialog/storageservicedeletedialog.cpp
+++ b/src/storageservice/dialog/storageservicedeletedialog.cpp
@@ -93,8 +93,7 @@ StorageServiceDeleteDialog::StorageServiceDeleteDialog(DeleteType type, PimCommo
connect(mStorageServiceProgressIndicator, &PimCommon::StorageServiceProgressIndicator::updatePixmap, this, &StorageServiceDeleteDialog::slotUpdatePixmap);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mUser1Button = new QPushButton;
buttonBox->addButton(mUser1Button, QDialogButtonBox::ActionRole);
connect(buttonBox, &QDialogButtonBox::rejected, this, &StorageServiceDeleteDialog::reject);
diff --git a/src/templatewidgets/templateeditdialog.cpp b/src/templatewidgets/templateeditdialog.cpp
index a0b7b25..e36fcd2 100644
--- a/src/templatewidgets/templateeditdialog.cpp
+++ b/src/templatewidgets/templateeditdialog.cpp
@@ -36,8 +36,7 @@ TemplateEditDialog::TemplateEditDialog(QWidget *parent, bool defaultTemplate)
: QDialog(parent), mOkButton(Q_NULLPTR)
{
setWindowTitle(defaultTemplate ? i18n("Default template") : i18n("Template"));
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = Q_NULLPTR;
if (defaultTemplate) {
buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
diff --git a/src/translator/translatordebugdialog.cpp b/src/translator/translatordebugdialog.cpp
index 41b76f7..fd042ad 100644
--- a/src/translator/translatordebugdialog.cpp
+++ b/src/translator/translatordebugdialog.cpp
@@ -30,17 +30,17 @@ TranslatorDebugDialog::TranslatorDebugDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Translator Debug"));
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
- mUser1Button = new QPushButton;
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
+ mUser1Button = new QPushButton(this);
buttonBox->addButton(mUser1Button, QDialogButtonBox::ActionRole);
connect(buttonBox, &QDialogButtonBox::accepted, this, &TranslatorDebugDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &TranslatorDebugDialog::reject);
mUser1Button->setText(i18n("Save As..."));
connect(mUser1Button, &QPushButton::clicked, this, &TranslatorDebugDialog::slotSaveAs);
- mEdit = new KPIMTextEdit::PlainTextEditorWidget;
+ mEdit = new KPIMTextEdit::PlainTextEditorWidget(this);
mEdit->setReadOnly(true);
mainLayout->addWidget(mEdit);
mainLayout->addWidget(buttonBox);
diff --git a/src/widgets/annotationdialog.cpp b/src/widgets/annotationdialog.cpp
index 889b7c5..569ae58 100644
--- a/src/widgets/annotationdialog.cpp
+++ b/src/widgets/annotationdialog.cpp
@@ -64,8 +64,7 @@ AnnotationEditDialog::AnnotationEditDialog(const Akonadi::Item &item, QWidget *p
d->mHasAnnotation = item.hasAttribute<Akonadi::EntityAnnotationsAttribute>();
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);