summaryrefslogtreecommitdiffstats
path: root/parts/bookmarks
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/bookmarks
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-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')
-rw-r--r--parts/bookmarks/bookmarks_part.cpp36
-rw-r--r--parts/bookmarks/bookmarks_part.h5
-rw-r--r--parts/bookmarks/bookmarks_settings.cpp4
-rw-r--r--parts/bookmarks/bookmarks_settings.h3
-rw-r--r--parts/bookmarks/bookmarks_settings_base.ui34
-rw-r--r--parts/bookmarks/bookmarks_widget.cpp18
-rw-r--r--parts/bookmarks/bookmarks_widget.h3
7 files changed, 53 insertions, 50 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();
}
diff --git a/parts/bookmarks/bookmarks_part.h b/parts/bookmarks/bookmarks_part.h
index 3f1973ca..850e1aef 100644
--- a/parts/bookmarks/bookmarks_part.h
+++ b/parts/bookmarks/bookmarks_part.h
@@ -32,7 +32,7 @@ class ConfigWidgetProxy;
struct EditorData
{
KURL url;
- TQValueList< QPair<int,TQString> > marks;
+ TQValueList< TQPair<int,TQString> > marks;
};
class BookmarksWidget;
@@ -41,10 +41,11 @@ class TQDomElement;
class BookmarksPart : public KDevPlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- BookmarksPart(TQObject *parent, const char *name, const TQStringList &);
+ BookmarksPart(TQObject *tqparent, const char *name, const TQStringList &);
~BookmarksPart();
// reimplemented from KDevPlugin
diff --git a/parts/bookmarks/bookmarks_settings.cpp b/parts/bookmarks/bookmarks_settings.cpp
index 58369d92..5fecbc4e 100644
--- a/parts/bookmarks/bookmarks_settings.cpp
+++ b/parts/bookmarks/bookmarks_settings.cpp
@@ -19,8 +19,8 @@
#include "bookmarks_settings.h"
-BookmarkSettings::BookmarkSettings( BookmarksPart * part, TQWidget* parent, const char* name, WFlags fl )
-: BookmarkSettingsBase( parent, name, fl ), m_part( part )
+BookmarkSettings::BookmarkSettings( BookmarksPart * part, TQWidget* tqparent, const char* name, WFlags fl )
+: BookmarkSettingsBase( tqparent, name, fl ), m_part( part )
{
m_part->config()->readConfig();
diff --git a/parts/bookmarks/bookmarks_settings.h b/parts/bookmarks/bookmarks_settings.h
index 699941ca..aa517db1 100644
--- a/parts/bookmarks/bookmarks_settings.h
+++ b/parts/bookmarks/bookmarks_settings.h
@@ -19,9 +19,10 @@ class BookmarksPart;
class BookmarkSettings : public BookmarkSettingsBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- BookmarkSettings( BookmarksPart * part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ BookmarkSettings( BookmarksPart * part, TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~BookmarkSettings();
public slots:
diff --git a/parts/bookmarks/bookmarks_settings_base.ui b/parts/bookmarks/bookmarks_settings_base.ui
index 2d7ab1a2..3e3c1cad 100644
--- a/parts/bookmarks/bookmarks_settings_base.ui
+++ b/parts/bookmarks/bookmarks_settings_base.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>BookmarkSettingsBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>BookmarkSettingsBase</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -30,7 +30,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBox1</cstring>
</property>
@@ -47,15 +47,15 @@
<string></string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -69,7 +69,7 @@
<string></string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>spinBox1</cstring>
</property>
@@ -96,7 +96,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>121</width>
<height>20</height>
@@ -107,7 +107,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -121,7 +121,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioButton1</cstring>
</property>
@@ -135,15 +135,15 @@
<string></string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioButton2</cstring>
</property>
@@ -172,7 +172,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>71</width>
<height>20</height>
@@ -181,7 +181,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>radioButton3</cstring>
</property>
@@ -204,7 +204,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>240</height>
@@ -233,7 +233,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
</includehints>
diff --git a/parts/bookmarks/bookmarks_widget.cpp b/parts/bookmarks/bookmarks_widget.cpp
index 20ab2cd9..9ae51f19 100644
--- a/parts/bookmarks/bookmarks_widget.cpp
+++ b/parts/bookmarks/bookmarks_widget.cpp
@@ -56,16 +56,16 @@ static const char* const bookmark_xpm[]={
}
-class BookmarkItem : public QListViewItem
+class BookmarkItem : public TQListViewItem
{
public:
- BookmarkItem( TQListView * parent, KURL const & url )
- : TQListViewItem( parent, url.fileName() ),
+ BookmarkItem( TQListView * tqparent, KURL const & url )
+ : TQListViewItem( tqparent, url.fileName() ),
_url( url ), _line( -1 ), _isBookmark( false )
{}
- BookmarkItem( TQListViewItem * parent, KURL const & url, QPair<int,TQString> mark )
- : TQListViewItem( parent, TQString::number( mark.first +1 ).rightJustify( 5 ) ),
+ BookmarkItem( TQListViewItem * tqparent, KURL const & url, TQPair<int,TQString> mark )
+ : TQListViewItem( tqparent, TQString::number( mark.first +1 ).rightJustify( 5 ) ),
_url( url ), _line( mark.first ), _isBookmark( true )
{
BookmarksWidget * lv = static_cast<BookmarksWidget*>( listView() );
@@ -143,7 +143,7 @@ BookmarksWidget::BookmarksWidget(BookmarksPart *part)
_part( part )
{
- addColumn( TQString::null );
+ addColumn( TQString() );
header()->hide();
setRootIsDecorated( true );
setResizeMode( TQListView::LastColumn );
@@ -167,7 +167,7 @@ void BookmarksWidget::maybeTip(const TQPoint &p)
if ( ! _part->config()->toolTip() ) return;
BookmarkItem * item = dynamic_cast<BookmarkItem*>( itemAt( p ) );
- TQRect r = itemRect( item );
+ TQRect r = tqitemRect( item );
if ( item && r.isValid() )
{
@@ -196,7 +196,7 @@ void BookmarksWidget::updateURL( EditorData * data )
{
// kdDebug(0) << "BookmarksWidget::updateURL()" << endl;
- // remove the node that contains 'data'
+ // remove the node that tqcontains 'data'
removeURL( data->url );
// create it again with new data
@@ -213,7 +213,7 @@ void BookmarksWidget::createURL( EditorData * data )
file->setOpen( true );
file->setPixmap( 0, SmallIcon( "document" ) );
- TQValueListIterator< QPair<int,TQString> > it = data->marks.begin();
+ TQValueListIterator< TQPair<int,TQString> > it = data->marks.begin();
while ( it != data->marks.end() )
{
TQListViewItem * item = new BookmarkItem( file, data->url, *it );
diff --git a/parts/bookmarks/bookmarks_widget.h b/parts/bookmarks/bookmarks_widget.h
index 6af0b563..43752d1a 100644
--- a/parts/bookmarks/bookmarks_widget.h
+++ b/parts/bookmarks/bookmarks_widget.h
@@ -26,9 +26,10 @@ class BookmarksPart;
class BookmarkItem;
class BookmarksConfig;
-class BookmarksWidget : public KListView, public QToolTip
+class BookmarksWidget : public KListView, public TQToolTip
{
Q_OBJECT
+ TQ_OBJECT
public:
BookmarksWidget( BookmarksPart * );