summaryrefslogtreecommitdiffstats
path: root/src/kvilib/system
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-08-24 21:28:39 +0900
committerMichele Calgaro <[email protected]>2023-08-31 10:03:10 +0900
commit030a2248f3630fd0404df98beffc78b5b5ca4c31 (patch)
tree75d55e7e177ca48e69d59f74181ce37841ecd51b /src/kvilib/system
parent17118265cf93b35b0b68e450ea5f43046c1d81c3 (diff)
downloadkvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.tar.gz
kvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.zip
Drop USE_QT4 code
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/kvilib/system')
-rw-r--r--src/kvilib/system/kvi_locale.cpp38
-rw-r--r--src/kvilib/system/kvi_locale.h7
-rw-r--r--src/kvilib/system/kvi_process.h5
3 files changed, 0 insertions, 50 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
diff --git a/src/kvilib/system/kvi_locale.h b/src/kvilib/system/kvi_locale.h
index b3f15b45..599aec41 100644
--- a/src/kvilib/system/kvi_locale.h
+++ b/src/kvilib/system/kvi_locale.h
@@ -132,15 +132,8 @@ class KVILIB_API KviTranslator : public TQTranslator
KviTranslator(TQObject * parent,const char * name);
~KviTranslator();
public:
-#ifdef COMPILE_USE_QT4
- virtual TQString translate(const char * context,const char * message,const char * comment) const;
-#endif
- // Deprecated in qt 4.x
virtual TQString find(const char * context,const char * message) const;
-#ifndef COMPILE_USE_QT4
- // Dead in qt 4.x
virtual TQTranslatorMessage findMessage(const char * context,const char * sourceText,const char * comment = 0) const;
-#endif
};
diff --git a/src/kvilib/system/kvi_process.h b/src/kvilib/system/kvi_process.h
index 649e40d7..2be819a5 100644
--- a/src/kvilib/system/kvi_process.h
+++ b/src/kvilib/system/kvi_process.h
@@ -26,12 +26,7 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include <tq3process.h>
- #define KviProcess Q3Process
-#else
#include <tqprocess.h>
#define KviProcess TQProcess
-#endif
#endif //!_KVI_PROCESS_H_