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 | 0254ebaa5e056092461fd585b6851d15faa43035 (patch) | |
tree | 2bf41a1c189b92dc1b9ab89e3ce392f8132214c4 /src/imagefactory.cpp | |
parent | fa071926f015f39711632b3fb9fe16004d93d0ec (diff) | |
download | tellico-0254ebaa5e056092461fd585b6851d15faa43035.tar.gz tellico-0254ebaa5e056092461fd585b6851d15faa43035.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/imagefactory.cpp')
-rw-r--r-- | src/imagefactory.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/imagefactory.cpp b/src/imagefactory.cpp index fe9fc6e..12b116d 100644 --- a/src/imagefactory.cpp +++ b/src/imagefactory.cpp @@ -157,13 +157,13 @@ const Tellico::Data::Image& ImageFactory::addImageImpl(const TQByteArray& data_, } // do not call imageById(), it causes infinite looping with Document::loadImage() - Data::Image* img = s_imageCache.tqfind(id_); + Data::Image* img = s_imageCache.find(id_); if(img) { myLog() << "ImageFactory::addImageImpl(TQByteArray) - already exists in cache: " << id_ << endl; return *img; } - img = s_imageDict.tqfind(id_); + img = s_imageDict.find(id_); if(img) { myLog() << "ImageFactory::addImageImpl(TQByteArray) - already exists in dict: " << id_ << endl; return *img; @@ -328,13 +328,13 @@ const Tellico::Data::Image& ImageFactory::imageById(const TQString& id_) { // first check the cache, used for images that are in the data file, or are only temporary // then the dict, used for images downloaded, but not yet saved anywhere - Data::Image* img = s_imageCache.tqfind(id_); + Data::Image* img = s_imageCache.find(id_); if(img) { // myLog() << "...imageById() - found in cache" << endl; return *img; } - img = s_imageDict.tqfind(id_); + img = s_imageDict.find(id_); if(img) { // myLog() << "...imageById() - found in dict" << endl; return *img; @@ -345,7 +345,7 @@ const Tellico::Data::Image& ImageFactory::imageById(const TQString& id_) { // also, the image info cache might not have it so check if the // id is a valid absolute url // yeah, it's probably slow - if((s_imageInfoMap.tqcontains(id_) && s_imageInfoMap[id_].linkOnly) || !KURL::isRelativeURL(id_)) { + if((s_imageInfoMap.contains(id_) && s_imageInfoMap[id_].linkOnly) || !KURL::isRelativeURL(id_)) { KURL u = id_; if(u.isValid()) { return addImageImpl(u, false, KURL(), true); @@ -369,9 +369,9 @@ const Tellico::Data::Image& ImageFactory::imageById(const TQString& id_) { // try to do a delayed loading of the image if(Data::Document::self()->loadImage(id_)) { // loadImage() could insert in either the cache or the dict! - img = s_imageCache.tqfind(id_); + img = s_imageCache.find(id_); if(!img) { - img = s_imageDict.tqfind(id_); + img = s_imageDict.find(id_); } if(img) { // myLog() << "...imageById() - found in doc" << endl; @@ -429,7 +429,7 @@ const Tellico::Data::Image& ImageFactory::imageById(const TQString& id_) { } Tellico::Data::ImageInfo ImageFactory::imageInfo(const TQString& id_) { - if(s_imageInfoMap.tqcontains(id_)) { + if(s_imageInfoMap.contains(id_)) { return s_imageInfoMap[id_]; } @@ -446,7 +446,7 @@ void ImageFactory::cacheImageInfo(const Data::ImageInfo& info) { bool ImageFactory::validImage(const TQString& id_) { // don't try s_imageInfoMap[id_] cause it inserts an empty image info - return s_imageInfoMap.tqcontains(id_) || hasImage(id_) || !imageById(id_).isNull(); + return s_imageInfoMap.contains(id_) || hasImage(id_) || !imageById(id_).isNull(); } TQPixmap ImageFactory::pixmap(const TQString& id_, int width_, int height_) { @@ -455,7 +455,7 @@ TQPixmap ImageFactory::pixmap(const TQString& id_, int width_, int height_) { } const TQString key = id_ + '|' + TQString::number(width_) + '|' + TQString::number(height_); - TQPixmap* pix = s_pixmapCache.tqfind(key); + TQPixmap* pix = s_pixmapCache.find(key); if(pix) { return *pix; } @@ -553,7 +553,7 @@ void ImageFactory::removeImage(const TQString& id_, bool deleteImage_) { Tellico::StringSet ImageFactory::imagesNotInCache() { StringSet set; for(TQDictIterator<Tellico::Data::Image> it(s_imageDict); it.current(); ++it) { - if(s_imageCache.tqfind(it.currentKey()) == 0) { + if(s_imageCache.find(it.currentKey()) == 0) { set.add(it.currentKey()); } } @@ -561,7 +561,7 @@ Tellico::StringSet ImageFactory::imagesNotInCache() { } bool ImageFactory::hasImage(const TQString& id_) { - return s_imageCache.tqfind(id_, false) || s_imageDict.tqfind(id_); + return s_imageCache.find(id_, false) || s_imageDict.find(id_); } // the purpose here is to remove images from the dict if they're is on the disk somewhere, @@ -576,7 +576,7 @@ void ImageFactory::releaseImages() { const TQStringList images = s_imagesToRelease.toList(); for(TQStringList::ConstIterator it = images.begin(); it != images.end(); ++it) { s_imagesToRelease.remove(*it); - if(!s_imageDict.tqfind(*it)) { + if(!s_imageDict.find(*it)) { continue; } // myLog() << "ImageFactory::releaseImage() - id = " << *it << endl; @@ -601,7 +601,7 @@ void ImageFactory::setLocalDirectory(const KURL& url_) { } else { s_localDir = url_.directory(false); // could have already been set once - if(!url_.fileName().tqcontains(TQString::tqfromLatin1("_files"))) { + if(!url_.fileName().contains(TQString::tqfromLatin1("_files"))) { s_localDir += url_.fileName().section('.', 0, 0) + TQString::tqfromLatin1("_files/"); } myLog() << "ImageFactory::setLocalDirectory() - local dir = " << s_localDir << endl; |