Skip to content
Snippets Groups Projects
Commit 5f98f7cd authored by Sébastien Blin's avatar Sébastien Blin
Browse files

qt6: fix startSearch usage

Overload incorrectly managed by Qt 6.5 and we must pass a const ref

Change-Id: Ib0a85165b59f6cffd3f01815b803f666623e1b89
parent bb3011fe
Branches
Tags
No related merge requests found
...@@ -47,13 +47,13 @@ ListView { ...@@ -47,13 +47,13 @@ ListView {
property var prompt: MessagesAdapter.searchbarPrompt property var prompt: MessagesAdapter.searchbarPrompt
onPromptChanged: { onPromptChanged: {
MessagesAdapter.startSearch(prompt); MessagesAdapter.startSearch(prompt, false);
} }
Connections { Connections {
target: researchTabBar target: researchTabBar
function onFilterTabChange() { function onFilterTabChange() {
MessagesAdapter.startSearch(prompt); MessagesAdapter.startSearch(prompt, false);
} }
} }
......
...@@ -733,7 +733,7 @@ MessagesAdapter::getFormattedDay(const quint64 timestamp) ...@@ -733,7 +733,7 @@ MessagesAdapter::getFormattedDay(const quint64 timestamp)
} }
void void
MessagesAdapter::startSearch(QString& text, bool isMedia) MessagesAdapter::startSearch(const QString& text, bool isMedia)
{ {
mediaInteractions_.reset(new MessageListModel(this)); mediaInteractions_.reset(new MessageListModel(this));
set_mediaMessageListModel(QVariant::fromValue(mediaInteractions_.get())); set_mediaMessageListModel(QVariant::fromValue(mediaInteractions_.get()));
......
...@@ -132,7 +132,7 @@ protected: ...@@ -132,7 +132,7 @@ protected:
Q_INVOKABLE QVariantMap getTransferStats(const QString& messageId, int); Q_INVOKABLE QVariantMap getTransferStats(const QString& messageId, int);
Q_INVOKABLE QVariant dataForInteraction(const QString& interactionId, Q_INVOKABLE QVariant dataForInteraction(const QString& interactionId,
int role = Qt::DisplayRole) const; int role = Qt::DisplayRole) const;
Q_INVOKABLE void startSearch(QString& text, bool isMedia = false); Q_INVOKABLE void startSearch(const QString& text, bool isMedia);
Q_INVOKABLE int getMessageIndexFromId(QString& id); Q_INVOKABLE int getMessageIndexFromId(QString& id);
// Run corrsponding js functions, c++ to qml. // Run corrsponding js functions, c++ to qml.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment