Initial add for check target for cmake

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 0c64a776dd)
pull/16/head
Alexander Golubev 9 years ago committed by Slávek Banko
parent cf169fc4ad
commit 297691c5b8

@ -44,6 +44,7 @@ include( TDESetupPaths )
tde_setup_paths( )
tde_setup_architecture_flags( )
enable_testing( )
find_package( TQt )
list( APPEND TDECORE_LIBRARY_DIRS ${TQT_LIBRARY_DIRS} )

@ -12,6 +12,7 @@
add_subdirectory( malloc )
add_subdirectory( network )
add_subdirectory( tdeconfig_compiler )
add_subdirectory( tests )
if( WITH_TDEHWLIB )
add_subdirectory( tdehw )

@ -47,7 +47,6 @@
#include "tdeaccelmanager_private.h"
#include "../tdeui/kstdaction_p.h"
#include "../tdeutils/tdemultitabbar.h"
/*********************************************************************
@ -321,7 +320,7 @@ void TDEAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
if (dynamic_cast<TQComboBox*>(w) || dynamic_cast<TQLineEdit*>(w) ||
dynamic_cast<TQTextEdit*>(w) || dynamic_cast<TQTextView*>(w) ||
dynamic_cast<TQSpinBox*>(w) || static_cast<KMultiTabBar*>(w->tqt_cast("KMultiTabBar")))
dynamic_cast<TQSpinBox*>(w) || w->tqt_cast("KMultiTabBar"))
return;
// now treat 'ordinary' widgets

@ -0,0 +1,56 @@
#################################################
#
# (C) 2016 Alexander Golubev
# fatzer2 (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/dcop
)
link_directories(
${TDECORE_LIBRARY_DIRS}
)
tde_add_library( tdeconfigtest SHARED AUTOMOC
SOURCES tdeconfigtest.cpp
LINK tdeunittest-shared
EXCLUDE_FROM_ALL
)
set( CHECKS
tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest kstddirstest
kurltest kuniqueapptest ktempfiletest krandomsequencetest kdebugtest
ksocktest kstringhandlertest kcmdlineargstest kapptest kmemtest
dcopkonqtest kipctest cplusplustest kiconloadertest kresolvertest
kmdcodectest knotifytest ksortablevaluelisttest krfcdatetest testqtargs
kprociotest kcharsetstest kcalendartest kmacroexpandertest kshelltest
kxerrorhandlertest startserviceby tdestdacceltest kglobaltest ktimezonestest
)
set( TESTS kurltest tdestdacceltest )
foreach( _check ${CHECKS} )
tde_add_check_executable( ${_check} AUTOMOC LINK tdeconfigtest-shared )
endforeach( )
tde_add_check_executable( kidlservertest AUTOMOC SOURCES KIDLTest.cpp KIDLTest.skel
LINK tdeconfigtest-shared )
tde_add_check_executable( kidlclienttest AUTOMOC SOURCES KIDLTestClient.cpp
KIDLTest.stub LINK tdeconfigtest-shared )
foreach( _test ${TESTS})
add_test( ${_test} ${_test} )
endforeach( )

@ -59,7 +59,7 @@ public:
il << 1 << 2 << 3 << 4 << 5;
kdDebug() << "TQValueList<int> filled: " << il << endl;
Q_LLONG big = 65536LL*65536*500;
TQ_LLONG big = 65536LL*65536*500;
kdDebug() << big << endl;
TQVariant v( 0.12345 );

@ -7,7 +7,7 @@
int main(int argc, char *argv[])
{
TDEApplication app(argc,argv,"kiconloadertest"/*,false,false*/);
TDEApplication app(argc,argv,TQCString("kiconloadertest")/*,false,false*/);
TDEIconLoader * mpLoader = TDEGlobal::iconLoader();
TDEIcon::Context mContext = TDEIcon::Application;

