summaryrefslogtreecommitdiffstats
path: root/libkonq/konq_historycomm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkonq/konq_historycomm.cpp')
-rw-r--r--libkonq/konq_historycomm.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/libkonq/konq_historycomm.cpp b/libkonq/konq_historycomm.cpp
new file mode 100644
index 000000000..6cfd9b53f
--- /dev/null
+++ b/libkonq/konq_historycomm.cpp
@@ -0,0 +1,41 @@
+#include "konq_historycomm.h"
+
+bool KonqHistoryEntry::marshalURLAsStrings;
+
+// TQDataStream operators (read and write a KonqHistoryEntry
+// from/into a TQDataStream)
+TQDataStream& operator<< (TQDataStream& 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;
+}
+
+TQDataStream& operator>> (TQDataStream& s, KonqHistoryEntry& e) {
+ if (KonqHistoryEntry::marshalURLAsStrings)
+ {
+ TQString 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;
+}