diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 80ee419f074dc252449791628d4584b5c0ea0c9b (patch) | |
tree | fba229106f296da317a8f925f32d76841386c026 /src/base | |
parent | bb426283a6b45a18f99a8be445438e8f4deeea55 (diff) | |
download | rosegarden-80ee419f074dc252449791628d4584b5c0ea0c9b.tar.gz rosegarden-80ee419f074dc252449791628d4584b5c0ea0c9b.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/Clipboard.h | 2 | ||||
-rw-r--r-- | src/base/ColourMap.h | 2 | ||||
-rw-r--r-- | src/base/Composition.cpp | 12 | ||||
-rw-r--r-- | src/base/Composition.h | 6 | ||||
-rw-r--r-- | src/base/Event.cpp | 12 | ||||
-rw-r--r-- | src/base/Event.h | 18 | ||||
-rw-r--r-- | src/base/Instrument.h | 2 | ||||
-rw-r--r-- | src/base/SegmentNotationHelper.cpp | 4 | ||||
-rw-r--r-- | src/base/Selection.cpp | 14 | ||||
-rw-r--r-- | src/base/Selection.h | 4 | ||||
-rw-r--r-- | src/base/Sets.h | 6 |
11 files changed, 41 insertions, 41 deletions
diff --git a/src/base/Clipboard.h b/src/base/Clipboard.h index 9400698..e205e33 100644 --- a/src/base/Clipboard.h +++ b/src/base/Clipboard.h @@ -35,7 +35,7 @@ class EventSelection; * editing operations. Conceptually it has two "modes", * single-segment and multiple-segment, although there's no particular * distinction behind the scenes. The Clipboard owns all the segments - * it tqcontains -- they should always be deep copies, not aliases. + * it contains -- they should always be deep copies, not aliases. */ class Clipboard diff --git a/src/base/ColourMap.h b/src/base/ColourMap.h index 1cb54dc..973c1e0 100644 --- a/src/base/ColourMap.h +++ b/src/base/ColourMap.h @@ -111,7 +111,7 @@ public: */ bool swapItems(unsigned int item_1, unsigned int item_2); -// void tqreplace(ColourMap &input); +// void replace(ColourMap &input); /** * This returns a const iterator pointing to m_map.begin() diff --git a/src/base/Composition.cpp b/src/base/Composition.cpp index 7c808e1..cde3a8b 100644 --- a/src/base/Composition.cpp +++ b/src/base/Composition.cpp @@ -102,7 +102,7 @@ Composition::ReferenceSegment::getDuration() const } Composition::ReferenceSegment::iterator -Composition::ReferenceSegment::tqfind(Event *e) +Composition::ReferenceSegment::find(Event *e) { return std::lower_bound (begin(), end(), e, ReferenceSegmentEventCmp()); @@ -116,7 +116,7 @@ Composition::ReferenceSegment::insert(Event *e) m_eventType, e->getType(), __FILE__, __LINE__); } - iterator i = tqfind(e); + iterator i = find(e); if (i != end() && (*i)->getAbsoluteTime() == e->getAbsoluteTime()) { @@ -133,7 +133,7 @@ Composition::ReferenceSegment::insert(Event *e) void Composition::ReferenceSegment::erase(Event *e) { - iterator i = tqfind(e); + iterator i = find(e); if (i != end()) Impl::erase(i); } @@ -141,7 +141,7 @@ Composition::ReferenceSegment::iterator Composition::ReferenceSegment::findTime(timeT t) { Event dummy("dummy", t, 0, MIN_SUBORDERING); - return tqfind(&dummy); + return find(&dummy); } Composition::ReferenceSegment::iterator @@ -150,7 +150,7 @@ Composition::ReferenceSegment::findRealTime(RealTime t) Event dummy("dummy", 0, 0, MIN_SUBORDERING); dummy.set<Bool>(NoAbsoluteTimeProperty, true); setTempoTimestamp(&dummy, t); - return tqfind(&dummy); + return find(&dummy); } Composition::ReferenceSegment::iterator @@ -298,7 +298,7 @@ Composition::weakDetachSegment(Segment *segment) } bool -Composition::tqcontains(const Segment *s) +Composition::contains(const Segment *s) { iterator i = findSegment(s); return (i != end()); diff --git a/src/base/Composition.h b/src/base/Composition.h index 5a1b0ac..b2f80a3 100644 --- a/src/base/Composition.h +++ b/src/base/Composition.h @@ -254,7 +254,7 @@ public: /** * Test whether a Segment exists in this Composition. */ - bool tqcontains(const Segment *); + bool contains(const Segment *); /** * Return an iterator pointing at the given Segment, or end() @@ -437,7 +437,7 @@ public: } /** - * Return the starting and ending times of the bar that tqcontains + * Return the starting and ending times of the bar that contains * time t. * * Will happily return theoretical timings for bars before the @@ -906,7 +906,7 @@ protected: std::string getEventType() const { return m_eventType; } private: - iterator tqfind(Event *e); + iterator find(Event *e); std::string m_eventType; }; diff --git a/src/base/Event.cpp b/src/base/Event.cpp index c5608b7..e63e51b 100644 --- a/src/base/Event.cpp +++ b/src/base/Event.cpp @@ -118,7 +118,7 @@ Event::EventData::setTime(const PropertyName &name, timeT t, timeT deft) } PropertyMap * -Event::tqfind(const PropertyName &name, PropertyMap::iterator &i) +Event::find(const PropertyName &name, PropertyMap::iterator &i) { PropertyMap *map = m_data->m_properties; @@ -142,7 +142,7 @@ Event::has(const PropertyName &name) const #endif PropertyMap::const_iterator i; - const PropertyMap *map = tqfind(name, i); + const PropertyMap *map = find(name, i); if (map) return true; else return false; } @@ -156,7 +156,7 @@ Event::unset(const PropertyName &name) unshare(); PropertyMap::iterator i; - PropertyMap *map = tqfind(name, i); + PropertyMap *map = find(name, i); if (map) { delete i->second; map->erase(i); @@ -169,7 +169,7 @@ Event::getPropertyType(const PropertyName &name) const // throw (NoData) { PropertyMap::const_iterator i; - const PropertyMap *map = tqfind(name, i); + const PropertyMap *map = find(name, i); if (map) { return i->second->getType(); } else { @@ -183,7 +183,7 @@ Event::getPropertyTypeAsString(const PropertyName &name) const // throw (NoData) { PropertyMap::const_iterator i; - const PropertyMap *map = tqfind(name, i); + const PropertyMap *map = find(name, i); if (map) { return i->second->getTypeName(); } else { @@ -197,7 +197,7 @@ Event::getAsString(const PropertyName &name) const // throw (NoData) { PropertyMap::const_iterator i; - const PropertyMap *map = tqfind(name, i); + const PropertyMap *map = find(name, i); if (map) { return i->second->unparse(); } else { diff --git a/src/base/Event.h b/src/base/Event.h index 987929c..f236681 100644 --- a/src/base/Event.h +++ b/src/base/Event.h @@ -363,12 +363,12 @@ private: } // returned iterator (in i) only valid if return map value is non-zero - PropertyMap *tqfind(const PropertyName &name, PropertyMap::iterator &i); + PropertyMap *find(const PropertyName &name, PropertyMap::iterator &i); - const PropertyMap *tqfind(const PropertyName &name, + const PropertyMap *find(const PropertyName &name, PropertyMap::const_iterator &i) const { PropertyMap::iterator j; - PropertyMap *map = const_cast<Event *>(this)->tqfind(name, j); + PropertyMap *map = const_cast<Event *>(this)->find(name, j); i = j; return map; } @@ -400,7 +400,7 @@ Event::get(const PropertyName &name, typename PropertyDefn<P>::basic_type &val) #endif PropertyMap::const_iterator i; - const PropertyMap *map = tqfind(name, i); + const PropertyMap *map = find(name, i); if (map) { @@ -434,7 +434,7 @@ Event::get(const PropertyName &name) const #endif PropertyMap::const_iterator i; - const PropertyMap *map = tqfind(name, i); + const PropertyMap *map = find(name, i); if (map) { @@ -464,7 +464,7 @@ Event::isPersistent(const PropertyName &name) const // throw (NoData) { PropertyMap::const_iterator i; - const PropertyMap *map = tqfind(name, i); + const PropertyMap *map = find(name, i); if (map) { return (map == m_data->m_properties); @@ -481,7 +481,7 @@ Event::setPersistence(const PropertyName &name, bool persistent) { unshare(); PropertyMap::iterator i; - PropertyMap *map = tqfind(name, i); + PropertyMap *map = find(name, i); if (map) { insert(*i, persistent); @@ -506,7 +506,7 @@ Event::set(const PropertyName &name, typename PropertyDefn<P>::basic_type value, unshare(); PropertyMap::iterator i; - PropertyMap *map = tqfind(name, i); + PropertyMap *map = find(name, i); if (map) { bool persistentBefore = (map == m_data->m_properties); @@ -547,7 +547,7 @@ Event::setMaybe(const PropertyName &name, typename PropertyDefn<P>::basic_type v unshare(); PropertyMap::iterator i; - PropertyMap *map = tqfind(name, i); + PropertyMap *map = find(name, i); if (map) { if (map == m_data->m_properties) return; // persistent, so ignore it diff --git a/src/base/Instrument.h b/src/base/Instrument.h index 4665486..fe1bc98 100644 --- a/src/base/Instrument.h +++ b/src/base/Instrument.h @@ -28,7 +28,7 @@ #include "XmlExportable.h" #include "MidiProgram.h" -// An Instrument connects a Track (which itself tqcontains +// An Instrument connects a Track (which itself contains // a list of Segments) to a device that can play that // Track. // diff --git a/src/base/SegmentNotationHelper.cpp b/src/base/SegmentNotationHelper.cpp index c942cf4..33dfe70 100644 --- a/src/base/SegmentNotationHelper.cpp +++ b/src/base/SegmentNotationHelper.cpp @@ -953,7 +953,7 @@ SegmentNotationHelper::insertSomething(iterator i, int duration, if (needToSplit) { //!!! This is not quite right for rests. Because they - //tqreplace (rather than chording with) any events already + //replace (rather than chording with) any events already //present, they don't need to be split in the case where //their duration spans several note-events. Worry about //that later, I guess. We're actually getting enough @@ -1125,7 +1125,7 @@ SegmentNotationHelper::deleteNote(Event *e, bool collapseRest) // or start after this one starts but before it ends, then we go // for the delete-event-and-normalize-rests option. Otherwise // (the notationally simpler case) we go for the - // tqreplace-note-by-rest option. We still lose in the case where + // replace-note-by-rest option. We still lose in the case where // another note starts before this one, overlaps it, but then also // ends before it does -- but I think we can live with that. diff --git a/src/base/Selection.cpp b/src/base/Selection.cpp index 3402915..6e5ca2f 100644 --- a/src/base/Selection.cpp +++ b/src/base/Selection.cpp @@ -99,7 +99,7 @@ void EventSelection::addEvent(Event *e) timeT eventDuration = e->getDuration(); if (eventDuration == 0) eventDuration = 1; - if (tqcontains(e)) return; + if (contains(e)) return; if (e->getAbsoluteTime() < m_beginTime || !m_haveRealStartTime) { m_beginTime = e->getAbsoluteTime(); @@ -115,7 +115,7 @@ void EventSelection::addFromSelection(EventSelection *sel) { for (eventcontainer::iterator i = sel->getSegmentEvents().begin(); i != sel->getSegmentEvents().end(); ++i) { - if (!tqcontains(*i)) addEvent(*i); + if (!contains(*i)) addEvent(*i); } } @@ -134,7 +134,7 @@ void EventSelection::removeEvent(Event *e) } } -bool EventSelection::tqcontains(Event *e) const +bool EventSelection::contains(Event *e) const { std::pair<eventcontainer::const_iterator, eventcontainer::const_iterator> interval = m_segmentEvents.equal_range(e); @@ -148,7 +148,7 @@ bool EventSelection::tqcontains(Event *e) const return false; } -bool EventSelection::tqcontains(const std::string &type) const +bool EventSelection::contains(const std::string &type) const { for (eventcontainer::const_iterator i = m_segmentEvents.begin(); i != m_segmentEvents.end(); ++i) { @@ -173,13 +173,13 @@ EventSelection::getRanges() const while (j != k) { - for (j = i; j != k && tqcontains(*j); ++j); + for (j = i; j != k && contains(*j); ++j); if (j != i) { ranges.push_back(RangeList::value_type(i, j)); } - for (i = j; i != k && !tqcontains(*i); ++i); + for (i = j; i != k && !contains(*i); ++i); j = i; } @@ -210,7 +210,7 @@ EventSelection::getRangeTimes() const void EventSelection::eventRemoved(const Segment *s, Event *e) { - if (s == &m_originalSegment /*&& tqcontains(e)*/) { + if (s == &m_originalSegment /*&& contains(e)*/) { removeEvent(e); } } diff --git a/src/base/Selection.h b/src/base/Selection.h index c0a3c7b..93ce4b4 100644 --- a/src/base/Selection.h +++ b/src/base/Selection.h @@ -82,13 +82,13 @@ public: * Test whether a given Event (in the Segment) is part of * this selection. */ - bool tqcontains(Event *e) const; + bool contains(Event *e) const; /** * Return true if there are any events of the given type in * this selection. Slow. */ - bool tqcontains(const std::string &eventType) const; + bool contains(const std::string &eventType) const; /** * Return the time at which the first Event in the selection diff --git a/src/base/Sets.h b/src/base/Sets.h index 9884207..4fe14d1 100644 --- a/src/base/Sets.h +++ b/src/base/Sets.h @@ -103,7 +103,7 @@ public: Iterator getHighestNote() const { return m_highest; } Iterator getLowestNote() const { return m_lowest; } - virtual bool tqcontains(const Iterator &) const = 0; + virtual bool contains(const Iterator &) const = 0; /// Return the pointed-to element, in Event form (public to work around gcc-2.95 bug) static Event *getAsEvent(const Iterator &i); @@ -175,7 +175,7 @@ public: virtual int getMarkCountForChord() const; virtual std::vector<Mark> getMarksForChord() const; virtual std::vector<int> getPitches() const; - virtual bool tqcontains(const Iterator &) const; + virtual bool contains(const Iterator &) const; /** * Return an iterator pointing to the previous note before this @@ -622,7 +622,7 @@ GenericChord<Element, Container, singleStaff>::getPitches() const template <class Element, class Container, bool singleStaff> bool -GenericChord<Element, Container, singleStaff>::tqcontains(const Iterator &itr) const +GenericChord<Element, Container, singleStaff>::contains(const Iterator &itr) const { for (typename std::vector<typename Container::iterator>::const_iterator i = std::vector<typename Container::iterator>::begin(); |