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
v3.5.13-sru
tpearson 14 years ago
parent b5fb39eb73
commit bf85f02dd3

@ -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)));

@ -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);

@ -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);

@ -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;

@ -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)

@ -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)

Loading…
Cancel
Save