[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/kcalcore
From: Casey Link <unnamedrambler () gmail ! com>
Date: 2010-07-28 20:02:11
Message-ID: 20100728200211.9E45AAC779 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1156269 by link:
add a qHash function to kcalcore.
M +14 -0 period.cpp
M +6 -0 period.h
--- trunk/KDE/kdepimlibs/kcalcore/period.cpp #1156268:1156269
@@ -35,6 +35,8 @@
#include <KDateTime>
#include <KSystemTimeZones>
+#include <QtCore/QHash>
+
using namespace KCalCore;
//@cond PRIVATE
@@ -164,3 +166,15 @@
return stream;
}
+uint qHash( const KCalCore::Period& key )
+{
+ QString strToHash = key.start().toString();
+ if( key.hasDuration() )
+ strToHash += key.duration();
+ else
+ strToHash += key.end().toString();
+
+ return qHash( strToHash );
+}
+
+
--- trunk/KDE/kdepimlibs/kcalcore/period.h #1156268:1156269
@@ -210,6 +210,12 @@
KCALCORE_EXPORT QDataStream &operator>>( QDataStream &stream, KCalCore::Period &period );
}
+/**
+ Return a hash value for a Period argument.
+ @param key is a Period.
+*/
+KCALCORE_EXPORT uint qHash( const KCalCore::Period &key );
+
//@cond PRIVATE
Q_DECLARE_METATYPE( KCalCore::Period );
//@endcond
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic