Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Commit

Permalink
Fix clipboard and sortfiltermodel docs (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
cibersheep authored and UniversalSuperBox committed Jan 22, 2020
1 parent 93206fd commit c1a1ff8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/UbuntuToolkit/qquickclipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ UT_NAMESPACE_BEGIN
*
* The clipboard data cannot be modified through the type returned by the data
* property, for this a new instance of MimeData type must be used. This instance
* can be either a standalone MimeDala component or an object created using newData()
* can be either a standalone MimeData component or an object created using newData()
* function. Remember that standalone MimeData types duplicate the clipboard data
* which may cause extensive memory use.
*
Expand Down
40 changes: 21 additions & 19 deletions src/UbuntuToolkit/sortfiltermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ UT_NAMESPACE_BEGIN
*
* Example usage:
* \qml
* import QtQuick 2.4
* import Ubuntu.Components 1.2
* import Ubuntu.Components.ListItems 1.1
* import QtQuick 2.9
* import Ubuntu.Components 1.3
*
* MainView {
* width: units.gu(80)
Expand All @@ -52,7 +51,6 @@ UT_NAMESPACE_BEGIN
* }
* ListElement {
* title: "Elephants Dream"
* // lowercase b
* producer: "blender"
* }
* ListElement {
Expand All @@ -64,28 +62,32 @@ UT_NAMESPACE_BEGIN
* SortFilterModel {
* id: sortedMovies
* model: movies
* sort.property: "title"
* sort.order: Qt.DescendingOrder
* // case insensitive sorting
* sortCaseSensitivity: Qt.CaseInsensitive
*
* filter.property: "producer"
* // case insensitive matches
* filter.pattern: /blender/i
* sort {
* property: "title"
* order: Qt.DescendingOrder
* }
* filter {
* property: "producer"
* //Add i for case insensitive
* pattern: /Blender/i
* }
* }
*
* ListView {
* model: sortedMovies
* anchors.fill: parent
*
* delegate: Subtitled {
* text: title
* subText: producer
* delegate: ListItemLayout {
* title.text: model.title
* subtitle.text: model.producer
* }
*
* section.delegate: ListItem.Header { text: i18n.tr(section) }
* section.property: "title"
* section.criteria: ViewSection.FirstCharacter
* section {
* property: "title"
* criteria: ViewSection.FirstCharacter
* delegate: Text {
* text: i18n.tr(section)
* }
* }
* }
* }
* \endqml
Expand Down

0 comments on commit c1a1ff8

Please sign in to comment.