[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    [kopete-devel] [PATCH] history plugin (kopete 4.1.1): do not
From:       Matěj_Laitl <strohel () gmail ! com>
Date:       2008-09-28 11:14:51
Message-ID: 200809281314.51687.strohel () gmail ! com
[Download RAW message or body]

Hi kopete devs,
I've got problems with history plugin - when history is shown, messages get 
reordered based on their arrival time. However, at least some protocols (ICQ) 
use remote user's clock for recording arrival time, which results in messed up 
history when your buddy's clock is skewed.

This small patch just removes the reordering mechanism, as messages are 
already in correct order in history files (e.g. semantically chronological, 
even when recorded arrival times are messed up)

The patch is based on kopete 4.1.1, should apply to trunk too.

	Matěj Laitl

["kopete-nosort-history.patch" (text/x-patch)]

diff --git a/kopete/plugins/history/historylogger.cpp b/kopete/plugins/history/historylogger.cpp
index 5a3a9bd..e366c4c 100644
--- a/kopete/plugins/history/historylogger.cpp
+++ b/kopete/plugins/history/historylogger.cpp
@@ -391,17 +391,8 @@ QList<Kopete::Message> HistoryLogger::readMessages(QDate date)
 							.arg( dt.toString(Qt::LocalDate), msg.escapedBody() ));
 					msg.setTimestamp( dt );
 					msg.setDirection( dir );
-				
 
-					// We insert it at the good place, given its date
- 					QList<Kopete::Message>::Iterator msgIt;
-					
-					for (msgIt = messages.begin(); msgIt != messages.end(); ++msgIt)
-					{
-						if ((*msgIt).timestamp() > msg.timestamp())
-							break;
-					}
-					messages.insert(msgIt, msg);
+					messages.append(msg);
 				}
 			}
 


_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic