From 5ec229a4470f605eca53326853ff246a49e80189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 18 Mar 2022 04:03:50 +0100 Subject: Enforce the use of TQt with STL only where it is necessary. The definition of -UTQT_NO_STL is no longer needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit f3fd991c693316d26e360438eff8ecff8a54553d) --- kmymoney2/mymoney/mymoneymoney.h | 13 +++---------- kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp | 12 ++++++++++++ kmymoney2/mymoney/storage/mymoneystoragesql.cpp | 12 ++++++++++++ 3 files changed, 27 insertions(+), 10 deletions(-) (limited to 'kmymoney2/mymoney') diff --git a/kmymoney2/mymoney/mymoneymoney.h b/kmymoney2/mymoney/mymoneymoney.h index 97534b5..bbf500b 100644 --- a/kmymoney2/mymoney/mymoneymoney.h +++ b/kmymoney2/mymoney/mymoneymoney.h @@ -40,17 +40,10 @@ #include #include -// Check for standard definitions -#ifdef HAVE_STDINT_H - #ifndef __STDC_LIMIT_MACROS - #define __STDC_LIMIT_MACROS // force definition of min and max values - #endif - #include -#else - #include - #define INT64_MAX LLONG_MAX - #define INT64_MIN LLONG_MIN +#ifndef __STDC_LIMIT_MACROS + #define __STDC_LIMIT_MACROS // force definition of min and max values #endif +#include typedef int64_t signed64; typedef uint64_t unsigned64; diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp index 98b6286..ced8e9a 100644 --- a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp +++ b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp @@ -15,6 +15,12 @@ * * ***************************************************************************/ +// force to use TQt with STL +#if defined(TQT_NO_STL) +# define DISABLE_TQT_NO_STL +# undef TQT_NO_STL +#endif + #ifdef HAVE_CONFIG_H #include #endif @@ -1883,3 +1889,9 @@ void MyMoneyDatabaseMgr::removeReferences(const TQString& id) #undef TRY #undef CATCH #undef PASS + +// restore TQT_NO_STL +#if defined(DISABLE_TQT_NO_STL) +# undef DISABLE_TQT_NO_STL +# define TQT_NO_STL +#endif diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp index e5914bb..952db4f 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp +++ b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp @@ -16,6 +16,12 @@ * * ***************************************************************************/ +// force to use TQt with STL +#if defined(TQT_NO_STL) +# define DISABLE_TQT_NO_STL +# undef TQT_NO_STL +#endif + #ifdef HAVE_CONFIG_H #include #endif @@ -4503,3 +4509,9 @@ const TQString MyMoneyDbDatetimeColumn::generateDDL (databaseTypeE dbType) const if (isNotNull()) qs += " NOT NULL"; return qs; } + +// restore TQT_NO_STL +#if defined(DISABLE_TQT_NO_STL) +# undef DISABLE_TQT_NO_STL +# define TQT_NO_STL +#endif -- cgit v1.2.1