summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-04 16:29:09 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-06 09:06:17 (GMT)
commit633f3f45e5420663cf4ceadea79e62fea44cd2eb (patch)
tree1b2c0d8b5dc0746a51c2ea4bf542845273cf7006 /tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
parent7b5e37cab738804d47b78582aa3d0f3bb6933e70 (diff)
downloadQt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.zip
Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.gz
Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.bz2
Remove the use of deprecated qVariant*
Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue git checkout src/corelib/kernal/qvariant* Rev-by: dev mailing list
Diffstat (limited to 'tools/designer/src/lib/shared/qdesigner_tabwidget.cpp')
-rw-r--r--tools/designer/src/lib/shared/qdesigner_tabwidget.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
index 78c6bd9..461212c 100644
--- a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
@@ -405,13 +405,13 @@ QTabWidgetPropertySheet::QTabWidgetPropertySheet(QTabWidget *object, QObject *pa
QDesignerPropertySheet(object, parent),
m_tabWidget(object)
{
- createFakeProperty(QLatin1String(currentTabTextKey), qVariantFromValue(qdesigner_internal::PropertySheetStringValue()));
+ createFakeProperty(QLatin1String(currentTabTextKey), QVariant::fromValue(qdesigner_internal::PropertySheetStringValue()));
createFakeProperty(QLatin1String(currentTabNameKey), QString());
- createFakeProperty(QLatin1String(currentTabIconKey), qVariantFromValue(qdesigner_internal::PropertySheetIconValue()));
+ createFakeProperty(QLatin1String(currentTabIconKey), QVariant::fromValue(qdesigner_internal::PropertySheetIconValue()));
if (formWindowBase())
formWindowBase()->addReloadableProperty(this, indexOf(QLatin1String(currentTabIconKey)));
- createFakeProperty(QLatin1String(currentTabToolTipKey), qVariantFromValue(qdesigner_internal::PropertySheetStringValue()));
- createFakeProperty(QLatin1String(currentTabWhatsThisKey), qVariantFromValue(qdesigner_internal::PropertySheetStringValue()));
+ createFakeProperty(QLatin1String(currentTabToolTipKey), QVariant::fromValue(qdesigner_internal::PropertySheetStringValue()));
+ createFakeProperty(QLatin1String(currentTabWhatsThisKey), QVariant::fromValue(qdesigner_internal::PropertySheetStringValue()));
// Prevent the tab widget's drag and drop handling from interfering with Designer's
createFakeProperty(QLatin1String(tabMovableKey), QVariant(false));
}
@@ -447,22 +447,22 @@ void QTabWidgetPropertySheet::setProperty(int index, const QVariant &value)
switch (tabWidgetProperty) {
case PropertyCurrentTabText:
m_tabWidget->setTabText(currentIndex, qvariant_cast<QString>(resolvePropertyValue(index, value)));
- m_pageToData[currentWidget].text = qVariantValue<qdesigner_internal::PropertySheetStringValue>(value);
+ m_pageToData[currentWidget].text = qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value);
break;
case PropertyCurrentTabName:
currentWidget->setObjectName(value.toString());
break;
case PropertyCurrentTabIcon:
m_tabWidget->setTabIcon(currentIndex, qvariant_cast<QIcon>(resolvePropertyValue(index, value)));
- m_pageToData[currentWidget].icon = qVariantValue<qdesigner_internal::PropertySheetIconValue>(value);
+ m_pageToData[currentWidget].icon = qvariant_cast<qdesigner_internal::PropertySheetIconValue>(value);
break;
case PropertyCurrentTabToolTip:
m_tabWidget->setTabToolTip(currentIndex, qvariant_cast<QString>(resolvePropertyValue(index, value)));
- m_pageToData[currentWidget].tooltip = qVariantValue<qdesigner_internal::PropertySheetStringValue>(value);
+ m_pageToData[currentWidget].tooltip = qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value);
break;
case PropertyCurrentTabWhatsThis:
m_tabWidget->setTabWhatsThis(currentIndex, qvariant_cast<QString>(resolvePropertyValue(index, value)));
- m_pageToData[currentWidget].whatsthis = qVariantValue<qdesigner_internal::PropertySheetStringValue>(value);
+ m_pageToData[currentWidget].whatsthis = qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value);
break;
case PropertyTabWidgetNone:
break;
@@ -486,28 +486,28 @@ QVariant QTabWidgetPropertySheet::property(int index) const
QWidget *currentWidget = m_tabWidget->currentWidget();
if (!currentWidget) {
if (tabWidgetProperty == PropertyCurrentTabIcon)
- return qVariantFromValue(qdesigner_internal::PropertySheetIconValue());
+ return QVariant::fromValue(qdesigner_internal::PropertySheetIconValue());
if (tabWidgetProperty == PropertyCurrentTabText)
- return qVariantFromValue(qdesigner_internal::PropertySheetStringValue());
+ return QVariant::fromValue(qdesigner_internal::PropertySheetStringValue());
if (tabWidgetProperty == PropertyCurrentTabToolTip)
- return qVariantFromValue(qdesigner_internal::PropertySheetStringValue());
+ return QVariant::fromValue(qdesigner_internal::PropertySheetStringValue());
if (tabWidgetProperty == PropertyCurrentTabWhatsThis)
- return qVariantFromValue(qdesigner_internal::PropertySheetStringValue());
+ return QVariant::fromValue(qdesigner_internal::PropertySheetStringValue());
return QVariant(QString());
}
// index-dependent
switch (tabWidgetProperty) {
case PropertyCurrentTabText:
- return qVariantFromValue(m_pageToData.value(currentWidget).text);
+ return QVariant::fromValue(m_pageToData.value(currentWidget).text);
case PropertyCurrentTabName:
return currentWidget->objectName();
case PropertyCurrentTabIcon:
- return qVariantFromValue(m_pageToData.value(currentWidget).icon);
+ return QVariant::fromValue(m_pageToData.value(currentWidget).icon);
case PropertyCurrentTabToolTip:
- return qVariantFromValue(m_pageToData.value(currentWidget).tooltip);
+ return QVariant::fromValue(m_pageToData.value(currentWidget).tooltip);
case PropertyCurrentTabWhatsThis:
- return qVariantFromValue(m_pageToData.value(currentWidget).whatsthis);
+ return QVariant::fromValue(m_pageToData.value(currentWidget).whatsthis);
case PropertyTabWidgetNone:
break;
}