diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/misc/Strings.cpp | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/misc/Strings.cpp')
-rw-r--r-- | src/misc/Strings.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/misc/Strings.cpp b/src/misc/Strings.cpp index 3c139dc..57dc4d3 100644 --- a/src/misc/Strings.cpp +++ b/src/misc/Strings.cpp @@ -25,27 +25,27 @@ #include "base/Segment.h" #include "base/Event.h" -#include <qtextcodec.h> +#include <tqtextcodec.h> -QString strtoqstr(const std::string &str) +TQString strtoqstr(const std::string &str) { - return QString::fromUtf8(str.c_str()); + return TQString::fromUtf8(str.c_str()); } -QString strtoqstr(const Rosegarden::PropertyName &p) +TQString strtoqstr(const Rosegarden::PropertyName &p) { - return QString::fromUtf8(p.c_str()); + return TQString::fromUtf8(p.c_str()); } -std::string qstrtostr(const QString &qstr) +std::string qstrtostr(const TQString &qstr) { return std::string(qstr.utf8().data()); } /** - * Unlike strtod(3) or QString::toDouble(), this is locale-independent + * Unlike strtod(3) or TQString::toDouble(), this is locale-independent * and always uses '.' as a decimal point. We use it when reading * things like configuration values from XML files where we want to * guarantee the same value is used regardless of surrounding locale. @@ -94,13 +94,13 @@ double strtodouble(const std::string &s) return result * sign; } -double qstrtodouble(const QString &s) +double qstrtodouble(const TQString &s) { return strtodouble(qstrtostr(s)); } std::string -convertFromCodec(std::string text, QTextCodec *codec) +convertFromCodec(std::string text, TQTextCodec *codec) { if (codec) return qstrtostr(codec->toUnicode(text.c_str(), text.length())); |