mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-02-09 21:28:30 -06:00
dbhub: Add view of all checked out databases
The Remote dock shows a list of all databases on dbhub.io. Double clicking a database downloads and opens it. If the database has already been downloaded before, the local file is simply opened. This only works for a small number of databases: To open the database you want, you just search for it and double click it. But for a larger number of databases on dbhub.io this does not perform very well since finding a database can be very difficult. Because of this this commit adds a new view which shows all checked out databases, i.e. those databases which are already downloaded. Double clicking one of these opens it without trying to update it first. In the future this might also provide a place to add extra options like deleting local copies.
This commit is contained in:
@@ -50,6 +50,26 @@ public:
|
||||
const QString& commitMessage = QString(), const QString& licence = QString(), bool isPublic = false,
|
||||
const QString& branch = QString("master"), bool forcePush = false);
|
||||
|
||||
// This can be used to get a list of all locally checked out databases for a given identity.
|
||||
class LocalFileInfo
|
||||
{
|
||||
public:
|
||||
LocalFileInfo(const std::string& _name, const std::string& _url, const std::string& _commit_id, const std::string& _file, const std::string& _branch) :
|
||||
name(_name),
|
||||
url(_url),
|
||||
commit_id(_commit_id),
|
||||
file(_file),
|
||||
branch(_branch)
|
||||
{}
|
||||
|
||||
std::string name;
|
||||
std::string url;
|
||||
std::string commit_id;
|
||||
std::string file;
|
||||
std::string branch;
|
||||
};
|
||||
std::vector<LocalFileInfo> localGetLocalFiles(QString identity);
|
||||
|
||||
signals:
|
||||
// As soon as you can safely open a network connection, this signal is emitted. This can be used to delay early network requests
|
||||
// which might otherwise fail.
|
||||
|
||||
Reference in New Issue
Block a user