Commit 9eefdd71 authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent 74db0a3c
......@@ -44,12 +44,12 @@ void ShowAddressAction::showAddress(const KContacts::Address &address)
{
// synchronize
ContactActionsSettings::self()->load();
qDebug()<<" void ShowAddressAction::showAddress(const KContacts::Address &address)******************************************";
qDebug() << " void ShowAddressAction::showAddress(const KContacts::Address &address)******************************************";
if (ContactActionsSettings::self()->showAddressAction() == ContactActionsSettings::UseBrowser) {
QString urlTemplate = ContactActionsSettings::self()->addressUrl();
replaceArguments(urlTemplate, address);
qDebug()<<" ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"<<urlTemplate;
qDebug() << " ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" << urlTemplate;
if (!urlTemplate.isEmpty()) {
QDesktopServices::openUrl(QUrl(urlTemplate));
}
......@@ -70,7 +70,7 @@ void ShowAddressAction::showAddress(const KContacts::Address &address)
QString urlTemplate = QStringLiteral("http://open.mapquest.com/?q=%s,%l,%c");
replaceArguments(urlTemplate, address);
if (!urlTemplate.isEmpty()) {
qDebug()<<" void ShowAddressAction::showAddress"<<urlTemplate;
qDebug() << " void ShowAddressAction::showAddress" << urlTemplate;
QDesktopServices::openUrl(QUrl(urlTemplate));
}
}
......
......@@ -35,8 +35,8 @@ AddressesLocationGrantleeFormater::AddressesLocationGrantleeFormater(QObject *pa
{
mTemplateLoader = QSharedPointer<Grantlee::FileSystemTemplateLoader>(new Grantlee::FileSystemTemplateLoader);
mGrantleeThemePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
QStringLiteral("akonadicontact/grantleetheme/default/"),
QStandardPaths::LocateDirectory);
QStringLiteral("akonadicontact/grantleetheme/default/"),
QStandardPaths::LocateDirectory);
changeGrantleePath(mGrantleeThemePath);
}
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include "addresseslocationwidget.h"
#ifdef QTWEBENGINE_EXPERIMENTAL_OPTION
#include "webengine/addresseslocationengineviewer.h"
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef ADDRESSESLOCATIONWIDGET_H
#define ADDRESSESLOCATIONWIDGET_H
......
......@@ -67,7 +67,7 @@ QString AddressGrantleeObject::preferredAddressAction() const
if (preferredAddress()) {
const QString iconPath = QUrl::fromLocalFile(IconNameCache::instance()->iconPath(QStringLiteral("bookmarks"), KIconLoader::Small)).url();
text = QStringLiteral("<img class=\"headimage\" height=\"%3\" width=\"%3\" title=\"%1\" src=\"%2\"></a>\n")
.arg(i18n("Remove Address"), iconPath, QString::number(mIconSize) );
.arg(i18n("Remove Address"), iconPath, QString::number(mIconSize));
}
return text;
}
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include "addresslocationwidget.h"
#include "selectaddresstypecombobox.h"
......@@ -67,7 +66,6 @@ AddressLocationWidget::AddressLocationWidget(QWidget *parent)
mStreetEdit->setTrapReturnKey(true);
gridLayout->addWidget(mStreetEdit, 2, 0);
label = new QLabel(KContacts::Address::postOfficeBoxLabel(), this);
label->setObjectName(QStringLiteral("postofficeboxlabel"));
gridLayout->addWidget(label, 1, 1);
......@@ -87,7 +85,6 @@ AddressLocationWidget::AddressLocationWidget(QWidget *parent)
mPostalCodeEdit->setTrapReturnKey(true);
gridLayout->addWidget(mPostalCodeEdit, 4, 0);
label = new QLabel(KContacts::Address::localityLabel(), this);
label->setObjectName(QStringLiteral("localitylabel"));
gridLayout->addWidget(label, 3, 1);
......@@ -106,7 +103,6 @@ AddressLocationWidget::AddressLocationWidget(QWidget *parent)
mRegionEdit->setTrapReturnKey(true);
gridLayout->addWidget(mRegionEdit, 6, 0);
label = new QLabel(KContacts::Address::countryLabel(), this);
label->setObjectName(QStringLiteral("countrylabel"));
gridLayout->addWidget(label, 5, 1);
......@@ -129,8 +125,6 @@ AddressLocationWidget::AddressLocationWidget(QWidget *parent)
mButtonStack->setObjectName(QStringLiteral("buttonstacked"));
topLayout->addWidget(mButtonStack);
QWidget *addButtonWidget = new QWidget(this);
QHBoxLayout *addButtonWidgetLayout = new QHBoxLayout(addButtonWidget);
addButtonWidgetLayout->setMargin(0);
......@@ -207,7 +201,6 @@ void AddressLocationWidget::fillCountryCombo()
mCountryCombo->setCurrentIndex(mCountryCombo->findText(currentCountry));
}
void AddressLocationWidget::slotAddAddress()
{
KContacts::Address addr = address();
......@@ -256,7 +249,7 @@ KContacts::Address AddressLocationWidget::address() const
void AddressLocationWidget::switchMode()
{
switch(mCurrentMode) {
switch (mCurrentMode) {
case CreateAddress:
mButtonStack->setCurrentIndex(0);
break;
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef ADDRESSLOCATIONWIDGET_H
#define ADDRESSLOCATIONWIDGET_H
......
......@@ -19,7 +19,6 @@
02110-1301, USA.
*/
#ifndef ADDRESSTYPEDIALOG_H
#define ADDRESSTYPEDIALOG_H
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include "addresslocationwidgettest.h"
#include "../addresslocationwidget.h"
#include <QLabel>
......@@ -54,7 +53,6 @@ void AddressLocationWidgetTest::shouldHaveDefaultValue()
KLineEdit *mStreetEdit = w.findChild<KLineEdit *>(QStringLiteral("streetlineedit"));
QVERIFY(mStreetEdit);
QLabel *postofficeboxlabel = w.findChild<QLabel *>(QStringLiteral("postofficeboxlabel"));
QVERIFY(postofficeboxlabel);
KLineEdit *postofficeboxlineedit = w.findChild<KLineEdit *>(QStringLiteral("postofficeboxlineedit"));
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef ADDRESSLOCATIONWIDGETTEST_H
#define ADDRESSLOCATIONWIDGETTEST_H
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include "addresstypedialog.h"
#include "selectaddresstypecombobox.h"
#include <KLineEdit>
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef SELECTADDRESSTYPECOMBOBOX_H
#define SELECTADDRESSTYPECOMBOBOX_H
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include <QApplication>
#include "../addresseslocationwidget.h"
......
......@@ -19,7 +19,6 @@
02110-1301, USA.
*/
#ifndef ADDRESSESLOCATIONENGINEPAGE_H
#define ADDRESSESLOCATIONENGINEPAGE_H
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef ADDRESSESLOCATIONVIEWER_H
#define ADDRESSESLOCATIONVIEWER_H
......
......@@ -43,86 +43,85 @@ BusinessEditorWidget::BusinessEditorWidget(QWidget *parent)
topLayout->addLayout(logoLayout);
// setup general group box
mLogoWidget = new ImageWidget( ImageWidget::Logo );
logoLayout->addWidget( mLogoWidget, Qt::AlignTop );
mLogoWidget = new ImageWidget(ImageWidget::Logo);
logoLayout->addWidget(mLogoWidget, Qt::AlignTop);
logoLayout->addStretch(0);
QGridLayout *generalLayout = new QGridLayout;
topLayout->addLayout(generalLayout);
QLabel *label = new QLabel( i18nc( "@label The organization of a contact", "Organization:" ) );
generalLayout->addWidget( label, 0, 0 );
QLabel *label = new QLabel(i18nc("@label The organization of a contact", "Organization:"));
generalLayout->addWidget(label, 0, 0);
mOrganizationWidget = new KLineEdit;
mOrganizationWidget->setTrapReturnKey(true);
mOrganizationWidget->setPlaceholderText(i18n("Add organization's name"));
label->setBuddy( mOrganizationWidget );
generalLayout->addWidget( mOrganizationWidget, 1, 0 );
label->setBuddy(mOrganizationWidget);
generalLayout->addWidget(mOrganizationWidget, 1, 0);
label = new QLabel( i18nc( "@label The profession of a contact", "Profession:" ) );
generalLayout->addWidget( label, 0, 1 );
label = new QLabel(i18nc("@label The profession of a contact", "Profession:"));
generalLayout->addWidget(label, 0, 1);
mProfessionWidget = new KLineEdit;
mProfessionWidget->setPlaceholderText(i18n("Add profession"));
mProfessionWidget->setTrapReturnKey(true);
label->setBuddy( mProfessionWidget );
generalLayout->addWidget( mProfessionWidget, 1, 1 );
label->setBuddy(mProfessionWidget);
generalLayout->addWidget(mProfessionWidget, 1, 1);
label = new QLabel( i18nc( "@label The title of a contact", "Title:" ) );
generalLayout->addWidget( label, 3, 0 );
label = new QLabel(i18nc("@label The title of a contact", "Title:"));
generalLayout->addWidget(label, 3, 0);
mTitleWidget = new KLineEdit;
mTitleWidget->setPlaceholderText(i18n("Add the title"));
mTitleWidget->setTrapReturnKey(true);
label->setBuddy( mTitleWidget );
generalLayout->addWidget( mTitleWidget , 4, 0 );
label->setBuddy(mTitleWidget);
generalLayout->addWidget(mTitleWidget, 4, 0);
label = new QLabel( i18nc( "@label The department of a contact", "Department:" ) );
generalLayout->addWidget( label, 3, 1 );
label = new QLabel(i18nc("@label The department of a contact", "Department:"));
generalLayout->addWidget(label, 3, 1);
mDepartmentWidget = new KLineEdit;
mDepartmentWidget->setPlaceholderText(i18n("Add the department"));
mDepartmentWidget->setTrapReturnKey(true);
label->setBuddy( mDepartmentWidget );
generalLayout->addWidget( mDepartmentWidget, 4, 1 );
label->setBuddy(mDepartmentWidget);
generalLayout->addWidget(mDepartmentWidget, 4, 1);
label = new QLabel( i18nc( "@label The office of a contact", "Office:" ) );
generalLayout->addWidget( label, 5, 0 );
label = new QLabel(i18nc("@label The office of a contact", "Office:"));
generalLayout->addWidget(label, 5, 0);
mOfficeWidget = new KLineEdit;
mOfficeWidget->setTrapReturnKey(true);
mOfficeWidget->setPlaceholderText(i18n("Add the office"));
label->setBuddy( mOfficeWidget );
generalLayout->addWidget( mOfficeWidget, 6, 0 );
label->setBuddy(mOfficeWidget);
generalLayout->addWidget(mOfficeWidget, 6, 0);
label = new QLabel( i18nc( "@label The manager's name of a contact", "Manager's name:" ) );
generalLayout->addWidget( label, 5, 1 );
label = new QLabel(i18nc("@label The manager's name of a contact", "Manager's name:"));
generalLayout->addWidget(label, 5, 1);
mManagerWidget = new KLineEdit;
mManagerWidget->setPlaceholderText(i18n("Add manager's name"));
mManagerWidget->setTrapReturnKey(true);
label->setBuddy( mManagerWidget );
generalLayout->addWidget( mManagerWidget, 6, 1 );
label->setBuddy(mManagerWidget);
generalLayout->addWidget(mManagerWidget, 6, 1);
label = new QLabel( i18nc( "@label The assistant's name of a contact", "Assistant's name:" ) );
generalLayout->addWidget( label, 7, 0 );
label = new QLabel(i18nc("@label The assistant's name of a contact", "Assistant's name:"));
generalLayout->addWidget(label, 7, 0);
mAssistantWidget = new KLineEdit;
mAssistantWidget->setPlaceholderText(i18n("Add assistant's name"));
mAssistantWidget->setTrapReturnKey(true);
label->setBuddy( mAssistantWidget );
generalLayout->addWidget( mAssistantWidget, 8, 0 );
label->setBuddy(mAssistantWidget);
generalLayout->addWidget(mAssistantWidget, 8, 0);
// setup groupware group box
label = new QLabel( i18nc( "@label The free/busy information of a contact", "Free/Busy:" ) );
generalLayout->addWidget( label, 7, 1 );
label = new QLabel(i18nc("@label The free/busy information of a contact", "Free/Busy:"));
generalLayout->addWidget(label, 7, 1);
mFreeBusyWidget = new FreeBusyEditWidget;
label->setBuddy( mFreeBusyWidget );
generalLayout->addWidget( mFreeBusyWidget, 8, 1 );
generalLayout->setRowStretch( 9, 1 );
label->setBuddy(mFreeBusyWidget);
generalLayout->addWidget(mFreeBusyWidget, 8, 1);
generalLayout->setRowStretch(9, 1);
connect(mOrganizationWidget, &KLineEdit::textChanged, this, &BusinessEditorWidget::organizationChanged);
}
......
......@@ -70,7 +70,6 @@ public:
Akonadi::GeneralInfoWidget *mGeneralInfoWidget;
// widgets from addresses group
Akonadi::AddressesLocationWidget *mAddressesLocationWidget;
......@@ -122,13 +121,13 @@ void ContactEditorWidget::Private::initGuiLocationTab()
void ContactEditorWidget::Private::initGuiBusinessTab()
{
mBusinessEditorWidget = new Akonadi::BusinessEditorWidget();
mTabWidget->addTab( mBusinessEditorWidget, i18nc( "@title:tab", "Business" ) );
mTabWidget->addTab(mBusinessEditorWidget, i18nc("@title:tab", "Business"));
}
void ContactEditorWidget::Private::initGuiPersonalTab()
{
mPersonalEditorWidget = new Akonadi::PersonalEditorWidget;
mTabWidget->addTab( mPersonalEditorWidget, i18nc( "@title:tab Personal properties of a contact", "Personal" ) );
mTabWidget->addTab(mPersonalEditorWidget, i18nc("@title:tab Personal properties of a contact", "Personal"));
}
void ContactEditorWidget::Private::initGuiNotesTab()
......@@ -218,7 +217,7 @@ ContactEditorWidget::~ContactEditorWidget()
}
void ContactEditorWidget::loadContact(const KContacts::Addressee &contact, const Akonadi::ContactMetaData &metaData)
{
{
d->mGeneralInfoWidget->loadContact(contact);
// address group
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include "customfieldeditorwidgettest.h"
#include "../customfieldeditorwidget.h"
#include <QTest>
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include "customfieldswidgettest.h"
#include "../customfieldswidget.h"
#include <QTest>
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef CUSTOMFIELDSWIDGETTEST_H
#define CUSTOMFIELDSWIDGETTEST_H
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef CUSTOMFIELDEDITORWIDGET_H
#define CUSTOMFIELDEDITORWIDGET_H
......@@ -48,7 +47,7 @@ Q_SIGNALS:
void addNewField(const CustomField &field);
private Q_SLOTS:
void slotAddField();
void slotAddField();
void slotFielNameChanged(const QString &text);
private:
......
......@@ -38,12 +38,10 @@ CustomFieldsWidget::CustomFieldsWidget(QWidget *parent)
mCustomFieldEditorWidget->setObjectName(QStringLiteral("customfieldeditorwidget"));
topLayout->addWidget(mCustomFieldEditorWidget);
mCustomFieldsListWidget = new Akonadi::CustomFieldsListWidget(this);
mCustomFieldsListWidget->setObjectName(QStringLiteral("customfieldslistwidget"));
topLayout->addWidget(mCustomFieldsListWidget);
connect(mCustomFieldEditorWidget, &CustomFieldEditorWidget::addNewField, mCustomFieldsListWidget, &CustomFieldsListWidget::slotAddNewField);
}
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include <QApplication>
#include "../customfieldswidget.h"
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef PHONEWIDGETTEST_H
#define PHONEWIDGETTEST_H
......
......@@ -19,7 +19,6 @@
02110-1301, USA.
*/
#include "messagingwidgettest.h"
#include "../messaging/messagingwidget.h"
#include <KLineEdit>
......@@ -50,7 +49,7 @@ void MessagingWidgetTest::shouldHaveDefaultValues()
QToolButton *add = w.findChild<QToolButton *>(QStringLiteral("addbutton"));
QVERIFY(add);
QToolButton *remove= w.findChild<QToolButton *>(QStringLiteral("removebutton"));
QToolButton *remove = w.findChild<QToolButton *>(QStringLiteral("removebutton"));
QVERIFY(remove);
}
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#ifndef PHONEWIDGETTEST_H
#define PHONEWIDGETTEST_H
......
......@@ -75,7 +75,6 @@ GeneralInfoWidget::GeneralInfoWidget(QWidget *parent)
mMessagingListWidget->setObjectName(QStringLiteral("messaginglistwidget"));
rightLayout->addWidget(mMessagingListWidget);
mMailListWidget = new MailListWidget(this);
mMailListWidget->setObjectName(QStringLiteral("maillistwidget"));
rightLayout->addWidget(mMailListWidget);
......
......@@ -36,7 +36,6 @@ MailWidget::MailWidget(QWidget *parent)
layout->setSpacing(0);
layout->setMargin(0);
mMailEdit = new KLineEdit(this);
mMailEdit->setTrapReturnKey(true);
mMailEdit->setPlaceholderText(i18n("Add an email account"));
......
......@@ -38,14 +38,12 @@ MessagingWidget::MessagingWidget(QWidget *parent)
layout->setSpacing(0);
layout->setMargin(0);
mMessagingEdit = new KLineEdit(this);
mMessagingEdit->setTrapReturnKey(true);
mMessagingEdit->setPlaceholderText(i18n("Add an identifier"));
mMessagingEdit->setObjectName(QStringLiteral("messaginglineedit"));
layout->addWidget(mMessagingEdit);
mProtocolCombo = new Akonadi::AkonadiContactComboBox(this);
mProtocolCombo->setObjectName(QStringLiteral("protocol"));
mProtocolCombo->addItem(i18nc("@item:inlistbox select from a list of IM protocols",
......
......@@ -72,7 +72,7 @@ void NameWidget::setReadOnly(bool readOnly)
void NameWidget::loadContact(const KContacts::Addressee &contact)
{
qDebug()<<"contact "<<contact.assembledName();
qDebug() << "contact " << contact.assembledName();
mContact = contact;
disconnect(mNameEdit, &QLineEdit::textChanged, this, &NameWidget::slotTextChanged);
......
......@@ -83,7 +83,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];
}
......
......@@ -35,7 +35,6 @@ PhoneWidget::PhoneWidget(QWidget *parent)
layout->setSpacing(0);
layout->setMargin(0);
mPhoneNumberEdit = new KLineEdit(this);
mPhoneNumberEdit->setTrapReturnKey(true);
mPhoneNumberEdit->setPlaceholderText(i18n("Add a phone number"));
......
......@@ -20,7 +20,6 @@
02110-1301, USA.
*/
#include <QApplication>
#include "../generalinfowidget.h"
using namespace Akonadi;
......
......@@ -35,7 +35,6 @@ WebWidget::WebWidget(QWidget *parent)
layout->setSpacing(0);
layout->setMargin(0);
mWebSiteEdit = new KLineEdit(this);
mWebSiteEdit->setTrapReturnKey(true);
mWebSiteEdit->setPlaceholderText(i18n("Add a web site"));
......@@ -48,7 +47,6 @@ WebWidget::WebWidget(QWidget *parent)
//TODO fill it.
layout->addWidget(mWebType);
mAddButton = new QToolButton(this);
mAddButton->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
mAddButton->setObjectName(QStringLiteral("addbutton"));
......
......@@ -19,7 +19,6 @@
02110-1301, USA.
*/
#include "personaleditorwidget.h"
#include "../utils/utils.h"
......@@ -37,34 +36,34 @@ using namespace Akonadi;
PersonalEditorWidget::PersonalEditorWidget(QWidget *parent)
: QWidget(parent)
{
QGridLayout *mainLayout = new QGridLayout( this );
QLabel *label = new QLabel( i18nc( "@label The birthdate of a contact", "Birthdate:" ) );
mainLayout->addWidget( label, 0, 0 );
QGridLayout *mainLayout = new QGridLayout(this);