summaryrefslogtreecommitdiffstats
path: root/konq-plugins/dirfilter
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /konq-plugins/dirfilter
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-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/dirfilter')
-rw-r--r--konq-plugins/dirfilter/dirfilterplugin.cpp28
-rw-r--r--konq-plugins/dirfilter/dirfilterplugin.h3
2 files changed, 16 insertions, 15 deletions
diff --git a/konq-plugins/dirfilter/dirfilterplugin.cpp b/konq-plugins/dirfilter/dirfilterplugin.cpp
index ff2eecd..ea5fe77 100644
--- a/konq-plugins/dirfilter/dirfilterplugin.cpp
+++ b/konq-plugins/dirfilter/dirfilterplugin.cpp
@@ -141,14 +141,14 @@ void SessionManager::loadSettings()
-DirFilterPlugin::DirFilterPlugin (TQObject* parent, const char* name,
+DirFilterPlugin::DirFilterPlugin (TQObject* tqparent, const char* name,
const TQStringList&)
- :KParts::Plugin (parent, name),
+ :KParts::Plugin (tqparent, name),
m_pFilterMenu(0),
m_searchWidget(0),
m_oldFilterString("")
{
- m_part = ::qt_cast<KonqDirPart*>(parent);
+ m_part = ::tqqt_cast<KonqDirPart*>(tqparent);
if ( !m_part || !m_part->scrollWidget() )
return;
@@ -179,12 +179,12 @@ DirFilterPlugin::DirFilterPlugin (TQObject* parent, const char* name,
clear->setWhatsThis(i18n("Clear filter field<p>Clears the content of the filter field."));
- if ( ::qt_cast<KListView*>(m_part->scrollWidget()) )
+ if ( ::tqqt_cast<KListView*>(m_part->scrollWidget()) )
{
m_searchWidget = new KListViewSearchLine(hbox);
static_cast<KListViewSearchLine*>(m_searchWidget)->setListView(static_cast<KListView*>(m_part->scrollWidget()));
}
- else if ( ::qt_cast<TQIconView*>(m_part->scrollWidget()) )
+ else if ( ::tqqt_cast<TQIconView*>(m_part->scrollWidget()) )
{
m_searchWidget = new KIconViewSearchLine(hbox);
static_cast<KIconViewSearchLine*>(m_searchWidget)->setIconView(static_cast<TQIconView*>(m_part->scrollWidget()));
@@ -204,7 +204,7 @@ DirFilterPlugin::DirFilterPlugin (TQObject* parent, const char* name,
// FIXME: This causes crashes for an unknown reason on certain systems
// Probably the iconview onchange event handler should tempoarily stop this timer before doing anything else
-// Really the broken Qt3 iconview should just be modified to include a hidden list; it would make things *so* much easier!
+// Really the broken TQt3 iconview should just be modified to include a hidden list; it would make things *so* much easier!
m_refreshTimer = new TQTimer( this );
m_reactivateRefreshTimer = new TQTimer( this );
connect( m_refreshTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(activateSearch()) );
@@ -416,11 +416,11 @@ void DirFilterPlugin::slotItemsAdded (const KFileItemList& list)
m_pFilterMenu->setEnabled (m_part->nameFilter().isEmpty());
return;
}
- if ( ::qt_cast<KListView*>(m_part->scrollWidget()) )
+ if ( ::tqqt_cast<KListView*>(m_part->scrollWidget()) )
{
static_cast<KListViewSearchLine*>(m_searchWidget)->updateSearch();
}
- else if ( ::qt_cast<TQIconView*>(m_part->scrollWidget()) )
+ else if ( ::tqqt_cast<TQIconView*>(m_part->scrollWidget()) )
{
static_cast<KIconViewSearchLine*>(m_searchWidget)->updateSearch();
}
@@ -438,11 +438,11 @@ void DirFilterPlugin::slotItemsAdded (const KFileItemList& list)
continue;
TQString mimeType = mime->name();
- if (!m_pMimeInfo.contains (mimeType))
+ if (!m_pMimeInfo.tqcontains (mimeType))
{
MimeInfo& mimeInfo = m_pMimeInfo[mimeType];
TQStringList filters = m_part->mimeFilter ();
- mimeInfo.useAsFilter = (!filters.isEmpty () && filters.contains (mimeType));
+ mimeInfo.useAsFilter = (!filters.isEmpty () && filters.tqcontains (mimeType));
mimeInfo.mimeComment = mime->comment();
mimeInfo.iconName = mime->icon(KURL(), false);
mimeInfo.filenames.insert(name, false);
@@ -468,13 +468,13 @@ void DirFilterPlugin::slotItemRemoved (const KFileItem* item)
// NOTE: This bug is NOT present in qlistviewitem
// HACK around it here...
- if ( ::qt_cast<TQIconView*>(m_part->scrollWidget()) ) {
+ if ( ::tqqt_cast<TQIconView*>(m_part->scrollWidget()) ) {
static_cast<KIconViewSearchLine*>(m_searchWidget)->iconDeleted(item->name());
}
TQString mimeType = item->mimetype().stripWhiteSpace();
- if (m_pMimeInfo.contains (mimeType)) {
+ if (m_pMimeInfo.tqcontains (mimeType)) {
MimeInfo info = m_pMimeInfo [mimeType];
if (info.filenames.size () > 1)
@@ -506,10 +506,10 @@ void DirFilterPlugin::activateSearch()
m_oldFilterString = m_searchWidget->text();
- if ( ::qt_cast<KListView*>(m_part->scrollWidget()) ) {
+ if ( ::tqqt_cast<KListView*>(m_part->scrollWidget()) ) {
static_cast<KListViewSearchLine*>(m_searchWidget)->updateSearch();
}
- else if ( ::qt_cast<TQIconView*>(m_part->scrollWidget()) ) {
+ else if ( ::tqqt_cast<TQIconView*>(m_part->scrollWidget()) ) {
static_cast<KIconViewSearchLine*>(m_searchWidget)->updateSearch();
}
}
diff --git a/konq-plugins/dirfilter/dirfilterplugin.h b/konq-plugins/dirfilter/dirfilterplugin.h
index ff3497e..d6e87e6 100644
--- a/konq-plugins/dirfilter/dirfilterplugin.h
+++ b/konq-plugins/dirfilter/dirfilterplugin.h
@@ -81,10 +81,11 @@ private:
class DirFilterPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- DirFilterPlugin (TQObject* parent, const char* name, const TQStringList &);
+ DirFilterPlugin (TQObject* tqparent, const char* name, const TQStringList &);
~DirFilterPlugin ();
protected: