Improve coding style

This commit is contained in:
Vladimir Golovnev (Glassez)
2020-11-16 10:02:11 +03:00
parent acad35c5bc
commit c41df9ffbd
147 changed files with 4454 additions and 2227 deletions

View File

@@ -47,7 +47,8 @@ Item::~Item() {}
void Item::setPath(const QString &path)
{
if (path != m_path) {
if (path != m_path)
{
m_path = path;
emit pathChanged(this);
}
@@ -69,7 +70,8 @@ bool Item::isValidPath(const QString &path)
QString(R"(\A[^\%1]+(\%1[^\%1]+)*\z)").arg(Item::PathSeparator)
, QRegularExpression::DontCaptureOption);
if (path.isEmpty() || !re.match(path).hasMatch()) {
if (path.isEmpty() || !re.match(path).hasMatch())
{
qDebug() << "Incorrect RSS Item path:" << path;
return false;
}
@@ -93,7 +95,8 @@ QStringList Item::expandPath(const QString &path)
// return result;
int index = 0;
while ((index = path.indexOf(Item::PathSeparator, index)) >= 0) {
while ((index = path.indexOf(Item::PathSeparator, index)) >= 0)
{
result << path.left(index);
++index;
}