From c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:56:31 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 94844816550ad672ccfcdc25659c625546239998. --- lib/store/tests/storedroptest.cpp | 12 ++++++------ lib/store/tests/xmlwritertest.cpp | 16 ++++++++-------- lib/store/tests/xmlwritertest.h | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/store/tests') diff --git a/lib/store/tests/storedroptest.cpp b/lib/store/tests/storedroptest.cpp index f4b215ba..9da8d2d8 100644 --- a/lib/store/tests/storedroptest.cpp +++ b/lib/store/tests/storedroptest.cpp @@ -1,10 +1,10 @@ #include #include #include -#include +#include #include #include -#include +#include class StoreDropTest : public TQTextBrowser { @@ -65,7 +65,7 @@ void StoreDropTest::keyPressEvent( TQKeyEvent * e ) void StoreDropTest::paste() { qDebug( "paste" ); - TQMimeSource* m = TQApplication::clipboard()->data(); + TQMimeSource* m = TQApplication::tqclipboard()->data(); if ( !m ) return; processMimeSource( m ); @@ -88,7 +88,7 @@ bool StoreDropTest::processMimeSource( TQMimeSource* ev ) formats += fmt; bool oasis = TQString( fmt ).startsWith( acceptMimeType ); if ( oasis || TQString( fmt ) == "application/x-kpresenter" ) { - TQByteArray data = ev->encodedData( fmt ); + TQByteArray data = ev->tqencodedData( fmt ); showZipContents( data, fmt, oasis ); return true; } @@ -127,11 +127,11 @@ void StoreDropTest::showZipContents( TQByteArray data, const char* mimeType, boo TQString StoreDropTest::loadTextFile( KoStore* store, const TQString& fileName ) { if ( !store->open( fileName ) ) - return TQString( "%1 not found\n" ).arg( fileName ); + return TQString( "%1 not found\n" ).tqarg( fileName ); TQByteArray data = store->device()->readAll(); store->close(); - TQString txt = TQString( "Found %1: \n" ).arg( fileName ); + TQString txt = TQString( "Found %1: \n" ).tqarg( fileName ); txt += TQString::fromUtf8( data.data(), data.size() ); txt += "\n"; return txt; diff --git a/lib/store/tests/xmlwritertest.cpp b/lib/store/tests/xmlwritertest.cpp index e4280cec..28bd3b08 100644 --- a/lib/store/tests/xmlwritertest.cpp +++ b/lib/store/tests/xmlwritertest.cpp @@ -14,7 +14,7 @@ void speedTest() TQString paragText = TQString::fromUtf8( "This is the text of the paragraph. I'm including a euro sign to test encoding issues: €" ); TQCString styleName = "Heading 1"; - TQFile out( TQString::fromLatin1( "out5.xml" ) ); + TQFile out( TQString::tqfromLatin1( "out5.xml" ) ); if ( out.open(IO_WriteOnly) ) { KoXmlWriter writer( &out ); @@ -78,7 +78,7 @@ int main( int argc, char** argv ) { TEST_BEGIN( 0, 0 ); writer.startElement( "p", false /*no indent*/ ); - writer.addTextSpan( TQString::fromLatin1( " \t\n foo " ) ); + writer.addTextSpan( TQString::tqfromLatin1( " \t\n foo " ) ); writer.endElement(); TEST_END( "textspan test", "\n" "

foo

\n" @@ -97,14 +97,14 @@ int main( int argc, char** argv ) { TEST_BEGIN( 0, 0 ); writer.startElement( "p", false /*no indent*/ ); writer.addProcessingInstruction( "opendocument foobar" ); - writer.addTextSpan( TQString::fromLatin1( "foo" ) ); + writer.addTextSpan( TQString::tqfromLatin1( "foo" ) ); writer.endElement(); TEST_END( "processinginstruction test", "\n" "

foo

\n" "
\n" ); TEST_BEGIN( 0, 0 ); - writer.addManifestEntry( TQString::fromLatin1( "foo/bar/blah" ), TQString::fromLatin1( "mime/type" ) ); + writer.addManifestEntry( TQString::tqfromLatin1( "foo/bar/blah" ), TQString::tqfromLatin1( "mime/type" ) ); TEST_END( "addManifestEntry", "\n \n\n" ); int sz = 15000; // must be more than KoXmlWriter::s_escapeBufferLen @@ -119,7 +119,7 @@ int main( int argc, char** argv ) { TQString longPath; for ( uint i = 0 ; i < 1000 ; ++i ) - longPath += TQString::fromLatin1( "M10 10L20 20 " ); + longPath += TQString::tqfromLatin1( "M10 10L20 20 " ); expected = "\n"; TEST_BEGIN( 0, 0 ); @@ -131,9 +131,9 @@ int main( int argc, char** argv ) { bool val = true; int num = 1; double numdouble = 5.0; - writer.addConfigItem( TQString::fromLatin1( "TestConfigBool" ), val ); - writer.addConfigItem( TQString::fromLatin1( "TestConfigInt" ), num ); - writer.addConfigItem( TQString::fromLatin1( "TestConfigDouble" ), numdouble ); + writer.addConfigItem( TQString::tqfromLatin1( "TestConfigBool" ), val ); + writer.addConfigItem( TQString::tqfromLatin1( "TestConfigInt" ), num ); + writer.addConfigItem( TQString::tqfromLatin1( "TestConfigDouble" ), numdouble ); TEST_END( "test config", "\n" " true\n" " 1\n" diff --git a/lib/store/tests/xmlwritertest.h b/lib/store/tests/xmlwritertest.h index 12011c03..cdafe8a5 100644 --- a/lib/store/tests/xmlwritertest.h +++ b/lib/store/tests/xmlwritertest.h @@ -34,8 +34,8 @@ TQCString s2 = expectedFull; \ if ( s1.length() != s2.length() ) \ qDebug( "got length %d, expected %d", s1.length(), s2.length() ); \ - s1.replace( TQRegExp( TQString::fromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ - s2.replace( TQRegExp( TQString::fromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ + s1.replace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ + s2.replace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ qDebug( "%s", s1.data() ); \ qDebug( "Expected:\n%s", s2.data() ); \ return 1; /*exit*/ \ -- cgit v1.2.1