Use Q_NULLPTR to be compatible with qt5.7

fixes #199
This commit is contained in:
Konstantinos Sideris 2018-01-12 11:27:24 +02:00
parent 5b09c8e652
commit daabb40bed
2 changed files with 7 additions and 7 deletions

View File

@ -88,8 +88,8 @@ public:
template<class Widget, mtx::events::MessageType MsgType>
void addUserMessage(const QString &url,
const QSharedPointer<QIODevice> data,
const QString &filename);
const QString &filename,
const QSharedPointer<QIODevice> data = Q_NULLPTR);
void updatePendingMessage(int txn_id, QString event_id);
void scrollDown();
void addDateSeparator(QDateTime datetime, int position);
@ -219,8 +219,8 @@ private:
template<class Widget, mtx::events::MessageType MsgType>
void
TimelineView::addUserMessage(const QString &url,
const QSharedPointer<QIODevice> data,
const QString &filename)
const QString &filename,
const QSharedPointer<QIODevice> data)
{
auto with_sender = lastSender_ != local_user_;

View File

@ -96,7 +96,7 @@ TimelineViewManager::queueImageMessage(const QString &roomid,
auto view = views_[roomid];
view->addUserMessage<ImageItem, mtx::events::MessageType::Image>(url, data, filename);
view->addUserMessage<ImageItem, mtx::events::MessageType::Image>(url, filename, data);
}
void
@ -111,7 +111,7 @@ TimelineViewManager::queueFileMessage(const QString &roomid,
auto view = views_[roomid];
view->addUserMessage<FileItem, mtx::events::MessageType::File>(url, nullptr, filename);
view->addUserMessage<FileItem, mtx::events::MessageType::File>(url, filename);
}
void
@ -126,7 +126,7 @@ TimelineViewManager::queueAudioMessage(const QString &roomid,
auto view = views_[roomid];
view->addUserMessage<AudioItem, mtx::events::MessageType::Audio>(url, nullptr, filename);
view->addUserMessage<AudioItem, mtx::events::MessageType::Audio>(url, filename);
}
void