summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-02 07:41:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-02 07:41:52 +0000
commitbf85f02dd35b67007f6732d3c7dc76d7ac7f2a3d (patch)
tree3c966548ca8c50ba05e163b7908ec39b51d47c3d
parentb5fb39eb73302856329affac603779129a545abd (diff)
downloadtdelibs-bf85f02dd35b67007f6732d3c7dc76d7ac7f2a3d.tar.gz
tdelibs-bf85f02dd35b67007f6732d3c7dc76d7ac7f2a3d.zip
Update remaining kdelibs inherits() functions to use new object name defines instead of hard coded string literals
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1226843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kdecore/kconfigdialogmanager.cpp2
-rw-r--r--kdefx/kstyle.cpp12
-rw-r--r--kdeprint/management/kiconselectaction.cpp2
-rw-r--r--kio/kfile/kfilemetainfowidget.cpp14
-rw-r--r--kio/kfile/kpropertiesdialog.cpp2
-rw-r--r--kstyles/kthemestyle/kthemestyle.cpp2
6 files changed, 17 insertions, 17 deletions
diff --git a/kdecore/kconfigdialogmanager.cpp b/kdecore/kconfigdialogmanager.cpp
index 61585cc52..8db988709 100644
--- a/kdecore/kconfigdialogmanager.cpp
+++ b/kdecore/kconfigdialogmanager.cpp
@@ -79,7 +79,7 @@ void KConfigDialogManager::init(bool trackChanges)
changedMap.insert(TQGROUPBOX_OBJECT_NAME_STRING, TQT_SIGNAL(toggled(bool)));
changedMap.insert(TQCOMBOBOX_OBJECT_NAME_STRING, TQT_SIGNAL(activated (int)));
//qsqlproperty map doesn't store the text, but the value!
- //changedMap.insert("QComboBox", TQT_SIGNAL(textChanged(const TQString &)));
+ //changedMap.insert(TQCOMBOBOX_OBJECT_NAME_STRING, TQT_SIGNAL(textChanged(const TQString &)));
changedMap.insert(TQDATEEDIT_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged(const TQDate &)));
changedMap.insert(TQDATETIMEEDIT_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged(const TQDateTime &)));
changedMap.insert(TQDIAL_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged (int)));
diff --git a/kdefx/kstyle.cpp b/kdefx/kstyle.cpp
index a7602e50f..58caa39b7 100644
--- a/kdefx/kstyle.cpp
+++ b/kdefx/kstyle.cpp
@@ -575,13 +575,13 @@ void KStyle::tqdrawPrimitive( TQ_PrimitiveElement pe,
// Check if we are a normal toolbar or a hidden dockwidget.
if ( parent &&
- (parent->inherits("QToolBar") || // Normal toolbar
- (parent->inherits("QMainWindow")) )) // Collapsed dock
+ (parent->inherits(TQTOOLBAR_OBJECT_NAME_STRING) || // Normal toolbar
+ (parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock
// Draw a toolbar handle
drawKStylePrimitive( KPE_ToolBarHandle, p, widget, r, cg, flags, opt );
- else if ( widget->inherits("QDockWindowHandle") )
+ else if ( widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
// Draw a dock window handle
drawKStylePrimitive( KPE_DockWindowHandle, p, widget, r, cg, flags, opt );
@@ -987,9 +987,9 @@ int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const
// Check that we are not a normal toolbar or a hidden dockwidget,
// in which case we need to adjust the height for font size
if (widget && (parent = widget->tqparentWidget() )
- && !parent->inherits("QToolBar")
- && !parent->inherits("QMainWindow")
- && widget->inherits("QDockWindowHandle") )
+ && !parent->inherits(TQTOOLBAR_OBJECT_NAME_STRING)
+ && !parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)
+ && widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
return widget->fontMetrics().lineSpacing();
else
return TQCommonStyle::tqpixelMetric(m, widget);
diff --git a/kdeprint/management/kiconselectaction.cpp b/kdeprint/management/kiconselectaction.cpp
index eb7d1a82a..c042213f7 100644
--- a/kdeprint/management/kiconselectaction.cpp
+++ b/kdeprint/management/kiconselectaction.cpp
@@ -76,7 +76,7 @@ void KIconSelectAction::setItems(const TQStringList& lst, const TQStringList& ic
int KIconSelectAction::plug(TQWidget* widget, int index)
{
int value(-1);
- if (widget->inherits("QPopupMenu"))
+ if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING))
{
createPopupMenu();
value = KSelectAction::plug(widget, index);
diff --git a/kio/kfile/kfilemetainfowidget.cpp b/kio/kfile/kfilemetainfowidget.cpp
index 4b8adefc3..c4df4a15d 100644
--- a/kio/kfile/kfilemetainfowidget.cpp
+++ b/kio/kfile/kfilemetainfowidget.cpp
@@ -196,7 +196,7 @@ TQWidget* KFileMetaInfoWidget::makeIntWidget()
if (m_validator)
{
- if (m_validator->inherits("QIntValidator"))
+ if (m_validator->inherits(TQINTVALIDATOR_OBJECT_NAME_STRING))
{
sb->setMinValue(static_cast<TQIntValidator*>(m_validator)->bottom());
sb->setMaxValue(static_cast<TQIntValidator*>(m_validator)->top());
@@ -301,7 +301,7 @@ void KFileMetaInfoWidget::reparentValidator( TQWidget *widget,
void KFileMetaInfoWidget::slotChanged(bool value)
{
- Q_ASSERT(m_widget->inherits("QComboBox"));
+ Q_ASSERT(m_widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING));
m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
@@ -309,7 +309,7 @@ void KFileMetaInfoWidget::slotChanged(bool value)
void KFileMetaInfoWidget::slotChanged(int value)
{
- Q_ASSERT(m_widget->inherits("QSpinBox"));
+ Q_ASSERT(m_widget->inherits(TQSPINBOX_OBJECT_NAME_STRING));
m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
@@ -342,7 +342,7 @@ void KFileMetaInfoWidget::slotLineEditChanged(const TQString& value)
// that may be a little expensive for long texts, but what can we do?
void KFileMetaInfoWidget::slotMultiLineEditChanged()
{
- Q_ASSERT(m_widget->inherits("QTextEdit"));
+ Q_ASSERT(m_widget->inherits(TQTEXTEDIT_OBJECT_NAME_STRING));
m_value = TQVariant( static_cast<const TQTextEdit*>( sender() )->text() );
emit valueChanged(m_value);
m_dirty = true;
@@ -350,7 +350,7 @@ void KFileMetaInfoWidget::slotMultiLineEditChanged()
void KFileMetaInfoWidget::slotDateChanged(const TQDate& value)
{
- Q_ASSERT(m_widget->inherits("QDateEdit"));
+ Q_ASSERT(m_widget->inherits(TQDATEEDIT_OBJECT_NAME_STRING));
m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
@@ -358,7 +358,7 @@ void KFileMetaInfoWidget::slotDateChanged(const TQDate& value)
void KFileMetaInfoWidget::slotTimeChanged(const TQTime& value)
{
- Q_ASSERT(m_widget->inherits("QTimeEdit"));
+ Q_ASSERT(m_widget->inherits(TQTIMEEDIT_OBJECT_NAME_STRING));
m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
@@ -366,7 +366,7 @@ void KFileMetaInfoWidget::slotTimeChanged(const TQTime& value)
void KFileMetaInfoWidget::slotDateTimeChanged(const TQDateTime& value)
{
- Q_ASSERT(m_widget->inherits("QDateTimeEdit"));
+ Q_ASSERT(m_widget->inherits(TQDATETIMEEDIT_OBJECT_NAME_STRING));
m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp
index dde96f017..d953f830b 100644
--- a/kio/kfile/kpropertiesdialog.cpp
+++ b/kio/kfile/kpropertiesdialog.cpp
@@ -1317,7 +1317,7 @@ void KFilePropsPlugin::applyChanges()
kdDebug(250) << "KFilePropsPlugin::applyChanges" << endl;
- if (nameArea->inherits("QLineEdit"))
+ if (nameArea->inherits(TQLINEEDIT_OBJECT_NAME_STRING))
{
TQString n = ((TQLineEdit *) nameArea)->text();
// Remove trailing spaces (#4345)
diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp
index 87a2f0d70..b23003cb5 100644
--- a/kstyles/kthemestyle/kthemestyle.cpp
+++ b/kstyles/kthemestyle/kthemestyle.cpp
@@ -488,7 +488,7 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
w->setPalette(pal);
}
}
- if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits("QLabel"))
+ if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits(TQLABEL_OBJECT_NAME_STRING))
{
TQWidget* lb = TQT_TQWIDGET(object);
if (lb->backgroundMode() == TQt::PaletteButton)