summaryrefslogtreecommitdiffstats
path: root/demos/browser
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 /demos/browser
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 'demos/browser')
-rw-r--r--demos/browser/browserapplication.cpp4
-rw-r--r--demos/browser/cookiejar.cpp2
-rw-r--r--demos/browser/settings.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/demos/browser/browserapplication.cpp b/demos/browser/browserapplication.cpp
index ed95d32..633307c 100644
--- a/demos/browser/browserapplication.cpp
+++ b/demos/browser/browserapplication.cpp
@@ -231,14 +231,14 @@ void BrowserApplication::loadSettings()
QString standardFontFamily = defaultSettings->fontFamily(QWebSettings::StandardFont);
int standardFontSize = defaultSettings->fontSize(QWebSettings::DefaultFontSize);
QFont standardFont = QFont(standardFontFamily, standardFontSize);
- standardFont = qVariantValue<QFont>(settings.value(QLatin1String("standardFont"), standardFont));
+ standardFont = qvariant_cast<QFont>(settings.value(QLatin1String("standardFont"), standardFont));
defaultSettings->setFontFamily(QWebSettings::StandardFont, standardFont.family());
defaultSettings->setFontSize(QWebSettings::DefaultFontSize, standardFont.pointSize());
QString fixedFontFamily = defaultSettings->fontFamily(QWebSettings::FixedFont);
int fixedFontSize = defaultSettings->fontSize(QWebSettings::DefaultFixedFontSize);
QFont fixedFont = QFont(fixedFontFamily, fixedFontSize);
- fixedFont = qVariantValue<QFont>(settings.value(QLatin1String("fixedFont"), fixedFont));
+ fixedFont = qvariant_cast<QFont>(settings.value(QLatin1String("fixedFont"), fixedFont));
defaultSettings->setFontFamily(QWebSettings::FixedFont, fixedFont.family());
defaultSettings->setFontSize(QWebSettings::DefaultFixedFontSize, fixedFont.pointSize());
diff --git a/demos/browser/cookiejar.cpp b/demos/browser/cookiejar.cpp
index 835b61b..d318e3a 100644
--- a/demos/browser/cookiejar.cpp
+++ b/demos/browser/cookiejar.cpp
@@ -186,7 +186,7 @@ void CookieJar::save()
if (cookies.at(i).isSessionCookie())
cookies.removeAt(i);
}
- cookieSettings.setValue(QLatin1String("cookies"), qVariantFromValue<QList<QNetworkCookie> >(cookies));
+ cookieSettings.setValue(QLatin1String("cookies"), QVariant::fromValue<QList<QNetworkCookie> >(cookies));
cookieSettings.beginGroup(QLatin1String("Exceptions"));
cookieSettings.setValue(QLatin1String("block"), m_exceptions_block);
cookieSettings.setValue(QLatin1String("allow"), m_exceptions_allow);
diff --git a/demos/browser/settings.cpp b/demos/browser/settings.cpp
index 5ceca67..d83e6a4 100644
--- a/demos/browser/settings.cpp
+++ b/demos/browser/settings.cpp
@@ -121,8 +121,8 @@ void SettingsDialog::loadFromSettings()
// Appearance
settings.beginGroup(QLatin1String("websettings"));
- fixedFont = qVariantValue<QFont>(settings.value(QLatin1String("fixedFont"), fixedFont));
- standardFont = qVariantValue<QFont>(settings.value(QLatin1String("standardFont"), standardFont));
+ fixedFont = qvariant_cast<QFont>(settings.value(QLatin1String("fixedFont"), fixedFont));
+ standardFont = qvariant_cast<QFont>(settings.value(QLatin1String("standardFont"), standardFont));
standardLabel->setText(QString(QLatin1String("%1 %2")).arg(standardFont.family()).arg(standardFont.pointSize()));
fixedLabel->setText(QString(QLatin1String("%1 %2")).arg(fixedFont.family()).arg(fixedFont.pointSize()));