From feda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 27 Jul 2018 23:51:12 -0400 Subject: New upstream version 3.2.1+dfsg1 --- Plugins/DbAndroid/DbAndroid.pro | 4 +- Plugins/DbAndroid/DbAndroid_de.ts | 43 ++-- Plugins/DbAndroid/DbAndroid_es.ts | 43 ++-- Plugins/DbAndroid/DbAndroid_fr.ts | 43 ++-- Plugins/DbAndroid/DbAndroid_it.ts | 43 ++-- Plugins/DbAndroid/DbAndroid_pl.qm | Bin 12615 -> 13141 bytes Plugins/DbAndroid/DbAndroid_pl.ts | 45 ++-- Plugins/DbAndroid/DbAndroid_pt_BR.ts | 43 ++-- Plugins/DbAndroid/DbAndroid_ro_RO.qm | Bin 0 -> 30 bytes Plugins/DbAndroid/DbAndroid_ro_RO.ts | 347 ++++++++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_ru.ts | 43 ++-- Plugins/DbAndroid/DbAndroid_sk.ts | 43 ++-- Plugins/DbAndroid/DbAndroid_zh_CN.ts | 43 ++-- Plugins/DbAndroid/adbmanager.cpp | 8 +- Plugins/DbAndroid/dbandroid.h | 2 +- Plugins/DbAndroid/dbandroid.json | 2 +- Plugins/DbAndroid/dbandroidinstance.cpp | 15 ++ Plugins/DbAndroid/dbandroidinstance.h | 2 + Plugins/DbAndroid/dbandroidpathdialog.cpp | 38 +--- Plugins/DbAndroid/dbandroidpathdialog.h | 6 +- Plugins/DbAndroid/package.xml | 10 + 21 files changed, 615 insertions(+), 208 deletions(-) create mode 100644 Plugins/DbAndroid/DbAndroid_ro_RO.qm create mode 100644 Plugins/DbAndroid/DbAndroid_ro_RO.ts create mode 100644 Plugins/DbAndroid/package.xml (limited to 'Plugins/DbAndroid') diff --git a/Plugins/DbAndroid/DbAndroid.pro b/Plugins/DbAndroid/DbAndroid.pro index 8c5359c..49f12e5 100644 --- a/Plugins/DbAndroid/DbAndroid.pro +++ b/Plugins/DbAndroid/DbAndroid.pro @@ -52,7 +52,8 @@ FORMS += \ RESOURCES += \ dbandroid.qrc -TRANSLATIONS += DbAndroid_de.ts \ +TRANSLATIONS += DbAndroid_ro_RO.ts \ + DbAndroid_de.ts \ \ DbAndroid_it.ts\ DbAndroid_zh_CN.ts\ @@ -65,3 +66,4 @@ TRANSLATIONS += DbAndroid_de.ts \ + diff --git a/Plugins/DbAndroid/DbAndroid_de.ts b/Plugins/DbAndroid/DbAndroid_de.ts index 8ec593f..860252b 100644 --- a/Plugins/DbAndroid/DbAndroid_de.ts +++ b/Plugins/DbAndroid/DbAndroid_de.ts @@ -73,7 +73,12 @@ Would you like to select another one, or leave it unconfigured? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + + + + Connection with Android database '%1' lost. @@ -205,83 +210,83 @@ Would you like to select another one, or leave it unconfigured? - + Enter valid IP address. - + Pick Android device. - + Pick Android database. - + Selected Android application is unknown, or not debuggable. - + Create new database - + Please provide name for the new database. It's the name which Android application will use to connect to the database: - - - + + + Invalid name - + Database with the same name (%1) already exists on the device. The name must be unique. - + Could not create database '%1', because could not connect to the device. - + Could not create database '%1'. Details: %2 - + Delete database - + Are you sure you want to delete database '%1' from %2? - - + + Error deleting - + Could not connect to %1 in order to delete database '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. diff --git a/Plugins/DbAndroid/DbAndroid_es.ts b/Plugins/DbAndroid/DbAndroid_es.ts index 1ec017b..a8f76aa 100644 --- a/Plugins/DbAndroid/DbAndroid_es.ts +++ b/Plugins/DbAndroid/DbAndroid_es.ts @@ -73,7 +73,12 @@ Would you like to select another one, or leave it unconfigured? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + + + + Connection with Android database '%1' lost. @@ -205,83 +210,83 @@ Would you like to select another one, or leave it unconfigured? - + Enter valid IP address. - + Pick Android device. - + Pick Android database. - + Selected Android application is unknown, or not debuggable. - + Create new database - + Please provide name for the new database. It's the name which Android application will use to connect to the database: - - - + + + Invalid name - + Database with the same name (%1) already exists on the device. The name must be unique. - + Could not create database '%1', because could not connect to the device. - + Could not create database '%1'. Details: %2 - + Delete database - + Are you sure you want to delete database '%1' from %2? - - + + Error deleting - + Could not connect to %1 in order to delete database '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. diff --git a/Plugins/DbAndroid/DbAndroid_fr.ts b/Plugins/DbAndroid/DbAndroid_fr.ts index 80bc68a..fa56f0a 100644 --- a/Plugins/DbAndroid/DbAndroid_fr.ts +++ b/Plugins/DbAndroid/DbAndroid_fr.ts @@ -73,7 +73,12 @@ Would you like to select another one, or leave it unconfigured? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + + + + Connection with Android database '%1' lost. @@ -205,83 +210,83 @@ Would you like to select another one, or leave it unconfigured? - + Enter valid IP address. - + Pick Android device. - + Pick Android database. - + Selected Android application is unknown, or not debuggable. - + Create new database - + Please provide name for the new database. It's the name which Android application will use to connect to the database: - - - + + + Invalid name - + Database with the same name (%1) already exists on the device. The name must be unique. - + Could not create database '%1', because could not connect to the device. - + Could not create database '%1'. Details: %2 - + Delete database - + Are you sure you want to delete database '%1' from %2? - - + + Error deleting - + Could not connect to %1 in order to delete database '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. diff --git a/Plugins/DbAndroid/DbAndroid_it.ts b/Plugins/DbAndroid/DbAndroid_it.ts index 2096f33..3ce9c38 100644 --- a/Plugins/DbAndroid/DbAndroid_it.ts +++ b/Plugins/DbAndroid/DbAndroid_it.ts @@ -73,7 +73,12 @@ Would you like to select another one, or leave it unconfigured? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + + + + Connection with Android database '%1' lost. @@ -205,83 +210,83 @@ Would you like to select another one, or leave it unconfigured? - + Enter valid IP address. - + Pick Android device. - + Pick Android database. - + Selected Android application is unknown, or not debuggable. - + Create new database - + Please provide name for the new database. It's the name which Android application will use to connect to the database: - - - + + + Invalid name - + Database with the same name (%1) already exists on the device. The name must be unique. - + Could not create database '%1', because could not connect to the device. - + Could not create database '%1'. Details: %2 - + Delete database - + Are you sure you want to delete database '%1' from %2? - - + + Error deleting - + Could not connect to %1 in order to delete database '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. diff --git a/Plugins/DbAndroid/DbAndroid_pl.qm b/Plugins/DbAndroid/DbAndroid_pl.qm index 96c4b9a..2b74cd4 100644 Binary files a/Plugins/DbAndroid/DbAndroid_pl.qm and b/Plugins/DbAndroid/DbAndroid_pl.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_pl.ts b/Plugins/DbAndroid/DbAndroid_pl.ts index 63b1d42..ab196a2 100644 --- a/Plugins/DbAndroid/DbAndroid_pl.ts +++ b/Plugins/DbAndroid/DbAndroid_pl.ts @@ -74,7 +74,12 @@ Chcesz wybrać inny, czy zostawić go nieskonfigurowanego? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + Sterownik SQLite Android nie obsługuje ładowalnych rozszerzeń. + + + Connection with Android database '%1' lost. Połączenie z bazą Androida '%1' utracone. @@ -104,7 +109,7 @@ Chcesz wybrać inny, czy zostawić go nieskonfigurowanego? Unable to execute query on Android device (connection was closed): %1 - + Nie udało się wykonać zapytania na urządzeniu Android (połączenie zostało zamknięte): %1 @@ -206,86 +211,86 @@ Chcesz wybrać inny, czy zostawić go nieskonfigurowanego? Usuń aktualnie wybraną bazę danych z urządzenia. Aktualnie wybrana baza to ta wybrana z listy po lewej stronie od tego przycisku. - + Enter valid IP address. Wprowadź poprawny adres IP. - + Pick Android device. Wybierz urządzenie Android. - + Pick Android database. Wybierz bazę danych Android. - + Selected Android application is unknown, or not debuggable. Wybierana aplikacja Android jest nieznana, lub niedebugowalna. - + Create new database Stwórz nową bazę - + Please provide name for the new database. It's the name which Android application will use to connect to the database: Proszę podać nazwę dla nowej bazy. Jest to nazwa, którą aplikacja Androida będzie używać przy łączeniu z bazą danych: - - - + + + Invalid name Niepoprawna nazwa - + Database with the same name (%1) already exists on the device. The name must be unique. Baza danych z taką samą nazwą (%1) już istnieje na urządzeniu. Nazwa musi być unikalna. - + Could not create database '%1', because could not connect to the device. Nie można stworzyć bazy danych '%1', ponieważ nie udało się połączyć z urządzeniem. - + Could not create database '%1'. Details: %2 Nie można stworzyć bazy danych: '%1'. Szczegóły: %2 - + Delete database Usuń bazę danych - + Are you sure you want to delete database '%1' from %2? Czy na pewno chcesz usunąć bazę danych '%1' z %2? - - + + Error deleting Błąd usuwania - + Could not connect to %1 in order to delete database '%2'. Nie można połączyć się z %1 w celu usunięcia bazy danych '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. Nie można usunąć bazy o nazwie '%1' z urządzenia. diff --git a/Plugins/DbAndroid/DbAndroid_pt_BR.ts b/Plugins/DbAndroid/DbAndroid_pt_BR.ts index 5c248c3..d876345 100644 --- a/Plugins/DbAndroid/DbAndroid_pt_BR.ts +++ b/Plugins/DbAndroid/DbAndroid_pt_BR.ts @@ -73,7 +73,12 @@ Would you like to select another one, or leave it unconfigured? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + + + + Connection with Android database '%1' lost. @@ -205,83 +210,83 @@ Would you like to select another one, or leave it unconfigured? - + Enter valid IP address. - + Pick Android device. - + Pick Android database. - + Selected Android application is unknown, or not debuggable. - + Create new database - + Please provide name for the new database. It's the name which Android application will use to connect to the database: - - - + + + Invalid name - + Database with the same name (%1) already exists on the device. The name must be unique. - + Could not create database '%1', because could not connect to the device. - + Could not create database '%1'. Details: %2 - + Delete database - + Are you sure you want to delete database '%1' from %2? - - + + Error deleting - + Could not connect to %1 in order to delete database '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. diff --git a/Plugins/DbAndroid/DbAndroid_ro_RO.qm b/Plugins/DbAndroid/DbAndroid_ro_RO.qm new file mode 100644 index 0000000..2856eb9 Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_ro_RO.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_ro_RO.ts b/Plugins/DbAndroid/DbAndroid_ro_RO.ts new file mode 100644 index 0000000..2150935 --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_ro_RO.ts @@ -0,0 +1,347 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Android SQLite driver does not support loadable extensions. + + + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Unable to execute query on Android device (connection was closed): %1 + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/DbAndroid_ru.ts b/Plugins/DbAndroid/DbAndroid_ru.ts index 115a72f..8f086e5 100644 --- a/Plugins/DbAndroid/DbAndroid_ru.ts +++ b/Plugins/DbAndroid/DbAndroid_ru.ts @@ -73,7 +73,12 @@ Would you like to select another one, or leave it unconfigured? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + + + + Connection with Android database '%1' lost. @@ -205,83 +210,83 @@ Would you like to select another one, or leave it unconfigured? - + Enter valid IP address. - + Pick Android device. - + Pick Android database. - + Selected Android application is unknown, or not debuggable. - + Create new database - + Please provide name for the new database. It's the name which Android application will use to connect to the database: - - - + + + Invalid name - + Database with the same name (%1) already exists on the device. The name must be unique. - + Could not create database '%1', because could not connect to the device. - + Could not create database '%1'. Details: %2 - + Delete database - + Are you sure you want to delete database '%1' from %2? - - + + Error deleting - + Could not connect to %1 in order to delete database '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. diff --git a/Plugins/DbAndroid/DbAndroid_sk.ts b/Plugins/DbAndroid/DbAndroid_sk.ts index 89b0604..b5f07d0 100644 --- a/Plugins/DbAndroid/DbAndroid_sk.ts +++ b/Plugins/DbAndroid/DbAndroid_sk.ts @@ -73,7 +73,12 @@ Would you like to select another one, or leave it unconfigured? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + + + + Connection with Android database '%1' lost. @@ -205,83 +210,83 @@ Would you like to select another one, or leave it unconfigured? - + Enter valid IP address. - + Pick Android device. - + Pick Android database. - + Selected Android application is unknown, or not debuggable. - + Create new database - + Please provide name for the new database. It's the name which Android application will use to connect to the database: - - - + + + Invalid name - + Database with the same name (%1) already exists on the device. The name must be unique. - + Could not create database '%1', because could not connect to the device. - + Could not create database '%1'. Details: %2 - + Delete database - + Are you sure you want to delete database '%1' from %2? - - + + Error deleting - + Could not connect to %1 in order to delete database '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. diff --git a/Plugins/DbAndroid/DbAndroid_zh_CN.ts b/Plugins/DbAndroid/DbAndroid_zh_CN.ts index fbe2aa8..56ecde4 100644 --- a/Plugins/DbAndroid/DbAndroid_zh_CN.ts +++ b/Plugins/DbAndroid/DbAndroid_zh_CN.ts @@ -73,7 +73,12 @@ Would you like to select another one, or leave it unconfigured? DbAndroidInstance - + + Android SQLite driver does not support loadable extensions. + + + + Connection with Android database '%1' lost. @@ -205,83 +210,83 @@ Would you like to select another one, or leave it unconfigured? - + Enter valid IP address. - + Pick Android device. - + Pick Android database. - + Selected Android application is unknown, or not debuggable. - + Create new database - + Please provide name for the new database. It's the name which Android application will use to connect to the database: - - - + + + Invalid name - + Database with the same name (%1) already exists on the device. The name must be unique. - + Could not create database '%1', because could not connect to the device. - + Could not create database '%1'. Details: %2 - + Delete database - + Are you sure you want to delete database '%1' from %2? - - + + Error deleting - + Could not connect to %1 in order to delete database '%2'. - + Could not delete database named '%1' from the device. Android device refused deletion, or it was impossible. diff --git a/Plugins/DbAndroid/adbmanager.cpp b/Plugins/DbAndroid/adbmanager.cpp index bbcf8fc..e182c72 100644 --- a/Plugins/DbAndroid/adbmanager.cpp +++ b/Plugins/DbAndroid/adbmanager.cpp @@ -148,7 +148,13 @@ QString AdbManager::findAdb() return "adb.exe"; static_qstring(winAdbPath, "/../Android/sdk/platform-tools/adb.exe"); - for (const QString& path : QStandardPaths::standardLocations(QStandardPaths::AppLocalDataLocation)) + for (const QString& path : QStandardPaths::standardLocations( +#if QT_VERSION >= 0x050400 + QStandardPaths::AppLocalDataLocation +#else + QStandardPaths::GenericDataLocation +#endif + )) { fullPath = QDir::cleanPath(path + winAdbPath); if (testAdb(fullPath, true)) diff --git a/Plugins/DbAndroid/dbandroid.h b/Plugins/DbAndroid/dbandroid.h index 20e9a67..eb4916f 100644 --- a/Plugins/DbAndroid/dbandroid.h +++ b/Plugins/DbAndroid/dbandroid.h @@ -49,7 +49,7 @@ class DBANDROIDSHARED_EXPORT DbAndroid : public GenericPlugin, public DbPlugin bool adbValid = false; QAction* jarAction = nullptr; - static_char* PLUGIN_MANUAL_URL = "http://wiki.sqlitestudio.pl/index.php/DbAndroid"; + static_char* PLUGIN_MANUAL_URL = "https://github.com/pawelsalawa/sqlitestudio/wiki/DbAndroid"; static_char* SELECT_ADB_URL = "select_adb://"; CFG_LOCAL_PERSISTABLE(DbAndroidConfig, cfg) diff --git a/Plugins/DbAndroid/dbandroid.json b/Plugins/DbAndroid/dbandroid.json index 9e36806..689316f 100644 --- a/Plugins/DbAndroid/dbandroid.json +++ b/Plugins/DbAndroid/dbandroid.json @@ -2,7 +2,7 @@ "type": "DbPlugin", "title": "Android SQLite", "description": "Provides support for remote SQLite databases on Android devices.", - "version": 10200, + "version": 10201, "author": "SalSoft", "minAppVersion": 30100, "gui": true, diff --git a/Plugins/DbAndroid/dbandroidinstance.cpp b/Plugins/DbAndroid/dbandroidinstance.cpp index b60203e..900b929 100644 --- a/Plugins/DbAndroid/dbandroidinstance.cpp +++ b/Plugins/DbAndroid/dbandroidinstance.cpp @@ -9,6 +9,7 @@ #include "dbandroidurl.h" #include "schemaresolver.h" #include "services/notifymanager.h" +#include "db/dbsqlite3.h" #include #include #include @@ -65,6 +66,20 @@ bool DbAndroidInstance::initAfterCreated() return AbstractDb::initAfterCreated(); } +bool DbAndroidInstance::loadExtension(const QString& filePath, const QString& initFunc) +{ + UNUSED(filePath); + UNUSED(initFunc); + errorCode = 1; + errorText = tr("Android SQLite driver does not support loadable extensions."); + return false; +} + +bool DbAndroidInstance::isComplete(const QString& sql) const +{ + return DbSqlite3::complete(sql); +} + bool DbAndroidInstance::isOpenInternal() { return (connection && connection->isConnected()); diff --git a/Plugins/DbAndroid/dbandroidinstance.h b/Plugins/DbAndroid/dbandroidinstance.h index 453b370..157caae 100644 --- a/Plugins/DbAndroid/dbandroidinstance.h +++ b/Plugins/DbAndroid/dbandroidinstance.h @@ -25,6 +25,8 @@ class DbAndroidInstance : public AbstractDb bool registerScalarFunction(const QString& name, int argCount); bool registerAggregateFunction(const QString& name, int argCount); bool initAfterCreated(); + bool loadExtension(const QString& filePath, const QString& initFunc); + bool isComplete(const QString& sql) const; protected: bool isOpenInternal(); diff --git a/Plugins/DbAndroid/dbandroidpathdialog.cpp b/Plugins/DbAndroid/dbandroidpathdialog.cpp index 10a6fb8..66a021b 100644 --- a/Plugins/DbAndroid/dbandroidpathdialog.cpp +++ b/Plugins/DbAndroid/dbandroidpathdialog.cpp @@ -8,13 +8,13 @@ #include "iconmanager.h" #include "dbandroidconnection.h" #include "dbandroidconnectionfactory.h" +#include "common/lazytrigger.h" +#include "common/userinputfilter.h" #include -#include #include #include #include #include -#include DbAndroidPathDialog::DbAndroidPathDialog(const DbAndroid* plugin, QWidget *parent) : QDialog(parent), @@ -57,15 +57,9 @@ void DbAndroidPathDialog::init() ui->createDatabaseButton->setIcon(ICONS.PLUS); ui->deleteDatabaseButton->setIcon(ICONS.DELETE); - dbListUpdateTimer = new QTimer(this); - dbListUpdateTimer->setSingleShot(true); - dbListUpdateTimer->setInterval(500); - connect(dbListUpdateTimer, SIGNAL(timeout()), this, SLOT(refreshDbList())); - appListUpdateTimer = new QTimer(this); - appListUpdateTimer->setSingleShot(true); - appListUpdateTimer->setInterval(500); - connect(appListUpdateTimer, SIGNAL(timeout()), this, SLOT(refreshAppList())); + dbListUpdateTrigger = new LazyTrigger(500, this, SLOT(refreshDbList())); + appListUpdateTrigger = new LazyTrigger(500, this, SLOT(refreshAppList())); connect(ui->deviceCombo, SIGNAL(currentTextChanged(QString)), this, SLOT(scheduleAppListUpdate())); connect(ui->databaseCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateState())); @@ -185,15 +179,8 @@ void DbAndroidPathDialog::scheduleDbListUpdate() if (suspendDbListUpdates) return; - bool startCover = true; - if (dbListUpdateTimer->isActive()) - { - dbListUpdateTimer->stop(); - startCover = false; - } - - dbListUpdateTimer->start(); - if (startCover) + dbListUpdateTrigger->schedule(); + if (!dbListCover->isVisible()) dbListCover->show(); handleDbCreationUpdate(false); @@ -208,15 +195,8 @@ void DbAndroidPathDialog::scheduleAppListUpdate() if (suspendAppListUpdates) return; - bool startCover = true; - if (appListUpdateTimer->isActive()) - { - appListUpdateTimer->stop(); - startCover = false; - } - - appListUpdateTimer->start(); - if (startCover) + appListUpdateTrigger->schedule(); + if (!appListCover->isVisible()) appListCover->show(); updateValidations(); @@ -373,7 +353,7 @@ void DbAndroidPathDialog::updateDeviceList() void DbAndroidPathDialog::updateValidations() { - bool isUpdating = dbListUpdateTimer->isActive(); + bool isUpdating = dbListCover->isVisible(); bool ipOk = true; bool deviceOk = true; if (ui->ipRadio->isChecked()) diff --git a/Plugins/DbAndroid/dbandroidpathdialog.h b/Plugins/DbAndroid/dbandroidpathdialog.h index 4c4496f..02fff3f 100644 --- a/Plugins/DbAndroid/dbandroidpathdialog.h +++ b/Plugins/DbAndroid/dbandroidpathdialog.h @@ -9,7 +9,7 @@ namespace Ui { } class DbAndroid; -class QTimer; +class LazyTrigger; class WidgetCover; class DbAndroidInstance; @@ -37,8 +37,8 @@ class DbAndroidPathDialog : public QDialog const DbAndroid* plugin = nullptr; DbAndroidUrl dbUrl; Ui::DbAndroidPathDialog *ui; - QTimer* dbListUpdateTimer = nullptr; - QTimer* appListUpdateTimer = nullptr; + LazyTrigger* dbListUpdateTrigger = nullptr; + LazyTrigger* appListUpdateTrigger = nullptr; WidgetCover* dbListCover = nullptr; WidgetCover* appListCover = nullptr; bool updatingDbList = false; diff --git a/Plugins/DbAndroid/package.xml b/Plugins/DbAndroid/package.xml new file mode 100644 index 0000000..32c4a32 --- /dev/null +++ b/Plugins/DbAndroid/package.xml @@ -0,0 +1,10 @@ + + + Android plugin + Plugin for accessing Android SQLite databases directly on the Android device from your computer. + %VERSION% + %DATE% + pl.com.salsoft.sqlitestudio.plugins.dbandroid + pl.com.salsoft.sqlitestudio.plugins + true + \ No newline at end of file -- cgit v1.2.3