Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
neochapay committed Jan 1, 2025
1 parent 5d75cd2 commit 1b5def7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/plugin/filesystemworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include <QDir>
#include <QDirIterator>

FileSystemWorker::FileSystemWorker(QStringList dirList, QStringList suffixes, QObject *parent)
: QObject{parent}
FileSystemWorker::FileSystemWorker(QStringList dirList, QStringList suffixes, QObject* parent)
: QObject { parent }
, m_dirs(dirList)
, m_suffixes(suffixes)
, m_busy(false)
Expand All @@ -34,7 +34,7 @@ void FileSystemWorker::start()
{
m_busy = true;
foreach (const QString& dirString, m_dirs) {
QDirIterator it(dirString, m_suffixes, QDir::Files, QDirIterator::Subdirectories);
QDirIterator it(dirString, m_suffixes, QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext()) {
emit foundFile(it.next());
}
Expand Down
7 changes: 3 additions & 4 deletions src/plugin/filesystemworker.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@

#include <QObject>

class FileSystemWorker : public QObject
{
class FileSystemWorker : public QObject {
Q_OBJECT
public:
explicit FileSystemWorker(QStringList dirList, QStringList suffixes, QObject *parent = nullptr);
explicit FileSystemWorker(QStringList dirList, QStringList suffixes, QObject* parent = nullptr);

bool busy() {return m_busy;}
bool busy() { return m_busy; }

void start();
void stop();
Expand Down
6 changes: 3 additions & 3 deletions src/plugin/gallerymodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include "filesystemworker.h"

#include <QDir>
#include <QDirIterator>
#include <QMimeDatabase>
#include <QStandardPaths>
#include <QDirIterator>
#include <QThread>

GalleryModel::GalleryModel(QObject* parent)
Expand Down Expand Up @@ -185,7 +185,7 @@ void GalleryModel::formatFileList()
void GalleryModel::appendFiles(QString path)
{
beginInsertRows(QModelIndex(), m_files.count(), m_files.count());
if(!m_files.contains(path)) {
if (!m_files.contains(path)) {
m_files.push_back(path);
}
endInsertRows();
Expand Down Expand Up @@ -258,7 +258,7 @@ bool GalleryModel::isVideo(int index)
return false;
}
QString url = m_files.at(index);
if(url.isEmpty()) {
if (url.isEmpty()) {
return false;
}

Expand Down

0 comments on commit 1b5def7

Please sign in to comment.