Fix a number of runtime object identification problems which led to an even larger array of minor glitches

NOTE: kdevelop and kdewebdev still need to be fully repaired


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1222475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 9c496cd991
commit aca844682f

@ -109,7 +109,7 @@ void EmoticonSelector::emoticonClicked(const TQString &str)
// KDE4/Qt TODO: use qobject_cast instead. // KDE4/Qt TODO: use qobject_cast instead.
emit ItemSelected ( str ); emit ItemSelected ( str );
if ( isVisible() && parentWidget() && if ( isVisible() && parentWidget() &&
parentWidget()->inherits("TQPopupMenu") ) parentWidget()->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) )
{ {
parentWidget()->close(); parentWidget()->close();
} }

@ -136,7 +136,7 @@ int KopeteEmoticonAction::plug( TQWidget* widget, int index )
// kdDebug(14010) << "KopeteEmoticonAction::plug( " << widget << ", " << index << " )" << endl; // kdDebug(14010) << "KopeteEmoticonAction::plug( " << widget << ", " << index << " )" << endl;
// KDE4/Qt TODO: Use qobject_cast instead. // KDE4/Qt TODO: Use qobject_cast instead.
if ( widget->inherits("TQPopupMenu") ) if ( widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) )
{ {
TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget ); TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id; int id;
@ -202,7 +202,7 @@ int KopeteEmoticonAction::plug( TQWidget* widget, int index )
return containerCount() - 1; return containerCount() - 1;
} }
// KDE4/Qt TODO: Use qobject_cast instead. // KDE4/Qt TODO: Use qobject_cast instead.
else if ( widget->inherits( "TQMenuBar" ) ) else if ( widget->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
{ {
TQMenuBar *bar = static_cast<TQMenuBar *>( widget ); TQMenuBar *bar = static_cast<TQMenuBar *>( widget );

@ -84,7 +84,7 @@ void PButton::messageHandler(int fd, PukeMessage *pm)
void PButton::setWidget(TQObject *_qb) void PButton::setWidget(TQObject *_qb)
{ {
if(_qb != 0 && _qb->inherits("TQButton") == FALSE) if(_qb != 0 && _qb->inherits(TQBUTTON_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_qb); errorInvalidSet(_qb);
return; return;

@ -63,7 +63,7 @@ void PFrame::messageHandler(int fd, PukeMessage *pm)
void PFrame::setWidget(TQObject *w) void PFrame::setWidget(TQObject *w)
{ {
if(w != 0 && w->inherits("TQFrame") == FALSE) if(w != 0 && w->inherits(TQFRAME_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(w); errorInvalidSet(w);
return; return;

@ -10,7 +10,7 @@ PLabel::createWidget(CreateArgs &ca)
{ {
PLabel *pw = new PLabel(ca.parent); PLabel *pw = new PLabel(ca.parent);
TQLabel *le; TQLabel *le;
if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQLabel") == TRUE){ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits(TQLABEL_OBJECT_NAME_STRING) == TRUE){
le = (TQLabel *) ca.fetchedObj; le = (TQLabel *) ca.fetchedObj;
pw->setDeleteAble(FALSE); pw->setDeleteAble(FALSE);
} }
@ -97,7 +97,7 @@ void PLabel::messageHandler(int fd, PukeMessage *pm)
void PLabel::setWidget(TQObject *_l) void PLabel::setWidget(TQObject *_l)
{ {
if(_l != 0 && _l->inherits("TQLabel") == FALSE) if(_l != 0 && _l->inherits(TQLABEL_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_l); errorInvalidSet(_l);
return; return;

@ -88,7 +88,7 @@ void PLayout::messageHandler(int fd, PukeMessage *pm)
} }
PObject *pld = controller()->id2pobject(fd, pm->iWinId); PObject *pld = controller()->id2pobject(fd, pm->iWinId);
PObject *pls = controller()->id2pobject(fd, pm->iArg); PObject *pls = controller()->id2pobject(fd, pm->iArg);
if( (pld->widget()->inherits("TQBoxLayout") == FALSE) || (pls->widget()->inherits("TQBoxLayout") == FALSE)) if( (pld->widget()->inherits(TQBOXLAYOUT_OBJECT_NAME_STRING) == FALSE) || (pls->widget()->inherits(TQBOXLAYOUT_OBJECT_NAME_STRING) == FALSE))
throw(errorCommandFailed(PUKE_LAYOUT_ADDLAYOUT_ACK, 1)); throw(errorCommandFailed(PUKE_LAYOUT_ADDLAYOUT_ACK, 1));
PLayout *plbd = (PLayout *) pld; PLayout *plbd = (PLayout *) pld;
PLayout *plbs = (PLayout *) pls; PLayout *plbs = (PLayout *) pls;
@ -136,7 +136,7 @@ void PLayout::messageHandler(int fd, PukeMessage *pm)
void PLayout::setWidget(TQObject *_layout) void PLayout::setWidget(TQObject *_layout)
{ {
// kdDebug(5008) << "PObject setwidget called" << endl; // kdDebug(5008) << "PObject setwidget called" << endl;
if(_layout != 0 && _layout->inherits("TQBoxLayout") == FALSE) if(_layout != 0 && _layout->inherits(TQBOXLAYOUT_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_layout); errorInvalidSet(_layout);
return; return;

@ -103,7 +103,7 @@ void PLineEdit::messageHandler(int fd, PukeMessage *pm)
void PLineEdit::setWidget(TQObject *_le) void PLineEdit::setWidget(TQObject *_le)
{ {
if(_le != 0 && _le->inherits("TQLineEdit") == FALSE) if(_le != 0 && _le->inherits(TQLINEEDIT_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_le); errorInvalidSet(_le);
return; return;

@ -8,7 +8,7 @@ PListBox::createWidget(CreateArgs &ca)
{ {
PListBox *plb = new PListBox(ca.parent); PListBox *plb = new PListBox(ca.parent);
TQListBox *lb; TQListBox *lb;
if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQListBox") == TRUE){ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits(TQLISTBOX_OBJECT_NAME_STRING) == TRUE){
lb = (TQListBox *) ca.fetchedObj; lb = (TQListBox *) ca.fetchedObj;
plb->setDeleteAble(FALSE); plb->setDeleteAble(FALSE);
} }
@ -152,7 +152,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm)
void PListBox::setWidget(TQObject *_lb) void PListBox::setWidget(TQObject *_lb)
{ {
if(_lb != 0 && _lb->inherits("TQListBox") == FALSE) if(_lb != 0 && _lb->inherits(TQLISTBOX_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_lb); errorInvalidSet(_lb);
return; return;

@ -8,7 +8,7 @@ PPopupMenu::createWidget(CreateArgs &ca)
{ {
PPopupMenu *pm = new PPopupMenu(ca.parent); PPopupMenu *pm = new PPopupMenu(ca.parent);
TQPopupMenu *qpm; TQPopupMenu *qpm;
if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQPopupMenu") == TRUE){ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) == TRUE){
qpm= (TQPopupMenu *) ca.fetchedObj; qpm= (TQPopupMenu *) ca.fetchedObj;
pm->setDeleteAble(FALSE); pm->setDeleteAble(FALSE);
} }
@ -81,7 +81,7 @@ void PPopupMenu::messageHandler(int fd, PukeMessage *pm)
void PPopupMenu::setWidget(TQObject *_menu) void PPopupMenu::setWidget(TQObject *_menu)
{ {
if(_menu != 0 && _menu->inherits("TQPopupMenu") == FALSE) if(_menu != 0 && _menu->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_menu); errorInvalidSet(_menu);
return; return;

@ -45,7 +45,7 @@ void PPushButton::messageHandler(int fd, PukeMessage *pm)
void PPushButton::setWidget(TQObject *_qb) void PPushButton::setWidget(TQObject *_qb)
{ {
if(_qb != 0 && _qb->inherits("TQPushButton") == FALSE) if(_qb != 0 && _qb->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_qb); errorInvalidSet(_qb);
return; return;

@ -12,7 +12,7 @@ PTabDialog::createWidget(CreateArgs &ca)
TQTabDialog *qtd; TQTabDialog *qtd;
// Retreive the border and direction information out of the // Retreive the border and direction information out of the
// carg string // carg string
if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQTabDialog") == TRUE){ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits(TQTABDIALOG_OBJECT_NAME_STRING) == TRUE){
qtd = (TQTabDialog *) ca.fetchedObj; qtd = (TQTabDialog *) ca.fetchedObj;
ptd->setDeleteAble(FALSE); ptd->setDeleteAble(FALSE);
} }
@ -78,7 +78,7 @@ void PTabDialog::messageHandler(int fd, PukeMessage *pm)
void PTabDialog::setWidget(TQObject *tb) void PTabDialog::setWidget(TQObject *tb)
{ {
if(tb != 0 && tb->inherits("TQTabDialog") == FALSE) if(tb != 0 && tb->inherits(TQTABDIALOG_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(tb); errorInvalidSet(tb);
return; return;

@ -52,7 +52,7 @@ void PTableView::messageHandler(int fd, PukeMessage *pm)
void PTableView::setWidget(TQObject *_tbv) void PTableView::setWidget(TQObject *_tbv)
{ {
if(_tbv != 0 && _tbv->inherits("TQGridView") == FALSE) if(_tbv != 0 && _tbv->inherits(TQGRIDVIEW_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_tbv); errorInvalidSet(_tbv);
return; return;

@ -55,7 +55,7 @@ PObject *PWidget::createWidget(CreateArgs &ca)
{ {
PWidget *pw = new PWidget(); PWidget *pw = new PWidget();
TQWidget *tw; TQWidget *tw;
if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQWidget") == TRUE){ if(ca.fetchedObj != 0 && ca.fetchedObj->inherits(TQWIDGET_OBJECT_NAME_STRING) == TRUE){
tw = (TQWidget *) ca.fetchedObj; tw = (TQWidget *) ca.fetchedObj;
pw->setDeleteAble(FALSE); pw->setDeleteAble(FALSE);
} }
@ -266,7 +266,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm)
void PWidget::setWidget(TQObject *_w) void PWidget::setWidget(TQObject *_w)
{ {
if(_w != 0 && _w->inherits("TQWidget") == FALSE) if(_w != 0 && _w->inherits(TQWIDGET_OBJECT_NAME_STRING) == FALSE)
{ {
errorInvalidSet(_w); errorInvalidSet(_w);
return; return;

Loading…
Cancel
Save