Initial add for check target for cmake

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 0c64a776dd)
v3.5.13-sru
Alexander Golubev 8 years ago committed by Slávek Banko
parent 9fde716a8c
commit f088e39885

@ -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( kconfig_compiler )
add_subdirectory( tests )
if( WITH_LIBART )
add_subdirectory( svgicons )

@ -47,7 +47,6 @@
#include "kaccelmanager_private.h"
#include "../kdeui/kstdaction_p.h"
#include "../kutils/kmultitabbar.h"
/*********************************************************************
@ -321,7 +320,7 @@ void KAcceleratorManagerPrivate::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->qt_cast("KMultiTabBar")))
dynamic_cast<TQSpinBox*>(w) || w->qt_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}/kdecore
${CMAKE_SOURCE_DIR}/kdecore
${CMAKE_SOURCE_DIR}/dcop
)
link_directories(
${TDECORE_LIBRARY_DIRS}
)
tde_add_library( kconfigtest SHARED AUTOMOC
SOURCES kconfigtest.cpp
LINK kunittest-shared
EXCLUDE_FROM_ALL
)
set( CHECKS
kconfigtestgui 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 kstdacceltest kglobaltest ktimezonestest
)
set( TESTS kurltest kstdacceltest )
foreach( _check ${CHECKS} )
tde_add_check_executable( ${_check} AUTOMOC LINK kconfigtest-shared )
endforeach( )
tde_add_check_executable( kidlservertest AUTOMOC SOURCES KIDLTest.cpp KIDLTest.skel
LINK kconfigtest-shared )
tde_add_check_executable( kidlclienttest AUTOMOC SOURCES KIDLTestClient.cpp
KIDLTest.stub LINK kconfigtest-shared )
foreach( _test ${TESTS})
add_test( ${_test} ${_test} )
endforeach( )

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

@ -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[])
{
KApplication app(argc,argv,"kiconloadertest"/*,false,false*/);
KApplication app(argc,argv,TQCString("kiconloadertest")/*,false,false*/);
KIconLoader * mpLoader = KGlobal::iconLoader();
KIcon::Context mContext = KIcon::Application;

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

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

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

@ -3,7 +3,7 @@
int main( int argc, char **argv )
{
KApplication app( argc, argv, "knotifytest" );
KApplication 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[])
{
KProcess p1, p2, p3, p4;
Dummy dummy;
KApplication app(argc, argv, "kprocesstest");
KApplication app(argc, argv, TQCString("kprocesstest"));
printf("Welcome to the KProcess 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;
KApplication app(argc, argv, "kprociotest");
KApplication app(argc, argv, TQCString("kprociotest"));
printf("Welcome to the KProcIO Demo Application!\n");

@ -26,7 +26,7 @@
int
main(int argc, char *argv[])
{
KApplication a(argc, argv, "krandomsequencetest");
KApplication 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 KDE's internal sockaddr_in6 is %d bytes\n",
sizeof(kde_sockaddr_in6));
printf("\tSize of KDE'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 )
{
KApplication a( argc, argv, "kconfigtest" );
KApplication a( argc, argv, TQCString("kconfigtest") );
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[])
{
KApplication a(argc, argv, "ktempfiletest");
KApplication a(argc, argv, TQCString("ktempfiletest"));
printf("Making tempfile after KApplication 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() );

Loading…
Cancel
Save