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
No related branches found
No related tags found
No related merge requests found
......@@ -47,13 +47,13 @@ ListView {
property var prompt: MessagesAdapter.searchbarPrompt
onPromptChanged: {
MessagesAdapter.startSearch(prompt);
MessagesAdapter.startSearch(prompt, false);
}
Connections {
target: researchTabBar
function onFilterTabChange() {
MessagesAdapter.startSearch(prompt);
MessagesAdapter.startSearch(prompt, false);
}
}
......
......@@ -733,7 +733,7 @@ MessagesAdapter::getFormattedDay(const quint64 timestamp)
}
void
MessagesAdapter::startSearch(QString& text, bool isMedia)
MessagesAdapter::startSearch(const QString& text, bool isMedia)
{
mediaInteractions_.reset(new MessageListModel(this));
set_mediaMessageListModel(QVariant::fromValue(mediaInteractions_.get()));
......
......@@ -132,7 +132,7 @@ protected:
Q_INVOKABLE QVariantMap getTransferStats(const QString& messageId, int);
Q_INVOKABLE QVariant dataForInteraction(const QString& interactionId,
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);
// Run corrsponding js functions, c++ to qml.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment