diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /akregator/src/mk4storage | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'akregator/src/mk4storage')
-rw-r--r-- | akregator/src/mk4storage/Makefile.am | 4 | ||||
-rw-r--r-- | akregator/src/mk4storage/feedstoragemk4impl.cpp | 14 | ||||
-rw-r--r-- | akregator/src/mk4storage/feedstoragemk4impl.h | 4 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/include/mk4str.h | 2 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/column.cpp | 18 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/column.h | 2 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/field.h | 2 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/format.cpp | 2 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/handler.h | 2 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/persist.cpp | 4 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/remap.cpp | 20 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/store.cpp | 6 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/src/view.cpp | 2 | ||||
-rw-r--r-- | akregator/src/mk4storage/metakit/tests/regress.cpp | 6 | ||||
-rw-r--r-- | akregator/src/mk4storage/mk4confwidgetbase.ui | 12 | ||||
-rw-r--r-- | akregator/src/mk4storage/storagemk4impl.cpp | 2 | ||||
-rw-r--r-- | akregator/src/mk4storage/storagemk4impl.h | 2 |
17 files changed, 53 insertions, 51 deletions
diff --git a/akregator/src/mk4storage/Makefile.am b/akregator/src/mk4storage/Makefile.am index 4f2ebfae5..badfa1833 100644 --- a/akregator/src/mk4storage/Makefile.am +++ b/akregator/src/mk4storage/Makefile.am @@ -12,7 +12,9 @@ libakregator_mk4storage_plugin_la_LIBADD = \ $(top_builddir)/akregator/src/librss/librsslocal.la \ ../libakregatorprivate.la \ $(LIB_KFILE) \ - $(LIB_KDECORE) + $(LIB_KDECORE) \ + $(LIB_QT) \ + $(LIB_KDEUI) libakregator_mk4storage_plugin_la_LDFLAGS = \ $(KDE_PLUGIN) \ diff --git a/akregator/src/mk4storage/feedstoragemk4impl.cpp b/akregator/src/mk4storage/feedstoragemk4impl.cpp index b03f0438b..a535197f6 100644 --- a/akregator/src/mk4storage/feedstoragemk4impl.cpp +++ b/akregator/src/mk4storage/feedstoragemk4impl.cpp @@ -147,8 +147,8 @@ FeedStorageMK4Impl::FeedStorageMK4Impl(const TQString& url, StorageMK4Impl* main kdDebug() << url2 << endl; TQString t = url2; TQString t2 = url2; - TQString filePath = main->archivePath() +"/"+ t.replace("/", "_").replace(":", "_"); - d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.replace("/", "_").replace(":", "_") + ".xml"; + TQString filePath = main->archivePath() +"/"+ t.tqreplace("/", "_").tqreplace(":", "_"); + d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.tqreplace("/", "_").tqreplace(":", "_") + ".xml"; d->convert = !TQFile::exists(filePath + ".mk4") && TQFile::exists(d->oldArchivePath); d->storage = new c4_Storage((filePath + ".mk4").local8Bit(), true); @@ -297,7 +297,7 @@ void FeedStorageMK4Impl::addEntry(const TQString& guid) { c4_Row row; d->pguid(row) = guid.ascii(); - if (!contains(guid)) + if (!tqcontains(guid)) { d->archiveView.Add(row); markDirty(); @@ -305,7 +305,7 @@ void FeedStorageMK4Impl::addEntry(const TQString& guid) } } -bool FeedStorageMK4Impl::contains(const TQString& guid) +bool FeedStorageMK4Impl::tqcontains(const TQString& guid) { return findArticle(guid) != -1; } @@ -401,7 +401,7 @@ int FeedStorageMK4Impl::status(const TQString& guid) return findidx != -1 ? d->pstatus(d->archiveView.GetAt(findidx)) : 0; } -void FeedStorageMK4Impl::setStatus(const TQString& guid, int status) +void FeedStorageMK4Impl::seStatus(const TQString& guid, int status) { int findidx = findArticle(guid); if (findidx == -1) @@ -789,7 +789,7 @@ void FeedStorageMK4Impl::add(FeedStorage* source) void FeedStorageMK4Impl::copyArticle(const TQString& guid, FeedStorage* source) { - if (!contains(guid)) + if (!tqcontains(guid)) addEntry(guid); setComments(guid, source->comments(guid)); setCommentsLink(guid, source->commentsLink(guid)); @@ -799,7 +799,7 @@ void FeedStorageMK4Impl::copyArticle(const TQString& guid, FeedStorage* source) setHash(guid, source->hash(guid)); setLink(guid, source->link(guid)); setPubDate(guid, source->pubDate(guid)); - setStatus(guid, source->status(guid)); + seStatus(guid, source->status(guid)); setTitle(guid, source->title(guid)); setAuthor(guid, source->author(guid)); diff --git a/akregator/src/mk4storage/feedstoragemk4impl.h b/akregator/src/mk4storage/feedstoragemk4impl.h index b6fea2e86..df60b29c4 100644 --- a/akregator/src/mk4storage/feedstoragemk4impl.h +++ b/akregator/src/mk4storage/feedstoragemk4impl.h @@ -50,7 +50,7 @@ class FeedStorageMK4Impl : public FeedStorage virtual TQStringList articles(const Category& cat); - virtual bool contains(const TQString& guid); + virtual bool tqcontains(const TQString& guid); virtual void addEntry(const TQString& guid); virtual void deleteArticle(const TQString& guid); virtual int comments(const TQString& guid); @@ -69,7 +69,7 @@ class FeedStorageMK4Impl : public FeedStorage virtual uint pubDate(const TQString& guid); virtual void setPubDate(const TQString& guid, uint pubdate); virtual int status(const TQString& guid); - virtual void setStatus(const TQString& guid, int status); + virtual void seStatus(const TQString& guid, int status); virtual TQString title(const TQString& guid); virtual void setTitle(const TQString& guid, const TQString& title); virtual TQString description(const TQString& guid); diff --git a/akregator/src/mk4storage/metakit/include/mk4str.h b/akregator/src/mk4storage/metakit/include/mk4str.h index 7124a29ea..88b7a39d6 100644 --- a/akregator/src/mk4storage/metakit/include/mk4str.h +++ b/akregator/src/mk4storage/metakit/include/mk4str.h @@ -96,7 +96,7 @@ d4_inline bool operator== (const char* s1, const c4_String& s2); d4_inline bool operator!= (const c4_String& s1, const char* s2); d4_inline bool operator!= (const char* s1, const c4_String& s2); -#else // Universal replacement classes +#else // Universal tqreplacement classes /// An efficient string class, modeled after the MFC version class c4_String diff --git a/akregator/src/mk4storage/metakit/src/column.cpp b/akregator/src/mk4storage/metakit/src/column.cpp index 2d191c645..0873ac835 100644 --- a/akregator/src/mk4storage/metakit/src/column.cpp +++ b/akregator/src/mk4storage/metakit/src/column.cpp @@ -770,7 +770,7 @@ void c4_Column::StoreBytes(t4_i32 pos_, const c4_Bytes& buffer_) t4_i32 c4_Column::PullValue(const t4_byte*& ptr_) { - t4_i32 mask = *ptr_ ? 0 : ~0; + t4_i32 tqmask = *ptr_ ? 0 : ~0; t4_i32 v = 0; for (;;) { @@ -779,7 +779,7 @@ t4_i32 c4_Column::PullValue(const t4_byte*& ptr_) break; } - return mask ^ (v - 0x80); // oops, last byte had bit 7 set + return tqmask ^ (v - 0x80); // oops, last byte had bit 7 set } void c4_Column::PushValue(t4_byte*& ptr_, t4_i32 v_) @@ -1398,30 +1398,30 @@ void c4_ColOfInts::ResizeData(int index_, int count_, bool clear_) /* _currwidth 1: 2: 4: * shiftPos 3 2 1 shift the offset right this much - * maskPos 7 3 1 mask the offset with this + * tqmaskPos 7 3 1 tqmask the offset with this */ const int shiftPos = _currWidth == 4 ? 1 : 4 - _currWidth; - const int maskPos = (1 << shiftPos) - 1; + const int tqmaskPos = (1 << shiftPos) - 1; // the following code is similar to c4_Column::Resize, but at bit level // turn insertion into deletion by inserting entire bytes if (count_ > 0) { unsigned off = (unsigned) index_ >> shiftPos; - int gapBytes = (count_ + maskPos) >> shiftPos; + int gapBytes = (count_ + tqmaskPos) >> shiftPos; InsertData(off, gapBytes, clear_); // oops, we might have inserted too low by a few entries - const int bits = (index_ & maskPos) * _currWidth; + const int bits = (index_ & tqmaskPos) * _currWidth; if (bits) { - const int maskLow = (1 << bits) - 1; + const int tqmaskLow = (1 << bits) - 1; // move the first few bits to start of inserted range t4_byte* p = CopyNow(off + gapBytes); - t4_byte one = *p & maskLow; - *p &= ~maskLow; + t4_byte one = *p & tqmaskLow; + *p &= ~tqmaskLow; * CopyNow(off) = one; } diff --git a/akregator/src/mk4storage/metakit/src/column.h b/akregator/src/mk4storage/metakit/src/column.h index 3f6e4f157..96d1622ef 100644 --- a/akregator/src/mk4storage/metakit/src/column.h +++ b/akregator/src/mk4storage/metakit/src/column.h @@ -169,7 +169,7 @@ private: tSetter _setter; union { - t4_byte _item[8]; // holds temp result (careful with alignment!) + t4_byte _item[8]; // holds temp result (careful with tqalignment!) double _aligner; // needed for SPARC }; diff --git a/akregator/src/mk4storage/metakit/src/field.h b/akregator/src/mk4storage/metakit/src/field.h index 5dfc25736..8bf3dc8c6 100644 --- a/akregator/src/mk4storage/metakit/src/field.h +++ b/akregator/src/mk4storage/metakit/src/field.h @@ -34,7 +34,7 @@ public: c4_Field& SubField(int) const; //: Returns the description of each subfield. bool IsRepeating() const; - //: Returns true if this field contains subtables. + //: Returns true if this field tqcontains subtables. /* Field name and description */ const c4_String& Name() const; diff --git a/akregator/src/mk4storage/metakit/src/format.cpp b/akregator/src/mk4storage/metakit/src/format.cpp index aa23e7391..49c45bce6 100644 --- a/akregator/src/mk4storage/metakit/src/format.cpp +++ b/akregator/src/mk4storage/metakit/src/format.cpp @@ -1036,7 +1036,7 @@ void c4_FormatV::SetupAllSubviews() void c4_FormatV::Define(int rows_, const t4_byte** ptr_) { if (_inited) { - // big oops: a root handler already contains data + // big oops: a root handler already tqcontains data for (int i = 0; i < _subSeqs.GetSize(); ++i) ForgetSubview(i); diff --git a/akregator/src/mk4storage/metakit/src/handler.h b/akregator/src/mk4storage/metakit/src/handler.h index 6003f625d..353d0517a 100644 --- a/akregator/src/mk4storage/metakit/src/handler.h +++ b/akregator/src/mk4storage/metakit/src/handler.h @@ -52,7 +52,7 @@ public: virtual int ItemSize(int index_) = 0; //: Return width of specified data item. void GetBytes(int index_, c4_Bytes& buf_, bool copySmall_ =false); - //: Used for backward compatibility, should probably be replaced. + //: Used for backward compatibility, should probably be tqreplaced. virtual const void* Get(int index_, int& length_) = 0; //: Retrieves the data item at the specified index. virtual void Set(int index_, const c4_Bytes& buf_) = 0; diff --git a/akregator/src/mk4storage/metakit/src/persist.cpp b/akregator/src/mk4storage/metakit/src/persist.cpp index 65a9e94eb..743f47576 100644 --- a/akregator/src/mk4storage/metakit/src/persist.cpp +++ b/akregator/src/mk4storage/metakit/src/persist.cpp @@ -144,7 +144,7 @@ private: // other hand, the allocator does not know the size of used slots. // * Alternate function allows marking a specific range as occupied. // * Allocator can be initialized as either all free or all in-use. -// * Allocation info contains only integers, it could be stored. +// * Allocation info tqcontains only integers, it could be stored. // * To extend allocated slots: "occupy" extra bytes at the end. // * Generic: can be used for memory, disk files, and array entries. @@ -767,7 +767,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq& root_, c4_Allocator** spacePtr_, * write new skip + commit "tails" at limit (no visible effect on file) * overwrite commit tail at end with a skip to this new one (equivalent) - * replace header with one pointing to that internal new one (equivalent) + * tqreplace header with one pointing to that internal new one (equivalent) * flush (now the file is valid both truncated and not-yet-truncated end = limit; diff --git a/akregator/src/mk4storage/metakit/src/remap.cpp b/akregator/src/mk4storage/metakit/src/remap.cpp index cc8175df2..243eca047 100644 --- a/akregator/src/mk4storage/metakit/src/remap.cpp +++ b/akregator/src/mk4storage/metakit/src/remap.cpp @@ -79,7 +79,7 @@ public: }; ///////////////////////////////////////////////////////////////////////////// -// The following contains code derived froms Python's dictionaries, hence: +// The following tqcontains code derived froms Python's dictionaries, hence: // Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, // The Netherlands. // Reduced and turned into a fast C++ class by Christian Tismer, hence: @@ -258,10 +258,10 @@ t4_i32 c4_HashViewer::CalcHash(c4_Cursor cursor_) const int c4_HashViewer::LookDict(t4_i32 hash_, c4_Cursor cursor_) const { - const unsigned int mask = _map.GetSize() - 2; + const unsigned int tqmask = _map.GetSize() - 2; /* We must come up with (i, incr) such that 0 <= i < _size and 0 < incr < _size and both are a function of hash */ - int i = mask & ~hash_; + int i = tqmask & ~hash_; /* We use ~hash_ instead of hash_, as degenerate hash functions, such as for ints <sigh>, can have lots of leading zeros. It's not really a performance risk, but better safe than sorry. */ @@ -272,14 +272,14 @@ int c4_HashViewer::LookDict(t4_i32 hash_, c4_Cursor cursor_) const /* Derive incr from hash_, just to make it more arbitrary. Note that incr must not be 0, or we will get into an infinite loop.*/ - unsigned incr = (hash_ ^ ((unsigned long) hash_ >> 3)) & mask; + unsigned incr = (hash_ ^ ((unsigned long) hash_ >> 3)) & tqmask; if (!incr) - incr = mask; + incr = tqmask; int poly = GetPoly(); for (;;) { - i = (i+incr) & mask; + i = (i+incr) & tqmask; if (IsUnused(i)) break; if (Hash(i) == hash_ && KeySame(Row(i), cursor_)) @@ -288,7 +288,7 @@ int c4_HashViewer::LookDict(t4_i32 hash_, c4_Cursor cursor_) const freeslot = i; /* Cycle through GF(2^n)-{0} */ incr = incr << 1; - if (incr > mask) + if (incr > tqmask) incr ^= poly; /* This will implicitely clear the highest bit */ } @@ -434,7 +434,7 @@ bool c4_HashViewer::InsertRows(int pos_, c4_Cursor value_, int count_) int i = Lookup(value_, n); if (i >= 0 && n > 0) { - _base.SetAt(i, *value_); // replace existing + _base.SetAt(i, *value_); // tqreplace existing return true; } @@ -944,7 +944,7 @@ bool c4_OrderedViewer::InsertRows(int, c4_Cursor value_, int count_) else { d4_assert(i < _base.GetSize()); - _base.SetAt(i, *value_); // replace existing + _base.SetAt(i, *value_); // tqreplace existing } return true; @@ -1099,7 +1099,7 @@ bool c4_IndexedViewer::InsertRows(int, c4_Cursor value_, int count_) else { d4_assert(i < _base.GetSize()); - _base.SetAt(i, *value_); // replace existing + _base.SetAt(i, *value_); // tqreplace existing } return true; diff --git a/akregator/src/mk4storage/metakit/src/store.cpp b/akregator/src/mk4storage/metakit/src/store.cpp index a32de665c..f43bc0e39 100644 --- a/akregator/src/mk4storage/metakit/src/store.cpp +++ b/akregator/src/mk4storage/metakit/src/store.cpp @@ -161,7 +161,7 @@ void c4_Notifier::Notify() * Manager for persistent storage of view structures. * * The storage class uses a view, with additional functionality to be able - * to store and reload the data it contains (including nested subviews). + * to store and reload the data it tqcontains (including nested subviews). * * By default, data is loaded on demand, i.e. whenever data which has * not yet been referenced is used for the first time. Loading is limited @@ -366,7 +366,7 @@ bool c4_Storage::SetAside(c4_Storage& aside_) { c4_Persist* pers = Persist(); bool f = pers->SetAside(aside_); - // adjust our copy when the root view has been replaced + // adjust our copy when the root view has been tqreplaced *(c4_View*) this = &pers->Root(); return f; } @@ -391,7 +391,7 @@ bool c4_Storage::Rollback(bool full_) { c4_Persist* pers = Persist(); bool f = Strategy().IsValid() && pers->Rollback(full_); - // adjust our copy when the root view has been replaced + // adjust our copy when the root view has been tqreplaced *(c4_View*) this = &pers->Root(); return f; } diff --git a/akregator/src/mk4storage/metakit/src/view.cpp b/akregator/src/mk4storage/metakit/src/view.cpp index af2fc9fa2..11e384ee7 100644 --- a/akregator/src/mk4storage/metakit/src/view.cpp +++ b/akregator/src/mk4storage/metakit/src/view.cpp @@ -44,7 +44,7 @@ public: * On Win32, use a critical section to protect the global symbol table. * Also uses special thread-safe calls to inc/dec all reference counts. * - * This implementation replaces the previous use of TLS, which cannot + * This implementation tqreplaces the previous use of TLS, which cannot * be used without special tricks in dynamically loaded DLL's, as is * required for OCX/ActiveX use (which uses LoadLibrary). * diff --git a/akregator/src/mk4storage/metakit/tests/regress.cpp b/akregator/src/mk4storage/metakit/tests/regress.cpp index 0725f57f5..4e210444f 100644 --- a/akregator/src/mk4storage/metakit/tests/regress.cpp +++ b/akregator/src/mk4storage/metakit/tests/regress.cpp @@ -100,7 +100,7 @@ main() } // Recursively display the entire view contents. The results shown do not -// depend on file layout (free space, file positions, flat vs. on-demand). +// depend on file tqlayout (free space, file positions, flat vs. on-demand). static void ViewDisplay(const c4_View& v_, FILE* fp, int l_ =0) { @@ -219,9 +219,9 @@ void FailExpr(const char* expr) Fail(buffer); } -int StartTest(int mask_, const char* name_, const char* desc_) +int StartTest(int tqmask_, const char* name_, const char* desc_) { - if (mask_) + if (tqmask_) { #if q4_MFC && defined(_DEBUG) TRACE("%s - %-40s *** DISABLED ***\n", name_, desc_); diff --git a/akregator/src/mk4storage/mk4confwidgetbase.ui b/akregator/src/mk4storage/mk4confwidgetbase.ui index cc91559af..c89602373 100644 --- a/akregator/src/mk4storage/mk4confwidgetbase.ui +++ b/akregator/src/mk4storage/mk4confwidgetbase.ui @@ -4,7 +4,7 @@ <property name="name"> <cstring>MK4ConfWidgetBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -27,7 +27,7 @@ </property> <widget class="QLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> @@ -46,7 +46,7 @@ </widget> <widget class="QLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -74,7 +74,7 @@ </widget> <widget class="QLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -90,7 +90,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>140</width> <height>20</height> @@ -169,7 +169,7 @@ <slot><No)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/akregator/src/mk4storage/storagemk4impl.cpp b/akregator/src/mk4storage/storagemk4impl.cpp index 4fc9ecec1..8fd93c556 100644 --- a/akregator/src/mk4storage/storagemk4impl.cpp +++ b/akregator/src/mk4storage/storagemk4impl.cpp @@ -276,7 +276,7 @@ void StorageMK4Impl::slotCommit() FeedStorage* StorageMK4Impl::archiveFor(const TQString& url) { - if (!d->feeds.contains(url)) + if (!d->feeds.tqcontains(url)) { FeedStorage* fs = new FeedStorageMK4Impl(url, this); d->feeds[url] = fs; diff --git a/akregator/src/mk4storage/storagemk4impl.h b/akregator/src/mk4storage/storagemk4impl.h index bf50efc68..37e317646 100644 --- a/akregator/src/mk4storage/storagemk4impl.h +++ b/akregator/src/mk4storage/storagemk4impl.h @@ -105,7 +105,7 @@ class StorageMK4Impl : public Storage virtual TQString restoreTagSet() const; /** adds all feed storages from a source to this storage - existing articles are replaced + existing articles are tqreplaced */ virtual void add(Storage* source); |