summaryrefslogtreecommitdiffstats
path: root/amarok/src/atomicstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'amarok/src/atomicstring.h')
-rw-r--r--amarok/src/atomicstring.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/amarok/src/atomicstring.h b/amarok/src/atomicstring.h
index e81ae238..11790ce9 100644
--- a/amarok/src/atomicstring.h
+++ b/amarok/src/atomicstring.h
@@ -18,14 +18,14 @@
*/
/**
- * A thin wrapper over QString which ensures only a single copy of string data
+ * A thin wrapper over TQString which ensures only a single copy of string data
* is stored for equivalent strings. As a side benefit, testing for equality
- * is reduced to a pointer comparison. Construction is slower than a QString,
+ * is reduced to a pointer comparison. Construction is slower than a TQString,
* as it must be checked for equality with existing strings. (A hash set is
* used for this purpose. According to benchmarks, Paul Hsieh's SuperFastHash
* (which is currently used -- see http://www.azillionmonkeys.com/qed/hash.html)
* can hash 5 million 256 byte strings in 1.34s on a 1.62GHz Athlon XP.) For
- * other use, the overhead compared to a plain QString should be minimal.
+ * other use, the overhead compared to a plain TQString should be minimal.
*
* Added note: due to QString's thread unsafe refcounting, special precautions have to be
* taken to avoid memory corruption, while still maintaining some level of efficiency.
@@ -48,9 +48,9 @@
#include <set>
#include "amarok_export.h"
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qmutex.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqmutex.h>
class LIBAMAROK_EXPORT AtomicString
{
@@ -72,7 +72,7 @@ public:
* Constructs a copy of \p string.
* @param string the string to copy
*/
- AtomicString( const QString &string );
+ AtomicString( const TQString &string );
/**
* Destroys the string.
@@ -102,19 +102,19 @@ public:
*
* @return the string.
*/
- QString string() const;
+ TQString string() const;
/**
- * Implicitly casts to a QString.
+ * Implicitly casts to a TQString.
* @return the string
*/
- inline operator QString() const { return string(); }
+ inline operator TQString() const { return string(); }
/**
* Useful for threading.
* @return a deep copy of the string
*/
- QString deepCopy() const;
+ TQString deepCopy() const;
/**
* For convenience. Equivalent to isNull().
@@ -136,18 +136,18 @@ public:
* different ones. This can be useful for certain kinds of hacks, but
* shouldn't normally be used.
*
- * Note: DO NOT COPY this pointer with QString() or QString=. It is not
- * thread safe to do it (QString internal refcount)
+ * Note: DO NOT COPY this pointer with TQString() or QString=. It is not
+ * thread safe to do it (TQString internal refcount)
* @return the internal pointer to the string
*/
- const QString *ptr() const;
+ const TQString *ptr() const;
/**
* For convenience, so you can do atomicstring->QStringfunction(),
* instead of atomicstring.string().QStringfunction(). The same warning
* applies as for the above ptr() function.
*/
- inline const QString *operator->() const { return ptr(); }
+ inline const TQString *operator->() const { return ptr(); }
/**
* For debugging purposes.
@@ -166,10 +166,10 @@ public:
private:
struct less
{
- bool operator()( const QString *a, const QString *b ) const
+ bool operator()( const TQString *a, const TQString *b ) const
{ return *a < *b; }
};
- typedef std::set<QString*, less> set_type;
+ typedef std::set<TQString*, less> set_type;
class Data;
friend class Data;
@@ -183,9 +183,9 @@ private:
// static data
static set_type s_store; // main string store
- static QPtrList<QString> s_lazyDeletes; // strings scheduled for deletion
+ static TQPtrList<TQString> s_lazyDeletes; // strings scheduled for deletion
// by main thread
- static QMutex s_storeMutex; // protects the static data above
+ static TQMutex s_storeMutex; // protects the static data above
};
#endif