diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-10-18 22:43:45 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-10-18 22:43:45 +0200 |
commit | 78fac7dced05c8c020aa84d3e403dd72ecf76027 (patch) | |
tree | c1928873f1854bc8e903f8bc39f581c6c2a1c8bc /src | |
parent | Relayout when event delegates change implicit size (diff) | |
download | nheko-78fac7dced05c8c020aa84d3e403dd72ecf76027.tar.xz |
Small qml fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/timeline/TimelineFilter.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/timeline/TimelineFilter.cpp b/src/timeline/TimelineFilter.cpp index 6f2f9e7a..c2d9e31b 100644 --- a/src/timeline/TimelineFilter.cpp +++ b/src/timeline/TimelineFilter.cpp @@ -163,14 +163,20 @@ TimelineFilter::setSource(TimelineModel *s) this->setSourceModel(s); - connect(s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged); - connect( - s, &TimelineModel::fetchedMore, this, &TimelineFilter::fetchAgain, Qt::QueuedConnection); - connect(s, - &TimelineModel::dataChanged, - this, - &TimelineFilter::sourceDataChanged, - Qt::QueuedConnection); + if (s) { + connect( + s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged); + connect(s, + &TimelineModel::fetchedMore, + this, + &TimelineFilter::fetchAgain, + Qt::QueuedConnection); + connect(s, + &TimelineModel::dataChanged, + this, + &TimelineFilter::sourceDataChanged, + Qt::QueuedConnection); + } // reset the search index a second time just to be safe. incrementalSearchIndex = 0; |