summaryrefslogtreecommitdiffstats
path: root/libkonq/konq_historycomm.cc
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /libkonq/konq_historycomm.cc
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkonq/konq_historycomm.cc')
-rw-r--r--libkonq/konq_historycomm.cc41
1 files changed, 41 insertions, 0 deletions
diff --git a/libkonq/konq_historycomm.cc b/libkonq/konq_historycomm.cc
new file mode 100644
index 000000000..0875a7945
--- /dev/null
+++ b/libkonq/konq_historycomm.cc
@@ -0,0 +1,41 @@
+#include "konq_historycomm.h"
+
+bool KonqHistoryEntry::marshalURLAsStrings;
+
+// QDataStream operators (read and write a KonqHistoryEntry
+// from/into a QDataStream)
+QDataStream& operator<< (QDataStream& s, const KonqHistoryEntry& e) {
+ if (KonqHistoryEntry::marshalURLAsStrings)
+ s << e.url.url();
+ else
+ s << e.url;
+
+ s << e.typedURL;
+ s << e.title;
+ s << e.numberOfTimesVisited;
+ s << e.firstVisited;
+ s << e.lastVisited;
+
+ return s;
+}
+
+QDataStream& operator>> (QDataStream& s, KonqHistoryEntry& e) {
+ if (KonqHistoryEntry::marshalURLAsStrings)
+ {
+ QString url;
+ s >> url;
+ e.url = url;
+ }
+ else
+ {
+ s>>e.url;
+ }
+
+ s >> e.typedURL;
+ s >> e.title;
+ s >> e.numberOfTimesVisited;
+ s >> e.firstVisited;
+ s >> e.lastVisited;
+
+ return s;
+}