From 57443681e97fff553d94260756ebedaee606610f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 31 Jan 2013 00:19:26 -0600 Subject: [PATCH] Rename KShared --- src/borrower.cpp | 10 +++++----- src/borrower.h | 6 +++--- src/collection.cpp | 2 +- src/collection.h | 2 +- src/collectionfieldsdialog.cpp | 2 +- src/collections/bibtexcollection.cpp | 2 +- src/datavectors.h | 16 ++++++++-------- src/document.cpp | 2 +- src/entry.cpp | 8 ++++---- src/entry.h | 2 +- src/fetch/fetcher.h | 8 ++++---- src/fetch/fetchmanager.cpp | 2 +- src/fetch/z3950connection.h | 2 +- src/field.cpp | 8 ++++---- src/field.h | 2 +- src/filter.cpp | 2 +- src/filter.h | 4 ++-- src/ptrvector.h | 6 +++--- 18 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/borrower.cpp b/src/borrower.cpp index 594c946..48f8b03 100644 --- a/src/borrower.cpp +++ b/src/borrower.cpp @@ -19,11 +19,11 @@ using Tellico::Data::Loan; using Tellico::Data::Borrower; Loan::Loan(Data::EntryPtr entry, const TQDate& loanDate, const TQDate& dueDate, const TQString& note) - : KShared(), m_uid(Tellico::uid()), m_borrower(0), m_entry(entry), m_loanDate(loanDate), m_dueDate(dueDate), + : TDEShared(), m_uid(Tellico::uid()), m_borrower(0), m_entry(entry), m_loanDate(loanDate), m_dueDate(dueDate), m_note(note), m_inCalendar(false) { } -Loan::Loan(const Loan& other) : KShared(other), m_uid(Tellico::uid()), m_borrower(other.m_borrower), +Loan::Loan(const Loan& other) : TDEShared(other), m_uid(Tellico::uid()), m_borrower(other.m_borrower), m_entry(other.m_entry), m_loanDate(other.m_loanDate), m_dueDate(other.m_dueDate), m_note(other.m_note), m_inCalendar(false) { } @@ -37,17 +37,17 @@ Tellico::Data::EntryPtr Loan::entry() const { } Borrower::Borrower(const TQString& name_, const TQString& uid_) - : KShared(), m_name(name_), m_uid(uid_) { + : TDEShared(), m_name(name_), m_uid(uid_) { } Borrower::Borrower(const Borrower& b) - : KShared(b), m_name(b.m_name), m_uid(b.m_uid), m_loans(b.m_loans) { + : TDEShared(b), m_name(b.m_name), m_uid(b.m_uid), m_loans(b.m_loans) { } Borrower& Borrower::operator=(const Borrower& other_) { if(this == &other_) return *this; - static_cast(*this) = static_cast(other_); + static_cast(*this) = static_cast(other_); m_name = other_.m_name; m_uid = other_.m_uid; m_loans = other_.m_loans; diff --git a/src/borrower.h b/src/borrower.h index 7b6e051..81a5dc2 100644 --- a/src/borrower.h +++ b/src/borrower.h @@ -23,7 +23,7 @@ namespace Tellico { namespace Data { -class Loan : public KShared { +class Loan : public TDEShared { public: Loan(Data::EntryPtr entry, const TQDate& loanDate, const TQDate& dueDate, const TQString& note); @@ -60,14 +60,14 @@ private: bool m_inCalendar; }; -typedef KSharedPtr LoanPtr; +typedef TDESharedPtr LoanPtr; typedef Vector LoanVec; typedef LoanVec::Iterator LoanVecIt; /** * @author Robby Stephenson */ -class Borrower : public KShared { +class Borrower : public TDEShared { public: Borrower(const TQString& name, const TQString& uid); diff --git a/src/collection.cpp b/src/collection.cpp index b2dbb6f..6eaece8 100644 --- a/src/collection.cpp +++ b/src/collection.cpp @@ -33,7 +33,7 @@ const char* Collection::s_emptyGroupTitle = I18N_NOOP("(Empty)"); const TQString Collection::s_peopleGroupName = TQString::fromLatin1("_people"); Collection::Collection(const TQString& title_) - : TQObject(), KShared(), m_nextEntryId(0), m_title(title_), m_entryIdDict(997) + : TQObject(), TDEShared(), m_nextEntryId(0), m_title(title_), m_entryIdDict(997) , m_trackGroups(false) { m_entryGroupDicts.setAutoDelete(true); diff --git a/src/collection.h b/src/collection.h index 00aed05..e3ea284 100644 --- a/src/collection.h +++ b/src/collection.h @@ -47,7 +47,7 @@ namespace Tellico { * * @author Robby Stephenson */ -class Collection : public TQObject, public KShared { +class Collection : public TQObject, public TDEShared { Q_OBJECT diff --git a/src/collectionfieldsdialog.cpp b/src/collectionfieldsdialog.cpp index 90bf980..06d6473 100644 --- a/src/collectionfieldsdialog.cpp +++ b/src/collectionfieldsdialog.cpp @@ -438,7 +438,7 @@ void CollectionFieldsDialog::slotDelete() { m_fieldsBox->removeItem(m_fieldsBox->currentItem()); m_fieldsBox->setSelected(m_fieldsBox->currentItem(), true); m_fieldsBox->ensureCurrentVisible(); - m_currentField = static_cast(m_fieldsBox->selectedItem())->field(); // KShared gets auto-deleted + m_currentField = static_cast(m_fieldsBox->selectedItem())->field(); // TDEShared gets auto-deleted return; } diff --git a/src/collections/bibtexcollection.cpp b/src/collections/bibtexcollection.cpp index 3e580bb..0f45384 100644 --- a/src/collections/bibtexcollection.cpp +++ b/src/collections/bibtexcollection.cpp @@ -317,7 +317,7 @@ int BibtexCollection::sameEntry(Data::EntryPtr entry1_, Data::EntryPtr entry2_) // static Tellico::Data::CollPtr BibtexCollection::convertBookCollection(CollPtr coll_) { const TQString bibtex = TQString::fromLatin1("bibtex"); - KSharedPtr coll = new BibtexCollection(false, coll_->title()); + TDESharedPtr coll = new BibtexCollection(false, coll_->title()); FieldVec fields = coll_->fields(); for(FieldVec::Iterator fIt = fields.begin(); fIt != fields.end(); ++fIt) { FieldPtr field = new Data::Field(*fIt); diff --git a/src/datavectors.h b/src/datavectors.h index 14e38d6..73591e2 100644 --- a/src/datavectors.h +++ b/src/datavectors.h @@ -25,25 +25,25 @@ namespace Tellico { typedef TQMap StringMap; class Filter; - typedef KSharedPtr FilterPtr; + typedef TDESharedPtr FilterPtr; typedef Vector FilterVec; namespace Data { class Collection; - typedef KSharedPtr CollPtr; - typedef KSharedPtr ConstCollPtr; + typedef TDESharedPtr CollPtr; + typedef TDESharedPtr ConstCollPtr; typedef Vector CollVec; class Field; - typedef KSharedPtr FieldPtr; - typedef KSharedPtr ConstFieldPtr; + typedef TDESharedPtr FieldPtr; + typedef TDESharedPtr ConstFieldPtr; typedef Vector FieldVec; typedef FieldVec::Iterator FieldVecIt; // typedef Vector ConstFieldVec; class Entry; - typedef KSharedPtr EntryPtr; - typedef KSharedPtr ConstEntryPtr; + typedef TDESharedPtr EntryPtr; + typedef TDESharedPtr ConstEntryPtr; typedef Vector EntryVec; typedef EntryVec::Iterator EntryVecIt; typedef Vector ConstEntryVec; @@ -55,7 +55,7 @@ namespace Tellico { typedef TQPair MergePair; class Borrower; - typedef KSharedPtr BorrowerPtr; + typedef TDESharedPtr BorrowerPtr; typedef Vector BorrowerVec; } } diff --git a/src/document.cpp b/src/document.cpp index bbe426f..3ded4bc 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -260,7 +260,7 @@ void Document::deleteContents() { if(m_coll) { m_coll->clear(); } - m_coll = 0; // old collection gets deleted as a KSharedPtr + m_coll = 0; // old collection gets deleted as a TDESharedPtr m_cancelImageWriting = true; } diff --git a/src/entry.cpp b/src/entry.cpp index 801a9a4..514ee2d 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -73,7 +73,7 @@ bool Entry::operator==(const Entry& e1) { return true; } -Entry::Entry(CollPtr coll_) : KShared(), m_coll(coll_), m_id(-1) { +Entry::Entry(CollPtr coll_) : TDEShared(), m_coll(coll_), m_id(-1) { #ifndef NDEBUG if(!coll_) { kdWarning() << "Entry() - null collection pointer!" << endl; @@ -81,7 +81,7 @@ Entry::Entry(CollPtr coll_) : KShared(), m_coll(coll_), m_id(-1) { #endif } -Entry::Entry(CollPtr coll_, int id_) : KShared(), m_coll(coll_), m_id(id_) { +Entry::Entry(CollPtr coll_, int id_) : TDEShared(), m_coll(coll_), m_id(id_) { #ifndef NDEBUG if(!coll_) { kdWarning() << "Entry() - null collection pointer!" << endl; @@ -90,7 +90,7 @@ Entry::Entry(CollPtr coll_, int id_) : KShared(), m_coll(coll_), m_id(id_) { } Entry::Entry(const Entry& entry_) : - KShared(entry_), + TDEShared(entry_), m_coll(entry_.m_coll), m_id(-1), m_fields(entry_.m_fields), @@ -101,7 +101,7 @@ Entry& Entry::operator=(const Entry& other_) { if(this == &other_) return *this; // myDebug() << "Entry::operator=()" << endl; - static_cast(*this) = static_cast(other_); + static_cast(*this) = static_cast(other_); m_coll = other_.m_coll; m_id = other_.m_id; m_fields = other_.m_fields; diff --git a/src/entry.h b/src/entry.h index 88666de..92bda7c 100644 --- a/src/entry.h +++ b/src/entry.h @@ -65,7 +65,7 @@ private: * * @author Robby Stephenson */ -class Entry : public KShared { +class Entry : public TDEShared { public: /** diff --git a/src/fetch/fetcher.h b/src/fetch/fetcher.h index 42d3b23..80643fa 100644 --- a/src/fetch/fetcher.h +++ b/src/fetch/fetcher.h @@ -35,17 +35,17 @@ namespace Tellico { * * @author Robby Stephenson */ -class Fetcher : public TQObject, public KShared { +class Fetcher : public TQObject, public TDEShared { Q_OBJECT public: - typedef KSharedPtr Ptr; - typedef KSharedPtr CPtr; + typedef TDESharedPtr Ptr; + typedef TDESharedPtr CPtr; /** */ - Fetcher(TQObject* parent, const char* name = 0) : TQObject(parent, name), KShared(), + Fetcher(TQObject* parent, const char* name = 0) : TQObject(parent, name), TDEShared(), m_updateOverwrite(false), m_hasMoreResults(false), m_messager(0) {} /** diff --git a/src/fetch/fetchmanager.cpp b/src/fetch/fetchmanager.cpp index 7cec617..5bc1946 100644 --- a/src/fetch/fetchmanager.cpp +++ b/src/fetch/fetchmanager.cpp @@ -130,7 +130,7 @@ Tellico::Fetch::KeyMap Manager::keyMap(const TQString& source_) const { } // assume there's only one fetcher match - KSharedPtr f = 0; + TDESharedPtr f = 0; for(FetcherVec::ConstIterator it = m_fetchers.constBegin(); it != m_fetchers.constEnd(); ++it) { if(source_ == it->source()) { f = it.data(); diff --git a/src/fetch/z3950connection.h b/src/fetch/z3950connection.h index 2c49c37..674f17c 100644 --- a/src/fetch/z3950connection.h +++ b/src/fetch/z3950connection.h @@ -102,7 +102,7 @@ private: bool m_connected; bool m_aborted; - KSharedPtr m_fetcher; + TDESharedPtr m_fetcher; TQString m_host; uint m_port; TQString m_dbname; diff --git a/src/field.cpp b/src/field.cpp index 858abfd..469d41f 100644 --- a/src/field.cpp +++ b/src/field.cpp @@ -37,7 +37,7 @@ TQRegExp Field::s_delimiter = TQRegExp(TQString::fromLatin1("\\s*;\\s*")); // this constructor is for anything but Choice type Field::Field(const TQString& name_, const TQString& title_, Type type_/*=Line*/) - : KShared(), m_name(name_), m_title(title_), m_category(i18n("General")), m_desc(title_), + : TDEShared(), m_name(name_), m_title(title_), m_category(i18n("General")), m_desc(title_), m_type(type_), m_flags(0), m_formatFlag(FormatNone) { #ifndef NDEBUG @@ -69,13 +69,13 @@ Field::Field(const TQString& name_, const TQString& title_, Type type_/*=Line*/) // if this constructor is called, the type is necessarily Choice Field::Field(const TQString& name_, const TQString& title_, const TQStringList& allowed_) - : KShared(), m_name(name_), m_title(title_), m_category(i18n("General")), m_desc(title_), + : TDEShared(), m_name(name_), m_title(title_), m_category(i18n("General")), m_desc(title_), m_type(Field::Choice), m_allowed(allowed_), m_flags(0), m_formatFlag(FormatNone) { m_id = getID(); } Field::Field(const Field& field_) - : KShared(field_), m_name(field_.name()), m_title(field_.title()), m_category(field_.category()), + : TDEShared(field_), m_name(field_.name()), m_title(field_.title()), m_category(field_.category()), m_desc(field_.description()), m_type(field_.type()), m_flags(field_.flags()), m_formatFlag(field_.formatFlag()), m_properties(field_.propertyList()) { @@ -91,7 +91,7 @@ Field::Field(const Field& field_) Field& Field::operator=(const Field& field_) { if(this == &field_) return *this; - static_cast(*this) = static_cast(field_); + static_cast(*this) = static_cast(field_); m_name = field_.name(); m_title = field_.title(); m_category = field_.category(); diff --git a/src/field.h b/src/field.h index 653b466..f0b591a 100644 --- a/src/field.h +++ b/src/field.h @@ -31,7 +31,7 @@ namespace Tellico { * * @author Robby Stephenson */ -class Field : public KShared { +class Field : public TDEShared { public: /** * The possible field types. A Line is represented by a KLineEdit, diff --git a/src/filter.cpp b/src/filter.cpp index b1c522b..a18d341 100644 --- a/src/filter.cpp +++ b/src/filter.cpp @@ -106,7 +106,7 @@ bool FilterRule::matchesRegExp(Data::EntryPtr entry_) const { /*******************************************************/ -Filter::Filter(const Filter& other_) : TQPtrList(), KShared(), m_op(other_.op()), m_name(other_.name()) { +Filter::Filter(const Filter& other_) : TQPtrList(), TDEShared(), m_op(other_.op()), m_name(other_.name()) { for(TQPtrListIterator it(other_); it.current(); ++it) { append(new FilterRule(*it.current())); } diff --git a/src/filter.h b/src/filter.h index 34e75f5..09adb89 100644 --- a/src/filter.h +++ b/src/filter.h @@ -98,14 +98,14 @@ private: * * @author Robby Stephenson */ -class Filter : public TQPtrList, public KShared { +class Filter : public TQPtrList, public TDEShared { public: enum FilterOp { MatchAny, MatchAll }; - typedef KSharedPtr Ptr; + typedef TDESharedPtr Ptr; Filter(FilterOp op) : TQPtrList(), m_op(op) { setAutoDelete(true); } Filter(const Filter& other); diff --git a/src/ptrvector.h b/src/ptrvector.h index 727c29e..0e63743 100644 --- a/src/ptrvector.h +++ b/src/ptrvector.h @@ -37,7 +37,7 @@ public: VectorIterator(const VectorIterator& other) : m_vector(other.m_vector), m_index(other.m_index) {} // operator T*() { return m_vector->at(m_index).data(); } - operator KSharedPtr() { return m_vector->at(m_index); } + operator TDESharedPtr() { return m_vector->at(m_index); } T* operator->() { return m_vector->at(m_index).data(); } T& operator*() { return *m_vector->at(m_index); } T* data() { return m_vector->at(m_index).data(); } @@ -66,7 +66,7 @@ public: VectorConstIterator(const VectorIterator& other) : m_vector(other.m_vector), m_index(other.m_index) {} // operator const T*() { return m_vector->at(m_index).data(); } - operator KSharedPtr() { return m_vector->at(m_index); } + operator TDESharedPtr() { return m_vector->at(m_index); } const T* operator->() const { return m_vector->at(m_index).data(); } const T& operator*() const { return *m_vector->at(m_index); } const T* data() const { return m_vector->at(m_index).data(); } @@ -90,7 +90,7 @@ private: template class Vector { public: - typedef KSharedPtr Ptr; + typedef TDESharedPtr Ptr; typedef VectorIterator Iterator; typedef VectorConstIterator ConstIterator;