Merge remote-tracking branch 'origin/Applications/16.08'

wilder-work
Montel Laurent 10 years ago
commit d24c1d2817
  1. 54
      agents/archivemailagent/addarchivemaildialog.cpp
  2. 24
      agents/followupreminderagent/followupremindernoanswerdialog.cpp
  3. 15
      src/collectionpage/collectionquotawidget.cpp
  4. 6
      src/dialog/kmknotify.cpp
  5. 26
      src/editor/potentialphishingemail/potentialphishingdetaildialog.cpp
  6. 6
      src/editor/potentialphishingemail/potentialphishingdetailwidget.cpp
  7. 20
      src/identity/identityeditvcarddialog.cpp

@ -47,28 +47,21 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
} else {
setWindowTitle(i18n("Add Archive Mail"));
}
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QVBoxLayout *topLayout = new QVBoxLayout;
setLayout(topLayout);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &AddArchiveMailDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &AddArchiveMailDialog::reject);
mOkButton->setDefault(true);
setModal(true);
setWindowIcon(QIcon::fromTheme(QStringLiteral("kmail")));
QWidget *mainWidget = new QWidget(this);
QGridLayout *mainLayout = new QGridLayout(mainWidget);
QVBoxLayout *topLayout = new QVBoxLayout(this);
QGridLayout *mainLayout = new QGridLayout;
mainLayout->setMargin(0);
topLayout->addWidget(mainWidget);
topLayout->addWidget(buttonBox);
int row = 0;
QLabel *folderLabel = new QLabel(i18n("&Folder:"), mainWidget);
QLabel *folderLabel = new QLabel(i18n("&Folder:"), this);
mainLayout->addWidget(folderLabel, row, 0);
mFolderRequester = new MailCommon::FolderRequester(mainWidget);
mFolderRequester = new MailCommon::FolderRequester(this);
mFolderRequester->setObjectName(QStringLiteral("folder_requester"));
mFolderRequester->setMustBeReadWrite(false);
mFolderRequester->setNotAllowToCreateNewFolder(true);
@ -80,49 +73,49 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
mainLayout->addWidget(mFolderRequester, row, 1);
++row;
QLabel *formatLabel = new QLabel(i18n("Format:"), mainWidget);
QLabel *formatLabel = new QLabel(i18n("Format:"), this);
formatLabel->setObjectName(QStringLiteral("label_format"));
mainLayout->addWidget(formatLabel, row, 0);
mFormatComboBox = new FormatComboBox(mainWidget);
mFormatComboBox = new FormatComboBox(this);
mainLayout->addWidget(mFormatComboBox, row, 1);
++row;
mRecursiveCheckBox = new QCheckBox(i18n("Archive all subfolders"), mainWidget);
mRecursiveCheckBox = new QCheckBox(i18n("Archive all subfolders"), this);
mRecursiveCheckBox->setObjectName(QStringLiteral("recursive_checkbox"));
mainLayout->addWidget(mRecursiveCheckBox, row, 0, 1, 2, Qt::AlignLeft);
mRecursiveCheckBox->setChecked(true);
++row;
QLabel *pathLabel = new QLabel(i18n("Path:"), mainWidget);
QLabel *pathLabel = new QLabel(i18n("Path:"), this);
mainLayout->addWidget(pathLabel, row, 0);
pathLabel->setObjectName(QStringLiteral("path_label"));
mPath = new KUrlRequester(mainWidget);
mPath = new KUrlRequester(this);
mPath->lineEdit()->setTrapReturnKey(true);
connect(mPath, &KUrlRequester::textChanged, this, &AddArchiveMailDialog::slotUpdateOkButton);
mPath->setMode(KFile::Directory);
mainLayout->addWidget(mPath);
++row;
QLabel *dateLabel = new QLabel(i18n("Backup each:"), mainWidget);
QLabel *dateLabel = new QLabel(i18n("Backup each:"), this);
dateLabel->setObjectName(QStringLiteral("date_label"));
mainLayout->addWidget(dateLabel, row, 0);
QHBoxLayout *hlayout = new QHBoxLayout;
mDays = new QSpinBox(mainWidget);
mDays = new QSpinBox(this);
mDays->setMinimum(1);
mDays->setMaximum(3600);
hlayout->addWidget(mDays);
mUnits = new UnitComboBox(mainWidget);
mUnits = new UnitComboBox(this);
hlayout->addWidget(mUnits);
mainLayout->addLayout(hlayout, row, 1);
++row;
QLabel *maxCountlabel = new QLabel(i18n("Maximum number of archive:"), mainWidget);
QLabel *maxCountlabel = new QLabel(i18n("Maximum number of archive:"), this);
mainLayout->addWidget(maxCountlabel, row, 0);
mMaximumArchive = new QSpinBox(mainWidget);
mMaximumArchive = new QSpinBox(this);
mMaximumArchive->setMinimum(0);
mMaximumArchive->setMaximum(9999);
mMaximumArchive->setSpecialValueText(i18n("unlimited"));
@ -134,11 +127,22 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
mainLayout->setColumnStretch(1, 1);
mainLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding), row, 0);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &AddArchiveMailDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &AddArchiveMailDialog::reject);
mOkButton->setDefault(true);
if (mInfo) {
load(mInfo);
} else {
mOkButton->setEnabled(false);
}
topLayout->addLayout(mainLayout);
topLayout->addWidget(buttonBox);
// Make it a bit bigger, else the folder requester cuts off the text too early
resize(500, minimumSize().height());

