Go to file
jordi fita mas 07705b012a Add a very ugly login page to test database connection
I want to perform all SQL queries in a thread, to avoid freezing the UI,
that sometimes might happen when there is a lot of data to fetch; should
not happen very often, though.

Neither libpq nor Qt SQL allow queries on the same connection from
differents threads, and, in Qt SQL, all queries must be performed from
the same thread where the connection was established.  In Qt5 i had to
either create a connection per thread, or use a QThread-derived object
to hold the connection and use signals and slots to pass query and
response data between the UI and database threads; it was usable but not
pretty.

With Qt6 and Concurrent’s QThreadPool now i can use QFutures instead,
that are not as cumbersome as with Qt5, because i no longer need
QFutureWatcher.  I still have the problem that all queries must be done
from within the same thread, and QThreadPool uses an arbitrary thread.
The solution is to create a “pool” with a single, non-expirable thread,
and call all Concurrent::run onto that pool.

I have to test it properly, and first need to open the database to test
whether that, at least, works. I added a simple “login page” for that,
and to make a first attempt to error messages; i use a control that is
like Kirigami’s InlineMessage for now, but i am not sure.

I also do not know how i will configure database’s connection details. I
usually make use of pg_service.conf, because then the application only
need to know its service name, but i am not sure whether other people
would find it as comfortable as i do.
2024-12-16 12:59:19 +01:00
cmd/camper Increase HTTP timeout 2024-03-05 12:05:00 +01:00
debian Include weasyprint as dependency of camper package 2024-04-28 21:47:44 +02:00
demo Add season dates for “next year” 2024-11-20 19:43:59 +01:00
deploy Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
pkg Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
po Fix French typo 2024-07-15 23:12:12 +02:00
revert Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
src Add a very ugly login page to test database connection 2024-12-16 12:59:19 +01:00
test Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
verify Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00
web Change “ACSI” to “ACSI / ANWB” 2024-05-13 10:40:21 +02:00
.gitignore Add skeleton for a QML application 2024-12-14 01:19:20 +01:00
CMakeLists.txt Add a very ugly login page to test database connection 2024-12-16 12:59:19 +01:00
Makefile Send an email on notification of success payment 2024-02-13 05:20:35 +01:00
go.mod Add customer and invoices sections 2024-04-28 20:28:45 +02:00
go.sum Add customer and invoices sections 2024-04-28 20:28:45 +02:00
guix.scm Add Guix package definition 2024-01-28 18:12:38 +01:00
sqitch.conf Add empty Sqitch configuration anq plan files 2023-07-20 23:43:23 +02:00
sqitch.plan Add operating_dates to campsite type table 2024-07-15 23:41:47 +02:00