diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-03 00:36:33 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-05 11:33:58 +0900 |
commit | 9abcf51de91242d1ab70230ba46abd2108416edf (patch) | |
tree | b06138af56a2addecdb37e556deb89f4972d59b8 | |
parent | 5761876d3a71e9b3c5a93b5b535b071d2240b08e (diff) | |
download | koffice-9abcf51de91242d1ab70230ba46abd2108416edf.tar.gz koffice-9abcf51de91242d1ab70230ba46abd2108416edf.zip |
Replaced various '#define' with actual strings - part 5
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit fb6b4d204d1155fa3a1bc7a128873340db1524f7)
86 files changed, 143 insertions, 143 deletions
diff --git a/chalk/core/kis_brush.cpp b/chalk/core/kis_brush.cpp index 49ee8e58..98453aa5 100644 --- a/chalk/core/kis_brush.cpp +++ b/chalk/core/kis_brush.cpp @@ -287,7 +287,7 @@ bool KisBrush::save() { TQFile file(filename()); file.open(IO_WriteOnly | IO_Truncate); - bool ok = saveToDevice(TQT_TQIODEVICE(&file)); + bool ok = saveToDevice(&file); file.close(); return ok; } diff --git a/chalk/core/kis_imagepipe_brush.cpp b/chalk/core/kis_imagepipe_brush.cpp index 5c60b517..a95d5fa2 100644 --- a/chalk/core/kis_imagepipe_brush.cpp +++ b/chalk/core/kis_imagepipe_brush.cpp @@ -265,7 +265,7 @@ bool KisImagePipeBrush::save() { TQFile file(filename()); file.open(IO_WriteOnly | IO_Truncate); - bool ok = saveToDevice(TQT_TQIODEVICE(&file)); + bool ok = saveToDevice(&file); file.close(); return ok; } diff --git a/chalk/plugins/filters/levelfilter/kgradientslider.cpp b/chalk/plugins/filters/levelfilter/kgradientslider.cpp index de5dd76d..150c7923 100644 --- a/chalk/plugins/filters/levelfilter/kgradientslider.cpp +++ b/chalk/plugins/filters/levelfilter/kgradientslider.cpp @@ -66,7 +66,7 @@ void KGradientSlider::paintEvent(TQPaintEvent *) /*if (!m_dragging) {*/ TQPixmap pm(size()); TQPainter p1; - p1.begin(TQT_TQPAINTDEVICE(&pm), this); + p1.begin(&pm, this); pm.fill(); diff --git a/chalk/ui/kcurve.cpp b/chalk/ui/kcurve.cpp index a69b7846..524a9a76 100644 --- a/chalk/ui/kcurve.cpp +++ b/chalk/ui/kcurve.cpp @@ -133,7 +133,7 @@ void KCurve::paintEvent(TQPaintEvent *) TQPixmap pm(size()); TQPainter p1; - p1.begin(TQT_TQPAINTDEVICE(&pm), this); + p1.begin(&pm, this); // draw background if(m_pix) diff --git a/chalk/ui/kis_boundary_painter.cpp b/chalk/ui/kis_boundary_painter.cpp index 2b842e53..1d782fbb 100644 --- a/chalk/ui/kis_boundary_painter.cpp +++ b/chalk/ui/kis_boundary_painter.cpp @@ -26,7 +26,7 @@ TQPixmap KisBoundaryPainter::createPixmap(const KisBoundary& boundary, int w, int h) { TQPixmap target(w, h); - KisCanvasPainter painter(TQT_TQPAINTDEVICE(&target)); + KisCanvasPainter painter(&target); painter.eraseRect(0, 0, w, h); diff --git a/chalk/ui/kis_canvas.cpp b/chalk/ui/kis_canvas.cpp index 1128d9f2..2ec1a044 100644 --- a/chalk/ui/kis_canvas.cpp +++ b/chalk/ui/kis_canvas.cpp @@ -735,7 +735,7 @@ void KisCanvasWidget::X11TabletDevice::writeSettingsToConfig() void KisCanvasWidget::X11TabletDevice::enableEvents(TQWidget *widget) const { if (!m_eventClassList.isEmpty()) { - int result = XSelectExtensionEvent(TQT_TQPAINTDEVICE(widget)->x11AppDisplay(), widget->handle(), + int result = XSelectExtensionEvent(widget->x11AppDisplay(), widget->handle(), const_cast<XEventClass*>(&m_eventClassList[0]), m_eventClassList.count()); diff --git a/chalk/ui/kis_clipboard.cpp b/chalk/ui/kis_clipboard.cpp index bb80e75e..1e8040ca 100644 --- a/chalk/ui/kis_clipboard.cpp +++ b/chalk/ui/kis_clipboard.cpp @@ -82,7 +82,7 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) // We'll create a store (ZIP format) in memory TQBuffer buffer; TQCString mimeType("application/x-chalk-selection"); - KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType ); + KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType ); Q_ASSERT( store ); Q_ASSERT( !store->bad() ); @@ -146,7 +146,7 @@ KisPaintDeviceSP KisClipboard::clip() if(cbData && cbData->provides(mimeType)) { TQBuffer buffer(cbData->encodedData(mimeType)); - KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read, mimeType ); + KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType ); KisProfile *profile=0; if (store->hasFile("profile.icc")) { @@ -244,7 +244,7 @@ TQSize KisClipboard::clipSize() if(cbData && cbData->provides(mimeType)) { TQBuffer buffer(cbData->encodedData(mimeType)); - KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read, mimeType ); + KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType ); KisProfile *profile=0; if (store->hasFile("profile.icc")) { diff --git a/chalk/ui/kis_qpaintdevice_canvas.cpp b/chalk/ui/kis_qpaintdevice_canvas.cpp index e3824f55..cd024c4a 100644 --- a/chalk/ui/kis_qpaintdevice_canvas.cpp +++ b/chalk/ui/kis_qpaintdevice_canvas.cpp @@ -108,7 +108,7 @@ bool KisTQPaintDeviceCanvasWidget::x11Event(XEvent *event) KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter() { - return new KisTQPaintDeviceCanvasPainter(TQT_TQPAINTDEVICE(this)); + return new KisTQPaintDeviceCanvasPainter(this); } #if defined(EXTENDED_X11_TABLET_SUPPORT) diff --git a/chalk/ui/kis_qpaintdevice_canvas_painter.cpp b/chalk/ui/kis_qpaintdevice_canvas_painter.cpp index cc598ef2..7f3a6723 100644 --- a/chalk/ui/kis_qpaintdevice_canvas_painter.cpp +++ b/chalk/ui/kis_qpaintdevice_canvas_painter.cpp @@ -38,7 +38,7 @@ bool KisTQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool un TQWidget *widget = dynamic_cast<TQWidget *>(canvasWidget); if (widget != 0) { - return m_painter.begin(TQT_TQPAINTDEVICE(widget), unclipped); + return m_painter.begin(widget, unclipped); } else { return false; } diff --git a/filters/generic_wrapper/generic_filter.cpp b/filters/generic_wrapper/generic_filter.cpp index 112c29d1..147ba128 100644 --- a/filters/generic_wrapper/generic_filter.cpp +++ b/filters/generic_wrapper/generic_filter.cpp @@ -87,7 +87,7 @@ KoFilter::ConversionStatus GenericFilter::doImport() TQFile tempFile(temp.name()); - m_out = KoStore::createStore(TQT_TQIODEVICE(&tempFile), KoStore::Write); + m_out = KoStore::createStore(&tempFile, KoStore::Write); if (!m_out || !m_out->open("root")) { diff --git a/filters/karbon/ai/aiimport.cpp b/filters/karbon/ai/aiimport.cpp index 0af2cc93..190dc4c8 100644 --- a/filters/karbon/ai/aiimport.cpp +++ b/filters/karbon/ai/aiimport.cpp @@ -73,7 +73,7 @@ AiImport::convert( const TQCString& from, const TQCString& to ) TQDomDocument doc ("DOC"); KarbonAIParserBase parser; - if (!parser.parse (*TQT_TQIODEVICE(&fileIn), doc)) + if (!parser.parse(fileIn, doc)) { fileIn.close(); return KoFilter::CreationError; diff --git a/filters/karbon/eps/epsimport.cpp b/filters/karbon/eps/epsimport.cpp index 72bb1334..b8230856 100644 --- a/filters/karbon/eps/epsimport.cpp +++ b/filters/karbon/eps/epsimport.cpp @@ -81,7 +81,7 @@ EpsImport::convert( const TQCString& from, const TQCString& to ) if ( file.open(IO_ReadOnly) ) { - extractor.parse (*TQT_TQIODEVICE(&file)); + extractor.parse(file); llx = extractor.llx(); lly = extractor.lly(); urx = extractor.urx(); diff --git a/filters/kivio/imageexport/kivio_imageexport.cpp b/filters/kivio/imageexport/kivio_imageexport.cpp index 0c977398..229bd4ce 100644 --- a/filters/kivio/imageexport/kivio_imageexport.cpp +++ b/filters/kivio/imageexport/kivio_imageexport.cpp @@ -152,7 +152,7 @@ KoFilter::ConversionStatus ImageExport::convert(const TQCString& from, const TQC TQPixmap pixmap = TQPixmap(size); pixmap.fill(TQt::white); KivioScreenPainter kpainter; - kpainter.start(TQT_TQPAINTDEVICE(&pixmap)); + kpainter.start(&pixmap); float translationX = border; float translationY = border; diff --git a/filters/kspread/latex/export/document.cpp b/filters/kspread/latex/export/document.cpp index 45cdbb73..6d5dafe0 100644 --- a/filters/kspread/latex/export/document.cpp +++ b/filters/kspread/latex/export/document.cpp @@ -56,7 +56,7 @@ void Document::generate() if(_file.open(IO_WriteOnly)) { kdDebug(30522) << "GENERATION" << endl; - _out.setDevice(TQT_TQIODEVICE(&_file)); + _out.setDevice(&_file); _document.generate(_out, !isEmbeded()); //_out << getDocument(); _file.close(); diff --git a/filters/kugar/kugarnop/kugarnopimport.cpp b/filters/kugar/kugarnop/kugarnopimport.cpp index f3b132db..cb0a0ff4 100644 --- a/filters/kugar/kugarnop/kugarnopimport.cpp +++ b/filters/kugar/kugarnop/kugarnopimport.cpp @@ -43,7 +43,7 @@ KoFilter::ConversionStatus KugarNOPImport::convert( const TQCString& /*from*/, c } KoDocument *doc=m_chain->outputDocument(); - doc->loadXML(TQT_TQIODEVICE(&in),TQDomDocument()); + doc->loadXML(&in,TQDomDocument()); in.close(); doc->resetURL(); diff --git a/filters/kword/amipro/amiproexport.cpp b/filters/kword/amipro/amiproexport.cpp index e6703fc0..6fef9654 100644 --- a/filters/kword/amipro/amiproexport.cpp +++ b/filters/kword/amipro/amiproexport.cpp @@ -72,7 +72,7 @@ bool AmiProWorker::doCloseFile(void) if( !out.open( IO_WriteOnly ) ) return FALSE; TQTextStream stream; - stream.setDevice( TQT_TQIODEVICE(&out) ); + stream.setDevice( &out ); stream << result; return TRUE; } diff --git a/filters/kword/amipro/amiproparser.cpp b/filters/kword/amipro/amiproparser.cpp index 3b07c201..a73e7456 100644 --- a/filters/kword/amipro/amiproparser.cpp +++ b/filters/kword/amipro/amiproparser.cpp @@ -134,7 +134,7 @@ bool AmiProParser::process( const TQString& filename ) return setResult( FileError ); TQTextStream stream; - stream.setDevice( TQT_TQIODEVICE(&in) ); + stream.setDevice( &in ); // the first should be "[ver]" line = stream.readLine(); diff --git a/filters/kword/ascii/asciiexport.cpp b/filters/kword/ascii/asciiexport.cpp index 1bea9a26..bbf4dcab 100644 --- a/filters/kword/ascii/asciiexport.cpp +++ b/filters/kword/ascii/asciiexport.cpp @@ -120,7 +120,7 @@ private: bool ASCIIWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { - m_ioDevice = TQT_TQIODEVICE(new TQFile(filenameOut)); + m_ioDevice = new TQFile(filenameOut); if (!m_ioDevice) { diff --git a/filters/kword/hancomword/hancomwordimport.cpp b/filters/kword/hancomword/hancomwordimport.cpp index bfab48ab..561d0cc4 100644 --- a/filters/kword/hancomword/hancomwordimport.cpp +++ b/filters/kword/hancomword/hancomwordimport.cpp @@ -172,7 +172,7 @@ TQByteArray HancomWordImport::Private::createContent() TQBuffer contentBuffer( contentData ); contentBuffer.open( IO_WriteOnly ); - contentWriter = new KoXmlWriter( TQT_TQIODEVICE(&contentBuffer) ); + contentWriter = new KoXmlWriter( &contentBuffer ); contentWriter->startDocument( "office:document-content" ); contentWriter->startElement( "office:document-content" ); @@ -224,7 +224,7 @@ TQByteArray HancomWordImport::Private::createStyles() TQBuffer stylesBuffer( stylesData ); stylesBuffer.open( IO_WriteOnly ); - stylesWriter = new KoXmlWriter( TQT_TQIODEVICE(&stylesBuffer) ); + stylesWriter = new KoXmlWriter( &stylesBuffer ); stylesWriter->startDocument( "office:document-styles" ); stylesWriter->startElement( "office:document-styles" ); @@ -280,7 +280,7 @@ TQByteArray HancomWordImport::Private::createManifest() TQBuffer manifestBuffer( manifestData ); manifestBuffer.open( IO_WriteOnly ); - manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) ); + manifestWriter = new KoXmlWriter( &manifestBuffer ); manifestWriter->startDocument( "manifest:manifest" ); manifestWriter->startElement( "manifest:manifest" ); diff --git a/filters/kword/html/export/ExportFilter.cpp b/filters/kword/html/export/ExportFilter.cpp index 96f0b6c5..1d7cffa6 100644 --- a/filters/kword/html/export/ExportFilter.cpp +++ b/filters/kword/html/export/ExportFilter.cpp @@ -472,7 +472,7 @@ bool HtmlWorker::doFullParagraph(const TQString& paraText, bool HtmlWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { - m_ioDevice=TQT_TQIODEVICE(new TQFile(filenameOut)); + m_ioDevice=new TQFile(filenameOut); if (!m_ioDevice) { diff --git a/filters/kword/kword1.3/import/kword13import.cpp b/filters/kword/kword1.3/import/kword13import.cpp index 9e10ad9c..12fc94ea 100644 --- a/filters/kword/kword1.3/import/kword13import.cpp +++ b/filters/kword/kword1.3/import/kword13import.cpp @@ -199,7 +199,7 @@ KoFilter::ConversionStatus KWord13Import::convert( const TQCString& from, const TQFile file( fileName ); file.open( IO_ReadOnly ); - if ( ! parseRoot( TQT_TQIODEVICE(&file), kwordDocument ) ) + if ( ! parseRoot( &file, kwordDocument ) ) { kdError(30520) << "Could not process document! Aborting!" << endl; file.close(); diff --git a/filters/kword/kword1.3/import/kword13oasisgenerator.cpp b/filters/kword/kword1.3/import/kword13oasisgenerator.cpp index bf2ca8a5..e3276785 100644 --- a/filters/kword/kword1.3/import/kword13oasisgenerator.cpp +++ b/filters/kword/kword1.3/import/kword13oasisgenerator.cpp @@ -107,7 +107,7 @@ void KWord13OasisGenerator::preparePageLayout( void ) // ### TODO: test TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter element ( TQT_TQIODEVICE(&buffer) ); + KoXmlWriter element ( &buffer ); element.startElement("style:columns"); element.addAttribute( "fo:column-count", columns ); element.addAttributePt( "fo:column-gap", positiveNumberOrNull( m_kwordDocument->getProperty( "PAPER:columnspacing", "PAPER:ptColumnspc" ) ) ); @@ -932,7 +932,7 @@ bool KWord13OasisGenerator::generate ( const TQString& fileName, KWord13Document TQByteArray manifestData; TQBuffer manifestBuffer( manifestData ); manifestBuffer.open( IO_WriteOnly ); - m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) ); + m_manifestWriter = new KoXmlWriter( &manifestBuffer ); m_manifestWriter->startDocument( "manifest:manifest" ); m_manifestWriter->startElement( "manifest:manifest" ); m_manifestWriter->addAttribute( "xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0" ); diff --git a/filters/kword/latex/export/xml2latexparser.cpp b/filters/kword/latex/export/xml2latexparser.cpp index 88936c9a..42e37f47 100644 --- a/filters/kword/latex/export/xml2latexparser.cpp +++ b/filters/kword/latex/export/xml2latexparser.cpp @@ -60,7 +60,7 @@ void Xml2LatexParser::generate() if(_file.open(IO_WriteOnly)) { kdDebug(30522) << "GENERATION" << endl; - _out.setDevice(TQT_TQIODEVICE(&_file)); + _out.setDevice(&_file); if(!Config::instance()->isEmbeded()) FileHeader::instance()->generate(_out); _document.generate(_out, !Config::instance()->isEmbeded()); diff --git a/filters/kword/libexport/KWEFBaseWorker.cpp b/filters/kword/libexport/KWEFBaseWorker.cpp index a47f647d..e6cf1a49 100644 --- a/filters/kword/libexport/KWEFBaseWorker.cpp +++ b/filters/kword/libexport/KWEFBaseWorker.cpp @@ -136,7 +136,7 @@ bool KWEFBaseWorker::loadAndConvertToImage(const TQString& strName, const TQStri return false; } - imageIO.setIODevice(TQT_TQIODEVICE(&buffer)); + imageIO.setIODevice(&buffer); imageIO.setFormat(outExtension.utf8()); if (!imageIO.write()) diff --git a/filters/kword/libexport/KWEFKWordLeader.cpp b/filters/kword/libexport/KWEFKWordLeader.cpp index 17e1d517..bd0df63a 100644 --- a/filters/kword/libexport/KWEFKWordLeader.cpp +++ b/filters/kword/libexport/KWEFKWordLeader.cpp @@ -1413,7 +1413,7 @@ KoFilter::ConversionStatus KWEFKWordLeader::convert( KoFilterChain* chain, else { TQFile file( filename ); - if ( ! ProcessStoreFile( TQT_TQIODEVICE(&file), ProcessDocTag, this ) ) + if ( ! ProcessStoreFile( &file, ProcessDocTag, this ) ) { kdError(30508) << "Could not process document! Aborting!" << endl; doAbortFile(); diff --git a/filters/kword/mswrite/mswriteexport.cpp b/filters/kword/mswrite/mswriteexport.cpp index abf007f8..879ad60e 100644 --- a/filters/kword/mswrite/mswriteexport.cpp +++ b/filters/kword/mswrite/mswriteexport.cpp @@ -1188,7 +1188,7 @@ public: outBuffer.open (IO_WriteOnly); // write BMP - imageIO.setIODevice (TQT_TQIODEVICE(&outBuffer)); + imageIO.setIODevice (&outBuffer); imageIO.setFormat ("BMP"); if (!imageIO.write ()) { diff --git a/filters/kword/oowriter/ExportFilter.cpp b/filters/kword/oowriter/ExportFilter.cpp index d96b451a..8be165c3 100644 --- a/filters/kword/oowriter/ExportFilter.cpp +++ b/filters/kword/oowriter/ExportFilter.cpp @@ -1400,7 +1400,7 @@ bool OOWriterWorker::makePicture( const FrameAnchor& anchor, const AnchorType an TQBuffer buffer( image.copy() ); // Be more safe than sorry and do not allow shallow copy KoPicture pic; buffer.open( IO_ReadOnly ); - if ( pic.load( TQT_TQIODEVICE(&buffer), strExtension ) ) + if ( pic.load( &buffer, strExtension ) ) { const TQSize size ( pic.getOriginalSize() ); height = size.height(); diff --git a/filters/kword/rtf/export/ExportFilter.cpp b/filters/kword/rtf/export/ExportFilter.cpp index eba2b645..2b97d0a0 100644 --- a/filters/kword/rtf/export/ExportFilter.cpp +++ b/filters/kword/rtf/export/ExportFilter.cpp @@ -888,7 +888,7 @@ bool RTFWorker::doFooter(const FooterData& footer) bool RTFWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { - m_ioDevice=TQT_TQIODEVICE(new TQFile(filenameOut)); + m_ioDevice=new TQFile(filenameOut); if (!m_ioDevice) { diff --git a/filters/kword/wml/wmlexport.cpp b/filters/kword/wml/wmlexport.cpp index 978cb14d..df6dd3d5 100644 --- a/filters/kword/wml/wmlexport.cpp +++ b/filters/kword/wml/wmlexport.cpp @@ -71,7 +71,7 @@ bool WMLWorker::doCloseFile(void) if( !out.open( IO_WriteOnly ) ) return FALSE; TQTextStream stream; - stream.setDevice( TQT_TQIODEVICE(&out) ); + stream.setDevice( &out ); stream << result; return TRUE; } diff --git a/filters/kword/wml/wmlparser.cpp b/filters/kword/wml/wmlparser.cpp index 81ccbd24..e704061a 100644 --- a/filters/kword/wml/wmlparser.cpp +++ b/filters/kword/wml/wmlparser.cpp @@ -429,7 +429,7 @@ WMLLayout& WMLLayout::operator=( const WMLLayout& l ) void WMLParser::parse( const char* filename ) { TQFile f( filename ); - TQXmlInputSource source( TQT_TQIODEVICE(&f) ); + TQXmlInputSource source( &f ); TQXmlSimpleReader reader; WMLHandler handler( this ); reader.setContentHandler( &handler ); diff --git a/karbon/core/vgradient.cpp b/karbon/core/vgradient.cpp index 577d1373..1d8a6eaf 100644 --- a/karbon/core/vgradient.cpp +++ b/karbon/core/vgradient.cpp @@ -200,7 +200,7 @@ VGradient::saveOasis( KoGenStyles &mainStyles ) const gradientStyle.addAttribute( "svg:spreadMethod", "pad" ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level // save stops VColorStop* colorstop; diff --git a/karbon/dockers/vdocumentdocker.cpp b/karbon/dockers/vdocumentdocker.cpp index cf02d2cd..c999a059 100644 --- a/karbon/dockers/vdocumentdocker.cpp +++ b/karbon/dockers/vdocumentdocker.cpp @@ -175,7 +175,7 @@ VDocumentPreview::paintEvent( TQPaintEvent* ) { delete m_docpixmap; m_docpixmap = new TQPixmap( width(), height() ); - VKoPainter p( TQT_TQPAINTDEVICE(m_docpixmap), width(), height() ); + VKoPainter p( m_docpixmap, width(), height() ); p.clear( TQColor( 195, 194, 193 ) ); p.setWorldMatrix( TQWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) ); p.setZoomFactor( scaleFactor ); @@ -334,7 +334,7 @@ VObjectListViewItem::update() // draw thumb preview (16x16) TQPixmap preview; preview.resize( 16, 16 ); - VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false ); + VKoPainter p( &preview, 16, 16, false ); // Y mirroring TQWMatrix mat; mat.scale( 1, -1 ); @@ -390,7 +390,7 @@ VLayerListViewItem::update() // draw thumb preview (16x16) TQPixmap preview; preview.resize( 16, 16 ); - VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false ); + VKoPainter p( &preview, 16, 16, false ); // Y mirroring TQWMatrix mat; mat.scale( 1, -1 ); diff --git a/karbon/karbon_part.cpp b/karbon/karbon_part.cpp index a34a4da1..e3abb201 100644 --- a/karbon/karbon_part.cpp +++ b/karbon/karbon_part.cpp @@ -377,7 +377,7 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter ) KTempFile contentTmpFile; contentTmpFile.setAutoDelete( true ); TQFile* tmpFile = contentTmpFile.file(); - KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 ); + KoXmlWriter contentTmpWriter( tmpFile, 1 ); contentTmpWriter.startElement( "office:body" ); contentTmpWriter.startElement( "office:drawing" ); @@ -398,7 +398,7 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter ) // And now we can copy over the contents from the tempfile to the real one tmpFile->close(); - docWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + docWriter->addCompleteElement( tmpFile ); contentTmpFile.close(); docWriter->endElement(); // Root element diff --git a/karbon/karbon_resourceserver.cpp b/karbon/karbon_resourceserver.cpp index 2b31e4d7..c44d48e7 100644 --- a/karbon/karbon_resourceserver.cpp +++ b/karbon/karbon_resourceserver.cpp @@ -510,7 +510,7 @@ VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double m_clipart->setState( VObject::normal ); m_pixmap.resize( 64, 64 ); - VKoPainter p( TQT_TQPAINTDEVICE(&m_pixmap), 64, 64 ); + VKoPainter p( &m_pixmap, 64, 64 ); TQWMatrix mat( 64., 0, 0, 64., 0, 0 ); VTransformCmd trafo( 0L, mat ); @@ -524,7 +524,7 @@ VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double p.end(); m_thumbPixmap.resize( 32, 32 ); - VKoPainter p2( TQT_TQPAINTDEVICE(&m_thumbPixmap), 32, 32 ); + VKoPainter p2( &m_thumbPixmap, 32, 32 ); mat.setMatrix( 32., 0, 0, 32., 0, 0 ); trafo.setMatrix( mat ); diff --git a/karbon/karbon_view.cpp b/karbon/karbon_view.cpp index 20e74fce..64fc0e53 100644 --- a/karbon/karbon_view.cpp +++ b/karbon/karbon_view.cpp @@ -177,8 +177,8 @@ KarbonView::KarbonView( KarbonPart* p, TQWidget* parent, const char* name ) // set up factory m_painterFactory = new VPainterFactory; - m_painterFactory->setPainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() ); - m_painterFactory->setEditPainter( TQT_TQPAINTDEVICE(canvasWidget()->viewport()), width(), height() ); + m_painterFactory->setPainter( canvasWidget()->pixmap(), width(), height() ); + m_painterFactory->setEditPainter( canvasWidget()->viewport(), width(), height() ); if( shell() ) { @@ -759,9 +759,9 @@ KarbonView::viewModeChanged() canvasWidget()->pixmap()->fill(); if( m_viewAction->currentItem() == 1 ) - m_painterFactory->setWireframePainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() ); + m_painterFactory->setWireframePainter( canvasWidget()->pixmap(), width(), height() ); else - m_painterFactory->setPainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() ); + m_painterFactory->setPainter( canvasWidget()->pixmap(), width(), height() ); m_canvas->repaintAll(); } diff --git a/karbon/tools/vtexttool.cpp b/karbon/tools/vtexttool.cpp index e7fa848d..e64a4cf9 100644 --- a/karbon/tools/vtexttool.cpp +++ b/karbon/tools/vtexttool.cpp @@ -112,7 +112,7 @@ ShadowPreview::paintEvent( TQPaintEvent* ) int a = 360 - m_parent->shadowAngle(); TQPixmap pm( w, h ); - VKoPainter p( TQT_TQPAINTDEVICE(&pm), w, h ); + VKoPainter p( &pm, w, h ); VColor color( VColor::rgb ); VFill fill; diff --git a/karbon/widgets/vgradienttabwidget.cpp b/karbon/widgets/vgradienttabwidget.cpp index 5c57efab..1416262d 100644 --- a/karbon/widgets/vgradienttabwidget.cpp +++ b/karbon/widgets/vgradienttabwidget.cpp @@ -43,7 +43,7 @@ VGradientListItem::VGradientListItem( const VGradient& gradient, TQString filena m_gradient = new VGradient( gradient ); m_pixmap.resize( 200, 16 ); - VKoPainter gp( TQT_TQPAINTDEVICE(&m_pixmap), m_pixmap.width(), m_pixmap.height() ); + VKoPainter gp( &m_pixmap, m_pixmap.width(), m_pixmap.height() ); gp.setRasterOp( TQt::XorROP ); gp.newPath(); VGradient grad( *m_gradient ); @@ -114,7 +114,7 @@ VGradientPreview::~VGradientPreview() void VGradientPreview::paintEvent( TQPaintEvent* ) { TQPixmap pixmap( width(), height() ); - VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() ); + VKoPainter gp( &pixmap, width(), height() ); gp.setRasterOp( TQt::XorROP ); gp.newPath(); VGradient gradient( *m_gradient ); diff --git a/karbon/widgets/vgradientwidget.cpp b/karbon/widgets/vgradientwidget.cpp index f76f1fed..0bc98b8e 100644 --- a/karbon/widgets/vgradientwidget.cpp +++ b/karbon/widgets/vgradientwidget.cpp @@ -96,7 +96,7 @@ void VGradientWidget::paintEvent( TQPaintEvent* ) int gh = h - ph; // gradient area height TQPixmap pixmap( width(), height() ); - VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() ); + VKoPainter gp( &pixmap, width(), height() ); gp.setRasterOp( TQt::XorROP ); VGradient gradient( *m_gradient ); gradient.setType( VGradient::linear ); diff --git a/karbon/widgets/vsmallpreview.cpp b/karbon/widgets/vsmallpreview.cpp index c422104e..b45ab1c6 100644 --- a/karbon/widgets/vsmallpreview.cpp +++ b/karbon/widgets/vsmallpreview.cpp @@ -97,7 +97,7 @@ VSmallPreview::drawFill( const VFill &f ) TQPixmap m_pixmap; m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() ); - VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() ); + VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() ); m_painter->begin(); m_painter->setPen( TQt::NoPen ); @@ -192,7 +192,7 @@ VSmallPreview::drawStroke( const VStroke &s ) TQPixmap m_pixmap; m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() ); - VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() ); + VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() ); m_painter->begin(); m_painter->setPen( TQt::NoPen ); diff --git a/karbon/widgets/vstrokefillpreview.cpp b/karbon/widgets/vstrokefillpreview.cpp index c7b165f4..97fcb7c4 100644 --- a/karbon/widgets/vstrokefillpreview.cpp +++ b/karbon/widgets/vstrokefillpreview.cpp @@ -62,7 +62,7 @@ VStrokeFillPreview::VStrokeFillPreview( installEventFilter( this ); m_pixmap.resize( int( PANEL_SIZEX ), int( PANEL_SIZEY ) ); - m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) ); + m_painter = new VKoPainter( &m_pixmap, uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) ); } VStrokeFillPreview::~VStrokeFillPreview() diff --git a/kexi/kexiutils/utils.cpp b/kexi/kexiutils/utils.cpp index 4a0d5489..9d794242 100644 --- a/kexi/kexiutils/utils.cpp +++ b/kexi/kexiutils/utils.cpp @@ -300,7 +300,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, } pixmapBuffer.convertFromImage(img); if (!fast) { - p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device()); + p2.begin(&pixmapBuffer, p.device()); } else target->drawPixmap(pos, pixmapBuffer); @@ -308,7 +308,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, else { if (!fast) { pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth)); - p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device()); + p2.begin(&pixmapBuffer, p.device()); p2.drawPixmap(TQRect(rect.x(), rect.y(), w, h), pixmap); } else diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp index b6cb9f44..404237bb 100644 --- a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp +++ b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp @@ -52,7 +52,7 @@ void KexiSimplePrintPreviewView::paintEvent( TQPaintEvent *pe ) return; TQPixmap pm(size()); //dbl buffered TQPainter p; - p.begin(TQT_TQPAINTDEVICE(&pm), this); + p.begin(&pm, this); //! @todo only for screen! p.fillRect(TQRect(TQPoint(0,0),pm.size()), TQBrush(white));//pe->rect(), TQBrush(white)); if (m_window->currentPage()>=0) diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index 81ce6684..41e8cc64 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -148,7 +148,7 @@ void KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type) { TQPainter p; - p.begin(TQT_TQPAINTDEVICE(this), true); + p.begin(this, true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -192,7 +192,7 @@ void KexiDBForm::clearForm() { TQPainter p; - p.begin(TQT_TQPAINTDEVICE(this), true); + p.begin(this, true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -216,7 +216,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi toPoint = to->parentWidget()->mapTo(this, to->pos()); TQPainter p; - p.begin(TQT_TQPAINTDEVICE(this), true); + p.begin(this, true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp index 4c23fead..1d74f94f 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp +++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp @@ -640,7 +640,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) if (m_designMode && pixmap().isNull()) { TQPixmap pm(size()-TQSize(m, m)); TQPainter p2; - p2.begin(TQT_TQPAINTDEVICE(&pm), this); + p2.begin(&pm, this); p2.fillRect(0,0,width(),height(), bg); updatePixmap(); diff --git a/kexi/widget/utils/kexiflowlayout.cpp b/kexi/widget/utils/kexiflowlayout.cpp index cedb7b74..b7fef91f 100644 --- a/kexi/widget/utils/kexiflowlayout.cpp +++ b/kexi/widget/utils/kexiflowlayout.cpp @@ -98,16 +98,16 @@ KexiFlowLayout::~KexiFlowLayout() void KexiFlowLayout::addItem(TQLayoutItem *item) { - m_list.append(TQT_TQLAYOUTITEM(item)); + m_list.append(item); } void KexiFlowLayout::addSpacing(int size) { if (m_orientation ==TQt::Horizontal) - addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( size, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum )) ); + addItem( new TQSpacerItem( size, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum ) ); else - addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( 0, size, TQSizePolicy::Minimum, TQSizePolicy::Fixed )) ); + addItem( new TQSpacerItem( 0, size, TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); } TQLayoutIterator diff --git a/kformula/kformula_doc.cpp b/kformula/kformula_doc.cpp index 5eeb59f4..61b84d51 100644 --- a/kformula/kformula_doc.cpp +++ b/kformula/kformula_doc.cpp @@ -104,7 +104,7 @@ bool KFormulaDoc::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) formula->saveMathML( stream, true ); tmpFile->close(); - contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + contentWriter->addCompleteElement( tmpFile ); contentTmpFile.close(); diff --git a/kivio/kiviopart/kivio_canvas.cpp b/kivio/kiviopart/kivio_canvas.cpp index e6a192fe..89695d24 100644 --- a/kivio/kiviopart/kivio_canvas.cpp +++ b/kivio/kiviopart/kivio_canvas.cpp @@ -331,7 +331,7 @@ void KivioCanvas::paintEvent( TQPaintEvent* ev ) // Draw content KivioScreenPainter kpainter; - kpainter.start(TQT_TQPAINTDEVICE(m_buffer)); + kpainter.start(m_buffer); kpainter.translateBy(-m_iXOffset + m_pageOffsetX, -m_iYOffset + m_pageOffsetY); m_pDoc->paintContent(kpainter, paintRect, false, page, TQPoint(0, 0), m_pView->zoomHandler(), showConnectorTargets(), true); kpainter.stop(); @@ -706,7 +706,7 @@ void KivioCanvas::beginUnclippedSpawnerPainter() unclippedSpawnerPainter = new KivioScreenPainter(); // Tell it to start (allocates a Qpainter object) - unclippedSpawnerPainter->start(TQT_TQPAINTDEVICE(this)); + unclippedSpawnerPainter->start(this); // Uhhhhh?? if( !unclipped ) diff --git a/kivio/kiviopart/kivio_page.cpp b/kivio/kiviopart/kivio_page.cpp index cd09d54c..0009a1d4 100644 --- a/kivio/kiviopart/kivio_page.cpp +++ b/kivio/kiviopart/kivio_page.cpp @@ -204,7 +204,7 @@ void KivioPage::saveOasis(KoStore* /*store*/, KoXmlWriter* docWriter, KoGenStyle TQBuffer layerBuffer; layerBuffer.open(IO_WriteOnly); - KoXmlWriter layerWriter(TQT_TQIODEVICE(&layerBuffer)); + KoXmlWriter layerWriter(&layerBuffer); layerWriter.startElement("draw:layer-set"); // Iterate through all layers diff --git a/kivio/kiviopart/kiviodragobject.cpp b/kivio/kiviopart/kiviodragobject.cpp index 1649cfc3..bfe4ff55 100644 --- a/kivio/kiviopart/kiviodragobject.cpp +++ b/kivio/kiviopart/kiviodragobject.cpp @@ -160,7 +160,7 @@ TQByteArray KivioDragObject::imageEncoded(const char* mimetype) const TQPixmap buffer(zoomHandler.zoomItX(m_stencilRect.width()), zoomHandler.zoomItY(m_stencilRect.height())); buffer.fill(TQt::white); KivioScreenPainter p; - p.start( TQT_TQPAINTDEVICE(&buffer) ); + p.start( &buffer ); p.setTranslation(-zoomHandler.zoomItX(m_stencilRect.x()), -zoomHandler.zoomItY(m_stencilRect.y())); KivioIntraStencilData data; data.painter = &p; diff --git a/kivio/kiviopart/kivioglobal.cpp b/kivio/kiviopart/kivioglobal.cpp index 75db6ebd..ab6e53a7 100644 --- a/kivio/kiviopart/kivioglobal.cpp +++ b/kivio/kiviopart/kivioglobal.cpp @@ -1305,7 +1305,7 @@ TQPixmap Kivio::generatePixmapFromStencil(int width, int height, KivioStencil* s TQPixmap pix(width, height); pix.fill(TQt::white); KivioScreenPainter kpainter; - kpainter.start(TQT_TQPAINTDEVICE(&pix)); + kpainter.start(&pix); kpainter.translateBy(-rect.x() + ((width - rect.width()) / 2), -rect.y() + ((height - rect.height()) / 2)); KivioIntraStencilData data; data.painter = &kpainter; diff --git a/kivio/kiviopart/ui/kivio_birdeye_panel.cpp b/kivio/kiviopart/ui/kivio_birdeye_panel.cpp index ed92bff8..398bebc9 100644 --- a/kivio/kiviopart/ui/kivio_birdeye_panel.cpp +++ b/kivio/kiviopart/ui/kivio_birdeye_panel.cpp @@ -150,7 +150,7 @@ void KivioBirdEyePanel::updateView() TQRect rect(TQPoint(0,0),s1); KivioScreenPainter kpainter; - kpainter.start(TQT_TQPAINTDEVICE(m_buffer)); + kpainter.start(m_buffer); kpainter.painter()->fillRect(rect, TDEApplication::palette().active().brush(TQColorGroup::Mid)); kpainter.painter()->fillRect(px0, py0, pw, ph, white); diff --git a/kplato/kptview.cpp b/kplato/kptview.cpp index 238ff733..519de080 100644 --- a/kplato/kptview.cpp +++ b/kplato/kptview.cpp @@ -985,7 +985,7 @@ void View::slotExportGantt() { TQString fn = KFileDialog::getSaveFileName( TQString(), TQString(), this ); if (!fn.isEmpty()) { TQFile f(fn); - m_ganttview->exportGantt(TQT_TQIODEVICE(&f)); + m_ganttview->exportGantt(&f); } } diff --git a/kpresenter/KPrBackground.cpp b/kpresenter/KPrBackground.cpp index f446ed70..1f8281ac 100644 --- a/kpresenter/KPrBackground.cpp +++ b/kpresenter/KPrBackground.cpp @@ -452,7 +452,7 @@ void KPrBackGround::load( const TQDomElement &element ) TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8 rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED TQBuffer buffer(rawData); - backPicture.loadXpm(TQT_TQIODEVICE(&buffer)); + backPicture.loadXpm(&buffer); } #if 0 diff --git a/kpresenter/KPrCanvas.cpp b/kpresenter/KPrCanvas.cpp index 245d83f2..05c9923b 100644 --- a/kpresenter/KPrCanvas.cpp +++ b/kpresenter/KPrCanvas.cpp @@ -291,7 +291,7 @@ void KPrCanvas::paintEvent( TQPaintEvent* paintEvent ) { //kdDebug(33001) << "KPrCanvas::paintEvent" << endl; TQPainter bufPainter; - bufPainter.begin( TQT_TQPAINTDEVICE(&buffer), this ); // double-buffering - (the buffer is as big as the widget) + bufPainter.begin( &buffer, this ); // double-buffering - (the buffer is as big as the widget) bufPainter.translate( -diffx(), -diffy() ); bufPainter.setBrushOrigin( -diffx(), -diffy() ); @@ -3107,7 +3107,7 @@ bool KPrCanvas::pNext( bool gotoNextPage ) if ( m_pageEffect ) finishPageEffect(); - m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(this), _pix2, _pageEffect, page->getPageEffectSpeed() ); + m_pageEffect = new KPrPageEffects( this, _pix2, _pageEffect, page->getPageEffectSpeed() ); if ( m_pageEffect->doEffect() ) { delete m_pageEffect; @@ -3438,7 +3438,7 @@ void KPrCanvas::doObjEffects( bool isAllreadyPainted ) } //TODO add global presentation speed - m_effectHandler = new KPrEffectHandler( m_step, goingBack, TQT_TQPAINTDEVICE(this), &screen_orig, allObjects, m_view, 1 ); + m_effectHandler = new KPrEffectHandler( m_step, goingBack, this, &screen_orig, allObjects, m_view, 1 ); if ( m_effectHandler->doEffect() ) { delete m_effectHandler; @@ -4141,7 +4141,7 @@ void KPrCanvas::copyOasisObjs() TQDragObject* dragObject = kd; TQByteArray arr; TQBuffer buffer(arr); - KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, "application/vnd.oasis.opendocument.presentation" ); + KoStore* store = KoStore::createStore( &buffer, KoStore::Write, "application/vnd.oasis.opendocument.presentation" ); delete store; kd->setEncodedData( arr ); @@ -4163,7 +4163,7 @@ void KPrCanvas::copyObjs() TQDragObject* dragObject = kd; TQByteArray arr; TQBuffer buffer(arr); - KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, "application/x-kpresenter" ); + KoStore* store = KoStore::createStore( &buffer, KoStore::Write, "application/x-kpresenter" ); m_activePage->getAllEmbeddedObjectSelected(embeddedObjectsActivePage ); diff --git a/kpresenter/KPrCommand.cpp b/kpresenter/KPrCommand.cpp index b5558afa..ff59aa82 100644 --- a/kpresenter/KPrCommand.cpp +++ b/kpresenter/KPrCommand.cpp @@ -1895,7 +1895,7 @@ KoTextCursor * KPrOasisPasteTextCommand::execute( KoTextCursor *c ) c->setIndex( m_idx ); TQBuffer buffer( m_data ); - KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); + KoStore * store = KoStore::createStore( &buffer, KoStore::Read ); if ( store->bad() || !store->hasFile( "content.xml" ) ) { diff --git a/kpresenter/KPrDocument.cpp b/kpresenter/KPrDocument.cpp index 913cff97..ed6a32f6 100644 --- a/kpresenter/KPrDocument.cpp +++ b/kpresenter/KPrDocument.cpp @@ -1019,14 +1019,14 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) KTempFile contentTmpFile; contentTmpFile.setAutoDelete( true ); TQFile* tmpFile = contentTmpFile.file(); - KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 ); + KoXmlWriter contentTmpWriter( tmpFile, 1 ); //For sticky objects KTempFile stickyTmpFile; stickyTmpFile.setAutoDelete( true ); TQFile* masterStyles = stickyTmpFile.file(); - KoXmlWriter stickyTmpWriter( TQT_TQIODEVICE(masterStyles), 1 ); + KoXmlWriter stickyTmpWriter( masterStyles, 1 ); contentTmpWriter.startElement( "office:body" ); @@ -1083,7 +1083,7 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) // And now we can copy over the contents from the tempfile to the real one tmpFile->close(); - contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + contentWriter->addCompleteElement( tmpFile ); contentTmpFile.close(); contentWriter->endElement(); // root element @@ -1552,7 +1552,7 @@ void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyl if ( masterStyles ) { stylesWriter->startElement( "office:master-styles" ); - stylesWriter->addCompleteElement( TQT_TQIODEVICE(masterStyles) ); + stylesWriter->addCompleteElement( masterStyles ); stylesWriter->endElement(); } } diff --git a/kpresenter/KPrPage.cpp b/kpresenter/KPrPage.cpp index 57627b99..1e915d40 100644 --- a/kpresenter/KPrPage.cpp +++ b/kpresenter/KPrPage.cpp @@ -130,7 +130,7 @@ void KPrPage::saveOasisObject( KoStore *store, KoXmlWriter &xmlWriter, KoSavingC KTempFile animationTmpFile; animationTmpFile.setAutoDelete( true ); TQFile* tmpFile = animationTmpFile.file(); - KoXmlWriter animationTmpWriter( TQT_TQIODEVICE(tmpFile) ); + KoXmlWriter animationTmpWriter( tmpFile ); lstMap listObjectAnimation; TQPtrListIterator<KPrObject> it( m_objectList ); for ( ; it.current() ; ++it ) @@ -228,7 +228,7 @@ void KPrPage::saveOasisObject( KoStore *store, KoXmlWriter &xmlWriter, KoSavingC } animationTmpWriter.endElement();//close "presentation:animations" tmpFile->close(); - xmlWriter.addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + xmlWriter.addCompleteElement( tmpFile ); } else @@ -626,7 +626,7 @@ TQString KPrPage::saveOasisPageStyle( KoStore *, KoGenStyles& mainStyles ) const { TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level elementWriter.startElement( "presentation:sound" ); elementWriter.addAttribute( "xlink:href", m_soundFileName ); elementWriter.addAttribute( "xlink:type", "simple" ); @@ -1006,7 +1006,7 @@ void KPrPage::pasteObjs( const TQByteArray & data,int nbCopy, double angle, if ( !data.size() ) return; TQBuffer buffer( data ); - KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); + KoStore* store = KoStore::createStore( &buffer, KoStore::Read ); int nbNewObject = -1 ; KMacroCommand *macro = 0L; if ( !store->bad() ) diff --git a/kpresenter/KPrPixmapObject.cpp b/kpresenter/KPrPixmapObject.cpp index 09dcb789..155fe47c 100644 --- a/kpresenter/KPrPixmapObject.cpp +++ b/kpresenter/KPrPixmapObject.cpp @@ -435,7 +435,7 @@ double KPrPixmapObject::load(const TQDomElement &element) TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8 rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED TQBuffer buffer(rawData); // ### TODO: open? - image.loadXpm(TQT_TQIODEVICE(&buffer)); + image.loadXpm(&buffer); } } } diff --git a/kpresenter/KPrSlideTransitionDia.cpp b/kpresenter/KPrSlideTransitionDia.cpp index c8076af2..fe8a132a 100644 --- a/kpresenter/KPrSlideTransitionDia.cpp +++ b/kpresenter/KPrSlideTransitionDia.cpp @@ -200,7 +200,7 @@ void KPrSlideTransitionDia::preview() m_dialog->previewPixmap->repaint(); } - m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(m_dialog->previewPixmap), m_target, effect, effectSpeed ); + m_pageEffect = new KPrPageEffects( m_dialog->previewPixmap, m_target, effect, effectSpeed ); if ( m_pageEffect->doEffect() ) { delete m_pageEffect; diff --git a/kpresenter/KPrTextObject.cpp b/kpresenter/KPrTextObject.cpp index 874e781b..6a7f4440 100644 --- a/kpresenter/KPrTextObject.cpp +++ b/kpresenter/KPrTextObject.cpp @@ -2368,7 +2368,7 @@ TQDragObject * KPrTextView::newDrag( TQWidget * parent ) { TQBuffer buffer; const TQCString mimeType = "application/vnd.oasis.opendocument.text"; - KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType ); + KoStore * store = KoStore::createStore( &buffer, KoStore::Write, mimeType ); Q_ASSERT( store ); Q_ASSERT( !store->bad() ); diff --git a/kpresenter/KPrTransEffectDia.cpp b/kpresenter/KPrTransEffectDia.cpp index 7d5c4eae..d409f620 100644 --- a/kpresenter/KPrTransEffectDia.cpp +++ b/kpresenter/KPrTransEffectDia.cpp @@ -108,7 +108,7 @@ void KPrEffectPreview::run( PageEffect effect, EffectSpeed speed ) TQLabel::repaint(); } - m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(this), m_target, effect, speed ); + m_pageEffect = new KPrPageEffects( this, m_target, effect, speed ); if ( m_pageEffect->doEffect() ) { delete m_pageEffect; diff --git a/kpresenter/KPrView.cpp b/kpresenter/KPrView.cpp index dc746432..88d54ad6 100644 --- a/kpresenter/KPrView.cpp +++ b/kpresenter/KPrView.cpp @@ -822,7 +822,7 @@ void KPrView::savePicture( const TQString& oldName, KoPicture& picture) TQFile file( url.path() ); if ( file.open( IO_ReadWrite ) ) { - picture.save( TQT_TQIODEVICE(&file) ); + picture.save( &file ); file.close(); } else @@ -841,7 +841,7 @@ void KPrView::savePicture( const TQString& oldName, KoPicture& picture) TQFile file( tempFile.name() ); if ( file.open( IO_ReadWrite ) ) { - picture.save( TQT_TQIODEVICE(&file) ); + picture.save( &file ); file.close(); if ( !TDEIO::NetAccess::upload( tempFile.name(), url, this ) ) { diff --git a/kspread/kspread_canvas.cpp b/kspread/kspread_canvas.cpp index 837f6e98..1f52a955 100644 --- a/kspread/kspread_canvas.cpp +++ b/kspread/kspread_canvas.cpp @@ -3848,7 +3848,7 @@ void Canvas::copyOasisObjects() // We'll create a store (ZIP format) in memory TQBuffer buffer; TQCString mimeType = "application/vnd.oasis.opendocument.spreadsheet"; - KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType ); + KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType ); Q_ASSERT( store ); Q_ASSERT( !store->bad() ); KoOasisStore oasisStore( store ); diff --git a/kspread/kspread_doc.cpp b/kspread/kspread_doc.cpp index 7643b31d..99feebe5 100644 --- a/kspread/kspread_doc.cpp +++ b/kspread/kspread_doc.cpp @@ -648,7 +648,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag contentTmpFile.setAutoDelete( true ); TQFile* tmpFile = contentTmpFile.file(); - KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 ); + KoXmlWriter contentTmpWriter( tmpFile, 1 ); @@ -765,7 +765,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag // And now we can copy over the contents from the tempfile to the real one tmpFile->close(); - contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + contentWriter->addCompleteElement( tmpFile ); contentTmpFile.close(); diff --git a/kspread/kspread_map.cpp b/kspread/kspread_map.cpp index d54c340a..af6133ea 100644 --- a/kspread/kspread_map.cpp +++ b/kspread/kspread_map.cpp @@ -216,7 +216,7 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore bodyTmpFile.setAutoDelete( true ); TQFile* tmpFile = bodyTmpFile.file(); - KoXmlWriter bodyTmpWriter( TQT_TQIODEVICE(tmpFile) ); + KoXmlWriter bodyTmpWriter( tmpFile ); TQPtrListIterator<Sheet> it( m_lstSheets ); @@ -229,7 +229,7 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore tmpFile->close(); - xmlWriter.addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + xmlWriter.addCompleteElement( tmpFile ); bodyTmpFile.close(); return true; diff --git a/kspread/kspread_sheet.cpp b/kspread/kspread_sheet.cpp index 8e20757e..8a4cf50a 100644 --- a/kspread/kspread_sheet.cpp +++ b/kspread/kspread_sheet.cpp @@ -7359,7 +7359,7 @@ TQString Sheet::saveOasisSheetStyleName( KoGenStyles &mainStyles ) TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level saveOasisHeaderFooter(elementWriter); TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() ); @@ -8220,14 +8220,14 @@ bool Sheet::insertPicture( const KoPoint& point, const TQPixmap& pixmap ) TQBuffer buffer(data); buffer.open( IO_ReadWrite ); - pixmap.save( TQT_TQIODEVICE(&buffer) , "PNG" ); + pixmap.save( &buffer , "PNG" ); //Reset the buffer so that KoPicture reads the whole file from the beginning //(at the moment the read/write position is at the end) buffer.reset(); KoPicture picture; - picture.load( TQT_TQIODEVICE(&buffer) , "PNG" ); + picture.load( &buffer , "PNG" ); doc()->pictureCollection()->insertPicture(picture); diff --git a/kspread/kspread_view.cpp b/kspread/kspread_view.cpp index 81518a4c..92d083b4 100644 --- a/kspread/kspread_view.cpp +++ b/kspread/kspread_view.cpp @@ -4147,7 +4147,7 @@ void View::paste() if( arr.isEmpty() ) return; TQBuffer buffer( arr ); - KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); + KoStore * store = KoStore::createStore( &buffer, KoStore::Read ); KoOasisStore oasisStore( store ); TQDomDocument doc; diff --git a/kugar/part/kugar_part.cpp b/kugar/part/kugar_part.cpp index c00ba14d..e3fb36aa 100644 --- a/kugar/part/kugar_part.cpp +++ b/kugar/part/kugar_part.cpp @@ -214,7 +214,7 @@ void KugarPart::slotPreferredTemplate( const TQString &tpl ) { /* kdDebug() << "RawXML" << endl;*/ f.open( IO_ReadOnly ); - if ( !m_reportEngine -> setReportTemplate( TQT_TQIODEVICE(&f) ) ) + if ( !m_reportEngine -> setReportTemplate( &f ) ) KMessageBox::sorry( 0, i18n( "Invalid template file: %1" ).arg( localtpl ) ); else { diff --git a/kword/KWCommand.cpp b/kword/KWCommand.cpp index 8356ede9..f00232cb 100644 --- a/kword/KWCommand.cpp +++ b/kword/KWCommand.cpp @@ -269,7 +269,7 @@ KoTextCursor * KWOasisPasteCommand::execute( KoTextCursor *c ) TQBuffer buffer( m_data ); - KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); + KoStore * store = KoStore::createStore( &buffer, KoStore::Read ); KWDocument* kwdoc = textdoc->textFrameSet()->kWordDocument(); KWOasisLoader loader( kwdoc ); loader.insertOasisData( store, c ); diff --git a/kword/KWDocument.cpp b/kword/KWDocument.cpp index 0453407a..5a6e886e 100644 --- a/kword/KWDocument.cpp +++ b/kword/KWDocument.cpp @@ -2843,7 +2843,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S // storing the content into a buffer. TQBuffer buffer( headerFooterContent ); buffer.open( IO_WriteOnly ); - KoXmlWriter headerFooterTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter headerFooterTmpWriter( &buffer ); // TODO pass indentation level // The order we write out header, header-left, etc. is important. So, we go here // the dirty way to collect them first and then flush them ordered out. @@ -3021,7 +3021,7 @@ TQDragObject* KWDocument::dragSelectedPrivate( TQWidget *parent, const TQValueLi // We'll create a store (ZIP format) in memory TQBuffer buffer; TQCString mimeType = KWOasisSaver::selectionMimeType(); - KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType ); + KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType ); Q_ASSERT( store ); Q_ASSERT( !store->bad() ); KoOasisStore oasisStore( store ); @@ -3189,7 +3189,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter footnoteSepTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter footnoteSepTmpWriter( &buffer ); // TODO pass indentation level footnoteSepTmpWriter.startElement( "style:footnote-sep" ); TQString tmp; switch( m_footNoteSeparatorLinePos ) @@ -3237,7 +3237,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle if ( m_pageColumns.columns > 1 ) { buffer.setBuffer(TQByteArray()); // clear data buffer.open( IO_WriteOnly ); - KoXmlWriter columnsTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter columnsTmpWriter( &buffer ); // TODO pass indentation level columnsTmpWriter.startElement( "style:columns" ); columnsTmpWriter.addAttribute( "fo:column-count", m_pageColumns.columns ); columnsTmpWriter.addAttributePt( "fo:column-gap", m_pageColumns.ptColumnSpacing ); diff --git a/kword/KWFormulaFrameSet.cpp b/kword/KWFormulaFrameSet.cpp index a6a31f7c..98f27cfa 100644 --- a/kword/KWFormulaFrameSet.cpp +++ b/kword/KWFormulaFrameSet.cpp @@ -275,7 +275,7 @@ void KWFormulaFrameSet::saveOasis(KoXmlWriter& writer, KoSavingContext& context, writer.startElement( "draw:object" ); writer.startElement( "math:math" ); - writer.addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + writer.addCompleteElement( tmpFile ); writer.endElement(); // math:math writer.endElement(); // draw:object writer.endElement(); // draw:frame diff --git a/kword/KWOasisSaver.cpp b/kword/KWOasisSaver.cpp index 2d1ed6cb..2ed453d0 100644 --- a/kword/KWOasisSaver.cpp +++ b/kword/KWOasisSaver.cpp @@ -27,7 +27,7 @@ KWOasisSaver::KWOasisSaver( KWDocument* doc ) : m_doc( doc ) { const TQCString mimeType = selectionMimeType(); - m_store = KoStore::createStore( TQT_TQIODEVICE(&m_buffer), KoStore::Write, mimeType ); + m_store = KoStore::createStore( &m_buffer, KoStore::Write, mimeType ); Q_ASSERT( m_store ); Q_ASSERT( !m_store->bad() ); diff --git a/kword/KWView.cpp b/kword/KWView.cpp index 633e0f3d..de64037d 100644 --- a/kword/KWView.cpp +++ b/kword/KWView.cpp @@ -2435,7 +2435,7 @@ void KWView::pasteData( TQMimeSource* data, bool drop ) if( !arr.isEmpty() ) { TQBuffer buffer( arr ); - KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); + KoStore * store = KoStore::createStore( &buffer, KoStore::Read ); KWOasisLoader oasisLoader( m_doc ); TQValueList<KWFrame *> frames = oasisLoader.insertOasisData( store, 0 /* no cursor */ ); delete store; @@ -6118,7 +6118,7 @@ void KWView::savePicture() TQFile file( url.path() ); if ( file.open( IO_ReadWrite ) ) { - picture.save( TQT_TQIODEVICE(&file) ); + picture.save( &file ); file.close(); } else @@ -6137,7 +6137,7 @@ void KWView::savePicture() TQFile file( tempFile.name() ); if ( file.open( IO_ReadWrite ) ) { - picture.save( TQT_TQIODEVICE(&file) ); + picture.save( &file ); file.close(); if ( !TDEIO::NetAccess::upload( tempFile.name(), url, this ) ) { diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index 4c3854fe..99bd8459 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -978,7 +978,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) TQFile f( file ); if ( f.open( IO_WriteOnly | IO_Translate ) ) { - bool success = saveToStream( TQT_TQIODEVICE(&f) ); + bool success = saveToStream( &f ); f.close(); return success; } @@ -1727,7 +1727,7 @@ bool KoDocument::loadNativeFormat( const TQString & file ) bool res; if ( doc.setContent( &in, true, &errorMsg, &errorLine, &errorColumn ) ) { - res = loadXML( TQT_TQIODEVICE(&in), doc ); + res = loadXML( &in, doc ); if ( res ) res = completeLoading( 0L ); } diff --git a/lib/kofficecore/KoFilter.cpp b/lib/kofficecore/KoFilter.cpp index 68953b40..2ded98fa 100644 --- a/lib/kofficecore/KoFilter.cpp +++ b/lib/kofficecore/KoFilter.cpp @@ -71,7 +71,7 @@ int KoEmbeddingFilter::embedPart( const TQCString& from, TQCString& to, KTempFile tempIn; tempIn.setAutoDelete( true ); - savePartContents( TQT_TQIODEVICE(tempIn.file()) ); + savePartContents( tempIn.file() ); tempIn.file()->close(); KoFilterManager *manager = new KoFilterManager( tempIn.name(), from, m_chain ); diff --git a/lib/kofficecore/KoOasisStore.cpp b/lib/kofficecore/KoOasisStore.cpp index c170297e..235d5f76 100644 --- a/lib/kofficecore/KoOasisStore.cpp +++ b/lib/kofficecore/KoOasisStore.cpp @@ -78,7 +78,7 @@ KoXmlWriter* KoOasisStore::bodyWriter() Q_ASSERT( !m_contentTmpFile ); m_contentTmpFile = new KTempFile; m_contentTmpFile->setAutoDelete( true ); - m_bodyWriter = new KoXmlWriter( TQT_TQIODEVICE(m_contentTmpFile->file()), 1 ); + m_bodyWriter = new KoXmlWriter( m_contentTmpFile->file(), 1 ); } return m_bodyWriter; } @@ -92,7 +92,7 @@ bool KoOasisStore::closeContentWriter() // copy over the contents from the tempfile to the real one TQFile* tmpFile = m_contentTmpFile->file(); tmpFile->close(); - m_contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); + m_contentWriter->addCompleteElement( tmpFile ); m_contentTmpFile->close(); delete m_contentTmpFile; m_contentTmpFile = 0; @@ -113,7 +113,7 @@ KoXmlWriter* KoOasisStore::manifestWriter( const char* mimeType ) // the pointer to the buffer is already stored in the KoXmlWriter, no need to store it here as well TQBuffer *manifestBuffer = new TQBuffer; manifestBuffer->open( IO_WriteOnly ); - m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(manifestBuffer) ); + m_manifestWriter = new KoXmlWriter( manifestBuffer ); m_manifestWriter->startDocument( "manifest:manifest" ); m_manifestWriter->startElement( "manifest:manifest" ); m_manifestWriter->addAttribute( "xmlns:manifest", KoXmlNS::manifest ); @@ -126,7 +126,7 @@ bool KoOasisStore::closeManifestWriter() { m_manifestWriter->endElement(); m_manifestWriter->endDocument(); - TQBuffer* buffer = TQT_TQBUFFER( static_cast<TQIODevice*>(m_manifestWriter->device()) ); + TQBuffer* buffer = static_cast<TQBuffer*>(m_manifestWriter->device()); delete m_manifestWriter; m_manifestWriter = 0; bool ok = false; if ( m_store->open( "META-INF/manifest.xml" ) ) diff --git a/lib/kofficecore/KoOasisStyles.cpp b/lib/kofficecore/KoOasisStyles.cpp index a5d34c0b..db003c3e 100644 --- a/lib/kofficecore/KoOasisStyles.cpp +++ b/lib/kofficecore/KoOasisStyles.cpp @@ -664,7 +664,7 @@ TQString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const TQStr KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TIME ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; if ( klocaleFormat ) { @@ -819,7 +819,7 @@ TQString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const TQStr KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_DATE ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; if ( klocaleFormat ) { @@ -993,7 +993,7 @@ TQString KoOasisStyles::saveOasisFractionStyle( KoGenStyles &mainStyles, const T KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_FRACTION ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; int integer = 0; int numerator = 0; @@ -1057,7 +1057,7 @@ TQString KoOasisStyles::saveOasisNumberStyle( KoGenStyles &mainStyles, const TQS KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_NUMBER ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; int decimalplaces = 0; int integerdigits = 0; @@ -1106,7 +1106,7 @@ TQString KoOasisStyles::saveOasisPercentageStyle( KoGenStyles &mainStyles, const KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_PERCENTAGE ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; int decimalplaces = 0; int integerdigits = 0; @@ -1160,7 +1160,7 @@ TQString KoOasisStyles::saveOasisScientificStyle( KoGenStyles &mainStyles, const int decimalplace = 0; int integerdigits = 0; int exponentdigits = 0; - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; bool beforeSeparator = true; bool exponential = false; @@ -1236,7 +1236,7 @@ TQString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles, KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_CURRENCY ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; int decimalplaces = 0; int integerdigits = 0; @@ -1292,7 +1292,7 @@ TQString KoOasisStyles::saveOasisTextStyle( KoGenStyles &mainStyles, const TQStr KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TEXT ); TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level + KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level TQString text; do { diff --git a/lib/kofficecore/KoPictureBase.cpp b/lib/kofficecore/KoPictureBase.cpp index 101c946c..33437070 100644 --- a/lib/kofficecore/KoPictureBase.cpp +++ b/lib/kofficecore/KoPictureBase.cpp @@ -95,7 +95,7 @@ bool KoPictureBase::saveAsBase64( KoXmlWriter& writer ) const { TQBuffer buffer; buffer.open(IO_ReadWrite); - if ( !save( TQT_TQIODEVICE(&buffer) ) ) + if ( !save( &buffer ) ) return false; TQCString encoded = KCodecs::base64Encode( buffer.buffer() ); writer.addTextNode( encoded ); diff --git a/lib/kofficecore/KoPictureShared.cpp b/lib/kofficecore/KoPictureShared.cpp index 57d95f65..996df9ed 100644 --- a/lib/kofficecore/KoPictureShared.cpp +++ b/lib/kofficecore/KoPictureShared.cpp @@ -208,7 +208,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array ) TQBuffer buffer(array); buffer.open(IO_ReadOnly); - const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-gzip", "tmp" ); + const bool flag = loadCompressed( &buffer, "application/x-gzip", "tmp" ); buffer.close(); return flag; } @@ -217,7 +217,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array ) // BZip2 TQBuffer buffer(array); buffer.open(IO_ReadOnly); - const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-bzip2", "tmp" ); + const bool flag = loadCompressed( &buffer, "application/x-bzip2", "tmp" ); buffer.close(); return flag; } @@ -252,7 +252,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array ) return false; } - imageIO.setIODevice(TQT_TQIODEVICE(&buf)); + imageIO.setIODevice(&buf); imageIO.setFormat("PNG"); if (!imageIO.write()) @@ -309,7 +309,7 @@ bool KoPictureShared::loadXpm(TQIODevice* io) m_base=new KoPictureImage(); TQBuffer buffer(array); - bool check = m_base->load(TQT_TQIODEVICE(&buffer),"xpm"); + bool check = m_base->load(&buffer,"xpm"); setExtension("xpm"); return check; } @@ -441,13 +441,13 @@ bool KoPictureShared::loadFromFile(const TQString& fileName) { kdDebug(30003) << "File with no extension!" << endl; // As we have no extension, consider it like a temporary file - flag = loadTmp( TQT_TQIODEVICE(&file) ); + flag = loadTmp( &file ); } else { const TQString extension( fileName.mid( pos+1 ) ); // ### TODO: check if the extension if gz or bz2 and find the previous extension - flag = load( TQT_TQIODEVICE(&file), extension ); + flag = load( &file, extension ); } file.close(); return flag; diff --git a/lib/kofficecore/KoPictureWmf.cpp b/lib/kofficecore/KoPictureWmf.cpp index 96d10817..3f2d0a7e 100644 --- a/lib/kofficecore/KoPictureWmf.cpp +++ b/lib/kofficecore/KoPictureWmf.cpp @@ -97,7 +97,7 @@ bool KoPictureWmf::loadData(const TQByteArray& array, const TQString& /* extensi } m_originalSize = wmf.boundingRect().size(); // draw wmf file with relative coordinate - wmf.play(*TQT_TQPAINTDEVICE(&m_clipart), true); + wmf.play(m_clipart, true); return true; } diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp index 319f2baf..4e7c3931 100644 --- a/lib/kofficeui/KoTabBar.cpp +++ b/lib/kofficeui/KoTabBar.cpp @@ -660,7 +660,7 @@ void KoTabBar::paintEvent( TQPaintEvent* ) TQPainter painter; TQPixmap pm( size() ); pm.fill( colorGroup().background() ); - painter.begin( TQT_TQPAINTDEVICE(&pm), this ); + painter.begin( &pm, this ); painter.setPen( colorGroup().dark() ); painter.drawLine( 0, 0, width(), 0 ); diff --git a/lib/kotext/KoParagCounter.cpp b/lib/kotext/KoParagCounter.cpp index 9810e8b0..6237bd1f 100644 --- a/lib/kotext/KoParagCounter.cpp +++ b/lib/kotext/KoParagCounter.cpp @@ -269,7 +269,7 @@ void KoParagCounter::saveOasis( KoGenStyle& listStyle, bool savingStyle ) const // Prepare a sub-xmlwriter for the list-level-style-* element TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter listLevelWriter( TQT_TQIODEVICE(&buffer), 3 /*indentation*/ ); + KoXmlWriter listLevelWriter( &buffer, 3 /*indentation*/ ); const char* tagName = isBullet() ? "text:list-level-style-bullet" : "text:list-level-style-number"; listLevelWriter.startElement( tagName ); diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index 1978d88c..521a4499 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -843,7 +843,7 @@ void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool sa TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter tabsWriter( TQT_TQIODEVICE(&buffer), 4 ); // indent==4: root,autostyle,style,parag-props + KoXmlWriter tabsWriter( &buffer, 4 ); // indent==4: root,autostyle,style,parag-props tabsWriter.startElement( "style:tab-stops" ); KoTabulatorList::ConstIterator it = m_tabList.begin(); for ( ; it != m_tabList.end() ; it++ ) diff --git a/lib/store/KoDirectoryStore.cpp b/lib/store/KoDirectoryStore.cpp index 894a7b39..a464db05 100644 --- a/lib/store/KoDirectoryStore.cpp +++ b/lib/store/KoDirectoryStore.cpp @@ -71,7 +71,7 @@ bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode ) if ( !ret ) return false; } - m_stream = TQT_TQIODEVICE(new TQFile( m_basePath + name )); + m_stream = new TQFile( m_basePath + name ); if ( !m_stream->open( iomode ) ) { delete m_stream; diff --git a/lib/store/KoStore.cpp b/lib/store/KoStore.cpp index 221c6b5c..fa6e88d1 100644 --- a/lib/store/KoStore.cpp +++ b/lib/store/KoStore.cpp @@ -69,7 +69,7 @@ KoStore* KoStore::createStore( const TQString& fileName, Mode mode, const TQCStr { TQFile file( fileName ); if ( file.open( IO_ReadOnly ) ) - backend = determineBackend( TQT_TQIODEVICE(&file) ); + backend = determineBackend( &file ); else backend = DefaultFormat; // will create a "bad" store (bad()==true) } @@ -143,7 +143,7 @@ KoStore* KoStore::createStore( TQWidget* window, const KURL& url, Mode mode, con TQFile file( tmpFile ); if ( file.open( IO_ReadOnly ) ) { - backend = determineBackend( TQT_TQIODEVICE(&file) ); + backend = determineBackend( &file ); file.close(); } } diff --git a/lib/store/KoTarStore.cpp b/lib/store/KoTarStore.cpp index d4e6667a..160258d9 100644 --- a/lib/store/KoTarStore.cpp +++ b/lib/store/KoTarStore.cpp @@ -126,7 +126,7 @@ bool KoTarStore::openWrite( const TQString& /*name*/ ) { // Prepare memory buffer for writing m_byteArray.resize( 0 ); - m_stream = TQT_TQIODEVICE(new TQBuffer( m_byteArray )); + m_stream = new TQBuffer( m_byteArray ); m_stream->open( IO_WriteOnly ); return true; } |