@ -35,23 +35,23 @@ FollowUpReminderNoAnswerDialog::FollowUpReminderNoAnswerDialog(QWidget *parent)
{
setWindowTitle(i18n("Follow Up Mail"));
setWindowIcon(QIcon::fromTheme(QStringLiteral("kmail")));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
setAttribute(Qt::WA_DeleteOnClose);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QLabel *lab = new QLabel(i18n("You still wait an answer about this mail:"), this);
mainLayout->addWidget(lab);
mWidget = new FollowUpReminderInfoWidget(this);
mWidget->setObjectName(QStringLiteral("FollowUpReminderInfoWidget"));
mainLayout->addWidget(mWidget);
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, &FollowUpReminderNoAnswerDialog::slotSave);
connect(buttonBox, &QDialogButtonBox::rejected, this, &FollowUpReminderNoAnswerDialog::reject);
setAttribute(Qt::WA_DeleteOnClose);
QWidget *w = new QWidget(this);
QVBoxLayout *vbox = new QVBoxLayout(w);
QLabel *lab = new QLabel(i18n("You still wait an answer about this mail:"));
vbox->addWidget(lab);
mWidget = new FollowUpReminderInfoWidget;
mWidget->setObjectName(QStringLiteral("FollowUpReminderInfoWidget"));
vbox->addWidget(mWidget);
mainLayout->addWidget(w);
mainLayout->addWidget(buttonBox);
readConfig();

@ -44,24 +44,21 @@
CollectionQuotaWidget::CollectionQuotaWidget(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *box = new QVBoxLayout(this);
QWidget *stuff = new QWidget(this);
QGridLayout *layout = new QGridLayout(stuff);
QGridLayout *layout = new QGridLayout(this);
QLabel *lab = new QLabel(i18n("Usage:"));
QLabel *lab = new QLabel(i18n("Usage:"), this);
layout->addWidget(lab, 0, 0);
mUsage = new QLabel;
mUsage = new QLabel(this);
layout->addWidget(mUsage, 0, 1);
QLabel *Status = new QLabel(i18n("Status:"));
QLabel *Status = new QLabel(i18n("Status:"), this);
layout->addWidget(Status, 1, 0);
mProgressBar = new QProgressBar(stuff);
mProgressBar = new QProgressBar(this);
// xgettext: no-c-format
mProgressBar->setFormat(i18n("%p% full"));
layout->addWidget(mProgressBar, 1, 1);
box->addWidget(stuff);
box->addStretch(2);
layout->setRowStretch(2, 1);
}
void CollectionQuotaWidget::setQuotaInfo(qint64 current, qint64 maxValue)

