How to copy or rename a unique instance

Asked by therapon sundoulos on 2019-02-25

I have several unique instances and find them very useful. Is it possible to copy a unique instance to a different name or rename an existing one? If so, how would I do it?

Thanks,
therapon

Question information

Language:
English Edit question
Status:
Solved
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Solved by:
therapon sundoulos
Solved:
2019-02-27
Last query:
2019-02-27
Last reply:

A little SQL magic once I found the database and I got what I needed.

A Session Manager like Konqueror has would be a nice additional feature.

Adam Reichold (adamreichold) said : #2

Hello therapon,

glad that you could help yourself. Just if anyone stumbles upon this in the future: An unique instance is currently nothing but a distinct value in the column "instanceName" of the "tabs_v5" database table that is part of qpdfview's database usually located at "~/.local/share/qpdfview/qpdfview/database". (The table is used to (re)store the opened tabs of any given qpdfview session, i.e. a unique instance is just a set of open tabs.)

So the query the instance, use for example "SELECT DISTINCT instanceName FROM tabs_v5;" whereas "UPDATE tabs_v5 SET instanceName='foo' WHERE instanceName='bar'" would rename instance "bar" into "foo".

Best regards,
Adam

Adam Reichold (adamreichold) said : #3

(Forgot, the database is an SQLite3 database, so one can for example access it using the sqlite3 command line utility or the sqlitebrowser GUI.)