From 395a904bff7b4d6ead445c342f7ac0c5fbf29121 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 18 Jun 2011 17:00:31 +0000 Subject: TQt4 port kdeaddons This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konq-plugins/rellinks/plugin_rellinks.cpp | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'konq-plugins/rellinks/plugin_rellinks.cpp') diff --git a/konq-plugins/rellinks/plugin_rellinks.cpp b/konq-plugins/rellinks/plugin_rellinks.cpp index 14a47a3..e77e1e3 100644 --- a/konq-plugins/rellinks/plugin_rellinks.cpp +++ b/konq-plugins/rellinks/plugin_rellinks.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (C) 2002, Anders Lund * - * Copyright (C) 2003, 2004, Franck Quélain * + * Copyright (C) 2003, 2004, Franck Qu�lain * * Copyright (C) 2004, Kevin Krammer * * Copyright (C) 2004, 2006, Oliviet Goffart * * * @@ -23,7 +23,7 @@ -// Qt includes +// TQt includes #include #include @@ -61,8 +61,8 @@ K_EXPORT_COMPONENT_FACTORY( librellinksplugin, RelLinksFactory("rellinks") ) #endif /** Constructor of the plugin. */ -RelLinksPlugin::RelLinksPlugin(TQObject *parent, const char *name, const TQStringList &) - : KParts::Plugin( parent, name ), +RelLinksPlugin::RelLinksPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin( tqparent, name ), m_part(0), m_viewVisible(false) { @@ -74,7 +74,7 @@ RelLinksPlugin::RelLinksPlugin(TQObject *parent, const char *name, const TQStrin kaction_map["home"]->setWhatsThis( i18n("

This link references a home page or the top of some hierarchy.

") ); kaction_map["up"] = new KAction( i18n("&Up"), "1uparrow", KShortcut("Ctrl+Alt+U"), this, TQT_SLOT(goUp()), actionCollection(), "rellinks_up" ); - kaction_map["up"]->setWhatsThis( i18n("

This link references the immediate parent of the current document.

") ); + kaction_map["up"]->setWhatsThis( i18n("

This link references the immediate tqparent of the current document.

") ); bool isRTL = TQApplication::reverseLayout(); @@ -91,7 +91,7 @@ RelLinksPlugin::RelLinksPlugin(TQObject *parent, const char *name, const TQStrin kaction_map["last"]->setWhatsThis( i18n("

This link references the end of a sequence of documents.

") ); // ------------ special items -------------------------- - kaction_map["search"] = new KAction( i18n("&Search"), "filefind", KShortcut("Ctrl+Alt+S"), this, TQT_SLOT(goSearch()), actionCollection(), "rellinks_search" ); + kaction_map["search"] = new KAction( i18n("&Search"), "filetqfind", KShortcut("Ctrl+Alt+S"), this, TQT_SLOT(goSearch()), actionCollection(), "rellinks_search" ); kaction_map["search"]->setWhatsThis( i18n("

This link references the search.

") ); // ------------ Document structure links --------------- @@ -175,7 +175,7 @@ RelLinksPlugin::RelLinksPlugin(TQObject *parent, const char *name, const TQStrin disableAll(); // When the rendering of the HTML is done, we update the site navigation bar - m_part = dynamic_cast(parent); + m_part = dynamic_cast(tqparent); if (!m_part) return; @@ -199,7 +199,7 @@ bool RelLinksPlugin::eventFilter(TQObject *watched, TQEvent* event) { if (watched == 0 || event == 0) return false; - if (watched == m_view) + if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_view)) { switch (event->type()) { @@ -310,7 +310,7 @@ void RelLinksPlugin::updateToolbar() { // escape ampersand before settings as action title, otherwise the menu entry will interpret it as an // accelerator - title.replace('&', "&&"); + title.tqreplace('&', "&&"); // -- Menus activation -- @@ -364,7 +364,7 @@ void RelLinksPlugin::updateToolbar() { void RelLinksPlugin::guessRelations() { - m_part = dynamic_cast(parent()); + m_part = dynamic_cast(tqparent()); if (!m_part || m_part->document().isNull() ) return; @@ -394,7 +394,7 @@ void RelLinksPlugin::guessRelations() TQString href=rx.cap(1)+ nval_str + rx.cap(3); KURL ref( m_part->url(), href ); - TQString title = i18n("[Autodetected] %1").arg(ref.prettyURL()); + TQString title = i18n("[Autodetected] %1").tqarg(ref.prettyURL()); DOM::Element e= m_part->document().createElement("link"); e.setAttribute("href",href); element_map["next"][0] = e; @@ -408,7 +408,7 @@ void RelLinksPlugin::guessRelations() nval_str.prepend(zeros.left(lenval-nval_str.length())); TQString href=rx.cap(1)+ nval_str + rx.cap(3); KURL ref( m_part->url(), href ); - TQString title = i18n("[Autodetected] %1").arg(ref.prettyURL()); + TQString title = i18n("[Autodetected] %1").tqarg(ref.prettyURL()); e= m_part->document().createElement("link"); e.setAttribute("href",href); element_map["prev"][0] = e; @@ -422,7 +422,7 @@ void RelLinksPlugin::guessRelations() /** Menu links */ void RelLinksPlugin::goToLink(const TQString & rel, int id) { // have the KHTML part open it - KHTMLPart *part = dynamic_cast(parent()); + KHTMLPart *part = dynamic_cast(tqparent()); if (!part) return; @@ -561,17 +561,17 @@ void RelLinksPlugin::disableAll() { TQString RelLinksPlugin::getLinkType(const TQString &lrel) { // Relations to ignore... - if (lrel.contains("stylesheet") + if (lrel.tqcontains("stylesheet") || lrel == "script" || lrel == "icon" || lrel == "shortcut icon" || lrel == "prefetch" ) - return TQString::null; + return TQString(); // ...known relations... if (lrel == "top" || lrel == "origin" || lrel == "start") return "home"; - if (lrel == "parent") + if (lrel == "tqparent") return "up"; if (lrel == "first") return "begin"; @@ -583,7 +583,7 @@ TQString RelLinksPlugin::getLinkType(const TQString &lrel) { return "last"; if (lrel == "toc") return "contents"; - if (lrel == "find") + if (lrel == "tqfind") return "search"; if (lrel == "alternative stylesheet") return "alternate stylesheet"; @@ -612,7 +612,7 @@ TQString RelLinksPlugin::transformRevToRel(const TQString &rev) { return getLinkType("sibling"); //...unknown inverse relation => ignore for the moment - return TQString::null; + return TQString(); } #include "plugin_rellinks.moc" -- cgit v1.2.1