diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-11-22 19:18:10 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-11-22 19:18:10 +0100 |
commit | f440b411953c2aad752848390d67de7e75a2f1bc (patch) | |
tree | ceefcec45f5b33dab805adef1fa7b7b4ad044a6a | |
parent | Fix cmark warning (diff) | |
download | nheko-f440b411953c2aad752848390d67de7e75a2f1bc.tar.xz |
Fix stack overflow when filtering timeline
-rw-r--r-- | src/timeline/TimelineFilter.cpp | 3 | ||||
-rw-r--r-- | src/timeline/TimelineModel.cpp | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/timeline/TimelineFilter.cpp b/src/timeline/TimelineFilter.cpp index cd17a7f6..91cae637 100644 --- a/src/timeline/TimelineFilter.cpp +++ b/src/timeline/TimelineFilter.cpp @@ -69,7 +69,8 @@ TimelineFilter::setSource(TimelineModel *s) this->setSourceModel(s); connect(s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged); - connect(s, &TimelineModel::fetchedMore, this, &TimelineFilter::fetchAgain); + connect( + s, &TimelineModel::fetchedMore, this, &TimelineFilter::fetchAgain, Qt::QueuedConnection); emit sourceChanged(); invalidateFilter(); diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 6b764081..dedfa197 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -880,6 +880,9 @@ TimelineModel::setPaginationInProgress(const bool paginationInProgress) m_paginationInProgress = paginationInProgress; emit paginationInProgressChanged(m_paginationInProgress); + + if (m_paginationInProgress) + events.fetchMore(); } void @@ -891,8 +894,6 @@ TimelineModel::fetchMore(const QModelIndex &) } setPaginationInProgress(true); - - events.fetchMore(); } void |