summaryrefslogtreecommitdiffstats
path: root/src/kvilib/system/kvi_locale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/system/kvi_locale.cpp')
-rw-r--r--src/kvilib/system/kvi_locale.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/kvilib/system/kvi_locale.cpp b/src/kvilib/system/kvi_locale.cpp
index d4f89cc1..8798d8ec 100644
--- a/src/kvilib/system/kvi_locale.cpp
+++ b/src/kvilib/system/kvi_locale.cpp
@@ -37,9 +37,6 @@
#include <tqtextcodec.h>
#include <tqdir.h>
-#ifdef COMPILE_USE_QT4
- #include <tqlocale.h>
-#endif
#include "kvi_string.h"
#include "kvi_qcstring.h"
@@ -307,19 +304,6 @@ public:
virtual int mibEnum () const { return 0; };
-#ifdef COMPILE_USE_QT4
- virtual TQByteArray name() const { return m_szName; };
-protected:
- virtual TQByteArray convertFromUnicode(const TQChar * input,int number,ConverterState * state) const
- {
- return m_pSendCodec->fromUnicode(input,number,state);
- }
- virtual TQString convertToUnicode(const char * chars,int len,ConverterState * state) const
- {
- if(g_utf8_validate(chars,len,NULL))return g_pUtf8TextCodec->toUnicode(chars,len,state);
- return m_pRecvCodec->toUnicode(chars,len,state);
- }
-#else
public:
virtual const char * mimeName () const { return m_pRecvCodec->mimeName(); };
virtual const char * name () const { return m_szName.data(); };
@@ -367,7 +351,6 @@ public:
return iii;
}
virtual int heuristicNameMatch(const char * hint) const { return 0; };
-#endif
};
static KviPointerHashTable<const char *,KviSmartTextCodec> * g_pSmartCodecDict = 0;
@@ -956,11 +939,7 @@ namespace KviLocale
{
// first of all try to find out the current locale
g_szLang="";
-#ifdef COMPILE_USE_QT4
- TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homePath());
-#else
TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homeDirPath());
-#endif
if(KviFileUtils::fileExists(szLangFile))
{
TQString szTmp;
@@ -968,11 +947,7 @@ namespace KviLocale
g_szLang=szTmp;
}
if(g_szLang.isEmpty())g_szLang = kvi_getenv("KVIRC_LANG");
-#ifdef COMPILE_USE_QT4
- if(g_szLang.isEmpty())g_szLang = TQLocale::system().name();
-#else
if(g_szLang.isEmpty())g_szLang = TQTextCodec::locale();
-#endif
if(g_szLang.isEmpty())g_szLang = kvi_getenv("LC_MESSAGES");
if(g_szLang.isEmpty())g_szLang = kvi_getenv("LANG");
if(g_szLang.isEmpty())g_szLang = "en";
@@ -1079,11 +1054,7 @@ namespace KviLocale
};
KviTranslator::KviTranslator(TQObject * par,const char * nam)
-#ifdef COMPILE_USE_QT4
-: TQTranslator(par)
-#else
: TQTranslator(par,nam)
-#endif
{
}
@@ -1091,13 +1062,6 @@ KviTranslator::~KviTranslator()
{
}
-#ifdef COMPILE_USE_QT4
-TQString KviTranslator::translate(const char *context,const char * message,const char * comment) const
-{
- // we ignore contexts and comments for qt translations
- return g_pMainCatalogue->translateToTQString(message);
-}
-#endif
TQString KviTranslator::find(const char *context,const char * message) const
{
@@ -1105,13 +1069,11 @@ TQString KviTranslator::find(const char *context,const char * message) const
return g_pMainCatalogue->translateToTQString(message);
}
-#ifndef COMPILE_USE_QT4
TQTranslatorMessage KviTranslator::findMessage(const char * context,const char * sourceText,const char * comment) const
{
// we ignore contexts for qt translations
return TQTranslatorMessage(context,sourceText,comment,g_pMainCatalogue->translateToTQString(sourceText));
}
-#endif
#if 0