diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
commit | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch) | |
tree | 1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /lib/store | |
parent | 94844816550ad672ccfcdc25659c625546239998 (diff) | |
download | koffice-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')
-rw-r--r-- | lib/store/KoDirectoryStore.cpp | 2 | ||||
-rw-r--r-- | lib/store/KoStoreDrag.h | 2 | ||||
-rw-r--r-- | lib/store/KoXmlWriter.cpp | 4 | ||||
-rw-r--r-- | lib/store/KoXmlWriter.h | 2 | ||||
-rw-r--r-- | lib/store/tests/storedroptest.cpp | 12 | ||||
-rw-r--r-- | lib/store/tests/xmlwritertest.cpp | 16 | ||||
-rw-r--r-- | lib/store/tests/xmlwritertest.h | 4 |
7 files changed, 21 insertions, 21 deletions
diff --git a/lib/store/KoDirectoryStore.cpp b/lib/store/KoDirectoryStore.cpp index 894a7b39..76e5aa72 100644 --- a/lib/store/KoDirectoryStore.cpp +++ b/lib/store/KoDirectoryStore.cpp @@ -72,7 +72,7 @@ bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode ) return false; } m_stream = TQT_TQIODEVICE(new TQFile( m_basePath + name )); - if ( !m_stream->open( iomode ) ) + if ( !m_stream->tqopen( iomode ) ) { delete m_stream; m_stream = 0L; diff --git a/lib/store/KoStoreDrag.h b/lib/store/KoStoreDrag.h index e35709e7..cbd8c40d 100644 --- a/lib/store/KoStoreDrag.h +++ b/lib/store/KoStoreDrag.h @@ -27,7 +27,7 @@ * This allows to drag-n-drop and copy-paste complex koffice objects. * As per usual with dragobjects, an instance of KoStoreDrag must be * created on the "sending" side (dragging or copying). The "receiving" - * side (dropping or pasting) only uses provides()/canDecode() and encodedData(). + * side (dropping or pasting) only uses provides()/canDecode() and tqencodedData(). * * To create the data in memory, create a TQBuffer, * then KoStore::createStore( theBuffer, .... ), save the diff --git a/lib/store/KoXmlWriter.cpp b/lib/store/KoXmlWriter.cpp index 6c3459f4..f3568606 100644 --- a/lib/store/KoXmlWriter.cpp +++ b/lib/store/KoXmlWriter.cpp @@ -104,7 +104,7 @@ void KoXmlWriter::startElement( const char* tagName, bool indentInside ) { Q_ASSERT( tagName != 0 ); - // Tell parent that it has children + // Tell parent that it has tqchildren bool parentIndent = prepareForChild(); m_tags.push( Tag( tagName, parentIndent && indentInside ) ); @@ -387,7 +387,7 @@ void KoXmlWriter::addTextSpan( const TQString& text, const TQMap<int, int>& tabC nrSpaces = 0; leadingSpace = false; } - switch ( ch.unicode() ) { + switch ( ch.tqunicode() ) { case '\t': if ( !str.isEmpty() ) addTextNode( str ); diff --git a/lib/store/KoXmlWriter.h b/lib/store/KoXmlWriter.h index eaf453d2..5261dd5f 100644 --- a/lib/store/KoXmlWriter.h +++ b/lib/store/KoXmlWriter.h @@ -226,7 +226,7 @@ private: : tagName( t ), hasChildren( false ), lastChildIsText( false ), openingTagClosed( false ), indentInside( ind ) {} const char* tagName; - bool hasChildren; ///< element or text children + bool hasChildren; ///< element or text tqchildren bool lastChildIsText; ///< last child is a text node bool openingTagClosed; ///< true once the '\>' in \<tag a="b"\> is written out bool indentInside; ///< whether to indent the contents of this tag 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*/ \ |