Commit 03f00459 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Coding style

parent e54a2494
......@@ -65,24 +65,20 @@ private:
}
return QVariant();
}
bool setData(const QVariant &variant, int role) Q_DECL_OVERRIDE
{
bool setData(const QVariant &variant, int role) Q_DECL_OVERRIDE {
Q_UNUSED(variant);
Q_UNUSED(role);
return false;
}
bool isDuplicateOf(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE
{
bool isDuplicateOf(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE {
return (sourceIndex.data().toString() == mUid);
}
bool adopts(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE
{
bool adopts(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE {
return sourceIndex.data().toString().contains(mParent);
}
void update(const Node::Ptr &node) Q_DECL_OVERRIDE
{
void update(const Node::Ptr &node) Q_DECL_OVERRIDE {
mName = node.staticCast<DummyNode>()->mName;
mData = node.staticCast<DummyNode>()->mData;
}
......
......@@ -173,7 +173,7 @@ void StyledCalendarDelegate::paint(QPainter *painter, const QStyleOptionViewItem
{
QList<Action> buttons;
int i = 1;
Q_FOREACH(Action action, getActions(option, index)) {
Q_FOREACH (Action action, getActions(option, index)) {
if (action != Total) {
QStyleOptionButton buttonOption = buttonOpt(opt, mPixmap.value(action), i);
if (action == Enable && showButtons) {
......
......@@ -412,7 +412,7 @@ void Controller::onPersonCollectionsFetched(KJob *job)
}
const CollectionState collectionState = static_cast<CollectionState>(job->property("collectionState").toInt());
Q_FOREACH(const Akonadi::Collection & col, static_cast<Akonadi::CollectionFetchJob *>(job)->collections()) {
Q_FOREACH (const Akonadi::Collection &col, static_cast<Akonadi::CollectionFetchJob *>(job)->collections()) {
// qCDebug(KORGANIZER_LOG) << col.displayName() << "do enable " << enabled;
Akonadi::Collection modifiedCollection = col;
if (collectionState == Enabled) {
......
......@@ -123,9 +123,10 @@ private:
void updateSourceIndex(const QModelIndex &sourceIndex) Q_DECL_OVERRIDE;
};
namespace KPIM {
class CollectionSearchJob;
class PersonSearchJob;
namespace KPIM
{
class CollectionSearchJob;
class PersonSearchJob;
}
/**
......
......@@ -151,7 +151,7 @@ Quickview::Quickview(const KPIM::Person &person, const Akonadi::Collection &col)
monitor->setItemFetchScope(scope);
monitor->setAllMonitored(true);
foreach(const QString & mimetype, allMimeTypes) {
foreach (const QString &mimetype, allMimeTypes) {
monitor->setMimeTypeMonitored(mimetype, true);
}
......
......@@ -139,7 +139,7 @@ int ReparentingModel::Node::row() const
{
Q_ASSERT(parent);
int row = 0;
Q_FOREACH (const Node::Ptr & node, parent->children) {
Q_FOREACH (const Node::Ptr &node, parent->children) {
if (node.data() == this) {
return row;
}
......@@ -200,7 +200,7 @@ bool ReparentingModel::validateNode(const Node *node) const
}
bool found = false;
Q_FOREACH(const Node::Ptr & child, n->parent->children) {
Q_FOREACH (const Node::Ptr &child, n->parent->children) {
if (child.data() == n) {
found = true;
}
......@@ -252,7 +252,7 @@ void ReparentingModel::addNode(const ReparentingModel::Node::Ptr &node)
void ReparentingModel::doAddNode(const Node::Ptr &node)
{
Q_FOREACH(const ReparentingModel::Node::Ptr & existing, mProxyNodes) {
Q_FOREACH (const ReparentingModel::Node::Ptr &existing, mProxyNodes) {
if (*existing == *node) {
// qCDebug(KORGANIZER_LOG) << "node is already existing";
return;
......@@ -688,7 +688,7 @@ void ReparentingModel::rebuildFromSource(Node *parentNode, const QModelIndex &so
bool ReparentingModel::isDuplicate(const Node::Ptr &proxyNode) const
{
Q_FOREACH(const Node * n, mSourceNodes) {
Q_FOREACH (const Node *n, mSourceNodes) {
// qCDebug(KORGANIZER_LOG) << index << index.data().toString();
if (proxyNode->isDuplicateOf(n->sourceIndex)) {
return true;
......
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