diff --git a/autotests/texthandlertest.cpp b/autotests/texthandlertest.cpp index a6fe17005..df7d9f4da 100644 --- a/autotests/texthandlertest.cpp +++ b/autotests/texthandlertest.cpp @@ -651,5 +651,5 @@ void TextHandlerTest::linkPreviewsReject() QCOMPARE(testTextHandler.getLinkPreviews(), testOutputLinks); } -QTEST_MAIN(TextHandlerTest) +QTEST_APPLESS_MAIN(TextHandlerTest) #include "texthandlertest.moc" diff --git a/src/controller.cpp b/src/controller.cpp index 61d75a475..4f0c29487 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -60,7 +60,6 @@ Controller::Controller(QObject *parent) : QObject(parent) { Connection::setRoomType(); - Connection::setUserType(); setApplicationProxy(); diff --git a/src/models/locationsmodel.cpp b/src/models/locationsmodel.cpp index 5a55a9f37..9c20b8d99 100644 --- a/src/models/locationsmodel.cpp +++ b/src/models/locationsmodel.cpp @@ -3,6 +3,8 @@ #include "locationsmodel.h" +#include + using namespace Quotient; LocationsModel::LocationsModel(QObject *parent) @@ -43,6 +45,10 @@ LocationsModel::LocationsModel(QObject *parent) }); connect(this, &LocationsModel::rowsInserted, this, &LocationsModel::boundingBoxChanged); + + connect(static_cast(QGuiApplication::instance()), &QGuiApplication::paletteChanged, this, [this] { + Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), {AuthorRole}); + }); } void LocationsModel::addLocation(const RoomMessageEvent *event) diff --git a/src/models/messageeventmodel.cpp b/src/models/messageeventmodel.cpp index c9c982ff2..d05933adf 100644 --- a/src/models/messageeventmodel.cpp +++ b/src/models/messageeventmodel.cpp @@ -77,7 +77,7 @@ MessageEventModel::MessageEventModel(QObject *parent) : QAbstractListModel(parent) { connect(static_cast(QGuiApplication::instance()), &QGuiApplication::paletteChanged, this, [this] { - Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), {AuthorRole, ReplyRole}); + Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), {AuthorRole, ReplyAuthor, ReadMarkersRole}); }); } diff --git a/src/models/searchmodel.cpp b/src/models/searchmodel.cpp index 68e1523d1..8571f4e2c 100644 --- a/src/models/searchmodel.cpp +++ b/src/models/searchmodel.cpp @@ -5,12 +5,14 @@ #include "messageeventmodel.h" #include "neochatroom.h" + +#include + +#include #include #include -#include - using namespace Quotient; // TODO search only in the current room @@ -18,6 +20,9 @@ using namespace Quotient; SearchModel::SearchModel(QObject *parent) : QAbstractListModel(parent) { + connect(static_cast(QGuiApplication::instance()), &QGuiApplication::paletteChanged, this, [this] { + Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), {AuthorRole, ReadMarkersRole}); + }); } QString SearchModel::searchText() const diff --git a/src/models/userlistmodel.cpp b/src/models/userlistmodel.cpp index 2398e5aae..5cf3c2e0f 100644 --- a/src/models/userlistmodel.cpp +++ b/src/models/userlistmodel.cpp @@ -3,6 +3,8 @@ #include "userlistmodel.h" +#include + #include #include @@ -14,6 +16,9 @@ UserListModel::UserListModel(QObject *parent) : QAbstractListModel(parent) , m_currentRoom(nullptr) { + connect(static_cast(QGuiApplication::instance()), &QGuiApplication::paletteChanged, this, [this]() { + refreshAllUsers(); + }); } void UserListModel::setRoom(NeoChatRoom *room)