Commit 41fce3e1 authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent 499a136c
......@@ -67,7 +67,7 @@ static Akonadi::SearchTerm::Condition matchType(ContactSearchJob::Match match)
void ContactSearchJob::setQuery(Criterion criterion, const QString &value, Match match)
{
Akonadi::SearchQuery query(SearchTerm::RelOr) ;
Akonadi::SearchQuery query(SearchTerm::RelOr);
if (criterion == Name) {
query.addTerm(ContactSearchTerm(ContactSearchTerm::Name, value, matchType(match)));
......
......@@ -95,9 +95,9 @@ public:
QImage image;
KIO::TransferJob *job = KIO::get(QUrl(mCurrentContact.photo().url()), KIO::NoReload);
QObject::connect(job, &KIO::TransferJob::data,
[&imageData](KIO::Job *, const QByteArray &data) {
imageData.append(data);
});
[&imageData](KIO::Job *, const QByteArray & data) {
imageData.append(data);
});
if (job->exec()) {
if (image.loadFromData(imageData)) {
mBrowser->document()->addResource(QTextDocument::ImageResource,
......@@ -129,9 +129,9 @@ public:
QImage image;
KIO::TransferJob *job = KIO::get(QUrl(mCurrentContact.logo().url()), KIO::NoReload);
QObject::connect(job, &KIO::TransferJob::data,
[&imageData](KIO::Job *, const QByteArray &data) {
imageData.append(data);
});
[&imageData](KIO::Job *, const QByteArray & data) {
imageData.append(data);
});
if (job->exec()) {
if (image.loadFromData(imageData)) {
mBrowser->document()->addResource(QTextDocument::ImageResource,
......
......@@ -53,7 +53,7 @@
struct LocaleAwareLessThan : std::binary_function<QString, QString, bool> {
bool operator()(const QString &s1, const QString &s2) const
{
return QString::localeAwareCompare(s1, s2) < 0 ;
return QString::localeAwareCompare(s1, s2) < 0;
}
};
......@@ -512,8 +512,8 @@ void AddressEditDialog::editLabel()
{
bool ok = false;
const QString result = QInputDialog::getMultiLineText(this, KContacts::Address::labelLabel(),
KContacts::Address::labelLabel(),
mLabel, &ok);
KContacts::Address::labelLabel(),
mLabel, &ok);
if (ok) {
mLabel = result;
}
......
......@@ -66,7 +66,7 @@ CustomFieldEditorDialog::CustomFieldEditorDialog(QWidget *parent)
mTitle->setFocus();
QDialogButtonBox *btnBox = new QDialogButtonBox(QDialogButtonBox::Ok |
QDialogButtonBox::Cancel, this);
QDialogButtonBox::Cancel, this);
btnBox->button(QDialogButtonBox::Ok)->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(btnBox, &QDialogButtonBox::accepted,
this, &QDialog::accept);
......
......@@ -77,9 +77,9 @@ QImage ImageLoader::loadImage(const QUrl &url, bool *ok, bool selectPictureSize)
QByteArray imageData;
KIO::TransferJob *job = KIO::get(url, KIO::NoReload);
QObject::connect(job, &KIO::TransferJob::data,
[&imageData](KIO::Job *, const QByteArray &data) {
imageData.append(data);
});
[&imageData](KIO::Job *, const QByteArray & data) {
imageData.append(data);
});
if (job->exec()) {
if (image.loadFromData(imageData)) {
(*ok) = true;
......@@ -148,7 +148,7 @@ void ImageWidget::loadContact(const KContacts::Addressee &contact)
mPicture = (mType == Photo ? contact.photo() : contact.logo());
if (mPicture.isIntern() && !mPicture.data().isNull()) {
mHasImage = true;
} else if (!mPicture.isIntern() && !mPicture.url().isEmpty()){
} else if (!mPicture.isIntern() && !mPicture.url().isEmpty()) {
mHasImage = true;
}
......
......@@ -400,7 +400,7 @@ KContacts::PhoneNumber::Type PhoneTypeDialog::type() const
KContacts::PhoneNumber::Type type = 0;
for (int i = 0; i < mGroup->buttons().count(); ++i) {
QCheckBox *box = qobject_cast<QCheckBox *>(mGroup->buttons().at(i)) ;
QCheckBox *box = qobject_cast<QCheckBox *>(mGroup->buttons().at(i));
if (box && box->isChecked()) {
type |= mTypeList[i];
}
......
......@@ -80,7 +80,7 @@ QByteArray SoundLoader::loadSound(const QUrl &url, bool *ok)
KJobWidgets::setWindow(job, mParent);
if (job->exec()) {
sound = job->data();
(*ok) = true;
(*ok) = true;
}
}
......
......@@ -186,7 +186,7 @@ EmailAddressSelectionWidget::EmailAddressSelectionWidget(QAbstractItemModel *mod
EmailAddressSelectionWidget::EmailAddressSelectionWidget(bool showOnlyContactWithEmail, QAbstractItemModel *model, QWidget *parent)
: QWidget(parent)
, d(new Private(showOnlyContactWithEmail , this, model))
, d(new Private(showOnlyContactWithEmail, this, model))
{
}
......
......@@ -67,7 +67,6 @@ void SelectAddressBookDialogPrivate::writeConfig()
group.sync();
}
SelectAddressBookDialog::SelectAddressBookDialog(QWidget *parent)
: Akonadi::CollectionDialog(parent),
d(new Akonadi::SelectAddressBookDialogPrivate(this))
......
......@@ -198,7 +198,7 @@ QString StandardContactFormatter::toHtml(HtmlForm form) const
// Note
QString notes;
if (!rawContact.note().isEmpty()) {
notes = rowFmtStr1.arg(i18n("Notes")).arg(rawContact.note().toHtmlEscaped().replace(QLatin1Char('\n'), QLatin1String("<br>"))) ;
notes = rowFmtStr1.arg(i18n("Notes")).arg(rawContact.note().toHtmlEscaped().replace(QLatin1Char('\n'), QLatin1String("<br>")));
}
// Custom Data
......
......@@ -86,7 +86,7 @@ QString StandardContactGroupFormatter::toHtml(HtmlForm form) const
if (data.email().isEmpty()) {
strGroup.append(QStringLiteral("<tr><td align=\"right\" width=\"50%\"><b><font color=\"grey\">%1</font></b></td>"
"<td width=\"50%\"></td></tr>")
"<td width=\"50%\"></td></tr>")
.arg(data.name()));
} else {
KContacts::Addressee contact;
......@@ -96,7 +96,7 @@ QString StandardContactGroupFormatter::toHtml(HtmlForm form) const
const QString fullEmail = QLatin1String("<a href=\"mailto:") + QString::fromLatin1(QUrl::toPercentEncoding(contact.fullEmail())) + QStringLiteral("\">%1</a>").arg(contact.preferredEmail());
strGroup.append(QStringLiteral("<tr><td align=\"right\" width=\"50%\"><b><font color=\"grey\">%1</font></b></td>"
"<td valign=\"bottom\" align=\"left\" width=\"50%\"><font>&lt;%2&gt;</font></td></tr>")
"<td valign=\"bottom\" align=\"left\" width=\"50%\"><font>&lt;%2&gt;</font></td></tr>")
.arg(contact.realName())
.arg(fullEmail));
}
......@@ -104,7 +104,7 @@ QString StandardContactGroupFormatter::toHtml(HtmlForm form) const
foreach (const QVariantMap &map, additionalFields()) {
strGroup.append(QStringLiteral("<tr><td colspan=\"2\">&nbsp;</td></tr><tr><td align=\"right\" width=\"30%\"><b><font color=\"grey\">%1</font></b></td>"
"<td valign=\"bottom\" align=\"left\" width=\"50%\"><font>%2</font></td></tr>")
"<td valign=\"bottom\" align=\"left\" width=\"50%\"><font>%2</font></td></tr>")
.arg(map.value(QStringLiteral("title")).toString())
.arg(map.value(QStringLiteral("value")).toString()));
}
......
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