Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configured to use wrong location for contacts in SailFish 4.5.0.21 #52

Open
threepistons opened this issue Sep 26, 2023 · 4 comments
Open

Comments

@threepistons
Copy link

  • Given: reasonably recent installation of Sailfish 4.5.0.21 on Xperia 10 III, latest SailfishConnect from OpenRepos via Storeman, and KDE Connect as shipped with Debian Bookworm (sorry, I can't find an "About" dialog with a version number in it).
  • When I: use Fingerterm on the Xperia to launch SailfishConnect.
  • I get: messages about the contact database not being opened, see logs below.
  • I expect: the contact database to be opened successfully.

The contact database is at /home/defaultuser/.local/share/system/Contacts/qtcontacts-sqlite but SailfishConnect expects it at /home/nemo/.local/share/system/Contacts/qtcontacts-sqlite/contacts.db.

[defaultuser@Xperia10III ~]$ harbour-sailfishconnect 
   ____     _ ______     __   _____                       __
  / __/__ _(_) / _(_)__ / /  / ___/__  ___  ___  ___ ____/ /_
 _\ \/ _ `/ / / _/ (_-</ _ \/ /__/ _ \/ _ \/ _ \/ -_) __/ __/
/___/\_,_/_/_/_//_/___/_//_/\___/\___/_//_/_//_/\__/\__/\__/
 --- Version 0.6.2
[D] unknown:0 - Using Wayland-EGL
library "libutils.so" not found
library "libcutils.so" not found
library "libhardware.so" not found
library "android.hardware.graphics.mapper@2.0.so" not found
library "android.hardware.graphics.mapper@2.1.so" not found
library "android.hardware.graphics.mapper@3.0.so" not found
library "android.hardware.graphics.mapper@4.0.so" not found
library "libc++.so" not found
library "libhidlbase.so" not found
library "libgralloctypes.so" not found
library "android.hardware.graphics.common@1.2.so" not found
library "libion.so" not found
library "libz.so" not found
library "libhidlmemory.so" not found
library "android.hidl.memory@1.0.so" not found
library "vendor.qti.qspmhal@1.0.so" not found
[W] unknown:0 - DelegateModel::cancel: index out range 0 0
[I] unknown:0 - Using 0 MB of album art cache
[C] unknown:0 - Cannot open contacts database "/home/nemo/.local/share/system/Contacts/qtcontacts-sqlite/contacts.db" : "out of memory Error opening database"
[W] unknown:0 - QSqlQuery::exec: database not open
[C] unknown:0 - Getting modified timestamps failed: " "
[W] unknown:0 - discarding unsupported packet "kdeconnect.clipboard.connect" for "nuc"
[W] unknown:0 - QSqlQuery::exec: database not open
[C] unknown:0 - Getting modified timestamps failed: " "
[W] unknown:0 - discarding unsupported packet "kdeconnect.clipboard.connect" for "nuc"
[W] unknown:0 - discarding unsupported packet "kdeconnect.sms.request_conversations" for "nuc"
[W] unknown:0 - discarding unsupported packet "kdeconnect.sms.request_conversations" for "nuc"
@blizzz
Copy link

blizzz commented Sep 26, 2023

Seems to be hardcoded in

"/home/nemo/.local/share/system/Contacts/qtcontacts-sqlite/contacts.db");

@threepistons
Copy link
Author

https://stackoverflow.com/a/26696759 gives an idea of how set a string to be the logged-in user's $HOME. I don't speak C++, but if we were in Puppet, I'd use string interpolation or concatenation to accommodate the new multiple-user Sailfish.

// Magic to get a string called homedir
// I'm not sure that the `const char` in the Stack Overflow will concatenate with a string
// so I'm disinclined to paste that example code here.

static QString QTCONTACTS_SQLITE_STORE = QStringLiteral(
    homedir + "/.local/share/system/Contacts/qtcontacts-sqlite/contacts.db");
// https://cplusplus.com/reference/string/string/operator+/ says that + is the correct operator

@blizzz
Copy link

blizzz commented Sep 26, 2023

https://stackoverflow.com/a/26696759 gives an idea of how set a string to be the logged-in user's $HOME. I don't speak C++, but if we were in Puppet, I'd use string interpolation or concatenation to accommodate the new multiple-user Sailfish.

// Magic to get a string called homedir
// I'm not sure that the `const char` in the Stack Overflow will concatenate with a string
// so I'm disinclined to paste that example code here.

static QString QTCONTACTS_SQLITE_STORE = QStringLiteral(
    homedir + "/.local/share/system/Contacts/qtcontacts-sqlite/contacts.db");
// https://cplusplus.com/reference/string/string/operator+/ says that + is the correct operator

IIRC there are some standard paths provided by Qt already, QStandardPaths::HomeLocation or maybe QStandardPaths::GenericDataLocation as a shortcut.

@R1tschY
Copy link
Owner

R1tschY commented Sep 26, 2023

The contacts database is no longer used by Sailfish OS: https://forum.sailfishos.org/t/4-0-1-45-non-jailed-contacts-sqlite-database-no-longer-updated/4724
The whole contacts feature have to be rewritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants