diff options
Diffstat (limited to 'examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp')
-rw-r--r-- | examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp index b2984d3c2d..2247360017 100644 --- a/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp +++ b/examples/tutorials/gettingStartedQml/parts/part5/filedialog/directory.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -74,39 +74,39 @@ int Directory:: filesCount() const{ /* Function called to append data onto list property */ -void appendFiles(QDeclarativeListProperty<File> * property, File * file){ +void appendFiles(QQmlListProperty<File> * property, File * file){ //Do nothing. can't add to a directory using this method } /* Function called to retrieve file in the list using an index */ -File* fileAt(QDeclarativeListProperty<File> * property, int index){ +File* fileAt(QQmlListProperty<File> * property, int index){ return static_cast< QList<File *> *>(property->data)->at(index); } /* Returns the number of files in the list */ -int filesSize(QDeclarativeListProperty<File> * property){ +int filesSize(QQmlListProperty<File> * property){ return static_cast< QList<File *> *>(property->data)->size(); } /* Function called to empty the list property contents */ -void clearFilesPtr(QDeclarativeListProperty<File> *property){ +void clearFilesPtr(QQmlListProperty<File> *property){ return static_cast< QList<File *> *>(property->data)->clear(); } /* -Returns the list of files as a QDeclarativeListProperty. +Returns the list of files as a QQmlListProperty. */ -QDeclarativeListProperty<File> Directory::files(){ +QQmlListProperty<File> Directory::files(){ refresh(); -// return QDeclarativeListProperty<QString>(this,m_filePtrList); //not recommended in the docs - return QDeclarativeListProperty<File>( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); +// return QQmlListProperty<QString>(this,m_filePtrList); //not recommended in the docs + return QQmlListProperty<File>( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); } /* |