summaryrefslogtreecommitdiffstats
path: root/konqueror/sidebar
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-15 19:15:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-15 19:15:16 +0000
commitcc0ad49c75d6cf6b4e63eb8c6012afe55c1589f9 (patch)
tree2a29ccab4d3cea34b87bfcbc38e64a8e25d25bb0 /konqueror/sidebar
parent107dd1f98367d07df7cbe2042786511e44706d3a (diff)
downloadtdebase-cc0ad49c75d6cf6b4e63eb8c6012afe55c1589f9.tar.gz
tdebase-cc0ad49c75d6cf6b4e63eb8c6012afe55c1589f9.zip
Allow kdebase to (mostly) function correctly with TQt for Qt4
Fix kicker tackbar handling under Classic mode (thanks to Ilya Chernykh for the patch) Fix a newly invalidated section of code under GCC 4.5.2 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47723#c6) git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1220927 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konqueror/sidebar')
-rw-r--r--konqueror/sidebar/konqsidebar.h3
-rw-r--r--konqueror/sidebar/konqsidebarplugin.cpp2
-rw-r--r--konqueror/sidebar/sidebar_widget.cpp30
-rw-r--r--konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp6
-rw-r--r--konqueror/sidebar/trees/konq_sidebartree.cpp4
-rw-r--r--konqueror/sidebar/trees/konqsidebar_tree.cpp2
6 files changed, 25 insertions, 22 deletions
diff --git a/konqueror/sidebar/konqsidebar.h b/konqueror/sidebar/konqsidebar.h
index 2724b2d39..0d8bf89ea 100644
--- a/konqueror/sidebar/konqsidebar.h
+++ b/konqueror/sidebar/konqsidebar.h
@@ -37,6 +37,7 @@ class KonqSidebarFactory;
class KonqSidebarBrowserExtension : public KParts::BrowserExtension
{
Q_OBJECT
+ TQ_OBJECT
public:
KonqSidebarBrowserExtension(KonqSidebar *part_,Sidebar_Widget *widget_,const char *name):
KParts::BrowserExtension((KParts::ReadOnlyPart*)part_,name),widget(widget_){;}
@@ -73,6 +74,7 @@ class KonqSidebarBrowserExtension : public KParts::BrowserExtension
class KonqSidebar : public KParts::ReadOnlyPart, public KonqSidebarIface
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor
@@ -110,6 +112,7 @@ class KAboutData;
class KonqSidebarFactory : public KParts::Factory
{
Q_OBJECT
+ TQ_OBJECT
public:
KonqSidebarFactory();
virtual ~KonqSidebarFactory();
diff --git a/konqueror/sidebar/konqsidebarplugin.cpp b/konqueror/sidebar/konqsidebarplugin.cpp
index 1839425dc..0f3fdddde 100644
--- a/konqueror/sidebar/konqsidebarplugin.cpp
+++ b/konqueror/sidebar/konqsidebarplugin.cpp
@@ -52,7 +52,7 @@ void KonqSidebarPlugin::handlePreviewOnMouseOver(const KFileItem& /*items*/) {}
bool KonqSidebarPlugin::universalMode() {
if (!parent()) return false;
- KonqSidebarIface *ksi=static_cast<KonqSidebarIface*>(tqparent()->tqqt_cast("KonqSidebarIface"));
+ KonqSidebarIface *ksi=static_cast<KonqSidebarIface*>(tqparent()->qt_cast("KonqSidebarIface"));
if (!ksi) return false;
kdDebug()<<"calling KonqSidebarIface->universalMode()"<<endl;
return ksi->universalMode();
diff --git a/konqueror/sidebar/sidebar_widget.cpp b/konqueror/sidebar/sidebar_widget.cpp
index 50163c46a..e69504367 100644
--- a/konqueror/sidebar/sidebar_widget.cpp
+++ b/konqueror/sidebar/sidebar_widget.cpp
@@ -178,13 +178,13 @@ void addBackEnd::activatedAddMenu(int id)
KLibLoader *loader = KLibLoader::self();
// try to load the library
- TQString libname = *libNames.at(id);
+ TQString libname = *libNames.tqat(id);
KLibrary *lib = loader->library(TQFile::encodeName(libname));
if (lib)
{
// get the create_ function
TQString factory("add_");
- factory = factory+(*libNames.at(id));
+ factory = factory+(*libNames.tqat(id));
void *add = lib->symbol(TQFile::encodeName(factory));
if (add)
@@ -194,7 +194,7 @@ void addBackEnd::activatedAddMenu(int id)
TQMap<TQString,TQString> map;
func = (bool (*)(TQString*, TQString*, TQMap<TQString,TQString> *)) add;
TQString *tmp = new TQString("");
- if (func(tmp,libParam.at(id),&map))
+ if (func(tmp,libParam.tqat(id),&map))
{
TQString myFile = findFileName(tmp,m_universal,m_currentProfile);
@@ -219,7 +219,7 @@ void addBackEnd::activatedAddMenu(int id)
delete tmp;
}
} else {
- kdWarning() << "libname:" << libNames.at(id)
+ kdWarning() << "libname:" << libNames.tqat(id)
<< " doesn't specify a library!" << endl;
}
}
@@ -574,7 +574,7 @@ void Sidebar_Widget::activatedMenu(int id)
{
int tmpViewID=m_latestViewed;
for (uint i=0; i<m_buttons.count(); i++) {
- ButtonInfo *button = m_buttons.at(i);
+ ButtonInfo *button = m_buttons.tqat(i);
if ((int) i != tmpViewID)
{
if (button->dock && button->dock->isVisibleTo(this))
@@ -598,7 +598,7 @@ void Sidebar_Widget::activatedMenu(int id)
m_mainDockWidget->show();
if ((tmpLatestViewed>=0) && (tmpLatestViewed < (int) m_buttons.count()))
{
- ButtonInfo *button = m_buttons.at(tmpLatestViewed);
+ ButtonInfo *button = m_buttons.tqat(tmpLatestViewed);
if (button && button->dock)
{
m_noUpdate=true;
@@ -694,7 +694,7 @@ void Sidebar_Widget::updateButtons()
{
for (uint i = 0; i < m_buttons.count(); i++)
{
- ButtonInfo *button = m_buttons.at(i);
+ ButtonInfo *button = m_buttons.tqat(i);
if (button->dock)
{
m_noUpdate = true;
@@ -742,7 +742,7 @@ void Sidebar_Widget::createButtons()
for (uint i = 0; i < m_buttons.count(); i++)
{
- ButtonInfo *button = m_buttons.at(i);
+ ButtonInfo *button = m_buttons.tqat(i);
if (m_openViews.tqcontains(button->file))
{
m_buttonBar->setTab(i,true);
@@ -763,7 +763,7 @@ bool Sidebar_Widget::openURL(const class KURL &url)
if (url.protocol()=="sidebar")
{
for (unsigned int i=0;i<m_buttons.count();i++)
- if (m_buttons.at(i)->file==url.path())
+ if (m_buttons.tqat(i)->file==url.path())
{
KMultiTabBarTab *tab = m_buttonBar->tab(i);
if (!tab->isOn())
@@ -778,7 +778,7 @@ bool Sidebar_Widget::openURL(const class KURL &url)
bool ret = false;
for (unsigned int i=0;i<m_buttons.count();i++)
{
- ButtonInfo *button = m_buttons.at(i);
+ ButtonInfo *button = m_buttons.tqat(i);
if (button->dock)
{
if ((button->dock->isVisibleTo(this)) && (button->module))
@@ -836,7 +836,7 @@ bool Sidebar_Widget::eventFilter(TQObject *obj, TQEvent *ev)
if (ev->type()==TQEvent::MouseButtonPress && ((TQMouseEvent *)ev)->button()==Qt::RightButton)
{
- KMultiTabBarTab *bt=dynamic_cast<KMultiTabBarTab*>(obj);
+ KMultiTabBarTab *bt=tqt_dynamic_cast<KMultiTabBarTab*>(obj);
if (bt)
{
kdDebug()<<"Request for popup"<<endl;
@@ -845,7 +845,7 @@ bool Sidebar_Widget::eventFilter(TQObject *obj, TQEvent *ev)
{
if (bt==m_buttonBar->tab(i))
{
- m_currentButton = m_buttons.at(i);
+ m_currentButton = m_buttons.tqat(i);
break;
}
}
@@ -953,7 +953,7 @@ bool Sidebar_Widget::createView( ButtonInfo *data)
void Sidebar_Widget::showHidePage(int page)
{
- ButtonInfo *info = m_buttons.at(page);
+ ButtonInfo *info = m_buttons.tqat(page);
if (!info->dock)
{
if (m_buttonBar->isTabRaised(page))
@@ -1072,7 +1072,7 @@ void Sidebar_Widget::dockWidgetHasUndocked(KDockWidget* wid)
kdDebug()<<" Sidebar_Widget::dockWidgetHasUndocked(KDockWidget*)"<<endl;
for (unsigned int i=0;i<m_buttons.count();i++)
{
- ButtonInfo *button = m_buttons.at(i);
+ ButtonInfo *button = m_buttons.tqat(i);
if (button->dock==wid)
{
if (m_buttonBar->isTabRaised(i))
@@ -1255,7 +1255,7 @@ Sidebar_Widget::~Sidebar_Widget()
m_noUpdate = true;
for (uint i=0;i<m_buttons.count();i++)
{
- ButtonInfo *button = m_buttons.at(i);
+ ButtonInfo *button = m_buttons.tqat(i);
if (button->dock)
button->dock->undock();
}
diff --git a/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp b/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp
index e79ed82df..b0d818c62 100644
--- a/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp
+++ b/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp
@@ -413,9 +413,9 @@ void KonqSidebarBookmarkModule::slotCopyLocation()
if ( !bookmark.isGroup() )
{
kapp->tqclipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0),
- QClipboard::Selection );
+ TQClipboard::Selection );
kapp->tqclipboard()->setData( KBookmarkDrag::newDrag(bookmark, 0),
- QClipboard::Clipboard );
+ TQClipboard::Clipboard );
}
}
@@ -490,7 +490,7 @@ void KonqSidebarBookmarkModule::fillGroup( KonqSidebarTreeItem * parentItem, KBo
item->setOpen(false);
}
else if ( bk.isSeparator() )
- item->setVisible( false );
+ item->tqsetVisible( false );
else
item->setExpandable( false );
}
diff --git a/konqueror/sidebar/trees/konq_sidebartree.cpp b/konqueror/sidebar/trees/konq_sidebartree.cpp
index 9b342f20e..404a2f2c5 100644
--- a/konqueror/sidebar/trees/konq_sidebartree.cpp
+++ b/konqueror/sidebar/trees/konq_sidebartree.cpp
@@ -1031,8 +1031,8 @@ void KonqSidebarTree::slotCopyLocation()
{
if (!m_currentTopLevelItem) return;
KURL url = m_currentTopLevelItem->externalURL();
- kapp->tqclipboard()->setData( new KURLDrag(url, 0), QClipboard::Selection );
- kapp->tqclipboard()->setData( new KURLDrag(url, 0), QClipboard::Clipboard );
+ kapp->tqclipboard()->setData( new KURLDrag(url, 0), TQClipboard::Selection );
+ kapp->tqclipboard()->setData( new KURLDrag(url, 0), TQClipboard::Clipboard );
}
///////////////////////////////////////////////////////////////////
diff --git a/konqueror/sidebar/trees/konqsidebar_tree.cpp b/konqueror/sidebar/trees/konqsidebar_tree.cpp
index 2711c723a..fc53039b6 100644
--- a/konqueror/sidebar/trees/konqsidebar_tree.cpp
+++ b/konqueror/sidebar/trees/konqsidebar_tree.cpp
@@ -150,7 +150,7 @@ extern "C"
{
int id=names.tqfindIndex( item );
if (id==-1) return false;
- KSimpleConfig ksc2(*list.at(id));
+ KSimpleConfig ksc2(*list.tqat(id));
ksc2.setGroup("Desktop Entry");
map->insert("Type","Link");
map->insert("Icon",ksc2.readEntry("Icon"));