Enforce the use of TQt with STL only where it is necessary.

The definition of -UTQT_NO_STL is no longer needed.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/2/head
Slávek Banko 3 years ago
parent 5e6c401557
commit f3fd991c69
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -66,7 +66,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings ###### global compiler settings
add_definitions( -DHAVE_CONFIG_H -UTQT_NO_STL ) add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )

@ -204,6 +204,6 @@ void ConverterTest::testDateFormat()
} }
catch (MyMoneyException* e) catch (MyMoneyException* e)
{ {
CPPUNIT_FAIL(e->what()); CPPUNIT_FAIL(e->what().local8Bit().data());
} }
} }

@ -40,17 +40,10 @@
#include <kmymoney/export.h> #include <kmymoney/export.h>
#include <kmymoney/mymoneyexception.h> #include <kmymoney/mymoneyexception.h>
// Check for standard definitions #ifndef __STDC_LIMIT_MACROS
#ifdef HAVE_STDINT_H #define __STDC_LIMIT_MACROS // force definition of min and max values
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS // force definition of min and max values
#endif
#include <stdint.h>
#else
#include <limits.h>
#define INT64_MAX LLONG_MAX
#define INT64_MIN LLONG_MIN
#endif #endif
#include <inttypes.h>
typedef int64_t signed64; typedef int64_t signed64;
typedef uint64_t unsigned64; typedef uint64_t unsigned64;

@ -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 #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
@ -1883,3 +1889,9 @@ void MyMoneyDatabaseMgr::removeReferences(const TQString& id)
#undef TRY #undef TRY
#undef CATCH #undef CATCH
#undef PASS #undef PASS
// restore TQT_NO_STL
#if defined(DISABLE_TQT_NO_STL)
# undef DISABLE_TQT_NO_STL
# define TQT_NO_STL
#endif

@ -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 #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
@ -4503,3 +4509,9 @@ const TQString MyMoneyDbDatetimeColumn::generateDDL (databaseTypeE dbType) const
if (isNotNull()) qs += " NOT NULL"; if (isNotNull()) qs += " NOT NULL";
return qs; return qs;
} }
// restore TQT_NO_STL
#if defined(DISABLE_TQT_NO_STL)
# undef DISABLE_TQT_NO_STL
# define TQT_NO_STL
#endif

@ -121,7 +121,7 @@ void PivotTableTest::testNetWorthSingle()
} }
catch(MyMoneyException *e) catch(MyMoneyException *e)
{ {
CPPUNIT_FAIL(e->what()); CPPUNIT_FAIL(e->what().local8Bit().data());
delete e; delete e;
} }
} }
@ -938,7 +938,7 @@ void PivotTableTest::testInvestment(void)
} }
catch(MyMoneyException *e) catch(MyMoneyException *e)
{ {
CPPUNIT_FAIL(e->what()); CPPUNIT_FAIL(e->what().local8Bit().data());
delete e; delete e;
} }
} }

@ -283,7 +283,7 @@ void QueryTableTest::testQueryBasics()
} }
catch(MyMoneyException *e) catch(MyMoneyException *e)
{ {
CPPUNIT_FAIL(e->what()); CPPUNIT_FAIL(e->what().local8Bit().data());
delete e; delete e;
} }
@ -429,7 +429,7 @@ void QueryTableTest::testAccountQuery()
} }
catch(MyMoneyException *e) catch(MyMoneyException *e)
{ {
CPPUNIT_FAIL(e->what()); CPPUNIT_FAIL(e->what().local8Bit().data());
delete e; delete e;
} }
} }
@ -605,7 +605,7 @@ void QueryTableTest::testInvestment(void)
} }
catch(MyMoneyException *e) catch(MyMoneyException *e)
{ {
CPPUNIT_FAIL(e->what()); CPPUNIT_FAIL(e->what().local8Bit().data());
delete e; delete e;
} }
} }
@ -659,7 +659,7 @@ void QueryTableTest::testInvestment(void)
} }
catch(MyMoneyException *e) catch(MyMoneyException *e)
{ {
CPPUNIT_FAIL(e->what()); CPPUNIT_FAIL(e->what().local8Bit().data());
delete e; delete e;
} }
@ -690,7 +690,7 @@ void QueryTableTest::testTaxReport()
TQString html = qtbl_3.renderHTML(); TQString html = qtbl_3.renderHTML();
CPPUNIT_ASSERT(rows.count() == 1); CPPUNIT_ASSERT(rows.count() == 1);
} catch(MyMoneyException *e) { } catch(MyMoneyException *e) {
CPPUNIT_FAIL(e->what()); CPPUNIT_FAIL(e->what().local8Bit().data());
delete e; delete e;
} }
} }

Loading…
Cancel
Save