diff options
| author | Anton <anton@picapica.im> | 2026-08-12 00:18:12 +0400 |
|---|---|---|
| committer | Anton <anton@picapica.im> | 2026-08-12 00:18:12 +0400 |
| commit | 0763c7de460da23923e62f0d8033bc6b8c2888a9 (patch) | |
| tree | 5b3825708e3c05d91fd2ef40f885e6d718e6e274 /pica-client/nodes.h | |
| parent | 5ae6a1ff696f70b8eb1eac042a2cc278d4e7ceed (diff) | |
| download | pica-pica-0763c7de460da23923e62f0d8033bc6b8c2888a9.tar.gz pica-pica-0763c7de460da23923e62f0d8033bc6b8c2888a9.zip | |
pica-client: changes for required for multithreaded DB access
Diffstat (limited to 'pica-client/nodes.h')
| -rw-r--r-- | pica-client/nodes.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pica-client/nodes.h b/pica-client/nodes.h index 63b09a8..2cd2c1e 100644 --- a/pica-client/nodes.h +++ b/pica-client/nodes.h @@ -31,7 +31,12 @@ public: quint16 port; }; - Nodes(QString storage); + // connectionName selects which QSqlDatabase connection to use (see + // QSqlDatabase::database()). A connection can only be used from the + // thread that created it, so callers running on a thread other than + // the GUI thread must pass the name of a connection opened on their + // own thread. Empty (the default) uses Qt's default connection. + Nodes(QString storage, QString connectionName = QString()); void Add(NodeRecord &n); void Delete(NodeRecord &n); QList<NodeRecord> GetNodes(); |
