diff options
Diffstat (limited to 'parts/texttools')
-rw-r--r-- | parts/texttools/texttoolspart.cpp | 4 | ||||
-rw-r--r-- | parts/texttools/texttoolspart.h | 3 | ||||
-rw-r--r-- | parts/texttools/texttoolswidget.cpp | 50 | ||||
-rw-r--r-- | parts/texttools/texttoolswidget.h | 3 |
4 files changed, 31 insertions, 29 deletions
diff --git a/parts/texttools/texttoolspart.cpp b/parts/texttools/texttoolspart.cpp index 332d97e3..3697b89f 100644 --- a/parts/texttools/texttoolspart.cpp +++ b/parts/texttools/texttoolspart.cpp @@ -28,8 +28,8 @@ typedef KDevGenericFactory<TextToolsPart> TextToolsFactory; static const KDevPluginInfo data("kdevtexttools"); K_EXPORT_COMPONENT_FACTORY( libkdevtexttools, TextToolsFactory( data ) ) -TextToolsPart::TextToolsPart(TQObject *parent, const char *name, const TQStringList &) - : KDevPlugin(&data, parent, name ? name : "TextToolsPart") +TextToolsPart::TextToolsPart(TQObject *tqparent, const char *name, const TQStringList &) + : KDevPlugin(&data, tqparent, name ? name : "TextToolsPart") { setInstance(TextToolsFactory::instance()); // setXMLFile("kdevfileview.rc"); diff --git a/parts/texttools/texttoolspart.h b/parts/texttools/texttoolspart.h index ce348f6d..42443c48 100644 --- a/parts/texttools/texttoolspart.h +++ b/parts/texttools/texttoolspart.h @@ -22,9 +22,10 @@ class TextToolsWidget; class TextToolsPart : public KDevPlugin { Q_OBJECT + TQ_OBJECT public: - TextToolsPart( TQObject *parent, const char *name, const TQStringList & ); + TextToolsPart( TQObject *tqparent, const char *name, const TQStringList & ); ~TextToolsPart(); private slots: diff --git a/parts/texttools/texttoolswidget.cpp b/parts/texttools/texttoolswidget.cpp index 630609c5..1f7c9375 100644 --- a/parts/texttools/texttoolswidget.cpp +++ b/parts/texttools/texttoolswidget.cpp @@ -27,14 +27,14 @@ #include "texttoolspart.h" -class TextStructItem : public QListViewItem +class TextStructItem : public TQListViewItem { public: - TextStructItem(TQListView *parent) - : TQListViewItem(parent) + TextStructItem(TQListView *tqparent) + : TQListViewItem(tqparent) {} - TextStructItem(TQListViewItem *parent) - : TQListViewItem(parent) + TextStructItem(TQListViewItem *tqparent) + : TQListViewItem(tqparent) { TQListViewItem *item = this; while (item->nextSibling()) @@ -45,10 +45,10 @@ public: TQString text(int) const { - return extra.isNull()? tag : TQString("%1: %2").arg(tag).arg(extra); + return extra.isNull()? tag : TQString("%1: %2").tqarg(tag).tqarg(extra); } - TextStructItem *parentStructItem() - { return static_cast<TextStructItem*>(parent()); } + TextStructItem *tqparentStructItem() + { return static_cast<TextStructItem*>(tqparent()); } TQString tag; TQString extra; @@ -57,13 +57,13 @@ public: }; -TextToolsWidget::TextToolsWidget(TextToolsPart *part, TQWidget *parent, const char *name) - : KListView(parent, name) +TextToolsWidget::TextToolsWidget(TextToolsPart *part, TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { setResizeMode(TQListView::LastColumn); setSorting(-1); header()->hide(); - addColumn(TQString::null); + addColumn(TQString()); m_part = part; @@ -128,7 +128,7 @@ void TextToolsWidget::slotItemPressed(int button, TQListViewItem *item) cursorIface->setCursorPosition(line, col); } - if (button == MidButton) { + if (button == Qt::MidButton) { KTextEditor::SelectionInterface *selectionIface = dynamic_cast<KTextEditor::SelectionInterface*>(rwpart); if (selectionIface) { @@ -144,7 +144,7 @@ void TextToolsWidget::slotItemPressed(int button, TQListViewItem *item) void TextToolsWidget::slotReturnPressed(TQListViewItem *item) { - slotItemPressed(LeftButton, item); + slotItemPressed(Qt::LeftButton, item); } @@ -165,7 +165,7 @@ void TextToolsWidget::stop() disconnect( m_timer ); m_relevantTags.clear(); m_emptyTags.clear(); - m_cachedText = TQString::null; + m_cachedText = TQString(); } @@ -291,17 +291,17 @@ void TextToolsWidget::parseXML() ++endpos; } - if (!m_relevantTags.contains(tag)) { + if (!m_relevantTags.tqcontains(tag)) { pos = endpos; continue; } TextStructItem *closingItem = currentItem; - while (closingItem->parent() && closingItem->tag != tag) - closingItem = closingItem->parentStructItem(); - if (closingItem->parent()) { + while (closingItem->tqparent() && closingItem->tag != tag) + closingItem = closingItem->tqparentStructItem(); + if (closingItem->tqparent()) { closingItem->endpos = endpos; - currentItem = closingItem->parentStructItem(); + currentItem = closingItem->tqparentStructItem(); } else { kdDebug(9030) << "found no opening tag " << tag << "." << endl; } @@ -327,7 +327,7 @@ void TextToolsWidget::parseXML() ++endpos; } - if (!m_relevantTags.contains(tag)) { + if (!m_relevantTags.tqcontains(tag)) { pos = endpos; continue; } @@ -337,7 +337,7 @@ void TextToolsWidget::parseXML() item->pos = pos; item->endpos = -1; - if (m_emptyTags.contains(tag)) + if (m_emptyTags.tqcontains(tag)) item->endpos = endpos; else currentItem = item; @@ -376,9 +376,9 @@ void TextToolsWidget::parseLaTeX() TQString tag = re.cap(1); TQString title = re.cap(2); kdDebug(9030) << "Match with " << tag << " and title " << title << endl; - int level = hierarchyLevels.find(tag); - while (currentItem->parent() && level <= hierarchyLevels.find(currentItem->tag)) - currentItem = currentItem->parentStructItem(); + int level = hierarchyLevels.tqfind(tag); + while (currentItem->tqparent() && level <= hierarchyLevels.tqfind(currentItem->tag)) + currentItem = currentItem->tqparentStructItem(); TextStructItem *item = new TextStructItem(currentItem); item->tag = tag; @@ -386,7 +386,7 @@ void TextToolsWidget::parseLaTeX() item->pos = pos+1; item->endpos = pos+re.matchedLength()-1; // lie - if (level > hierarchyLevels.find(currentItem->tag)) + if (level > hierarchyLevels.tqfind(currentItem->tag)) currentItem = item; pos = pos+re.matchedLength(); diff --git a/parts/texttools/texttoolswidget.h b/parts/texttools/texttoolswidget.h index 5403b736..edbd834b 100644 --- a/parts/texttools/texttoolswidget.h +++ b/parts/texttools/texttoolswidget.h @@ -24,11 +24,12 @@ namespace KTextEditor { class EditInterface; } class TextToolsWidget : public KListView { Q_OBJECT + TQ_OBJECT public: enum Mode { HTML, Docbook, LaTeX }; - TextToolsWidget( TextToolsPart *part, TQWidget *parent=0, const char *name=0 ); + TextToolsWidget( TextToolsPart *part, TQWidget *tqparent=0, const char *name=0 ); ~TextToolsWidget(); void setMode(Mode mode, KParts::Part *part); |