diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-16 02:40:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-16 02:40:35 +0000 |
commit | bab40890696ec68c337dc290880423a0602b83c7 (patch) | |
tree | 6ba03f720b1fa88235ba339e7aedb4455430357e /khtml/misc | |
parent | f7e71d47719ab6094cf4a9fafffa5ea351973522 (diff) | |
download | tdelibs-bab40890696ec68c337dc290880423a0602b83c7.tar.gz tdelibs-bab40890696ec68c337dc290880423a0602b83c7.zip |
Finished remaining porting to new TQt API
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214736 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/misc')
-rw-r--r-- | khtml/misc/knsplugininstaller.cpp | 2 | ||||
-rw-r--r-- | khtml/misc/loader.cpp | 36 | ||||
-rw-r--r-- | khtml/misc/loader_jpeg.cpp | 8 |
3 files changed, 23 insertions, 23 deletions
diff --git a/khtml/misc/knsplugininstaller.cpp b/khtml/misc/knsplugininstaller.cpp index 1a9bf62bb..09de5a149 100644 --- a/khtml/misc/knsplugininstaller.cpp +++ b/khtml/misc/knsplugininstaller.cpp @@ -49,7 +49,7 @@ /* * Utility class to associate a list item with a pluginInfo object */ -class PluginListItem : public QListViewItem +class PluginListItem : public TQListViewItem { public: diff --git a/khtml/misc/loader.cpp b/khtml/misc/loader.cpp index 3d9d7b531..bc25991ea 100644 --- a/khtml/misc/loader.cpp +++ b/khtml/misc/loader.cpp @@ -264,7 +264,7 @@ void CachedCSSStyleSheet::data( TQBuffer &buffer, bool eof ) m_charset = c->name(); } TQString data = c->toUnicode( buffer.buffer().data(), m_size ); - // workaround Qt bugs + // workaround TQt bugs m_sheet = static_cast<TQChar>(data[0]) == TQChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data); m_loading = false; @@ -380,7 +380,7 @@ void CachedScript::error( int /*err*/, const char* /*text*/ ) namespace khtml { -class ImageSource : public QDataSource +class ImageSource : public TQDataSource { public: ImageSource(TQByteArray buf) @@ -397,7 +397,7 @@ public: void sendTo(TQDataSink* sink, int n) { - sink->receive((const uchar*)&buffer.at(pos), n); + sink->receive((const uchar*)&buffer.tqat(pos), n); pos += n; @@ -526,7 +526,7 @@ void CachedImage::deref( CachedObjectClient *c ) const TQPixmap &CachedImage::tiled_pixmap(const TQColor& newc, int xWidth, int xHeight) { - static QRgb bgTransparent = tqRgba( 0, 0, 0, 0xFF ); + static TQRgb bgTransparent = tqRgba( 0, 0, 0, 0xFF ); TQSize s(pixmap_size()); int w = xWidth; @@ -564,7 +564,7 @@ const TQPixmap &CachedImage::tiled_pixmap(const TQColor& newc, int xWidth, int x bgSize = TQSize(xWidth, xHeight); //See whether we can - and should - pre-blend - if (isvalid && (r.hasAlphaChannel() || r.mask() )) { + if (isvalid && (r.hasAlphaChannel() || r.tqmask() )) { bg = new TQPixmap(xWidth, xHeight, r.depth()); bg->fill(newc); bitBlt(bg, 0, 0, src); @@ -618,7 +618,7 @@ const TQPixmap &CachedImage::scaled_pixmap( int xWidth, int xHeight ) // kdDebug() << "scaling " << r.width() << "," << r.height() << " to " << xWidth << "," << xHeight << endl; - TQImage image = r.convertToImage().smoothScale(xWidth, xHeight); + TQImage image = TQImage(r.convertToImage()).smoothScale(xWidth, xHeight); scaled = new TQPixmap(xWidth, xHeight, r.depth()); scaled->convertFromImage(image); @@ -671,7 +671,7 @@ TQSize CachedImage::pixmap_size() const TQRect CachedImage::valid_rect() const { if (m_wasBlocked) return Cache::blockedPixmap->rect(); - return (m_hadError ? Cache::brokenPixmap->rect() : m ? m->getValidRect() : ( p ? p->rect() : TQRect()) ); + return (m_hadError ? Cache::brokenPixmap->rect() : m ? TQRect(m->getValidRect()) : ( p ? TQRect(p->rect()) : TQRect()) ); } @@ -702,7 +702,7 @@ void CachedImage::movieStatus(int status) // netscape). We have a problem though where an image is present, and js code creates a new Image object, // which uses the same CachedImage, the one in the document is not supposed to be notified - // just another Qt 2.2.0 bug. we cannot call + // just another TQt 2.2.0 bug. we cannot call // TQMovie::frameImage if we're after TQMovie::EndOfMovie if(status == TQMovie::EndOfFrame) { @@ -748,9 +748,9 @@ void CachedImage::movieStatus(int status) if (p && monochrome && p->depth() > 1) { TQPixmap* pix = new TQPixmap; - pix->convertFromImage( p->convertToImage().convertDepth( 1 ), MonoOnly|AvoidDither ); - if ( p->mask() ) - pix->setMask( *p->mask() ); + pix->convertFromImage( TQImage(p->convertToImage()).convertDepth( 1 ), MonoOnly|AvoidDither ); + if ( p->tqmask() ) + pix->setMask( *p->tqmask() ); delete p; p = pix; monochrome = false; @@ -787,7 +787,7 @@ void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimati delete p; p = new TQPixmap(m->framePixmap()); m->disconnectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) )); - m->disconnectStatus( this, TQT_SLOT( movieStatus( int ) )); + m->disconnectqStatus( this, TQT_SLOT( movieStatus( int ) )); m->disconnectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) ); TQTimer::singleShot(0, this, TQT_SLOT( deleteMovie())); imgSource = 0; @@ -850,7 +850,7 @@ void CachedImage::data ( TQBuffer &_buffer, bool eof ) imgSource = new ImageSource( _buffer.buffer()); m = new TQMovie( imgSource, 8192 ); m->connectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) )); - m->connectStatus( this, TQT_SLOT( movieStatus(int))); + m->connectqStatus( this, TQT_SLOT( movieStatus(int))); m->connectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) ); } } @@ -993,7 +993,7 @@ bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL) bool reload = false; if (m_cachePolicy == KIO::CC_Verify) { - if (!m_reloadedURLs.contains(fullURL)) + if (!m_reloadedURLs.tqcontains(fullURL)) { if (existing && existing->isExpired()) { @@ -1005,7 +1005,7 @@ bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL) } else if ((m_cachePolicy == KIO::CC_Reload) || (m_cachePolicy == KIO::CC_Refresh)) { - if (!m_reloadedURLs.contains(fullURL)) + if (!m_reloadedURLs.tqcontains(fullURL)) { if (existing) { @@ -1427,7 +1427,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c KIO::CacheControl cachePolicy = dl ? dl->cachePolicy() : KIO::CC_Verify; TQString url = kurl.url(); - CachedObject* o = cache->find(url); + CachedObject* o = cache->tqfind(url); if ( o && o->type() != CachedType ) { removeCacheEntry( o ); @@ -1464,7 +1464,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c void Cache::preloadStyleSheet( const TQString &url, const TQString &stylesheet_data) { - CachedObject *o = cache->find(url); + CachedObject *o = cache->tqfind(url); if(o) removeCacheEntry(o); @@ -1474,7 +1474,7 @@ void Cache::preloadStyleSheet( const TQString &url, const TQString &stylesheet_d void Cache::preloadScript( const TQString &url, const TQString &script_data) { - CachedObject *o = cache->find(url); + CachedObject *o = cache->tqfind(url); if(o) removeCacheEntry(o); diff --git a/khtml/misc/loader_jpeg.cpp b/khtml/misc/loader_jpeg.cpp index 8c6404924..b1fa4aeed 100644 --- a/khtml/misc/loader_jpeg.cpp +++ b/khtml/misc/loader_jpeg.cpp @@ -186,7 +186,7 @@ khtml_jpeg_source_mgr::khtml_jpeg_source_mgr() // ----------------------------------------------------------------------------- -class KJPEGFormat : public QImageFormat +class KJPEGFormat : public TQImageFormat { public: KJPEGFormat(); @@ -312,7 +312,7 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar* { if(jpeg_read_header(&cinfo, true) != JPEG_SUSPENDED) { // do some simple memory requirements limitations - // as long as we use that stupid Qt stuff + // as long as we use that stupid TQt stuff int s = cinfo.image_width * cinfo.image_height; if ( s > 16384 * 12388 ) cinfo.scale_denom = 8; @@ -427,7 +427,7 @@ again: // Expand 24->32 bpp. for (int j=oldoutput_scanline; j<oldoutput_scanline+completed_scanlines; j++) { uchar *in = image.scanLine(j) + cinfo.output_width * 3; - QRgb *out = (QRgb*)image.scanLine(j); + TQRgb *out = (TQRgb*)image.scanLine(j); for (uint i=cinfo.output_width; i--; ) { in-=3; @@ -519,7 +519,7 @@ again: } // ----------------------------------------------------------------------------- -// This is the factory that teaches Qt about progressive JPEG's +// This is the factory that teaches TQt about progressive JPEG's TQImageFormat* khtml::KJPEGFormatType::decoderFor(const unsigned char* buffer, int length) { |