diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:35:07 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:35:07 -0600 |
commit | 703fb0c89c2eee56a1e613e67a446db9d4287929 (patch) | |
tree | dd8c5ca66075cd89c2638a2b48cf78386a9870a7 /tdecore/tests | |
parent | 818e7abec3d5d3809b6b77293558678371c16b71 (diff) | |
download | tdelibs-703fb0c89c2eee56a1e613e67a446db9d4287929.tar.gz tdelibs-703fb0c89c2eee56a1e613e67a446db9d4287929.zip |
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'tdecore/tests')
-rw-r--r-- | tdecore/tests/kconfigtest.cpp | 20 | ||||
-rw-r--r-- | tdecore/tests/kconfigtestgui.cpp | 26 | ||||
-rw-r--r-- | tdecore/tests/kconfigtestgui.h | 10 | ||||
-rw-r--r-- | tdecore/tests/kresolvertest.cpp | 2 | ||||
-rw-r--r-- | tdecore/tests/ksocktest.cpp | 2 | ||||
-rw-r--r-- | tdecore/tests/kstddirstest.cpp | 2 |
6 files changed, 31 insertions, 31 deletions
diff --git a/tdecore/tests/kconfigtest.cpp b/tdecore/tests/kconfigtest.cpp index 384a328cc..e4768119c 100644 --- a/tdecore/tests/kconfigtest.cpp +++ b/tdecore/tests/kconfigtest.cpp @@ -22,7 +22,7 @@ #include <kconfig.h> -class KConfigTest : public KUnitTest::Tester +class TDEConfigTest : public KUnitTest::Tester { public: void allTests(); @@ -31,8 +31,8 @@ private: void revertEntries(); }; -KUNITTEST_MODULE( kunittest_kconfig, "KConfigTest" ) -KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest ) +KUNITTEST_MODULE( kunittest_kconfig, "TDEConfigTest" ) +KUNITTEST_MODULE_REGISTER_TESTER( TDEConfigTest ) // test data #define BOOLENTRY1 true @@ -50,9 +50,9 @@ KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest ) #define DATETIMEENTRY TQDateTime( TQDate( 2002, 06, 23 ), TQTime( 12, 55, 40 ) ) #define STRINGLISTENTRY TQStringList( "Hello," ) -void KConfigTest::writeConfigFile() +void TDEConfigTest::writeConfigFile() { - KConfig sc( "kconfigtest" ); + TDEConfig sc( "kconfigtest" ); sc.setGroup("AAA"); sc.writeEntry("stringEntry1", STRINGENTRY1, true, true); @@ -86,10 +86,10 @@ void KConfigTest::writeConfigFile() } // ### TODO: call this, and test the state of things afterwards -void KConfigTest::revertEntries() +void TDEConfigTest::revertEntries() { tqWarning("Reverting entries"); - KConfig sc( "kconfigtest" ); + TDEConfig sc( "kconfigtest" ); sc.setGroup("Hello"); sc.revertToDefault( "boolEntry1"); @@ -105,13 +105,13 @@ void KConfigTest::revertEntries() sc.sync(); } -void KConfigTest::allTests() +void TDEConfigTest::allTests() { writeConfigFile(); - KConfig sc2( "kconfigtest" ); + TDEConfig sc2( "kconfigtest" ); - KConfigGroup sc3( &sc2, "AAA"); + TDEConfigGroup sc3( &sc2, "AAA"); bool bImmutable = sc3.entryIsImmutable("stringEntry1"); CHECK( bImmutable, false ); diff --git a/tdecore/tests/kconfigtestgui.cpp b/tdecore/tests/kconfigtestgui.cpp index 6f8c6e0e0..776082bfb 100644 --- a/tdecore/tests/kconfigtestgui.cpp +++ b/tdecore/tests/kconfigtestgui.cpp @@ -23,7 +23,7 @@ // // configtest.cpp: libKDEcore example // -// demonstrates use of KConfig class +// demonstrates use of TDEConfig class // // adapted from Qt widgets demo @@ -56,10 +56,10 @@ #endif // -// Construct the KConfigTestView with buttons +// Construct the TDEConfigTestView with buttons // -KConfigTestView::KConfigTestView( TQWidget *parent, const char *name ) +TDEConfigTestView::TDEConfigTestView( TQWidget *parent, const char *name ) : TQDialog( parent, name ), pConfig( 0L ), pFile( 0L ), @@ -67,7 +67,7 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name ) { // Set the window caption/title - setCaption( "KConfig test" ); + setCaption( "TDEConfig test" ); // Label and edit for the app config file pAppFileLabel = new TQLabel( this, "appconfiglabel" ); @@ -123,18 +123,18 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name ) pQuitButton->setGeometry( 340, 60, 60, 60 ); connect( pQuitButton, TQT_SIGNAL(clicked()), tqApp, TQT_SLOT(quit()) ); - // create a default KConfig object in order to be able to start right away - pConfig = new KConfig( TQString::null ); + // create a default TDEConfig object in order to be able to start right away + pConfig = new TDEConfig( TQString::null ); } -KConfigTestView::~KConfigTestView() +TDEConfigTestView::~TDEConfigTestView() { delete pConfig; delete pFile; delete pStream; } -void KConfigTestView::appConfigEditReturnPressed() +void TDEConfigTestView::appConfigEditReturnPressed() { // if there already was a config object, delete it and its associated data delete pConfig; @@ -146,12 +146,12 @@ void KConfigTestView::appConfigEditReturnPressed() // create a new config object if( !pAppFileEdit->text().isEmpty() ) - pConfig = new KConfig( pAppFileEdit->text() ); + pConfig = new TDEConfig( pAppFileEdit->text() ); pInfoLabel2->setText( "New config object created." ); } -void KConfigTestView::groupEditReturnPressed() +void TDEConfigTestView::groupEditReturnPressed() { pConfig->setGroup( pGroupEdit->text() ); // according to the Qt doc, this is begging for trouble, but for a @@ -162,7 +162,7 @@ void KConfigTestView::groupEditReturnPressed() pInfoLabel2->setText( aText ); } -void KConfigTestView::keyEditReturnPressed() +void TDEConfigTestView::keyEditReturnPressed() { TQString aValue = pConfig->readEntry( pKeyEdit->text() ); // just checking aValue.isNull() would be easier here, but this is @@ -181,7 +181,7 @@ void KConfigTestView::keyEditReturnPressed() } } -void KConfigTestView::writeButtonClicked() +void TDEConfigTestView::writeButtonClicked() { pConfig->writeEntry( pKeyEdit->text(), TQString( pValueEdit->text() ) ); pInfoLabel2->setText( "Entry written" ); @@ -194,7 +194,7 @@ int main( int argc, char **argv ) { TDEApplication a( argc, argv, "bla" ); - KConfigTestView *w = new KConfigTestView(); + TDEConfigTestView *w = new TDEConfigTestView(); a.setMainWidget( w ); return w->exec(); } diff --git a/tdecore/tests/kconfigtestgui.h b/tdecore/tests/kconfigtestgui.h index 7655c8142..f5bbfd659 100644 --- a/tdecore/tests/kconfigtestgui.h +++ b/tdecore/tests/kconfigtestgui.h @@ -36,15 +36,15 @@ #include <kconfig.h> // -// KConfigTestView contains lots of Qt widgets. +// TDEConfigTestView contains lots of Qt widgets. // -class KConfigTestView : public TQDialog +class TDEConfigTestView : public TQDialog { Q_OBJECT public: - KConfigTestView( TQWidget *parent=0, const char *name=0 ); - ~KConfigTestView(); + TDEConfigTestView( TQWidget *parent=0, const char *name=0 ); + ~TDEConfigTestView(); private slots: void appConfigEditReturnPressed(); @@ -64,7 +64,7 @@ private: TQLabel* pInfoLabel1, *pInfoLabel2; TQPushButton* pQuitButton; - KConfig* pConfig; + TDEConfig* pConfig; TQFile* pFile; TQTextStream* pStream; }; diff --git a/tdecore/tests/kresolvertest.cpp b/tdecore/tests/kresolvertest.cpp index c5640dc09..6e1a3080f 100644 --- a/tdecore/tests/kresolvertest.cpp +++ b/tdecore/tests/kresolvertest.cpp @@ -213,7 +213,7 @@ bool testKernel() printf("succeeded\n"); - KSocketAddress *ksin = KExtendedSocket::localAddress(sock); + TDESocketAddress *ksin = KExtendedSocket::localAddress(sock); if (ksin != NULL) { printf("\tWe got socket %s\n", (const char*)ksin->pretty().latin1()); diff --git a/tdecore/tests/ksocktest.cpp b/tdecore/tests/ksocktest.cpp index 48420acfc..e038cbd2c 100644 --- a/tdecore/tests/ksocktest.cpp +++ b/tdecore/tests/ksocktest.cpp @@ -100,7 +100,7 @@ main(int argc, char *argv[]) printf("FD %d\n", sock2->fd()); - KSocketAddress* addr = KExtendedSocket::peerAddress( sock2->fd() ); + TDESocketAddress* addr = KExtendedSocket::peerAddress( sock2->fd() ); check( "peerAddress:", addr->nodeName().latin1(), "213.203.58.36" ); check( "isEqual:", addr->isEqual(KInetSocketAddress("213.203.58.36", 80)) ? "TRUE" : "FALSE", "TRUE"); diff --git a/tdecore/tests/kstddirstest.cpp b/tdecore/tests/kstddirstest.cpp index 973402ffc..fa7191cce 100644 --- a/tdecore/tests/kstddirstest.cpp +++ b/tdecore/tests/kstddirstest.cpp @@ -8,7 +8,7 @@ int main(int argc, char **argv) { TDEApplication a(argc, argv, "whatever", false); KStandardDirs t; - KConfig config; // to add custom entries - a bit tricky :/ + TDEConfig config; // to add custom entries - a bit tricky :/ TQStringList list; TQString s; |