Skip to content

Commit f37324f

Browse files
committed
[mkcal] Rework ExtendedStorage to add an async implementation.
ExtendedStorage methods have been splitted between methods dealing with a proxy (the calendar for incidences and the notebook list) and methods working directly on the database. The latter have been moved into a new DirectStorageInterface class. The previous SqliteStorage::Private class has been moved out in separated sqlitestorage_p.{cpp,h} files. And a new AsyncSqliteStorage class has been created using the new SqliteStorageImpl from a worker thread. Exchange between the worker thread and the main thread are done via signals and are non blocking for all methods using a proxy. For direct methods, the call are blocking.
1 parent 7edcb18 commit f37324f

25 files changed

Lines changed: 5345 additions & 2942 deletions

rpm/mkcal-qt5.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ install -m 644 -p %{SOURCE1} %{buildroot}%{_datadir}/mapplauncherd/privileges.d/
7575

7676
%files tests
7777
%defattr(-,root,root,-)
78+
/opt/tests/mkcal/tst_async
7879
/opt/tests/mkcal/tst_load
7980
/opt/tests/mkcal/tst_perf
8081
/opt/tests/mkcal/tst_storage

src/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@ set(SRC
44
notebook.cpp
55
sqliteformat.cpp
66
sqlitestorage.cpp
7+
sqlitestorage_p.cpp
8+
asyncsqlitestorage.cpp
9+
timed.cpp
710
servicehandler.cpp
811
logging.cpp
912
semaphore_p.cpp)
1013
set(HEADERS
1114
extendedcalendar.h
1215
extendedstorage.h
1316
extendedstorageobserver.h
17+
directstorageinterface.h
1418
notebook.h
1519
sqliteformat.h
1620
sqlitestorage.h
21+
sqlitestorage_p.h
22+
asyncsqlitestorage.h
23+
timed.h
1724
servicehandlerif.h
1825
servicehandler.h
1926
dummystorage.h

0 commit comments

Comments
 (0)