Skip to content

Commit

Permalink
fixed crash when trying to sort data files on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Youda008 committed Feb 3, 2025
1 parent f22a0f5 commit 7462b33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/MainWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ class MainWindow : public QMainWindow, private DialogWithPaths {
ConfigFile( const QString & fileName ) : fileName( fileName ) {}
ConfigFile( const QFileInfo & file ) : fileName( file.fileName() ) {}
QString getID() const { return fileName; }
const QString & getFilePath() const { return fileName; } // it's not a path, but it's only used for sorting, so it's ok
};
ReadOnlyDirectListModel< ConfigFile > configModel; ///< list of config files found in pre-defined directory

Expand All @@ -424,6 +425,7 @@ class MainWindow : public QMainWindow, private DialogWithPaths {
SaveFile( const QString & fileName ) : fileName( fileName ) {}
SaveFile( const QFileInfo & file ) : fileName( file.fileName() ) {}
QString getID() const { return fileName; }
const QString & getFilePath() const { return fileName; } // it's not a path, but it's only used for sorting, so it's ok
};
ReadOnlyDirectListModel< SaveFile > saveModel; ///< list of save files found in pre-defined directory

Expand All @@ -433,6 +435,7 @@ class MainWindow : public QMainWindow, private DialogWithPaths {
DemoFile( const QString & fileName ) : fileName( fileName ) {}
DemoFile( const QFileInfo & file ) : fileName( file.fileName() ) {}
QString getID() const { return fileName; }
const QString & getFilePath() const { return fileName; } // it's not a path, but it's only used for sorting, so it's ok
};
ReadOnlyDirectListModel< DemoFile > demoModel; ///< list of demo files found in pre-defined directory

Expand Down

0 comments on commit 7462b33

Please sign in to comment.