Commit 50e60183 authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent 730367a5
......@@ -277,7 +277,6 @@ Collection InvitationsAgent::collection() const
return m_invitationsCollection->defaultCollection();
}
void InvitationsAgent::configure(WId windowId)
{
qCDebug(INVITATIONAGENT_LOG) << windowId;
......@@ -351,7 +350,6 @@ void InvitationsAgent::resourceSyncResult(KJob *job)
void InvitationsAgent::collectionFetchResult(KJob *job)
{
if (job->error()) {
qCWarning(INVITATIONAGENT_LOG) << job->errorString();
Q_EMIT status(AgentBase::Broken, i18n("Failed to fetch collection: %1", job->errorString()));
......
......@@ -49,11 +49,10 @@ NewMailNotifierCollectionProxyModel::NewMailNotifierCollectionProxyModel(QObject
QVariant NewMailNotifierCollectionProxyModel::data(const QModelIndex &index, int role) const
{
if (role == Qt::CheckStateRole)
{
if (role == Qt::CheckStateRole) {
if (index.isValid()) {
const Akonadi::Collection collection =
data(index, Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
data(index, Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
if (mNotificationCollection.contains(collection)) {
return mNotificationCollection.value(collection) ? Qt::Checked : Qt::Unchecked;
} else {
......@@ -70,8 +69,7 @@ QVariant NewMailNotifierCollectionProxyModel::data(const QModelIndex &index, int
bool NewMailNotifierCollectionProxyModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (role == Qt::CheckStateRole)
{
if (role == Qt::CheckStateRole) {
if (index.isValid()) {
const Akonadi::Collection collection =
data(index, Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
......@@ -98,7 +96,6 @@ QHash<Akonadi::Collection, bool> NewMailNotifierCollectionProxyModel::notificati
return mNotificationCollection;
}
NewMailNotifierSelectCollectionWidget::NewMailNotifierSelectCollectionWidget(QWidget *parent)
: QWidget(parent),
mNeedUpdate(false)
......@@ -125,7 +122,6 @@ NewMailNotifierSelectCollectionWidget::NewMailNotifierSelectCollectionWidget(QWi
mimeTypeProxy->addMimeTypeFilters(QStringList() << KMime::Message::mimeType());
mimeTypeProxy->setSourceModel(mModel);
mNewMailNotifierProxyModel = new NewMailNotifierCollectionProxyModel(this);
mNewMailNotifierProxyModel->setSourceModel(mimeTypeProxy);
......@@ -241,5 +237,3 @@ void NewMailNotifierSelectCollectionWidget::slotModifyJobDone(KJob *job)
}
}
......@@ -34,7 +34,6 @@ class ChangeRecorder;
class QTreeView;
class KJob;
class NewMailNotifierCollectionProxyModel : public QIdentityProxyModel
{
public:
......
......@@ -21,7 +21,6 @@
#include "../newmailnotifierselectcollectionwidget.h"
#include <QApplication>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
......
......@@ -20,5 +20,4 @@
#ifndef NEWMAILNOTIFIERSELECTCOLLECTIONWIDGET_TEST_H
#define NEWMAILNOTIFIERSELECTCOLLECTIONWIDGET_TEST_H
#endif // NEWMAILNOTIFIERSELECTCOLLECTIONWIDGET_TEST_H
......@@ -17,7 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#ifndef FOLDERARCHIVEACCOUNTINFOTEST_H
#define FOLDERARCHIVEACCOUNTINFOTEST_H
......
......@@ -37,7 +37,7 @@ public:
public:
void requestPassword(RequestType request = StandardRequest,
const QString &serverError = QString()) Q_DECL_OVERRIDE;
const QString &serverError = QString()) Q_DECL_OVERRIDE;
private Q_SLOTS:
void emitResult();
......
......@@ -33,8 +33,7 @@ public:
}
void doStart(KIMAP::Session */*session*/) Q_DECL_OVERRIDE
{
void doStart(KIMAP::Session */*session*/) Q_DECL_OVERRIDE {
cancelTask(QStringLiteral("Dummy task"));
}
};
......
......@@ -51,7 +51,6 @@ ServerInfoDialog::~ServerInfoDialog()
{
}
ServerInfoTextBrowser::ServerInfoTextBrowser(QWidget *parent)
: QTextBrowser(parent)
{
......
......@@ -25,7 +25,6 @@
#include <QTextBrowser>
class ImapResourceBase;
class ServerInfoTextBrowser : public QTextBrowser
{
Q_OBJECT
......
......@@ -29,12 +29,12 @@ public:
explicit KolabMessageHelper(const Akonadi::Collection &collection);
virtual ~KolabMessageHelper();
Akonadi::Item createItemFromMessage(const KMime::Message::Ptr &message,
const qint64 uid,
const qint64 size,
const QList<KIMAP::MessageAttribute> &attrs,
const QList<QByteArray> &flags,
const KIMAP::FetchJob::FetchScope &scope,
bool &ok) const Q_DECL_OVERRIDE;
const qint64 uid,
const qint64 size,
const QList<KIMAP::MessageAttribute> &attrs,
const QList<QByteArray> &flags,
const KIMAP::FetchJob::FetchScope &scope,
bool &ok) const Q_DECL_OVERRIDE;
private:
Akonadi::Collection mCollection;
......
......@@ -851,7 +851,7 @@ void MaildirResource::fsWatchFileFetchResult(KJob *job)
void MaildirResource::fsWatchFileModifyResult(KJob *job)
{
if (job->error()) {
qCDebug(MAILDIRRESOURCE_LOG) << " MaildirResource::fsWatchFileModifyResult error: "<< job->errorString();
qCDebug(MAILDIRRESOURCE_LOG) << " MaildirResource::fsWatchFileModifyResult error: " << job->errorString();
return;
}
}
......
......@@ -60,8 +60,7 @@ public:
mutable QString mErrorText;
protected:
void setTopLevelCollection(const Collection &collection) Q_DECL_OVERRIDE
{
void setTopLevelCollection(const Collection &collection) Q_DECL_OVERRIDE {
MixedMaildirStore::setTopLevelCollection(collection);
}
......
......@@ -60,8 +60,7 @@ protected:
void processJob(Akonadi::FileStore::Job *job) Q_DECL_OVERRIDE;
protected:
void setTopLevelCollection(const Collection &collection) Q_DECL_OVERRIDE
{
void setTopLevelCollection(const Collection &collection) Q_DECL_OVERRIDE {
mTopLevelCollection = collection;
Collection modifiedCollection = collection;
......
......@@ -41,7 +41,7 @@ ConfigDialog::ConfigDialog(Settings *settings, QWidget *parent) :
mManager = new KConfigDialogManager(this, settings);
mManager->updateWidgets();
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok| QDialogButtonBox::Cancel, this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mainLayout->addWidget(buttonBox);
// Set the button actions
connect(buttonBox, &QDialogButtonBox::accepted, this, &ConfigDialog::accept);
......
......@@ -162,13 +162,13 @@ public:
a cyphertext the result. The result is a base64 encoded version of the binary array that is the
actual result of the string, so it can be stored easily in a text format.
*/
QString encryptToString(const QString &plaintext) ;
QString encryptToString(const QString &plaintext);
/**
Encrypts the @arg plaintext QByteArray with the key the class was initialized with, and returns
a cyphertext the result. The result is a base64 encoded version of the binary array that is the
actual result of the encryption, so it can be stored easily in a text format.
*/
QString encryptToString(QByteArray plaintext) ;
QString encryptToString(QByteArray plaintext);
/**
Encrypts the @arg plaintext string with the key the class was initialized with, and returns
a binary cyphertext in a QByteArray the result.
......@@ -176,7 +176,7 @@ public:
This method returns a byte array, that is useable for storing a binary format. If you need
a string you can store in a text file, use encryptToString() instead.
*/
QByteArray encryptToByteArray(const QString &plaintext) ;
QByteArray encryptToByteArray(const QString &plaintext);
/**
Encrypts the @arg plaintext QByteArray with the key the class was initialized with, and returns
a binary cyphertext in a QByteArray the result.
......@@ -184,7 +184,7 @@ public:
This method returns a byte array, that is useable for storing a binary format. If you need
a string you can store in a text file, use encryptToString() instead.
*/
QByteArray encryptToByteArray(QByteArray plaintext) ;
QByteArray encryptToByteArray(QByteArray plaintext);
/**
Decrypts a cyphertext string encrypted with this class with the set key back to the
......@@ -193,7 +193,7 @@ public:
If an error occured, such as non-matching keys between encryption and decryption,
an empty string or a string containing nonsense may be returned.
*/
QString decryptToString(const QString &cyphertext) ;
QString decryptToString(const QString &cyphertext);
/**
Decrypts a cyphertext string encrypted with this class with the set key back to the
plain text version.
......@@ -201,7 +201,7 @@ public:
If an error occured, such as non-matching keys between encryption and decryption,
an empty string or a string containing nonsense may be returned.
*/
QByteArray decryptToByteArray(const QString &cyphertext) ;
QByteArray decryptToByteArray(const QString &cyphertext);
/**
Decrypts a cyphertext binary encrypted with this class with the set key back to the
plain text version.
......@@ -209,7 +209,7 @@ public:
If an error occured, such as non-matching keys between encryption and decryption,
an empty string or a string containing nonsense may be returned.
*/
QString decryptToString(QByteArray cypher) ;
QString decryptToString(QByteArray cypher);
/**
Decrypts a cyphertext binary encrypted with this class with the set key back to the
plain text version.
......@@ -217,7 +217,7 @@ public:
If an error occured, such as non-matching keys between encryption and decryption,
an empty string or a string containing nonsense may be returned.
*/
QByteArray decryptToByteArray(QByteArray cypher) ;
QByteArray decryptToByteArray(QByteArray cypher);
//enum to describe options that have been used for the encryption. Currently only one, but
//that only leaves room for future extensions like adding a cryptographic hash...
......
......@@ -64,7 +64,7 @@ void TomboyItemUploadJob::start()
break;
case JobType::AddItem:
jsonNote[QLatin1String("create-date")] = getCurrentISOTime();
// Missing break is intended
// Missing break is intended
case JobType::ModifyItem:
jsonNote[QLatin1String("title")] = mNoteContent->headerByType("subject")->asUnicodeString();
jsonNote[QLatin1String("note-content")] = mNoteContent->mainBodyPart()->decodedText();
......
......@@ -42,8 +42,8 @@ TomboyNotesResource::TomboyNotesResource(const QString &id)
{
new SettingsAdaptor(Settings::self());
QDBusConnection::sessionBus().registerObject(QStringLiteral("/Settings"),
Settings::self(),
QDBusConnection::ExportAdaptors);
Settings::self(),
QDBusConnection::ExportAdaptors);
// Akonadi:Item should always provide the payload
changeRecorder()->itemFetchScope().fetchFullPayload(true);
......@@ -128,7 +128,7 @@ void TomboyNotesResource::onAuthorizationFinished(KJob *kjob)
{
// Saves the received client authentication data in the settings
qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Authorization job finished";
auto job = qobject_cast<TomboyServerAuthenticateJob*>(kjob);
auto job = qobject_cast<TomboyServerAuthenticateJob *>(kjob);
if (job->error() == TomboyJobError::NoError) {
Settings::setRequestToken(job->getRequestToken());
Settings::setRequestTokenSecret(job->getRequestTokenSecret());
......@@ -144,7 +144,7 @@ void TomboyNotesResource::onAuthorizationFinished(KJob *kjob)
void TomboyNotesResource::onCollectionsRetrieved(KJob *kjob)
{
auto job = qobject_cast<TomboyCollectionsDownloadJob*>(kjob);
auto job = qobject_cast<TomboyCollectionsDownloadJob *>(kjob);
if (job->error() != TomboyJobError::NoError) {
cancelTask();
showError(job->errorText());
......@@ -156,7 +156,7 @@ void TomboyNotesResource::onCollectionsRetrieved(KJob *kjob)
void TomboyNotesResource::onItemChangeCommitted(KJob *kjob)
{
auto job = qobject_cast<TomboyItemUploadJob*>(kjob);
auto job = qobject_cast<TomboyItemUploadJob *>(kjob);
mUploadJobProcessRunning = false;
switch (job->error()) {
case TomboyJobError::PermanentError:
......@@ -176,7 +176,7 @@ void TomboyNotesResource::onItemChangeCommitted(KJob *kjob)
void TomboyNotesResource::onItemRetrieved(KJob *kjob)
{
auto job = qobject_cast<TomboyItemDownloadJob*>(kjob);
auto job = qobject_cast<TomboyItemDownloadJob *>(kjob);
if (job->error() != TomboyJobError::NoError) {
cancelTask();
......@@ -190,7 +190,7 @@ void TomboyNotesResource::onItemRetrieved(KJob *kjob)
void TomboyNotesResource::onItemsRetrieved(KJob *kjob)
{
auto job = qobject_cast<TomboyItemsDownloadJob*>(kjob);
auto job = qobject_cast<TomboyItemsDownloadJob *>(kjob);
if (job->error() != TomboyJobError::NoError) {
cancelTask();
showError(job->errorText());
......
......@@ -24,7 +24,7 @@
#include <KIO/AccessManager>
class TomboyNotesResource : public Akonadi::ResourceBase,
public Akonadi::AgentBase::Observer
public Akonadi::AgentBase::Observer
{
Q_OBJECT
......
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