diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /konq-plugins/sidebar/metabar/src/serviceloader.cpp | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
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
Diffstat (limited to 'konq-plugins/sidebar/metabar/src/serviceloader.cpp')
-rw-r--r-- | konq-plugins/sidebar/metabar/src/serviceloader.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/konq-plugins/sidebar/metabar/src/serviceloader.cpp b/konq-plugins/sidebar/metabar/src/serviceloader.cpp index 1b59527..c9ac8b4 100644 --- a/konq-plugins/sidebar/metabar/src/serviceloader.cpp +++ b/konq-plugins/sidebar/metabar/src/serviceloader.cpp @@ -37,7 +37,7 @@ #include <kstandarddirs.h> -ServiceLoader::ServiceLoader(TQWidget *parent, const char *name) : TQObject(parent, name) +ServiceLoader::ServiceLoader(TQWidget *tqparent, const char *name) : TQObject(tqparent, name) { popups.setAutoDelete(true); } @@ -52,7 +52,7 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int KURL url = item.url(); TQString mimeType = item.mimetype(); - TQString mimeGroup = mimeType.left(mimeType.find('/')); + TQString mimeGroup = mimeType.left(mimeType.tqfind('/')); urlList.clear(); urlList.append(url); @@ -96,7 +96,7 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int if(cfg.hasKey("X-KDE-Require")){ const TQStringList capabilities = cfg.readListEntry( "X-KDE-Require" ); - if (capabilities.contains( "Write" )){ + if (capabilities.tqcontains( "Write" )){ continue; } } @@ -123,7 +123,7 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int // if we have a mimetype, see if we have an exact or a type globbed match if(!ok && (!mimeType.isEmpty() && *it == mimeType) || - (!mimeGroup.isEmpty() && ((*it).right(1) == "*" && (*it).left((*it).find('/')) == mimeGroup))) + (!mimeGroup.isEmpty() && ((*it).right(1) == "*" && (*it).left((*it).tqfind('/')) == mimeGroup))) { checkTheMimetypes = true; } @@ -132,7 +132,7 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int ok = true; for(TQStringList::ConstIterator itex = excludeTypes.begin(); itex != excludeTypes.end(); ++itex){ - if( ((*itex).right(1) == "*" && (*itex).left((*itex).find('/')) == mimeGroup) || + if( ((*itex).right(1) == "*" && (*itex).left((*itex).tqfind('/')) == mimeGroup) || ((*itex) == mimeType)) { ok = false; @@ -154,7 +154,7 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int popup = popups[submenuName]; } else{ - MetabarWidget::addEntry(html, submenuName, "servicepopup://" + idString, "1rightarrow", "popup" + idString, count < maxActions ? TQString::null : TQString("hiddenaction"), count >= maxActions); + MetabarWidget::addEntry(html, submenuName, "servicepopup://" + idString, "1rightarrow", "popup" + idString, count < maxActions ? TQString() : TQString("hiddenaction"), count >= maxActions); popup = new KPopupMenu(); popups.insert(idString, popup); @@ -168,11 +168,11 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int for (TQValueList<KDEDesktopMimeType::Service>::iterator it = list.begin(); it != list.end(); ++it){ if(usePopup){ - KAction *action = new KAction((*it).m_strName, (*it).m_strIcon, KShortcut(), this, TQT_SLOT(runAction()), popup, idString.utf8()); + KAction *action = new KAction((*it).m_strName, (*it).m_strIcon, KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(runAction()), TQT_TQOBJECT(popup), idString.utf8()); action->plug(popup); } else{ - MetabarWidget::addEntry(html, (*it).m_strName, "service://" + idString, (*it).m_strIcon, TQString::null, count < maxActions ? TQString::null : TQString("hiddenaction"), count >= maxActions); + MetabarWidget::addEntry(html, (*it).m_strName, "service://" + idString, (*it).m_strIcon, TQString(), count < maxActions ? TQString() : TQString("hiddenaction"), count >= maxActions); count++; } @@ -188,7 +188,7 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int void ServiceLoader::runAction() { - KDEDesktopMimeType::Service s = services[sender()->name()]; + KDEDesktopMimeType::Service s = services[TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()]; if(!s.isEmpty()){ KDEDesktopMimeType::executeService(urlList, s); } |