summaryrefslogtreecommitdiffstats
path: root/parts/bookmarks/bookmarks_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/bookmarks/bookmarks_part.cpp')
-rw-r--r--parts/bookmarks/bookmarks_part.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/parts/bookmarks/bookmarks_part.cpp b/parts/bookmarks/bookmarks_part.cpp
index 50830723..7646cc76 100644
--- a/parts/bookmarks/bookmarks_part.cpp
+++ b/parts/bookmarks/bookmarks_part.cpp
@@ -44,8 +44,8 @@ typedef KDevGenericFactory<BookmarksPart> BookmarksFactory;
static const KDevPluginInfo data("kdevbookmarks");
K_EXPORT_COMPONENT_FACTORY( libkdevbookmarks, BookmarksFactory( data ) )
-BookmarksPart::BookmarksPart(TQObject *parent, const char *name, const TQStringList& )
- : KDevPlugin(&data, parent, name ? name : "BookmarksPart" )
+BookmarksPart::BookmarksPart(TQObject *tqparent, const char *name, const TQStringList& )
+ : KDevPlugin(&data, tqparent, name ? name : "BookmarksPart" )
{
setInstance(BookmarksFactory::instance());
@@ -105,7 +105,7 @@ void BookmarksPart::partAdded( KParts::Part * part )
if ( setBookmarksForURL( ro_part ) )
{
updateContextStringForURL( ro_part );
- if ( EditorData * data = _editorMap.find( ro_part->url().path() ) )
+ if ( EditorData * data = _editorMap.tqfind( ro_part->url().path() ) )
{
_widget->updateURL( data );
}
@@ -124,7 +124,7 @@ void BookmarksPart::reload()
{
//kdDebug(0) << "BookmarksPart::reload()" << endl;
- TQObject * senderobj = const_cast<TQObject*>( sender() );
+ TQObject * senderobj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() ));
if ( KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart *>( senderobj ) )
{
if ( partIsSane( ro_part ) )
@@ -140,10 +140,10 @@ void BookmarksPart::marksEvent()
if ( ! _settingMarks )
{
- TQObject * senderobj = const_cast<TQObject*>( sender() );
+ TQObject * senderobj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() ));
KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart *>( senderobj );
- if ( partIsSane( ro_part ) && !_dirtyParts.contains( ro_part ) )
+ if ( partIsSane( ro_part ) && !_dirtyParts.tqcontains( ro_part ) )
{
_dirtyParts.push_back( ro_part );
_marksChangeTimer->start( 1000, true );
@@ -192,7 +192,7 @@ void BookmarksPart::restorePartialProjectSession( const TQDomElement * el )
while ( ! bookmark.isNull() )
{
TQString path = bookmark.attribute( "url" );
- if ( path != TQString::null )
+ if ( path != TQString() )
{
EditorData * data = new EditorData;
data->url.setPath( path );
@@ -201,9 +201,9 @@ void BookmarksPart::restorePartialProjectSession( const TQDomElement * el )
while ( ! mark.isNull() )
{
TQString line = mark.attribute( "line" );
- if ( line != TQString::null )
+ if ( line != TQString() )
{
- data->marks.append( qMakePair( line.toInt(), TQString() ) );
+ data->marks.append( tqMakePair( line.toInt(), TQString() ) );
}
mark = mark.nextSibling().toElement();
}
@@ -242,7 +242,7 @@ void BookmarksPart::savePartialProjectSession( TQDomElement * el )
bookmark.setAttribute( "url", it.current()->url.path() );
bookmarksList.appendChild( bookmark );
- TQValueListIterator< QPair<int,TQString> > it2 = it.current()->marks.begin();
+ TQValueListIterator< TQPair<int,TQString> > it2 = it.current()->marks.begin();
while ( it2 != it.current()->marks.end() )
{
TQDomElement line = domDoc.createElement( "mark" );
@@ -273,9 +273,9 @@ void BookmarksPart::removeBookmarkForURL( KURL const & url, int line )
{
//kdDebug(0) << "BookmarksPart::removeBookmarkForURL()" << endl;
- if ( EditorData * data = _editorMap.find( url.path() ) )
+ if ( EditorData * data = _editorMap.tqfind( url.path() ) )
{
- TQValueListIterator< QPair<int,TQString> > it = data->marks.begin();
+ TQValueListIterator< TQPair<int,TQString> > it = data->marks.begin();
while ( it != data->marks.end() )
{
if ( (*it).first == line )
@@ -305,11 +305,11 @@ void BookmarksPart::updateContextStringForURL( KParts::ReadOnlyPart * ro_part )
KTextEditor::EditInterface * ed =
dynamic_cast<KTextEditor::EditInterface *>( ro_part );
- EditorData * data = _editorMap.find( ro_part->url().path() );
+ EditorData * data = _editorMap.tqfind( ro_part->url().path() );
if ( ! ( data && ed ) ) return;
- TQValueListIterator< QPair<int,TQString> > it = data->marks.begin();
+ TQValueListIterator< TQPair<int,TQString> > it = data->marks.begin();
while ( it != data->marks.end() )
{
(*it).second = ed->textLine( (*it).first );
@@ -343,11 +343,11 @@ bool BookmarksPart::setBookmarksForURL( KParts::ReadOnlyPart * ro_part )
_settingMarks = true;
- if ( EditorData * data = _editorMap.find( ro_part->url().path() ) )
+ if ( EditorData * data = _editorMap.tqfind( ro_part->url().path() ) )
{
// we've seen this one before, apply stored bookmarks
- TQValueListIterator< QPair<int,TQString> > it = data->marks.begin();
+ TQValueListIterator< TQPair<int,TQString> > it = data->marks.begin();
while ( it != data->marks.end() )
{
mi->addMark( (*it).first, KTextEditor::MarkInterface::markType01 );
@@ -409,7 +409,7 @@ EditorData * BookmarksPart::storeBookmarksForURL( KParts::ReadOnlyPart * ro_part
if ( it.current()->type & KTextEditor::MarkInterface::markType01 )
{
int line = it.current()->line;
- data->marks.append( qMakePair( line, TQString() ) );
+ data->marks.append( tqMakePair( line, TQString() ) );
}
++it;
}
@@ -479,7 +479,7 @@ KParts::ReadOnlyPart * BookmarksPart::partForURL( KURL const & url )
bool BookmarksPart::partIsSane( KParts::ReadOnlyPart * ro_part )
{
return ( ro_part != 0 ) &&
- partController()->parts()->contains( ro_part) &&
+ partController()->parts()->tqcontains( ro_part) &&
!ro_part->url().path().isEmpty();
}