@ -39,9 +39,9 @@ KMKnotify::KMKnotify(QWidget *parent)
: QDialog(parent), m_changed(false)
{
setWindowTitle(i18n("Notification"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
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);

@ -31,29 +31,23 @@ PotentialPhishingDetailDialog::PotentialPhishingDetailDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Details"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
okButton->setDefault(true);
QVBoxLayout *topLayout = new QVBoxLayout;
setLayout(topLayout);
QVBoxLayout *topLayout = new QVBoxLayout(this);
setModal(true);
QWidget *mainWidget = new QWidget(this);
QVBoxLayout *mainLayout = new QVBoxLayout(mainWidget);
mPotentialPhishingDetailWidget = new PotentialPhishingDetailWidget(this);
mPotentialPhishingDetailWidget->setObjectName(QStringLiteral("potentialphising_widget"));
mainLayout->addWidget(mPotentialPhishingDetailWidget);
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::rejected, this, &QDialog::reject);
connect(okButton, &QAbstractButton::clicked, this, &PotentialPhishingDetailDialog::slotSave);
okButton->setDefault(true);
mainLayout->addWidget(buttonBox);
topLayout->addWidget(mPotentialPhishingDetailWidget);
topLayout->addWidget(buttonBox);
connect(okButton, &QAbstractButton::clicked, this, &PotentialPhishingDetailDialog::slotSave);
topLayout->addWidget(mainWidget);
readConfig();
}

@ -30,14 +30,14 @@ PotentialPhishingDetailWidget::PotentialPhishingDetailWidget(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QLabel *lab = new QLabel(i18n("Select email to put in whitelist:"));
mainLayout->setMargin(0);
QLabel *lab = new QLabel(i18n("Select email to put in whitelist:"), this);
lab->setObjectName(QStringLiteral("label"));
mainLayout->addWidget(lab);
mListWidget = new QListWidget;
mListWidget = new QListWidget(this);
mListWidget->setObjectName(QStringLiteral("list_widget"));
mainLayout->addWidget(mListWidget);
}
PotentialPhishingDetailWidget::~PotentialPhishingDetailWidget()

@ -34,14 +34,19 @@
IdentityEditVcardDialog::IdentityEditVcardDialog(const QString &fileName, QWidget *parent)
: QDialog(parent)
{
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QVBoxLayout *topLayout = new QVBoxLayout(this);
setModal(true);
mContactEditor = new Akonadi::ContactEditor(Akonadi::ContactEditor::CreateMode, Akonadi::ContactEditor::VCardMode, 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, &IdentityEditVcardDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &IdentityEditVcardDialog::reject);
QVBoxLayout *topLayout = new QVBoxLayout;
setLayout(topLayout);
okButton->setDefault(true);
if (QFile(fileName).exists()) {
setWindowTitle(i18n("Edit own vCard"));
@ -53,15 +58,8 @@ IdentityEditVcardDialog::IdentityEditVcardDialog(const QString &fileName, QWidge
setWindowTitle(i18n("Create own vCard"));
}
okButton->setDefault(true);
setModal(true);
QWidget *mainWidget = new QWidget(this);
topLayout->addWidget(mainWidget);
topLayout->addWidget(mContactEditor);
topLayout->addWidget(buttonBox);
QHBoxLayout *mainLayout = new QHBoxLayout(mainWidget);
mContactEditor = new Akonadi::ContactEditor(Akonadi::ContactEditor::CreateMode, Akonadi::ContactEditor::VCardMode, this);
mainLayout->addWidget(mContactEditor);
loadVcard(fileName);
}

Loading…
Cancel
Save