]> granicus.if.org Git - taglib/commitdiff
Check the macro for Qt 4, switch to32Bit() to toWString() since WString is not guaran...
authorScott Wheeler <wheeler@kde.org>
Thu, 31 Jan 2008 17:57:12 +0000 (17:57 +0000)
committerScott Wheeler <wheeler@kde.org>
Thu, 31 Jan 2008 17:57:12 +0000 (17:57 +0000)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@769156 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

taglib/toolkit/tstring.cpp
taglib/toolkit/tstring.h

index 79e1beeabcc12d84667494419dcc125ed0f32316..a31c2ee878776a6a421eafa9acc30acb599d3c9e 100644 (file)
@@ -247,7 +247,7 @@ std::string String::to8Bit(bool unicode) const
   return s;
 }
 
-TagLib::wstring String::to32Bit() const
+TagLib::wstring String::toWString() const
 {
   return d->data;
 }
index 1abdd70e5eae12392f3079aa7ba5f38682fe8899..ce2687de39173234a6a1581c088c16e2345910ea 100644 (file)
  */
 #define TStringToQString(s) QString::fromUtf8(s.toCString(true))
 
+
+#if defined(QT_VERSION_CHECK)
+# if QT_VERSION_CHECK(4, 0, 0))
+#  undef QStringToTSTring
+#  undef TStringToQString
+#  define QStringToTString(s) TagLib::String(s.toStdWString())
+#  define TStringToQString(s) QString::fromStdWString(s.toWString())
+# endif
+#endif
+
 namespace TagLib {
 
   //! A \e wide string class suitable for unicode.
@@ -178,7 +188,7 @@ namespace TagLib {
     /*!
      * Returns a wstring version of the TagLib string as a wide string.
      */
-    wstring to32Bit() const;
+    wstring toWString() const;
 
     /*!
      * Creates and returns a C-String based on the data.  This string is still