Replaced various '#define' with actual strings - part 4

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 138bb80efa)
pull/271/head
Michele Calgaro 12 months ago
parent 4c9f3f02c0
commit 9fc074fcb2

@ -78,7 +78,7 @@ ClipboardInterface *clipboardInterface( T *t )
if( !t ) if( !t )
return 0; return 0;
return ::tqqt_cast<KHE::ClipboardInterface*>( t ); return ::tqt_cast<KHE::ClipboardInterface*>( t );
} }
} }

@ -71,7 +71,7 @@ ZoomInterface *zoomInterface( T *t )
if( !t ) if( !t )
return 0; return 0;
return ::tqqt_cast<KHE::ZoomInterface*>( t ); return ::tqt_cast<KHE::ZoomInterface*>( t );
} }
} }

@ -25,7 +25,7 @@
* TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" ); * TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
* if ( editorDialog ) { * if ( editorDialog ) {
* // tdeutils was installed, so the dialog was found fetch the editor interface * // tdeutils was installed, so the dialog was found fetch the editor interface
* KRegExpEditorInterface *editor = ::tqqt_cast<KRegExpEditorInterface *>( editorDialog ); * KRegExpEditorInterface *editor = ::tqt_cast<KRegExpEditorInterface *>( editorDialog );
* Q_ASSERT( editor ); // This should not fail! * Q_ASSERT( editor ); // This should not fail!
* *
* // now use the editor. * // now use the editor.
@ -53,7 +53,7 @@
* "KRegExpEditor/KRegExpEditor", TQString::null, parent ); * "KRegExpEditor/KRegExpEditor", TQString::null, parent );
* if ( editorWidget ) { * if ( editorWidget ) {
* // tdeutils was installed, so the widget was found fetch the editor interface * // tdeutils was installed, so the widget was found fetch the editor interface
* KRegExpEditorInterface *editor = ::tqqt_cast<KRegExpEditorInterface *>( editorWidget ); * KRegExpEditorInterface *editor = ::tqt_cast<KRegExpEditorInterface *>( editorWidget );
* Q_ASSERT( editor ); // This should not fail! * Q_ASSERT( editor ); // This should not fail!
* *
* // now use the editor. * // now use the editor.

@ -59,7 +59,7 @@ class TQStrList;
* setCentralWidget( p->widget() ); * setCentralWidget( p->widget() );
* *
* // cast the part to the TerminalInterface.. * // cast the part to the TerminalInterface..
* TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p ); * TerminalInterface* t = ::tqt_cast<TerminalInterface*>( p );
* if( ! t ) * if( ! t )
* { * {
* // This probably happens because the konsole that is installed * // This probably happens because the konsole that is installed

@ -20,7 +20,7 @@ Win::Win()
KParts::Part* p = factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) ; KParts::Part* p = factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) ;
setCentralWidget( p->widget() ); setCentralWidget( p->widget() );
TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p ); TerminalInterface* t = ::tqt_cast<TerminalInterface*>( p );
t->showShellInDir( TQDir::home().path() ); t->showShellInDir( TQDir::home().path() );
// TQStrList l; // TQStrList l;
// l.append( "python" ); // l.append( "python" );
@ -46,11 +46,11 @@ int main( int argc, char** argv )
void Win::pythonExited() void Win::pythonExited()
{ {
std::cerr << "hee, " << p << std::endl; std::cerr << "hee, " << p << std::endl;
std::cerr << ( ::tqqt_cast<TerminalInterface>(p) ) << std::endl; std::cerr << ( ::tqt_cast<TerminalInterface>(p) ) << std::endl;
// KMessageBox::sorry( this, TQString::fromUtf8( "Exited, status was %1" ).arg( status ) ); // KMessageBox::sorry( this, TQString::fromUtf8( "Exited, status was %1" ).arg( status ) );
disconnect(p, TQT_SIGNAL( processExited() ), disconnect(p, TQT_SIGNAL( processExited() ),
this, TQT_SLOT( pythonExited() )); this, TQT_SLOT( pythonExited() ));
TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p ); TerminalInterface* t = ::tqt_cast<TerminalInterface*>( p );
TQStrList l; TQStrList l;
l.append( "echo" ); l.append( "echo" );
l.append( "hello world" ); l.append( "hello world" );

@ -100,7 +100,7 @@ Document *document (KTextEditor::Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return ::tqqt_cast<Kate::Document*>(doc); return ::tqt_cast<Kate::Document*>(doc);
} }
DocumentExt *documentExt (KTextEditor::Document *doc) DocumentExt *documentExt (KTextEditor::Document *doc)
@ -121,7 +121,7 @@ View *view (KTextEditor::View *view)
if (!view) if (!view)
return 0; return 0;
return ::tqqt_cast<Kate::View*>(view); return ::tqt_cast<Kate::View*>(view);
} }
} }

