Skip to content

Commit

Permalink
Fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLazarescu committed Sep 26, 2023
1 parent 4a89596 commit 788b312
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/adapters/controllers/book_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ bool BookController::getSearchWholeWords() const
void BookController::setSearchWholeWords(bool newSearchWholeWords)
{
m_searchOptions.wholeWords = newSearchWholeWords;
emit searchWholeWordsChanged();
}

bool BookController::getSearchCaseSensitive() const
Expand All @@ -154,6 +155,7 @@ bool BookController::getSearchCaseSensitive() const
void BookController::setSearchCaseSensitive(bool newCaseSensitive)
{
m_searchOptions.caseSensitive = newCaseSensitive;
emit searchCaseSensitiveChanged();
}

bool BookController::getSearchFromStart() const
Expand All @@ -164,6 +166,7 @@ bool BookController::getSearchFromStart() const
void BookController::setSearchFromStart(bool newSearchFromStart)
{
m_searchOptions.fromStart = newSearchFromStart;
emit searchFromStartChanged();
}

FilteredTOCModel* BookController::getTableOfContents()
Expand Down
9 changes: 6 additions & 3 deletions src/adapters/interfaces/controllers/i_book_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class ADAPTERS_EXPORT IBookController : public QObject
Q_PROPERTY(application::core::FilteredTOCModel* tableOfContents READ
getTableOfContents NOTIFY tableOfContentsChanged)
Q_PROPERTY(bool searchWholeWords READ getSearchWholeWords WRITE
setSearchWholeWords CONSTANT)
setSearchWholeWords NOTIFY searchWholeWordsChanged)
Q_PROPERTY(bool searchCaseSensitive READ getSearchCaseSensitive WRITE
setSearchCaseSensitive CONSTANT)
setSearchCaseSensitive NOTIFY searchCaseSensitiveChanged)
Q_PROPERTY(bool searchFromStart READ getSearchFromStart WRITE
setSearchFromStart CONSTANT)
setSearchFromStart NOTIFY searchFromStartChanged)

public:
virtual ~IBookController() noexcept = default;
Expand Down Expand Up @@ -84,6 +84,9 @@ class ADAPTERS_EXPORT IBookController : public QObject
void textSelectionFinished(float centerX, float topY);
void highlightSelected(float centerX, float topY, const QString& uuid);
void noSearchHitsFound();
void searchWholeWordsChanged();
void searchCaseSensitiveChanged();
void searchFromStartChanged();
};

} // namespace adapters
2 changes: 1 addition & 1 deletion src/application/services/library_service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private slots:
long m_usedBookStorage = 0;
long m_bookStorageLimit = 0;
QTimer m_fetchChangesTimer;
const int m_fetchChangedInterval = 20'000;
const int m_fetchChangedInterval = 30'000;
};

} // namespace application::services

0 comments on commit 788b312

Please sign in to comment.