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

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
......
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