summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/affine/main.cpp2
-rw-r--r--demos/arthurplugin/arthurplugin.pro1
-rw-r--r--demos/books/books.pro4
-rw-r--r--demos/boxes/glbuffers.cpp10
-rw-r--r--demos/boxes/glbuffers.h2
-rw-r--r--demos/boxes/qtbox.cpp2
-rw-r--r--demos/boxes/scene.cpp2
-rw-r--r--demos/browser/browserapplication.cpp4
-rw-r--r--demos/browser/cookiejar.cpp2
-rw-r--r--demos/browser/settings.cpp4
-rw-r--r--demos/composition/main.cpp2
-rw-r--r--demos/declarative/minehunt/minehunt.pro2
-rw-r--r--demos/declarative/snake/content/Link.qml7
-rw-r--r--demos/declarative/snake/content/snake.js16
-rw-r--r--demos/declarative/snake/snake.qml41
-rw-r--r--demos/deform/main.cpp2
-rw-r--r--demos/deform/pathdeform.cpp2
-rw-r--r--demos/embedded/desktopservices/desktopservices.pro4
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro80
-rw-r--r--demos/embedded/qmlcalculator/deployment.pri2
-rw-r--r--demos/embedded/qmlclocks/deployment.pri2
-rw-r--r--demos/embedded/qmldialcontrol/deployment.pri2
-rw-r--r--demos/embedded/qmleasing/deployment.pri2
-rw-r--r--demos/embedded/qmlflickr/deployment.pri2
-rw-r--r--demos/embedded/qmlphotoviewer/deployment.pri2
-rw-r--r--demos/embedded/qmltwitter/deployment.pri2
-rw-r--r--demos/embeddeddialogs/customproxy.cpp2
-rw-r--r--demos/gradients/main.cpp2
-rw-r--r--demos/interview/model.cpp2
-rw-r--r--demos/mainwindow/colorswatch.cpp6
-rw-r--r--demos/mainwindow/toolbar.cpp2
-rw-r--r--demos/pathstroke/main.cpp2
-rw-r--r--demos/pathstroke/pathstroke.cpp2
-rw-r--r--demos/qmediaplayer/qmediaplayer.pro2
-rw-r--r--demos/shared/arthurstyle.cpp2
-rw-r--r--demos/shared/arthurwidgets.cpp2
-rw-r--r--demos/spectrum/app/app.pro2
-rw-r--r--demos/spectrum/app/settingsdialog.cpp8
-rw-r--r--demos/spreadsheet/spreadsheetitem.cpp6
39 files changed, 142 insertions, 101 deletions
diff --git a/demos/affine/main.cpp b/demos/affine/main.cpp
index 85da546301..e14dc6b64e 100644
--- a/demos/affine/main.cpp
+++ b/demos/affine/main.cpp
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
QStyle *arthurStyle = new ArthurStyle();
xformWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = qFindChildren<QWidget *>(&xformWidget);
+ QList<QWidget *> widgets = xformWidget.findChildren<QWidget *>();
foreach (QWidget *w, widgets) {
w->setStyle(arthurStyle);
w->setAttribute(Qt::WA_AcceptTouchEvents);
diff --git a/demos/arthurplugin/arthurplugin.pro b/demos/arthurplugin/arthurplugin.pro
index 311429373a..bc542fbd97 100644
--- a/demos/arthurplugin/arthurplugin.pro
+++ b/demos/arthurplugin/arthurplugin.pro
@@ -3,6 +3,7 @@ QTDIR = $$QT_SOURCE_TREE
CONFIG += designer plugin
TEMPLATE = lib
+TARGET = $$qtLibraryTarget(arthurplugin)
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
contains(QT_CONFIG, opengl) {
diff --git a/demos/books/books.pro b/demos/books/books.pro
index a5e44e5877..06718d1332 100644
--- a/demos/books/books.pro
+++ b/demos/books/books.pro
@@ -16,8 +16,8 @@ INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
wince*: {
- CONFIG(debug, debug|release):sqlPlugins.sources = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll
- CONFIG(release, debug|release):sqlPlugins.sources = $$QT_BUILD_TREE/plugins/sqldrivers/*[^d]4.dll
+ CONFIG(debug, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll
+ CONFIG(release, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/*[^d]4.dll
sqlPlugins.path = sqldrivers
DEPLOYMENT += sqlPlugins
}
diff --git a/demos/boxes/glbuffers.cpp b/demos/boxes/glbuffers.cpp
index 694d05b409..84ab26c809 100644
--- a/demos/boxes/glbuffers.cpp
+++ b/demos/boxes/glbuffers.cpp
@@ -42,6 +42,16 @@
#include "glbuffers.h"
#include <QtGui/qmatrix4x4.h>
+
+void qgluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
+{
+ const GLdouble ymax = zNear * tan(fovy * M_PI / 360.0);
+ const GLdouble ymin = -ymax;
+ const GLdouble xmin = ymin * aspect;
+ const GLdouble xmax = ymax * aspect;
+ glFrustum(xmin, xmax, ymin, ymax, zNear, zFar);
+}
+
//============================================================================//
// GLTexture //
//============================================================================//
diff --git a/demos/boxes/glbuffers.h b/demos/boxes/glbuffers.h
index 67a4ea6ed1..8c1e209daf 100644
--- a/demos/boxes/glbuffers.h
+++ b/demos/boxes/glbuffers.h
@@ -58,6 +58,8 @@ if (m_failed || !(assertion)) {
returnStatement; \
}
+void qgluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
+
QT_BEGIN_NAMESPACE
class QMatrix4x4;
QT_END_NAMESPACE
diff --git a/demos/boxes/qtbox.cpp b/demos/boxes/qtbox.cpp
index 3aaf985ab9..e3a59781e9 100644
--- a/demos/boxes/qtbox.cpp
+++ b/demos/boxes/qtbox.cpp
@@ -324,7 +324,7 @@ void QtBox::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWi
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadMatrixf(moveToRectMatrix);
- gluPerspective(60.0, 1.0, 0.01, 10.0);
+ qgluPerspective(60.0, 1.0, 0.01, 10.0);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp
index 97953f2636..d65af22b9c 100644
--- a/demos/boxes/scene.cpp
+++ b/demos/boxes/scene.cpp
@@ -922,7 +922,7 @@ void Scene::drawBackground(QPainter *painter, const QRectF &)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
- gluPerspective(60.0, width / height, 0.01, 15.0);
+ qgluPerspective(60.0, width / height, 0.01, 15.0);
glMatrixMode(GL_MODELVIEW);
diff --git a/demos/browser/browserapplication.cpp b/demos/browser/browserapplication.cpp
index ed95d32154..633307ccda 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 835b61b315..d318e3a4be 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 fba781b05d..6e9bc2c627 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()));
diff --git a/demos/composition/main.cpp b/demos/composition/main.cpp
index aa8c1399d5..a528dffd8a 100644
--- a/demos/composition/main.cpp
+++ b/demos/composition/main.cpp
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
QStyle *arthurStyle = new ArthurStyle();
compWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = qFindChildren<QWidget *>(&compWidget);
+ QList<QWidget *> widgets = compWidget.findChildren<QWidget *>();
foreach (QWidget *w, widgets)
w->setStyle(arthurStyle);
compWidget.show();
diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro
index 753ca4eb68..79843158c2 100644
--- a/demos/declarative/minehunt/minehunt.pro
+++ b/demos/declarative/minehunt/minehunt.pro
@@ -18,7 +18,7 @@ symbian:{
TARGET.EPOCALLOWDLLDATA = 1
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- qmlminehuntfiles.sources = MinehuntCore minehunt.qml
+ qmlminehuntfiles.files = MinehuntCore minehunt.qml
DEPLOYMENT = qmlminehuntfiles
}
\ No newline at end of file
diff --git a/demos/declarative/snake/content/Link.qml b/demos/declarative/snake/content/Link.qml
index 16b6e1ee43..8ce7c81afa 100644
--- a/demos/declarative/snake/content/Link.qml
+++ b/demos/declarative/snake/content/Link.qml
@@ -77,7 +77,12 @@ Item { id:link
id: actualImageRotation
origin.x: width/2; origin.y: height/2;
angle: rotation * 90
- Behavior on angle { NumberAnimation { duration: spawned ? 200 : 0} }
+ Behavior on angle {
+ RotationAnimation{
+ direction: RotationAnimation.Shortest
+ duration: spawned ? 200 : 0
+ }
+ }
}
}
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
index 5c089de76f..837b82addd 100644
--- a/demos/declarative/snake/content/snake.js
+++ b/demos/declarative/snake/content/snake.js
@@ -22,20 +22,26 @@ function rand(n)
function scheduleDirection(dir)
{
- direction = dir;
- if(scheduledDirections[scheduledDirections.length-1]!=direction)
- scheduledDirections.push(direction);
+ if (state == "starting") {
+ direction = dir;
+ headDirection = direction;
+ head.rotation = headDirection;
+ } else if (state == "running"){
+ direction = dir;
+ if(scheduledDirections[scheduledDirections.length-1]!=direction)
+ scheduledDirections.push(direction);
+ }
}
function startNewGame()
{
- if (state == "starting")
+ if (state == "starting") {
return;
+ }
if (activeGame) {
endGame();
startNewGameTimer.running = true;
- state = "";
return;
}
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 6eaa976c75..37e64ec3fb 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -88,7 +88,7 @@ Rectangle {
onTriggered: { Logic.moveSkull() }
}
Timer {
- id: startNewGameTimer;
+ id: startNewGameTimer;
interval: 700;
onTriggered: { Logic.startNewGame(); }
}
@@ -109,6 +109,7 @@ Rectangle {
}
Image {
+
Image {
id: title
source: "content/pics/snake.jpg"
@@ -117,14 +118,28 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
- Text {
- color: "white"
- font.pointSize: 24
- horizontalAlignment: Text.AlignHCenter
- text: "Last Score:\t" + lastScore + "\nHighscore:\t" + highScores.topScore;
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: parent.bottom
- anchors.bottomMargin: gridSize
+ Column {
+ spacing: 140
+ anchors.verticalCenter: parent.verticalCenter;
+ anchors.left: parent.left;
+ anchors.right: parent.right;
+
+ Text {
+ color: "white"
+ font.pointSize: 48
+ font.italic: true;
+ font.bold: true;
+ text: "Snake"
+ anchors.horizontalCenter: parent.horizontalCenter;
+ }
+
+ Text {
+ color: "white"
+ font.pointSize: 24
+ anchors.horizontalCenter: parent.horizontalCenter;
+ //horizontalAlignment: Text.AlignHCenter
+ text: "Last Score:\t" + lastScore + "\nHighscore:\t" + highScores.topScore;
+ }
}
}
@@ -154,7 +169,7 @@ Rectangle {
MouseArea {
anchors.fill: parent
onPressed: {
- if (!head || !heartbeat.running) {
+ if (screen.state == "") {
Logic.startNewGame();
return;
}
@@ -245,10 +260,12 @@ Rectangle {
from: "*"
to: "starting"
NumberAnimation { target: progressIndicator; property: "width"; duration: 1000 }
- NumberAnimation { target: title; property: "opacity"; duration: 500 }
+ NumberAnimation { property: "opacity"; duration: 200 }
},
Transition {
- NumberAnimation { target: title; property: "opacity"; duration: 500 }
+ to: "starting"
+ NumberAnimation { target: progressIndicator; property: "width"; duration: 1000 }
+ NumberAnimation { property: "opacity"; duration: 200 }
}
]
diff --git a/demos/deform/main.cpp b/demos/deform/main.cpp
index bef075a502..c5491b3c3e 100644
--- a/demos/deform/main.cpp
+++ b/demos/deform/main.cpp
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
QStyle *arthurStyle = new ArthurStyle();
deformWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = qFindChildren<QWidget *>(&deformWidget);
+ QList<QWidget *> widgets = deformWidget.findChildren<QWidget *>();
foreach (QWidget *w, widgets)
w->setStyle(arthurStyle);
diff --git a/demos/deform/pathdeform.cpp b/demos/deform/pathdeform.cpp
index 636d103bb2..d6ac19e200 100644
--- a/demos/deform/pathdeform.cpp
+++ b/demos/deform/pathdeform.cpp
@@ -297,7 +297,7 @@ void PathDeformWidget::setStyle( QStyle * style )
{
m_controls->setStyle(style);
- QList<QWidget *> widgets = qFindChildren<QWidget *>(m_controls);
+ QList<QWidget *> widgets = m_controls->findChildren<QWidget *>();
foreach (QWidget *w, widgets)
w->setStyle(style);
}
diff --git a/demos/embedded/desktopservices/desktopservices.pro b/demos/embedded/desktopservices/desktopservices.pro
index 94ddedd62d..e66db1cb64 100644
--- a/demos/embedded/desktopservices/desktopservices.pro
+++ b/demos/embedded/desktopservices/desktopservices.pro
@@ -7,8 +7,8 @@ SOURCES += desktopwidget.cpp contenttab.cpp linktab.cpp main.cpp
RESOURCES += desktopservices.qrc
-music.sources = data/*.mp3 data/*.wav
-image.sources = data/*.png
+music.files = data/*.mp3 data/*.wav
+image.files = data/*.png
target.path = $$[QT_INSTALL_DEMOS]/embedded/desktopservices
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index ca74c38c11..0799ed9197 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -33,7 +33,7 @@ wince*{
BUILD_DIR = debug
}
- executables.sources = \
+ executables.files = \
$$QT_BUILD_TREE/demos/embedded/embeddedsvgviewer/$${BUILD_DIR}/embeddedsvgviewer.exe \
$$QT_BUILD_TREE/demos/embedded/styledemo/$${BUILD_DIR}/styledemo.exe \
$$QT_BUILD_TREE/demos/deform/$${BUILD_DIR}/deform.exe \
@@ -45,10 +45,10 @@ wince*{
executables.path = .
- files.sources = $$PWD/screenshots $$PWD/slides $$PWD/../embeddedsvgviewer/shapes.svg
+ files.files = $$PWD/screenshots $$PWD/slides $$PWD/../embeddedsvgviewer/shapes.svg
files.path = .
- config.sources = $$PWD/config_wince/config.xml
+ config.files = $$PWD/config_wince/config.xml
config.path = .
DEPLOYMENT += config files executables
@@ -79,7 +79,7 @@ symbian {
}
}
- executables.sources = \
+ executables.files = \
$$QT_BUILD_TREE/demos/embedded/styledemo/styledemo.exe \
$$QT_BUILD_TREE/demos/deform/deform.exe \
$$QT_BUILD_TREE/demos/pathstroke/pathstroke.exe \
@@ -97,7 +97,7 @@ symbian {
executables.path = /sys/bin
- reg_resource.sources = \
+ reg_resource.files = \
$$regResourceDir(demos/embedded/styledemo/styledemo_reg.rsc) \
$$regResourceDir(demos/deform/deform_reg.rsc) \
$$regResourceDir(demos/pathstroke/pathstroke_reg.rsc) \
@@ -114,17 +114,17 @@ symbian {
$$regResourceDir(demos/embedded/flightinfo/flightinfo_reg.rsc)
contains(QT_CONFIG, phonon) {
- reg_resource.sources += $$regResourceDir(demos/qmediaplayer/qmediaplayer_reg.rsc)
+ reg_resource.files += $$regResourceDir(demos/qmediaplayer/qmediaplayer_reg.rsc)
}
contains(QT_CONFIG, multimedia) {
- reg_resource.sources += $$regResourceDir(demos/spectrum/app/spectrum_reg.rsc)
+ reg_resource.files += $$regResourceDir(demos/spectrum/app/spectrum_reg.rsc)
}
reg_resource.path = $$REG_RESOURCE_IMPORT_DIR
- resource.sources = \
+ resource.files = \
$$appResourceDir(demos/embedded/styledemo/styledemo.rsc) \
$$appResourceDir(demos/deform/deform.rsc) \
$$appResourceDir(demos/pathstroke/pathstroke.rsc) \
@@ -143,7 +143,7 @@ symbian {
resource.path = $$APP_RESOURCE_DIR
- mifs.sources = \
+ mifs.files = \
$$appResourceDir(demos/embedded/fluidlauncher/fluidlauncher.mif) \
$$appResourceDir(demos/embedded/styledemo/styledemo.mif) \
$$appResourceDir(demos/deform/deform.mif) \
@@ -162,28 +162,28 @@ symbian {
mifs.path = $$APP_RESOURCE_DIR
contains(QT_CONFIG, svg) {
- executables.sources += \
+ executables.files += \
$$QT_BUILD_TREE/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.exe \
$$QT_BUILD_TREE/demos/embedded/weatherinfo/weatherinfo.exe
- reg_resource.sources += \
+ reg_resource.files += \
$$regResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer_reg.rsc) \
$$regResourceDir(demos/embedded/weatherinfo/weatherinfo_reg.rsc)
- resource.sources += \
+ resource.files += \
$$appResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer.rsc) \
$$appResourceDir(demos/embedded/weatherinfo/weatherinfo.rsc)
- mifs.sources += \
+ mifs.files += \
$$appResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer.mif) \
$$appResourceDir(demos/embedded/weatherinfo/weatherinfo.mif)
}
contains(QT_CONFIG, webkit) {
- executables.sources += $$QT_BUILD_TREE/demos/embedded/anomaly/anomaly.exe
- reg_resource.sources += $$regResourceDir(demos/embedded/anomaly/anomaly_reg.rsc)
- resource.sources += $$appResourceDir(demos/embedded/anomaly/anomaly.rsc)
- mifs.sources += \
+ executables.files += $$QT_BUILD_TREE/demos/embedded/anomaly/anomaly.exe
+ reg_resource.files += $$regResourceDir(demos/embedded/anomaly/anomaly_reg.rsc)
+ resource.files += $$appResourceDir(demos/embedded/anomaly/anomaly.rsc)
+ mifs.files += \
$$appResourceDir(demos/embedded/anomaly/anomaly.mif)
isEmpty(QT_LIBINFIX) {
@@ -195,61 +195,61 @@ symbian {
}
contains(QT_CONFIG, phonon) {
- executables.sources += $$QT_BUILD_TREE/demos/qmediaplayer/qmediaplayer.exe
- resource.sources += $$appResourceDir(demos/qmediaplayer/qmediaplayer.rsc)
- mifs.sources += \
+ executables.files += $$QT_BUILD_TREE/demos/qmediaplayer/qmediaplayer.exe
+ resource.files += $$appResourceDir(demos/qmediaplayer/qmediaplayer.rsc)
+ mifs.files += \
$$appResourceDir(demos/qmediaplayer/qmediaplayer.mif)
}
contains(QT_CONFIG, multimedia) {
- executables.sources += $$QT_BUILD_TREE/demos/spectrum/app/spectrum.exe
- executables.sources += $$QT_BUILD_TREE/demos/spectrum/3rdparty/fftreal/fftreal.dll
- resource.sources += $$appResourceDir(demos/spectrum/app/spectrum.rsc)
- mifs.sources += \
+ executables.files += $$QT_BUILD_TREE/demos/spectrum/app/spectrum.exe
+ executables.files += $$QT_BUILD_TREE/demos/spectrum/3rdparty/fftreal/fftreal.dll
+ resource.files += $$appResourceDir(demos/spectrum/app/spectrum.rsc)
+ mifs.files += \
$$appResourceDir(demos/spectrum/app/spectrum.mif)
}
contains(QT_CONFIG, script) {
- executables.sources += $$QT_BUILD_TREE/examples/script/context2d/context2d.exe
- reg_resource.sources += $$regResourceDir(examples/script/context2d/context2d_reg.rsc)
- resource.sources += $$appResourceDir(examples/script/context2d/context2d.rsc)
- mifs.sources += \
+ executables.files += $$QT_BUILD_TREE/examples/script/context2d/context2d.exe
+ reg_resource.files += $$regResourceDir(examples/script/context2d/context2d_reg.rsc)
+ resource.files += $$appResourceDir(examples/script/context2d/context2d.rsc)
+ mifs.files += \
$$appResourceDir(examples/script/context2d/context2d.mif)
}
qmldemos = qmlcalculator qmlclocks qmldialcontrol qmleasing qmlflickr qmlphotoviewer qmltwitter
contains(QT_CONFIG, declarative) {
for(qmldemo, qmldemos) {
- executables.sources += $$QT_BUILD_TREE/demos/embedded/$${qmldemo}/$${qmldemo}.exe
- reg_resource.sources += $$regResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}_reg.rsc)
- resource.sources += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.rsc)
- mifs.sources += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.mif)
+ executables.files += $$QT_BUILD_TREE/demos/embedded/$${qmldemo}/$${qmldemo}.exe
+ reg_resource.files += $$regResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}_reg.rsc)
+ resource.files += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.rsc)
+ mifs.files += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.mif)
}
}
- files.sources = $$PWD/screenshots $$PWD/slides
+ files.files = $$PWD/screenshots $$PWD/slides
files.path = .
- config.sources = $$PWD/config_s60/config.xml
+ config.files = $$PWD/config_s60/config.xml
config.path = .
- viewerimages.sources = $$PWD/../embeddedsvgviewer/shapes.svg
+ viewerimages.files = $$PWD/../embeddedsvgviewer/shapes.svg
viewerimages.path = /data/images/qt/demos/embeddedsvgviewer
# demos/mediaplayer make also use of these files.
- desktopservices_music.sources = \
+ desktopservices_music.files = \
$$PWD/../desktopservices/data/*.mp3 \
$$PWD/../desktopservices/data/*.wav
desktopservices_music.path = /data/sounds
- desktopservices_images.sources = $$PWD/../desktopservices/data/*.png
+ desktopservices_images.files = $$PWD/../desktopservices/data/*.png
desktopservices_images.path = /data/images
- saxbookmarks.sources = $$PWD/../../../examples/xml/saxbookmarks/frank.xbel
- saxbookmarks.sources += $$PWD/../../../examples/xml/saxbookmarks/jennifer.xbel
+ saxbookmarks.files = $$PWD/../../../examples/xml/saxbookmarks/frank.xbel
+ saxbookmarks.files += $$PWD/../../../examples/xml/saxbookmarks/jennifer.xbel
saxbookmarks.path = /data/qt/saxbookmarks
- fluidbackup.sources = backup_registration.xml
+ fluidbackup.files = backup_registration.xml
fluidbackup.path = /private/$$replace(TARGET.UID3, 0x,)
DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \
diff --git a/demos/embedded/qmlcalculator/deployment.pri b/demos/embedded/qmlcalculator/deployment.pri
index a31303d7b0..a97498e91f 100644
--- a/demos/embedded/qmlcalculator/deployment.pri
+++ b/demos/embedded/qmlcalculator/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmlcalculator_uid3 = A000E3FB
qmlcalculator_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlcalculator_uid3
}
-qmlcalculator_files.sources = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core
+qmlcalculator_files.files = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core
DEPLOYMENT += qmlcalculator_files
diff --git a/demos/embedded/qmlclocks/deployment.pri b/demos/embedded/qmlclocks/deployment.pri
index 09467330fb..6c6704ccc7 100644
--- a/demos/embedded/qmlclocks/deployment.pri
+++ b/demos/embedded/qmlclocks/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmlclocks_uid3 = A000E3FC
qmlclocks_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlclocks_uid3
}
-qmlclocks_files.sources = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content
+qmlclocks_files.files = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content
DEPLOYMENT += qmlclocks_files
diff --git a/demos/embedded/qmldialcontrol/deployment.pri b/demos/embedded/qmldialcontrol/deployment.pri
index e0e72e6789..a9784439a4 100644
--- a/demos/embedded/qmldialcontrol/deployment.pri
+++ b/demos/embedded/qmldialcontrol/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmldialcontrol_uid3 = A000E3FD
qmldialcontrol_files.path = $$APP_PRIVATE_DIR_BASE/$$qmldialcontrol_uid3
}
-qmldialcontrol_files.sources = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content
+qmldialcontrol_files.files = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content
DEPLOYMENT += qmldialcontrol_files
diff --git a/demos/embedded/qmleasing/deployment.pri b/demos/embedded/qmleasing/deployment.pri
index d3621cb75d..946fcd9d89 100644
--- a/demos/embedded/qmleasing/deployment.pri
+++ b/demos/embedded/qmleasing/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmleasing_uid3 = A000E3FE
qmleasing_files.path = $$APP_PRIVATE_DIR_BASE/$$qmleasing_uid3
}
-qmleasing_files.sources = $$qmleasing_src/easing.qml $$qmleasing_src/content
+qmleasing_files.files = $$qmleasing_src/easing.qml $$qmleasing_src/content
DEPLOYMENT += qmleasing_files
diff --git a/demos/embedded/qmlflickr/deployment.pri b/demos/embedded/qmlflickr/deployment.pri
index b5082921d7..a38dc95f8c 100644
--- a/demos/embedded/qmlflickr/deployment.pri
+++ b/demos/embedded/qmlflickr/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmlflickr_uid3 = A000E3FF
qmlflickr_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlflickr_uid3
}
-qmlflickr_files.sources = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile
+qmlflickr_files.files = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile
DEPLOYMENT += qmlflickr_files
diff --git a/demos/embedded/qmlphotoviewer/deployment.pri b/demos/embedded/qmlphotoviewer/deployment.pri
index 35937a8cbe..23882e3686 100644
--- a/demos/embedded/qmlphotoviewer/deployment.pri
+++ b/demos/embedded/qmlphotoviewer/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmlphotoviewer_uid3 = A000E400
qmlphotoviewer_files.path = $$APP_PRIVATE_DIR_BASE/$$qmlphotoviewer_uid3
}
-qmlphotoviewer_files.sources = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore
+qmlphotoviewer_files.files = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore
DEPLOYMENT += qmlphotoviewer_files
diff --git a/demos/embedded/qmltwitter/deployment.pri b/demos/embedded/qmltwitter/deployment.pri
index 4404e33531..3edc0e527c 100644
--- a/demos/embedded/qmltwitter/deployment.pri
+++ b/demos/embedded/qmltwitter/deployment.pri
@@ -4,5 +4,5 @@ symbian {
qmltwitter_uid3 = A000E401
qmltwitter_files.path = $$APP_PRIVATE_DIR_BASE/$$qmltwitter_uid3
}
-qmltwitter_files.sources = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore
+qmltwitter_files.files = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore
DEPLOYMENT += qmltwitter_files
diff --git a/demos/embeddeddialogs/customproxy.cpp b/demos/embeddeddialogs/customproxy.cpp
index bd56f5a2ca..a715f5ed17 100644
--- a/demos/embeddeddialogs/customproxy.cpp
+++ b/demos/embeddeddialogs/customproxy.cpp
@@ -113,7 +113,7 @@ QVariant CustomProxy::itemChange(GraphicsItemChange change, const QVariant &valu
{
if (change == ItemChildAddedChange || change == ItemChildRemovedChange) {
if (change == ItemChildAddedChange) {
- currentPopup = qVariantValue<QGraphicsItem *>(value);
+ currentPopup = qvariant_cast<QGraphicsItem *>(value);
currentPopup->setCacheMode(ItemCoordinateCache);
if (scene())
currentPopup->installSceneEventFilter(this);
diff --git a/demos/gradients/main.cpp b/demos/gradients/main.cpp
index 8291e8561d..6678fa24d7 100644
--- a/demos/gradients/main.cpp
+++ b/demos/gradients/main.cpp
@@ -52,7 +52,7 @@ int main(int argc, char **argv)
GradientWidget gradientWidget(0);
QStyle *arthurStyle = new ArthurStyle();
gradientWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = qFindChildren<QWidget *>(&gradientWidget);
+ QList<QWidget *> widgets = gradientWidget.findChildren<QWidget *>();
foreach (QWidget *w, widgets) {
w->setStyle(arthurStyle);
w->setAttribute(Qt::WA_AcceptTouchEvents);
diff --git a/demos/interview/model.cpp b/demos/interview/model.cpp
index 840bc605df..88f200dd2e 100644
--- a/demos/interview/model.cpp
+++ b/demos/interview/model.cpp
@@ -109,7 +109,7 @@ QVariant Model::headerData(int section, Qt::Orientation orientation, int role) c
if (role == Qt::DisplayRole)
return QString::number(section);
if (role == Qt::DecorationRole)
- return qVariantFromValue(services);
+ return QVariant::fromValue(services);
return QAbstractItemModel::headerData(section, orientation, role);
}
diff --git a/demos/mainwindow/colorswatch.cpp b/demos/mainwindow/colorswatch.cpp
index aab4f0300d..d4dbdcabf7 100644
--- a/demos/mainwindow/colorswatch.cpp
+++ b/demos/mainwindow/colorswatch.cpp
@@ -454,7 +454,7 @@ void ColorSwatch::updateContextMenu()
tabMenu->clear();
splitHMenu->clear();
splitVMenu->clear();
- QList<ColorSwatch*> dock_list = qFindChildren<ColorSwatch*>(mainWindow);
+ QList<ColorSwatch*> dock_list = mainWindow->findChildren<ColorSwatch*>();
foreach (ColorSwatch *dock, dock_list) {
// if (!dock->isVisible() || dock->isFloating())
// continue;
@@ -467,7 +467,7 @@ void ColorSwatch::updateContextMenu()
void ColorSwatch::splitInto(QAction *action)
{
QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
- QList<ColorSwatch*> dock_list = qFindChildren<ColorSwatch*>(mainWindow);
+ QList<ColorSwatch*> dock_list = mainWindow->findChildren<ColorSwatch*>();
ColorSwatch *target = 0;
foreach (ColorSwatch *dock, dock_list) {
if (action->text() == dock->objectName()) {
@@ -486,7 +486,7 @@ void ColorSwatch::splitInto(QAction *action)
void ColorSwatch::tabInto(QAction *action)
{
QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
- QList<ColorSwatch*> dock_list = qFindChildren<ColorSwatch*>(mainWindow);
+ QList<ColorSwatch*> dock_list = mainWindow->findChildren<ColorSwatch*>();
ColorSwatch *target = 0;
foreach (ColorSwatch *dock, dock_list) {
if (action->text() == dock->objectName()) {
diff --git a/demos/mainwindow/toolbar.cpp b/demos/mainwindow/toolbar.cpp
index dd12419848..a988d85c16 100644
--- a/demos/mainwindow/toolbar.cpp
+++ b/demos/mainwindow/toolbar.cpp
@@ -232,7 +232,7 @@ void ToolBar::updateMenu()
void ToolBar::order()
{
QList<QAction *> ordered, actions1 = actions(),
- actions2 = qFindChildren<QAction *>(this);
+ actions2 = findChildren<QAction *>();
while (!actions2.isEmpty()) {
QAction *action = actions2.takeFirst();
if (!actions1.contains(action))
diff --git a/demos/pathstroke/main.cpp b/demos/pathstroke/main.cpp
index 534b233f99..b10b2ea31a 100644
--- a/demos/pathstroke/main.cpp
+++ b/demos/pathstroke/main.cpp
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
PathStrokeWidget pathStrokeWidget(smallScreen);
QStyle *arthurStyle = new ArthurStyle();
pathStrokeWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = qFindChildren<QWidget *>(&pathStrokeWidget);
+ QList<QWidget *> widgets = pathStrokeWidget.findChildren<QWidget *>();
foreach (QWidget *w, widgets) {
w->setStyle(arthurStyle);
w->setAttribute(Qt::WA_AcceptTouchEvents);
diff --git a/demos/pathstroke/pathstroke.cpp b/demos/pathstroke/pathstroke.cpp
index 257d02a7c0..308c54028e 100644
--- a/demos/pathstroke/pathstroke.cpp
+++ b/demos/pathstroke/pathstroke.cpp
@@ -382,7 +382,7 @@ void PathStrokeWidget::setStyle( QStyle * style )
{
m_controls->setStyle(style);
- QList<QWidget *> widgets = qFindChildren<QWidget *>(m_controls);
+ QList<QWidget *> widgets = m_controls->findChildren<QWidget *>();
foreach (QWidget *w, widgets)
w->setStyle(style);
}
diff --git a/demos/qmediaplayer/qmediaplayer.pro b/demos/qmediaplayer/qmediaplayer.pro
index 9407a81ff1..8803d2ec79 100644
--- a/demos/qmediaplayer/qmediaplayer.pro
+++ b/demos/qmediaplayer/qmediaplayer.pro
@@ -27,7 +27,7 @@ DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
symbian {
TARGET.UID3 = 0xA000C613
- addFiles.sources = ../embedded/desktopservices/data/sax.mp3
+ addFiles.files = ../embedded/desktopservices/data/sax.mp3
addFiles.path = /data/sounds/
DEPLOYMENT += addFiles
diff --git a/demos/shared/arthurstyle.cpp b/demos/shared/arthurstyle.cpp
index 4be90795bc..3a2a2cb875 100644
--- a/demos/shared/arthurstyle.cpp
+++ b/demos/shared/arthurstyle.cpp
@@ -394,7 +394,7 @@ int ArthurStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const QWid
void ArthurStyle::polish(QWidget *widget)
{
if (widget->layout() && qobject_cast<QGroupBox *>(widget)) {
- if (qFindChildren<QGroupBox *>(widget).size() == 0) {
+ if (widget->findChildren<QGroupBox *>().size() == 0) {
widget->layout()->setSpacing(0);
widget->layout()->setMargin(12);
} else {
diff --git a/demos/shared/arthurwidgets.cpp b/demos/shared/arthurwidgets.cpp
index 4182ff114a..2eaf96b81c 100644
--- a/demos/shared/arthurwidgets.cpp
+++ b/demos/shared/arthurwidgets.cpp
@@ -313,7 +313,7 @@ void ArthurFrame::loadSourceFile(const QString &sourceFile)
void ArthurFrame::showSource()
{
// Check for existing source
- if (qFindChild<QTextBrowser *>(this))
+ if (findChild<QTextBrowser *>())
return;
QString contents;
diff --git a/demos/spectrum/app/app.pro b/demos/spectrum/app/app.pro
index b3ff2276ce..a75b41af60 100644
--- a/demos/spectrum/app/app.pro
+++ b/demos/spectrum/app/app.pro
@@ -86,7 +86,7 @@ symbian {
!contains(DEFINES, DISABLE_FFT) {
# Include FFTReal DLL in the SIS file
- fftreal.sources = ../fftreal.dll
+ fftreal.files = ../fftreal.dll
fftreal.path = !:/sys/bin
DEPLOYMENT += fftreal
}
diff --git a/demos/spectrum/app/settingsdialog.cpp b/demos/spectrum/app/settingsdialog.cpp
index b5e8459b20..1f125c91d8 100644
--- a/demos/spectrum/app/settingsdialog.cpp
+++ b/demos/spectrum/app/settingsdialog.cpp
@@ -65,13 +65,13 @@ SettingsDialog::SettingsDialog(
QAudioDeviceInfo device;
foreach (device, availableInputDevices)
m_inputDeviceComboBox->addItem(device.deviceName(),
- qVariantFromValue(device));
+ QVariant::fromValue(device));
foreach (device, availableOutputDevices)
m_outputDeviceComboBox->addItem(device.deviceName(),
- qVariantFromValue(device));
+ QVariant::fromValue(device));
- m_windowFunctionComboBox->addItem(tr("None"), qVariantFromValue(int(NoWindow)));
- m_windowFunctionComboBox->addItem("Hann", qVariantFromValue(int(HannWindow)));
+ m_windowFunctionComboBox->addItem(tr("None"), QVariant::fromValue(int(NoWindow)));
+ m_windowFunctionComboBox->addItem("Hann", QVariant::fromValue(int(HannWindow)));
m_windowFunctionComboBox->setCurrentIndex(m_windowFunction);
// Initialize default devices
diff --git a/demos/spreadsheet/spreadsheetitem.cpp b/demos/spreadsheet/spreadsheetitem.cpp
index e1f014362c..93c82a0d1f 100644
--- a/demos/spreadsheet/spreadsheetitem.cpp
+++ b/demos/spreadsheet/spreadsheetitem.cpp
@@ -72,10 +72,10 @@ QVariant SpreadSheetItem::data(int role) const
if (role == Qt::TextColorRole) {
if (!isNumber)
- return qVariantFromValue(QColor(Qt::black));
+ return QVariant::fromValue(QColor(Qt::black));
else if (number < 0)
- return qVariantFromValue(QColor(Qt::red));
- return qVariantFromValue(QColor(Qt::blue));
+ return QVariant::fromValue(QColor(Qt::red));
+ return QVariant::fromValue(QColor(Qt::blue));
}
if (role == Qt::TextAlignmentRole)