summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-28 15:53:14 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-28 15:54:01 (GMT)
commit987d7d592c94666c6fbb8f53333620869e9d8dcd (patch)
tree5a0289eee3f2a4d81db546c950a3ef04e40714c7
parent39745a1c4617c529ab0d2fadceb7193a30252bb2 (diff)
Add parents
-rw-r--r--resources/birthdays/configdialog.cpp14
-rw-r--r--resources/contacts/settingsdialog.cpp4
-rw-r--r--resources/dav/resource/configdialog.cpp8
-rw-r--r--resources/dav/resource/searchdialog.cpp5
-rw-r--r--resources/icaldir/dirsettingsdialog.cpp3
-rw-r--r--resources/imap/setupserver.cpp3
-rw-r--r--resources/kalarm/kalarmdir/settingsdialog.cpp5
-rw-r--r--resources/maildir/configdialog.cpp7
-rw-r--r--resources/mixedmaildir/configdialog.cpp5
-rw-r--r--resources/openxchange/configdialog.cpp3
-rw-r--r--resources/pop3/accountdialog.cpp3
-rw-r--r--resources/shared/singlefileresource/singlefileresourceconfigdialogbase.cpp5
-rw-r--r--resources/tomboynotes/configdialog.cpp3
-rw-r--r--resources/vcarddir/dirsettingsdialog.cpp5
14 files changed, 30 insertions, 43 deletions
diff --git a/resources/birthdays/configdialog.cpp b/resources/birthdays/configdialog.cpp
index 2de8e2a..e5f490f 100644
--- a/resources/birthdays/configdialog.cpp
+++ b/resources/birthdays/configdialog.cpp
@@ -30,21 +30,21 @@
ConfigDialog::ConfigDialog(QWidget *parent)
: QDialog(parent)
{
- QWidget *mainWidget = new QWidget(this);
-
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ setWindowIcon(QIcon::fromTheme(QStringLiteral("view-calendar-birthday")));
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ 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, &ConfigDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ConfigDialog::reject);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QWidget *mainWidget = new QWidget(this);
+ ui.setupUi(mainWidget);
mainLayout->addWidget(mainWidget);
+
mainLayout->addWidget(buttonBox);
- ui.setupUi(mainWidget);
- setWindowIcon(QIcon::fromTheme(QStringLiteral("view-calendar-birthday")));
+
mManager = new KConfigDialogManager(this, Settings::self());
mManager->updateWidgets();
ui.kcfg_AlarmDays->setSuffix(ki18np(" day", " days"));
diff --git a/resources/contacts/settingsdialog.cpp b/resources/contacts/settingsdialog.cpp
index 2bc2a08..49f478f 100644
--- a/resources/contacts/settingsdialog.cpp
+++ b/resources/contacts/settingsdialog.cpp
@@ -38,9 +38,9 @@ SettingsDialog::SettingsDialog(ContactsResourceSettings *settings, WId windowId)
mSettings(settings)
{
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
+
ui.setupUi(mainWidget);
setWindowIcon(QIcon::fromTheme(QStringLiteral("text-directory")));
ui.kcfg_Path->setMode(KFile::LocalOnly | KFile::Directory);
diff --git a/resources/dav/resource/configdialog.cpp b/resources/dav/resource/configdialog.cpp
index 917bba8..6b4d99f 100644
--- a/resources/dav/resource/configdialog.cpp
+++ b/resources/dav/resource/configdialog.cpp
@@ -37,12 +37,11 @@
ConfigDialog::ConfigDialog(QWidget *parent)
: QDialog(parent)
{
+ setWindowIcon(QIcon::fromTheme(QStringLiteral("folder-remote")));
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
mainLayout->addWidget(mainWidget);
mUi.setupUi(mainWidget);
- setWindowIcon(QIcon::fromTheme(QStringLiteral("folder-remote")));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
@@ -52,8 +51,7 @@ ConfigDialog::ConfigDialog(QWidget *parent)
mainLayout->addWidget(buttonBox);
mModel = new QStandardItemModel();
- QStringList headers;
- headers << i18n("Protocol") << i18n("URL");
+ const QStringList headers = { i18n("Protocol"), i18n("URL") };
mModel->setHorizontalHeaderLabels(headers);
mUi.configuredUrls->setModel(mModel);
diff --git a/resources/dav/resource/searchdialog.cpp b/resources/dav/resource/searchdialog.cpp
index 54fd9e8..2141558 100644
--- a/resources/dav/resource/searchdialog.cpp
+++ b/resources/dav/resource/searchdialog.cpp
@@ -38,14 +38,13 @@ SearchDialog::SearchDialog(QWidget *parent)
: QDialog(parent), mModel(new QStandardItemModel(this)), mSubJobCount(0)
{
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
mUi.setupUi(mainWidget);
mUi.credentialsGroup->setVisible(false);
mUi.searchResults->setModel(mModel);
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ 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);
diff --git a/resources/icaldir/dirsettingsdialog.cpp b/resources/icaldir/dirsettingsdialog.cpp
index b75413e..e464cd0 100644
--- a/resources/icaldir/dirsettingsdialog.cpp
+++ b/resources/icaldir/dirsettingsdialog.cpp
@@ -37,8 +37,7 @@ SettingsDialog::SettingsDialog(WId windowId)
: QDialog()
{
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
ui.setupUi(mainWidget);
ui.kcfg_Path->setMode(KFile::LocalOnly | KFile::Directory);
diff --git a/resources/imap/setupserver.cpp b/resources/imap/setupserver.cpp
index d47e3ae..834f6bb 100644
--- a/resources/imap/setupserver.cpp
+++ b/resources/imap/setupserver.cpp
@@ -123,8 +123,7 @@ SetupServer::SetupServer(ImapResourceBase *parentResource, WId parent)
m_parentResource->settings()->setWinId(parent);
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
diff --git a/resources/kalarm/kalarmdir/settingsdialog.cpp b/resources/kalarm/kalarmdir/settingsdialog.cpp
index 3bbbfdf..30c51a5 100644
--- a/resources/kalarm/kalarmdir/settingsdialog.cpp
+++ b/resources/kalarm/kalarmdir/settingsdialog.cpp
@@ -41,13 +41,12 @@ SettingsDialog::SettingsDialog(WId windowId, Settings *settings)
mReadOnlySelected(false)
{
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
ui.setupUi(mainWidget);
mTypeSelector = new AlarmTypeWidget(ui.tab, ui.tabLayout);
ui.kcfg_Path->setMode(KFile::LocalOnly | KFile::Directory);
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/resources/maildir/configdialog.cpp b/resources/maildir/configdialog.cpp
index f74726f..cd58b6e 100644
--- a/resources/maildir/configdialog.cpp
+++ b/resources/maildir/configdialog.cpp
@@ -39,15 +39,14 @@ ConfigDialog::ConfigDialog(MaildirSettings *settings, const QString &identifier,
{
setWindowTitle(i18n("Select a MailDir folder"));
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
ui.setupUi(mainWidget);
- mFolderArchiveSettingPage = new FolderArchiveSettingPage(identifier);
+ mFolderArchiveSettingPage = new FolderArchiveSettingPage(identifier, this);
mFolderArchiveSettingPage->loadSettings();
ui.tabWidget->addTab(mFolderArchiveSettingPage, i18n("Archive Folder"));
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/resources/mixedmaildir/configdialog.cpp b/resources/mixedmaildir/configdialog.cpp
index b4f3dae..5c40592 100644
--- a/resources/mixedmaildir/configdialog.cpp
+++ b/resources/mixedmaildir/configdialog.cpp
@@ -35,8 +35,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) :
{
setWindowTitle(i18n("Select a KMail Mail folder"));
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
ui.setupUi(mainWidget);
mManager = new KConfigDialogManager(this, Settings::self());
@@ -44,7 +43,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) :
ui.kcfg_Path->setMode(KFile::Directory | KFile::ExistingOnly);
ui.kcfg_Path->setUrl(QUrl::fromLocalFile(Settings::self()->path()));
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mainLayout->addWidget(buttonBox);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
diff --git a/resources/openxchange/configdialog.cpp b/resources/openxchange/configdialog.cpp
index a8a2abf..8ed7fb7 100644
--- a/resources/openxchange/configdialog.cpp
+++ b/resources/openxchange/configdialog.cpp
@@ -43,8 +43,7 @@ ConfigDialog::ConfigDialog(WId windowId)
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);
diff --git a/resources/pop3/accountdialog.cpp b/resources/pop3/accountdialog.cpp
index 88ca298..2f7dc78 100644
--- a/resources/pop3/accountdialog.cpp
+++ b/resources/pop3/accountdialog.cpp
@@ -99,9 +99,8 @@ AccountDialog::~AccountDialog()
void AccountDialog::setupWidgets()
{
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/resources/shared/singlefileresource/singlefileresourceconfigdialogbase.cpp b/resources/shared/singlefileresource/singlefileresourceconfigdialogbase.cpp
index 2103de1..4fcb984 100644
--- a/resources/shared/singlefileresource/singlefileresourceconfigdialogbase.cpp
+++ b/resources/shared/singlefileresource/singlefileresourceconfigdialogbase.cpp
@@ -48,14 +48,13 @@ SingleFileResourceConfigDialogBase::SingleFileResourceConfigDialogBase(WId windo
mLocalFileOnly(false)
{
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
ui.setupUi(mainWidget);
ui.kcfg_Path->setMode(KFile::File);
ui.statusLabel->setText(QString());
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/resources/tomboynotes/configdialog.cpp b/resources/tomboynotes/configdialog.cpp
index 489c867..aae284b 100644
--- a/resources/tomboynotes/configdialog.cpp
+++ b/resources/tomboynotes/configdialog.cpp
@@ -32,8 +32,7 @@ ConfigDialog::ConfigDialog(Settings *settings, QWidget *parent) :
// Create window
setWindowTitle(i18n("Select a Tomboy server"));
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
ui->setupUi(mainWidget);
diff --git a/resources/vcarddir/dirsettingsdialog.cpp b/resources/vcarddir/dirsettingsdialog.cpp
index b75413e..b8a5ba1 100644
--- a/resources/vcarddir/dirsettingsdialog.cpp
+++ b/resources/vcarddir/dirsettingsdialog.cpp
@@ -37,12 +37,11 @@ SettingsDialog::SettingsDialog(WId windowId)
: QDialog()
{
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
ui.setupUi(mainWidget);
ui.kcfg_Path->setMode(KFile::LocalOnly | KFile::Directory);
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);