diff -r 30cb5e836736 -r 0abada2a9802 src/libraries.h --- a/src/libraries.h Sat Feb 01 17:20:10 2020 +0200 +++ b/src/libraries.h Sun Feb 02 00:30:48 2020 +0200 @@ -38,6 +38,8 @@ constexpr static const Role allRoles[] = {OfficialLibrary, UnofficialLibrary, WorkingLibrary}; }; +bool operator==(const Library& one, const Library& other); + Q_DECLARE_METATYPE(Library) Q_DECLARE_METATYPE(Library::Role) QDataStream &operator<<(QDataStream&, const Library&); @@ -46,12 +48,14 @@ using Libraries = QVector; Q_DECLARE_METATYPE(Libraries) +class Configuration; + class LibraryManager : public QAbstractTableModel { Q_OBJECT public: LibraryManager(QObject* parent = nullptr); - LibraryManager(QSettings* settings, QObject* parent = nullptr); + LibraryManager(Configuration* settings, QObject* parent = nullptr); QVector::const_iterator begin() const; QVector::const_iterator end() const; QString findFile(QString fileName) const; @@ -60,8 +64,8 @@ const Library& library(int libraryIndex) const; void setLibraryPath(int libraryIndex, const QDir& path); void setLibraryRole(int libraryIndex, const Library::Role role); - void restoreFromSettings(QSettings* settings); - void storeToSettings(QSettings* settings); + void restoreFromSettings(Configuration* settings); + void storeToSettings(Configuration* settings); int count() const; void moveLibrary(const int libraryFromIndex, const int libraryToIndex); // Definitions for QAbstractTableModel