Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / konqueror / src / konqhistoryentry.h
blob018b53c7739d6d61aa337ae8b9956af47b5a1ea4
1 /* This file is part of the KDE project
2 Copyright (C) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef KONQ_HISTORYENTRY_H
21 #define KONQ_HISTORYENTRY_H
23 #include "konqprivate_export.h"
25 #include <QtCore/QDateTime>
26 #include <QtCore/QVariant>
28 #include <kurl.h>
30 class KONQUERORPRIVATE_EXPORT KonqHistoryEntry
32 public:
33 //Should URLs be marshaled as strings (V2 history format)?
34 static bool marshalURLAsStrings;
36 KonqHistoryEntry()
37 : numberOfTimesVisited(1) {}
39 KUrl url;
40 QString typedUrl;
41 QString title;
42 quint32 numberOfTimesVisited;
43 QDateTime firstVisited;
44 QDateTime lastVisited;
46 // Necessary for QList (on Windows)
47 bool operator==( const KonqHistoryEntry& entry ) const {
48 return url == entry.url &&
49 typedUrl == entry.typedUrl &&
50 title == entry.title &&
51 numberOfTimesVisited == entry.numberOfTimesVisited &&
52 firstVisited == entry.firstVisited &&
53 lastVisited == entry.lastVisited;
56 #ifdef MAKE_KONQUERORPRIVATE_LIB
57 KDE_DUMMY_QHASH_FUNCTION(KonqHistoryEntry)
58 #endif
60 Q_DECLARE_METATYPE(KonqHistoryEntry)
62 // QDataStream operators (read and write a KonqHistoryEntry
63 // from/into a QDataStream
64 QDataStream& operator<< (QDataStream& s, const KonqHistoryEntry& e);
65 QDataStream& operator>> (QDataStream& s, KonqHistoryEntry& e);
67 #endif // KONQ_HISTORYCOMM_H