summaryrefslogtreecommitdiffstats
path: root/lib/interfaces/hashedstring.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /lib/interfaces/hashedstring.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/interfaces/hashedstring.cpp')
-rw-r--r--lib/interfaces/hashedstring.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/interfaces/hashedstring.cpp b/lib/interfaces/hashedstring.cpp
index 38fdf4a9..aae068a3 100644
--- a/lib/interfaces/hashedstring.cpp
+++ b/lib/interfaces/hashedstring.cpp
@@ -24,9 +24,9 @@
//It needs to be measured whether this flag should be turned on or off. It seems just to move the complexity from one position to the other, without any variant being really better.
#define USE_HASHMAP
-size_t fastHashString( const QString& str );
+size_t fastHashString( const TQString& str );
-size_t hashStringSafe( const QString& str ) {
+size_t hashStringSafe( const TQString& str ) {
size_t hash = 0;
int len = str.length();
for( int a = 0; a < len; a++ ) {
@@ -35,17 +35,17 @@ size_t hashStringSafe( const QString& str ) {
return hash;
}
-size_t HashedString::hashString( const QString& str )
+size_t HashedString::hashString( const TQString& str )
{
return fastHashString( str );
}
-size_t fastHashString( const QString& str ) {
+size_t fastHashString( const TQString& str ) {
size_t hash = 0;
if( !str.isEmpty() ) {
- const QChar* curr = str.unicode();
- const QChar* end = curr + str.length();
- QChar c;
+ const TQChar* curr = str.unicode();
+ const TQChar* end = curr + str.length();
+ TQChar c;
for(; curr < end ;) {
c = *curr;
hash = c.unicode() + ( hash * 17 );
@@ -233,7 +233,7 @@ size_t HashedStringSet::hash() const {
return m_data->m_hash;
}
-void HashedStringSet::read( QDataStream& stream ) {
+void HashedStringSet::read( TQDataStream& stream ) {
bool b;
stream >> b;
if( b ) {
@@ -250,7 +250,7 @@ void HashedStringSet::read( QDataStream& stream ) {
}
}
-void HashedStringSet::write( QDataStream& stream ) const {
+void HashedStringSet::write( TQDataStream& stream ) const {
bool b = m_data;
stream << b;
if( b ) {
@@ -272,13 +272,13 @@ std::string HashedStringSet::print() const {
return s.str();
}
-QDataStream& operator << ( QDataStream& stream, const HashedString& str ) {
+TQDataStream& operator << ( TQDataStream& stream, const HashedString& str ) {
stream << str.m_str;
stream << str.m_hash;
return stream;
}
-QDataStream& operator >> ( QDataStream& stream, HashedString& str ) {
+TQDataStream& operator >> ( TQDataStream& stream, HashedString& str ) {
stream >> str.m_str;
stream >> str.m_hash;
return stream;