@ -113,7 +113,7 @@ void AutoBookmarker::slotCompleted()
{ {
// get the document info // get the document info
KTextEditor::DocumentInfoInterface *di = KTextEditor::DocumentInfoInterface *di =
::tqqt_cast<KTextEditor::DocumentInfoInterface*>(document()); ::tqt_cast<KTextEditor::DocumentInfoInterface*>(document());
TQString mt; TQString mt;
if ( di ) // we can still try match the URL otherwise if ( di ) // we can still try match the URL otherwise
mt = di->mimeType(); mt = di->mimeType();

@ -567,7 +567,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress)) if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress))
{ {
static const TDEShortcut& _selectAll = TDEStdAccel::selectAll(); static const TDEShortcut& _selectAll = TDEStdAccel::selectAll();
TQLineEdit *edit = ::tqqt_cast<TQLineEdit *>(receiver); TQLineEdit *edit = ::tqt_cast<TQLineEdit *>(receiver);
if (edit) if (edit)
{ {
// We have a keypress for a lineedit... // We have a keypress for a lineedit...
@ -605,7 +605,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
} }
} }
TQTextEdit *medit = ::tqqt_cast<TQTextEdit *>(receiver); TQTextEdit *medit = ::tqt_cast<TQTextEdit *>(receiver);
if (medit) if (medit)
{ {
// We have a keypress for a multilineedit... // We have a keypress for a multilineedit...

@ -310,7 +310,7 @@ void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow )
/* /*
Grmbl. See TQDialog::show(). That should get fixed in Qt somehow. Grmbl. See TQDialog::show(). That should get fixed in Qt somehow.
*/ */
if( tqqt_cast< TQDialog* >( subwindow ) != NULL if( tqt_cast< TQDialog* >( subwindow ) != NULL
&& subwindow->parentWidget() == NULL && subwindow->parentWidget() == NULL
&& kapp->mainWidget() != NULL ) && kapp->mainWidget() != NULL )
{ {

@ -267,7 +267,7 @@ void TDEStyle::polish( const TQStyleControlElementData &ceData, ControlElementFl
TQWidget* widget = reinterpret_cast<TQWidget*>(ptr); TQWidget* widget = reinterpret_cast<TQWidget*>(ptr);
if ( d->useFilledFrameWorkaround ) if ( d->useFilledFrameWorkaround )
{ {
if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { if ( TQFrame *frame = ::tqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape(); TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->installEventFilter(this); widget->installEventFilter(this);
@ -291,7 +291,7 @@ void TDEStyle::unPolish( const TQStyleControlElementData &ceData, ControlElement
TQWidget* widget = reinterpret_cast<TQWidget*>(ptr); TQWidget* widget = reinterpret_cast<TQWidget*>(ptr);
if ( d->useFilledFrameWorkaround ) if ( d->useFilledFrameWorkaround )
{ {
if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { if ( TQFrame *frame = ::tqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape(); TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->removeEventFilter(this); widget->removeEventFilter(this);
@ -1927,14 +1927,14 @@ bool TDEStyle::objectEventHandler( const TQStyleControlElementData &ceData, Cont
// -- Karol. // -- Karol.
TQFrame *frame = 0; TQFrame *frame = 0;
if ( event->type() == TQEvent::Paint if ( event->type() == TQEvent::Paint
&& (frame = ::tqqt_cast<TQFrame*>(object)) ) && (frame = ::tqt_cast<TQFrame*>(object)) )
{ {
if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel) if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel)
return false; return false;
bool horizontal = true; bool horizontal = true;
TQPaintEvent* pe = (TQPaintEvent*)event; TQPaintEvent* pe = (TQPaintEvent*)event;
TQToolBar *toolbar = ::tqqt_cast< TQToolBar *>( frame ); TQToolBar *toolbar = ::tqt_cast< TQToolBar *>( frame );
TQRect r = pe->rect(); TQRect r = pe->rect();
if (toolbar && toolbar->orientation() == TQt::Vertical) if (toolbar && toolbar->orientation() == TQt::Vertical)
@ -2317,8 +2317,8 @@ void TransparencyHandler::blendToPixmap(const TQColorGroup &cg, const TQWidget*
return; return;
// Allow styles to define the blend pixmap - allows for some interesting effects. // Allow styles to define the blend pixmap - allows for some interesting effects.
if (::tqqt_cast<TQPopupMenu*>(p)) if (::tqt_cast<TQPopupMenu*>(p))
tdestyle->renderMenuBlendPixmap( blendPix, cg, ::tqqt_cast<TQPopupMenu*>(p) ); tdestyle->renderMenuBlendPixmap( blendPix, cg, ::tqt_cast<TQPopupMenu*>(p) );
else else
blendPix.fill(cg.button()); // Just tint as the default behavior blendPix.fill(cg.button()); // Just tint as the default behavior
@ -2339,9 +2339,9 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p)
renderPix.resize( pix.width(), pix.height() ); renderPix.resize( pix.width(), pix.height() );
// Allow styles to define the blend pixmap - allows for some interesting effects. // Allow styles to define the blend pixmap - allows for some interesting effects.
if (::tqqt_cast<TQPopupMenu*>(p)) if (::tqt_cast<TQPopupMenu*>(p))
tdestyle->renderMenuBlendPixmap( renderPix, p->colorGroup(), tdestyle->renderMenuBlendPixmap( renderPix, p->colorGroup(),
::tqqt_cast<TQPopupMenu*>(p) ); ::tqt_cast<TQPopupMenu*>(p) );
else else
renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior

@ -249,7 +249,7 @@ KJSDebugWin * KJSDebugWin::kjs_html_debugger = 0;
TQString SourceFile::getCode() TQString SourceFile::getCode()
{ {
if (interpreter) { if (interpreter) {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart*>(static_cast<ScriptInterpreter*>(interpreter)->part()); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart*>(static_cast<ScriptInterpreter*>(interpreter)->part());
if (part && url == part->url().url() && TDEHTMLPageCache::self()->isValid(part->cacheId())) { if (part && url == part->url().url() && TDEHTMLPageCache::self()->isValid(part->cacheId())) {
Decoder *decoder = part->createDecoder(); Decoder *decoder = part->createDecoder();
TQByteArray data; TQByteArray data;
@ -805,7 +805,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
return true; return true;
KParts::ReadOnlyPart *part = static_cast<ScriptInterpreter*>(exec->interpreter())->part(); KParts::ReadOnlyPart *part = static_cast<ScriptInterpreter*>(exec->interpreter())->part();
TDEHTMLPart *tdehtmlpart = ::tqqt_cast<TDEHTMLPart*>(part); TDEHTMLPart *tdehtmlpart = ::tqt_cast<TDEHTMLPart*>(part);
if (tdehtmlpart && !tdehtmlpart->settings()->isJavaScriptErrorReportingEnabled()) if (tdehtmlpart && !tdehtmlpart->settings()->isJavaScriptErrorReportingEnabled())
return true; return true;

@ -1093,7 +1093,7 @@ Value DOMDocumentProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
Window* active = Window::retrieveActive(exec); Window* active = Window::retrieveActive(exec);
// Complete the URL using the "active part" (running interpreter). We do this for the security // Complete the URL using the "active part" (running interpreter). We do this for the security
// check and to make sure we load exactly the same url as we have verified to be safe // check and to make sure we load exactly the same url as we have verified to be safe
TDEHTMLPart *tdehtmlpart = ::tqqt_cast<TDEHTMLPart *>(active->part()); TDEHTMLPart *tdehtmlpart = ::tqt_cast<TDEHTMLPart *>(active->part());
if (tdehtmlpart) { if (tdehtmlpart) {
// Security: only allow documents to be loaded from the same host // Security: only allow documents to be loaded from the same host
TQString dstUrl = tdehtmlpart->htmlDocument().completeURL(s).string(); TQString dstUrl = tdehtmlpart->htmlDocument().completeURL(s).string();
@ -1279,7 +1279,7 @@ Value DOMDOMImplementationProtoFunc::tryCall(ExecState *exec, Object &thisObj, c
case DOMDOMImplementation::CreateDocument: { // DOM2 case DOMDOMImplementation::CreateDocument: { // DOM2
// Initially set the URL to document of the creator... this is so that it resides in the same // Initially set the URL to document of the creator... this is so that it resides in the same
// host/domain for security checks. The URL will be updated if Document.load() is called. // host/domain for security checks. The URL will be updated if Document.load() is called.
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart*>(static_cast<KJS::ScriptInterpreter*>(exec->interpreter())->part()); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart*>(static_cast<KJS::ScriptInterpreter*>(exec->interpreter())->part());
if (part) { if (part) {
Document doc = implementation.createDocument(args[0].toString(exec).string(),args[1].toString(exec).string(),toNode(args[2])); Document doc = implementation.createDocument(args[0].toString(exec).string(),args[1].toString(exec).string(),toNode(args[2]));
KURL url = static_cast<DocumentImpl*>(part->document().handle())->URL(); KURL url = static_cast<DocumentImpl*>(part->document().handle())->URL();

@ -62,7 +62,7 @@ void JSEventListener::handleEvent(DOM::Event &evt)
if (KJSDebugWin::debugWindow() && KJSDebugWin::debugWindow()->inSession()) if (KJSDebugWin::debugWindow() && KJSDebugWin::debugWindow()->inSession())
return; return;
#endif #endif
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(static_cast<Window*>(win.imp())->part()); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(static_cast<Window*>(win.imp())->part());
KJSProxy *proxy = 0L; KJSProxy *proxy = 0L;
if (part) if (part)
proxy = part->jScript(); proxy = part->jScript();
@ -162,7 +162,7 @@ Object JSLazyEventListener::listenerObj() const
void JSLazyEventListener::parseCode() const void JSLazyEventListener::parseCode() const
{ {
if (!parsed) { if (!parsed) {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(static_cast<Window*>(win.imp())->part()); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(static_cast<Window*>(win.imp())->part());
KJSProxy *proxy = 0L; KJSProxy *proxy = 0L;
if (part) if (part)
proxy = part->jScript(); proxy = part->jScript();

@ -420,7 +420,7 @@ Window *Window::retrieveWindow(KParts::ReadOnlyPart *p)
Object obj = Object::dynamicCast( retrieve( p ) ); Object obj = Object::dynamicCast( retrieve( p ) );
#ifndef NDEBUG #ifndef NDEBUG
// obj should never be null, except when javascript has been disabled in that part. // obj should never be null, except when javascript has been disabled in that part.
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(p); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(p);
if ( part && part->jScriptEnabled() ) if ( part && part->jScriptEnabled() )
{ {
assert( obj.isValid() ); assert( obj.isValid() );
@ -447,10 +447,10 @@ Window *Window::retrieveActive(ExecState *exec)
Value Window::retrieve(KParts::ReadOnlyPart *p) Value Window::retrieve(KParts::ReadOnlyPart *p)
{ {
assert(p); assert(p);
TDEHTMLPart * part = ::tqqt_cast<TDEHTMLPart *>(p); TDEHTMLPart * part = ::tqt_cast<TDEHTMLPart *>(p);
KJSProxy *proxy = 0L; KJSProxy *proxy = 0L;
if (!part) { if (!part) {
part = ::tqqt_cast<TDEHTMLPart *>(p->parent()); part = ::tqt_cast<TDEHTMLPart *>(p->parent());
if (part) if (part)
proxy = part->framejScript(p); proxy = part->framejScript(p);
} else } else
@ -477,7 +477,7 @@ Location *Window::location() const
ObjectImp* Window::frames( ExecState* exec ) const ObjectImp* Window::frames( ExecState* exec ) const
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (part) if (part)
return m_frames ? m_frames : return m_frames ? m_frames :
(const_cast<Window*>(this)->m_frames = new FrameArray(exec, part)); (const_cast<Window*>(this)->m_frames = new FrameArray(exec, part));
@ -515,7 +515,7 @@ bool Window::hasProperty(ExecState *exec, const Identifier &p) const
if (Lookup::findEntry(&WindowTable, p)) if (Lookup::findEntry(&WindowTable, p))
return true; return true;
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part) if (!part)
return false; return false;
@ -584,7 +584,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
} }
const HashEntry* entry = Lookup::findEntry(&WindowTable, p); const HashEntry* entry = Lookup::findEntry(&WindowTable, p);
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
// properties that work on all windows // properties that work on all windows
if (entry) { if (entry) {
@ -1084,7 +1084,7 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
default: default:
break; break;
} }
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (part) { if (part) {
switch( entry->value ) { switch( entry->value ) {
case Status: { case Status: {
@ -1221,7 +1221,7 @@ bool Window::toBoolean(ExecState *) const
DOM::AbstractView Window::toAbstractView() const DOM::AbstractView Window::toAbstractView() const
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part) if (!part)
return DOM::AbstractView(); return DOM::AbstractView();
return part->document().defaultView(); return part->document().defaultView();
@ -1239,7 +1239,7 @@ void Window::closeNow()
if (m_frame.isNull() || m_frame->m_part.isNull()) { if (m_frame.isNull() || m_frame->m_part.isNull()) {
kdDebug(6070) << k_funcinfo << "part is deleted already" << endl; kdDebug(6070) << k_funcinfo << "part is deleted already" << endl;
} else { } else {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part) { if (!part) {
kdDebug(6070) << "closeNow on non TDEHTML part" << endl; kdDebug(6070) << "closeNow on non TDEHTML part" << endl;
} else { } else {
@ -1287,7 +1287,7 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
if ( activePart == m_frame->m_part ) // Not calling from another frame, no problem. if ( activePart == m_frame->m_part ) // Not calling from another frame, no problem.
return true; return true;
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part) if (!part)
return true; // not a TDEHTMLPart return true; // not a TDEHTMLPart
@ -1300,7 +1300,7 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
return false; return false;
} }
TDEHTMLPart *activeTDEHTMLPart = ::tqqt_cast<TDEHTMLPart *>(activePart); TDEHTMLPart *activeTDEHTMLPart = ::tqt_cast<TDEHTMLPart *>(activePart);
if (!activeTDEHTMLPart) if (!activeTDEHTMLPart)
return true; // not a TDEHTMLPart return true; // not a TDEHTMLPart
@ -1326,7 +1326,7 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
void Window::setListener(ExecState *exec, int eventId, Value func) void Window::setListener(ExecState *exec, int eventId, Value func)
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part || !isSafeScript(exec)) if (!part || !isSafeScript(exec))
return; return;
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(part->htmlDocument().handle()); DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(part->htmlDocument().handle());
@ -1338,7 +1338,7 @@ void Window::setListener(ExecState *exec, int eventId, Value func)
Value Window::getListener(ExecState *exec, int eventId) const Value Window::getListener(ExecState *exec, int eventId) const
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part || !isSafeScript(exec)) if (!part || !isSafeScript(exec))
return Undefined(); return Undefined();
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(part->htmlDocument().handle()); DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(part->htmlDocument().handle());
@ -1356,7 +1356,7 @@ Value Window::getListener(ExecState *exec, int eventId) const
JSEventListener *Window::getJSEventListener(const Value& val, bool html) JSEventListener *Window::getJSEventListener(const Value& val, bool html)
{ {
// This function is so hot that it's worth coding it directly with imps. // This function is so hot that it's worth coding it directly with imps.
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part || val.type() != ObjectType) if (!part || val.type() != ObjectType)
return 0; return 0;
@ -1432,8 +1432,8 @@ void Window::setCurrentEvent( DOM::Event *evt )
void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory) void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory)
{ {
Window* active = Window::retrieveActive(exec); Window* active = Window::retrieveActive(exec);
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
TDEHTMLPart *active_part = ::tqqt_cast<TDEHTMLPart *>(active->part()); TDEHTMLPart *active_part = ::tqt_cast<TDEHTMLPart *>(active->part());
// Complete the URL using the "active part" (running interpreter) // Complete the URL using the "active part" (running interpreter)
if (active_part && part) { if (active_part && part) {
if (url[0] == TQChar('#')) { if (url[0] == TQChar('#')) {
@ -1469,7 +1469,7 @@ void Window::delayedGoHistory( int steps )
void Window::goHistory( int steps ) void Window::goHistory( int steps )
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if(!part) if(!part)
// TODO history readonlypart // TODO history readonlypart
return; return;
@ -1487,7 +1487,7 @@ void Window::goHistory( int steps )
void KJS::Window::resizeTo(TQWidget* tl, int width, int height) void KJS::Window::resizeTo(TQWidget* tl, int width, int height)
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if(!part) if(!part)
// TODO resizeTo readonlypart // TODO resizeTo readonlypart
return; return;
@ -1530,7 +1530,7 @@ void KJS::Window::resizeTo(TQWidget* tl, int width, int height)
Value Window::openWindow(ExecState *exec, const List& args) Value Window::openWindow(ExecState *exec, const List& args)
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
if (!part) if (!part)
return Undefined(); return Undefined();
TDEHTMLView *widget = part->view(); TDEHTMLView *widget = part->view();
@ -1543,7 +1543,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
KURL url; KURL url;
if (!str.isEmpty()) if (!str.isEmpty())
{ {
TDEHTMLPart* p = ::tqqt_cast<TDEHTMLPart *>(Window::retrieveActive(exec)->m_frame->m_part); TDEHTMLPart* p = ::tqt_cast<TDEHTMLPart *>(Window::retrieveActive(exec)->m_frame->m_part);
if ( p ) if ( p )
url = p->htmlDocument().completeURL(str).string(); url = p->htmlDocument().completeURL(str).string();
if ( !p || if ( !p ||
@ -1601,7 +1601,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features) Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features)
{ {
TDEHTMLPart *p = ::tqqt_cast<TDEHTMLPart *>(m_frame->m_part); TDEHTMLPart *p = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
TDEHTMLView *widget = p->view(); TDEHTMLView *widget = p->view();
KParts::WindowArgs winargs; KParts::WindowArgs winargs;
@ -1702,7 +1702,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
// request window (new or existing if framename is set) // request window (new or existing if framename is set)
KParts::ReadOnlyPart *newPart = 0L; KParts::ReadOnlyPart *newPart = 0L;
emit p->browserExtension()->createNewWindow(KURL(), uargs,winargs,newPart); emit p->browserExtension()->createNewWindow(KURL(), uargs,winargs,newPart);
if (newPart && ::tqqt_cast<TDEHTMLPart*>(newPart)) { if (newPart && ::tqt_cast<TDEHTMLPart*>(newPart)) {
TDEHTMLPart *tdehtmlpart = static_cast<TDEHTMLPart*>(newPart); TDEHTMLPart *tdehtmlpart = static_cast<TDEHTMLPart*>(newPart);
//tqDebug("opener set to %p (this Window's part) in new Window %p (this Window=%p)",part,win,window); //tqDebug("opener set to %p (this Window's part) in new Window %p (this Window=%p)",part,win,window);
tdehtmlpart->setOpener(p); tdehtmlpart->setOpener(p);
@ -1734,7 +1734,7 @@ void Window::forgetSuppressedWindows()
void Window::showSuppressedWindows() void Window::showSuppressedWindows()
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>( m_frame->m_part ); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>( m_frame->m_part );
KJS::Interpreter *interpreter = part->jScript()->interpreter(); KJS::Interpreter *interpreter = part->jScript()->interpreter();
ExecState *exec = interpreter->globalExec(); ExecState *exec = interpreter->globalExec();
@ -1759,7 +1759,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
Window *window = static_cast<Window *>(thisObj.imp()); Window *window = static_cast<Window *>(thisObj.imp());
TQString str, str2; TQString str, str2;
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(window->m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(window->m_frame->m_part);
if (!part) if (!part)
return Undefined(); return Undefined();
@ -2113,7 +2113,7 @@ ScheduledAction::ScheduledAction(TQString _code, DateTimeMS _nextTime, int _inte
bool ScheduledAction::execute(Window *window) bool ScheduledAction::execute(Window *window)
{ {
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(window->m_frame->m_part); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(window->m_frame->m_part);
if (!part || !part->jScriptEnabled()) if (!part || !part->jScriptEnabled())
return false; return false;
ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(part->jScript()->interpreter()); ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(part->jScript()->interpreter());
@ -2589,7 +2589,7 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
TQString str = v.toString(exec).qstring(); TQString str = v.toString(exec).qstring();
switch (entry->value) { switch (entry->value) {
case Href: { case Href: {
TDEHTMLPart* p =::tqqt_cast<TDEHTMLPart*>(Window::retrieveActive(exec)->part()); TDEHTMLPart* p =::tqt_cast<TDEHTMLPart*>(Window::retrieveActive(exec)->part());
if ( p ) if ( p )
url = p->htmlDocument().completeURL( str ).string(); url = p->htmlDocument().completeURL( str ).string();
else else
@ -2680,7 +2680,7 @@ Value LocationFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
id == Location::Replace); id == Location::Replace);
break; break;
case Location::Reload: { case Location::Reload: {
TDEHTMLPart *tdehtmlpart = ::tqqt_cast<TDEHTMLPart *>(part); TDEHTMLPart *tdehtmlpart = ::tqt_cast<TDEHTMLPart *>(part);
if (tdehtmlpart) if (tdehtmlpart)
tdehtmlpart->scheduleRedirection(-1, part->url().url(), true/*lock history*/); tdehtmlpart->scheduleRedirection(-1, part->url().url(), true/*lock history*/);
else else

@ -724,7 +724,7 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L
} }
TQString method = args[0].toString(exec).qstring(); TQString method = args[0].toString(exec).qstring();
TDEHTMLPart *part = ::tqqt_cast<TDEHTMLPart *>(Window::retrieveActive(exec)->part()); TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(Window::retrieveActive(exec)->part());
if (!part) if (!part)
return Undefined(); return Undefined();
KURL url = KURL(part->document().completeURL(args[1].toString(exec).qstring()).string()); KURL url = KURL(part->document().completeURL(args[1].toString(exec).qstring()).string());

@ -414,7 +414,7 @@ DocumentImpl* HTMLFrameElementImpl::contentDocument() const
RenderPart* render = static_cast<RenderPart*>( m_render ); RenderPart* render = static_cast<RenderPart*>( m_render );
if(render->widget() && ::tqqt_cast<TDEHTMLView*>( render->widget()) ) if(render->widget() && ::tqt_cast<TDEHTMLView*>( render->widget()) )
return static_cast<TDEHTMLView*>( render->widget() )->part()->xmlDocImpl(); return static_cast<TDEHTMLView*>( render->widget() )->part()->xmlDocImpl();
return 0; return 0;
@ -426,7 +426,7 @@ TDEHTMLPart* HTMLFrameElementImpl::contentPart() const
RenderPart* render = static_cast<RenderPart*>( m_render ); RenderPart* render = static_cast<RenderPart*>( m_render );
if(render->widget() && ::tqqt_cast<TDEHTMLView*>( render->widget()) ) if(render->widget() && ::tqt_cast<TDEHTMLView*>( render->widget()) )
return static_cast<TDEHTMLView*>( render->widget() )->part(); return static_cast<TDEHTMLView*>( render->widget() )->part();
return 0; return 0;

@ -422,7 +422,7 @@ DocumentImpl* HTMLObjectElementImpl::contentDocument() const
if ( !m_render ) return 0; if ( !m_render ) return 0;
if ( !m_render->isWidget() ) return 0; if ( !m_render->isWidget() ) return 0;
TQWidget* widget = static_cast<RenderWidget*>( m_render )->widget(); TQWidget* widget = static_cast<RenderWidget*>( m_render )->widget();
if( widget && ::tqqt_cast<TDEHTMLView*>( widget ) ) if( widget && ::tqt_cast<TDEHTMLView*>( widget ) )
return static_cast<TDEHTMLView*>( widget )->part()->xmlDocImpl(); return static_cast<TDEHTMLView*>( widget )->part()->xmlDocImpl();
return 0; return 0;
} }

@ -186,7 +186,7 @@ bool RenderWidget::event( TQEvent *e )
repaint(); repaint();
} }
// eat all events - except if this is a frame (in which case TDEHTMLView handles it all) // eat all events - except if this is a frame (in which case TDEHTMLView handles it all)
if ( ::tqqt_cast<TDEHTMLView *>( m_widget ) ) if ( ::tqt_cast<TDEHTMLView *>( m_widget ) )
return TQObject::event( e ); return TQObject::event( e );
return true; return true;
} }
@ -212,7 +212,7 @@ void RenderWidget::setQWidget(TQWidget *widget)
connect( m_widget, TQT_SIGNAL( destroyed()), this, TQT_SLOT( slotWidgetDestructed())); connect( m_widget, TQT_SIGNAL( destroyed()), this, TQT_SLOT( slotWidgetDestructed()));
m_widget->installEventFilter(this); m_widget->installEventFilter(this);
if ( (m_isTDEHTMLWidget = !strcmp(m_widget->name(), "__tdehtml")) && !::tqqt_cast<TQFrame*>(m_widget)) if ( (m_isTDEHTMLWidget = !strcmp(m_widget->name(), "__tdehtml")) && !::tqt_cast<TQFrame*>(m_widget))
m_widget->setBackgroundMode( TQWidget::NoBackground ); m_widget->setBackgroundMode( TQWidget::NoBackground );
if (m_widget->focusPolicy() > TQWidget::StrongFocus) if (m_widget->focusPolicy() > TQWidget::StrongFocus)
@ -330,7 +330,7 @@ void RenderWidget::updateFromElement()
else else
m_widget->unsetPalette(); m_widget->unsetPalette();
// Border: // Border:
TQFrame* frame = ::tqqt_cast<TQFrame*>(m_widget); TQFrame* frame = ::tqt_cast<TQFrame*>(m_widget);
if (frame) { if (frame) {
if (shouldPaintBackgroundOrBorder()) if (shouldPaintBackgroundOrBorder())
{ {
@ -532,7 +532,7 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx,
TQObjectList childWidgets = widget->childrenListObject(); TQObjectList childWidgets = widget->childrenListObject();
TQObjectListIterator it(childWidgets); TQObjectListIterator it(childWidgets);
for (; it.current(); ++it) { for (; it.current(); ++it) {
TQWidget* const w = ::tqqt_cast<TQWidget *>(it.current()); TQWidget* const w = ::tqt_cast<TQWidget *>(it.current());
if ( w && !w->isTopLevel() && !w->isHidden()) { if ( w && !w->isTopLevel() && !w->isHidden()) {
TQRect r2 = w->geometry(); TQRect r2 = w->geometry();
blit -= r2; blit -= r2;
@ -613,7 +613,7 @@ void RenderWidget::paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty)
bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e) bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
{ {
// no special event processing if this is a frame (in which case TDEHTMLView handles it all) // no special event processing if this is a frame (in which case TDEHTMLView handles it all)
if ( ::tqqt_cast<TDEHTMLView *>( m_widget ) ) if ( ::tqt_cast<TDEHTMLView *>( m_widget ) )
return false; return false;
if ( !element() ) return true; if ( !element() ) return true;
@ -809,8 +809,8 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
// << " pos=" << p << " type=" << type // << " pos=" << p << " type=" << type
// << " button=" << button << " state=" << state << endl; // << " button=" << button << " state=" << state << endl;
TQMouseEvent e(type, p, button, state); TQMouseEvent e(type, p, button, state);
TQScrollView * sc = ::tqqt_cast<TQScrollView*>(m_widget); TQScrollView * sc = ::tqt_cast<TQScrollView*>(m_widget);
if (sc && !::tqqt_cast<TQListBox*>(m_widget)) if (sc && !::tqt_cast<TQListBox*>(m_widget))
static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(TQT_TQEVENT(&e)); static_cast<ScrollViewEventPropagator *>(sc)->sendEvent(TQT_TQEVENT(&e));
else else
static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&e)); static_cast<EventPropagator *>(m_widget)->sendEvent(TQT_TQEVENT(&e));

@ -343,9 +343,9 @@ void TDEHTMLPartBrowserExtension::updateEditActions()
bool hasSelection = false; bool hasSelection = false;
if( m_editableFormWidget) { if( m_editableFormWidget) {
if ( ::tqqt_cast<TQLineEdit*>(m_editableFormWidget)) if ( ::tqt_cast<TQLineEdit*>(m_editableFormWidget))
hasSelection = static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->hasSelectedText(); hasSelection = static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->hasSelectedText();
else if(::tqqt_cast<TQTextEdit*>(m_editableFormWidget)) else if(::tqt_cast<TQTextEdit*>(m_editableFormWidget))
hasSelection = static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->hasSelectedText(); hasSelection = static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->hasSelectedText();
} }

@ -177,7 +177,7 @@ void tdehtml::ChildFrame::liveConnectEvent(const unsigned long, const TQString &
script += ")"; script += ")";
kdDebug(6050) << "tdehtml::ChildFrame::liveConnectEvent " << script << endl; kdDebug(6050) << "tdehtml::ChildFrame::liveConnectEvent " << script << endl;
TDEHTMLPart * part = ::tqqt_cast<TDEHTMLPart *>(m_part->parent()); TDEHTMLPart * part = ::tqt_cast<TDEHTMLPart *>(m_part->parent());
if (!part) if (!part)
return; return;
if (!m_jscript) if (!m_jscript)
@ -1844,7 +1844,7 @@ void TDEHTMLPart::slotFinished( TDEIO::Job * job )
return; return;
} }
TDEIO::TransferJob *tjob = ::tqqt_cast<TDEIO::TransferJob*>(job); TDEIO::TransferJob *tjob = ::tqt_cast<TDEIO::TransferJob*>(job);
if (tjob && tjob->isErrorPage()) { if (tjob && tjob->isErrorPage()) {
tdehtml::RenderPart *renderPart = d->m_frame ? static_cast<tdehtml::RenderPart *>(d->m_frame->m_frame) : 0; tdehtml::RenderPart *renderPart = d->m_frame ? static_cast<tdehtml::RenderPart *>(d->m_frame->m_frame) : 0;
if (renderPart) { if (renderPart) {
@ -4489,7 +4489,7 @@ bool TDEHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &
//CRITICAL STUFF //CRITICAL STUFF
if ( child->m_part ) if ( child->m_part )
{ {
if (!::tqqt_cast<TDEHTMLPart*>(child->m_part) && child->m_jscript) if (!::tqt_cast<TDEHTMLPart*>(child->m_part) && child->m_jscript)
child->m_jscript->clear(); child->m_jscript->clear();
partManager()->removePart( (KParts::ReadOnlyPart *)child->m_part ); partManager()->removePart( (KParts::ReadOnlyPart *)child->m_part );
delete (KParts::ReadOnlyPart *)child->m_part; delete (KParts::ReadOnlyPart *)child->m_part;
@ -4510,7 +4510,7 @@ bool TDEHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &
child->m_part = part; child->m_part = part;
if (::tqqt_cast<TDEHTMLPart*>(part)) { if (::tqt_cast<TDEHTMLPart*>(part)) {
static_cast<TDEHTMLPart*>(part)->d->m_frame = child; static_cast<TDEHTMLPart*>(part)->d->m_frame = child;
} else if (child->m_frame) { } else if (child->m_frame) {
child->m_liveconnect = KParts::LiveConnectExtension::childObject(part); child->m_liveconnect = KParts::LiveConnectExtension::childObject(part);
@ -5302,7 +5302,7 @@ bool TDEHTMLPart::frameExists( const TQString &frameName )
KJSProxy *TDEHTMLPart::framejScript(KParts::ReadOnlyPart *framePart) KJSProxy *TDEHTMLPart::framejScript(KParts::ReadOnlyPart *framePart)
{ {
TDEHTMLPart* const kp = ::tqqt_cast<TDEHTMLPart*>(framePart); TDEHTMLPart* const kp = ::tqt_cast<TDEHTMLPart*>(framePart);
if (kp) if (kp)
return kp->jScript(); return kp->jScript();
@ -5320,7 +5320,7 @@ KJSProxy *TDEHTMLPart::framejScript(KParts::ReadOnlyPart *framePart)
TDEHTMLPart *TDEHTMLPart::parentPart() TDEHTMLPart *TDEHTMLPart::parentPart()
{ {
return ::tqqt_cast<TDEHTMLPart *>( parent() ); return ::tqt_cast<TDEHTMLPart *>( parent() );
} }
tdehtml::ChildFrame *TDEHTMLPart::recursiveFrameRequest( TDEHTMLPart *callingHtmlPart, const KURL &url, tdehtml::ChildFrame *TDEHTMLPart::recursiveFrameRequest( TDEHTMLPart *callingHtmlPart, const KURL &url,

@ -62,7 +62,7 @@ TDEHTMLImage::TDEHTMLImage( TQWidget *parentWidget, const char *widgetName,
TQObject *parent, const char *name, TDEHTMLPart::GUIProfile prof ) TQObject *parent, const char *name, TDEHTMLPart::GUIProfile prof )
: KParts::ReadOnlyPart( parent, name ), m_image( 0 ) : KParts::ReadOnlyPart( parent, name ), m_image( 0 )
{ {
TDEHTMLPart* parentPart = ::tqqt_cast<TDEHTMLPart *>( parent ); TDEHTMLPart* parentPart = ::tqt_cast<TDEHTMLPart *>( parent );
setInstance( TDEHTMLImageFactory::instance(), prof == TDEHTMLPart::BrowserViewGUI && !parentPart ); setInstance( TDEHTMLImageFactory::instance(), prof == TDEHTMLPart::BrowserViewGUI && !parentPart );
TQVBox *box = new TQVBox( parentWidget, widgetName ); TQVBox *box = new TQVBox( parentWidget, widgetName );
@ -103,7 +103,7 @@ TDEHTMLImage::TDEHTMLImage( TQWidget *parentWidget, const char *widgetName,
// forward important signals from the tdehtml part // forward important signals from the tdehtml part
// forward opening requests to parent frame (if existing) // forward opening requests to parent frame (if existing)
TDEHTMLPart *p = ::tqqt_cast<TDEHTMLPart *>(parent); TDEHTMLPart *p = ::tqt_cast<TDEHTMLPart *>(parent);
KParts::BrowserExtension *be = p ? p->browserExtension() : m_ext; KParts::BrowserExtension *be = p ? p->browserExtension() : m_ext;
connect(m_tdehtml->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)), connect(m_tdehtml->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)),
be, TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &))); be, TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)));
@ -304,7 +304,7 @@ bool TDEHTMLImage::eventFilter(TQObject *, TQEvent *e) {
case TQEvent::Drop: { case TQEvent::Drop: {
// find out if this part is embedded in a frame, and send the // find out if this part is embedded in a frame, and send the
// event to its outside widget // event to its outside widget
TDEHTMLPart *p = ::tqqt_cast<TDEHTMLPart *>(parent()); TDEHTMLPart *p = ::tqt_cast<TDEHTMLPart *>(parent());
if (p) if (p)
return TQApplication::sendEvent(p->widget(), e); return TQApplication::sendEvent(p->widget(), e);
// otherwise simply forward all dnd events to the part widget, // otherwise simply forward all dnd events to the part widget,

@ -1112,8 +1112,8 @@ static inline void forwardPeripheralEvent(tdehtml::RenderWidget* r, TQMouseEvent
TQPoint p(x-absx, y-absy); TQPoint p(x-absx, y-absy);
TQMouseEvent fw(me->type(), p, me->button(), me->state()); TQMouseEvent fw(me->type(), p, me->button(), me->state());
TQWidget* w = r->widget(); TQWidget* w = r->widget();
TQScrollView* sc = ::tqqt_cast<TQScrollView*>(w); TQScrollView* sc = ::tqt_cast<TQScrollView*>(w);
if (sc && !::tqqt_cast<TQListBox*>(w)) if (sc && !::tqt_cast<TQListBox*>(w))
static_cast<tdehtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(TQT_TQEVENT(&fw)); static_cast<tdehtml::RenderWidget::ScrollViewEventPropagator*>(sc)->sendEvent(TQT_TQEVENT(&fw));
else if(w) else if(w)
static_cast<tdehtml::RenderWidget::EventPropagator*>(w)->sendEvent(TQT_TQEVENT(&fw)); static_cast<tdehtml::RenderWidget::EventPropagator*>(w)->sendEvent(TQT_TQEVENT(&fw));
@ -1907,15 +1907,15 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
if (!strcmp(w->name(), "__tdehtml")) { if (!strcmp(w->name(), "__tdehtml")) {
w->installEventFilter(this); w->installEventFilter(this);
w->unsetCursor(); w->unsetCursor();
if (!::tqqt_cast<TQFrame*>(w)) if (!::tqt_cast<TQFrame*>(w))
w->setBackgroundMode( TQWidget::NoBackground ); w->setBackgroundMode( TQWidget::NoBackground );
static_cast<HackWidget *>(w)->setNoErase(); static_cast<HackWidget *>(w)->setNoErase();
if (!w->childrenListObject().isEmpty()) { if (!w->childrenListObject().isEmpty()) {
TQObjectListIterator it(w->childrenListObject()); TQObjectListIterator it(w->childrenListObject());
for (; it.current(); ++it) { for (; it.current(); ++it) {
TQWidget *widget = ::tqqt_cast<TQWidget *>(it.current()); TQWidget *widget = ::tqt_cast<TQWidget *>(it.current());
if (widget && !widget->isTopLevel()) { if (widget && !widget->isTopLevel()) {
if (!::tqqt_cast<TQFrame*>(w)) if (!::tqt_cast<TQFrame*>(w))
widget->setBackgroundMode( TQWidget::NoBackground ); widget->setBackgroundMode( TQWidget::NoBackground );
static_cast<HackWidget *>(widget)->setNoErase(); static_cast<HackWidget *>(widget)->setNoErase();
widget->installEventFilter(this); widget->installEventFilter(this);
@ -1952,7 +1952,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
} }
viewportToContents( x, y, x, y ); viewportToContents( x, y, x, y );
TQPaintEvent *pe = TQT_TQPAINTEVENT(e); TQPaintEvent *pe = TQT_TQPAINTEVENT(e);
bool asap = !d->contentsMoving && ::tqqt_cast<TQScrollView *>(c); bool asap = !d->contentsMoving && ::tqt_cast<TQScrollView *>(c);
// TQScrollView needs fast repaints // TQScrollView needs fast repaints
if ( asap && !d->painting && m_part->xmlDocImpl() && m_part->xmlDocImpl()->renderer() && if ( asap && !d->painting && m_part->xmlDocImpl() && m_part->xmlDocImpl()->renderer() &&
@ -1969,7 +1969,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
case TQEvent::MouseButtonDblClick: { case TQEvent::MouseButtonDblClick: {
if ( (w->parentWidget() == view || ::tqqt_cast<TQScrollView*>(c)) && !::tqqt_cast<TQScrollBar *>(w)) { if ( (w->parentWidget() == view || ::tqt_cast<TQScrollView*>(c)) && !::tqt_cast<TQScrollBar *>(w)) {
TQMouseEvent *me = TQT_TQMOUSEEVENT(e); TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
TQPoint pt = w->mapTo( view, me->pos()); TQPoint pt = w->mapTo( view, me->pos());
TQMouseEvent me2(me->type(), pt, me->button(), me->state()); TQMouseEvent me2(me->type(), pt, me->button(), me->state());
@ -1988,7 +1988,7 @@ bool TDEHTMLView::eventFilter(TQObject *o, TQEvent *e)
} }
case TQEvent::KeyPress: case TQEvent::KeyPress:
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
if (w->parentWidget() == view && !::tqqt_cast<TQScrollBar *>(w)) { if (w->parentWidget() == view && !::tqt_cast<TQScrollBar *>(w)) {
TQKeyEvent *ke = TQT_TQKEYEVENT(e); TQKeyEvent *ke = TQT_TQKEYEVENT(e);
if (e->type() == TQEvent::KeyPress) if (e->type() == TQEvent::KeyPress)
keyPressEvent(ke); keyPressEvent(ke);

@ -1450,7 +1450,7 @@ void KFilePropsPlugin::slotCopyFinished( TDEIO::Job * job )
void KFilePropsPlugin::applyIconChanges() void KFilePropsPlugin::applyIconChanges()
{ {
TDEIconButton *iconButton = ::tqqt_cast<TDEIconButton *>( iconArea ); TDEIconButton *iconButton = ::tqt_cast<TDEIconButton *>( iconArea );
if ( !iconButton || !d->bIconChanged ) if ( !iconButton || !d->bIconChanged )
return; return;
// handle icon changes - only local files (or pseudo-local) for now // handle icon changes - only local files (or pseudo-local) for now

@ -3171,7 +3171,7 @@ void CopyJob::slotResultCopyingFiles( Job * job )
} }
else else
{ {
if ( m_bCurrentOperationIsLink && ::tqqt_cast<TDEIO::DeleteJob*>( job ) ) if ( m_bCurrentOperationIsLink && ::tqt_cast<TDEIO::DeleteJob*>( job ) )
{ {
// Very special case, see a few lines below // Very special case, see a few lines below
// We are deleting the source of a symlink we successfully moved... ignore error // We are deleting the source of a symlink we successfully moved... ignore error
@ -3188,7 +3188,7 @@ void CopyJob::slotResultCopyingFiles( Job * job )
{ {
// Special case for moving links. That operation needs two jobs, unlike others. // Special case for moving links. That operation needs two jobs, unlike others.
if ( m_bCurrentOperationIsLink && m_mode == Move if ( m_bCurrentOperationIsLink && m_mode == Move
&& !::tqqt_cast<TDEIO::DeleteJob *>( job ) // Deleting source not already done && !::tqt_cast<TDEIO::DeleteJob *>( job ) // Deleting source not already done
) )
{ {
subjobs.remove( job ); subjobs.remove( job );

@ -1348,7 +1348,7 @@ void KRun::foundMimeType( const TQString& type )
return; return;
} }
*/ */
TDEIO::TransferJob *job = ::tqqt_cast<TDEIO::TransferJob *>( m_job ); TDEIO::TransferJob *job = ::tqt_cast<TDEIO::TransferJob *>( m_job );
if ( job ) if ( job )
{ {
job->putOnHold(); job->putOnHold();

@ -119,7 +119,7 @@ DockContainer::~DockContainer()
it = m_map.begin(); it = m_map.begin();
KDockWidget *w=it.key(); KDockWidget *w=it.key();
if (m_overlapButtons.contains(w)) { if (m_overlapButtons.contains(w)) {
(::tqqt_cast<KDockWidgetHeader*>(w->getHeader()))->removeButton(m_overlapButtons[w]); (::tqt_cast<KDockWidgetHeader*>(w->getHeader()))->removeButton(m_overlapButtons[w]);
m_overlapButtons.remove(w); m_overlapButtons.remove(w);
} }
m_map.remove(w); m_map.remove(w);
@ -148,7 +148,7 @@ void DockContainer::init()
// try to restore splitter size // try to restore splitter size
if ( parentDockWidget() && parentDockWidget()->parent() ) if ( parentDockWidget() && parentDockWidget()->parent() )
{ {
KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqt_cast<KDockSplitter*>(parentDockWidget()->
parent()); parent());
if ( sp ) if ( sp )
sp->setSeparatorPosX( m_separatorPos ); sp->setSeparatorPosX( m_separatorPos );
@ -184,11 +184,11 @@ void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQSt
if (((KDockWidget*)parentWidget())->mayBeShow()) if (((KDockWidget*)parentWidget())->mayBeShow())
((KDockWidget*)parentWidget())->dockBack(); ((KDockWidget*)parentWidget())->dockBack();
if (::tqqt_cast<KDockWidgetHeader*>(w->getHeader())) if (::tqt_cast<KDockWidgetHeader*>(w->getHeader()))
{ {
kdDebug(760)<<"*** KDockWidgetHeader has been found"<<endl; kdDebug(760)<<"*** KDockWidgetHeader has been found"<<endl;
KDockWidgetHeader *hdr=::tqqt_cast<KDockWidgetHeader*>(w->getHeader()); KDockWidgetHeader *hdr=::tqt_cast<KDockWidgetHeader*>(w->getHeader());
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" ); KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
@ -255,7 +255,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
kdDebug()<<"NO HEADER"<<endl; kdDebug()<<"NO HEADER"<<endl;
break; break;
} }
KDockWidgetHeader *hdr=::tqqt_cast<KDockWidgetHeader*>(w->getHeader()); KDockWidgetHeader *hdr=::tqt_cast<KDockWidgetHeader*>(w->getHeader());
if (!hdr) { if (!hdr) {
kdDebug()<<"Wrong header type in DockContainer::eventFilter"<<endl; kdDebug()<<"Wrong header type in DockContainer::eventFilter"<<endl;
break; break;
@ -355,7 +355,7 @@ void DockContainer::removeWidget(KDockWidget* dwdg)
m_map.remove(w); m_map.remove(w);
m_revMap.remove(id); m_revMap.remove(id);
if (m_overlapButtons.contains(w)) { if (m_overlapButtons.contains(w)) {
(::tqqt_cast<KDockWidgetHeader*>(w->getHeader()))->removeButton(m_overlapButtons[w]); (::tqt_cast<KDockWidgetHeader*>(w->getHeader()))->removeButton(m_overlapButtons[w]);
m_overlapButtons.remove(w); m_overlapButtons.remove(w);
} }
KDockContainer::removeWidget(w); KDockContainer::removeWidget(w);
@ -403,7 +403,7 @@ void DockContainer::tabClicked(int t)
} }
m_ws->raiseWidget(t); m_ws->raiseWidget(t);
if (m_ws->widget(t)) { if (m_ws->widget(t)) {
KDockWidget *tmpDw=::tqqt_cast<KDockWidget*>(m_ws->widget(t)); KDockWidget *tmpDw=::tqt_cast<KDockWidget*>(m_ws->widget(t));
if (tmpDw) { if (tmpDw) {
if (tmpDw->getWidget()) tmpDw->getWidget()->setFocus(); if (tmpDw->getWidget()) tmpDw->getWidget()->setFocus();
} else kdDebug(760)<<"Something really weird is going on"<<endl; } else kdDebug(760)<<"Something really weird is going on"<<endl;
@ -420,7 +420,7 @@ void DockContainer::tabClicked(int t)
// try save splitter position // try save splitter position
if ( parentDockWidget() && parentDockWidget()->parent() ) if ( parentDockWidget() && parentDockWidget()->parent() )
{ {
KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqt_cast<KDockSplitter*>(parentDockWidget()->
parent()); parent());
if ( sp ) if ( sp )
m_separatorPos = sp->separatorPos(); m_separatorPos = sp->separatorPos();
@ -473,7 +473,7 @@ void DockContainer::save(TDEConfig* cfg,const TQString& group_or_prefix)
// try to save the splitter position // try to save the splitter position
if ( parentDockWidget() && parentDockWidget()->parent() ) if ( parentDockWidget() && parentDockWidget()->parent() )
{ {
KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqt_cast<KDockSplitter*>(parentDockWidget()->
parent()); parent());
if ( sp ) if ( sp )
cfg->writeEntry( "separatorPosition", m_separatorPos ); cfg->writeEntry( "separatorPosition", m_separatorPos );

@ -201,7 +201,7 @@ void ToggleToolViewAction::anDWChanged()
else if ((!isChecked()) && m_dw->mayBeHide()) else if ((!isChecked()) && m_dw->mayBeHide())
setChecked(true); setChecked(true);
else if (isChecked() && (m_dw->parentDockTabGroup() && else if (isChecked() && (m_dw->parentDockTabGroup() &&
((::tqqt_cast<KDockWidget*>(m_dw->parentDockTabGroup()-> ((::tqt_cast<KDockWidget*>(m_dw->parentDockTabGroup()->
parent()))->mayBeShow()))) parent()))->mayBeShow())))
setChecked(false); setChecked(false);
} }

@ -311,16 +311,16 @@ void MainWindow::setToolViewStyle(int flag)
{ {
d->m_styleIDEAlMode = flag; // see KMultiTabBar for the first 3 bits d->m_styleIDEAlMode = flag; // see KMultiTabBar for the first 3 bits
DockContainer *tmpL=::tqqt_cast<KMDI::DockContainer*>(m_leftContainer->getWidget()); DockContainer *tmpL=::tqt_cast<KMDI::DockContainer*>(m_leftContainer->getWidget());
if (tmpL) tmpL->setStyle(flag); if (tmpL) tmpL->setStyle(flag);
DockContainer *tmpR=::tqqt_cast<KMDI::DockContainer*>(m_rightContainer->getWidget()); DockContainer *tmpR=::tqt_cast<KMDI::DockContainer*>(m_rightContainer->getWidget());
if (tmpR) tmpR->setStyle(flag); if (tmpR) tmpR->setStyle(flag);
DockContainer *tmpT=::tqqt_cast<KMDI::DockContainer*>(m_topContainer->getWidget()); DockContainer *tmpT=::tqt_cast<KMDI::DockContainer*>(m_topContainer->getWidget());
if (tmpT) tmpT->setStyle(flag); if (tmpT) tmpT->setStyle(flag);
DockContainer *tmpB=::tqqt_cast<KMDI::DockContainer*>(m_bottomContainer->getWidget()); DockContainer *tmpB=::tqt_cast<KMDI::DockContainer*>(m_bottomContainer->getWidget());
if (tmpB) tmpB->setStyle(flag); if (tmpB) tmpB->setStyle(flag);
d->m_toolviewStyle = flag; d->m_toolviewStyle = flag;

@ -1177,7 +1177,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
// child and its children (as we did when we got our client). // child and its children (as we did when we got our client).
// XXX see linkChildren() and focus policy stuff // XXX see linkChildren() and focus policy stuff
TQObject* pNewChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child()); TQObject* pNewChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child());
if ( ( pNewChild != 0L ) && ::tqqt_cast<TQWidget*>( pNewChild ) ) if ( ( pNewChild != 0L ) && ::tqt_cast<TQWidget*>( pNewChild ) )
{ {
TQWidget * pNewWidget = TQT_TQWIDGET( pNewChild ); TQWidget * pNewWidget = TQT_TQWIDGET( pNewChild );
TQObjectList *list = pNewWidget->queryList( "TQWidget" ); TQObjectList *list = pNewWidget->queryList( "TQWidget" );
@ -1188,7 +1188,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
{ // for each found object... { // for each found object...
TQWidget * widg = ( TQWidget* ) obj; TQWidget * widg = ( TQWidget* ) obj;
++it; ++it;
if ( !::tqqt_cast<TQPopupMenu*>( widg ) ) if ( !::tqt_cast<TQPopupMenu*>( widg ) )
{ {
widg->installEventFilter( this ); widg->installEventFilter( this );
} }

@ -140,7 +140,7 @@ KMdiDockContainer::~KMdiDockContainer()
KDockWidget *w = it.key(); KDockWidget *w = it.key();
if ( m_overlapButtons.contains( w ) ) if ( m_overlapButtons.contains( w ) )
{ {
( ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() ) )->removeButton( m_overlapButtons[w] ); ( ::tqt_cast<KDockWidgetHeader*>( w->getHeader() ) )->removeButton( m_overlapButtons[w] );
m_overlapButtons.remove( w ); m_overlapButtons.remove( w );
} }
m_map.remove( w ); m_map.remove( w );
@ -172,7 +172,7 @@ void KMdiDockContainer::init()
// try to restore splitter size // try to restore splitter size
if ( parentDockWidget() && parentDockWidget()->parent() ) if ( parentDockWidget() && parentDockWidget()->parent() )
{ {
KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget()->parent() ); KDockSplitter * sp = ::tqt_cast<KDockSplitter*>( parentDockWidget()->parent() );
if ( sp ) if ( sp )
sp->setSeparatorPosX( m_separatorPos ); sp->setSeparatorPosX( m_separatorPos );
} }
@ -207,12 +207,12 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const
if ( ( ( KDockWidget* ) parentWidget() ) ->mayBeShow() ) if ( ( ( KDockWidget* ) parentWidget() ) ->mayBeShow() )
( ( KDockWidget* ) parentWidget() ) ->dockBack(); ( ( KDockWidget* ) parentWidget() ) ->dockBack();
if ( ::tqqt_cast<KDockWidgetHeader*>(w->getHeader()) ) if ( ::tqt_cast<KDockWidgetHeader*>(w->getHeader()) )
{ {
kdDebug( 760 ) << k_funcinfo << "The dockwidget we're adding has a header" << endl; kdDebug( 760 ) << k_funcinfo << "The dockwidget we're adding has a header" << endl;
kdDebug( 760 ) << k_funcinfo << "Adding our overlap mode button to it" << endl; kdDebug( 760 ) << k_funcinfo << "Adding our overlap mode button to it" << endl;
KDockWidgetHeader *hdr = ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() ); KDockWidgetHeader *hdr = ::tqt_cast<KDockWidgetHeader*>( w->getHeader() );
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" ); KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
TQToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) ); TQToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
@ -272,7 +272,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
break; break;
} }
KDockWidgetHeader *hdr = ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() ); KDockWidgetHeader *hdr = ::tqt_cast<KDockWidgetHeader*>( w->getHeader() );
if ( !hdr ) if ( !hdr )
{ {
kdDebug(760) << "Wrong header type in KMdiDockContainer::eventFilter" << endl; kdDebug(760) << "Wrong header type in KMdiDockContainer::eventFilter" << endl;
@ -387,7 +387,7 @@ void KMdiDockContainer::removeWidget( KDockWidget* dwdg )
m_revMap.remove( id ); m_revMap.remove( id );
if ( m_overlapButtons.contains( w ) ) if ( m_overlapButtons.contains( w ) )
{ {
( ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() ) )->removeButton( m_overlapButtons[ w ] ); ( ::tqt_cast<KDockWidgetHeader*>( w->getHeader() ) )->removeButton( m_overlapButtons[ w ] );
m_overlapButtons.remove( w ); m_overlapButtons.remove( w );
} }
KDockContainer::removeWidget( w ); KDockContainer::removeWidget( w );
@ -442,7 +442,7 @@ void KMdiDockContainer::tabClicked( int t )
if ( m_ws->widget( t ) ) if ( m_ws->widget( t ) )
{ {
m_ws->raiseWidget( t ); m_ws->raiseWidget( t );
KDockWidget * tmpDw = ::tqqt_cast<KDockWidget*>( m_ws->widget( t ) ); KDockWidget * tmpDw = ::tqt_cast<KDockWidget*>( m_ws->widget( t ) );
if ( tmpDw ) if ( tmpDw )
{ {
if ( tmpDw->getWidget() ) if ( tmpDw->getWidget() )
@ -467,7 +467,7 @@ void KMdiDockContainer::tabClicked( int t )
// try save splitter position // try save splitter position
if ( parentDockWidget() && parentDockWidget()->parent() ) if ( parentDockWidget() && parentDockWidget()->parent() )
{ {
KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget()->parent() ); KDockSplitter * sp = ::tqt_cast<KDockSplitter*>( parentDockWidget()->parent() );
if ( sp ) if ( sp )
m_separatorPos = sp->separatorPos(); m_separatorPos = sp->separatorPos();
} }
@ -638,7 +638,7 @@ void KMdiDockContainer::save( TDEConfig* cfg, const TQString& group_or_prefix )
// try to save the splitter position // try to save the splitter position
if ( parentDockWidget() && parentDockWidget() ->parent() ) if ( parentDockWidget() && parentDockWidget() ->parent() )
{ {
KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget() -> parent() ); KDockSplitter * sp = ::tqt_cast<KDockSplitter*>( parentDockWidget() -> parent() );
if ( sp ) if ( sp )
cfg->writeEntry( "separatorPosition", m_separatorPos ); cfg->writeEntry( "separatorPosition", m_separatorPos );
} }

@ -83,7 +83,7 @@ void ToggleToolViewAction::anDWChanged()
else if ( ( !isChecked() ) && m_dw->mayBeHide() ) else if ( ( !isChecked() ) && m_dw->mayBeHide() )
setChecked( true ); setChecked( true );
else if ( isChecked() && ( m_dw->parentDockTabGroup() && else if ( isChecked() && ( m_dw->parentDockTabGroup() &&
( ( ::tqqt_cast<KDockWidget*>( m_dw->parentDockTabGroup() -> ( ( ::tqt_cast<KDockWidget*>( m_dw->parentDockTabGroup() ->
parent() ) ) ->mayBeShow() ) ) ) parent() ) ) ->mayBeShow() ) ) )
setChecked( false ); setChecked( false );
} }

@ -1296,7 +1296,7 @@ void KMdiMainFrm::findRootDockWidgets( TQPtrList<KDockWidget>* rootDockWidgetLis
// find the oldest ancestor of the current dockwidget that can be undocked // find the oldest ancestor of the current dockwidget that can be undocked
while ( !pW->isTopLevel() ) while ( !pW->isTopLevel() )
{ {
if ( ::tqqt_cast<KDockWidget*>( pW ) || pW->inherits( "KDockWidget_Compat::KDockWidget" ) ) if ( ::tqt_cast<KDockWidget*>( pW ) || pW->inherits( "KDockWidget_Compat::KDockWidget" ) )
{ {
undockCandidate = static_cast<KDockWidget*>( pW ); undockCandidate = static_cast<KDockWidget*>( pW );
if ( undockCandidate->enableDocking() != KDockWidget::DockNone ) if ( undockCandidate->enableDocking() != KDockWidget::DockNone )
@ -1739,28 +1739,28 @@ void KMdiMainFrm::setIDEAlModeStyle( int flags )
d->m_styleIDEAlMode = flags; // see KMultiTabBar for the first 3 bits d->m_styleIDEAlMode = flags; // see KMultiTabBar for the first 3 bits
if ( m_leftContainer ) if ( m_leftContainer )
{ {
KMdiDockContainer * tmpL = ::tqqt_cast<KMdiDockContainer*>( m_leftContainer->getWidget() ); KMdiDockContainer * tmpL = ::tqt_cast<KMdiDockContainer*>( m_leftContainer->getWidget() );
if ( tmpL ) if ( tmpL )
tmpL->setStyle( flags ); tmpL->setStyle( flags );
} }
if ( m_rightContainer ) if ( m_rightContainer )
{ {
KMdiDockContainer * tmpR = ::tqqt_cast<KMdiDockContainer*>( m_rightContainer->getWidget() ); KMdiDockContainer * tmpR = ::tqt_cast<KMdiDockContainer*>( m_rightContainer->getWidget() );
if ( tmpR ) if ( tmpR )
tmpR->setStyle( flags ); tmpR->setStyle( flags );
} }
if ( m_topContainer ) if ( m_topContainer )
{ {
KMdiDockContainer * tmpT = ::tqqt_cast<KMdiDockContainer*>( m_topContainer->getWidget() ); KMdiDockContainer * tmpT = ::tqt_cast<KMdiDockContainer*>( m_topContainer->getWidget() );
if ( tmpT ) if ( tmpT )
tmpT->setStyle( flags ); tmpT->setStyle( flags );
} }
if ( m_bottomContainer ) if ( m_bottomContainer )
{ {
KMdiDockContainer * tmpB = ::tqqt_cast<KMdiDockContainer*>( m_bottomContainer->getWidget() ); KMdiDockContainer * tmpB = ::tqt_cast<KMdiDockContainer*>( m_bottomContainer->getWidget() );
if ( tmpB ) if ( tmpB )
tmpB->setStyle( flags ); tmpB->setStyle( flags );
} }

@ -713,7 +713,7 @@ void DownloadDialog::slotInstalled(TDEIO::Job *job)
bool ret = job && (job->error() == 0); bool ret = job && (job->error() == 0);
if(ret) if(ret)
{ {
TDEIO::FileCopyJob *cjob = ::tqqt_cast<TDEIO::FileCopyJob*>(job); TDEIO::FileCopyJob *cjob = ::tqt_cast<TDEIO::FileCopyJob*>(job);
if(cjob) if(cjob)
{ {
ret = m_s->install(cjob->destURL().path()); ret = m_s->install(cjob->destURL().path());

@ -369,7 +369,7 @@ void KeramikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
if (animateProgressBar && ::tqqt_cast<TQProgressBar*>(widget)) if (animateProgressBar && ::tqt_cast<TQProgressBar*>(widget))
{ {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
progAnimWidgets[static_cast<TQProgressBar*>(widget)] = 0; progAnimWidgets[static_cast<TQProgressBar*>(widget)] = 0;
@ -412,7 +412,7 @@ void KeramikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
widget->setBackgroundMode( PaletteBackground ); widget->setBackgroundMode( PaletteBackground );
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if ( ::tqqt_cast<TQProgressBar*>(widget) ) else if ( ::tqt_cast<TQProgressBar*>(widget) )
{ {
progAnimWidgets.remove(static_cast<TQProgressBar*>(widget)); progAnimWidgets.remove(static_cast<TQProgressBar*>(widget));
} }
@ -1107,7 +1107,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
TQWidget* paintWidget = dynamic_cast<TQWidget*>(p->device()); TQWidget* paintWidget = dynamic_cast<TQWidget*>(p->device());
TQToolBar* parent = 0; TQToolBar* parent = 0;
if (paintWidget) if (paintWidget)
parent = ::tqqt_cast<TQToolBar*>(paintWidget->parentWidget()); parent = ::tqt_cast<TQToolBar*>(paintWidget->parentWidget());
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal) ); renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal) );
if ( !(flags & Style_Horizontal) ) if ( !(flags & Style_Horizontal) )
@ -2801,7 +2801,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
if ( !object->isWidgetType() ) return false; if ( !object->isWidgetType() ) return false;
//Combo line edits get special frames //Combo line edits get special frames
if ( event->type() == TQEvent::Paint && ::tqqt_cast<TQLineEdit*>(object) ) if ( event->type() == TQEvent::Paint && ::tqt_cast<TQLineEdit*>(object) )
{ {
static bool recursion = false; static bool recursion = false;
if (recursion ) if (recursion )
@ -2817,7 +2817,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
recursion = false; recursion = false;
return true; return true;
} }
else if ( ::tqqt_cast<TQListBox*>(object) ) else if ( ::tqt_cast<TQListBox*>(object) )
{ {
//Handle combobox drop downs //Handle combobox drop downs
switch (event->type()) switch (event->type())
@ -2926,8 +2926,8 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
#if 0 // FIXME #if 0 // FIXME
// This does not work on modern systems // This does not work on modern systems
// Rather than resorting to hacks like this, which can stop working at any time, the required functionality should simply be added to TQt3! // Rather than resorting to hacks like this, which can stop working at any time, the required functionality should simply be added to TQt3!
else if (event->type() == TQEvent::Paint && object->parent() && ::tqqt_cast<TQToolBar*>(object->parent()) else if (event->type() == TQEvent::Paint && object->parent() && ::tqt_cast<TQToolBar*>(object->parent())
&& !::tqqt_cast<TQPopupMenu*>(object) ) && !::tqt_cast<TQPopupMenu*>(object) )
{ {
// We need to override the paint event to draw a // We need to override the paint event to draw a
// gradient on a QToolBarExtensionWidget. // gradient on a QToolBarExtensionWidget.
@ -2961,7 +2961,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
} }
#endif #endif
// Track show events for progress bars // Track show events for progress bars
if ( animateProgressBar && ::tqqt_cast<TQProgressBar*>(object) ) if ( animateProgressBar && ::tqt_cast<TQProgressBar*>(object) )
{ {
if ((event->type() == TQEvent::Show) && !animationTimer->isActive()) if ((event->type() == TQEvent::Show) && !animationTimer->isActive())
{ {

@ -523,10 +523,10 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
if (ceData.widgetObjectTypes.contains("TQWidget")) { if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget *w = reinterpret_cast<TQWidget*>(ptr); TQWidget *w = reinterpret_cast<TQWidget*>(ptr);
if (::tqqt_cast<TQStatusBar*>(w)) if (::tqt_cast<TQStatusBar*>(w))
w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Normal, TQColorGroup::Background)); w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Normal, TQColorGroup::Background));
if (::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget")) if (::tqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
if (w->backgroundPixmap() && !w->isTopLevel() && if (w->backgroundPixmap() && !w->isTopLevel() &&
@ -565,7 +565,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
return ; return ;
} }
if ( ::tqqt_cast<TQMenuBar*>(w) ) if ( ::tqt_cast<TQMenuBar*>(w) )
{ {
w->setBackgroundMode( TQWidget::NoBackground ); w->setBackgroundMode( TQWidget::NoBackground );
} }
@ -573,7 +573,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
{ {
w->setBackgroundMode( TQWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
} }
else if ( ::tqqt_cast<TQPopupMenu*>(w) ) else if ( ::tqt_cast<TQPopupMenu*>(w) )
{ {
popupPalette = w->palette(); popupPalette = w->palette();
if ( isColor( MenuItem ) || isColor( MenuItemDown ) ) if ( isColor( MenuItem ) || isColor( MenuItemDown ) )
@ -593,7 +593,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
w->setBackgroundMode( TQWidget::NoBackground ); w->setBackgroundMode( TQWidget::NoBackground );
} }
else if ( ::tqqt_cast<TQCheckBox*>(w) ) else if ( ::tqt_cast<TQCheckBox*>(w) )
{ {
if ( isColor( IndicatorOff ) || isColor( IndicatorOn ) ) if ( isColor( IndicatorOff ) || isColor( IndicatorOn ) )
{ {
@ -608,7 +608,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
w->setPalette( newPal ); w->setPalette( newPal );
} }
} }
else if ( ::tqqt_cast<TQRadioButton*>(w) ) else if ( ::tqt_cast<TQRadioButton*>(w) )
{ {
if ( isColor( ExIndicatorOff ) || isColor( ExIndicatorOn ) ) if ( isColor( ExIndicatorOff ) || isColor( ExIndicatorOn ) )
{ {
@ -644,21 +644,21 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem
} }
//Toolbar labels should nornally be PaletteButton //Toolbar labels should nornally be PaletteButton
if ( ::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget")) if ( ::tqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
w->setBackgroundMode( TQWidget::PaletteButton ); w->setBackgroundMode( TQWidget::PaletteButton );
//The same for menu bars, popup menus //The same for menu bars, popup menus
else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQPopupMenu*>(w) ) else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQPopupMenu*>(w) )
w->setBackgroundMode( TQWidget::PaletteButton ); w->setBackgroundMode( TQWidget::PaletteButton );
//For toolbar internal separators, return to button, too (can't use tqqt_cast here since don't have access to the class) //For toolbar internal separators, return to button, too (can't use tqt_cast here since don't have access to the class)
else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
w->setBackgroundMode( TQWidget::PaletteButton ); w->setBackgroundMode( TQWidget::PaletteButton );
//For scrollbars, we don't do much, since the widget queries the style on the switch //For scrollbars, we don't do much, since the widget queries the style on the switch
//Drop some custom palettes. ### this really should check the serial number to be 100% correct. //Drop some custom palettes. ### this really should check the serial number to be 100% correct.
if ( ::tqqt_cast<TQPopupMenu*>(w) || ::tqqt_cast<TQCheckBox*>(w) || ::tqqt_cast<TQRadioButton*>(w) || ::tqqt_cast<TQStatusBar*>(w) ) if ( ::tqt_cast<TQPopupMenu*>(w) || ::tqt_cast<TQCheckBox*>(w) || ::tqt_cast<TQRadioButton*>(w) || ::tqt_cast<TQStatusBar*>(w) )
w->unsetPalette(); w->unsetPalette();
} }

@ -197,7 +197,7 @@ void PlastikStyle::updateProgressPos()
bool visible = false; bool visible = false;
for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); ++iter) for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); ++iter)
{ {
if ( !::tqqt_cast<TQProgressBar*>(iter.key()) ) if ( !::tqt_cast<TQProgressBar*>(iter.key()) )
continue; continue;
pb = dynamic_cast<TQProgressBar*>(iter.key()); pb = dynamic_cast<TQProgressBar*>(iter.key());
@ -245,27 +245,27 @@ void PlastikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(tdehtmlWidgetDestroyed(TQObject*))); connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(tdehtmlWidgetDestroyed(TQObject*)));
} }
// use tqqt_cast where possible to check if the widget inheits one of the classes. might improve // use tqt_cast where possible to check if the widget inheits one of the classes. might improve
// performance compared to TQObject::inherits() // performance compared to TQObject::inherits()
if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) || if ( ::tqt_cast<TQPushButton*>(widget) || ::tqt_cast<TQComboBox*>(widget) ||
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) || ::tqt_cast<TQSpinWidget*>(widget) || ::tqt_cast<TQSlider*>(widget) ||
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) || ::tqt_cast<TQCheckBox*>(widget) || ::tqt_cast<TQRadioButton*>(widget) ||
::tqqt_cast<TQToolButton*>(widget) || widget->inherits("TQSplitterHandle") ) ::tqt_cast<TQToolButton*>(widget) || widget->inherits("TQSplitterHandle") )
{ {
// widget->setBackgroundMode(PaletteBackground); // widget->setBackgroundMode(PaletteBackground);
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQLineEdit*>(widget)) { } else if (::tqt_cast<TQLineEdit*>(widget)) {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQTabBar*>(widget)) { } else if (::tqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(true); widget->setMouseTracking(true);
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQPopupMenu*>(widget)) { } else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( NoBackground ); widget->setBackgroundMode( NoBackground );
} else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) { } else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
if( _animateProgressBar && ::tqqt_cast<TQProgressBar*>(widget) ) if( _animateProgressBar && ::tqt_cast<TQProgressBar*>(widget) )
{ {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
progAnimWidgets[widget] = 0; progAnimWidgets[widget] = 0;
@ -287,25 +287,25 @@ void PlastikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
tdehtmlWidgets.remove(widget); tdehtmlWidgets.remove(widget);
} }
// use tqqt_cast to check if the widget inheits one of the classes. // use tqt_cast to check if the widget inheits one of the classes.
if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) || if ( ::tqt_cast<TQPushButton*>(widget) || ::tqt_cast<TQComboBox*>(widget) ||
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) || ::tqt_cast<TQSpinWidget*>(widget) || ::tqt_cast<TQSlider*>(widget) ||
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) || ::tqt_cast<TQCheckBox*>(widget) || ::tqt_cast<TQRadioButton*>(widget) ||
::tqqt_cast<TQToolButton*>(widget) || ::tqqt_cast<TQLineEdit*>(widget) || ::tqt_cast<TQToolButton*>(widget) || ::tqt_cast<TQLineEdit*>(widget) ||
widget->inherits("TQSplitterHandle") ) widget->inherits("TQSplitterHandle") )
{ {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQTabBar*>(widget)) { else if (::tqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(false); widget->setMouseTracking(false);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQPopupMenu*>(widget)) { } else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( PaletteBackground ); widget->setBackgroundMode( PaletteBackground );
} else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) { } else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
if ( ::tqqt_cast<TQProgressBar*>(widget) ) if ( ::tqt_cast<TQProgressBar*>(widget) )
{ {
progAnimWidgets.remove(widget); progAnimWidgets.remove(widget);
} }
@ -3346,7 +3346,7 @@ int PlastikStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ce
return 1; return 1;
case PM_DefaultFrameWidth: { case PM_DefaultFrameWidth: {
if(widget && ::tqqt_cast<TQPopupMenu*>(widget)) if(widget && ::tqt_cast<TQPopupMenu*>(widget))
return 1; return 1;
else else
return 2; return 2;
@ -3452,7 +3452,7 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
case CT_ToolButton: case CT_ToolButton:
{ {
if(widget->parent() && ::tqqt_cast<TQToolBar*>(widget->parent()) ) if(widget->parent() && ::tqt_cast<TQToolBar*>(widget->parent()) )
return TQSize( s.width()+2*4, s.height()+2*4 ); return TQSize( s.width()+2*4, s.height()+2*4 );
else else
return TDEStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget); return TDEStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget);
@ -3503,7 +3503,7 @@ bool PlastikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
if (!obj->isWidgetType() ) return false; if (!obj->isWidgetType() ) return false;
// Track show events for progress bars // Track show events for progress bars
if ( _animateProgressBar && ::tqqt_cast<TQProgressBar*>(obj) ) if ( _animateProgressBar && ::tqt_cast<TQProgressBar*>(obj) )
{ {
if ((ev->type() == TQEvent::Show) && !animationTimer->isActive()) if ((ev->type() == TQEvent::Show) && !animationTimer->isActive())
{ {

@ -932,7 +932,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
if (neighbor==this) if (neighbor==this)
return (static_cast<KDockWidget*>(TQT_TQWIDGET(parent()->parent()))->findNearestDockWidget(pos)); return (static_cast<KDockWidget*>(TQT_TQWIDGET(parent()->parent()))->findNearestDockWidget(pos));
else else
if (neighbor->getWidget() && (::tqqt_cast<KDockTabGroup*>(neighbor->getWidget()))) if (neighbor->getWidget() && (::tqt_cast<KDockTabGroup*>(neighbor->getWidget())))
return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0)); return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0));
else else
return neighbor; return neighbor;
@ -1238,7 +1238,7 @@ void KDockWidget::setForcedFixedWidth(int w)
setFixedWidth(w); setFixedWidth(w);
if (!parent()) return; if (!parent()) return;
if (parent()->inherits("KDockSplitter")) if (parent()->inherits("KDockSplitter"))
::tqqt_cast<KDockSplitter*>(parent())->setForcedFixedWidth(this,w); ::tqt_cast<KDockSplitter*>(parent())->setForcedFixedWidth(this,w);
} }
void KDockWidget::setForcedFixedHeight(int h) void KDockWidget::setForcedFixedHeight(int h)
@ -1247,7 +1247,7 @@ void KDockWidget::setForcedFixedHeight(int h)
setFixedHeight(h); setFixedHeight(h);
if (!parent()) return; if (!parent()) return;
if (parent()->inherits("KDockSplitter")) if (parent()->inherits("KDockSplitter"))
::tqqt_cast<KDockSplitter*>(parent())->setForcedFixedHeight(this,h); ::tqt_cast<KDockSplitter*>(parent())->setForcedFixedHeight(this,h);
} }
int KDockWidget::forcedFixedWidth() int KDockWidget::forcedFixedWidth()
@ -1270,7 +1270,7 @@ void KDockWidget::restoreFromForcedFixedSize()
setMaximumHeight(32000); setMaximumHeight(32000);
if (!parent()) return; if (!parent()) return;
if (parent()->inherits("KDockSplitter")) if (parent()->inherits("KDockSplitter"))
::tqqt_cast<KDockSplitter*>(parent())->restoreFromForcedFixedSize(this); ::tqt_cast<KDockSplitter*>(parent())->restoreFromForcedFixedSize(this);
} }
void KDockWidget::toDesktop() void KDockWidget::toDesktop()
@ -3179,7 +3179,7 @@ void KDockContainer::activateOverlapMode(int nonOverlapSize) {
m_overlapMode=true; m_overlapMode=true;
if (parentDockWidget() && parentDockWidget()->parent()) { if (parentDockWidget() && parentDockWidget()->parent()) {
kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl; kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl;
KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqt_cast<KDockSplitter*>(parentDockWidget()->
parent()); parent());
if (sp) if (sp)
sp->resizeEvent(0); sp->resizeEvent(0);
@ -3191,7 +3191,7 @@ void KDockContainer::deactivateOverlapMode() {
m_overlapMode=false; m_overlapMode=false;
if (parentDockWidget() && parentDockWidget()->parent()) { if (parentDockWidget() && parentDockWidget()->parent()) {
kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl; kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl;
KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqt_cast<KDockSplitter*>(parentDockWidget()->
parent()); parent());
if (sp) if (sp)
sp->resizeEvent(0); sp->resizeEvent(0);
@ -3280,7 +3280,7 @@ void KDockContainer::prepareSave(TQStringList &names)
TQWidget *KDockTabGroup::transientTo() { TQWidget *KDockTabGroup::transientTo() {
TQWidget *tT=0; TQWidget *tT=0;
for (int i=0;i<count();i++) { for (int i=0;i<count();i++) {
KDockWidget *dw=::tqqt_cast<KDockWidget*>(page(i)); KDockWidget *dw=::tqt_cast<KDockWidget*>(page(i));
TQWidget *tmp; TQWidget *tmp;
if ((tmp=dw->transientTo())) { if ((tmp=dw->transientTo())) {
if (!tT) tT=tmp; if (!tT) tT=tmp;

@ -150,7 +150,7 @@ void KSwitchLanguageDialog::removeButtonClicked()
return; return;
} }
KPushButton *removeButton = const_cast<KPushButton*>(::tqqt_cast<const KPushButton*>(signalSender)); KPushButton *removeButton = const_cast<KPushButton*>(::tqt_cast<const KPushButton*>(signalSender));
if (removeButton == NULL) if (removeButton == NULL)
{ {

@ -117,7 +117,7 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
if ( element.tagName().lower() == d->tagMainWindow ) if ( element.tagName().lower() == d->tagMainWindow )
{ {
TDEMainWindow *mainwindow = 0; TDEMainWindow *mainwindow = 0;
if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) )
mainwindow = static_cast<TDEMainWindow *>(d->m_widget); mainwindow = static_cast<TDEMainWindow *>(d->m_widget);
return mainwindow; return mainwindow;
@ -127,7 +127,7 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
{ {
KMenuBar *bar; KMenuBar *bar;
if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) )
bar = static_cast<TDEMainWindow *>(d->m_widget)->menuBar(); bar = static_cast<TDEMainWindow *>(d->m_widget)->menuBar();
else else
bar = new KMenuBar( d->m_widget ); bar = new KMenuBar( d->m_widget );
@ -145,7 +145,7 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
// And we don't want to set the parent for a standalone popupmenu, // And we don't want to set the parent for a standalone popupmenu,
// otherwise its shortcuts appear. // otherwise its shortcuts appear.
TQWidget* p = parent; TQWidget* p = parent;
while ( p && !::tqqt_cast<TDEMainWindow *>( p ) ) while ( p && !::tqt_cast<TDEMainWindow *>( p ) )
p = p->parentWidget(); p = p->parentWidget();
TQCString name = element.attribute( d->attrName ).utf8(); TQCString name = element.attribute( d->attrName ).utf8();
@ -181,14 +181,14 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
pix = SmallIconSet( icon, 16, instance ); pix = SmallIconSet( icon, 16, instance );
} }
if ( parent && ::tqqt_cast<KMenuBar *>( parent ) ) if ( parent && ::tqt_cast<KMenuBar *>( parent ) )
{ {
if ( !icon.isEmpty() ) if ( !icon.isEmpty() )
id = static_cast<KMenuBar *>(parent)->insertItem( pix, i18nText, popup, -1, index ); id = static_cast<KMenuBar *>(parent)->insertItem( pix, i18nText, popup, -1, index );
else else
id = static_cast<KMenuBar *>(parent)->insertItem( i18nText, popup, -1, index ); id = static_cast<KMenuBar *>(parent)->insertItem( i18nText, popup, -1, index );
} }
else if ( parent && ::tqqt_cast<TQPopupMenu *>( parent ) ) else if ( parent && ::tqt_cast<TQPopupMenu *>( parent ) )
{ {
if ( !icon.isEmpty() ) if ( !icon.isEmpty() )
id = static_cast<TQPopupMenu *>(parent)->insertItem( pix, i18nText, popup, -1, index ); id = static_cast<TQPopupMenu *>(parent)->insertItem( pix, i18nText, popup, -1, index );
@ -211,7 +211,7 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
bar = new TDEToolBar( d->m_widget, name, honor, false ); bar = new TDEToolBar( d->m_widget, name, honor, false );
} }
if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) )
{ {
if ( d->m_client && !d->m_client->xmlFile().isEmpty() ) if ( d->m_client && !d->m_client->xmlFile().isEmpty() )
bar->setXMLGUIClient( d->m_client ); bar->setXMLGUIClient( d->m_client );
@ -224,7 +224,7 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ
if ( element.tagName().lower() == d->tagStatusBar ) if ( element.tagName().lower() == d->tagStatusBar )
{ {
if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) )
{ {
TDEMainWindow *mainWin = static_cast<TDEMainWindow *>(d->m_widget); TDEMainWindow *mainWin = static_cast<TDEMainWindow *>(d->m_widget);
mainWin->statusBar()->show(); mainWin->statusBar()->show();
@ -241,26 +241,26 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD
{ {
// Warning parent can be 0L // Warning parent can be 0L
if ( ::tqqt_cast<TQPopupMenu *>( container ) ) if ( ::tqt_cast<TQPopupMenu *>( container ) )
{ {
if ( parent ) if ( parent )
{ {
if ( ::tqqt_cast<KMenuBar *>( parent ) ) if ( ::tqt_cast<KMenuBar *>( parent ) )
static_cast<KMenuBar *>(parent)->removeItem( id ); static_cast<KMenuBar *>(parent)->removeItem( id );
else if ( ::tqqt_cast<TQPopupMenu *>( parent ) ) else if ( ::tqt_cast<TQPopupMenu *>( parent ) )
static_cast<TQPopupMenu *>(parent)->removeItem( id ); static_cast<TQPopupMenu *>(parent)->removeItem( id );
} }
delete container; delete container;
} }
else if ( ::tqqt_cast<TDEToolBar *>( container ) ) else if ( ::tqt_cast<TDEToolBar *>( container ) )
{ {
TDEToolBar *tb = static_cast<TDEToolBar *>( container ); TDEToolBar *tb = static_cast<TDEToolBar *>( container );
tb->saveState( element ); tb->saveState( element );
delete tb; delete tb;
} }
else if ( ::tqqt_cast<KMenuBar *>( container ) ) else if ( ::tqt_cast<KMenuBar *>( container ) )
{ {
KMenuBar *mb = static_cast<KMenuBar *>( container ); KMenuBar *mb = static_cast<KMenuBar *>( container );
mb->hide(); mb->hide();
@ -269,9 +269,9 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD
// sure that TQMainWindow::d->mb does not point to a deleted // sure that TQMainWindow::d->mb does not point to a deleted
// menubar object. // menubar object.
} }
else if ( ::tqqt_cast<KStatusBar *>( container ) ) else if ( ::tqt_cast<KStatusBar *>( container ) )
{ {
if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) )
container->hide(); container->hide();
else else
delete static_cast<KStatusBar *>(container); delete static_cast<KStatusBar *>(container);
@ -291,7 +291,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo
{ {
if ( element.tagName().lower() == d->tagSeparator ) if ( element.tagName().lower() == d->tagSeparator )
{ {
if ( ::tqqt_cast<TQPopupMenu *>( parent ) ) if ( ::tqt_cast<TQPopupMenu *>( parent ) )
{ {
// Don't insert multiple separators in a row // Don't insert multiple separators in a row
TQPopupMenu *menu = static_cast<TQPopupMenu *>(parent); TQPopupMenu *menu = static_cast<TQPopupMenu *>(parent);
@ -317,9 +317,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo
else else
return menu->insertSeparator( index ); return menu->insertSeparator( index );
} }
else if ( ::tqqt_cast<TQMenuBar *>( parent ) ) else if ( ::tqt_cast<TQMenuBar *>( parent ) )
return static_cast<TQMenuBar *>(parent)->insertSeparator( index ); return static_cast<TQMenuBar *>(parent)->insertSeparator( index );
else if ( ::tqqt_cast<TDEToolBar *>( parent ) ) else if ( ::tqt_cast<TDEToolBar *>( parent ) )
{ {
TDEToolBar *bar = static_cast<TDEToolBar *>( parent ); TDEToolBar *bar = static_cast<TDEToolBar *>( parent );
@ -351,12 +351,12 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo
} }
else if ( element.tagName().lower() == d->tagTearOffHandle ) else if ( element.tagName().lower() == d->tagTearOffHandle )
{ {
if ( ::tqqt_cast<TQPopupMenu *>( parent ) && TDEGlobalSettings::insertTearOffHandle()) if ( ::tqt_cast<TQPopupMenu *>( parent ) && TDEGlobalSettings::insertTearOffHandle())
return static_cast<TQPopupMenu *>(parent)->insertTearOffHandle( -1, index ); return static_cast<TQPopupMenu *>(parent)->insertTearOffHandle( -1, index );
} }
else if ( element.tagName().lower() == d->tagMenuTitle ) else if ( element.tagName().lower() == d->tagMenuTitle )
{ {
if ( ::tqqt_cast<TDEPopupMenu *>( parent ) ) if ( ::tqt_cast<TDEPopupMenu *>( parent ) )
{ {
TQString i18nText; TQString i18nText;
TQCString text = element.text().utf8(); TQCString text = element.text().utf8();
@ -389,11 +389,11 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo
void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id ) void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id )
{ {
if ( ::tqqt_cast<TQPopupMenu *>( parent ) ) if ( ::tqt_cast<TQPopupMenu *>( parent ) )
static_cast<TQPopupMenu *>(parent)->removeItem( id ); static_cast<TQPopupMenu *>(parent)->removeItem( id );
else if ( ::tqqt_cast<TQMenuBar *>( parent ) ) else if ( ::tqt_cast<TQMenuBar *>( parent ) )
static_cast<TQMenuBar *>(parent)->removeItem( id ); static_cast<TQMenuBar *>(parent)->removeItem( id );
else if ( ::tqqt_cast<TDEToolBar *>( parent ) ) else if ( ::tqt_cast<TDEToolBar *>( parent ) )
static_cast<TDEToolBar *>(parent)->removeItemDelayed( id ); static_cast<TDEToolBar *>(parent)->removeItemDelayed( id );
} }
@ -421,7 +421,7 @@ void KXMLGUIBuilder::setBuilderInstance( TDEInstance *instance )
void KXMLGUIBuilder::finalizeGUI( KXMLGUIClient * ) void KXMLGUIBuilder::finalizeGUI( KXMLGUIClient * )
{ {
if ( !d->m_widget || !::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) if ( !d->m_widget || !::tqt_cast<TDEMainWindow *>( d->m_widget ) )
return; return;
#if 0 #if 0
TDEToolBar *toolbar = 0; TDEToolBar *toolbar = 0;

@ -515,11 +515,11 @@ void TDEAction::updateShortcut( int i )
int id = itemId( i ); int id = itemId( i );
TQWidget* w = container( i ); TQWidget* w = container( i );
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { if ( ::tqt_cast<TQPopupMenu *>( w ) ) {
TQPopupMenu* menu = static_cast<TQPopupMenu*>(w); TQPopupMenu* menu = static_cast<TQPopupMenu*>(w);
updateShortcut( menu, id ); updateShortcut( menu, id );
} }
else if ( ::tqqt_cast<TQMenuBar *>( w ) ) else if ( ::tqt_cast<TQMenuBar *>( w ) )
static_cast<TQMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id ); static_cast<TQMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id );
} }
@ -616,7 +616,7 @@ void TDEAction::updateToolTip( int i )
{ {
TQWidget *w = container( i ); TQWidget *w = container( i );
if ( ::tqqt_cast<TDEToolBar *>( w ) ) if ( ::tqt_cast<TDEToolBar *>( w ) )
TQToolTip::add( static_cast<TDEToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); TQToolTip::add( static_cast<TDEToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
} }
@ -649,7 +649,7 @@ int TDEAction::plug( TQWidget *w, int index )
plugShortcut(); plugShortcut();
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) if ( ::tqt_cast<TQPopupMenu *>( w ) )
{ {
TQPopupMenu* menu = static_cast<TQPopupMenu*>( w ); TQPopupMenu* menu = static_cast<TQPopupMenu*>( w );
int id; int id;
@ -693,7 +693,7 @@ int TDEAction::plug( TQWidget *w, int index )
return d->m_containers.count() - 1; return d->m_containers.count() - 1;
} }
else if ( ::tqqt_cast<TDEToolBar *>( w ) ) else if ( ::tqt_cast<TDEToolBar *>( w ) )
{ {
TDEToolBar *bar = static_cast<TDEToolBar *>( w ); TDEToolBar *bar = static_cast<TDEToolBar *>( w );
@ -749,17 +749,17 @@ void TDEAction::unplug( TQWidget *w )
return; return;
int id = itemId( i ); int id = itemId( i );
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) if ( ::tqt_cast<TQPopupMenu *>( w ) )
{ {
TQPopupMenu *menu = static_cast<TQPopupMenu *>( w ); TQPopupMenu *menu = static_cast<TQPopupMenu *>( w );
menu->removeItem( id ); menu->removeItem( id );
} }
else if ( ::tqqt_cast<TDEToolBar *>( w ) ) else if ( ::tqt_cast<TDEToolBar *>( w ) )
{ {
TDEToolBar *bar = static_cast<TDEToolBar *>( w ); TDEToolBar *bar = static_cast<TDEToolBar *>( w );
bar->removeItemDelayed( id ); bar->removeItemDelayed( id );
} }
else if ( ::tqqt_cast<TQMenuBar *>( w ) ) else if ( ::tqt_cast<TQMenuBar *>( w ) )
{ {
TQMenuBar *bar = static_cast<TQMenuBar *>( w ); TQMenuBar *bar = static_cast<TQMenuBar *>( w );
bar->removeItem( id ); bar->removeItem( id );
@ -863,11 +863,11 @@ void TDEAction::updateEnabled( int i )
{ {
TQWidget *w = container( i ); TQWidget *w = container( i );
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) if ( ::tqt_cast<TQPopupMenu *>( w ) )
static_cast<TQPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); static_cast<TQPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
else if ( ::tqqt_cast<TQMenuBar *>( w ) ) else if ( ::tqt_cast<TQMenuBar *>( w ) )
static_cast<TQMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); static_cast<TQMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
else if ( ::tqqt_cast<TDEToolBar *>( w ) ) else if ( ::tqt_cast<TDEToolBar *>( w ) )
static_cast<TDEToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); static_cast<TDEToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
} }
@ -909,18 +909,18 @@ void TDEAction::updateText( int i )
{ {
TQWidget *w = container( i ); TQWidget *w = container( i );
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { if ( ::tqt_cast<TQPopupMenu *>( w ) ) {
int id = itemId( i ); int id = itemId( i );
static_cast<TQPopupMenu*>(w)->changeItem( id, d->text() ); static_cast<TQPopupMenu*>(w)->changeItem( id, d->text() );
if (!d->m_cut.isNull()) if (!d->m_cut.isNull())
updateShortcut( static_cast<TQPopupMenu*>(w), id ); updateShortcut( static_cast<TQPopupMenu*>(w), id );
} }
else if ( ::tqqt_cast<TQMenuBar *>( w ) ) else if ( ::tqt_cast<TQMenuBar *>( w ) )
static_cast<TQMenuBar*>(w)->changeItem( itemId( i ), d->text() ); static_cast<TQMenuBar*>(w)->changeItem( itemId( i ), d->text() );
else if ( ::tqqt_cast<TDEToolBar *>( w ) ) else if ( ::tqt_cast<TDEToolBar *>( w ) )
{ {
TQWidget *button = static_cast<TDEToolBar *>(w)->getWidget( itemId( i ) ); TQWidget *button = static_cast<TDEToolBar *>(w)->getWidget( itemId( i ) );
if ( ::tqqt_cast<TDEToolBarButton *>( button ) ) if ( ::tqt_cast<TDEToolBarButton *>( button ) )
static_cast<TDEToolBarButton *>(button)->setText( d->plainText() ); static_cast<TDEToolBarButton *>(button)->setText( d->plainText() );
} }
} }
@ -949,15 +949,15 @@ void TDEAction::updateIcon( int id )
{ {
TQWidget* w = container( id ); TQWidget* w = container( id );
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { if ( ::tqt_cast<TQPopupMenu *>( w ) ) {
int itemId_ = itemId( id ); int itemId_ = itemId( id );
static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( TDEIcon::Small ), d->text() ); static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( TDEIcon::Small ), d->text() );
if (!d->m_cut.isNull()) if (!d->m_cut.isNull())
updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ ); updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ );
} }
else if ( ::tqqt_cast<TQMenuBar *>( w ) ) else if ( ::tqt_cast<TQMenuBar *>( w ) )
static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( TDEIcon::Small ), d->text() ); static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( TDEIcon::Small ), d->text() );
else if ( ::tqqt_cast<TDEToolBar *>( w ) ) else if ( ::tqt_cast<TDEToolBar *>( w ) )
static_cast<TDEToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); static_cast<TDEToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
} }
@ -980,16 +980,16 @@ void TDEAction::updateIconSet( int id )
{ {
TQWidget *w = container( id ); TQWidget *w = container( id );
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) if ( ::tqt_cast<TQPopupMenu *>( w ) )
{ {
int itemId_ = itemId( id ); int itemId_ = itemId( id );
static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() ); static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
if (!d->m_cut.isNull()) if (!d->m_cut.isNull())
updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ ); updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ );
} }
else if ( ::tqqt_cast<TQMenuBar *>( w ) ) else if ( ::tqt_cast<TQMenuBar *>( w ) )
static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() ); static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() );
else if ( ::tqqt_cast<TDEToolBar *>( w ) ) else if ( ::tqt_cast<TDEToolBar *>( w ) )
{ {
if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better ) if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better )
static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() ); static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() );
@ -1112,7 +1112,7 @@ void TDEAction::slotActivated()
const TQObject *senderObj = sender(); const TQObject *senderObj = sender();
if ( senderObj ) if ( senderObj )
{ {
if ( ::tqqt_cast<TDEAccelPrivate *>( senderObj ) ) if ( ::tqt_cast<TDEAccelPrivate *>( senderObj ) )
emit activated( TDEAction::AccelActivation, TQt::NoButton ); emit activated( TDEAction::AccelActivation, TQt::NoButton );
} }
emit activated(); emit activated();
@ -1124,7 +1124,7 @@ void TDEAction::slotActivated()
// only called by QPopupMenus, we plugged us in. // only called by QPopupMenus, we plugged us in.
void TDEAction::slotPopupActivated() void TDEAction::slotPopupActivated()
{ {
if( ::tqqt_cast<TQSignal *>(sender())) if( ::tqt_cast<TQSignal *>(sender()))
{ {
int id = dynamic_cast<const TQSignal *>(sender())->value().toInt(); int id = dynamic_cast<const TQSignal *>(sender())->value().toInt();
int pos = findContainer(id); int pos = findContainer(id);

@ -137,7 +137,7 @@ TDEToggleAction::~TDEToggleAction()
int TDEToggleAction::plug( TQWidget* widget, int index ) int TDEToggleAction::plug( TQWidget* widget, int index )
{ {
if ( !::tqqt_cast<TQPopupMenu *>( widget ) && !::tqqt_cast<TDEToolBar *>( widget ) ) if ( !::tqt_cast<TQPopupMenu *>( widget ) && !::tqt_cast<TDEToolBar *>( widget ) )
{ {
kdWarning() << "Can not plug TDEToggleAction in " << widget->className() << endl; kdWarning() << "Can not plug TDEToggleAction in " << widget->className() << endl;
return -1; return -1;
@ -149,7 +149,7 @@ int TDEToggleAction::plug( TQWidget* widget, int index )
if ( _index == -1 ) if ( _index == -1 )
return _index; return _index;
if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { if ( ::tqt_cast<TDEToolBar *>( widget ) ) {
TDEToolBar *bar = static_cast<TDEToolBar *>( widget ); TDEToolBar *bar = static_cast<TDEToolBar *>( widget );
bar->setToggle( itemId( _index ), true ); bar->setToggle( itemId( _index ), true );
@ -180,7 +180,7 @@ void TDEToggleAction::setChecked( bool c )
if ( !list.isEmpty() ) { if ( !list.isEmpty() ) {
TQObjectListIt it( list ); TQObjectListIt it( list );
for( ; it.current(); ++it ) { for( ; it.current(); ++it ) {
if ( ::tqqt_cast<TDEToggleAction *>( it.current() ) && it.current() != this && if ( ::tqt_cast<TDEToggleAction *>( it.current() ) && it.current() != this &&
static_cast<TDEToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { static_cast<TDEToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) {
TDEToggleAction *a = static_cast<TDEToggleAction*>(it.current()); TDEToggleAction *a = static_cast<TDEToggleAction*>(it.current());
if( a->isChecked() ) { if( a->isChecked() ) {
@ -197,7 +197,7 @@ void TDEToggleAction::updateChecked( int id )
{ {
TQWidget *w = container( id ); TQWidget *w = container( id );
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { if ( ::tqt_cast<TQPopupMenu *>( w ) ) {
TQPopupMenu* pm = static_cast<TQPopupMenu*>(w); TQPopupMenu* pm = static_cast<TQPopupMenu*>(w);
int itemId_ = itemId( id ); int itemId_ = itemId( id );
if ( !d->m_checkedGuiItem ) if ( !d->m_checkedGuiItem )
@ -219,12 +219,12 @@ void TDEToggleAction::updateChecked( int id )
updateShortcut( pm, itemId_ ); updateShortcut( pm, itemId_ );
} }
} }
else if ( ::tqqt_cast<TQMenuBar *>( w ) ) // not handled in plug... else if ( ::tqt_cast<TQMenuBar *>( w ) ) // not handled in plug...
static_cast<TQMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked ); static_cast<TQMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked );
else if ( ::tqqt_cast<TDEToolBar *>( w ) ) else if ( ::tqt_cast<TDEToolBar *>( w ) )
{ {
TQWidget* r = static_cast<TDEToolBar*>( w )->getButton( itemId( id ) ); TQWidget* r = static_cast<TDEToolBar*>( w )->getButton( itemId( id ) );
if ( r && ::tqqt_cast<TDEToolBarButton *>( r ) ) { if ( r && ::tqt_cast<TDEToolBarButton *>( r ) ) {
static_cast<TDEToolBar*>( w )->setButton( itemId( id ), d->m_checked ); static_cast<TDEToolBar*>( w )->setButton( itemId( id ), d->m_checked );
if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) { if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) {
const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem(); const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem();
@ -324,7 +324,7 @@ void TDERadioAction::slotActivated()
{ {
const TQObject *senderObj = sender(); const TQObject *senderObj = sender();
if ( !senderObj || !::tqqt_cast<const TDEToolBarButton *>( senderObj ) ) if ( !senderObj || !::tqt_cast<const TDEToolBarButton *>( senderObj ) )
return; return;
const_cast<TDEToolBarButton *>( static_cast<const TDEToolBarButton *>( senderObj ) )->on( true ); const_cast<TDEToolBarButton *>( static_cast<const TDEToolBarButton *>( senderObj ) )->on( true );
@ -537,10 +537,10 @@ void TDESelectAction::changeItem( int id, int index, const TQString& text)
return; return;
TQWidget* w = container( id ); TQWidget* w = container( id );
if ( ::tqqt_cast<TDEToolBar *>( w ) ) if ( ::tqt_cast<TDEToolBar *>( w ) )
{ {
TQWidget* r = (static_cast<TDEToolBar*>( w ))->getWidget( itemId( id ) ); TQWidget* r = (static_cast<TDEToolBar*>( w ))->getWidget( itemId( id ) );
if ( ::tqqt_cast<TQComboBox *>( r ) ) if ( ::tqt_cast<TQComboBox *>( r ) )
{ {
TQComboBox *b = static_cast<TQComboBox*>( r ); TQComboBox *b = static_cast<TQComboBox*>( r );
b->changeItem(text, index ); b->changeItem(text, index );
@ -587,9 +587,9 @@ void TDESelectAction::updateCurrentItem( int id )
return; return;
TQWidget* w = container( id ); TQWidget* w = container( id );
if ( ::tqqt_cast<TDEToolBar *>( w ) ) { if ( ::tqt_cast<TDEToolBar *>( w ) ) {
TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) );
if ( ::tqqt_cast<TQComboBox *>( r ) ) { if ( ::tqt_cast<TQComboBox *>( r ) ) {
TQComboBox *b = static_cast<TQComboBox*>( r ); TQComboBox *b = static_cast<TQComboBox*>( r );
b->setCurrentItem( d->m_current ); b->setCurrentItem( d->m_current );
} }
@ -604,9 +604,9 @@ int TDESelectAction::comboWidth() const
void TDESelectAction::updateComboWidth( int id ) void TDESelectAction::updateComboWidth( int id )
{ {
TQWidget* w = container( id ); TQWidget* w = container( id );
if ( ::tqqt_cast<TDEToolBar *>( w ) ) { if ( ::tqt_cast<TDEToolBar *>( w ) ) {
TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) );
if ( ::tqqt_cast<TQComboBox *>( r ) ) { if ( ::tqt_cast<TQComboBox *>( r ) ) {
TQComboBox *cb = static_cast<TQComboBox*>( r ); TQComboBox *cb = static_cast<TQComboBox*>( r );
cb->setMinimumWidth( d->m_comboWidth ); cb->setMinimumWidth( d->m_comboWidth );
cb->setMaximumWidth( d->m_comboWidth ); cb->setMaximumWidth( d->m_comboWidth );
@ -618,9 +618,9 @@ void TDESelectAction::updateItems( int id )
{ {
kdDebug(129) << "TDEAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis kdDebug(129) << "TDEAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis
TQWidget* w = container( id ); TQWidget* w = container( id );
if ( ::tqqt_cast<TDEToolBar *>( w ) ) { if ( ::tqt_cast<TDEToolBar *>( w ) ) {
TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) );
if ( ::tqqt_cast<TQComboBox *>( r ) ) { if ( ::tqt_cast<TQComboBox *>( r ) ) {
TQComboBox *cb = static_cast<TQComboBox*>( r ); TQComboBox *cb = static_cast<TQComboBox*>( r );
cb->clear(); cb->clear();
TQStringList lst = comboItems(); TQStringList lst = comboItems();
@ -641,7 +641,7 @@ int TDESelectAction::plug( TQWidget *widget, int index )
if (kapp && !kapp->authorizeTDEAction(name())) if (kapp && !kapp->authorizeTDEAction(name()))
return -1; return -1;
kdDebug(129) << "TDESelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis kdDebug(129) << "TDESelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
if ( ::tqqt_cast<TQPopupMenu *>( widget) ) if ( ::tqt_cast<TQPopupMenu *>( widget) )
{ {
// Create the PopupMenu and store it in m_menu // Create the PopupMenu and store it in m_menu
(void)popupMenu(); (void)popupMenu();
@ -665,7 +665,7 @@ int TDESelectAction::plug( TQWidget *widget, int index )
return containerCount() - 1; return containerCount() - 1;
} }
else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) else if ( ::tqt_cast<TDEToolBar *>( widget ) )
{ {
TDEToolBar* bar = static_cast<TDEToolBar*>( widget ); TDEToolBar* bar = static_cast<TDEToolBar*>( widget );
int id_ = TDEAction::getToolButtonID(); int id_ = TDEAction::getToolButtonID();
@ -697,7 +697,7 @@ int TDESelectAction::plug( TQWidget *widget, int index )
return containerCount() - 1; return containerCount() - 1;
} }
else if ( ::tqqt_cast<TQMenuBar *>( widget ) ) else if ( ::tqt_cast<TQMenuBar *>( widget ) )
{ {
// Create the PopupMenu and store it in m_menu // Create the PopupMenu and store it in m_menu
(void)popupMenu(); (void)popupMenu();
@ -754,9 +754,9 @@ void TDESelectAction::clear()
void TDESelectAction::updateClear( int id ) void TDESelectAction::updateClear( int id )
{ {
TQWidget* w = container( id ); TQWidget* w = container( id );
if ( ::tqqt_cast<TDEToolBar *>( w ) ) { if ( ::tqt_cast<TDEToolBar *>( w ) ) {
TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) );
if ( ::tqqt_cast<TQComboBox *>( r ) ) { if ( ::tqt_cast<TQComboBox *>( r ) ) {
TQComboBox *b = static_cast<TQComboBox*>( r ); TQComboBox *b = static_cast<TQComboBox*>( r );
b->clear(); b->clear();
} }
@ -1272,7 +1272,7 @@ int TDERecentFilesAction::plug( TQWidget *widget, int index )
return -1; return -1;
// This is very related to TDEActionMenu::plug. // This is very related to TDEActionMenu::plug.
// In fact this class could be an interesting base class for TDEActionMenu // In fact this class could be an interesting base class for TDEActionMenu
if ( ::tqqt_cast<TDEToolBar *>( widget ) ) if ( ::tqt_cast<TDEToolBar *>( widget ) )
{ {
TDEToolBar *bar = (TDEToolBar *)widget; TDEToolBar *bar = (TDEToolBar *)widget;
@ -1526,7 +1526,7 @@ int TDEFontAction::plug( TQWidget *w, int index )
{ {
if (kapp && !kapp->authorizeTDEAction(name())) if (kapp && !kapp->authorizeTDEAction(name()))
return -1; return -1;
if ( ::tqqt_cast<TDEToolBar *>( w ) ) if ( ::tqt_cast<TDEToolBar *>( w ) )
{ {
TDEToolBar* bar = static_cast<TDEToolBar*>( w ); TDEToolBar* bar = static_cast<TDEToolBar*>( w );
int id_ = TDEAction::getToolButtonID(); int id_ = TDEAction::getToolButtonID();
@ -1796,7 +1796,7 @@ int TDEActionMenu::plug( TQWidget* widget, int index )
if (kapp && !kapp->authorizeTDEAction(name())) if (kapp && !kapp->authorizeTDEAction(name()))
return -1; return -1;
kdDebug(129) << "TDEActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis kdDebug(129) << "TDEActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
if ( ::tqqt_cast<TQPopupMenu *>( widget ) ) if ( ::tqt_cast<TQPopupMenu *>( widget ) )
{ {
TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget ); TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id; int id;
@ -1816,7 +1816,7 @@ int TDEActionMenu::plug( TQWidget* widget, int index )
return containerCount() - 1; return containerCount() - 1;
} }
else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) else if ( ::tqt_cast<TDEToolBar *>( widget ) )
{ {
TDEToolBar *bar = static_cast<TDEToolBar *>( widget ); TDEToolBar *bar = static_cast<TDEToolBar *>( widget );
@ -1858,7 +1858,7 @@ int TDEActionMenu::plug( TQWidget* widget, int index )
return containerCount() - 1; return containerCount() - 1;
} }
else if ( ::tqqt_cast<TQMenuBar *>( widget ) ) else if ( ::tqt_cast<TQMenuBar *>( widget ) )
{ {
TQMenuBar *bar = static_cast<TQMenuBar *>( widget ); TQMenuBar *bar = static_cast<TQMenuBar *>( widget );
@ -1943,7 +1943,7 @@ int TDEToolBarPopupAction::plug( TQWidget *widget, int index )
return -1; return -1;
// This is very related to TDEActionMenu::plug. // This is very related to TDEActionMenu::plug.
// In fact this class could be an interesting base class for TDEActionMenu // In fact this class could be an interesting base class for TDEActionMenu
if ( ::tqqt_cast<TDEToolBar *>( widget ) ) if ( ::tqt_cast<TDEToolBar *>( widget ) )
{ {
TDEToolBar *bar = (TDEToolBar *)widget; TDEToolBar *bar = (TDEToolBar *)widget;
@ -2055,7 +2055,7 @@ void TDEToggleToolBarAction::setChecked( bool c )
m_toolBar->hide(); m_toolBar->hide();
} }
TQMainWindow* mw = m_toolBar->mainWindow(); TQMainWindow* mw = m_toolBar->mainWindow();
if ( mw && ::tqqt_cast<TDEMainWindow *>( mw ) ) if ( mw && ::tqt_cast<TDEMainWindow *>( mw ) )
static_cast<TDEMainWindow *>( mw )->setSettingsDirty(); static_cast<TDEMainWindow *>( mw )->setSettingsDirty();
} }
TDEToggleAction::setChecked( c ); TDEToggleAction::setChecked( c );
@ -2153,7 +2153,7 @@ int KWidgetAction::plug( TQWidget* w, int index )
if (kapp && !kapp->authorizeTDEAction(name())) if (kapp && !kapp->authorizeTDEAction(name()))
return -1; return -1;
if ( !::tqqt_cast<TDEToolBar *>( w ) ) { if ( !::tqt_cast<TDEToolBar *>( w ) ) {
kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into TDEToolBar." << endl; kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into TDEToolBar." << endl;
return -1; return -1;
} }
@ -2217,7 +2217,7 @@ TDEActionSeparator::~TDEActionSeparator()
int TDEActionSeparator::plug( TQWidget *widget, int index ) int TDEActionSeparator::plug( TQWidget *widget, int index )
{ {
if ( ::tqqt_cast<TQPopupMenu *>( widget) ) if ( ::tqt_cast<TQPopupMenu *>( widget) )
{ {
TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget ); TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
@ -2228,7 +2228,7 @@ int TDEActionSeparator::plug( TQWidget *widget, int index )
return containerCount() - 1; return containerCount() - 1;
} }
else if ( ::tqqt_cast<TQMenuBar *>( widget ) ) else if ( ::tqt_cast<TQMenuBar *>( widget ) )
{ {
TQMenuBar *menuBar = static_cast<TQMenuBar *>( widget ); TQMenuBar *menuBar = static_cast<TQMenuBar *>( widget );
@ -2240,7 +2240,7 @@ int TDEActionSeparator::plug( TQWidget *widget, int index )
return containerCount() - 1; return containerCount() - 1;
} }
else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) else if ( ::tqt_cast<TDEToolBar *>( widget ) )
{ {
TDEToolBar *toolBar = static_cast<TDEToolBar *>( widget ); TDEToolBar *toolBar = static_cast<TDEToolBar *>( widget );
@ -2285,7 +2285,7 @@ int TDEPasteTextAction::plug( TQWidget *widget, int index )
{ {
if (kapp && !kapp->authorizeTDEAction(name())) if (kapp && !kapp->authorizeTDEAction(name()))
return -1; return -1;
if ( ::tqqt_cast<TDEToolBar *>( widget ) ) if ( ::tqt_cast<TDEToolBar *>( widget ) )
{ {
TDEToolBar *bar = (TDEToolBar *)widget; TDEToolBar *bar = (TDEToolBar *)widget;

@ -501,14 +501,14 @@ void TDEActionCollection::connectHighlight( TQWidget *container, TDEAction *acti
{ {
actionList = new TQPtrList<TDEAction>; actionList = new TQPtrList<TDEAction>;
if ( ::tqqt_cast<TQPopupMenu *>( container ) ) if ( ::tqt_cast<TQPopupMenu *>( container ) )
{ {
connect( container, TQT_SIGNAL( highlighted( int ) ), connect( container, TQT_SIGNAL( highlighted( int ) ),
this, TQT_SLOT( slotMenuItemHighlighted( int ) ) ); this, TQT_SLOT( slotMenuItemHighlighted( int ) ) );
connect( container, TQT_SIGNAL( aboutToHide() ), connect( container, TQT_SIGNAL( aboutToHide() ),
this, TQT_SLOT( slotMenuAboutToHide() ) ); this, TQT_SLOT( slotMenuAboutToHide() ) );
} }
else if ( ::tqqt_cast<TDEToolBar *>( container ) ) else if ( ::tqt_cast<TDEToolBar *>( container ) )
{ {
connect( container, TQT_SIGNAL( highlighted( int, bool ) ), connect( container, TQT_SIGNAL( highlighted( int, bool ) ),
this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) ); this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) );

@ -234,7 +234,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e )
if ( !rect().contains( ev->pos() )) // this widget if ( !rect().contains( ev->pos() )) // this widget
hide(); hide();
if ( !d->emitSelected && currentItem() && !::tqqt_cast<TQScrollBar*>(o) ) if ( !d->emitSelected && currentItem() && !::tqt_cast<TQScrollBar*>(o) )
{ {
emit highlighted( currentText() ); emit highlighted( currentText() );
hide(); hide();

@ -101,7 +101,7 @@ DockApplication::DockApplication( const char* name )
l->setBackgroundColor(white); l->setBackgroundColor(white);
l->setMinimumSize(100,100); l->setMinimumSize(100,100);
dock5->setWidget(l); dock5->setWidget(l);
if (::tqqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 5"); if (::tqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 5");
/*****************************************************/ /*****************************************************/
/*****************************************************/ /*****************************************************/
@ -112,7 +112,7 @@ DockApplication::DockApplication( const char* name )
l->setBackgroundColor(white); l->setBackgroundColor(white);
l->setMinimumSize(100,100); l->setMinimumSize(100,100);
dock6->setWidget(l); dock6->setWidget(l);
if (::tqqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 6"); if (::tqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 6");
/*****************************************************/ /*****************************************************/

@ -368,7 +368,7 @@ void KCMultiDialog::slotAboutToShow(TQWidget *page)
if( ! obj ) if( ! obj )
return; return;
TDECModuleProxy * module = ::tqqt_cast<TDECModuleProxy*>(obj); TDECModuleProxy * module = ::tqt_cast<TDECModuleProxy*>(obj);
if( ! module ) if( ! module )
return; return;
d->currentModule = module; d->currentModule = module;

@ -696,7 +696,7 @@ void KPluginSelector::defaults()
// tabwidget - defaults() will be called for all of them) // tabwidget - defaults() will be called for all of them)
TQWidget * pluginconfig = d->widgetstack->visibleWidget(); TQWidget * pluginconfig = d->widgetstack->visibleWidget();
TDECModuleProxy * kcm = ::tqqt_cast<TDECModuleProxy*>(pluginconfig); TDECModuleProxy * kcm = ::tqt_cast<TDECModuleProxy*>(pluginconfig);
if( kcm ) if( kcm )
{ {
kdDebug( 702 ) << "call TDECModule::defaults() for the plugins KCM" kdDebug( 702 ) << "call TDECModule::defaults() for the plugins KCM"

Loading…
Cancel
Save