@ -18,7 +18,7 @@ MyObject::MyObject()
int main(int argc, char **argv)
{
TDEApplication app(argc, argv, "kipc");
TDEApplication app(argc, argv, TQCString("kipc"));
if (argc == 3)
{

@ -100,7 +100,7 @@ void Test::createFields()
int main( int argc, char ** argv )
{
TDELocale::setMainCatalogue("tdelibs");
TDEApplication a( argc, argv, "klocaletest" );
TDEApplication a( argc, argv, TQCString("klocaletest") );
TDEGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
TDEGlobal::locale()->setCountry(TQString::fromLatin1("C"));

@ -235,7 +235,7 @@ int main(int argc, char *argv[])
}
// showMem("second");
TDEApplication app(argc,argv,"kurltest");
TDEApplication app(argc,argv,TQCString("kurltest"));
// showMem("After TDEApplication constructor");

@ -3,7 +3,7 @@
int main( int argc, char **argv )
{
TDEApplication app( argc, argv, "knotifytest" );
TDEApplication app( argc, argv, TQCString("knotifytest") );
KNotifyClient::userEvent( "This is a notification to notify you :)",
KNotifyClient::Messagebox,
KNotifyClient::Error );

@ -34,7 +34,7 @@ int main(int argc, char *argv[])
{
TDEProcess p1, p2, p3, p4;
Dummy dummy;
TDEApplication app(argc, argv, "kprocesstest");
TDEApplication app(argc, argv, TQCString("kprocesstest"));
printf("Welcome to the TDEProcess Demo Application!\n");

@ -32,7 +32,7 @@ werke\nmerkt\nich\nund\nden\nbrauch\nund\nmit\ngeistesstaerke\ntu\nich\nwunder\n
int main(int argc, char *argv[])
{
Dummy dummy;
TDEApplication app(argc, argv, "kprociotest");
TDEApplication app(argc, argv, TQCString("kprociotest"));
printf("Welcome to the KProcIO Demo Application!\n");

@ -26,7 +26,7 @@
int
main(int argc, char *argv[])
{
TDEApplication a(argc, argv, "krandomsequencetest");
TDEApplication a(argc, argv, TQCString("krandomsequencetest"));
long seed;
KRandomSequence seq;

@ -176,17 +176,17 @@ bool testKernel()
printf("succeeded\n");
if (getsockname(sock, (struct sockaddr*)&sin6, &len) == 0)
printf("\tSize of kernel's sockaddr_in6 is %d bytes\n", len);
printf("\tSize of kernel's sockaddr_in6 is %lu bytes\n", (unsigned long)len);
else
printf("\tCould not get socket name\n");
}
printf("\tSize of TDE's internal sockaddr_in6 is %d bytes\n",
sizeof(kde_sockaddr_in6));
printf("\tSize of TDE's internal sockaddr_in6 is %lu bytes\n",
(unsigned long)sizeof(kde_sockaddr_in6));
# ifdef HAVE_SOCKADDR_IN6
printf("\tSize of system libraries' sockaddr_in6 is %d bytes\n",
sizeof(sockaddr_in6));
printf("\tSize of system libraries' sockaddr_in6 is %lu bytes\n",
(unsigned long)sizeof(sockaddr_in6));
# else
printf("\tSystem libraries don't define sockaddr_in6\n");
# endif

@ -2,7 +2,7 @@
#include <iostream>
static QCString
static TQCString
ps(const TQString &s)
{
if (s.isNull())

@ -20,7 +20,7 @@
int main( int argc, char **argv )
{
TDEApplication a( argc, argv, "tdeconfigtest" );
TDEApplication a( argc, argv, TQCString("tdeconfigtest") );
KSimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" );

@ -1,5 +1,6 @@
#include "kstringhandler.h"
#include <iostream>
#include <cstdlib>
using std::cout;
using std::endl;

@ -28,7 +28,7 @@
int
main(int argc, char *argv[])
{
TDEApplication a(argc, argv, "ktempfiletest");
TDEApplication a(argc, argv, TQCString("ktempfiletest"));
printf("Making tempfile after TDEApplication constructor.\n");
KTempFile f4;
printf("Filename = %s\n", f4.name().ascii());

@ -20,7 +20,7 @@ int main(int argc, char *argv[])
printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::currentDateTime()) );
// Find some offsets for Europe/London.
char *london = "Europe/London";
const char *london = "Europe/London";
timezone = timezones.zone(london);
TQDateTime winter(TQDateTime::fromString("2005-01-01T00:00:00", Qt::ISODate));
TQDateTime summer(TQDateTime::fromString("2005-06-01T00:00:00", Qt::ISODate));
@ -29,10 +29,10 @@ int main(int argc, char *argv[])
// Try timezone conversions.
const KTimezone *losAngeles = timezones.zone("America/Los_Angeles");
char *bstBeforePdt = "2005-03-28T00:00:00";
char *bstAfterPdt = "2005-05-01T00:00:00";
char *gmtBeforePst = "2005-10-30T01:00:00";
char *gmtAfterPst = "2005-12-01T00:00:00";
const char *bstBeforePdt = "2005-03-28T00:00:00";
const char *bstAfterPdt = "2005-05-01T00:00:00";
const char *gmtBeforePst = "2005-10-30T01:00:00";
const char *gmtAfterPst = "2005-12-01T00:00:00";
TQString result;
result = timezone->convert(losAngeles, TQDateTime::fromString(bstBeforePdt, Qt::ISODate)).toString(Qt::ISODate);
printf( "BST before PDT, %s should be 2005-03-27T15:00:00: %s\n", bstBeforePdt, result.latin1() );

@ -192,7 +192,7 @@ void TDEConfigTestView::writeButtonClicked()
int main( int argc, char **argv )
{
TDEApplication a( argc, argv, "bla" );
TDEApplication a( argc, argv, TQCString ("bla") );
TDEConfigTestView *w = new TDEConfigTestView();
a.setMainWidget( w );

Loading…
Cancel
Save