diff --git a/resources/desktop/com.github.rssguard.appdata.xml b/resources/desktop/com.github.rssguard.appdata.xml
index 96f497fa2..9e380de3b 100644
--- a/resources/desktop/com.github.rssguard.appdata.xml
+++ b/resources/desktop/com.github.rssguard.appdata.xml
@@ -30,7 +30,7 @@
https://martinrotter.github.io/donate/
-
+
none
diff --git a/resources/scripts/7za b/resources/scripts/7za
index 9c10723bf..47f412575 160000
--- a/resources/scripts/7za
+++ b/resources/scripts/7za
@@ -1 +1 @@
-Subproject commit 9c10723bfbaf6cb85107d6ee16e0324e9e487749
+Subproject commit 47f4125753452eff8800dbd6600c5a05540b15d9
diff --git a/resources/sql.qrc b/resources/sql.qrc
index a400fa231..377b29753 100755
--- a/resources/sql.qrc
+++ b/resources/sql.qrc
@@ -17,6 +17,7 @@
sql/db_update_mysql_14_15.sql
sql/db_update_mysql_15_16.sql
sql/db_update_mysql_16_17.sql
+ sql/db_update_mysql_17_18.sql
sql/db_init_sqlite.sql
sql/db_update_sqlite_1_2.sql
@@ -35,5 +36,6 @@
sql/db_update_sqlite_14_15.sql
sql/db_update_sqlite_15_16.sql
sql/db_update_sqlite_16_17.sql
+ sql/db_update_sqlite_17_18.sql
\ No newline at end of file
diff --git a/resources/sql/db_init_mysql.sql b/resources/sql/db_init_mysql.sql
index 8ee01bd49..59453e25c 100644
--- a/resources/sql/db_init_mysql.sql
+++ b/resources/sql/db_init_mysql.sql
@@ -12,11 +12,16 @@ CREATE TABLE IF NOT EXISTS Information (
inf_value TEXT NOT NULL
);
-- !
-INSERT INTO Information VALUES (1, 'schema_version', '17');
+INSERT INTO Information VALUES (1, 'schema_version', '18');
-- !
CREATE TABLE IF NOT EXISTS Accounts (
- id INTEGER PRIMARY KEY,
- type TEXT NOT NULL
+ id INTEGER AUTO_INCREMENT PRIMARY KEY,
+ type TEXT NOT NULL CHECK (type != ''),
+ proxy_type INTEGER NOT NULL DEFAULT 0 CHECK (proxy_type >= 0),
+ proxy_host TEXT,
+ proxy_port INTEGER,
+ proxy_username TEXT,
+ proxy_password TEXT
);
-- !
CREATE TABLE IF NOT EXISTS TtRssAccounts (
diff --git a/resources/sql/db_init_sqlite.sql b/resources/sql/db_init_sqlite.sql
index b9e283516..a2da66f58 100644
--- a/resources/sql/db_init_sqlite.sql
+++ b/resources/sql/db_init_sqlite.sql
@@ -6,11 +6,16 @@ CREATE TABLE IF NOT EXISTS Information (
inf_value TEXT NOT NULL
);
-- !
-INSERT INTO Information VALUES (1, 'schema_version', '17');
+INSERT INTO Information VALUES (1, 'schema_version', '18');
-- !
CREATE TABLE IF NOT EXISTS Accounts (
id INTEGER PRIMARY KEY,
- type TEXT NOT NULL
+ type TEXT NOT NULL CHECK (type != ''),
+ proxy_type INTEGER NOT NULL CHECK (proxy_type >= 0) DEFAULT 0,
+ proxy_host TEXT,
+ proxy_port INTEGER,
+ proxy_username TEXT,
+ proxy_password TEXT
);
-- !
CREATE TABLE IF NOT EXISTS TtRssAccounts (
diff --git a/resources/sql/db_update_mysql_17_18.sql b/resources/sql/db_update_mysql_17_18.sql
new file mode 100755
index 000000000..9c627fb93
--- /dev/null
+++ b/resources/sql/db_update_mysql_17_18.sql
@@ -0,0 +1,13 @@
+USE ##;
+-- !
+ALTER TABLE Accounts ADD COLUMN proxy_type INTEGER NOT NULL DEFAULT 0 CHECK (proxy_type >= 0);
+-- !
+ALTER TABLE Accounts ADD COLUMN proxy_host TEXT;
+-- !
+ALTER TABLE Accounts ADD COLUMN proxy_port INTEGER;
+-- !
+ALTER TABLE Accounts ADD COLUMN proxy_username TEXT;
+-- !
+ALTER TABLE Accounts ADD COLUMN proxy_password TEXT;
+-- !
+UPDATE Information SET inf_value = '18' WHERE inf_key = 'schema_version';
\ No newline at end of file
diff --git a/resources/sql/db_update_sqlite_17_18.sql b/resources/sql/db_update_sqlite_17_18.sql
new file mode 100755
index 000000000..8891c67e9
--- /dev/null
+++ b/resources/sql/db_update_sqlite_17_18.sql
@@ -0,0 +1,23 @@
+CREATE TABLE backup_acc AS SELECT * FROM Accounts;
+-- !
+PRAGMA foreign_keys = OFF;
+-- !
+DROP TABLE Accounts;
+-- !
+CREATE TABLE IF NOT EXISTS Accounts (
+ id INTEGER PRIMARY KEY,
+ type TEXT NOT NULL CHECK (type != ''),
+ proxy_type INTEGER NOT NULL CHECK (proxy_type >= 0) DEFAULT 0,
+ proxy_host TEXT,
+ proxy_port INTEGER,
+ proxy_username TEXT,
+ proxy_password TEXT
+);
+-- !
+INSERT INTO Accounts (id, type) SELECT id, type FROM backup_acc;
+-- !
+DROP TABLE backup_acc;
+-- !
+PRAGMA foreign_keys = ON;
+-- !
+UPDATE Information SET inf_value = '18' WHERE inf_key = 'schema_version';
\ No newline at end of file
diff --git a/src/librssguard/definitions/definitions.h b/src/librssguard/definitions/definitions.h
index a8190b82a..4b23c3604 100755
--- a/src/librssguard/definitions/definitions.h
+++ b/src/librssguard/definitions/definitions.h
@@ -144,7 +144,7 @@
#define APP_DB_SQLITE_FILE "database.db"
// Keep this in sync with schema versions declared in SQL initialization code.
-#define APP_DB_SCHEMA_VERSION "17"
+#define APP_DB_SCHEMA_VERSION "18"
#define APP_DB_UPDATE_FILE_PATTERN "db_update_%1_%2_%3.sql"
#define APP_DB_COMMENT_SPLIT "-- !\n"
#define APP_DB_NAME_PLACEHOLDER "##"
diff --git a/src/librssguard/miscellaneous/iconfactory.cpp b/src/librssguard/miscellaneous/iconfactory.cpp
index 094580627..a9065fb36 100755
--- a/src/librssguard/miscellaneous/iconfactory.cpp
+++ b/src/librssguard/miscellaneous/iconfactory.cpp
@@ -77,10 +77,10 @@ void IconFactory::loadCurrentIconTheme() {
}
// Display list of installed themes.
- qDebugNN << LOGSEC_GUI << "Installed icon themes are: %s.",
- qPrintable(QStringList(installed_themes)
- .replaceInStrings(QRegularExpression(QSL("^|$")), QSL("\'"))
- .replaceInStrings(QRegularExpression(QSL("^\\'$")), QSL("\'\'")).join(QSL(", ")));
+ qDebugNN << LOGSEC_GUI << "Installed icon themes are: "
+ << QStringList(installed_themes)
+ .replaceInStrings(QRegularExpression(QSL("^|$")), QSL("\'"))
+ .replaceInStrings(QRegularExpression(QSL("^\\'$")), QSL("\'\'")).join(QSL(", "));
if (installed_themes.contains(theme_name_from_settings)) {
// Desired icon theme is installed and can be loaded.
diff --git a/src/librssguard/services/abstract/gui/formaccountdetails.h b/src/librssguard/services/abstract/gui/formaccountdetails.h
index 13a90efb3..0d431abc7 100644
--- a/src/librssguard/services/abstract/gui/formaccountdetails.h
+++ b/src/librssguard/services/abstract/gui/formaccountdetails.h
@@ -76,7 +76,8 @@ inline bool FormAccountDetails::applyInternal() {
if (m_account == nullptr) {
m_account = new T();
m_account->setAccountId(DatabaseQueries::createBaseAccount(database, m_account->code()));
- m_account->setId(m_account->accountId());
+
+ //m_account->setId(m_account->accountId());
}
// NOTE: We edit account common attributes here directly.