Restore correct formatting

Many lines were not conformant with the project's formatting rules.
This patch should fix all formatting and whitespace issues in the code
base.
A clang-format directive was put around the connect() calls containing
SIGNALs and SLOTs whose signatures would be denormalized because of the
formatting rules.
This commit is contained in:
Gianluca Recchia authored and Jonathan White committed 2018-11-28 18:29:15 -05:00
1 parent f9625189cb
commit fc930bae69
186 files changed
+2437 -2122

No files matched your search

+6
View File
@@ -630,10 +630,12 @@ Entry* Group::findEntryByPathRecursive(const QString& entryPath, const QString&
// Return the first entry that matches the full path OR if there is no leading
// slash, return the first entry title that matches
for (Entry* entry : entries()) {
// clang-format off
if (entryPath == (basePath + entry->title())
|| (!entryPath.startsWith("/") && entry->title() == entryPath)) {
return entry;
}
// clang-format on
}
for (Group* group : children()) {
@@ -654,9 +656,11 @@ Group* Group::findGroupByPath(const QString& groupPath)
if (groupPath.isEmpty()) {
normalizedGroupPath = QString("/"); // root group
} else {
// clang-format off
normalizedGroupPath = (groupPath.startsWith("/") ? "" : "/")
+ groupPath
+ (groupPath.endsWith("/") ? "" : "/");
// clang-format on
}
return findGroupByPathRecursive(normalizedGroupPath, "/");
}
@@ -894,6 +898,7 @@ void Group::connectDatabaseSignalsRecursive(Database* db)
}
if (db) {
// clang-format off
connect(this, SIGNAL(groupDataChanged(Group*)), db, SIGNAL(groupDataChanged(Group*)));
connect(this, SIGNAL(groupAboutToRemove(Group*)), db, SIGNAL(groupAboutToRemove(Group*)));
connect(this, SIGNAL(groupRemoved()), db, SIGNAL(groupRemoved()));
@@ -902,6 +907,7 @@ void Group::connectDatabaseSignalsRecursive(Database* db)
connect(this, SIGNAL(aboutToMove(Group*,Group*,int)), db, SIGNAL(groupAboutToMove(Group*,Group*,int)));
connect(this, SIGNAL(groupMoved()), db, SIGNAL(groupMoved()));
connect(this, SIGNAL(groupModified()), db, SLOT(markAsModified()));
// clang-format on
}
m_db = db;