From b02883f84d6a7ebb1eae433885381a2177bac72f Mon Sep 17 00:00:00 2001 From: Stojce Slavkovski Date: Thu, 24 Apr 2014 22:47:42 +0200 Subject: [PATCH] add limits to QXmppArchiveManager --- interface/src/ui/ChatWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/interface/src/ui/ChatWindow.cpp b/interface/src/ui/ChatWindow.cpp index a9ca42e3ac..44b5d9789c 100644 --- a/interface/src/ui/ChatWindow.cpp +++ b/interface/src/ui/ChatWindow.cpp @@ -216,6 +216,16 @@ void ChatWindow::connected() { connect(publicChatRoom, SIGNAL(participantsChanged()), this, SLOT(participantsChanged())); + // set limits + QDateTime m_startDate = QDateTime::currentDateTime().addDays(-2); + QDateTime m_endDate = QDateTime::currentDateTime(); + + QXmppResultSetQuery rsmQuery; + rsmQuery.setMax(100); + + QXmppArchiveManager* archiveManager = XmppClient::getInstance().getArchiveManager(); + archiveManager->listCollections("", m_startDate, m_endDate, rsmQuery); + #endif startTimerForTimeStamps(); }