diff --git a/autotests/chatmarkdownhelpertestwrapper.h b/autotests/chatmarkdownhelpertestwrapper.h index 3f1e04177..5689b5e10 100644 --- a/autotests/chatmarkdownhelpertestwrapper.h +++ b/autotests/chatmarkdownhelpertestwrapper.h @@ -48,7 +48,6 @@ public: if (!doc) { return false; } - // qWarning() << doc->toPlainText() <toPlainText(); } @@ -58,7 +57,6 @@ public: if (cursor.isNull()) { return false; } - // qWarning() << RichFormat::formatsAtCursor(cursor) <setFixedChars(startChars, endChars); } @@ -138,10 +141,11 @@ public: if (!m_textItem) { return; } - const auto textItem = new ChatTextItemHelper(); + const auto textItem = new ChatTextItemHelper(this); textItem->setTextItem(item); textItem->setCursorPosition(cursorPos); m_textItem->setCursorFromTextItem(textItem, infront); + textItem->deleteLater(); } Q_INVOKABLE void mergeFormatOnCursor(RichFormat::Format format) diff --git a/autotests/modeltest.cpp b/autotests/modeltest.cpp index f542d43f7..7399af754 100644 --- a/autotests/modeltest.cpp +++ b/autotests/modeltest.cpp @@ -181,7 +181,7 @@ void ModelTest::testRoomTreeModel() void ModelTest::testMessageContentModel() { auto contentModel = std::make_unique(room, eventId); - auto tester = new QAbstractItemModelTester(contentModel.get()); + auto tester = new QAbstractItemModelTester(contentModel.get(), contentModel.get()); tester->setUseFetchMore(true); } diff --git a/src/chatbar/ChatBarCore.qml b/src/chatbar/ChatBarCore.qml index dff408d4b..8fe229b06 100644 --- a/src/chatbar/ChatBarCore.qml +++ b/src/chatbar/ChatBarCore.qml @@ -95,7 +95,7 @@ QQC2.Control { } width: chatScrollView.width - spacing: Kirigami.Units.smallSpacing + spacing: 0 Repeater { id: chatContentView