mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-29 00:30:12 +01:00
fix many warnings, remove redundant SQL scripts, refactor some preprocessor constants
This commit is contained in:
parent
ee5de37805
commit
6dda15eb00
@ -1,7 +1,7 @@
|
||||
APP_NAME = "RSS Guard"
|
||||
APP_LOW_NAME = "rssguard"
|
||||
APP_REVERSE_NAME = "com.github.rssguard"
|
||||
APP_LOW_H_NAME = ".rssguard"
|
||||
APP_LOW_H_NAME = ".rssguard4"
|
||||
APP_AUTHOR = "Martin Rotter"
|
||||
APP_COPYRIGHT = "(C) 2011-2021 $$APP_AUTHOR"
|
||||
APP_VERSION = "4.0.0"
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 47f4125753452eff8800dbd6600c5a05540b15d9
|
||||
Subproject commit 9c10723bfbaf6cb85107d6ee16e0324e9e487749
|
@ -1,47 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>sql/db_init_mysql.sql</file>
|
||||
<file>sql/db_update_mysql_1_2.sql</file>
|
||||
<file>sql/db_update_mysql_2_3.sql</file>
|
||||
<file>sql/db_update_mysql_3_4.sql</file>
|
||||
<file>sql/db_update_mysql_4_5.sql</file>
|
||||
<file>sql/db_update_mysql_5_6.sql</file>
|
||||
<file>sql/db_update_mysql_6_7.sql</file>
|
||||
<file>sql/db_update_mysql_7_8.sql</file>
|
||||
<file>sql/db_update_mysql_8_9.sql</file>
|
||||
<file>sql/db_update_mysql_9_10.sql</file>
|
||||
<file>sql/db_update_mysql_10_11.sql</file>
|
||||
<file>sql/db_update_mysql_11_12.sql</file>
|
||||
<file>sql/db_update_mysql_12_13.sql</file>
|
||||
<file>sql/db_update_mysql_13_14.sql</file>
|
||||
<file>sql/db_update_mysql_14_15.sql</file>
|
||||
<file>sql/db_update_mysql_15_16.sql</file>
|
||||
<file>sql/db_update_mysql_16_17.sql</file>
|
||||
<file>sql/db_update_mysql_17_18.sql</file>
|
||||
<file>sql/db_update_mysql_18_19.sql</file>
|
||||
<file>sql/db_update_mysql_19_20.sql</file>
|
||||
<file>sql/db_update_mysql_20_21.sql</file>
|
||||
|
||||
<file>sql/db_init_sqlite.sql</file>
|
||||
<file>sql/db_update_sqlite_1_2.sql</file>
|
||||
<file>sql/db_update_sqlite_2_3.sql</file>
|
||||
<file>sql/db_update_sqlite_3_4.sql</file>
|
||||
<file>sql/db_update_sqlite_4_5.sql</file>
|
||||
<file>sql/db_update_sqlite_5_6.sql</file>
|
||||
<file>sql/db_update_sqlite_6_7.sql</file>
|
||||
<file>sql/db_update_sqlite_7_8.sql</file>
|
||||
<file>sql/db_update_sqlite_8_9.sql</file>
|
||||
<file>sql/db_update_sqlite_9_10.sql</file>
|
||||
<file>sql/db_update_sqlite_10_11.sql</file>
|
||||
<file>sql/db_update_sqlite_11_12.sql</file>
|
||||
<file>sql/db_update_sqlite_12_13.sql</file>
|
||||
<file>sql/db_update_sqlite_13_14.sql</file>
|
||||
<file>sql/db_update_sqlite_14_15.sql</file>
|
||||
<file>sql/db_update_sqlite_15_16.sql</file>
|
||||
<file>sql/db_update_sqlite_16_17.sql</file>
|
||||
<file>sql/db_update_sqlite_17_18.sql</file>
|
||||
<file>sql/db_update_sqlite_18_19.sql</file>
|
||||
<file>sql/db_update_sqlite_19_20.sql</file>
|
||||
<file>sql/db_update_sqlite_20_21.sql</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS Information (
|
||||
inf_value TEXT NOT NULL
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Information VALUES (1, 'schema_version', '21');
|
||||
INSERT INTO Information VALUES (1, 'schema_version', '1');
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Accounts (
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY,
|
||||
|
@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS Information (
|
||||
inf_value TEXT NOT NULL
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Information VALUES (1, 'schema_version', '21');
|
||||
INSERT INTO Information VALUES (1, 'schema_version', '1');
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Accounts (
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
@ -1,15 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS GmailAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
app_id TEXT,
|
||||
app_key TEXT,
|
||||
redirect_url TEXT,
|
||||
refresh_token TEXT,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '11' WHERE inf_key = 'schema_version';
|
@ -1,6 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
ALTER TABLE Feeds
|
||||
MODIFY url VARCHAR(1000);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '12' WHERE inf_key = 'schema_version';
|
@ -1,6 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
ALTER TABLE TtRssAccounts
|
||||
ADD COLUMN update_only_unread INTEGER(1) NOT NULL DEFAULT 0 CHECK (update_only_unread >= 0 AND update_only_unread <= 1);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '13' WHERE inf_key = 'schema_version';
|
@ -1,6 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
ALTER TABLE OwnCloudAccounts
|
||||
ADD COLUMN update_only_unread INTEGER(1) NOT NULL DEFAULT 0 CHECK (update_only_unread >= 0 AND update_only_unread <= 1);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '14' WHERE inf_key = 'schema_version';
|
@ -1,18 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS MessageFilters (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT NOT NULL CHECK (name != ''),
|
||||
script TEXT NOT NULL CHECK (script != '')
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS MessageFiltersInFeeds (
|
||||
filter INTEGER NOT NULL,
|
||||
feed_custom_id TEXT NOT NULL,
|
||||
account_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY (filter) REFERENCES MessageFilters (id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id) ON DELETE CASCADE
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '15' WHERE inf_key = 'schema_version';
|
@ -1,21 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Labels (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT NOT NULL CHECK (name != ''),
|
||||
color VARCHAR(7),
|
||||
custom_id TEXT,
|
||||
account_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS LabelsInMessages (
|
||||
label TEXT NOT NULL, /* Custom ID of label. */
|
||||
message TEXT NOT NULL, /* Custom ID of message. */
|
||||
account_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id) ON DELETE CASCADE
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '16' WHERE inf_key = 'schema_version';
|
@ -1,11 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
-- !
|
||||
ALTER TABLE Labels MODIFY id INTEGER AUTO_INCREMENT;
|
||||
-- !
|
||||
ALTER TABLE MessageFilters MODIFY id INTEGER AUTO_INCREMENT;
|
||||
-- !
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '17' WHERE inf_key = 'schema_version';
|
@ -1,13 +0,0 @@
|
||||
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';
|
@ -1,12 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS GoogleReaderApiAccounts (
|
||||
id INTEGER,
|
||||
type INTEGER NOT NULL CHECK (type >= 1),
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '19' WHERE inf_key = 'schema_version';
|
@ -1,33 +0,0 @@
|
||||
CREATE TABLE backup_feeds AS SELECT * FROM Feeds;
|
||||
-- !
|
||||
DROP TABLE Feeds;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Feeds (
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY,
|
||||
title TEXT NOT NULL CHECK (title != ''),
|
||||
description TEXT,
|
||||
date_created BIGINT,
|
||||
icon BLOB,
|
||||
category INTEGER NOT NULL CHECK (category >= -1),
|
||||
encoding TEXT,
|
||||
source_type INTEGER,
|
||||
url VARCHAR(1000),
|
||||
post_process TEXT,
|
||||
protected INTEGER(1) NOT NULL CHECK (protected >= 0 AND protected <= 1),
|
||||
username TEXT,
|
||||
password TEXT,
|
||||
update_type INTEGER(1) NOT NULL CHECK (update_type >= 0),
|
||||
update_interval INTEGER NOT NULL DEFAULT 15 CHECK (update_interval >= 1),
|
||||
type INTEGER,
|
||||
account_id INTEGER NOT NULL,
|
||||
custom_id TEXT,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Feeds (id, title, description, date_created, icon, category, encoding, url, protected, username, password, update_type, update_interval, type, account_id, custom_id)
|
||||
SELECT id, title, description, date_created, icon, category, encoding, url, protected, username, password, update_type, update_interval, type, account_id, custom_id FROM backup_feeds;
|
||||
-- !
|
||||
DROP TABLE backup_feeds;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '20' WHERE inf_key = 'schema_version';
|
@ -1,4 +0,0 @@
|
||||
ALTER TABLE Messages
|
||||
ADD COLUMN is_pdeleted INTEGER(1) NOT NULL DEFAULT 0 CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '2' WHERE inf_key = 'schema_version';
|
@ -1,12 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS FeedlyAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
developer_access_token TEXT,
|
||||
refresh_token TEXT,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
update_only_unread INTEGER(1) NOT NULL DEFAULT 0 CHECK (update_only_unread >= 0 AND update_only_unread <= 1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '21' WHERE inf_key = 'schema_version';
|
@ -1,6 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
ADD COLUMN enclosures TEXT;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '3' WHERE inf_key = 'schema_version';
|
@ -1,70 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
CREATE TABLE Accounts (
|
||||
id INTEGER PRIMARY KEY,
|
||||
type TEXT NOT NULL
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Accounts (type) VALUES ('std-rss');
|
||||
-- !
|
||||
DROP TABLE IF EXISTS FeedsData;
|
||||
-- !
|
||||
CREATE TABLE TtRssAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
auth_protected INTEGER(1) NOT NULL DEFAULT 0 CHECK (auth_protected >= 0 AND auth_protected <= 1),
|
||||
auth_username TEXT,
|
||||
auth_password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
force_update INTEGER(1) NOT NULL DEFAULT 0 CHECK (force_update >= 0 AND force_update <= 1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
ADD COLUMN account_id INTEGER NOT NULL DEFAULT 1;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
ADD COLUMN custom_id TEXT;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
DROP FOREIGN KEY feed;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
MODIFY feed TEXT NOT NULL;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
MODIFY author TEXT;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
MODIFY url TEXT;
|
||||
-- !
|
||||
ALTER TABLE Feeds
|
||||
ADD COLUMN account_id INTEGER NOT NULL DEFAULT 1;
|
||||
-- !
|
||||
ALTER TABLE Feeds
|
||||
ADD COLUMN custom_id TEXT;
|
||||
-- !
|
||||
ALTER TABLE Feeds
|
||||
MODIFY date_created BIGINT;
|
||||
-- !
|
||||
ALTER TABLE Feeds
|
||||
MODIFY encoding TEXT;
|
||||
-- !
|
||||
ALTER TABLE Feeds
|
||||
MODIFY url VARCHAR(100);
|
||||
-- !
|
||||
ALTER TABLE Feeds
|
||||
MODIFY type INTEGER;
|
||||
-- !
|
||||
ALTER TABLE Categories
|
||||
ADD COLUMN account_id INTEGER NOT NULL DEFAULT 1;
|
||||
-- !
|
||||
ALTER TABLE Categories
|
||||
ADD COLUMN custom_id TEXT;
|
||||
-- !
|
||||
ALTER TABLE Categories
|
||||
MODIFY date_created BIGINT;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '4' WHERE inf_key = 'schema_version';
|
@ -1,25 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS OwnCloudAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
force_update INTEGER(1) NOT NULL DEFAULT 0 CHECK (force_update >= 0 AND force_update <= 1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Categories
|
||||
SET custom_id = (SELECT id FROM Categories t WHERE t.id = Categories.id)
|
||||
WHERE Categories.custom_id IS NULL OR Categories.custom_id = '';
|
||||
-- !
|
||||
UPDATE Feeds
|
||||
SET custom_id = (SELECT id FROM Feeds t WHERE t.id = Feeds.id)
|
||||
WHERE Feeds.custom_id IS NULL OR Feeds.custom_id = '';
|
||||
-- !
|
||||
UPDATE Messages
|
||||
SET custom_id = (SELECT id FROM Messages t WHERE t.id = Messages.id)
|
||||
WHERE Messages.custom_id IS NULL OR Messages.custom_id = '';
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '5' WHERE inf_key = 'schema_version';
|
@ -1,6 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
ADD COLUMN custom_hash TEXT;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '6' WHERE inf_key = 'schema_version';
|
@ -1,22 +0,0 @@
|
||||
-- !
|
||||
ALTER DATABASE ##
|
||||
CHARACTER SET = utf8mb4
|
||||
COLLATE = utf8mb4_unicode_ci;
|
||||
-- !
|
||||
USE ##;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
CONVERT TO CHARACTER SET utf8mb4
|
||||
COLLATE utf8mb4_unicode_ci;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
CHANGE title title TEXT
|
||||
CHARACTER SET utf8mb4
|
||||
COLLATE utf8mb4_unicode_ci;
|
||||
-- !
|
||||
ALTER TABLE Messages
|
||||
CHANGE contents contents TEXT
|
||||
CHARACTER SET utf8mb4
|
||||
COLLATE utf8mb4_unicode_ci;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '7' WHERE inf_key = 'schema_version';
|
@ -1,25 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Labels (
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY,
|
||||
account_id INTEGER NOT NULL,
|
||||
color_fg TEXT NOT NULL,
|
||||
color_bg TEXT NOT NULL,
|
||||
title TEXT NOT NULL,
|
||||
description TEXT,
|
||||
custom_id TEXT,
|
||||
custom_hash TEXT,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS LabelsInMessages (
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY,
|
||||
message_custom_id TEXT NOT NULL,
|
||||
label_custom_id TEXT NOT NULL,
|
||||
account_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '8' WHERE inf_key = 'schema_version';
|
@ -1,10 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
ALTER TABLE OwnCloudAccounts
|
||||
ADD COLUMN msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1);
|
||||
-- !
|
||||
DROP TABLE IF EXISTS Labels;
|
||||
-- !
|
||||
DROP TABLE IF EXISTS LabelsInMessages;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '9' WHERE inf_key = 'schema_version';
|
@ -1,15 +0,0 @@
|
||||
USE ##;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS InoreaderAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
app_id TEXT,
|
||||
app_key TEXT,
|
||||
redirect_url TEXT,
|
||||
refresh_token TEXT,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '10' WHERE inf_key = 'schema_version';
|
@ -1,13 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS GmailAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
app_id TEXT,
|
||||
app_key TEXT,
|
||||
redirect_url TEXT,
|
||||
refresh_token TEXT,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '11' WHERE inf_key = 'schema_version';
|
@ -1 +0,0 @@
|
||||
UPDATE Information SET inf_value = '12' WHERE inf_key = 'schema_version';
|
@ -1,24 +0,0 @@
|
||||
CREATE TABLE backup_ta AS SELECT * FROM TtRssAccounts;
|
||||
-- !
|
||||
DROP TABLE TtRssAccounts;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS TtRssAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
auth_protected INTEGER(1) NOT NULL CHECK (auth_protected >= 0 AND auth_protected <= 1) DEFAULT 0,
|
||||
auth_username TEXT,
|
||||
auth_password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
force_update INTEGER(1) NOT NULL CHECK (force_update >= 0 AND force_update <= 1) DEFAULT 0,
|
||||
update_only_unread INTEGER(1) NOT NULL CHECK (update_only_unread >= 0 AND update_only_unread <= 1) DEFAULT 0,
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO TtRssAccounts (id, username, password, auth_protected, auth_username, auth_password, url, force_update, update_only_unread)
|
||||
SELECT id, username, password, auth_protected, auth_username, auth_password, url, force_update, 0 FROM backup_ta;
|
||||
-- !
|
||||
DROP TABLE backup_ta;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '13' WHERE inf_key = 'schema_version';
|
@ -1,22 +0,0 @@
|
||||
CREATE TABLE backup_ta AS SELECT * FROM OwnCloudAccounts;
|
||||
-- !
|
||||
DROP TABLE OwnCloudAccounts;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS OwnCloudAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
force_update INTEGER(1) NOT NULL CHECK (force_update >= 0 AND force_update <= 1) DEFAULT 0,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
update_only_unread INTEGER(1) NOT NULL CHECK (update_only_unread >= 0 AND update_only_unread <= 1) DEFAULT 0,
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO OwnCloudAccounts (id, username, password, url, force_update, msg_limit, update_only_unread)
|
||||
SELECT id, username, password, url, force_update, msg_limit, 0 FROM backup_ta;
|
||||
-- !
|
||||
DROP TABLE backup_ta;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '14' WHERE inf_key = 'schema_version';
|
@ -1,16 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS MessageFilters (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT NOT NULL CHECK (name != ''),
|
||||
script TEXT NOT NULL CHECK (script != '')
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS MessageFiltersInFeeds (
|
||||
filter INTEGER NOT NULL,
|
||||
feed_custom_id TEXT NOT NULL,
|
||||
account_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY (filter) REFERENCES MessageFilters (id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id) ON DELETE CASCADE
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '15' WHERE inf_key = 'schema_version';
|
@ -1,19 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS Labels (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT NOT NULL CHECK (name != ''),
|
||||
color VARCHAR(7),
|
||||
custom_id TEXT,
|
||||
account_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS LabelsInMessages (
|
||||
label TEXT NOT NULL, /* Custom ID of label. */
|
||||
message TEXT NOT NULL, /* Custom ID of message. */
|
||||
account_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id) ON DELETE CASCADE
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '16' WHERE inf_key = 'schema_version';
|
@ -1 +0,0 @@
|
||||
UPDATE Information SET inf_value = '17' WHERE inf_key = 'schema_version';
|
@ -1,23 +0,0 @@
|
||||
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';
|
@ -1,12 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS GoogleReaderApiAccounts (
|
||||
id INTEGER,
|
||||
type INTEGER NOT NULL CHECK (type >= 1),
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '19' WHERE inf_key = 'schema_version';
|
@ -1,33 +0,0 @@
|
||||
CREATE TABLE backup_feeds AS SELECT * FROM Feeds;
|
||||
-- !
|
||||
DROP TABLE Feeds;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS Feeds (
|
||||
id INTEGER PRIMARY KEY,
|
||||
title TEXT NOT NULL CHECK (title != ''),
|
||||
description TEXT,
|
||||
date_created INTEGER,
|
||||
icon BLOB,
|
||||
category INTEGER NOT NULL CHECK (category >= -1),
|
||||
encoding TEXT,
|
||||
source_type INTEGER,
|
||||
url TEXT,
|
||||
post_process TEXT,
|
||||
protected INTEGER(1) NOT NULL CHECK (protected >= 0 AND protected <= 1),
|
||||
username TEXT,
|
||||
password TEXT,
|
||||
update_type INTEGER(1) NOT NULL CHECK (update_type >= 0),
|
||||
update_interval INTEGER NOT NULL CHECK (update_interval >= 1) DEFAULT 15,
|
||||
type INTEGER,
|
||||
account_id INTEGER NOT NULL,
|
||||
custom_id TEXT,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Feeds (id, title, description, date_created, icon, category, encoding, url, protected, username, password, update_type, update_interval, type, account_id, custom_id)
|
||||
SELECT id, title, description, date_created, icon, category, encoding, url, protected, username, password, update_type, update_interval, type, account_id, custom_id FROM backup_feeds;
|
||||
-- !
|
||||
DROP TABLE backup_feeds;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '20' WHERE inf_key = 'schema_version';
|
@ -1,4 +0,0 @@
|
||||
ALTER TABLE Messages
|
||||
ADD COLUMN is_pdeleted INTEGER(1) NOT NULL DEFAULT 0 CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '2' WHERE inf_key = 'schema_version';
|
@ -1,12 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS FeedlyAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
developer_access_token TEXT,
|
||||
refresh_token TEXT,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
update_only_unread INTEGER(1) NOT NULL DEFAULT 0 CHECK (update_only_unread >= 0 AND update_only_unread <= 1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '21' WHERE inf_key = 'schema_version';
|
@ -1,4 +0,0 @@
|
||||
ALTER TABLE Messages
|
||||
ADD COLUMN enclosures TEXT;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '3' WHERE inf_key = 'schema_version';
|
@ -1,103 +0,0 @@
|
||||
CREATE TABLE Accounts (
|
||||
id INTEGER PRIMARY KEY,
|
||||
type TEXT NOT NULL
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Accounts (type) VALUES ('std-rss');
|
||||
-- !
|
||||
DROP TABLE IF EXISTS FeedsData;
|
||||
-- !
|
||||
CREATE TABLE TtRssAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
auth_protected INTEGER(1) NOT NULL CHECK (auth_protected >= 0 AND auth_protected <= 1) DEFAULT 0,
|
||||
auth_username TEXT,
|
||||
auth_password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
force_update INTEGER(1) NOT NULL CHECK (force_update >= 0 AND force_update <= 1) DEFAULT 0,
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE backup_Messages AS SELECT * FROM Messages;
|
||||
-- !
|
||||
DROP TABLE Messages;
|
||||
-- !
|
||||
CREATE TABLE Messages (
|
||||
id INTEGER PRIMARY KEY,
|
||||
is_read INTEGER(1) NOT NULL CHECK (is_read >= 0 AND is_read <= 1) DEFAULT 0,
|
||||
is_deleted INTEGER(1) NOT NULL CHECK (is_deleted >= 0 AND is_deleted <= 1) DEFAULT 0,
|
||||
is_important INTEGER(1) NOT NULL CHECK (is_important >= 0 AND is_important <= 1) DEFAULT 0,
|
||||
feed TEXT NOT NULL,
|
||||
title TEXT NOT NULL CHECK (title != ''),
|
||||
url TEXT,
|
||||
author TEXT,
|
||||
date_created INTEGER NOT NULL CHECK (date_created != 0),
|
||||
contents TEXT,
|
||||
is_pdeleted INTEGER(1) NOT NULL CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1) DEFAULT 0,
|
||||
enclosures TEXT,
|
||||
account_id INTEGER NOT NULL,
|
||||
custom_id TEXT,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Messages (id, is_read, is_deleted, is_important, feed, title, url, author, date_created, contents, is_pdeleted, enclosures, account_id)
|
||||
SELECT id, is_read, is_deleted, is_important, feed, title, url, author, date_created, contents, is_pdeleted, enclosures, 1 FROM backup_Messages;
|
||||
-- !
|
||||
DROP TABLE backup_Messages;
|
||||
-- !
|
||||
CREATE TABLE backup_Feeds AS SELECT * FROM Feeds;
|
||||
-- !
|
||||
DROP TABLE Feeds;
|
||||
-- !
|
||||
CREATE TABLE Feeds (
|
||||
id INTEGER PRIMARY KEY,
|
||||
title TEXT NOT NULL CHECK (title != ''),
|
||||
description TEXT,
|
||||
date_created INTEGER,
|
||||
icon BLOB,
|
||||
category INTEGER NOT NULL CHECK (category >= -1),
|
||||
encoding TEXT,
|
||||
url TEXT,
|
||||
protected INTEGER(1) NOT NULL CHECK (protected >= 0 AND protected <= 1),
|
||||
username TEXT,
|
||||
password TEXT,
|
||||
update_type INTEGER(1) NOT NULL CHECK (update_type >= 0),
|
||||
update_interval INTEGER NOT NULL CHECK (update_interval >= 1) DEFAULT 15,
|
||||
type INTEGER,
|
||||
account_id INTEGER NOT NULL,
|
||||
custom_id TEXT,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Feeds (id, title, description, date_created, icon, category, encoding, url, protected, username, password, update_type, update_type, type, account_id)
|
||||
SELECT id, title, description, date_created, icon, category, encoding, url, protected, username, password, update_type, update_type, type, 1 FROM backup_Feeds;
|
||||
-- !
|
||||
DROP TABLE backup_Feeds;
|
||||
-- !
|
||||
CREATE TABLE backup_Categories AS SELECT * FROM Categories;
|
||||
-- !
|
||||
DROP TABLE Categories;
|
||||
-- !
|
||||
CREATE TABLE Categories (
|
||||
id INTEGER PRIMARY KEY,
|
||||
parent_id INTEGER NOT NULL,
|
||||
title TEXT NOT NULL CHECK (title != ''),
|
||||
description TEXT,
|
||||
date_created INTEGER,
|
||||
icon BLOB,
|
||||
account_id INTEGER NOT NULL,
|
||||
custom_id TEXT,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Categories (id, parent_id, title, description, date_created, icon, account_id)
|
||||
SELECT id, parent_id, title, description, date_created, icon, 1 FROM backup_Categories;
|
||||
-- !
|
||||
DROP TABLE backup_Categories;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '4' WHERE inf_key = 'schema_version';
|
@ -1,23 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS OwnCloudAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
force_update INTEGER(1) NOT NULL CHECK (force_update >= 0 AND force_update <= 1) DEFAULT 0,
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Categories
|
||||
SET custom_id = (SELECT id FROM Categories t WHERE t.id = Categories.id)
|
||||
WHERE Categories.custom_id IS NULL OR Categories.custom_id = '';
|
||||
-- !
|
||||
UPDATE Feeds
|
||||
SET custom_id = (SELECT id FROM Feeds t WHERE t.id = Feeds.id)
|
||||
WHERE Feeds.custom_id IS NULL OR Feeds.custom_id = '';
|
||||
-- !
|
||||
UPDATE Messages
|
||||
SET custom_id = (SELECT id FROM Messages t WHERE t.id = Messages.id)
|
||||
WHERE Messages.custom_id IS NULL OR Messages.custom_id = '';
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '5' WHERE inf_key = 'schema_version';
|
@ -1,30 +0,0 @@
|
||||
CREATE TABLE backup_Messages AS SELECT * FROM Messages;
|
||||
-- !
|
||||
DROP TABLE Messages;
|
||||
-- !
|
||||
CREATE TABLE Messages (
|
||||
id INTEGER PRIMARY KEY,
|
||||
is_read INTEGER(1) NOT NULL CHECK (is_read >= 0 AND is_read <= 1) DEFAULT 0,
|
||||
is_deleted INTEGER(1) NOT NULL CHECK (is_deleted >= 0 AND is_deleted <= 1) DEFAULT 0,
|
||||
is_important INTEGER(1) NOT NULL CHECK (is_important >= 0 AND is_important <= 1) DEFAULT 0,
|
||||
feed TEXT NOT NULL,
|
||||
title TEXT NOT NULL CHECK (title != ''),
|
||||
url TEXT,
|
||||
author TEXT,
|
||||
date_created INTEGER NOT NULL CHECK (date_created != 0),
|
||||
contents TEXT,
|
||||
is_pdeleted INTEGER(1) NOT NULL CHECK (is_pdeleted >= 0 AND is_pdeleted <= 1) DEFAULT 0,
|
||||
enclosures TEXT,
|
||||
account_id INTEGER NOT NULL,
|
||||
custom_id TEXT,
|
||||
custom_hash TEXT,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO Messages (id, is_read, is_deleted, is_important, feed, title, url, author, date_created, contents, is_pdeleted, enclosures, account_id, custom_id)
|
||||
SELECT id, is_read, is_deleted, is_important, feed, title, url, author, date_created, contents, is_pdeleted, enclosures, account_id, custom_id FROM backup_Messages;
|
||||
-- !
|
||||
DROP TABLE backup_Messages;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '6' WHERE inf_key = 'schema_version';
|
@ -1 +0,0 @@
|
||||
UPDATE Information SET inf_value = '7' WHERE inf_key = 'schema_version';
|
@ -1,25 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS Labels (
|
||||
id INTEGER PRIMARY KEY,
|
||||
account_id INTEGER NOT NULL,
|
||||
color_fg TEXT NOT NULL,
|
||||
color_bg TEXT NOT NULL,
|
||||
title TEXT NOT NULL,
|
||||
description TEXT,
|
||||
custom_id TEXT,
|
||||
custom_hash TEXT,
|
||||
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS LabelsInMessages (
|
||||
id INTEGER PRIMARY KEY,
|
||||
message_custom_id TEXT NOT NULL,
|
||||
label_custom_id TEXT NOT NULL,
|
||||
account_id INTEGER NOT NULL,
|
||||
|
||||
FOREIGN KEY (message_custom_id) REFERENCES Messages (custom_id),
|
||||
FOREIGN KEY (label_custom_id) REFERENCES Labels (custom_id),
|
||||
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '8' WHERE inf_key = 'schema_version';
|
@ -1,25 +0,0 @@
|
||||
CREATE TABLE backup_oa AS SELECT * FROM OwnCloudAccounts;
|
||||
-- !
|
||||
DROP TABLE OwnCloudAccounts;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS OwnCloudAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
password TEXT,
|
||||
url TEXT NOT NULL,
|
||||
force_update INTEGER(1) NOT NULL CHECK (force_update >= 0 AND force_update <= 1) DEFAULT 0,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
INSERT INTO OwnCloudAccounts (id, username, password, url, force_update)
|
||||
SELECT id, username, password, url, force_update FROM backup_oa;
|
||||
-- !
|
||||
DROP TABLE backup_oa;
|
||||
-- !
|
||||
DROP TABLE IF EXISTS Labels;
|
||||
-- !
|
||||
DROP TABLE IF EXISTS LabelsInMessages;
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '9' WHERE inf_key = 'schema_version';
|
@ -1,13 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS InoreaderAccounts (
|
||||
id INTEGER,
|
||||
username TEXT NOT NULL,
|
||||
app_id TEXT,
|
||||
app_key TEXT,
|
||||
redirect_url TEXT,
|
||||
refresh_token TEXT,
|
||||
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
|
||||
|
||||
FOREIGN KEY (id) REFERENCES Accounts (id)
|
||||
);
|
||||
-- !
|
||||
UPDATE Information SET inf_value = '10' WHERE inf_key = 'schema_version';
|
362
src/librssguard/3rd-party/boolinq/boolinq.h
vendored
362
src/librssguard/3rd-party/boolinq/boolinq.h
vendored
@ -6,13 +6,13 @@
|
||||
#include <tuple>
|
||||
|
||||
#include <algorithm>
|
||||
#include <deque>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
//
|
||||
|
||||
@ -32,19 +32,17 @@ namespace boolinq {
|
||||
|
||||
template<typename S, typename T>
|
||||
class Linq {
|
||||
std::function<T(S &)> nextFunc;
|
||||
std::function<T(S&)> nextFunc;
|
||||
S storage;
|
||||
|
||||
public:
|
||||
typedef T value_type;
|
||||
|
||||
Linq() : nextFunc(), storage()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
Linq(S storage, std::function<T(S &)> nextFunc) : nextFunc(nextFunc), storage(storage)
|
||||
{
|
||||
}
|
||||
Linq(S storage, std::function<T(S&)> nextFunc) : nextFunc(nextFunc), storage(storage)
|
||||
{}
|
||||
|
||||
T next()
|
||||
{
|
||||
@ -54,26 +52,29 @@ namespace boolinq {
|
||||
void for_each_i(std::function<void(T, int)> apply) const
|
||||
{
|
||||
Linq<S, T> linq = *this;
|
||||
|
||||
try {
|
||||
for (int i = 0; ; i++) {
|
||||
apply(linq.next(), i);
|
||||
}
|
||||
}
|
||||
catch (LinqEndException &) {}
|
||||
catch (LinqEndException&) {}
|
||||
}
|
||||
|
||||
void for_each(std::function<void(T)> apply) const
|
||||
{
|
||||
return for_each_i([apply](T value, int) { return apply(value); });
|
||||
return for_each_i([apply](T value, int) {
|
||||
return apply(value);
|
||||
});
|
||||
}
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, int>, T> where_i(std::function<bool(T, int)> filter) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, int>, T>(
|
||||
std::make_tuple(*this, 0),
|
||||
[filter](std::tuple<Linq<S, T>, int> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
int &index = std::get<1>(tuple);
|
||||
[filter](std::tuple<Linq<S, T>, int>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
int& index = std::get<1>(tuple);
|
||||
|
||||
while (true) {
|
||||
T ret = linq.next();
|
||||
@ -87,7 +88,9 @@ namespace boolinq {
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, int>, T> where(std::function<bool(T)> filter) const
|
||||
{
|
||||
return where_i([filter](T value, int) { return filter(value); });
|
||||
return where_i([filter](T value, int) {
|
||||
return filter(value);
|
||||
});
|
||||
}
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, int>, T> take(int count) const
|
||||
@ -96,6 +99,7 @@ namespace boolinq {
|
||||
if (i == count) {
|
||||
throw LinqEndException();
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
@ -106,32 +110,38 @@ namespace boolinq {
|
||||
if (!predicate(value, i)) {
|
||||
throw LinqEndException();
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, int>, T> takeWhile(std::function<bool(T)> predicate) const
|
||||
{
|
||||
return takeWhile_i([predicate](T value, int /*i*/) { return predicate(value); });
|
||||
return takeWhile_i([predicate](T value, int /*i*/) {
|
||||
return predicate(value);
|
||||
});
|
||||
}
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, int>, T> skip(int count) const
|
||||
{
|
||||
return where_i([count](T value, int i) { return i >= count; });
|
||||
return where_i([count](T, int i) {
|
||||
return i >= count;
|
||||
});
|
||||
}
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, int, bool>, T> skipWhile_i(std::function<bool(T, int)> predicate) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, int, bool>, T>(
|
||||
std::make_tuple(*this, 0, false),
|
||||
[predicate](std::tuple<Linq<S, T>, int, bool> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
int &index = std::get<1>(tuple);
|
||||
bool &flag = std::get<2>(tuple);
|
||||
[predicate](std::tuple<Linq<S, T>, int, bool>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
int& index = std::get<1>(tuple);
|
||||
bool& flag = std::get<2>(tuple);
|
||||
|
||||
if (flag) {
|
||||
return linq.next();
|
||||
}
|
||||
|
||||
while (true) {
|
||||
T ret = linq.next();
|
||||
if (!predicate(ret, index++)) {
|
||||
@ -145,24 +155,26 @@ namespace boolinq {
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, int, bool>, T> skipWhile(std::function<bool(T)> predicate) const
|
||||
{
|
||||
return skipWhile_i([predicate](T value, int /*i*/) { return predicate(value); });
|
||||
return skipWhile_i([predicate](T value, int /*i*/) {
|
||||
return predicate(value);
|
||||
});
|
||||
}
|
||||
|
||||
template<typename ... Types>
|
||||
Linq<std::tuple<Linq<S, T>, std::vector<T>, int>, T> append(Types ... newValues) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, std::vector<T>, int>, T>(
|
||||
std::make_tuple(*this, std::vector<T>{ newValues... }, -1),
|
||||
[](std::tuple<Linq<S, T>, std::vector<T>, int> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
std::vector<T> &values = std::get<1>(tuple);
|
||||
int &index = std::get<2>(tuple);
|
||||
std::make_tuple(*this, std::vector<T>{ newValues ... }, -1),
|
||||
[](std::tuple<Linq<S, T>, std::vector<T>, int>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
std::vector<T>& values = std::get<1>(tuple);
|
||||
int& index = std::get<2>(tuple);
|
||||
|
||||
if (index == -1) {
|
||||
try {
|
||||
return linq.next();
|
||||
}
|
||||
catch (LinqEndException &) {
|
||||
catch (LinqEndException&) {
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
@ -180,15 +192,16 @@ namespace boolinq {
|
||||
Linq<std::tuple<Linq<S, T>, std::vector<T>, int>, T> prepend(Types ... newValues) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, std::vector<T>, int>, T>(
|
||||
std::make_tuple(*this, std::vector<T>{ newValues... }, 0),
|
||||
[](std::tuple<Linq<S, T>, std::vector<T>, int> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
std::vector<T> &values = std::get<1>(tuple);
|
||||
int &index = std::get<2>(tuple);
|
||||
std::make_tuple(*this, std::vector<T>{ newValues ... }, 0),
|
||||
[](std::tuple<Linq<S, T>, std::vector<T>, int>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
std::vector<T>& values = std::get<1>(tuple);
|
||||
int& index = std::get<2>(tuple);
|
||||
|
||||
if (index < values.size()) {
|
||||
return values[index++];
|
||||
}
|
||||
|
||||
return linq.next();
|
||||
}
|
||||
);
|
||||
@ -199,9 +212,9 @@ namespace boolinq {
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, int>, _TRet>(
|
||||
std::make_tuple(*this, 0),
|
||||
[apply](std::tuple<Linq<S, T>, int> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
int &index = std::get<1>(tuple);
|
||||
[apply](std::tuple<Linq<S, T>, int>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
int& index = std::get<1>(tuple);
|
||||
|
||||
return apply(linq.next(), index++);
|
||||
}
|
||||
@ -211,31 +224,36 @@ namespace boolinq {
|
||||
template<typename F, typename _TRet = typename std::result_of<F(T)>::type>
|
||||
Linq<std::tuple<Linq<S, T>, int>, _TRet> select(F apply) const
|
||||
{
|
||||
return select_i([apply](T value, int /*index*/) { return apply(value); });
|
||||
return select_i([apply](T value, int /*index*/) {
|
||||
return apply(value);
|
||||
});
|
||||
}
|
||||
|
||||
template<typename TRet>
|
||||
Linq<std::tuple<Linq<S, T>, int>, TRet> cast() const
|
||||
{
|
||||
return select_i([](T value, int /*i*/) { return TRet(value); });
|
||||
return select_i([](T value, int /*i*/) {
|
||||
return TRet(value);
|
||||
});
|
||||
}
|
||||
|
||||
template<typename S2, typename T2>
|
||||
Linq<std::tuple<Linq<S, T>, Linq<S2, T2>, bool>, T> concat(const Linq<S2, T2> & rhs) const
|
||||
Linq<std::tuple<Linq<S, T>, Linq<S2, T2>, bool>, T> concat(const Linq<S2, T2>& rhs) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, Linq<S2, T2>, bool>, T>(
|
||||
std::make_tuple(*this, rhs, false),
|
||||
[](std::tuple<Linq<S, T>, Linq<S2, T2>, bool> &tuple){
|
||||
Linq<S, T> &first = std::get<0>(tuple);
|
||||
Linq<S2, T2> &second = std::get<1>(tuple);
|
||||
bool &flag = std::get<2>(tuple);
|
||||
[](std::tuple<Linq<S, T>, Linq<S2, T2>, bool>& tuple) {
|
||||
Linq<S, T>& first = std::get<0>(tuple);
|
||||
Linq<S2, T2>& second = std::get<1>(tuple);
|
||||
bool& flag = std::get<2>(tuple);
|
||||
|
||||
if (!flag) {
|
||||
try {
|
||||
return first.next();
|
||||
}
|
||||
catch (LinqEndException &) {}
|
||||
catch (LinqEndException&) {}
|
||||
}
|
||||
|
||||
return second.next();
|
||||
}
|
||||
);
|
||||
@ -250,21 +268,22 @@ namespace boolinq {
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, _TRet, int, bool>, _TRetVal>(
|
||||
std::make_tuple(*this, _TRet(), 0, true),
|
||||
[apply](std::tuple<Linq<S, T>, _TRet, int, bool> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
_TRet ¤t = std::get<1>(tuple);
|
||||
int &index = std::get<2>(tuple);
|
||||
bool &finished = std::get<3>(tuple);
|
||||
[apply](std::tuple<Linq<S, T>, _TRet, int, bool>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
_TRet& current = std::get<1>(tuple);
|
||||
int& index = std::get<2>(tuple);
|
||||
bool& finished = std::get<3>(tuple);
|
||||
|
||||
while (true) {
|
||||
if (finished) {
|
||||
current = apply(linq.next(), index++);
|
||||
finished = false;
|
||||
}
|
||||
|
||||
try {
|
||||
return current.next();
|
||||
}
|
||||
catch (LinqEndException &) {
|
||||
catch (LinqEndException&) {
|
||||
finished = true;
|
||||
}
|
||||
}
|
||||
@ -279,7 +298,9 @@ namespace boolinq {
|
||||
>
|
||||
Linq<std::tuple<Linq<S, T>, _TRet, int, bool>, _TRetVal> selectMany(F apply) const
|
||||
{
|
||||
return selectMany_i([apply](T value, int index) { return apply(value); });
|
||||
return selectMany_i([apply](T value, int) {
|
||||
return apply(value);
|
||||
});
|
||||
}
|
||||
|
||||
template<
|
||||
@ -287,19 +308,19 @@ namespace boolinq {
|
||||
typename _TKey = typename std::result_of<F(T)>::type,
|
||||
typename _TValue = Linq<std::tuple<Linq<S, T>, int>, T> // where(predicate)
|
||||
>
|
||||
Linq<std::tuple<Linq<S, T>, Linq<S, T>, std::unordered_set<_TKey> >, std::pair<_TKey, _TValue> > groupBy(F apply) const
|
||||
Linq<std::tuple<Linq<S, T>, Linq<S, T>, std::unordered_set<_TKey>>, std::pair<_TKey, _TValue>> groupBy(F apply) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, Linq<S, T>, std::unordered_set<_TKey> >, std::pair<_TKey, _TValue> >(
|
||||
return Linq<std::tuple<Linq<S, T>, Linq<S, T>, std::unordered_set<_TKey>>, std::pair<_TKey, _TValue>>(
|
||||
std::make_tuple(*this, *this, std::unordered_set<_TKey>()),
|
||||
[apply](std::tuple<Linq<S, T>, Linq<S, T>, std::unordered_set<_TKey> > &tuple){
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
Linq<S, T> &linqCopy = std::get<1>(tuple);
|
||||
std::unordered_set<_TKey> &set = std::get<2>(tuple);
|
||||
[apply](std::tuple<Linq<S, T>, Linq<S, T>, std::unordered_set<_TKey>>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
Linq<S, T>& linqCopy = std::get<1>(tuple);
|
||||
std::unordered_set<_TKey>& set = std::get<2>(tuple);
|
||||
|
||||
while (true) {
|
||||
_TKey key = apply(linq.next());
|
||||
if (set.insert(key).second) {
|
||||
return std::make_pair(key, linqCopy.where([apply, key](T v){
|
||||
return std::make_pair(key, linqCopy.where([apply, key](T v) {
|
||||
return apply(v) == key;
|
||||
}));
|
||||
}
|
||||
@ -309,13 +330,13 @@ namespace boolinq {
|
||||
}
|
||||
|
||||
template<typename F, typename _TRet = typename std::result_of<F(T)>::type>
|
||||
Linq<std::tuple<Linq<S, T>, std::unordered_set<_TRet> >, T> distinct(F transform) const
|
||||
Linq<std::tuple<Linq<S, T>, std::unordered_set<_TRet>>, T> distinct(F transform) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, std::unordered_set<_TRet> >, T>(
|
||||
return Linq<std::tuple<Linq<S, T>, std::unordered_set<_TRet>>, T>(
|
||||
std::make_tuple(*this, std::unordered_set<_TRet>()),
|
||||
[transform](std::tuple<Linq<S, T>, std::unordered_set<_TRet> > &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
std::unordered_set<_TRet> &set = std::get<1>(tuple);
|
||||
[transform](std::tuple<Linq<S, T>, std::unordered_set<_TRet>>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
std::unordered_set<_TRet>& set = std::get<1>(tuple);
|
||||
|
||||
while (true) {
|
||||
T value = linq.next();
|
||||
@ -327,33 +348,38 @@ namespace boolinq {
|
||||
);
|
||||
}
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, std::unordered_set<T> >, T> distinct() const
|
||||
Linq<std::tuple<Linq<S, T>, std::unordered_set<T>>, T> distinct() const
|
||||
{
|
||||
return distinct([](T value) { return value; });
|
||||
return distinct([](T value) {
|
||||
return value;
|
||||
});
|
||||
}
|
||||
|
||||
template<typename F, typename _TIter = typename std::vector<T>::const_iterator>
|
||||
Linq<std::tuple<std::vector<T>, _TIter, bool>, T> orderBy(F transform) const
|
||||
{
|
||||
std::vector<T> items = toStdVector();
|
||||
std::sort(items.begin(), items.end(), [transform](const T &a, const T &b) {
|
||||
|
||||
std::sort(items.begin(), items.end(), [transform](const T& a, const T& b) {
|
||||
return transform(a) < transform(b);
|
||||
});
|
||||
|
||||
return Linq<std::tuple<std::vector<T>, _TIter, bool>, T>(
|
||||
std::make_tuple(items, _TIter(), false),
|
||||
[](std::tuple<std::vector<T>, _TIter, bool> &tuple) {
|
||||
std::vector<T> &vec = std::get<0>(tuple);
|
||||
_TIter &it = std::get<1>(tuple);
|
||||
bool &flag = std::get<2>(tuple);
|
||||
[](std::tuple<std::vector<T>, _TIter, bool>& tuple) {
|
||||
std::vector<T>& vec = std::get<0>(tuple);
|
||||
_TIter& it = std::get<1>(tuple);
|
||||
bool& flag = std::get<2>(tuple);
|
||||
|
||||
if (!flag) {
|
||||
flag = true;
|
||||
it = vec.cbegin();
|
||||
}
|
||||
|
||||
if (it == vec.cend()) {
|
||||
throw LinqEndException();
|
||||
}
|
||||
|
||||
return *(it++);
|
||||
}
|
||||
);
|
||||
@ -361,7 +387,9 @@ namespace boolinq {
|
||||
|
||||
Linq<std::tuple<std::vector<T>, typename std::vector<T>::const_iterator, bool>, T> orderBy() const
|
||||
{
|
||||
return orderBy([](T value) { return value; });
|
||||
return orderBy([](T value) {
|
||||
return value;
|
||||
});
|
||||
}
|
||||
|
||||
template<typename _TIter = typename std::list<T>::const_reverse_iterator>
|
||||
@ -369,18 +397,20 @@ namespace boolinq {
|
||||
{
|
||||
return Linq<std::tuple<std::list<T>, _TIter, bool>, T>(
|
||||
std::make_tuple(toStdList(), _TIter(), false),
|
||||
[](std::tuple<std::list<T>, _TIter, bool> &tuple) {
|
||||
std::list<T> &list = std::get<0>(tuple);
|
||||
_TIter &it = std::get<1>(tuple);
|
||||
bool &flag = std::get<2>(tuple);
|
||||
[](std::tuple<std::list<T>, _TIter, bool>& tuple) {
|
||||
std::list<T>& list = std::get<0>(tuple);
|
||||
_TIter& it = std::get<1>(tuple);
|
||||
bool& flag = std::get<2>(tuple);
|
||||
|
||||
if (!flag) {
|
||||
flag = true;
|
||||
it = list.crbegin();
|
||||
}
|
||||
|
||||
if (it == list.crend()) {
|
||||
throw LinqEndException();
|
||||
}
|
||||
|
||||
return *(it++);
|
||||
}
|
||||
);
|
||||
@ -392,12 +422,14 @@ namespace boolinq {
|
||||
TRet aggregate(TRet start, std::function<TRet(TRet, T)> accumulate) const
|
||||
{
|
||||
Linq<S, T> linq = *this;
|
||||
|
||||
try {
|
||||
while (true) {
|
||||
start = accumulate(start, linq.next());
|
||||
}
|
||||
}
|
||||
catch (LinqEndException &) {}
|
||||
catch (LinqEndException&) {}
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
@ -412,7 +444,9 @@ namespace boolinq {
|
||||
template<typename TRet = T>
|
||||
TRet sum() const
|
||||
{
|
||||
return sum([](T value) { return TRet(value); });
|
||||
return sum([](T value) {
|
||||
return TRet(value);
|
||||
});
|
||||
}
|
||||
|
||||
template<typename F, typename _TRet = typename std::result_of<F(T)>::type>
|
||||
@ -423,19 +457,25 @@ namespace boolinq {
|
||||
count++;
|
||||
return transform(value);
|
||||
});
|
||||
|
||||
return res / count;
|
||||
}
|
||||
|
||||
template<typename TRet = T>
|
||||
TRet avg() const
|
||||
{
|
||||
return avg([](T value) { return TRet(value); });
|
||||
return avg([](T value) {
|
||||
return TRet(value);
|
||||
});
|
||||
}
|
||||
|
||||
int count() const
|
||||
{
|
||||
int index = 0;
|
||||
for_each([&index](T /*a*/) { index++; });
|
||||
|
||||
for_each([&index](T /*a*/) {
|
||||
index++;
|
||||
});
|
||||
return index;
|
||||
}
|
||||
|
||||
@ -444,9 +484,11 @@ namespace boolinq {
|
||||
return where(predicate).count();
|
||||
}
|
||||
|
||||
int count(const T &item) const
|
||||
int count(const T& item) const
|
||||
{
|
||||
return count([item](T value) { return item == value; });
|
||||
return count([item](T value) {
|
||||
return item == value;
|
||||
});
|
||||
}
|
||||
|
||||
// Bool aggregators
|
||||
@ -454,34 +496,44 @@ namespace boolinq {
|
||||
bool any(std::function<bool(T)> predicate) const
|
||||
{
|
||||
Linq<S, T> linq = *this;
|
||||
|
||||
try {
|
||||
while (true) {
|
||||
if (predicate(linq.next()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (LinqEndException &) {}
|
||||
catch (LinqEndException&) {}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool any() const
|
||||
{
|
||||
return any([](T value) { return static_cast<bool>(value); });
|
||||
return any([](T value) {
|
||||
return static_cast<bool>(value);
|
||||
});
|
||||
}
|
||||
|
||||
bool all(std::function<bool(T)> predicate) const
|
||||
{
|
||||
return !any([predicate](T value) { return !predicate(value); });
|
||||
return !any([predicate](T value) {
|
||||
return !predicate(value);
|
||||
});
|
||||
}
|
||||
|
||||
bool all() const
|
||||
{
|
||||
return all([](T value) { return static_cast<bool>(value); });
|
||||
return all([](T value) {
|
||||
return static_cast<bool>(value);
|
||||
});
|
||||
}
|
||||
|
||||
bool contains(const T &item) const
|
||||
bool contains(const T& item) const
|
||||
{
|
||||
return any([&item](T value) { return value == item; });
|
||||
return any([&item](T value) {
|
||||
return value == item;
|
||||
});
|
||||
}
|
||||
|
||||
// Election aggregators
|
||||
@ -489,10 +541,12 @@ namespace boolinq {
|
||||
T elect(std::function<T(T, T)> accumulate) const
|
||||
{
|
||||
T result;
|
||||
|
||||
for_each_i([accumulate, &result](T value, int i) {
|
||||
if (i == 0) {
|
||||
result = value;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
result = accumulate(result, value);
|
||||
}
|
||||
});
|
||||
@ -502,27 +556,31 @@ namespace boolinq {
|
||||
template<typename F>
|
||||
T max(F transform) const
|
||||
{
|
||||
return elect([transform](const T &a, const T &b) {
|
||||
return elect([transform](const T& a, const T& b) {
|
||||
return (transform(a) < transform(b)) ? b : a;
|
||||
});
|
||||
}
|
||||
|
||||
T max() const
|
||||
{
|
||||
return max([](T value) { return value; });
|
||||
return max([](T value) {
|
||||
return value;
|
||||
});
|
||||
}
|
||||
|
||||
template<typename F>
|
||||
T min(F transform) const
|
||||
{
|
||||
return elect([transform](const T &a, const T &b) {
|
||||
return elect([transform](const T& a, const T& b) {
|
||||
return (transform(a) < transform(b)) ? a : b;
|
||||
});
|
||||
}
|
||||
|
||||
T min() const
|
||||
{
|
||||
return min([](T value) { return value; });
|
||||
return min([](T value) {
|
||||
return value;
|
||||
});
|
||||
}
|
||||
|
||||
// Single object returners
|
||||
@ -547,7 +605,8 @@ namespace boolinq {
|
||||
try {
|
||||
return where(predicate).next();
|
||||
}
|
||||
catch (LinqEndException &) {}
|
||||
catch (LinqEndException&) {}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@ -556,7 +615,8 @@ namespace boolinq {
|
||||
try {
|
||||
return Linq<S, T>(*this).next();
|
||||
}
|
||||
catch (LinqEndException &) {}
|
||||
catch (LinqEndException&) {}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@ -564,6 +624,7 @@ namespace boolinq {
|
||||
{
|
||||
T res;
|
||||
int index = -1;
|
||||
|
||||
where(predicate).for_each_i([&res, &index](T value, int i) {
|
||||
res = value;
|
||||
index = i;
|
||||
@ -572,17 +633,21 @@ namespace boolinq {
|
||||
if (index == -1) {
|
||||
throw LinqEndException();
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
T last() const
|
||||
{
|
||||
return last([](T /*value*/) { return true; });
|
||||
return last([](T /*value*/) {
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
T lastOrDefault(std::function<bool(T)> predicate, T const& defaultValue = T()) const
|
||||
{
|
||||
T res = defaultValue;
|
||||
|
||||
where(predicate).for_each([&res](T value) {
|
||||
res = value;
|
||||
});
|
||||
@ -591,7 +656,9 @@ namespace boolinq {
|
||||
|
||||
T lastOrDefault(T const& defaultValue = T()) const
|
||||
{
|
||||
return lastOrDefault([](T /*value*/) { return true; }, defaultValue);
|
||||
return lastOrDefault([](T /*value*/) {
|
||||
return true;
|
||||
}, defaultValue);
|
||||
}
|
||||
|
||||
// Export to containers
|
||||
@ -599,6 +666,7 @@ namespace boolinq {
|
||||
std::vector<T> toStdVector() const
|
||||
{
|
||||
std::vector<T> items;
|
||||
|
||||
for_each([&items](T value) {
|
||||
items.push_back(value);
|
||||
});
|
||||
@ -608,6 +676,7 @@ namespace boolinq {
|
||||
std::list<T> toStdList() const
|
||||
{
|
||||
std::list<T> items;
|
||||
|
||||
for_each([&items](T value) {
|
||||
items.push_back(value);
|
||||
});
|
||||
@ -617,6 +686,7 @@ namespace boolinq {
|
||||
std::deque<T> toStdDeque() const
|
||||
{
|
||||
std::deque<T> items;
|
||||
|
||||
for_each([&items](T value) {
|
||||
items.push_back(value);
|
||||
});
|
||||
@ -626,6 +696,7 @@ namespace boolinq {
|
||||
std::set<T> toStdSet() const
|
||||
{
|
||||
std::set<T> items;
|
||||
|
||||
for_each([&items](T value) {
|
||||
items.insert(value);
|
||||
});
|
||||
@ -635,6 +706,7 @@ namespace boolinq {
|
||||
std::unordered_set<T> toStdUnorderedSet() const
|
||||
{
|
||||
std::unordered_set<T> items;
|
||||
|
||||
for_each([&items](T value) {
|
||||
items.insert(value);
|
||||
});
|
||||
@ -647,18 +719,18 @@ namespace boolinq {
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, BytesDirection, T, int>, int>(
|
||||
std::make_tuple(*this, direction, T(), sizeof(T)),
|
||||
[](std::tuple<Linq<S, T>, BytesDirection, T, int> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
BytesDirection &bytesDirection = std::get<1>(tuple);
|
||||
T &value = std::get<2>(tuple);
|
||||
int &index = std::get<3>(tuple);
|
||||
[](std::tuple<Linq<S, T>, BytesDirection, T, int>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
BytesDirection& bytesDirection = std::get<1>(tuple);
|
||||
T& value = std::get<2>(tuple);
|
||||
int& index = std::get<3>(tuple);
|
||||
|
||||
if (index == sizeof(T)) {
|
||||
value = linq.next();
|
||||
index = 0;
|
||||
}
|
||||
|
||||
unsigned char *ptr = reinterpret_cast<unsigned char *>(&value);
|
||||
unsigned char* ptr = reinterpret_cast<unsigned char*>(&value);
|
||||
|
||||
int byteIndex = index;
|
||||
if (bytesDirection == BytesLastToFirst) {
|
||||
@ -676,13 +748,14 @@ namespace boolinq {
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, BytesDirection, int>, TRet>(
|
||||
std::make_tuple(*this, direction, 0),
|
||||
[](std::tuple<Linq<S, T>, BytesDirection, int> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
BytesDirection &bytesDirection = std::get<1>(tuple);
|
||||
int &index = std::get<2>(tuple);
|
||||
[](std::tuple<Linq<S, T>, BytesDirection, int>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
BytesDirection& bytesDirection = std::get<1>(tuple);
|
||||
|
||||
/*int& index =*/ std::get<2>(tuple);
|
||||
|
||||
TRet value;
|
||||
unsigned char *ptr = reinterpret_cast<unsigned char *>(&value);
|
||||
unsigned char* ptr = reinterpret_cast<unsigned char*>(&value);
|
||||
|
||||
for (int i = 0; i < sizeof(TRet); i++) {
|
||||
int byteIndex = i;
|
||||
@ -698,23 +771,24 @@ namespace boolinq {
|
||||
);
|
||||
}
|
||||
|
||||
Linq<std::tuple<Linq<S, T>, BytesDirection, BitsDirection, T, int>, int> bits(BitsDirection bitsDir = BitsHighToLow, BytesDirection bytesDir = BytesFirstToLast) const
|
||||
Linq<std::tuple<Linq<S, T>, BytesDirection, BitsDirection, T, int>, int> bits(BitsDirection bitsDir = BitsHighToLow,
|
||||
BytesDirection bytesDir = BytesFirstToLast) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, BytesDirection, BitsDirection, T, int>, int>(
|
||||
std::make_tuple(*this, bytesDir, bitsDir, T(), sizeof(T) * CHAR_BIT),
|
||||
[](std::tuple<Linq<S, T>, BytesDirection, BitsDirection, T, int> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
BytesDirection &bytesDirection = std::get<1>(tuple);
|
||||
BitsDirection &bitsDirection = std::get<2>(tuple);
|
||||
T &value = std::get<3>(tuple);
|
||||
int &index = std::get<4>(tuple);
|
||||
[](std::tuple<Linq<S, T>, BytesDirection, BitsDirection, T, int>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
BytesDirection& bytesDirection = std::get<1>(tuple);
|
||||
BitsDirection& bitsDirection = std::get<2>(tuple);
|
||||
T& value = std::get<3>(tuple);
|
||||
int& index = std::get<4>(tuple);
|
||||
|
||||
if (index == sizeof(T) * CHAR_BIT) {
|
||||
value = linq.next();
|
||||
index = 0;
|
||||
}
|
||||
|
||||
unsigned char *ptr = reinterpret_cast<unsigned char *>(&value);
|
||||
unsigned char* ptr = reinterpret_cast<unsigned char*>(&value);
|
||||
|
||||
int byteIndex = index / CHAR_BIT;
|
||||
if (bytesDirection == BytesLastToFirst) {
|
||||
@ -733,18 +807,20 @@ namespace boolinq {
|
||||
}
|
||||
|
||||
template<typename TRet = unsigned char>
|
||||
Linq<std::tuple<Linq<S, T>, BytesDirection, BitsDirection, int>, TRet> unbits(BitsDirection bitsDir = BitsHighToLow, BytesDirection bytesDir = BytesFirstToLast) const
|
||||
Linq<std::tuple<Linq<S, T>, BytesDirection, BitsDirection, int>, TRet> unbits(BitsDirection bitsDir = BitsHighToLow,
|
||||
BytesDirection bytesDir = BytesFirstToLast) const
|
||||
{
|
||||
return Linq<std::tuple<Linq<S, T>, BytesDirection, BitsDirection, int>, TRet>(
|
||||
std::make_tuple(*this, bytesDir, bitsDir, 0),
|
||||
[](std::tuple<Linq<S, T>, BytesDirection, BitsDirection, int> &tuple) {
|
||||
Linq<S, T> &linq = std::get<0>(tuple);
|
||||
BytesDirection &bytesDirection = std::get<1>(tuple);
|
||||
BitsDirection &bitsDirection = std::get<2>(tuple);
|
||||
int &index = std::get<3>(tuple);
|
||||
[](std::tuple<Linq<S, T>, BytesDirection, BitsDirection, int>& tuple) {
|
||||
Linq<S, T>& linq = std::get<0>(tuple);
|
||||
BytesDirection& bytesDirection = std::get<1>(tuple);
|
||||
BitsDirection& bitsDirection = std::get<2>(tuple);
|
||||
|
||||
/*int& index =*/ std::get<3>(tuple);
|
||||
|
||||
TRet value = TRet();
|
||||
unsigned char *ptr = reinterpret_cast<unsigned char *>(&value);
|
||||
unsigned char* ptr = reinterpret_cast<unsigned char*>(&value);
|
||||
|
||||
for (int i = 0; i < sizeof(TRet) * CHAR_BIT; i++) {
|
||||
int byteIndex = i / CHAR_BIT;
|
||||
@ -765,17 +841,19 @@ namespace boolinq {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template<typename S, typename T>
|
||||
std::ostream &operator<<(std::ostream &stream, Linq<S, T> linq)
|
||||
std::ostream& operator<<(std::ostream& stream, Linq<S, T> linq)
|
||||
{
|
||||
try {
|
||||
while (true) {
|
||||
stream << linq.next() << ' ';
|
||||
}
|
||||
}
|
||||
catch (LinqEndException &) {}
|
||||
catch (LinqEndException&) {}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
@ -784,33 +862,34 @@ namespace boolinq {
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T>
|
||||
Linq<std::pair<T, T>, typename std::iterator_traits<T>::value_type> from(const T & begin, const T & end)
|
||||
Linq<std::pair<T, T>, typename std::iterator_traits<T>::value_type> from(const T& begin, const T& end)
|
||||
{
|
||||
return Linq<std::pair<T, T>, typename std::iterator_traits<T>::value_type>(
|
||||
std::make_pair(begin, end),
|
||||
[](std::pair<T, T> &pair) {
|
||||
[](std::pair<T, T>& pair) {
|
||||
if (pair.first == pair.second) {
|
||||
throw LinqEndException();
|
||||
}
|
||||
|
||||
return *(pair.first++);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Linq<std::pair<T, T>, typename std::iterator_traits<T>::value_type> from(const T & it, int n)
|
||||
Linq<std::pair<T, T>, typename std::iterator_traits<T>::value_type> from(const T& it, int n)
|
||||
{
|
||||
return from(it, it + n);
|
||||
}
|
||||
|
||||
template<typename T, int N>
|
||||
Linq<std::pair<const T *, const T *>, T> from(T (&array)[N])
|
||||
Linq<std::pair<const T*, const T*>, T> from(T (& array)[N])
|
||||
{
|
||||
return from((const T *)(&array), (const T *)(&array) + N);
|
||||
return from((const T*)(&array), (const T*)(&array) + N);
|
||||
}
|
||||
|
||||
template<template<class> class TV, typename TT>
|
||||
auto from(const TV<TT> & container)
|
||||
auto from(const TV<TT>& container)
|
||||
-> decltype(from(container.cbegin(), container.cend()))
|
||||
{
|
||||
return from(container.cbegin(), container.cend());
|
||||
@ -818,7 +897,7 @@ namespace boolinq {
|
||||
|
||||
// std::list, std::vector, std::dequeue
|
||||
template<template<class, class> class TV, typename TT, typename TU>
|
||||
auto from(const TV<TT, TU> & container)
|
||||
auto from(const TV<TT, TU>& container)
|
||||
-> decltype(from(container.cbegin(), container.cend()))
|
||||
{
|
||||
return from(container.cbegin(), container.cend());
|
||||
@ -826,7 +905,7 @@ namespace boolinq {
|
||||
|
||||
// std::set
|
||||
template<template<class, class, class> class TV, typename TT, typename TS, typename TU>
|
||||
auto from(const TV<TT, TS, TU> & container)
|
||||
auto from(const TV<TT, TS, TU>& container)
|
||||
-> decltype(from(container.cbegin(), container.cend()))
|
||||
{
|
||||
return from(container.cbegin(), container.cend());
|
||||
@ -834,7 +913,7 @@ namespace boolinq {
|
||||
|
||||
// std::map
|
||||
template<template<class, class, class, class> class TV, typename TK, typename TT, typename TS, typename TU>
|
||||
auto from(const TV<TK, TT, TS, TU> & container)
|
||||
auto from(const TV<TK, TT, TS, TU>& container)
|
||||
-> decltype(from(container.cbegin(), container.cend()))
|
||||
{
|
||||
return from(container.cbegin(), container.cend());
|
||||
@ -842,42 +921,45 @@ namespace boolinq {
|
||||
|
||||
// std::array
|
||||
template<template<class, size_t> class TV, typename TT, size_t TL>
|
||||
auto from(const TV<TT, TL> & container)
|
||||
auto from(const TV<TT, TL>& container)
|
||||
-> decltype(from(container.cbegin(), container.cend()))
|
||||
{
|
||||
return from(container.cbegin(), container.cend());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Linq<std::pair<T, int>, T> repeat(const T & value, int count) {
|
||||
Linq<std::pair<T, int>, T> repeat(const T& value, int count) {
|
||||
return Linq<std::pair<T, int>, T>(
|
||||
std::make_pair(value, count),
|
||||
[](std::pair<T, int> &pair) {
|
||||
[](std::pair<T, int>& pair) {
|
||||
if (pair.second > 0) {
|
||||
pair.second--;
|
||||
return pair.first;
|
||||
}
|
||||
|
||||
throw LinqEndException();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Linq<std::tuple<T, T, T>, T> range(const T & start, const T & end, const T & step) {
|
||||
Linq<std::tuple<T, T, T>, T> range(const T& start, const T& end, const T& step) {
|
||||
return Linq<std::tuple<T, T, T>, T>(
|
||||
std::make_tuple(start, end, step),
|
||||
[](std::tuple<T, T, T> &tuple) {
|
||||
T &start = std::get<0>(tuple);
|
||||
T &end = std::get<1>(tuple);
|
||||
T &step = std::get<2>(tuple);
|
||||
[](std::tuple<T, T, T>& tuple) {
|
||||
T& start = std::get<0>(tuple);
|
||||
T& end = std::get<1>(tuple);
|
||||
T& step = std::get<2>(tuple);
|
||||
|
||||
T value = start;
|
||||
if (value < end) {
|
||||
start += step;
|
||||
return value;
|
||||
}
|
||||
|
||||
throw LinqEndException();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@ -37,7 +37,7 @@ bool FeedDownloader::isUpdateRunning() const {
|
||||
}
|
||||
|
||||
void FeedDownloader::updateAvailableFeeds() {
|
||||
for (const Feed* feed : m_feeds) {
|
||||
for (const Feed* feed : qAsConst(m_feeds)) {
|
||||
auto* cache = dynamic_cast<CacheForServiceRoot*>(feed->getParentServiceRoot());
|
||||
|
||||
if (cache != nullptr) {
|
||||
|
@ -6,9 +6,6 @@
|
||||
#include <QDebug>
|
||||
#include <QtGlobal>
|
||||
|
||||
//
|
||||
// Constants.
|
||||
//
|
||||
#define SERVICE_CODE_STD_RSS "std-rss"
|
||||
#define SERVICE_CODE_TT_RSS "tt-rss"
|
||||
#define SERVICE_CODE_OWNCLOUD "owncloud"
|
||||
@ -17,51 +14,52 @@
|
||||
#define SERVICE_CODE_INOREADER "inoreader"
|
||||
#define SERVICE_CODE_GMAIL "gmail"
|
||||
|
||||
#define ARGUMENTS_LIST_SEPARATOR "\n"
|
||||
|
||||
#define OAUTH_DECRYPTION_KEY 11451167756100761335ul
|
||||
#define ADBLOCK_HOWTO_FILTERS "https://help.eyeo.com/en/adblockplus/how-to-write-filters"
|
||||
#define ADBLOCK_UPDATE_DAYS_INTERVAL 14
|
||||
#define ADBLOCK_ICON_ACTIVE "adblock"
|
||||
#define ADBLOCK_ICON_DISABLED "adblock-disabled"
|
||||
#define IS_IN_ARRAY(offset, array) ((offset >= 0) && (offset < array.count()))
|
||||
#define ADBLOCK_CUSTOMLIST_NAME "customlist.txt"
|
||||
#define ADBLOCK_LISTS_SUBDIRECTORY "adblock"
|
||||
#define ADBLOCK_EASYLIST_URL "https://easylist.to/easylist/easylist.txt"
|
||||
#define DEFAULT_SQL_MESSAGES_FILTER "0 > 1"
|
||||
#define MAX_MULTICOLUMN_SORT_STATES 3
|
||||
|
||||
#define OAUTH_DECRYPTION_KEY 11451167756100761335ul
|
||||
#define OAUTH_REDIRECT_URI_PORT 14488
|
||||
#define OAUTH_REDIRECT_URI "http://localhost"
|
||||
|
||||
#define ENCLOSURES_OUTER_SEPARATOR '#'
|
||||
#define ECNLOSURES_INNER_SEPARATOR '&'
|
||||
|
||||
#define URI_SCHEME_FEED_SHORT "feed:"
|
||||
#define URI_SCHEME_FEED "feed://"
|
||||
#define URI_SCHEME_HTTP "http://"
|
||||
#define RELEASES_LIST "https://api.github.com/repos/martinrotter/rssguard/releases"
|
||||
|
||||
#define DEFAULT_LOCALE "en"
|
||||
#define DEFAULT_FEED_ENCODING "UTF-8"
|
||||
|
||||
#define NO_PARENT_CATEGORY -1
|
||||
#define ID_RECYCLE_BIN -2
|
||||
#define ID_IMPORTANT -3
|
||||
#define ID_LABELS -4
|
||||
|
||||
#define ARGUMENTS_LIST_SEPARATOR "\n"
|
||||
#define IS_IN_ARRAY(offset, array) ((offset >= 0) && (offset < array.count()))
|
||||
#define DEFAULT_SQL_MESSAGES_FILTER "0 > 1"
|
||||
#define MAX_MULTICOLUMN_SORT_STATES 3
|
||||
#define RELEASES_LIST "https://api.github.com/repos/martinrotter/rssguard/releases"
|
||||
#define MSG_FILTERING_HELP "https://github.com/martinrotter/rssguard/blob/master/resources/docs/Message-filters.md#message-filtering"
|
||||
#define DEFAULT_FEED_TYPE "RSS"
|
||||
#define URL_REGEXP "^(http|https|feed|ftp):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&:/~\\+#]*[\\w\\-\\@?^=%&/~\\+#])?$"
|
||||
#define SCRIPT_SOURCE_TYPE_REGEXP "^.+#.*$"
|
||||
#define TEXT_TITLE_LIMIT 30
|
||||
#define RESELECT_MESSAGE_THRESSHOLD 500
|
||||
#define ICON_SIZE_SETTINGS 16
|
||||
#define NO_PARENT_CATEGORY -1
|
||||
#define ID_RECYCLE_BIN -2
|
||||
#define ID_IMPORTANT -3
|
||||
#define ID_LABELS -4
|
||||
#define TRAY_ICON_BUBBLE_TIMEOUT 20000
|
||||
#define CLOSE_LOCK_TIMEOUT 500
|
||||
#define DOWNLOAD_TIMEOUT 30000
|
||||
#define MESSAGES_VIEW_DEFAULT_COL 100
|
||||
#define MESSAGES_VIEW_MINIMUM_COL 16
|
||||
#define FEEDS_VIEW_COLUMN_COUNT 2
|
||||
#define FEED_DOWNLOADER_MAX_THREADS 3
|
||||
#define DEFAULT_DAYS_TO_DELETE_MSG 14
|
||||
#define ELLIPSIS_LENGTH 3
|
||||
#define MIN_CATEGORY_NAME_LENGTH 1
|
||||
#define DEFAULT_AUTO_UPDATE_INTERVAL 15
|
||||
#define OAUTH_REDIRECT_URI_PORT 14488
|
||||
#define OAUTH_REDIRECT_URI "http://localhost"
|
||||
#define AUTO_UPDATE_INTERVAL 60000
|
||||
#define STARTUP_UPDATE_DELAY 15.0 // In seconds.
|
||||
#define TIMEZONE_OFFSET_LIMIT 6
|
||||
@ -74,13 +72,14 @@
|
||||
#define FILTER_WIDTH 150
|
||||
#define FILTER_RIGHT_MARGIN 5
|
||||
#define FEEDS_VIEW_INDENTATION 10
|
||||
#define ACCEPT_HEADER_FOR_FEED_DOWNLOADER "application/atom+xml,application/xml;q=0.9,text/xml;q=0.8,*/*;q=0.7"
|
||||
#define MIME_TYPE_ITEM_POINTER "rssguard/itempointer"
|
||||
#define DOWNLOADER_ICON_SIZE 48
|
||||
#define GOOGLE_SEARCH_URL "https://www.google.com/search?q=%1&ie=utf-8&oe=utf-8"
|
||||
#define GOOGLE_SUGGEST_URL "http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=%1"
|
||||
#define ENCRYPTION_FILE_NAME "key.private"
|
||||
#define RELOAD_MODEL_BORDER_NUM 10
|
||||
|
||||
#define GOOGLE_SEARCH_URL "https://www.google.com/search?q=%1&ie=utf-8&oe=utf-8"
|
||||
#define GOOGLE_SUGGEST_URL "http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=%1"
|
||||
|
||||
#define EXTERNAL_TOOL_SEPARATOR "###"
|
||||
#define EXTERNAL_TOOL_PARAM_SEPARATOR "|||"
|
||||
#define EXECUTION_LINE_USER_DATA_PLACEHOLDER "%data%"
|
||||
@ -127,11 +126,8 @@
|
||||
#define INTERNAL_URL_BLANK "http://rssguard.blank"
|
||||
#define INTERNAL_URL_ADBLOCKED "http://rssguard.adblocked"
|
||||
#define INTERNAL_URL_MESSAGE_HOST "rssguard.message"
|
||||
#define INTERNAL_URL_BLANK_HOST "rssguard.blank"
|
||||
#define INTERNAL_URL_PASSATTACHMENT "http://rssguard.passattachment"
|
||||
|
||||
#define FEED_INITIAL_OPML_PATTERN "feeds-%1.opml"
|
||||
|
||||
#define FEED_REGEX_MATCHER "<link[^>]+type=\"application\\/(?:atom\\+xml|rss\\+xml|feed\\+json|json)\"[^>]*>"
|
||||
#define FEED_HREF_REGEX_MATCHER "href=\"([^\"]+)\""
|
||||
|
||||
@ -154,7 +150,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 "21"
|
||||
#define APP_DB_SCHEMA_VERSION "1"
|
||||
#define APP_DB_UPDATE_FILE_PATTERN "db_update_%1_%2_%3.sql"
|
||||
#define APP_DB_COMMENT_SPLIT "-- !\n"
|
||||
#define APP_DB_NAME_PLACEHOLDER "##"
|
||||
@ -242,6 +238,8 @@
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
#define OS_ID "Linux"
|
||||
#elif defined(Q_OS_OS2)
|
||||
#define OS_ID "OS/2"
|
||||
#elif defined(Q_OS_OSX)
|
||||
#define OS_ID "Mac OS X"
|
||||
#elif defined(Q_OS_WIN)
|
||||
|
@ -181,6 +181,7 @@ HEADERS += core/feeddownloader.h \
|
||||
services/owncloud/owncloudserviceentrypoint.h \
|
||||
services/owncloud/owncloudserviceroot.h \
|
||||
services/standard/atomparser.h \
|
||||
services/standard/definitions.h \
|
||||
services/standard/feedparser.h \
|
||||
services/abstract/gui/authenticationdetails.h \
|
||||
services/standard/gui/formeditstandardaccount.h \
|
||||
|
9
src/librssguard/services/standard/definitions.h
Normal file
9
src/librssguard/services/standard/definitions.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef STANDARD_DEFINITIONS_H
|
||||
#define STANDARD_DEFINITIONS_H
|
||||
|
||||
#define DEFAULT_FEED_ENCODING "UTF-8"
|
||||
#define DEFAULT_FEED_TYPE "RSS"
|
||||
#define MIN_CATEGORY_NAME_LENGTH 1
|
||||
#define FEED_INITIAL_OPML_PATTERN "feeds-%1.opml"
|
||||
|
||||
#endif // STANDARD_DEFINITIONS_H
|
@ -11,6 +11,7 @@
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/abstract/rootitem.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "services/standard/standardcategory.h"
|
||||
#include "services/standard/standardserviceroot.h"
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "services/abstract/category.h"
|
||||
#include "services/standard/definitions.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QFileDialog>
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "network-web/networkfactory.h"
|
||||
#include "services/abstract/recyclebin.h"
|
||||
#include "services/standard/atomparser.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "services/standard/gui/formstandardfeeddetails.h"
|
||||
#include "services/standard/jsonparser.h"
|
||||
#include "services/standard/rdfparser.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "definitions/definitions.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/iconfactory.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "services/standard/standardcategory.h"
|
||||
#include "services/standard/standardfeed.h"
|
||||
#include "services/standard/standardserviceroot.h"
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "services/abstract/importantnode.h"
|
||||
#include "services/abstract/labelsnode.h"
|
||||
#include "services/abstract/recyclebin.h"
|
||||
#include "services/standard/definitions.h"
|
||||
#include "services/standard/gui/formeditstandardaccount.h"
|
||||
#include "services/standard/gui/formstandardcategorydetails.h"
|
||||
#include "services/standard/gui/formstandardfeeddetails.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user