ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #00149
Re: [Merge] lp:~mzanetti/reminders-app/fix-filter-init into lp:reminders-app
for
* fixes an issue where notebooks would be empty sometimes
(see inline explanation)
Diff comments:
> === modified file 'src/app/qml/ui/NotesPage.qml'
> --- src/app/qml/ui/NotesPage.qml 2015-02-23 11:31:34 +0000
> +++ src/app/qml/ui/NotesPage.qml 2015-02-25 23:19:24 +0000
> @@ -231,11 +231,11 @@
> }
> Label {
> anchors.centerIn: parent
> - visible: !notes.loading && (notes.error || notesListView.count == 0)
> + visible: !notes.loading && notesListView.count == 0
> width: parent.width - units.gu(4)
> wrapMode: Text.WordWrap
> horizontalAlignment: Text.AlignHCenter
> - text: notes.error ? notes.error : i18n.tr("No notes available. You can create new notes using the \"Add note\" button.")
> + text: i18n.tr("No notes available. You can create new notes using the \"Add note\" button.")
> }
>
> Scrollbar {
>
> === modified file 'src/libqtevernote/notes.cpp'
> --- src/libqtevernote/notes.cpp 2015-02-17 21:35:50 +0000
> +++ src/libqtevernote/notes.cpp 2015-02-25 23:19:24 +0000
> @@ -26,6 +26,7 @@
> Notes::Notes(QObject *parent) :
> QSortFilterProxyModel(parent),
> m_onlyReminders(false),
> + m_onlySearchResults(false),
This is initializing the variable when the Notes model is created. Without this, the variable is not initialized and will have a random value (depending on what the RAM had before in the location where it's created). This caused the bug that this variable sometimes starts being "true", and so hiding everything that's not a search result. Which then results in having an empty list when you open a notebook.
> m_showDeleted(false),
> m_sortOrder(SortOrderDateCreatedNewest)
> {
>
--
https://code.launchpad.net/~mzanetti/reminders-app/fix-filter-init/+merge/251017
Your team Ubuntu Reminders app developers is subscribed to branch lp:reminders-app.