From 79b21d47bce1ee428affc97534cd8b257232a871 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 24 Jan 2013 13:43:14 -0600 Subject: Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4 --- konqueror/sidebar/sidebar_widget.cpp | 20 ++++++++++---------- .../sidebar/trees/dirtree_module/dirtree_item.cpp | 4 ++-- .../sidebar/trees/dirtree_module/dirtree_module.cpp | 8 ++++---- .../sidebar/trees/history_module/history_item.cpp | 2 +- .../sidebar/trees/history_module/history_module.cpp | 8 ++++---- .../sidebar/trees/history_module/history_module.h | 2 +- .../trees/history_module/history_settings.cpp | 2 +- .../sidebar/trees/history_module/kcmhistory.cpp | 2 +- konqueror/sidebar/trees/konq_sidebartree.cpp | 18 +++++++++--------- konqueror/sidebar/trees/konqsidebar_tree.cpp | 2 +- konqueror/sidebar/web_module/web_module.cpp | 4 ++-- 11 files changed, 36 insertions(+), 36 deletions(-) (limited to 'konqueror/sidebar') diff --git a/konqueror/sidebar/sidebar_widget.cpp b/konqueror/sidebar/sidebar_widget.cpp index aba5e3a26..f1dd6ad22 100644 --- a/konqueror/sidebar/sidebar_widget.cpp +++ b/konqueror/sidebar/sidebar_widget.cpp @@ -67,7 +67,7 @@ void addBackEnd::aboutToShowAddMenu() { if (!menu) return; - KStandardDirs *dirs = KGlobal::dirs(); + KStandardDirs *dirs = TDEGlobal::dirs(); TQStringList list = dirs->findAllResources("data","konqsidebartng/add/*.desktop",true,true); libNames.setAutoDelete(true); libNames.resize(0); @@ -122,7 +122,7 @@ void addBackEnd::doRollBack() { if (KMessageBox::warningContinueCancel(m_parent, i18n("This removes all your entries from the sidebar and adds the system default ones.
This procedure is irreversible
Do you want to proceed?
"))==KMessageBox::Continue) { - KStandardDirs *dirs = KGlobal::dirs(); + KStandardDirs *dirs = TDEGlobal::dirs(); TQString loc=dirs->saveLocation("data","konqsidebartng/" + m_currentProfile + "/",true); TQDir dir(loc); TQStringList dirEntries = dir.entryList( TQDir::Dirs | TQDir::NoSymLinks ); @@ -139,7 +139,7 @@ void addBackEnd::doRollBack() static TQString findFileName(const TQString* tmpl,bool universal, const TQString &profile) { TQString myFile, filename; - KStandardDirs *dirs = KGlobal::dirs(); + KStandardDirs *dirs = TDEGlobal::dirs(); TQString tmp = *tmpl; if (universal) { @@ -248,7 +248,7 @@ Sidebar_Widget::Sidebar_Widget(TQWidget *parent, KParts::ReadOnlyPart *par, cons { m_relPath = "konqsidebartng/" + currentProfile + "/entries/"; } - m_path = KGlobal::dirs()->saveLocation("data", m_relPath, true); + m_path = TDEGlobal::dirs()->saveLocation("data", m_relPath, true); m_buttons.setAutoDelete(true); m_hasStoredUrl = false; m_latestViewed = -1; @@ -331,7 +331,7 @@ void Sidebar_Widget::addWebSideBar(const KURL& url, const TQString& /*name*/) { // << " [" << name << "]" << endl; // Look for existing ones with this URL - KStandardDirs *dirs = KGlobal::dirs(); + KStandardDirs *dirs = TDEGlobal::dirs(); TQString list; dirs->saveLocation("data", m_relPath, true); list = locateLocal("data", m_relPath); @@ -370,7 +370,7 @@ void Sidebar_Widget::addWebSideBar(const KURL& url, const TQString& /*name*/) { void Sidebar_Widget::finishRollBack() { - m_path = KGlobal::dirs()->saveLocation("data",m_relPath,true); + m_path = TDEGlobal::dirs()->saveLocation("data",m_relPath,true); initialCopy(); TQTimer::singleShot(0,this,TQT_SLOT(updateButtons())); } @@ -421,9 +421,9 @@ void Sidebar_Widget::initialCopy() kdDebug()<<"Initial copy"<findDirs("data","konqsidebartng/kicker_entries/"); + dirtree_dirs = TDEGlobal::dirs()->findDirs("data","konqsidebartng/kicker_entries/"); else - dirtree_dirs = KGlobal::dirs()->findDirs("data","konqsidebartng/entries/"); + dirtree_dirs = TDEGlobal::dirs()->findDirs("data","konqsidebartng/entries/"); if (dirtree_dirs.last()==m_path) return; //oups; @@ -467,9 +467,9 @@ void Sidebar_Widget::initialCopy() !dirEntries.contains( *eIt ) ) { // we don't have that one yet -> copy it. TQString cp("cp -R -- "); - cp += KProcess::quote(dirtree_dir + *eIt); + cp += TDEProcess::quote(dirtree_dir + *eIt); cp += " "; - cp += KProcess::quote(m_path); + cp += TDEProcess::quote(m_path); kdDebug() << "SidebarWidget::intialCopy executing " << cp << endl; ::system( TQFile::encodeName(cp) ); } diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp index 811867b14..16520d0e0 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp @@ -92,7 +92,7 @@ void KonqSidebarDirTreeItem::setOpen( bool open ) MYMODULE->openSubFolder( this ); else if ( hasStandardIcon() ) { - int size = KGlobal::iconLoader()->currentSize( KIcon::Small ); + int size = TDEGlobal::iconLoader()->currentSize( KIcon::Small ); if ( open ) setPixmap( 0, DesktopIcon( "folder_open", size ) ); else @@ -159,7 +159,7 @@ void KonqSidebarDirTreeItem::itemSelected() { bool bInTrash = false; - if ( m_fileItem->url().directory(false) == KGlobalSettings::trashPath() ) + if ( m_fileItem->url().directory(false) == TDEGlobalSettings::trashPath() ) bInTrash = true; TQMimeSource *data = TQApplication::clipboard()->data(); diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp b/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp index c8707970c..7d8f7b1fd 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp @@ -325,7 +325,7 @@ void KonqSidebarDirTreeModule::openSubFolder( KonqSidebarTreeItem *item ) if ( !item->isTopLevelItem() && static_cast(item)->hasStandardIcon() ) { - int size = KGlobal::iconLoader()->currentSize( KIcon::Small ); + int size = TDEGlobal::iconLoader()->currentSize( KIcon::Small ); TQPixmap pix = DesktopIcon( "folder_open", size ); m_pTree->startAnimation( item, "kde", 6, &pix ); } @@ -358,7 +358,7 @@ void KonqSidebarDirTreeModule::listDirectory( KonqSidebarTreeItem *item ) { // We have this directory listed already, just copy the entries as we // can't use the dirlister, it would invalidate the old entries - int size = KGlobal::iconLoader()->currentSize( KIcon::Small ); + int size = TDEGlobal::iconLoader()->currentSize( KIcon::Small ); KonqSidebarTreeItem * parentItem = item; KonqSidebarDirTreeItem *oldItem = static_cast (openItem->firstChild()); while(oldItem) @@ -424,7 +424,7 @@ void KonqSidebarDirTreeModule::slotNewItems( const KFileItemList& entries ) } kdDebug()<<"number of additional parent items:"<< (parentItemList?parentItemList->count():0)<currentSize( KIcon::Small ); + int size = TDEGlobal::iconLoader()->currentSize( KIcon::Small ); do { kdDebug()<<"Parent Item URL:"<externalURL()<currentSize( KIcon::Small ); + int size = TDEGlobal::iconLoader()->currentSize( KIcon::Small ); TQPtrListIterator kit ( entries ); kdDebug(1201) << "KonqSidebarDirTreeModule::slotRefreshItems " << entries.count() << " entries. First: " << kit.current()->url().url() << endl; diff --git a/konqueror/sidebar/trees/history_module/history_item.cpp b/konqueror/sidebar/trees/history_module/history_item.cpp index 0d31551f9..44389702e 100644 --- a/konqueror/sidebar/trees/history_module/history_item.cpp +++ b/konqueror/sidebar/trees/history_module/history_item.cpp @@ -119,7 +119,7 @@ TQString KonqSidebarHistoryItem::toolTipText() const // .arg() calls. So to fix this, we first substitute the last items // and then put in the url. TQString tip = i18n("
%4

Last visited: %1
First visited: %2
Number of times visited: %3
"); - return tip.arg( KGlobal::locale()->formatDateTime( m_entry->lastVisited ) ).arg( KGlobal::locale()->formatDateTime( m_entry->firstVisited ) ).arg( m_entry->numberOfTimesVisited ).arg( m_entry->url.url() ); + return tip.arg( TDEGlobal::locale()->formatDateTime( m_entry->lastVisited ) ).arg( TDEGlobal::locale()->formatDateTime( m_entry->firstVisited ) ).arg( m_entry->numberOfTimesVisited ).arg( m_entry->url.url() ); } return m_entry->url.url(); diff --git a/konqueror/sidebar/trees/history_module/history_module.cpp b/konqueror/sidebar/trees/history_module/history_module.cpp index a7fd943ca..71c1b5a44 100644 --- a/konqueror/sidebar/trees/history_module/history_module.cpp +++ b/konqueror/sidebar/trees/history_module/history_module.cpp @@ -56,7 +56,7 @@ KonqSidebarHistoryModule::KonqSidebarHistoryModule( KonqSidebarTree * parentTree m_dict.setAutoDelete( true ); m_currentTime = TQDateTime::currentDateTime(); - KConfig *kc = KGlobal::config(); + KConfig *kc = TDEGlobal::config(); KConfigGroupSaver cs( kc, "HistorySettings" ); m_sortsByName = kc->readEntry( "SortHistory", "byDate" ) == "byName"; @@ -111,7 +111,7 @@ KonqSidebarHistoryModule::~KonqSidebarHistoryModule() ++it; } - KConfig *kc = KGlobal::config(); + KConfig *kc = TDEGlobal::config(); KConfigGroupSaver cs( kc, "HistorySettings" ); kc->writeEntry("OpenGroups", openGroups); kc->sync(); @@ -143,7 +143,7 @@ void KonqSidebarHistoryModule::slotCreateItems() ++it; } - KConfig *kc = KGlobal::config(); + KConfig *kc = TDEGlobal::config(); KConfigGroupSaver cs( kc, "HistorySettings" ); TQStringList openGroups = kc->readListEntry("OpenGroups"); TQStringList::Iterator it2 = openGroups.begin(); @@ -297,7 +297,7 @@ void KonqSidebarHistoryModule::sortingChanged() { m_topLevelItem->sort(); - KConfig *kc = KGlobal::config(); + KConfig *kc = TDEGlobal::config(); KConfigGroupSaver cs( kc, "HistorySettings" ); kc->writeEntry( "SortHistory", m_sortsByName ? "byName" : "byDate" ); kc->sync(); diff --git a/konqueror/sidebar/trees/history_module/history_module.h b/konqueror/sidebar/trees/history_module/history_module.h index 752ff57fd..cbba40262 100644 --- a/konqueror/sidebar/trees/history_module/history_module.h +++ b/konqueror/sidebar/trees/history_module/history_module.h @@ -61,7 +61,7 @@ public: bool sortsByName() const { return m_sortsByName; } static TQString groupForURL( const KURL& url ) { - static const TQString& misc = KGlobal::staticQString(i18n("Miscellaneous")); + static const TQString& misc = TDEGlobal::staticQString(i18n("Miscellaneous")); return url.host().isEmpty() ? misc : url.host(); } diff --git a/konqueror/sidebar/trees/history_module/history_settings.cpp b/konqueror/sidebar/trees/history_module/history_settings.cpp index 6871415a0..3e8c8a5de 100644 --- a/konqueror/sidebar/trees/history_module/history_settings.cpp +++ b/konqueror/sidebar/trees/history_module/history_settings.cpp @@ -46,7 +46,7 @@ void KonqSidebarHistorySettings::readSettings(bool global) TQString oldgroup; if (global) { - config = KGlobal::config(); + config = TDEGlobal::config(); oldgroup= config->group(); } else diff --git a/konqueror/sidebar/trees/history_module/kcmhistory.cpp b/konqueror/sidebar/trees/history_module/kcmhistory.cpp index 532e3a164..a1ef792d6 100644 --- a/konqueror/sidebar/trees/history_module/kcmhistory.cpp +++ b/konqueror/sidebar/trees/history_module/kcmhistory.cpp @@ -51,7 +51,7 @@ K_EXPORT_COMPONENT_FACTORY (kcm_history, KCMHistoryFactory("kcmhistory") ) HistorySidebarConfig::HistorySidebarConfig( TQWidget *parent, const char* name, const TQStringList & ) : KCModule (KCMHistoryFactory::instance(), parent, name) { - KGlobal::locale()->insertCatalogue("konqueror"); + TDEGlobal::locale()->insertCatalogue("konqueror"); m_settings = new KonqSidebarHistorySettings( 0, "history settings" ); m_settings->readSettings( false ); diff --git a/konqueror/sidebar/trees/konq_sidebartree.cpp b/konqueror/sidebar/trees/konq_sidebartree.cpp index 2ed02b6cf..7ba7c3014 100644 --- a/konqueror/sidebar/trees/konq_sidebartree.cpp +++ b/konqueror/sidebar/trees/konq_sidebartree.cpp @@ -87,7 +87,7 @@ void KonqSidebarTree::loadModuleFactories() { pluginFactories.clear(); pluginInfo.clear(); - KStandardDirs *dirs=KGlobal::dirs(); + KStandardDirs *dirs=TDEGlobal::dirs(); TQStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true); @@ -168,12 +168,12 @@ KonqSidebarTree::KonqSidebarTree( KonqSidebar_Tree *parent, TQWidget *parentWidg /* assert( m_part->getInterfaces()->getInstance()->dirs ); TQString dirtreeDir = m_part->getInterfaces()->getInstance()->dirs()->saveLocation( "data", "konqueror/dirtree/" ); */ -// assert( KGlobal::dirs() ); +// assert( TDEGlobal::dirs() ); // TQString dirtreeDir = part->getInterfaces()->getInstance()->dirs()->saveLocation( "data", "konqueror/dirtree/" ); if (virt==VIRT_Folder) { - m_dirtreeDir.dir.setPath(KGlobal::dirs()->saveLocation("data","konqsidebartng/virtual_folders/"+path+"/")); + m_dirtreeDir.dir.setPath(TDEGlobal::dirs()->saveLocation("data","konqsidebartng/virtual_folders/"+path+"/")); m_dirtreeDir.relDir=path; } else @@ -620,10 +620,10 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const TQString &path if (copyConfig) { // We will copy over the configuration for the dirtree, from the global directory - TQStringList dirtree_dirs = KGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/"); + TQStringList dirtree_dirs = TDEGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/"); -// TQString dirtree_dir = KGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/").last(); // most global +// TQString dirtree_dir = TDEGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/").last(); // most global // kdDebug(1201) << "KonqSidebarTree::scanDir dirtree_dir=" << dirtree_dir << endl; /* @@ -655,9 +655,9 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const TQString &path && !entries.contains( *eIt ) && !dirEntries.contains( *eIt ) ) { // we don't have that one yet -> copy it. TQString cp("cp -R -- "); - cp += KProcess::quote(dirtree_dir + *eIt); + cp += TDEProcess::quote(dirtree_dir + *eIt); cp += " "; - cp += KProcess::quote(path); + cp += TDEProcess::quote(path); kdDebug(1201) << "KonqSidebarTree::scanDir executing " << cp << endl; ::system( TQFile::encodeName(cp) ); } @@ -698,7 +698,7 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const TQString &path { TQString newPath = TQString( path ).append( *eIt ).append( '/' ); - if ( newPath == KGlobalSettings::autostartPath() ) + if ( newPath == TDEGlobalSettings::autostartPath() ) continue; loadTopLevelGroup( parent, newPath ); @@ -984,7 +984,7 @@ void KonqSidebarTree::slotCreateFolder() name = name + "-2"; } - KGlobal::dirs()->makeDir(path); + TDEGlobal::dirs()->makeDir(path); loadTopLevelGroup(m_currentTopLevelItem, path); } diff --git a/konqueror/sidebar/trees/konqsidebar_tree.cpp b/konqueror/sidebar/trees/konqsidebar_tree.cpp index 0dc9303b4..1cdf54da0 100644 --- a/konqueror/sidebar/trees/konqsidebar_tree.cpp +++ b/konqueror/sidebar/trees/konqsidebar_tree.cpp @@ -134,7 +134,7 @@ extern "C" { KDE_EXPORT bool add_konqsidebar_tree(TQString* fn, TQString*, TQMap *map) { - KStandardDirs *dirs=KGlobal::dirs(); + KStandardDirs *dirs=TDEGlobal::dirs(); TQStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true); TQStringList names; for (TQStringList::ConstIterator it=list.begin();it!=list.end();++it) diff --git a/konqueror/sidebar/web_module/web_module.cpp b/konqueror/sidebar/web_module/web_module.cpp index 3697c443f..a337c65c6 100644 --- a/konqueror/sidebar/web_module/web_module.cpp +++ b/konqueror/sidebar/web_module/web_module.cpp @@ -191,10 +191,10 @@ extern "C" { extern "C" { KDE_EXPORT bool add_konqsidebar_web(TQString* fn, TQString* param, TQMap *map) { Q_UNUSED(param); - KGlobal::dirs()->addResourceType("websidebardata", KStandardDirs::kde_default("data") + "konqsidebartng/websidebar"); + TDEGlobal::dirs()->addResourceType("websidebardata", KStandardDirs::kde_default("data") + "konqsidebartng/websidebar"); KURL url; url.setProtocol("file"); - TQStringList paths = KGlobal::dirs()->resourceDirs("websidebardata"); + TQStringList paths = TDEGlobal::dirs()->resourceDirs("websidebardata"); for (TQStringList::Iterator i = paths.begin(); i != paths.end(); ++i) { if (TQFileInfo(*i + "websidebar.html").exists()) { url.setPath(*i + "websidebar.html"); -- cgit v1.2.1