Skip to content

Commit

Permalink
Curious if that helps Xcode
Browse files Browse the repository at this point in the history
  • Loading branch information
KitsuneRal committed Dec 5, 2024
1 parent 6625619 commit df0171b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@ JobHandle<GetRoomEventsJob> Room::getPreviousContent(int limit, const QString& f
return d->getPreviousContent(limit, filter);
}

QFuture<const RoomEvent*> Room::ensureEvent(const QString& eventId, quint16 maxWaitSeconds)
QFuture<const RoomEvent*> Room::ensureEvent(QString eventId, quint16 maxWaitSeconds)
{
if (auto eventIt = findInTimeline(eventId); eventIt != historyEdge())
return makeReadyValueFuture(eventIt->event());
Expand All @@ -2351,7 +2351,7 @@ QFuture<const RoomEvent*> Room::ensureEvent(const QString& eventId, quint16 maxW
// to make sure checkForRequestedEvents() gets executed
getPreviousContent();
return d->eventRequests
.emplace_back(eventId,
.emplace_back(std::move(eventId),
QDeadlineTimer{ std::chrono::seconds(maxWaitSeconds), Qt::VeryCoarseTimer })
.promise.future();
}
Expand Down
3 changes: 1 addition & 2 deletions Quotient/room.h
Original file line number Diff line number Diff line change
Expand Up @@ -758,8 +758,7 @@ class QUOTIENT_API Room : public QObject {
//! to increase it, as most users will give up waiting much earlier than even the default value.
//! \return the future that resolves to the event with \p eventId, or self-cancels if the event
//! is not found
Q_INVOKABLE QFuture<const RoomEvent*> ensureEvent(const QString& eventId,
quint16 maxWaitSeconds = 20);
Q_INVOKABLE QFuture<const RoomEvent*> ensureEvent(QString eventId, quint16 maxWaitSeconds = 20);

public Q_SLOTS:
/** Check whether the room should be upgraded */
Expand Down

0 comments on commit df0171b

Please sign in to comment.