diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/bookmarks/bookmarks_part.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/bookmarks/bookmarks_part.cpp')
-rw-r--r-- | parts/bookmarks/bookmarks_part.cpp | 36 |
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(); } |