diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/widget/kexicharencodingcombobox.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/widget/kexicharencodingcombobox.cpp')
-rw-r--r-- | kexi/widget/kexicharencodingcombobox.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kexi/widget/kexicharencodingcombobox.cpp b/kexi/widget/kexicharencodingcombobox.cpp index c1f50542..1b66f6a8 100644 --- a/kexi/widget/kexicharencodingcombobox.cpp +++ b/kexi/widget/kexicharencodingcombobox.cpp @@ -19,7 +19,7 @@ #include "kexicharencodingcombobox.h" -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <kdebug.h> #include <klocale.h> @@ -27,25 +27,25 @@ #include <kcharsets.h> KexiCharacterEncodingComboBox::KexiCharacterEncodingComboBox( - QWidget* parent, const QString& selectedEncoding ) - : KComboBox( parent, "KexiCharacterEncodingComboBox" ) + TQWidget* tqparent, const TQString& selectedEncoding ) + : KComboBox( tqparent, "KexiCharacterEncodingComboBox" ) , m_defaultEncodingAdded(false) { - QString defaultEncoding(QString::fromLatin1(KGlobal::locale()->encoding())); - QString defaultEncodingDescriptiveName; + TQString defaultEncoding(TQString::tqfromLatin1(KGlobal::locale()->encoding())); + TQString defaultEncodingDescriptiveName; - QString _selectedEncoding = selectedEncoding; + TQString _selectedEncoding = selectedEncoding; if (_selectedEncoding.isEmpty()) - _selectedEncoding = QString::fromLatin1(KGlobal::locale()->encoding()); + _selectedEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); - QStringList descEncodings(KGlobal::charsets()->descriptiveEncodingNames()); - QStringList::ConstIterator it = descEncodings.constBegin(); + TQStringList descEncodings(KGlobal::charsets()->descriptiveEncodingNames()); + TQStringList::ConstIterator it = descEncodings.constBegin(); for (uint id = 0; it!=descEncodings.constEnd(); ++it) { bool found = false; - QString name( KGlobal::charsets()->encodingForName( *it ) ); - QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(name, found); + TQString name( KGlobal::charsets()->encodingForName( *it ) ); + TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(name, found); if (found) { insertItem(*it); if (codecForEnc->name() == defaultEncoding || name == defaultEncoding) { @@ -65,8 +65,8 @@ KexiCharacterEncodingComboBox::KexiCharacterEncodingComboBox( //prepend default encoding, if present if (!defaultEncodingDescriptiveName.isEmpty()) { m_defaultEncodingAdded = true; - QString desc = i18n("Text encoding: Default", "Default: %1") - .arg(defaultEncodingDescriptiveName); + TQString desc = i18n("Text encoding: Default", "Default: %1") + .tqarg(defaultEncodingDescriptiveName); insertItem( desc, 0 ); if (_selectedEncoding==defaultEncoding) { setCurrentItem(0); @@ -81,19 +81,19 @@ KexiCharacterEncodingComboBox::~KexiCharacterEncodingComboBox() { } -QString KexiCharacterEncodingComboBox::selectedEncoding() const +TQString KexiCharacterEncodingComboBox::selectedEncoding() const { if (defaultEncodingSelected()) { - return QString::fromLatin1(KGlobal::locale()->encoding()); + return TQString::tqfromLatin1(KGlobal::locale()->encoding()); } else { return KGlobal::charsets()->encodingForName( currentText() ); } } -void KexiCharacterEncodingComboBox::setSelectedEncoding(const QString& encodingName) +void KexiCharacterEncodingComboBox::setSelectedEncoding(const TQString& encodingName) { - QString desc = m_encodingDescriptionForName[encodingName]; + TQString desc = m_encodingDescriptionForName[encodingName]; if (desc.isEmpty()) { kdWarning() << "KexiCharacterEncodingComboBox::setSelectedEncoding(): " "no such encoding \"" << encodingName << "\"" << endl; |