Skip to content

Commit

Permalink
Fixed file saving after the last update broke it
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Apr 24, 2023
1 parent 136827e commit c09792d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/FolderListModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ void FolderListModel::cd(const QString& dirName)
emit folderChanged();
}

bool FolderListModel::fileExists(QString path) const
{
return QFileInfo(path).isFile();
}

void FolderListModel::setFilenames(QStringList list)
{
m_filenames = std::move(list);
Expand Down
1 change: 1 addition & 0 deletions src/FolderListModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class FolderListModel : public QAbstractListModel {
QHash<int, QByteArray> roleNames() const override { return m_role_names; }

Q_INVOKABLE void cd(const QString&);
Q_INVOKABLE bool fileExists(QString path) const;

QString folder() const { return m_dir_path; }
const QStringList& filenames() const { return m_filenames; }
Expand Down

0 comments on commit c09792d

Please sign in to comment.