From 8d6fecdf83984625b9bc6d010a6a00ee670af344 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 31 Jan 2013 00:39:49 -0600 Subject: Rename KShared --- languages/cpp/cppcodecompletion.cpp | 2 +- languages/cpp/cppcodecompletion.h | 2 +- languages/cpp/simpletype.h | 20 +++++----- languages/cpp/typedesc.cpp | 6 +-- languages/cpp/typedesc.h | 16 ++++---- lib/cppparser/ast.h | 4 +- lib/cppparser/driver.h | 2 +- lib/cppparser/lexercache.h | 4 +- lib/interfaces/codemodel.h | 76 ++++++++++++++++++------------------- lib/interfaces/hashedstring.cpp | 8 ++-- lib/interfaces/hashedstring.h | 2 +- parts/classview/classviewwidget.cpp | 6 +-- 12 files changed, 74 insertions(+), 74 deletions(-) diff --git a/languages/cpp/cppcodecompletion.cpp b/languages/cpp/cppcodecompletion.cpp index 7ef40424..aaad17c1 100644 --- a/languages/cpp/cppcodecompletion.cpp +++ b/languages/cpp/cppcodecompletion.cpp @@ -106,7 +106,7 @@ const char* destructorPrefix = ""; } TypePointer CppCodeCompletion::createGlobalNamespace() { - KSharedPtr n = new SimpleTypeCachedNamespace( TQStringList(), TQStringList() ); + TDESharedPtr n = new SimpleTypeCachedNamespace( TQStringList(), TQStringList() ); n->addAliases(m_pSupport->codeCompletionConfig()->namespaceAliases() ); return n.data(); } diff --git a/languages/cpp/cppcodecompletion.h b/languages/cpp/cppcodecompletion.h index 24877215..815c8df4 100644 --- a/languages/cpp/cppcodecompletion.h +++ b/languages/cpp/cppcodecompletion.h @@ -90,7 +90,7 @@ namespace CppEvaluation } struct ExpressionInfo; -typedef KSharedPtr TypePointer; +typedef TDESharedPtr TypePointer; class CppCodeCompletion : public TQObject { diff --git a/languages/cpp/simpletype.h b/languages/cpp/simpletype.h index bf90a4e7..c6652be1 100644 --- a/languages/cpp/simpletype.h +++ b/languages/cpp/simpletype.h @@ -40,7 +40,7 @@ class SimpleTypeImpl; class SimpleTypeNamespace; class SimpleTypeFunctionInterface; -typedef KSharedPtr TypePointer; +typedef TDESharedPtr TypePointer; ///if this is set, imported items will get their parent set to the node they were acquired through(which may increase the overall count of items, decrease the caching-performance, and may create other problems in locating stuff) //#define PHYSICAL_IMPORT @@ -220,7 +220,7 @@ class SimpleTypeConfiguration { }; -class SimpleTypeImpl : public KShared { +class SimpleTypeImpl : public TDEShared { /*enum ResolutionFlags { NoFlag = 0, HadTypedef = 1, @@ -229,7 +229,7 @@ class SimpleTypeImpl : public KShared { };*/ public: - typedef KSharedPtr TypePointer; + typedef TDESharedPtr TypePointer; SimpleTypeImpl( const TQStringList& scope ) : m_resolutionCount( 0 ), m_resolutionFlags( NoFlag ), m_scope( scope ) { setScope( m_scope ); @@ -363,7 +363,7 @@ class SimpleTypeImpl : public KShared { int m_resolutionCount; ResolutionFlags m_resolutionFlags; - SimpleTypeImpl( const SimpleTypeImpl& /*rhs*/ ) : KShared() {} + SimpleTypeImpl( const SimpleTypeImpl& /*rhs*/ ) : TDEShared() {} SimpleTypeImpl& operator = ( const SimpleTypeImpl& /*rhs*/ ) { return * this; @@ -502,7 +502,7 @@ class SimpleTypeImpl : public KShared { } ///An abstract class for building types lazily - struct TypeBuildInfo : public KShared { + struct TypeBuildInfo : public TDEShared { TypePointer buildCached() { if ( m_cache ) return m_cache; @@ -529,14 +529,14 @@ class SimpleTypeImpl : public KShared { Q_UNUSED( rhs ); return *this; } - TypeBuildInfo( const TypeBuildInfo& rhs ) : KShared() { + TypeBuildInfo( const TypeBuildInfo& rhs ) : TDEShared() { Q_UNUSED( rhs ); } }; ///A class that stores information about a member of some SimpleType class MemberInfo { - KSharedPtr m_build; + TDESharedPtr m_build; public: enum MemberType { @@ -575,9 +575,9 @@ class SimpleTypeImpl : public KShared { }; } - typedef KSharedPtr TypePointer; + typedef TDESharedPtr TypePointer; - void setBuildInfo( KSharedPtr build ) { + void setBuildInfo( TDESharedPtr build ) { m_build = build; } @@ -712,7 +712,7 @@ class SimpleTypeImpl : public KShared { return TQValueList(); } - /**TypeDescs and SimpleTypeImpls usually have a cross-reference, which creates a circular dependency so that they are never freed using KShared. This function breaks the loop, and also breaks all other possible dependency-loops. After this function was called, the type still contains its private information, but can not not be used to resolve anything anymore. This function is called automatically while the destruction of SimpleTypeConfiguration */ + /**TypeDescs and SimpleTypeImpls usually have a cross-reference, which creates a circular dependency so that they are never freed using TDEShared. This function breaks the loop, and also breaks all other possible dependency-loops. After this function was called, the type still contains its private information, but can not not be used to resolve anything anymore. This function is called automatically while the destruction of SimpleTypeConfiguration */ virtual void breakReferences(); ///Returns either itself, or the (namespace-)proxy this type is a slave of. diff --git a/languages/cpp/typedesc.cpp b/languages/cpp/typedesc.cpp index 5f2c292c..146beb08 100644 --- a/languages/cpp/typedesc.cpp +++ b/languages/cpp/typedesc.cpp @@ -209,7 +209,7 @@ void TypeDesc::setIncludeFiles( const HashedStringSet& files ) { (*it)->setIncludeFiles( files ); } if( m_data->m_nextType ) { - if( m_data->m_nextType->_KShared_count() != 1 ) + if( m_data->m_nextType->_TDEShared_count() != 1 ) m_data->m_nextType = new TypeDescShared( *(m_data->m_nextType) ); m_data->m_nextType->setIncludeFiles( files ); } @@ -222,7 +222,7 @@ void TypeDesc::addIncludeFiles( const HashedStringSet& files ) { (*it)->addIncludeFiles( files ); } if( m_data->m_nextType ) { - if( m_data->m_nextType->_KShared_count() != 1 ) + if( m_data->m_nextType->_TDEShared_count() != 1 ) m_data->m_nextType = new TypeDescShared( *(m_data->m_nextType) ); m_data->m_nextType->addIncludeFiles( files ); } @@ -485,7 +485,7 @@ TypeDescPointer TypeDesc::next() { return m_data->m_nextType; } -KSharedPtr TypeDesc::next() const { +TDESharedPtr TypeDesc::next() const { if ( !m_data ) return 0; return m_data->m_nextType.data(); diff --git a/languages/cpp/typedesc.h b/languages/cpp/typedesc.h index 0229c781..f2746a03 100644 --- a/languages/cpp/typedesc.h +++ b/languages/cpp/typedesc.h @@ -27,8 +27,8 @@ class SimpleTypeImpl; class TypeTrace; -typedef KSharedPtr TypeDescPointer; -typedef KSharedPtr TypePointer; +typedef TDESharedPtr TypeDescPointer; +typedef TDESharedPtr TypePointer; enum ResolutionFlags { NoFlag = 0, @@ -144,7 +144,7 @@ enum TypeDescFlags { }; -struct TypeDescData : public KShared { +struct TypeDescData : public TDEShared { typedef TQValueList TemplateParams; TQString m_cleanName; int m_pointerDepth; @@ -323,7 +323,7 @@ class TypeDesc { TypeDescPointer next(); - KSharedPtr next() const; + TDESharedPtr next() const; bool hasTemplateParams() const ; @@ -372,20 +372,20 @@ class TypeDesc { private: void takeData( const TQString& string ); void makeDataPrivate(); - KSharedPtr m_data; + TDESharedPtr m_data; void maybeInit(); void init( TQString stri ); }; -class TypeDescShared : public TypeDesc, public KShared { +class TypeDescShared : public TypeDesc, public TDEShared { public: - TypeDescShared( const TypeDescShared& rhs ) : TypeDesc( rhs ), KShared() {} + TypeDescShared( const TypeDescShared& rhs ) : TypeDesc( rhs ), TDEShared() {} - TypeDescShared( const TypeDesc& rhs ) : TypeDesc( rhs ), KShared() {} + TypeDescShared( const TypeDesc& rhs ) : TypeDesc( rhs ), TDEShared() {} TypeDescShared& operator = ( const TypeDesc& rhs ) { ( *( TypeDesc* ) this ) = rhs; diff --git a/lib/cppparser/ast.h b/lib/cppparser/ast.h index e062d077..9051018a 100644 --- a/lib/cppparser/ast.h +++ b/lib/cppparser/ast.h @@ -1553,10 +1553,10 @@ private: }; -class TranslationUnitAST: public AST, public KShared +class TranslationUnitAST: public AST, public TDEShared { public: - typedef KSharedPtr Node; + typedef TDESharedPtr Node; enum { Type = NodeType_TranslationUnit }; DECLARE_ALLOC( TranslationUnitAST ) diff --git a/lib/cppparser/driver.h b/lib/cppparser/driver.h index 71e0f2d7..5e101839 100644 --- a/lib/cppparser/driver.h +++ b/lib/cppparser/driver.h @@ -52,7 +52,7 @@ enum typedef TQPair Dependence; class ParsedFile; -typedef KSharedPtr< ParsedFile > ParsedFilePointer; +typedef TDESharedPtr< ParsedFile > ParsedFilePointer; class ParsedFile : public AbstractParseResult { public: diff --git a/lib/cppparser/lexercache.h b/lib/cppparser/lexercache.h index c1aac432..4d3783c7 100644 --- a/lib/cppparser/lexercache.h +++ b/lib/cppparser/lexercache.h @@ -28,7 +28,7 @@ class LexerCache; -class CachedLexedFile : public KShared, public CacheNode { +class CachedLexedFile : public TDEShared, public CacheNode { public: ///@todo add and manage the set of included files CachedLexedFile( const HashedString& fileName, LexerCache* manager ); @@ -107,7 +107,7 @@ class CachedLexedFile : public KShared, public CacheNode { */ }; -typedef KSharedPtr CachedLexedFilePointer; +typedef TDESharedPtr CachedLexedFilePointer; struct CachedLexedFilePointerCompare { bool operator() ( const CachedLexedFilePointer& lhs, const CachedLexedFilePointer& rhs ) const { diff --git a/lib/interfaces/codemodel.h b/lib/interfaces/codemodel.h index 86faa4f9..b6e03fdb 100644 --- a/lib/interfaces/codemodel.h +++ b/lib/interfaces/codemodel.h @@ -43,7 +43,7 @@ enum ParsedFileType { CppParsedFile }; -class AbstractParseResult : public KShared { +class AbstractParseResult : public TDEShared { public: virtual void read( TQDataStream& stream ) = 0; @@ -52,7 +52,7 @@ public: virtual ParsedFileType type() const = 0; }; -typedef KSharedPtr ParseResultPointer; +typedef TDESharedPtr ParseResultPointer; using namespace std; @@ -72,90 +72,90 @@ class TypeAliasModel; /** @class ItemDom Safe pointer to the @ref CodeModelItem. -This is a type definition: @code typedef KSharedPtr ItemDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr ItemDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr ItemDom; +typedef TDESharedPtr ItemDom; /** @class FileDom Safe pointer to the @ref FileModel. -This is a type definition: @code typedef KSharedPtr FileDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr FileDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr FileDom; +typedef TDESharedPtr FileDom; /** @class NamespaceDom Safe pointer to the @ref NamespaceModel. -This is a type definition: @code typedef KSharedPtr NamespaceDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr NamespaceDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr NamespaceDom; +typedef TDESharedPtr NamespaceDom; /** @class ClassDom Safe pointer to the @ref ClassModel. -This is a type definition: @code typedef KSharedPtr ClassDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr ClassDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr ClassDom; +typedef TDESharedPtr ClassDom; /** @class FunctionDom Safe pointer to the @ref FunctionModel. -This is a type definition: @code typedef KSharedPtr FunctionDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr FunctionDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr FunctionDom; +typedef TDESharedPtr FunctionDom; /** @class FunctionDefinitionDom Safe pointer to the @ref FunctionDefinitionModel. -This is a type definition: @code typedef KSharedPtr FunctionDefinitionDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr FunctionDefinitionDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr FunctionDefinitionDom; +typedef TDESharedPtr FunctionDefinitionDom; /** @class VariableDom Safe pointer to the @ref VariableModel. -This is a type definition: @code typedef KSharedPtr VariableDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr VariableDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr VariableDom; +typedef TDESharedPtr VariableDom; /** @class ArgumentDom Safe pointer to the @ref ArgumentModel. -This is a type definition: @code typedef KSharedPtr ArgumentDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr ArgumentDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr ArgumentDom; +typedef TDESharedPtr ArgumentDom; /** @class EnumDom Safe pointer to the @ref EnumModel. -This is a type definition: @code typedef KSharedPtr EnumDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr EnumDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr EnumDom; +typedef TDESharedPtr EnumDom; /** @class TypeAliasDom Safe pointer to the @ref TypeAliasModel. -This is a type definition: @code typedef KSharedPtr TypeAliasDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr TypeAliasDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr TypeAliasDom; +typedef TDESharedPtr TypeAliasDom; /** @class EnumeratorDom Safe pointer to the @ref EnumeratorModel. -This is a type definition: @code typedef KSharedPtr EnumeratorDom; @endcode -@sa KSharedPtr +This is a type definition: @code typedef TDESharedPtr EnumeratorDom; @endcode +@sa TDESharedPtr */ -typedef KSharedPtr EnumeratorDom; +typedef TDESharedPtr EnumeratorDom; /** @class ItemList @@ -271,7 +271,7 @@ TQStringList sortedNameList( const ItemList& lst ) } /** -Casts safe code model pointers (@p KSharedPtr objects like +Casts safe code model pointers (@p TDESharedPtr objects like FileDom, NamespaceDom, etc.) to the @p Result type. Example: @@ -282,7 +282,7 @@ ClassDom cl = model_cast(ns); @param x Object to cast. */ template -Result model_cast( KSharedPtr x ) +Result model_cast( TDESharedPtr x ) { Result r( static_cast(x) ); return r; @@ -458,7 +458,7 @@ variables, arguments, enums and enumerators, type aliases. Instances of this class should be created using @ref CodeModel::create method but usually it is better to create instances of derived classes like ClassModel, NamespaceModel, FileModel, etc. */ -class CodeModelItem: public KShared +class CodeModelItem: public TDEShared { public: /**A definition of safe pointer to the code model item.*/ diff --git a/lib/interfaces/hashedstring.cpp b/lib/interfaces/hashedstring.cpp index 8392e271..820dba04 100644 --- a/lib/interfaces/hashedstring.cpp +++ b/lib/interfaces/hashedstring.cpp @@ -60,7 +60,7 @@ void HashedString::initHash() { } -class HashedStringSetData : public KShared { +class HashedStringSetData : public TDEShared { public: #ifdef USE_HASHMAP typedef __gnu_cxx::hash_set StringSet; @@ -121,7 +121,7 @@ HashedStringSet& HashedStringSet::operator +=( const HashedStringSet& rhs ) { return * this; #ifndef USE_HASHMAP - KSharedPtr oldData = m_data; + TDESharedPtr oldData = m_data; if( !oldData ) oldData = new HashedStringSetData(); m_data = new HashedStringSetData(); std::set_union( oldData->m_files.begin(), oldData->m_files.end(), rhs.m_data->m_files.begin(), rhs.m_data->m_files.end(), std::insert_iterator( m_data->m_files, m_data->m_files.end() ) ); @@ -142,7 +142,7 @@ HashedStringSet& HashedStringSet::operator -=( const HashedStringSet& rhs ) { if( !m_data ) return *this; if( !rhs.m_data ) return *this; #ifndef USE_HASHMAP - KSharedPtr oldData = m_data; + TDESharedPtr oldData = m_data; m_data = new HashedStringSetData(); std::set_difference( oldData->m_files.begin(), oldData->m_files.end(), rhs.m_data->m_files.begin(), rhs.m_data->m_files.end(), std::insert_iterator( m_data->m_files, m_data->m_files.end() ) ); #else @@ -164,7 +164,7 @@ void HashedStringSet::makeDataPrivate() { m_data = new HashedStringSetData(); return ; } - if ( m_data->_KShared_count() != 1 ) + if ( m_data->_TDEShared_count() != 1 ) m_data = new HashedStringSetData( *m_data ); } diff --git a/lib/interfaces/hashedstring.h b/lib/interfaces/hashedstring.h index a039a771..c1bfd4ad 100644 --- a/lib/interfaces/hashedstring.h +++ b/lib/interfaces/hashedstring.h @@ -116,7 +116,7 @@ class HashedStringSet { private: friend class HashedStringSetGroup; void makeDataPrivate(); - KSharedPtr m_data; //this implies some additional cost because KShared's destructor is virtual. Maybe change that by copying KShared without the virtual destructor. + TDESharedPtr m_data; //this implies some additional cost because TDEShared's destructor is virtual. Maybe change that by copying TDEShared without the virtual destructor. friend HashedStringSet operator + ( const HashedStringSet& lhs, const HashedStringSet& rhs ); }; diff --git a/parts/classview/classviewwidget.cpp b/parts/classview/classviewwidget.cpp index cba88bf5..6fdf32ae 100644 --- a/parts/classview/classviewwidget.cpp +++ b/parts/classview/classviewwidget.cpp @@ -110,13 +110,13 @@ ClassViewWidget::~ClassViewWidget( ) } template - static bool selectItemG( ItemDom item, const TQMap, ListItemType*>& map ) + static bool selectItemG( ItemDom item, const TQMap, ListItemType*>& map ) { ModelType* c = dynamic_cast( &(*item) ); if( c ) { - KSharedPtr d( c ); - typename TQMap, ListItemType*>::ConstIterator it = map.find(d); + TDESharedPtr d( c ); + typename TQMap, ListItemType*>::ConstIterator it = map.find(d); if( it != map.end() ) { ( *it )->select(); return true; -- cgit v1.2.1