summaryrefslogtreecommitdiffstats
path: root/lib/store/tests/xmlwritertest.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/store/tests/xmlwritertest.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
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
Diffstat (limited to 'lib/store/tests/xmlwritertest.cpp')
-rw-r--r--lib/store/tests/xmlwritertest.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/store/tests/xmlwritertest.cpp b/lib/store/tests/xmlwritertest.cpp
index dad86f8f..28bd3b08 100644
--- a/lib/store/tests/xmlwritertest.cpp
+++ b/lib/store/tests/xmlwritertest.cpp
@@ -2,19 +2,19 @@
#include "KoXmlWriter.h"
-#include <qapplication.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
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", "<r/>\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", "<r>\n"
" <p><text:s text:c=\"3\"/><text:tab/><text:line-break/> foo<text:s text:c=\"2\"/></p>\n"
@@ -86,9 +86,9 @@ int main( int argc, char** argv ) {
TEST_BEGIN( 0, 0 );
writer.startElement( "p", false /*no indent*/ );
- QMap<int, int> tabCache;
+ TQMap<int, int> 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", "<r>\n"
" <p><text:s text:c=\"3\"/><text:tab text:tab-ref=\"1\"/><text:line-break/> foö<text:s text:c=\"2\"/></p>\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", "<r>\n"
" <p><?opendocument foobar?>foo</p>\n"
"</r>\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", "<r>\n <manifest:file-entry manifest:media-type=\"mime/type\" manifest:full-path=\"foo/bar/blah\"/>\n</r>\n" );
int sz = 15000; // must be more than KoXmlWriter::s_escapeBufferLen
- QCString x( sz );
+ TQCString x( sz );
x.fill( 'x', sz );
x += '&';
- QCString expected = "<r a=\"";
+ TQCString expected = "<r a=\"";
expected += x + "amp;\"/>\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 = "<r a=\"";
expected += longPath.utf8() + "\"/>\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", "<r>\n"
" <config:config-item config:name=\"TestConfigBool\" config:type=\"boolean\">true</config:config-item>\n"
" <config:config-item config:name=\"TestConfigInt\" config:type=\"int\">1</config:config-item>\n"