Minor cleanup
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QTimeZone>
|
#include <QTimeZone>
|
||||||
|
|
||||||
|
#include <KFormat>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
|
||||||
#include "enums/delegatetype.h"
|
#include "enums/delegatetype.h"
|
||||||
@@ -411,7 +412,7 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
|
|||||||
return DelegateType::ReadMarker;
|
return DelegateType::ReadMarker;
|
||||||
case TimeRole: {
|
case TimeRole: {
|
||||||
const QDateTime eventDate = data(index(m_lastReadEventIndex.row() + 1, 0), TimeRole).toDateTime().toLocalTime();
|
const QDateTime eventDate = data(index(m_lastReadEventIndex.row() + 1, 0), TimeRole).toDateTime().toLocalTime();
|
||||||
const KFormat format;
|
static const KFormat format;
|
||||||
return format.formatRelativeDateTime(eventDate, QLocale::ShortFormat);
|
return format.formatRelativeDateTime(eventDate, QLocale::ShortFormat);
|
||||||
}
|
}
|
||||||
case SpecialMarksRole:
|
case SpecialMarksRole:
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <KFormat>
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
|
|
||||||
@@ -118,7 +117,6 @@ private:
|
|||||||
int rowBelowInserted = -1;
|
int rowBelowInserted = -1;
|
||||||
bool resetting = false;
|
bool resetting = false;
|
||||||
bool movingEvent = false;
|
bool movingEvent = false;
|
||||||
KFormat m_format;
|
|
||||||
|
|
||||||
std::map<QString, std::unique_ptr<NeochatRoomMember>> m_memberObjects;
|
std::map<QString, std::unique_ptr<NeochatRoomMember>> m_memberObjects;
|
||||||
std::map<QString, std::unique_ptr<MessageContentModel>> m_contentModels;
|
std::map<QString, std::unique_ptr<MessageContentModel>> m_contentModels;
|
||||||
|
|||||||
Reference in New Issue
Block a user