Commit a2f1be5d authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent 1d0ce752
......@@ -38,7 +38,6 @@ void FollowupReminderInfoDialogTest::initTestCase()
QStandardPaths::setTestModeEnabled(true);
}
void FollowupReminderInfoDialogTest::shouldHaveDefaultValues()
{
FollowUpReminderInfoDialog dlg;
......
......@@ -39,8 +39,6 @@ void SendLaterConfigureDialogTest::initTestCase()
QStandardPaths::setTestModeEnabled(true);
}
void SendLaterConfigureDialogTest::shouldHaveDefaultValue()
{
SendLaterConfigureDialog dlg;
......
......@@ -86,7 +86,6 @@ AddEditBlog::AddEditBlog(int blog_id, QWidget *parent, Qt::WindowFlags flags)
connect(buttonBox, &QDialogButtonBox::accepted, this, &AddEditBlog::slotAccepted);
connect(buttonBox, &QDialogButtonBox::rejected, this, &AddEditBlog::reject);
d->isNewBlog = true;
d->mFetchAPITimer = d->mFetchBlogIdTimer = d->mFetchProfileIdTimer = Q_NULLPTR;
......
......@@ -63,7 +63,7 @@ ConfigureDialog::ConfigureDialog(PimCommon::StorageServiceManager *storageManage
addPage(advancedSettingsDlg, i18nc("Configure Page", "Advanced"), QStringLiteral("applications-utilities"));
addPage(mConfigStorageService, i18nc("Configure Page", "Storage Service"), QStringLiteral("applications-utilities"));
connect( this, &KConfigDialog::settingsChanged, this, &ConfigureDialog::configurationChanged );
connect(this, &KConfigDialog::settingsChanged, this, &ConfigureDialog::configurationChanged);
connect(this, &ConfigureDialog::destroyed, this, &ConfigureDialog::dialogDestroyed);
connect(button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &ConfigureDialog::slotApplySettingsClicked);
connect(button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &ConfigureDialog::slotDefaultClicked);
......
......@@ -347,10 +347,10 @@ void MainWindow::optionsPreferences()
connect(dialog, &ConfigureDialog::blogAdded, this, &MainWindow::slotBlogAdded);
connect(dialog, &ConfigureDialog::blogEdited, this, &MainWindow::slotBlogEdited);
connect(dialog, &ConfigureDialog::blogRemoved, this, &MainWindow::slotBlogRemoved);
connect( dialog, &KConfigDialog::settingsChanged, this, &MainWindow::settingsChanged );
connect( dialog, &KConfigDialog::settingsChanged, this, &MainWindow::slotSettingsChanged );
connect( dialog, &ConfigureDialog::dialogDestroyed, this, &MainWindow::slotDialogDestroyed);
connect( dialog, &ConfigureDialog::configurationChanged, this, &MainWindow::slotSettingsChanged);
connect(dialog, &KConfigDialog::settingsChanged, this, &MainWindow::settingsChanged);
connect(dialog, &KConfigDialog::settingsChanged, this, &MainWindow::slotSettingsChanged);
connect(dialog, &ConfigureDialog::dialogDestroyed, this, &MainWindow::slotDialogDestroyed);
connect(dialog, &ConfigureDialog::configurationChanged, this, &MainWindow::slotSettingsChanged);
dialog->show();
}
......
......@@ -44,26 +44,31 @@ class CALENDARSUPPORT_EXPORT CalPrintIncidence : public CalPrintPluginBase
public:
CalPrintIncidence();
virtual ~CalPrintIncidence();
QString groupName() const Q_DECL_OVERRIDE {
QString groupName() const Q_DECL_OVERRIDE
{
return QStringLiteral("Print incidence");
}
QString description() const Q_DECL_OVERRIDE {
QString description() const Q_DECL_OVERRIDE
{
return i18n("Print &incidence");
}
QString info() const Q_DECL_OVERRIDE
{
return i18n("Prints an incidence on one page");
}
int sortID() const Q_DECL_OVERRIDE {
int sortID() const Q_DECL_OVERRIDE
{
return CalPrinterBase::Incidence;
}
// Enable the Print Incidence option only if there are selected incidences.
bool enabled() const Q_DECL_OVERRIDE {
bool enabled() const Q_DECL_OVERRIDE
{
return !mSelectedIncidences.isEmpty();
}
QWidget *createConfigWidget(QWidget *) Q_DECL_OVERRIDE;
QPrinter::Orientation defaultOrientation() const Q_DECL_OVERRIDE {
QPrinter::Orientation defaultOrientation() const Q_DECL_OVERRIDE
{
return QPrinter::Portrait;
}
......@@ -90,20 +95,24 @@ class CalPrintDay : public CalPrintPluginBase
public:
CalPrintDay();
virtual ~CalPrintDay();
QString groupName() const Q_DECL_OVERRIDE {
QString groupName() const Q_DECL_OVERRIDE
{
return QStringLiteral("Print day");
}
QString description() const Q_DECL_OVERRIDE {
QString description() const Q_DECL_OVERRIDE
{
return i18n("Print da&y");
}
QString info() const Q_DECL_OVERRIDE
{
return i18n("Prints all events of a single day on one page");
}
int sortID() const Q_DECL_OVERRIDE {
int sortID() const Q_DECL_OVERRIDE
{
return CalPrinterBase::Day;
}
bool enabled() const Q_DECL_OVERRIDE {
bool enabled() const Q_DECL_OVERRIDE
{
return true;
}
QWidget *createConfigWidget(QWidget *) Q_DECL_OVERRIDE;
......@@ -138,20 +147,24 @@ public:
CalPrintWeek();
virtual ~CalPrintWeek();
QString groupName() const Q_DECL_OVERRIDE {
QString groupName() const Q_DECL_OVERRIDE
{
return QStringLiteral("Print week");
}
QString description() const Q_DECL_OVERRIDE {
QString description() const Q_DECL_OVERRIDE
{
return i18n("Print &week");
}
QString info() const Q_DECL_OVERRIDE
{
return i18n("Prints all events of one week on one page");
}
int sortID() const Q_DECL_OVERRIDE {
int sortID() const Q_DECL_OVERRIDE
{
return CalPrinterBase::Week;
}
bool enabled() const Q_DECL_OVERRIDE {
bool enabled() const Q_DECL_OVERRIDE
{
return true;
}
QWidget *createConfigWidget(QWidget *) Q_DECL_OVERRIDE;
......@@ -189,24 +202,29 @@ class CalPrintMonth : public CalPrintPluginBase
public:
CalPrintMonth();
virtual ~CalPrintMonth();
QString groupName() const Q_DECL_OVERRIDE {
QString groupName() const Q_DECL_OVERRIDE
{
return QStringLiteral("Print month");
}
QString description() const Q_DECL_OVERRIDE {
QString description() const Q_DECL_OVERRIDE
{
return i18n("Print mont&h");
}
QString info() const Q_DECL_OVERRIDE
{
return i18n("Prints all events of one month on one page");
}
int sortID() const Q_DECL_OVERRIDE {
int sortID() const Q_DECL_OVERRIDE
{
return CalPrinterBase::Month;
}
bool enabled() const Q_DECL_OVERRIDE {
bool enabled() const Q_DECL_OVERRIDE
{
return true;
}
QWidget *createConfigWidget(QWidget *) Q_DECL_OVERRIDE;
QPrinter::Orientation defaultOrientation() const Q_DECL_OVERRIDE {
QPrinter::Orientation defaultOrientation() const Q_DECL_OVERRIDE
{
return QPrinter::Landscape;
}
......@@ -235,20 +253,24 @@ public:
CalPrintTodos();
virtual ~CalPrintTodos();
QString groupName() const Q_DECL_OVERRIDE {
QString groupName() const Q_DECL_OVERRIDE
{
return QStringLiteral("Print to-dos");
}
QString description() const Q_DECL_OVERRIDE {
QString description() const Q_DECL_OVERRIDE
{
return i18n("Print to-&dos");
}
QString info() const Q_DECL_OVERRIDE
{
return i18n("Prints all to-dos in a (tree-like) list");
}
int sortID() const Q_DECL_OVERRIDE {
int sortID() const Q_DECL_OVERRIDE
{
return CalPrinterBase::Todolist;
}
bool enabled() const Q_DECL_OVERRIDE {
bool enabled() const Q_DECL_OVERRIDE
{
return true;
}
QWidget *createConfigWidget(QWidget *) Q_DECL_OVERRIDE;
......
......@@ -36,10 +36,12 @@ public:
CalPrintJournal(): CalPrintPluginBase() {}
~CalPrintJournal() {}
QString groupName() const Q_DECL_OVERRIDE {
QString groupName() const Q_DECL_OVERRIDE
{
return QStringLiteral("Print journal");
}
QString description() const Q_DECL_OVERRIDE {
QString description() const Q_DECL_OVERRIDE
{
return i18n("Print &journal");
}
QString info() const Q_DECL_OVERRIDE
......@@ -47,10 +49,12 @@ public:
return i18n("Prints all journals for a given date range");
}
QWidget *createConfigWidget(QWidget *) Q_DECL_OVERRIDE;
int sortID() const Q_DECL_OVERRIDE {
int sortID() const Q_DECL_OVERRIDE
{
return CalPrinterBase::Journallist;
}
bool enabled() const Q_DECL_OVERRIDE {
bool enabled() const Q_DECL_OVERRIDE
{
return true;
}
......
......@@ -35,20 +35,24 @@ class CALENDARSUPPORT_EXPORT CalPrintYear : public CalPrintPluginBase
public:
CalPrintYear(): CalPrintPluginBase() {}
~CalPrintYear() {}
QString groupName() const Q_DECL_OVERRIDE {
QString groupName() const Q_DECL_OVERRIDE
{
return QStringLiteral("Print year");
}
QString description() const Q_DECL_OVERRIDE {
QString description() const Q_DECL_OVERRIDE
{
return i18n("Print &year");
}
QString info() const Q_DECL_OVERRIDE
{
return i18n("Prints a calendar for an entire year");
}
int sortID() const Q_DECL_OVERRIDE {
int sortID() const Q_DECL_OVERRIDE
{
return CalPrinterBase::Year;
}
bool enabled() const Q_DECL_OVERRIDE {
bool enabled() const Q_DECL_OVERRIDE
{
return true;
}
QWidget *createConfigWidget(QWidget *) Q_DECL_OVERRIDE;
......
......@@ -51,7 +51,6 @@
#include <KCalUtils/ICalDrag>
#include <KCalUtils/VCalDrag>
#include <QUrl>
#include <KIconLoader>
......
......@@ -178,7 +178,6 @@ public:
void readSettings(const KConfig *);
void writeSettings(KConfig *);
void enableAgendaUpdate(bool enable);
void setIncidenceChanger(Akonadi::IncidenceChanger *changer) Q_DECL_OVERRIDE;
......
......@@ -56,7 +56,7 @@ public:
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
QModelIndex index(int row, int column,
const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const Q_DECL_OVERRIDE;
QModelIndex mapToSource(const QModelIndex &proxyIndex) const Q_DECL_OVERRIDE;
......
......@@ -271,8 +271,9 @@ void ThunderbirdSettings::readTagSettings()
{
QVector<tagStruct> v;
v.reserve(mHashTag.size());
foreach (const tagStruct &tag, mHashTag)
foreach (const tagStruct &tag, mHashTag) {
v.push_back(tag);
}
ImportWizardUtil::addAkonadiTag(v);
}
......
......@@ -106,7 +106,6 @@ KNotesPart::KNotesPart(QObject *parent)
Akonadi::ControlGui::widgetNeedsAkonadi(widget());
if (KNotesGlobalConfig::self()->autoCreateResourceOnStart()) {
NoteShared::LocalResourceCreator *creator = new NoteShared::LocalResourceCreator(this);
creator->createIfMissing();
......
......@@ -23,7 +23,6 @@
#include <migration/migrateapplicationfiles.h>
#include "knotes_export.h"
class KNOTES_EXPORT KNotesMigrateApplication
{
public:
......
......@@ -67,7 +67,6 @@ BlackListBalooEmailCompletionWidget::BlackListBalooEmailCompletionWidget(QWidget
mEmailList->setObjectName(QStringLiteral("email_list"));
mainLayout->addWidget(mEmailList);
QHBoxLayout *searchLineLayout = new QHBoxLayout;
mainLayout->addLayout(searchLineLayout);
mSearchInResultLineEdit = new KListWidgetSearchLine(this, mEmailList);
......
......@@ -76,12 +76,11 @@ public:
return mWeight;
}
void save(CompletionOrderWidget *) Q_DECL_OVERRIDE
{
void save(CompletionOrderWidget *) Q_DECL_OVERRIDE {
KConfig *config = KLDAP::LdapClientSearchConfig::config();
KConfigGroup group(config, "LDAP");
group.writeEntry(QString::fromLatin1("SelectedCompletionWeight%1").arg(mLdapClient->clientNumber()),
mWeight);
mWeight);
group.sync();
}
......@@ -95,14 +94,12 @@ public:
return true;
}
void setIsEnabled(bool b) Q_DECL_OVERRIDE
{
void setIsEnabled(bool b) Q_DECL_OVERRIDE {
Q_UNUSED(b);
}
protected:
void setCompletionWeight(int weight) Q_DECL_OVERRIDE
{
void setCompletionWeight(int weight) Q_DECL_OVERRIDE {
mWeight = weight;
}
......@@ -155,24 +152,22 @@ public:
return mWeight;
}
void setIsEnabled(bool b) Q_DECL_OVERRIDE
{
void setIsEnabled(bool b) Q_DECL_OVERRIDE {
mEnabled = b;
}
void save(CompletionOrderWidget *editor) Q_DECL_OVERRIDE
{
void save(CompletionOrderWidget *editor) Q_DECL_OVERRIDE {
KConfigGroup group(editor->configFile(), "CompletionWeights");
group.writeEntry(mIdentifier, mWeight);
if (mHasEnableSupport) {
if (mHasEnableSupport)
{
KConfigGroup groupEnabled(editor->configFile(), "CompletionEnabled");
//groupEnabled.writeEntry(mIdentifier, );
}
}
protected:
void setCompletionWeight(int weight) Q_DECL_OVERRIDE
{
void setCompletionWeight(int weight) Q_DECL_OVERRIDE {
mWeight = weight;
}
......@@ -205,7 +200,7 @@ public:
setFlags(flags() | Qt::ItemIsUserCheckable);
setCheckState(0, mItem->isEnabled() ? Qt::Checked : Qt::Unchecked);
} else {
setFlags(flags() &~ Qt::ItemIsUserCheckable);
setFlags(flags() & ~ Qt::ItemIsUserCheckable);
}
}
......
......@@ -32,7 +32,6 @@
#include <time.h>
namespace KPIM
{
......
......@@ -110,8 +110,7 @@ public:
}
private:
void run() Q_DECL_OVERRIDE
{
void run() Q_DECL_OVERRIDE {
const QMutexLocker locker(&m_mutex);
m_result = m_function();
}
......@@ -228,16 +227,15 @@ protected:
{
return m_auditLogError;
}
void showProgress(const char *what, int type, int current, int total) Q_DECL_OVERRIDE
{
void showProgress(const char *what, int type, int current, int total) Q_DECL_OVERRIDE {
// will be called from the thread exec'ing the operation, so
// just bounce everything to the owning thread:
// ### hope this is thread-safe (meta obj is const, and
// ### portEvent is thread-safe, so should be ok)
QMetaObject::invokeMethod(this, "progress", Qt::QueuedConnection,
Q_ARG(QString, QGpgMEProgressTokenMapper::map(what, type)),
Q_ARG(int, current),
Q_ARG(int, total));
Q_ARG(QString, QGpgMEProgressTokenMapper::map(what, type)),
Q_ARG(int, current),
Q_ARG(int, total));
}
private:
template <typename T1, typename T2>
......
......@@ -17,7 +17,6 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef KPGP_DEBUG_H
#define KPGP_DEBUG_H
......
......@@ -96,7 +96,7 @@ public Q_SLOTS:
void slotRemoveQuotes();
void slotAddQuotes();
void slotAddImage();
void slotFormatPainter(bool active);
void slotFormatPainter(bool active);
void ensureCursorVisibleDelayed();
private:
class RichTextComposerControlerPrivate;
......
......@@ -37,7 +37,6 @@ void ImageScalingTest::initTestCase()
QStandardPaths::setTestModeEnabled(true);
}
void ImageScalingTest::shouldHaveDefaultValue()
{
MessageComposer::ImageScaling scaling;
......@@ -89,7 +88,6 @@ void ImageScalingTest::shouldHaveChangeMimetype_data()
QTest::newRow("no change mimetype when png (same)") << QByteArray("image/png") << QByteArray("image/png") << QStringLiteral("JPG");
QTest::newRow("no change mimetype when png") << QByteArray("image/png") << QByteArray("image/png") << QStringLiteral("PNG");
QTest::newRow("change mimetype when png") << QByteArray("image/mng") << QByteArray("image/png") << QStringLiteral("PNG");
QTest::newRow("change mimetype when jpeg") << QByteArray("image/mng") << QByteArray("image/jpeg") << QStringLiteral("JPG");
......@@ -109,8 +107,8 @@ void ImageScalingTest::shouldHaveChangeMimetype()
MessageComposer::MessageComposerSettings::self()->save();
MessageComposer::ImageScaling scaling;
scaling.setMimetype(initialmimetype);
qDebug()<<" scaling.mimetype()"<<scaling.mimetype();
qDebug()<<" scaling.mimetype()"<<newmimetype;
qDebug() << " scaling.mimetype()" << scaling.mimetype();
qDebug() << " scaling.mimetype()" << newmimetype;
QCOMPARE(scaling.mimetype(), newmimetype);
}
......
......@@ -46,7 +46,6 @@ void PimSettingExporterConsole::initializeLogInFile()
connect(mPimSettingsBackupRestore, &PimSettingsBackupRestore::addTitle, this, &PimSettingExporterConsole::slotAddTitle);
}
void PimSettingExporterConsole::slotAddEndLine()
{
mLogInFile->addEndLine();
......
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