summaryrefslogtreecommitdiffstats
path: root/kio/bookmarks/kbookmarkdrag.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kio/bookmarks/kbookmarkdrag.cc')
-rw-r--r--kio/bookmarks/kbookmarkdrag.cc58
1 files changed, 29 insertions, 29 deletions
diff --git a/kio/bookmarks/kbookmarkdrag.cc b/kio/bookmarks/kbookmarkdrag.cc
index 3e1db9c15..d13893eed 100644
--- a/kio/bookmarks/kbookmarkdrag.cc
+++ b/kio/bookmarks/kbookmarkdrag.cc
@@ -22,16 +22,16 @@
#include <kurldrag.h>
#include <kdebug.h>
-KBookmarkDrag * KBookmarkDrag::newDrag( const QValueList<KBookmark> & bookmarks, QWidget * dragSource, const char * name )
+KBookmarkDrag * KBookmarkDrag::newDrag( const TQValueList<KBookmark> & bookmarks, TQWidget * dragSource, const char * name )
{
KURL::List urls;
- for ( QValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
+ for ( TQValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
urls.append( (*it).url() );
}
// See KURLDrag::newDrag
- QStrList uris;
+ TQStrList uris;
KURL::List::ConstIterator uit = urls.begin();
KURL::List::ConstIterator uEnd = urls.end();
// Get each URL encoded in utf8 - and since we get it in escaped
@@ -42,24 +42,24 @@ KBookmarkDrag * KBookmarkDrag::newDrag( const QValueList<KBookmark> & bookmarks,
return new KBookmarkDrag( bookmarks, uris, dragSource, name );
}
-KBookmarkDrag * KBookmarkDrag::newDrag( const KBookmark & bookmark, QWidget * dragSource, const char * name )
+KBookmarkDrag * KBookmarkDrag::newDrag( const KBookmark & bookmark, TQWidget * dragSource, const char * name )
{
- QValueList<KBookmark> bookmarks;
+ TQValueList<KBookmark> bookmarks;
bookmarks.append( KBookmark(bookmark) );
return newDrag(bookmarks, dragSource, name);
}
-KBookmarkDrag::KBookmarkDrag( const QValueList<KBookmark> & bookmarks, const QStrList & urls,
- QWidget * dragSource, const char * name )
- : QUriDrag( urls, dragSource, name ), m_bookmarks( bookmarks ), m_doc("xbel")
+KBookmarkDrag::KBookmarkDrag( const TQValueList<KBookmark> & bookmarks, const TQStrList & urls,
+ TQWidget * dragSource, const char * name )
+ : TQUriDrag( urls, dragSource, name ), m_bookmarks( bookmarks ), m_doc("xbel")
{
// We need to create the XML for this drag right now and not
// in encodedData because when cutting a folder, the children
// wouldn't be part of the bookmarks anymore, when encodedData
// is requested.
- QDomElement elem = m_doc.createElement("xbel");
+ TQDomElement elem = m_doc.createElement("xbel");
m_doc.appendChild( elem );
- for ( QValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
+ for ( TQValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
elem.appendChild( (*it).internalElement().cloneNode( true /* deep */ ) );
}
//kdDebug(7043) << "KBookmarkDrag::KBookmarkDrag " << m_doc.toString() << endl;
@@ -76,12 +76,12 @@ const char* KBookmarkDrag::format( int i ) const
else return 0;
}
-QByteArray KBookmarkDrag::encodedData( const char* mime ) const
+TQByteArray KBookmarkDrag::encodedData( const char* mime ) const
{
- QByteArray a;
- QCString mimetype( mime );
+ TQByteArray a;
+ TQCString mimetype( mime );
if ( mimetype == "text/uri-list" )
- return QUriDrag::encodedData( mime );
+ return TQUriDrag::encodedData( mime );
else if ( mimetype == "application/x-xbel" )
{
a = m_doc.toCString();
@@ -92,13 +92,13 @@ QByteArray KBookmarkDrag::encodedData( const char* mime ) const
KURL::List m_lstDragURLs;
if ( KURLDrag::decode( this, m_lstDragURLs ) )
{
- QStringList uris;
+ TQStringList uris;
KURL::List::ConstIterator uit = m_lstDragURLs.begin();
KURL::List::ConstIterator uEnd = m_lstDragURLs.end();
for ( ; uit != uEnd ; ++uit )
uris.append( (*uit).prettyURL() );
- QCString s = uris.join( "\n" ).local8Bit();
+ TQCString s = uris.join( "\n" ).local8Bit();
a.resize( s.length() + 1 ); // trailing zero
memcpy( a.data(), s.data(), s.length() + 1 );
}
@@ -106,23 +106,23 @@ QByteArray KBookmarkDrag::encodedData( const char* mime ) const
return a;
}
-bool KBookmarkDrag::canDecode( const QMimeSource * e )
+bool KBookmarkDrag::canDecode( const TQMimeSource * e )
{
return e->provides("text/uri-list") || e->provides("application/x-xbel") ||
e->provides("text/plain");
}
-QValueList<KBookmark> KBookmarkDrag::decode( const QMimeSource * e )
+TQValueList<KBookmark> KBookmarkDrag::decode( const TQMimeSource * e )
{
- QValueList<KBookmark> bookmarks;
+ TQValueList<KBookmark> bookmarks;
if ( e->provides("application/x-xbel") )
{
- QByteArray s( e->encodedData("application/x-xbel") );
- //kdDebug(7043) << "KBookmarkDrag::decode s=" << QCString(s) << endl;
- QDomDocument doc;
+ TQByteArray s( e->encodedData("application/x-xbel") );
+ //kdDebug(7043) << "KBookmarkDrag::decode s=" << TQCString(s) << endl;
+ TQDomDocument doc;
doc.setContent( s );
- QDomElement elem = doc.documentElement();
- QDomNodeList children = elem.childNodes();
+ TQDomElement elem = doc.documentElement();
+ TQDomNodeList children = elem.childNodes();
for ( uint childno = 0; childno < children.count(); childno++)
{
bookmarks.append( KBookmark( children.item(childno).cloneNode(true).toElement() ));
@@ -149,13 +149,13 @@ QValueList<KBookmark> KBookmarkDrag::decode( const QMimeSource * e )
if( e->provides("text/plain") )
{
//kdDebug(7043) << "KBookmarkDrag::decode text/plain" << endl;
- QString s;
- if(QTextDrag::decode( e, s ))
+ TQString s;
+ if(TQTextDrag::decode( e, s ))
{
- QStringList listDragURLs = QStringList::split(QChar('\n'), s);
- QStringList::ConstIterator it = listDragURLs.begin();
- QStringList::ConstIterator end = listDragURLs.end();
+ TQStringList listDragURLs = TQStringList::split(TQChar('\n'), s);
+ TQStringList::ConstIterator it = listDragURLs.begin();
+ TQStringList::ConstIterator end = listDragURLs.end();
for( ; it!=end; ++it)
{
//kdDebug(7043)<<"KBookmarkDrag::decode string"<<(*it)<<endl;