summaryrefslogtreecommitdiffstats
path: root/lib/store/tests
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-16 09:56:31 -0600
committerTimothy Pearson <[email protected]>2011-12-16 09:56:31 -0600
commitc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch)
tree1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /lib/store/tests
parent94844816550ad672ccfcdc25659c625546239998 (diff)
downloadkoffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz
koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'lib/store/tests')
-rw-r--r--lib/store/tests/storedroptest.cpp12
-rw-r--r--lib/store/tests/xmlwritertest.cpp16
-rw-r--r--lib/store/tests/xmlwritertest.h4
3 files changed, 16 insertions, 16 deletions
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 <kapplication.h>
#include <kcmdlineargs.h>
#include <KoStore.h>
-#include <textbrowser.h>
+#include <tqtextbrowser.h>
#include <tqstringlist.h>
#include <tqbuffer.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
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", "<r>\n"
" <p><text:s text:c=\"3\"/><text:tab/><text:line-break/> foo<text:s text:c=\"2\"/></p>\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", "<r>\n"
" <p><?opendocument foobar?>foo</p>\n"
"</r>\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", "<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
@@ -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 = "<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( 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", "<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"
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*/ \