From 57e0ed66347db15cb1cd66488f095107e7772ad9 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 18 Nov 2023 16:44:23 +0900 Subject: [PATCH] Replace various strings '#define'd in tqtinterface Signed-off-by: Michele Calgaro --- tdecore/kdebug.cpp | 2 +- tdecore/kiconeffect.cpp | 10 +++---- tdecore/tdeapplication.cpp | 2 +- tdefx/kimageeffect.cpp | 48 +++++++++++++++--------------- tdefx/kpixmap.cpp | 2 +- tdefx/tdestyle.cpp | 2 +- tdefx/tdestyle.h | 18 +++++------ tdemdi/tdemdi/dockcontainer.cpp | 6 ++-- tdemdi/tdemdi/guiclient.cpp | 2 +- tdemdi/tdemdi/mainwindow.cpp | 6 ++-- tdemdi/tdemdi/toolviewaccessor.cpp | 2 +- tdemdi/tdemdidockcontainer.cpp | 6 ++-- tdemdi/tdemdiguiclient.cpp | 2 +- tdemdi/tdemdimainfrm.cpp | 8 ++--- tdemdi/tdemditoolviewaccessor.cpp | 2 +- tdeparts/componentfactory.h | 6 ++-- tdeparts/factory.cpp | 2 +- tdeparts/genericfactory.h | 6 ++-- tdeparts/statusbarextension.cpp | 2 +- tdeui/kcombobox.cpp | 2 +- tdeui/kcursor.cpp | 2 +- tdeui/kdockwidget.cpp | 44 +++++++++++++-------------- tdeui/kdockwidget_private.cpp | 16 +++++----- tdeui/keditlistbox.cpp | 2 +- tdeui/kpixmapio.cpp | 10 +++---- tdeui/kxmlguifactory.cpp | 2 +- tdeui/qxembed.cpp | 4 +-- tdeui/tdeaction.cpp | 14 ++++----- tdeui/tdeactionclasses.cpp | 2 +- tdeui/tdeactioncollection.cpp | 2 +- tdeui/tdelistviewsearchline.cpp | 2 +- tdeui/tdetoolbar.cpp | 38 +++++++++++------------ tdeui/tdetoolbarbutton.cpp | 4 +-- tdeui/tdetoolbarhandler.cpp | 4 +-- tdeutils/kfinddialog.cpp | 2 +- tdeutils/tdemultitabbar.cpp | 4 +-- 36 files changed, 144 insertions(+), 144 deletions(-) diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index d06992390..22843da4e 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -333,7 +333,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char break; } TQFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") ); - aOutputFile.open( (TQIODevice_OpenModeFlag)((int)IO_WriteOnly | (int)IO_Append | (int)IO_Raw) ); + aOutputFile.open( IO_WriteOnly | IO_Append | IO_Raw ); aOutputFile.writeBlock( buf, strlen( buf ) ); aOutputFile.close(); break; diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp index 3ac3ca6e8..d8f3184c1 100644 --- a/tdecore/kiconeffect.cpp +++ b/tdecore/kiconeffect.cpp @@ -287,7 +287,7 @@ void TDEIconEffect::toGray(TQImage &img, float value) int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits() - : (unsigned int *) img.tqcolorTable(); + : (unsigned int *) img.colorTable(); int rval, gval, bval, val, alpha, i; for (i=0; i 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits() - : (unsigned int *) img.tqcolorTable(); + : (unsigned int *) img.colorTable(); int rval, gval, bval, val, alpha, i; float rcol = col.red(), gcol = col.green(), bcol = col.blue(); for (i=0; i 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits() - : (unsigned int *) img.tqcolorTable(); + : (unsigned int *) img.colorTable(); int rval, gval, bval, alpha, i; int rw = white.red(), gw = white.green(), bw = white.blue(); int rb = black.red(), gb = black.green(), bb = black.blue(); @@ -400,7 +400,7 @@ void TDEIconEffect::deSaturate(TQImage &img, float value) int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits() - : (unsigned int *) img.tqcolorTable(); + : (unsigned int *) img.colorTable(); TQColor color; int h, s, v, i; for (i=0; i 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits() - : (unsigned int *) img.tqcolorTable(); + : (unsigned int *) img.colorTable(); TQColor color; int i, rval, gval, bval; float gamma; diff --git a/tdecore/tdeapplication.cpp b/tdecore/tdeapplication.cpp index af8d53e91..8d716b215 100644 --- a/tdecore/tdeapplication.cpp +++ b/tdecore/tdeapplication.cpp @@ -1048,7 +1048,7 @@ void TDEApplication::init(bool GUIenabled) // kdialog itself. // * Don't warn if we run with a read-only $HOME TQCString readOnly = getenv("TDE_HOME_READONLY"); - if (readOnly.isEmpty() && (tqstrcmp(name(), "kdialog") != 0)) + if (readOnly.isEmpty() && (qstrcmp(name(), "kdialog") != 0)) { TDEConfigGroupSaver saver(config, "KDE Action Restrictions"); if (config->readBoolEntry("warn_unwritable_config",true)) diff --git a/tdefx/kimageeffect.cpp b/tdefx/kimageeffect.cpp index 444119a1c..8968c1b43 100644 --- a/tdefx/kimageeffect.cpp +++ b/tdefx/kimageeffect.cpp @@ -664,7 +664,7 @@ TQImage& KImageEffect::intensity(TQImage &image, float percent) int pixels = image.depth() > 8 ? image.width()*image.height() : image.numColors(); unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() : - (unsigned int *)image.tqcolorTable(); + (unsigned int *)image.colorTable(); bool brighten = (percent >= 0); if(percent < 0) @@ -858,7 +858,7 @@ TQImage& KImageEffect::channelIntensity(TQImage &image, float percent, int pixels = image.depth() > 8 ? image.width()*image.height() : image.numColors(); unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() : - (unsigned int *)image.tqcolorTable(); + (unsigned int *)image.colorTable(); bool brighten = (percent >= 0); if(percent < 0) percent = -percent; @@ -958,7 +958,7 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse, if (modImage.depth()<8) modImage = modImage.convertDepth(8); unsigned int *colorTable2 = (modImage.depth()==8) ? - modImage.tqcolorTable():0; + modImage.colorTable():0; unsigned int *data1, *data2; unsigned char *data2b; unsigned int color1, color2; @@ -1788,7 +1788,7 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2, if (blendImage.depth()<8) blendImage = blendImage.convertDepth(8); unsigned int *colorTable3 = (blendImage.depth()==8) ? - blendImage.tqcolorTable():0; + blendImage.colorTable():0; unsigned int *data1 = (unsigned int *)image1.bits(); unsigned int *data2 = (unsigned int *)image2.bits(); @@ -2162,7 +2162,7 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast) int pixels = img.depth() > 8 ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() : - (unsigned int *)img.tqcolorTable(); + (unsigned int *)img.colorTable(); int val, i; for(i=0; i < pixels; ++i){ val = tqGray(data[i]); @@ -2183,7 +2183,7 @@ TQImage& KImageEffect::desaturate(TQImage &img, float desat) int pixels = img.depth() > 8 ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() : - (unsigned int *)img.tqcolorTable(); + (unsigned int *)img.colorTable(); int h, s, v, i; TQColor clr; // keep constructor out of loop (mosfet) for(i=0; i < pixels; ++i){ @@ -2208,7 +2208,7 @@ TQImage& KImageEffect::contrast(TQImage &img, int c) int pixels = img.depth() > 8 ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() : - (unsigned int *)img.tqcolorTable(); + (unsigned int *)img.colorTable(); int i, r, g, b; for(i=0; i < pixels; ++i){ r = tqRed(data[i]); @@ -2779,7 +2779,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h) } else if(depth == 1) { int r = src.bitOrder() == TQImage::LittleEndian; - memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(TQRgb)); + memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(TQRgb)); for(int y=0; y < h; ++y){ unsigned char *destData = dest.scanLine(y); unsigned char *srcData = src.scanLine(y_offset[y]); @@ -2794,7 +2794,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h) } } else{ // PseudoClass source image - memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(TQRgb)); + memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(TQRgb)); for(int y=0; y < h; ++y){ unsigned char *destData = dest.scanLine(y); unsigned char *srcData = src.scanLine(y_offset[y]); @@ -2817,7 +2817,7 @@ void KImageEffect::threshold(TQImage &img, unsigned int threshold) } else{ // PsudeoClass count = img.numColors(); - data = (unsigned int *)img.tqcolorTable(); + data = (unsigned int *)img.colorTable(); } for(i=0; i < count; ++i) data[i] = intensityValue(data[i]) < threshold ? TQColor(TQt::black).rgb() : TQColor(TQt::white).rgb(); @@ -2951,7 +2951,7 @@ TQImage KImageEffect::despeckle(TQImage &src) } else{ // PsudeoClass source image unsigned char *srcData; - unsigned int *cTable = src.tqcolorTable(); + unsigned int *cTable = src.colorTable(); unsigned int pixel; for(y=0; y < src.height(); ++y){ srcData = (unsigned char *)src.scanLine(y); @@ -3130,7 +3130,7 @@ TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type) } else{ // PsudeoClass source image unsigned char *srcData; - unsigned int *cTable = src.tqcolorTable(); + unsigned int *cTable = src.colorTable(); unsigned int pixel; for(y=0; y < src.height(); ++y){ srcData = (unsigned char *)src.scanLine(y); @@ -3192,7 +3192,7 @@ unsigned int KImageEffect::interpolateColor(TQImage *image, double x_offset, } } else{ - unsigned int *colorTable = (unsigned int *)image->tqcolorTable(); + unsigned int *colorTable = (unsigned int *)image->colorTable(); if((x >= 0) && (y >= 0) && (x < (image->width()-1)) && (y < (image->height()-1))) { unsigned char *t; t = (unsigned char *)image->scanLine(y); @@ -3292,7 +3292,7 @@ TQImage KImageEffect::implode(TQImage &src, double factor, else{ // PsudeoClass source image unsigned char *srcData; unsigned char idx; - unsigned int *cTable = src.tqcolorTable(); + unsigned int *cTable = src.colorTable(); for(y=0; y < src.height(); ++y){ srcData = (unsigned char *)src.scanLine(y); destData = (unsigned int *)dest.scanLine(y); @@ -3368,8 +3368,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r) case Rotate90: dest.create(img.height(), img.width(), img.depth()); dest.setNumColors(img.numColors()); - srcTable = (unsigned int *)img.tqcolorTable(); - destTable = (unsigned int *)dest.tqcolorTable(); + srcTable = (unsigned int *)img.colorTable(); + destTable = (unsigned int *)dest.colorTable(); for(x=0; x < img.numColors(); ++x) destTable[x] = srcTable[x]; for(y=0; y < img.height(); ++y){ @@ -3383,8 +3383,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r) case Rotate180: dest.create(img.width(), img.height(), img.depth()); dest.setNumColors(img.numColors()); - srcTable = (unsigned int *)img.tqcolorTable(); - destTable = (unsigned int *)dest.tqcolorTable(); + srcTable = (unsigned int *)img.colorTable(); + destTable = (unsigned int *)dest.colorTable(); for(x=0; x < img.numColors(); ++x) destTable[x] = srcTable[x]; for(y=0; y < img.height(); ++y){ @@ -3397,8 +3397,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r) case Rotate270: dest.create(img.height(), img.width(), img.depth()); dest.setNumColors(img.numColors()); - srcTable = (unsigned int *)img.tqcolorTable(); - destTable = (unsigned int *)dest.tqcolorTable(); + srcTable = (unsigned int *)img.colorTable(); + destTable = (unsigned int *)dest.colorTable(); for(x=0; x < img.numColors(); ++x) destTable[x] = srcTable[x]; for(y=0; y < img.height(); ++y){ @@ -3426,7 +3426,7 @@ void KImageEffect::solarize(TQImage &img, double factor) threshold = (int)(factor*(MaxRGB+1)/100.0); if(img.depth() < 32){ - data = (unsigned int *)img.tqcolorTable(); + data = (unsigned int *)img.colorTable(); count = img.numColors(); } else{ @@ -3541,7 +3541,7 @@ TQImage KImageEffect::swirl(TQImage &src, double degrees, } else{ // PsudeoClass source image unsigned char *p; - unsigned int *cTable = (unsigned int *)src.tqcolorTable(); + unsigned int *cTable = (unsigned int *)src.colorTable(); for(y=0; y < src.height(); y++){ p = (unsigned char *)src.scanLine(y); q = (unsigned int *)dest.scanLine(y); @@ -4554,7 +4554,7 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth, else{ // PsudeoClass source image unsigned char *p, *s0, *s1, *s2; int scanLineIdx; - unsigned int *cTable = (unsigned int *)src.tqcolorTable(); + unsigned int *cTable = (unsigned int *)src.colorTable(); for(y=0; y < src.height(); ++y){ scanLineIdx = TQMIN(TQMAX(y-1,0),src.height()-3); p = (unsigned char *)src.scanLine(scanLineIdx); @@ -4632,7 +4632,7 @@ void KImageEffect::contrastHSV(TQImage &img, bool sharpen) } else{ count = img.numColors(); - data = (unsigned int *)img.tqcolorTable(); + data = (unsigned int *)img.colorTable(); } for(i=0; i < count; ++i){ c.setRgb(data[i]); diff --git a/tdefx/kpixmap.cpp b/tdefx/kpixmap.cpp index bbf483016..30a2de570 100644 --- a/tdefx/kpixmap.cpp +++ b/tdefx/kpixmap.cpp @@ -357,7 +357,7 @@ bool KPixmap::checkColorTable( const TQImage &image ) } - TQRgb* ctable = image.tqcolorTable(); + TQRgb* ctable = image.colorTable(); int ncols = image.numColors(); int j; diff --git a/tdefx/tdestyle.cpp b/tdefx/tdestyle.cpp index f191dc751..a1d60656a 100644 --- a/tdefx/tdestyle.cpp +++ b/tdefx/tdestyle.cpp @@ -853,7 +853,7 @@ void TDEStyle::drawControl( TQ_ControlElement element, // ------------------------------------------------------------------------ case CE_ProgressBarGroove: { TQRect fr = subRect(SR_ProgressBarGroove, ceData, elementFlags, widget); - drawPrimitive(PE_Panel, p, ceData, elementFlags, fr, cg, Style_Sunken, TQStyleOption::SO_Default); + drawPrimitive(PE_Panel, p, ceData, elementFlags, fr, cg, Style_Sunken, TQStyleOption::Default); break; } diff --git a/tdefx/tdestyle.h b/tdefx/tdestyle.h index 4991eb733..613a7a1a8 100644 --- a/tdefx/tdestyle.h +++ b/tdefx/tdestyle.h @@ -245,7 +245,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::SO_Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; /** * This function is identical to Qt's TQStyle::tqdrawPrimitive(), except that @@ -263,7 +263,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::SO_Default, + const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; @@ -294,7 +294,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::SO_Default ) const; + const TQStyleOption& = TQStyleOption::Default ) const; void drawControl( TQ_ControlElement element, TQPainter* p, @@ -303,7 +303,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::SO_Default, + const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; void drawComplexControl( TQ_ComplexControl control, @@ -315,21 +315,21 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, - const TQStyleOption& = TQStyleOption::SO_Default, + const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; SubControl querySubControl( TQ_ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQPoint &pos, - const TQStyleOption& = TQStyleOption::SO_Default, + const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; TQRect querySubControlMetrics( TQ_ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl sc, - const TQStyleOption& = TQStyleOption::SO_Default, + const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; int pixelMetric( PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -341,12 +341,12 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle TQPixmap stylePixmap( StylePixmap stylepixmap, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, - const TQStyleOption& = TQStyleOption::SO_Default, + const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; int styleHint( StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, - const TQStyleOption &opt = TQStyleOption::SO_Default, + const TQStyleOption &opt = TQStyleOption::Default, TQStyleHintReturn* shr = 0, const TQWidget* w = 0 ) const; diff --git a/tdemdi/tdemdi/dockcontainer.cpp b/tdemdi/tdemdi/dockcontainer.cpp index f89867d73..ff6e41710 100644 --- a/tdemdi/tdemdi/dockcontainer.cpp +++ b/tdemdi/tdemdi/dockcontainer.cpp @@ -246,7 +246,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event ) switch ( event->type() ){ case TQEvent::MouseButtonPress: { - KDockWidget * w=m_revMap[tqt_dynamic_cast(obj)->id()]; + KDockWidget * w=m_revMap[dynamic_cast(obj)->id()]; if (!w) { kdDebug()<<"NoWidget"<(sender()); + const KDockButton_Private *btn=dynamic_cast(sender()); kdDebug(760)<<"DockContainer::changeOverlapMode: button=="<isTabRaised(oldtab)) { m_tb->setTab(oldtab,false); tabClicked(oldtab); - // KMDI::MainWindow *mainFrm = tqt_dynamic_cast(m_mainWin); + // KMDI::MainWindow *mainFrm = dynamic_cast(m_mainWin); // if (mainFrm && mainFrm->activeWindow() ) // TODO // mainFrm->activeWindow()->setFocus(); diff --git a/tdemdi/tdemdi/guiclient.cpp b/tdemdi/tdemdi/guiclient.cpp index 92a24acd5..cfc90a9d2 100644 --- a/tdemdi/tdemdi/guiclient.cpp +++ b/tdemdi/tdemdi/guiclient.cpp @@ -146,7 +146,7 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva) cfg->setGroup( _grp ); TDEAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()), - /*TQString::null*/sc,tqt_dynamic_cast(mtva->wrapperWidget()), + /*TQString::null*/sc,dynamic_cast(mtva->wrapperWidget()), m_mdiMainFrm,actionCollection(), aname.latin1() ); ((ToggleToolViewAction*)a)->setCheckedState(TQString(i18n("Hide %1").arg(mtva->wrappedWidget()->caption()))); diff --git a/tdemdi/tdemdi/mainwindow.cpp b/tdemdi/tdemdi/mainwindow.cpp index 4f23e3a9e..f655e5b3d 100644 --- a/tdemdi/tdemdi/mainwindow.cpp +++ b/tdemdi/tdemdi/mainwindow.cpp @@ -327,7 +327,7 @@ void MainWindow::setToolViewStyle(int flag) bool toolviewExists = false; TQMap::Iterator it; for (it = m_toolViews->begin(); it != m_toolViews->end(); ++it) { - KDockWidget *dockWidget = tqt_dynamic_cast(it.data()->wrapperWidget()); + KDockWidget *dockWidget = dynamic_cast(it.data()->wrapperWidget()); if (dockWidget) { if (flag == KMDI::IconOnly) { @@ -373,7 +373,7 @@ void MainWindow::dockToolViewsIntoContainers(TQPtrList& widgetsToRe void MainWindow::findToolViewsDockedToMain(TQPtrList* list,KDockWidget::DockPosition dprtmw) { KDockWidget *mainDock=getMainDockWidget(); if (mainDock->parentDockTabGroup()) { - mainDock=tqt_dynamic_cast(mainDock->parentDockTabGroup()->parent()); + mainDock=dynamic_cast(mainDock->parentDockTabGroup()->parent()); // FIXME: will likely crash below due to unchecked cast } @@ -384,7 +384,7 @@ void MainWindow::findToolViewsDockedToMain(TQPtrList* list,KDockWid } if (widget) { - KDockTabGroup *tg=tqt_dynamic_cast(widget-> + KDockTabGroup *tg=dynamic_cast(widget-> getWidget()); if (tg) { kdDebug(760)<<"KDockTabGroup found"<inherits("KDockWidget")) { - d->widgetContainer=tqt_dynamic_cast(widgetToWrap); + d->widgetContainer=dynamic_cast(widgetToWrap); d->widget=d->widgetContainer->getWidget(); } else { d->widget=widgetToWrap; diff --git a/tdemdi/tdemdidockcontainer.cpp b/tdemdi/tdemdidockcontainer.cpp index 010974666..5808ae82d 100644 --- a/tdemdi/tdemdidockcontainer.cpp +++ b/tdemdi/tdemdidockcontainer.cpp @@ -252,7 +252,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event ) { case TQEvent::MouseButtonPress: { - KMultiTabBarTab* kmtbTab = tqt_dynamic_cast( obj ); + KMultiTabBarTab* kmtbTab = dynamic_cast( obj ); if ( !kmtbTab ) { kdDebug(760) << k_funcinfo << "Got a mouse button press but we have no tab" << endl; @@ -332,7 +332,7 @@ void KMdiDockContainer::showWidget( KDockWidget *w ) void KMdiDockContainer::changeOverlapMode() { - const KDockButton_Private * btn = tqt_dynamic_cast( sender() ); + const KDockButton_Private * btn = dynamic_cast( sender() ); if ( !btn ) return ; @@ -794,7 +794,7 @@ void KMdiDockContainer::toggle() kdDebug( 760 ) << k_funcinfo << "lowering tab" << endl; m_tb->setTab( oldtab, false ); tabClicked( oldtab ); - KMdiMainFrm *mainFrm = tqt_dynamic_cast( m_mainWin ); + KMdiMainFrm *mainFrm = dynamic_cast( m_mainWin ); if ( mainFrm && mainFrm->activeWindow() ) mainFrm->activeWindow()->setFocus(); } diff --git a/tdemdi/tdemdiguiclient.cpp b/tdemdi/tdemdiguiclient.cpp index b4c4bc593..34fa73b8a 100644 --- a/tdemdi/tdemdiguiclient.cpp +++ b/tdemdi/tdemdiguiclient.cpp @@ -258,7 +258,7 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva ) sc = TDEShortcut( cfg->readEntry( aname, "" ) ); cfg->setGroup( _grp ); TDEAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ), - /*TQString::null*/sc, tqt_dynamic_cast( mtva->wrapperWidget() ), + /*TQString::null*/sc, dynamic_cast( mtva->wrapperWidget() ), m_mdiMainFrm, actionCollection(), aname.latin1() ); #if KDE_IS_VERSION(3,2,90) diff --git a/tdemdi/tdemdimainfrm.cpp b/tdemdi/tdemdimainfrm.cpp index 09b5f7382..ab59f63df 100644 --- a/tdemdi/tdemdimainfrm.cpp +++ b/tdemdi/tdemdimainfrm.cpp @@ -1777,7 +1777,7 @@ void KMdiMainFrm::setToolviewStyle( int flag ) TQMap::Iterator it; for ( it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it ) { - KDockWidget *dockWidget = tqt_dynamic_cast( it.data()->wrapperWidget() ); + KDockWidget *dockWidget = dynamic_cast( it.data()->wrapperWidget() ); if ( dockWidget ) { switch ( flag ) @@ -1886,7 +1886,7 @@ void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList* list, KDock KDockWidget* mainDock = getMainDockWidget(); if ( mainDock->parentDockTabGroup() ) { - mainDock = tqt_dynamic_cast( mainDock->parentDockTabGroup()->parent() ); + mainDock = dynamic_cast( mainDock->parentDockTabGroup()->parent() ); // FIXME: will likely crash below due to unchecked cast } @@ -1903,7 +1903,7 @@ void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList* list, KDock if ( widget ) { - KDockTabGroup* tg = tqt_dynamic_cast( widget->getWidget() ); + KDockTabGroup* tg = dynamic_cast( widget->getWidget() ); if ( tg ) { kdDebug(760) << k_funcinfo << "KDockTabGroup found" << endl; @@ -2118,7 +2118,7 @@ void KMdiMainFrm::finishIDEAlMode( bool full ) TQStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container ) { - KDockContainer * pDW = tqt_dynamic_cast( container->getWidget() ); + KDockContainer * pDW = dynamic_cast( container->getWidget() ); TQStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets(); for ( TQStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it ) { diff --git a/tdemdi/tdemditoolviewaccessor.cpp b/tdemdi/tdemditoolviewaccessor.cpp index f6b6ddae0..187e89d98 100644 --- a/tdemdi/tdemditoolviewaccessor.cpp +++ b/tdemdi/tdemditoolviewaccessor.cpp @@ -36,7 +36,7 @@ KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, TQWidget *widge d = new KMdiToolViewAccessorPrivate(); if ( widgetToWrap->inherits( "KDockWidget" ) ) { - d->widgetContainer = tqt_dynamic_cast( widgetToWrap ); + d->widgetContainer = dynamic_cast( widgetToWrap ); d->widget = d->widgetContainer->getWidget(); } else diff --git a/tdeparts/componentfactory.h b/tdeparts/componentfactory.h index 728b34efa..c0b8068f9 100644 --- a/tdeparts/componentfactory.h +++ b/tdeparts/componentfactory.h @@ -66,7 +66,7 @@ namespace KParts T::staticMetaObject()->className(), args ); - T *result = tqt_dynamic_cast( object ); + T *result = dynamic_cast( object ); if ( !result ) delete object; return result; @@ -104,7 +104,7 @@ namespace KParts T::staticMetaObject()->className(), args ); - T *result = tqt_dynamic_cast( object ); + T *result = dynamic_cast( object ); if ( !result ) delete object; return result; @@ -178,7 +178,7 @@ namespace KParts *error = ErrNoFactory; return 0; } - KParts::Factory *partFactory = tqt_dynamic_cast( factory ); + KParts::Factory *partFactory = dynamic_cast( factory ); if ( !partFactory ) { library->unload(); diff --git a/tdeparts/factory.cpp b/tdeparts/factory.cpp index 485bd9a36..ce758288b 100644 --- a/tdeparts/factory.cpp +++ b/tdeparts/factory.cpp @@ -63,7 +63,7 @@ const TDEInstance *Factory::partInstanceFromLibrary( const TQCString &libraryNam KLibFactory *factory = library->factory(); if ( !factory ) return 0; - KParts::Factory *pfactory = tqt_dynamic_cast( factory ); + KParts::Factory *pfactory = dynamic_cast( factory ); if ( !pfactory ) return 0; return pfactory->partInstance(); diff --git a/tdeparts/genericfactory.h b/tdeparts/genericfactory.h index 27e76a753..0ecc72e4e 100644 --- a/tdeparts/genericfactory.h +++ b/tdeparts/genericfactory.h @@ -111,7 +111,7 @@ namespace KParts if ( part && !qstrcmp( className, "KParts::ReadOnlyPart" ) ) { - KParts::ReadWritePart *rwp = tqt_dynamic_cast( part ); + KParts::ReadWritePart *rwp = dynamic_cast( part ); if ( rwp ) rwp->setReadWrite( false ); } @@ -137,11 +137,11 @@ namespace KParts args ); // (this cast is guaranteed to work...) - KParts::Part *part = tqt_dynamic_cast( object ); + KParts::Part *part = dynamic_cast( object ); if ( part && !qstrcmp( className, "KParts::ReadOnlyPart" ) ) { - KParts::ReadWritePart *rwp = tqt_dynamic_cast( part ); + KParts::ReadWritePart *rwp = dynamic_cast( part ); if ( rwp ) rwp->setReadWrite( false ); } diff --git a/tdeparts/statusbarextension.cpp b/tdeparts/statusbarextension.cpp index f8e15b061..353ec733c 100644 --- a/tdeparts/statusbarextension.cpp +++ b/tdeparts/statusbarextension.cpp @@ -135,7 +135,7 @@ KStatusBar * StatusBarExtension::statusBar() const { if ( !m_statusBar ) { TQWidget* w = static_cast(parent())->widget(); - TDEMainWindow* mw = tqt_dynamic_cast( w->topLevelWidget() ); + TDEMainWindow* mw = dynamic_cast( w->topLevelWidget() ); if ( mw ) m_statusBar = mw->statusBar(); } diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index 66146bad3..466015adc 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -261,7 +261,7 @@ void KComboBox::setLineEdit( TQLineEdit *edit ) } TQComboBox::setLineEdit( edit ); - d->klineEdit = tqt_dynamic_cast( edit ); + d->klineEdit = dynamic_cast( edit ); setDelegate( d->klineEdit ); // Connect the returnPressed signal for both Q[K]LineEdits' diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index 31bbc2f2e..43390d6a2 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -308,7 +308,7 @@ TQWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const TQWidget* w = m_widget; // Is w a scrollview ? Call setCursor on the viewport in that case. - TQScrollView * sv = tqt_dynamic_cast( w ); + TQScrollView * sv = dynamic_cast( w ); if ( sv ) w = sv->viewport(); diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index 36f482f64..6e9fa0559 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -535,7 +535,7 @@ void KDockWidget::setPixmap(const TQPixmap& pixmap) { dtg->changeTab(this,pixmap,dtg->tabLabel(this)); TQWidget *contWid=parentDockContainer(); if (contWid) { - KDockContainer *x = tqt_dynamic_cast(contWid); + KDockContainer *x = dynamic_cast(contWid); if (x) { x->setPixmap(this,pixmap); } @@ -556,7 +556,7 @@ KDockWidget::~KDockWidget() } if (latestKDockContainer()) { - KDockContainer *x = tqt_dynamic_cast(latestKDockContainer()); + KDockContainer *x = dynamic_cast(latestKDockContainer()); if (x) { x->removeWidget(this); } @@ -719,7 +719,7 @@ void KDockWidget::setLatestKDockContainer(TQWidget* container) { if (container) { - if (tqt_dynamic_cast(container)) + if (dynamic_cast(container)) d->container=container; else d->container=0; @@ -729,7 +729,7 @@ void KDockWidget::setLatestKDockContainer(TQWidget* container) TQWidget* KDockWidget::latestKDockContainer() { if (!(d->container)) return 0; - if (tqt_dynamic_cast(d->container.operator->())) return d->container; + if (dynamic_cast(d->container.operator->())) return d->container; return 0; } @@ -782,7 +782,7 @@ void KDockWidget::updateHeader() header->hide(); } else { header->setTopLevel( false ); - if (widget && tqt_dynamic_cast(widget)) + if (widget && dynamic_cast(widget)) header->hide(); else header->show(); @@ -999,7 +999,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, * dock tab group, and our parent isn't a KDockContainer, and we have no explicit * parent dock container...we can't do much yet */ if ( parent() && !parent()->inherits("KDockSplitter") && !parentDockTabGroup() && - !(tqt_dynamic_cast(parent())) && !parentDockContainer()){ + !(dynamic_cast(parent())) && !parentDockContainer()){ // kdDebug(282)<<"KDockWidget::manualDock(): success = false (3)"<name()<widget; if (contWid) { - KDockContainer *cont=tqt_dynamic_cast(contWid); + KDockContainer *cont=dynamic_cast(contWid); if (cont) { if (latestKDockContainer() && (latestKDockContainer()!=contWid)) { - KDockContainer* dc = tqt_dynamic_cast(latestKDockContainer()); + KDockContainer* dc = dynamic_cast(latestKDockContainer()); if (dc) { dc->removeWidget(this); } @@ -1227,7 +1227,7 @@ TQWidget *KDockWidget::parentDockContainer() const { if (!parent()) return 0L; TQWidget* candidate = parentWidget()->parentWidget(); - if (candidate && tqt_dynamic_cast(candidate)) return candidate; + if (candidate && dynamic_cast(candidate)) return candidate; return 0L; } @@ -1382,7 +1382,7 @@ void KDockWidget::undock() { // kdDebug(282)<<"undocked from dockcontainer"<(d->container.operator->()); + KDockContainer* dc = dynamic_cast(d->container.operator->()); if (dc) { dc->undockWidget(this); setFormerBrotherDockWidget(dc->parentDockWidget()); @@ -1462,7 +1462,7 @@ void KDockWidget::setWidget( TQWidget* mw ) layout = new TQVBoxLayout( this ); layout->setResizeMode( TQLayout::Minimum ); - KDockContainer* dc = tqt_dynamic_cast(widget); + KDockContainer* dc = dynamic_cast(widget); if (dc) { d->isContainer=true; @@ -1538,7 +1538,7 @@ void KDockWidget::makeDockVisible() } if (parentDockContainer()) { TQWidget *contWid=parentDockContainer(); - KDockContainer *x = tqt_dynamic_cast(contWid); + KDockContainer *x = dynamic_cast(contWid); if (x) { x->showWidget(this); } @@ -1862,7 +1862,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) } if ( tqt_find_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L; if ( tqt_find_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L; - if (tqt_dynamic_cast(w)) return 0L; + if (dynamic_cast(w)) return 0L; if (!childDockWidgetList) return 0L; if ( childDockWidgetList->find(w) != -1 ) return 0L; @@ -2221,7 +2221,7 @@ void KDockManager::writeConfig(TQDomElement &base) for (TQObjectListIt it(d->containerDocks);it.current();++it) { - KDockContainer* dc = tqt_dynamic_cast(((KDockWidget*)it.current())->widget); + KDockContainer* dc = dynamic_cast(((KDockWidget*)it.current())->widget); if (dc) { dc->prepareSave(nList); } @@ -2241,7 +2241,7 @@ void KDockManager::writeConfig(TQDomElement &base) TQDomElement groupEl; if (obj->d->isContainer) { - KDockContainer* x = tqt_dynamic_cast(obj->widget); + KDockContainer* x = dynamic_cast(obj->widget); if (x) { groupEl=doc.createElement("dockContainer"); x->save(groupEl); @@ -2379,7 +2379,7 @@ void KDockManager::readConfig(TQDomElement &base) if (!(cont->d->isContainer)) { kdDebug(282)<<"restoration of dockContainer is only supported for already existing dock containers"<(cont->getWidget()); + KDockContainer *dc=dynamic_cast(cont->getWidget()); if (!dc) kdDebug(282)<<"Error while trying to handle dockcontainer configuration restoration"<load(childEl); @@ -2555,7 +2555,7 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group ) // kdDebug(282)<containerDocks);it.current();++it) { - KDockContainer* dc = tqt_dynamic_cast(((KDockWidget*)it.current())->widget); + KDockContainer* dc = dynamic_cast(((KDockWidget*)it.current())->widget); if (dc) { dc->prepareSave(nList); } @@ -2571,7 +2571,7 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group ) obj->header->saveConfig( c ); } if (obj->d->isContainer) { - KDockContainer* x = tqt_dynamic_cast(obj->widget); + KDockContainer* x = dynamic_cast(obj->widget); if (x) { x->save(c,group); } @@ -2734,7 +2734,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group ) } if (obj && obj->d->isContainer) { - tqt_dynamic_cast(obj->widget)->load(c,group); + dynamic_cast(obj->widget)->load(c,group); removeFromAutoCreateList(obj); } if ( obj && obj->header){ @@ -2774,7 +2774,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group ) KDockWidget* d2 = getDockWidgetFromName( list.current() ); tabDockGroup = d2->manualDock( d1, KDockWidget::DockCenter ); if ( tabDockGroup ){ - KDockTabGroup* tab = tqt_dynamic_cast(tabDockGroup->widget); + KDockTabGroup* tab = dynamic_cast(tabDockGroup->widget); list.next(); while ( list.current() && tabDockGroup ){ KDockWidget* tabDock = getDockWidgetFromName( list.current() ); @@ -2791,7 +2791,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group ) obj = tabDockGroup; } - if (obj && obj->d->isContainer) tqt_dynamic_cast(obj->widget)->load(c,group); + if (obj && obj->d->isContainer) dynamic_cast(obj->widget)->load(c,group); if ( obj && obj->header){ obj->header->loadConfig( c ); } @@ -3123,7 +3123,7 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize) // TQPtrList list(children()); // TQObject *obj=((TQPtrList)children())->at(i); TQObject *obj=children()->getFirst(); - if (split = tqt_dynamic_cast(obj)) + if (split = dynamic_cast(obj)) { split->setGeometry( TQRect(TQPoint(0,0), size() )); // break; diff --git a/tdeui/kdockwidget_private.cpp b/tdeui/kdockwidget_private.cpp index 3b00fbb1a..0741129ff 100644 --- a/tdeui/kdockwidget_private.cpp +++ b/tdeui/kdockwidget_private.cpp @@ -274,7 +274,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) // However, this works surprising well! if (m_orientation == TQt::Horizontal) { if (ev->oldSize().height() != ev->size().height()) { - if( (c1->getWidget()) && (dc=tqt_dynamic_cast(c1->getWidget()))) { + if( (c1->getWidget()) && (dc=dynamic_cast(c1->getWidget()))) { // dockwidget is on the bottom. move xpos so that the size from child1 stays xpos = (int)ceil(((double)factor) * checkValue(height() - child1->height() - 4) / height()); } else { @@ -286,7 +286,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) } } else { if (ev->oldSize().width() != width()) { - if( (c1->getWidget()) && (dc=tqt_dynamic_cast(c1->getWidget()))) { + if( (c1->getWidget()) && (dc=dynamic_cast(c1->getWidget()))) { xpos = (int)ceil(((double)factor) * checkValue(width() - child1->width() - 4) / width()); } else { // xpos should not change @@ -332,11 +332,11 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) kdDebug(282) << "Splitter visibility : " << divider->isVisible() << endl;; kdDebug(282) << "Splitter procentual pos: " << xpos << endl; if (c0->getWidget()) { - dc=tqt_dynamic_cast(c0->getWidget()); + dc=dynamic_cast(c0->getWidget()); kdDebug(282) << "Child 0 KDockContainer?: " << dc << endl; } if (c1->getWidget()) { - dc=tqt_dynamic_cast(c1->getWidget()); + dc=dynamic_cast(c1->getWidget()); kdDebug(282) << "Child 1 KDockContainer?: " << dc << endl; } kdDebug(282) << "Child0 : " << child0 << endl; @@ -348,7 +348,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) // if( ( (m_orientation==TQt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) || ( (m_orientation==TQt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) { - if ((c0->getWidget()) && (dc=tqt_dynamic_cast(c0->getWidget())) + if ((c0->getWidget()) && (dc=dynamic_cast(c0->getWidget())) && (dc->isOverlapMode())) { // child0 ist a KDockContainer int position; @@ -367,7 +367,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) divider->setGeometry(position, 0, 4, height()); } } else { - if ((c1->getWidget()) && (dc=tqt_dynamic_cast(c1->getWidget())) + if ((c1->getWidget()) && (dc=dynamic_cast(c1->getWidget())) && (dc->isOverlapMode())) { // child1 ist a KDockContainer int position; @@ -403,7 +403,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) int diff = 0; if (m_orientation == TQt::Horizontal) { - if ((c1->getWidget()) && (dc=tqt_dynamic_cast(c1->getWidget()))) { + if ((c1->getWidget()) && (dc=dynamic_cast(c1->getWidget()))) { // bottom is dockcontainer if( divider->isVisible() ) { child0->setGeometry(0, 0, width(), position); @@ -419,7 +419,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) } divider->setGeometry(0, position, width(), 4); } else { - if ((c1->getWidget()) && (dc=tqt_dynamic_cast(c1->getWidget()))) { + if ((c1->getWidget()) && (dc=dynamic_cast(c1->getWidget()))) { // right is dockcontainer if( divider->isVisible() ) { child0->setGeometry(0, 0, position, height()); diff --git a/tdeui/keditlistbox.cpp b/tdeui/keditlistbox.cpp index 142c4b437..33ca5bc19 100644 --- a/tdeui/keditlistbox.cpp +++ b/tdeui/keditlistbox.cpp @@ -418,7 +418,7 @@ void KEditListBox::virtual_hook( int, void* ) KEditListBox::CustomEditor::CustomEditor( KComboBox *combo ) { m_representationWidget = combo; - m_lineEdit = tqt_dynamic_cast( combo->lineEdit() ); + m_lineEdit = dynamic_cast( combo->lineEdit() ); assert( m_lineEdit ); } diff --git a/tdeui/kpixmapio.cpp b/tdeui/kpixmapio.cpp index 47f6c405f..c9047c2f6 100644 --- a/tdeui/kpixmapio.cpp +++ b/tdeui/kpixmapio.cpp @@ -664,7 +664,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) { uchar *src; TQ_INT32 val, *dst; - TQRgb pixel, *clut = img.tqcolorTable(); + TQRgb pixel, *clut = img.colorTable(); for (y=0; y(img).scanLine(y); @@ -721,7 +721,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) { uchar *src; TQ_INT32 val, *dst; - TQRgb pixel, *clut = img.tqcolorTable(); + TQRgb pixel, *clut = img.colorTable(); for (y=0; y(img).scanLine(y); @@ -780,7 +780,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) { uchar *src, *dst; int w1 = width/4; - TQRgb *clut = img.tqcolorTable(), d1, d2, d3, d4; + TQRgb *clut = img.colorTable(), d1, d2, d3, d4; for (y=0; y(img).scanLine(y); @@ -841,7 +841,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) { uchar *src, *dst; int w1 = width/4; - TQRgb *clut = img.tqcolorTable(), d1, d2, d3, d4; + TQRgb *clut = img.colorTable(), d1, d2, d3, d4; for (y=0; y(img).scanLine(y); @@ -878,7 +878,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) } else { uchar *src; - TQRgb *dst, *clut = img.tqcolorTable(); + TQRgb *dst, *clut = img.colorTable(); for (y=0; y(img).scanLine(y); diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 233907b72..8e9b376b2 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -552,7 +552,7 @@ void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomAttr &attrib int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSettings ) { - KKeyDialog dlg( bAllowLetterShortcuts, tqt_dynamic_cast(parent()) ); + KKeyDialog dlg( bAllowLetterShortcuts, dynamic_cast(parent()) ); TQPtrListIterator it( d->m_clients ); KXMLGUIClient *client; while( (client=it.current()) !=0 ) diff --git a/tdeui/qxembed.cpp b/tdeui/qxembed.cpp index 34543cf04..cb25ca3fe 100644 --- a/tdeui/qxembed.cpp +++ b/tdeui/qxembed.cpp @@ -479,7 +479,7 @@ static int qxembed_x11_event_filter( XEvent* e) // L0683: Set focus on saved focus widget if ( focusCurrent ) { focusCurrent->setFocus(); - if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( focusCurrent )) + if( QXEmbed* emb = dynamic_cast< QXEmbed* >( focusCurrent )) emb->updateEmbeddedFocus( true ); } else if ( !w->topLevelWidget()->focusWidget() ) @@ -513,7 +513,7 @@ static int qxembed_x11_event_filter( XEvent* e) // We first record what the focus widget was // and clear the Qt focus. if ( w->topLevelWidget()->focusWidget() ) { - if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget())) + if( QXEmbed* emb = dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget())) emb->updateEmbeddedFocus( false ); focusMap->insert( w->topLevelWidget(), new TQGuardedPtr(w->topLevelWidget()->focusWidget() ) ); diff --git a/tdeui/tdeaction.cpp b/tdeui/tdeaction.cpp index 9e9ec6a54..fe9b0644b 100644 --- a/tdeui/tdeaction.cpp +++ b/tdeui/tdeaction.cpp @@ -256,7 +256,7 @@ void TDEAction::initPrivate( const TQString& text, const TDEShortcut& cut, { d->m_cutDefault = cut; - m_parentCollection = tqt_dynamic_cast( parent() ); + m_parentCollection = dynamic_cast( parent() ); kdDebug(129) << "TDEAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; if ( m_parentCollection ) m_parentCollection->insert( this ); @@ -822,7 +822,7 @@ void TDEAction::plugMainWindowAccel( TQWidget *w ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - TDEMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a tdemainwindow + TDEMainWindow * mw = dynamic_cast(tl); // try to see if it's a tdemainwindow if (mw) plugAccel( mw->accel() ); else @@ -1057,12 +1057,12 @@ TQWidget* TDEAction::container( int index ) const TDEToolBar* TDEAction::toolBar( int index ) const { - return tqt_dynamic_cast( d->m_containers[ index ].m_container ); + return dynamic_cast( d->m_containers[ index ].m_container ); } TQPopupMenu* TDEAction::popupMenu( int index ) const { - return tqt_dynamic_cast( d->m_containers[ index ].m_container ); + return dynamic_cast( d->m_containers[ index ].m_container ); } TQWidget* TDEAction::representative( int index ) const @@ -1126,14 +1126,14 @@ void TDEAction::slotPopupActivated() { if( ::tqqt_cast(sender())) { - int id = tqt_dynamic_cast(sender())->value().toInt(); + int id = dynamic_cast(sender())->value().toInt(); int pos = findContainer(id); if(pos != -1) { - TQPopupMenu* qpm = tqt_dynamic_cast( container(pos) ); + TQPopupMenu* qpm = dynamic_cast( container(pos) ); if(qpm) { - TDEPopupMenu* kpm = tqt_dynamic_cast( qpm ); + TDEPopupMenu* kpm = dynamic_cast( qpm ); TQt::ButtonState state; if ( kpm ) // TDEPopupMenu? Nice, it stores the state. state = kpm->state(); diff --git a/tdeui/tdeactionclasses.cpp b/tdeui/tdeactionclasses.cpp index f70615b6c..5bea6cdaa 100644 --- a/tdeui/tdeactionclasses.cpp +++ b/tdeui/tdeactionclasses.cpp @@ -2028,7 +2028,7 @@ int TDEToggleToolBarAction::plug( TQWidget* w, int index ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - TDEMainWindow * mw = tqt_dynamic_cast(tl); // try to see if it's a tdemainwindow + TDEMainWindow * mw = dynamic_cast(tl); // try to see if it's a tdemainwindow if ( mw ) m_toolBar = mw->toolBar( m_toolBarName ); diff --git a/tdeui/tdeactioncollection.cpp b/tdeui/tdeactioncollection.cpp index fe0f123a9..3e78c01b0 100644 --- a/tdeui/tdeactioncollection.cpp +++ b/tdeui/tdeactioncollection.cpp @@ -110,7 +110,7 @@ TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, kdWarning(129) << "TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis kdDebug(129) << kdBacktrace() << endl; d = new TDEActionCollectionPrivate; - TQWidget* w = tqt_dynamic_cast( parent ); + TQWidget* w = dynamic_cast( parent ); if( w ) setWidget( w ); //d->m_bOneTDEAccelOnly = (d->m_tdeaccelList.count() > 0); diff --git a/tdeui/tdelistviewsearchline.cpp b/tdeui/tdelistviewsearchline.cpp index 50ad3d276..2ed43ba4b 100644 --- a/tdeui/tdelistviewsearchline.cpp +++ b/tdeui/tdelistviewsearchline.cpp @@ -470,7 +470,7 @@ TDEListViewSearchLine *TDEListViewSearchLineWidget::searchLine() const void TDEListViewSearchLineWidget::positionInToolBar() { - TDEToolBar *toolBar = tqt_dynamic_cast(parent()); + TDEToolBar *toolBar = dynamic_cast(parent()); if(toolBar) { diff --git a/tdeui/tdetoolbar.cpp b/tdeui/tdetoolbar.cpp index 9cfd2948f..039c483d8 100644 --- a/tdeui/tdetoolbar.cpp +++ b/tdeui/tdetoolbar.cpp @@ -195,7 +195,7 @@ TQSizePolicy TDEToolBarSeparator::sizePolicy() const TDEToolBar::TDEToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), - tqt_dynamic_cast(parent), + dynamic_cast(parent), parent, false, name ? name : "mainToolBar") { @@ -432,7 +432,7 @@ KAnimWidget *TDEToolBar::animatedWidget( int id ) Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - KAnimWidget *aw = tqt_dynamic_cast(*it); + KAnimWidget *aw = dynamic_cast(*it); if ( aw ) return aw; TQObjectList *l = queryList( "KAnimWidget" ); @@ -442,7 +442,7 @@ KAnimWidget *TDEToolBar::animatedWidget( int id ) } for ( TQObject *o = l->first(); o; o = l->next() ) { - KAnimWidget *aw = tqt_dynamic_cast(o); + KAnimWidget *aw = dynamic_cast(o); if ( aw ) { delete l; @@ -615,7 +615,7 @@ KComboBox * TDEToolBar::getCombo(int id) Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast( *it ); + return dynamic_cast( *it ); } @@ -624,7 +624,7 @@ KLineEdit * TDEToolBar::getLined (int id) Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast( *it ); + return dynamic_cast( *it ); } @@ -633,7 +633,7 @@ TDEToolBarButton * TDEToolBar::getButton (int id) Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast( *it ); + return dynamic_cast( *it ); } @@ -947,7 +947,7 @@ void TDEToolBar::setFlat (bool flag) else mainWindow()->moveDockWindow( this, DockTop ); // And remember to save the new look later - TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } @@ -1093,7 +1093,7 @@ void TDEToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) // reappear at the same position the next time. // The whole set of indexes has to be saved. //kdDebug(220) << name() << " writing index " << index << endl; - TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = dynamic_cast(mainWindow()); // don't save if there's only one toolbar // Don't use kmw->toolBarIterator() because you might @@ -1204,7 +1204,7 @@ void TDEToolBar::mousePressEvent ( TQMouseEvent *m ) else return; // assume this was an action handled elsewhere, no need for setSettingsDirty() } - TDEMainWindow *kmw = tqt_dynamic_cast(mw); + TDEMainWindow *kmw = dynamic_cast(mw); if ( kmw ) kmw->setSettingsDirty(); } @@ -1238,17 +1238,17 @@ void TDEToolBar::rebuildLayout() for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( w == rightAligned ) continue; - TDEToolBarSeparator *ktbs = tqt_dynamic_cast(w); + TDEToolBarSeparator *ktbs = dynamic_cast(w); if ( ktbs && !ktbs->showLine() ) { l->addSpacing( orientation() == TQt::Vertical ? w->sizeHint().height() : w->sizeHint().width() ); w->hide(); continue; } - if ( tqt_dynamic_cast(w) ) // w is a QPopupMenu? + if ( dynamic_cast(w) ) // w is a QPopupMenu? continue; l->addWidget( w ); w->show(); - if ((orientation() == TQt::Horizontal) && tqt_dynamic_cast(w)) // w is TQLineEdit ? + if ((orientation() == TQt::Horizontal) && dynamic_cast(w)) // w is TQLineEdit ? l->addSpacing(2); // A little bit extra spacing behind it. } if ( rightAligned ) { @@ -1270,14 +1270,14 @@ void TDEToolBar::rebuildLayout() void TDEToolBar::childEvent( TQChildEvent *e ) { if ( e->child()->isWidgetType() ) { - TQWidget * w = tqt_dynamic_cast(e->child()); + TQWidget * w = dynamic_cast(e->child()); if (!w || !(::qstrcmp( "qt_dockwidget_internal", w->name()))) { TQToolBar::childEvent( e ); return; } if ( e->type() == TQEvent::ChildInserted ) { - if ( !tqt_dynamic_cast(w)) { // e->child() is not a QPopupMenu + if ( !dynamic_cast(w)) { // e->child() is not a QPopupMenu // prevent items that have been explicitly inserted by insert*() from // being inserted again if ( !widget2id.contains( w ) ) @@ -1367,7 +1367,7 @@ TQSize TDEToolBar::sizeHint() const minSize = minSize.expandedTo(TQSize(0, sh.height())); minSize += TQSize(sh.width()+1, 0); - if (tqt_dynamic_cast(w)) // w is a TQLineEdit ? + if (dynamic_cast(w)) // w is a TQLineEdit ? minSize += TQSize(2, 0); // A little bit extra spacing behind it. } @@ -1478,7 +1478,7 @@ void TDEToolBar::slotAppearanceChanged() applyAppearanceSettings(TDEGlobal::config(), TQString::null, true /* lose local settings */ ); // And remember to save the new look later - TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } @@ -1750,7 +1750,7 @@ void TDEToolBar::toolBarPosChanged( TQToolBar *tb ) if ( d->oldPos == DockMinimized ) rebuildLayout(); d->oldPos = (TQMainWindow::ToolBarDock)barPos(); - TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = dynamic_cast(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } @@ -2139,7 +2139,7 @@ void TDEToolBar::slotContextAboutToShow() // and ToolBarHandler::setupActions() deletes it, so better not keep it around. // So we currently plug/unplug the last two actions of the menu. // Another way would be to keep around the actions and plug them all into a (new each time) popupmenu. - TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = dynamic_cast(mainWindow()); if ( kmw ) { kmw->setupToolbarMenuActions(); // Only allow hiding a toolbar if the action is also plugged somewhere else (e.g. menubar) @@ -2219,7 +2219,7 @@ void TDEToolBar::slotContextAboutToHide() { // We have to unplug whatever slotContextAboutToShow plugged into the menu. // Unplug the toolbar menu action - TDEMainWindow *kmw = tqt_dynamic_cast(mainWindow()); + TDEMainWindow *kmw = dynamic_cast(mainWindow()); if ( kmw && kmw->toolBarMenuAction() ) if ( kmw->toolBarMenuAction()->containerCount() > 1 ) kmw->toolBarMenuAction()->unplug(context); diff --git a/tdeui/tdetoolbarbutton.cpp b/tdeui/tdetoolbarbutton.cpp index 2c859ab2f..9e3313de3 100644 --- a/tdeui/tdetoolbarbutton.cpp +++ b/tdeui/tdetoolbarbutton.cpp @@ -123,7 +123,7 @@ TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id, TQToolButton::setTextLabel(_txt); d->m_instance = _instance; - d->m_parent = tqt_dynamic_cast(_parent); + d->m_parent = dynamic_cast(_parent); if (d->m_parent) { connect(d->m_parent, TQT_SIGNAL( modechange() ), this, TQT_SLOT( modeChange() )); @@ -156,7 +156,7 @@ TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id, d->m_id = _id; TQToolButton::setTextLabel(txt); - d->m_parent = tqt_dynamic_cast(_parent); + d->m_parent = dynamic_cast(_parent); if (d->m_parent) { connect(d->m_parent, TQT_SIGNAL( modechange() ), this, TQT_SLOT( modeChange() )); diff --git a/tdeui/tdetoolbarhandler.cpp b/tdeui/tdetoolbarhandler.cpp index dd9cf7087..45f2564e9 100644 --- a/tdeui/tdetoolbarhandler.cpp +++ b/tdeui/tdetoolbarhandler.cpp @@ -51,7 +51,7 @@ namespace TQPtrListIterator dockWindowIt( dockWindows ); for ( ; dockWindowIt.current(); ++dockWindowIt ) { - TDEToolBar *toolBar = tqt_dynamic_cast( dockWindowIt.current() ); + TDEToolBar *toolBar = dynamic_cast( dockWindowIt.current() ); if ( !toolBar ) continue; @@ -232,7 +232,7 @@ void ToolBarHandler::connectToActionContainer( TDEAction *action ) void ToolBarHandler::connectToActionContainer( TQWidget *container ) { - TQPopupMenu *popupMenu = tqt_dynamic_cast( container ); + TQPopupMenu *popupMenu = dynamic_cast( container ); if ( !popupMenu ) return; diff --git a/tdeutils/kfinddialog.cpp b/tdeutils/kfinddialog.cpp index 8339751f6..6444595b3 100644 --- a/tdeutils/kfinddialog.cpp +++ b/tdeutils/kfinddialog.cpp @@ -445,7 +445,7 @@ void KFindDialog::showPatterns() if ( d->m_regexpDialog ) { - KRegExpEditorInterface *iface = tqt_dynamic_cast( d->m_regexpDialog ); + KRegExpEditorInterface *iface = dynamic_cast( d->m_regexpDialog ); assert( iface ); iface->setRegExp( pattern() ); diff --git a/tdeutils/tdemultitabbar.cpp b/tdeutils/tdemultitabbar.cpp index 96dc3c9c3..ea82e2d6e 100644 --- a/tdeutils/tdemultitabbar.cpp +++ b/tdeutils/tdemultitabbar.cpp @@ -445,13 +445,13 @@ void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style) void KMultiTabBarButton::hideEvent( TQHideEvent* he) { TQPushButton::hideEvent(he); - KMultiTabBar *tb=tqt_dynamic_cast(parentWidget()); + KMultiTabBar *tb=dynamic_cast(parentWidget()); if (tb) tb->updateSeparator(); } void KMultiTabBarButton::showEvent( TQShowEvent* he) { TQPushButton::showEvent(he); - KMultiTabBar *tb=tqt_dynamic_cast(parentWidget()); + KMultiTabBar *tb=dynamic_cast(parentWidget()); if (tb) tb->updateSeparator(); }