mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 00:58:12 -04:00
Check the macro for Qt 4, switch to32Bit() to toWString() since WString is not guaranteed to be a 32-bit string.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@769156 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
b89272f571
commit
17b769a06e
@ -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;
|
||||
}
|
||||
|
@ -47,6 +47,16 @@
|
||||
*/
|
||||
#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
|
||||
|
Loading…
x
Reference in New Issue
Block a user