Commit 77dbd6a8 authored by camilo higuita's avatar camilo higuita

quick fixes

parent 0d16810e
......@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
Linker linker;
context->setContextProperty("linker", &linker);
qmlRegisterUncreatableType<Booklet>("Booklet", 1, 0 , "Booklet", "Booklet is instanciated by Books");
qmlRegisterType<Booklet>();
qmlRegisterType<Notes>("Notes", 1, 0, "Notes");
qmlRegisterType<Books>("Books", 1, 0, "Books");
qmlRegisterType<Links>("Links", 1, 0, "Links");
......
......@@ -175,7 +175,7 @@ Maui.ApplicationWindow
onBookSaved:
{
if(title && title.length)
booksView.list.insert({title: title})
booksView.list.insert({title: title, count: 0})
}
}
......
......@@ -20,7 +20,7 @@ class Books : public MauiList
Q_PROPERTY(SORTBY sortBy READ getSortBy WRITE setSortBy NOTIFY sortByChanged)
Q_PROPERTY(ORDER order READ getOrder WRITE setOrder NOTIFY orderChanged)
Q_PROPERTY(Booklet *booklet READ getBooklet NOTIFY bookletChanged)
Q_PROPERTY(Booklet *booklet READ getBooklet NOTIFY bookletChanged CONSTANT FINAL)
Q_PROPERTY(int currentBook READ getCurrentBook WRITE setCurrentBook NOTIFY currentBookChanged)
......
......@@ -511,7 +511,8 @@ const FMH::MODEL_LIST Syncer::collectAllNotes()
const FMH::MODEL_LIST Syncer::collectAllBooks()
{
return this->db->getDBData("select b.*, count(distinct bl.id) as count from books b inner join booklets bl on bl.book = b.id");
// return this->db->getDBData("select b.*, count(distinct bl.id) as count from books b inner join booklets bl on bl.book = b.id");
return this->db->getDBData("select * from books");
}
const QUrl Syncer::saveNoteFile(const QString &dir, const FMH::MODEL &data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment