From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/store/tests/xmlwritertest.cpp | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'lib/store/tests/xmlwritertest.cpp') diff --git a/lib/store/tests/xmlwritertest.cpp b/lib/store/tests/xmlwritertest.cpp index dad86f8f4..28bd3b088 100644 --- a/lib/store/tests/xmlwritertest.cpp +++ b/lib/store/tests/xmlwritertest.cpp @@ -2,19 +2,19 @@ #include "KoXmlWriter.h" -#include -#include -#include +#include +#include +#include static const int numParagraphs = 30000; void speedTest() { - QTime time; + TQTime time; time.start(); - QString paragText = QString::fromUtf8( "This is the text of the paragraph. I'm including a euro sign to test encoding issues: €" ); - QCString styleName = "Heading 1"; + 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"; - QFile out( QString::fromLatin1( "out5.xml" ) ); + TQFile out( TQString::tqfromLatin1( "out5.xml" ) ); if ( out.open(IO_WriteOnly) ) { KoXmlWriter writer( &out ); @@ -35,7 +35,7 @@ void speedTest() } int main( int argc, char** argv ) { - QApplication app( argc, argv, QApplication::Tty ); + TQApplication app( argc, argv, TQApplication::Tty ); TEST_BEGIN( 0, 0 ); TEST_END( "framework test", "\n" ); @@ -78,7 +78,7 @@ int main( int argc, char** argv ) { TEST_BEGIN( 0, 0 ); writer.startElement( "p", false /*no indent*/ ); - writer.addTextSpan( QString::fromLatin1( " \t\n foo " ) ); + writer.addTextSpan( TQString::tqfromLatin1( " \t\n foo " ) ); writer.endElement(); TEST_END( "textspan test", "\n" "

foo

\n" @@ -86,9 +86,9 @@ int main( int argc, char** argv ) { TEST_BEGIN( 0, 0 ); writer.startElement( "p", false /*no indent*/ ); - QMap tabCache; + TQMap tabCache; tabCache.insert( 3, 0 ); - writer.addTextSpan( QString::fromUtf8( " \t\n foö " ), tabCache ); + writer.addTextSpan( TQString::fromUtf8( " \t\n foö " ), tabCache ); writer.endElement(); TEST_END( "textspan with tabcache", "\n" "

foö

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

foo

\n" "
\n" ); TEST_BEGIN( 0, 0 ); - writer.addManifestEntry( QString::fromLatin1( "foo/bar/blah" ), QString::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 - QCString x( sz ); + TQCString x( sz ); x.fill( 'x', sz ); x += '&'; - QCString expected = "\n"; TEST_BEGIN( 0, 0 ); writer.addAttribute( "a", x ); TEST_END( "escaping long cstring", expected.data() ); - QString longPath; + TQString longPath; for ( uint i = 0 ; i < 1000 ; ++i ) - longPath += QString::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( QString::fromLatin1( "TestConfigBool" ), val ); - writer.addConfigItem( QString::fromLatin1( "TestConfigInt" ), num ); - writer.addConfigItem( QString::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" -- cgit v1.2.3