diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-24 20:07:57 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-24 20:07:57 +0000 |
commit | f7670c198945adc3b95ad69a959fe5f8ae55b493 (patch) | |
tree | f99e83cfcade37f343656314fa6088ef9c6d2526 /kommander/executor | |
parent | 9cbbf05386502794e53fbf68678e3c7fc6d0e296 (diff) | |
download | tdewebdev-f7670c198945adc3b95ad69a959fe5f8ae55b493.tar.gz tdewebdev-f7670c198945adc3b95ad69a959fe5f8ae55b493.zip |
Runtime object naming repaired in kdewebdev
NOTE: runtime object naming still needs to be checked for stray "Q*" strings
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1222551 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/executor')
-rw-r--r-- | kommander/executor/instance.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kommander/executor/instance.cpp b/kommander/executor/instance.cpp index 7676f12d..a8ff3400 100644 --- a/kommander/executor/instance.cpp +++ b/kommander/executor/instance.cpp @@ -158,9 +158,9 @@ bool Instance::run() return false; // Handle both dialogs and main windows - if (m_instance->inherits("TQDialog")) + if (m_instance->inherits(TQDIALOG_OBJECT_NAME_STRING)) dynamic_cast<TQDialog*>((TQWidget*)m_instance)->exec(); - else if (m_instance->inherits("TQMainWindow")) + else if (m_instance->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) { kapp->setMainWidget(m_instance); dynamic_cast<TQMainWindow*>((TQWidget*)m_instance)->show(); @@ -234,14 +234,14 @@ bool Instance::isFileValid(const KURL& fname) const void Instance::setEnabled(const TQString& widgetName, bool enable) { TQObject* child = stringToWidget(widgetName); - if (child && child->inherits("TQWidget")) + if (child && child->inherits(TQWIDGET_OBJECT_NAME_STRING)) ((TQWidget*)child)->setEnabled(enable); } void Instance::setVisible(const TQString& widgetName, bool visible) { TQObject* child = stringToWidget(widgetName); - if (child && child->inherits("TQWidget")) + if (child && child->inherits(TQWIDGET_OBJECT_NAME_STRING)) ((TQWidget*)child)->setShown(visible); } @@ -250,7 +250,7 @@ void Instance::setText(const TQString& widgetName, const TQString& text) TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::setText, text); - else if (child && child->inherits("TQLabel")) + else if (child && child->inherits(TQLABEL_OBJECT_NAME_STRING)) { TQLabel* label = (TQLabel*)child; if (label->pixmap()) @@ -269,7 +269,7 @@ TQString Instance::text(const TQString& widgetName) TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) return kommanderWidget(child)->handleDCOP(DCOP::text); - else if (child && child->inherits("TQLabel")) + else if (child && child->inherits(TQLABEL_OBJECT_NAME_STRING)) return ((TQLabel*)child)->text(); return TQString(); } @@ -279,7 +279,7 @@ void Instance::setSelection(const TQString& widgetName, const TQString& text) TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::setSelection, text); - else if (child && child->inherits("TQLabel")) + else if (child && child->inherits(TQLABEL_OBJECT_NAME_STRING)) ((TQLabel*)child)->setText(text); } @@ -426,7 +426,7 @@ TQStringList Instance::associatedText(const TQString &widgetName) TQString Instance::type(const TQString& widget) { TQObject* child = stringToWidget(widget); - if (child && child->inherits("TQWidget")) + if (child && child->inherits(TQWIDGET_OBJECT_NAME_STRING)) return child->className(); return TQString(); } @@ -438,9 +438,9 @@ TQStringList Instance::children(const TQString& parent, bool recursive) TQObjectList* widgets; if (!child) child = m_instance; - if (child->inherits("TQWidget")) + if (child->inherits(TQWIDGET_OBJECT_NAME_STRING)) { - widgets = child->queryList("TQWidget", 0, false, recursive); + widgets = child->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, recursive); for (TQObject* w = widgets->first(); w; w = widgets->next()) if (w->name() && kommanderWidget(w)) matching.append(w->name()); |