Skip to content
Snippets Groups Projects
Commit 302185e3 authored by Armin Felder's avatar Armin Felder
Browse files

Merge branch 'dirtyFixBuggyReplyMessage' into 'master'

replace depricated qsort

See merge request chat/RocketChatMobileEngine!80
parents cf02cb84 1b0153f3
No related branches found
No related tags found
1 merge request!80replace depricated qsort
......@@ -28,14 +28,10 @@ class RocketChatAttachment : public QObject
{
Q_OBJECT
public:
enum class attachmentsType {
replyMessage
};
RocketChatAttachment( const QString &pFileUrl, const attachmentsType &pType, const QString &pTitle );
RocketChatAttachment( const QString &pFileUrl, const QString &pType, const QString &pTitle );
const QString &getUrl() const;
const attachmentsType getType() const;
const QString &getType() const;
const QString &getTitle() const;
int getWidth() const;
......@@ -46,7 +42,7 @@ class RocketChatAttachment : public QObject
protected:
QString mUrl;
attachmentsType mType;
QString mType;
QString mTitle;
int mWidth = -1;
int mHeight = -1;
......
......@@ -19,7 +19,7 @@
********************************************************************************************/
#include <algorithm>
#include "messageservice.h"
#include <repos/entities/rocketchatreplymessage.h>
......@@ -406,7 +406,7 @@ void MessageService::loadHistoryFromAutoSource( const QSharedPointer<LoadHistory
MessageList currentList = channelMap->values( key );
if ( currentList.count() < limit ) {
qSort( currentList );
std::sort( currentList.begin(), currentList.end() );
double timestamp;
if ( !currentList.empty() ) {
......
......@@ -574,7 +574,7 @@ void RocketChatChannelService::searchRoom( const QString &pTerm, const QString &
channelList << searchRoomLocal( pTerm, ids, pType, names );
if ( !channelList.isEmpty() ) {
qSort( channelList.begin(), channelList.end(), []( const QSharedPointer<RocketChatChannel> &v1, const QSharedPointer<RocketChatChannel> &v2 )->bool{
std::sort( channelList.begin(), channelList.end(), []( const QSharedPointer<RocketChatChannel> &v1, const QSharedPointer<RocketChatChannel> &v2 )->bool{
return v1->getName().toLower() < v2->getName().toLower();
} );
auto result = QMetaObject::invokeMethod( roomsModel, "addChannels", Q_ARG( channelVector, channelList ) );
......
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