diff --git a/localization/rssguard_en.ts b/localization/rssguard_en.ts index bbf909fc1..bec6517f2 100755 --- a/localization/rssguard_en.ts +++ b/localization/rssguard_en.ts @@ -422,89 +422,89 @@ version by clicking this popup notification. DownloadItem - + Error opening output file: %1 Error opening output file: %1 - + Select destination for downloaded file Select destination for downloaded file - + Error: %1 Error: %1 - + Download directory couldn't be created Download directory couldn't be created - + Error when saving file: %1 Error when saving file: %1 - + %1 of %2 (%3 per second) - %4 %1 of %2 (%3 per second) - %4 - + %1 of %2 - download completed %1 of %2 - download completed - + Cannot open file Cannot open file - + Cannot open output file. Open it manually. Cannot open output file. Open it manually. - + Cannot open directory Cannot open directory - + Cannot open output directory. Open it manually. Cannot open output directory. Open it manually. - + Download finished Download finished - + File '%1' is downloaded. Click here to open parent directory. File '%1' is downloaded. Click here to open parent directory. - + URL: %1 URL: %1 - + Local file: %1 Local file: %1 - + Selection of local file cancelled. Selection of local file cancelled. - + Open folder @@ -537,7 +537,7 @@ Click here to open parent directory. DownloadManager - + %n minutes remaining @@ -545,7 +545,7 @@ Click here to open parent directory. - + %n seconds remaining @@ -553,27 +553,12 @@ Click here to open parent directory. - + bytes bytes - - - kB - kB - - - - MB - MB - - - - GB - GB - - + Downloading %n file(s)... @@ -1285,22 +1270,17 @@ QtWebEngine cache folder -> "%7" - - ... - - - - + Contents of your e-mail message - + Subject - + Title of your message @@ -1337,19 +1317,9 @@ QtWebEngine cache folder -> "%7" Edit label '%1' - - - ... - - FormAddEditProbe - - - ... - - Name for your query @@ -4028,26 +3998,15 @@ Login tokens expiration: %2 - - - . - - - - + Text background color - + Font size - - - ... - - Standard @@ -4151,11 +4110,6 @@ Login tokens expiration: %2 Unknown error: '%1'. - - - MariaDB - - MessageBrowser @@ -4334,11 +4288,6 @@ Login tokens expiration: %2 Title Title - - - Url - Url - Author @@ -4419,6 +4368,11 @@ Login tokens expiration: %2 feed icon + + + URL + URL + RTL @@ -4860,25 +4814,15 @@ Login tokens expiration: %2 NetworkProxyDetails - + No proxy No proxy - + System proxy System proxy - - - Socks5 - Socks5 - - - - Http - Http - Form @@ -5920,11 +5864,6 @@ File filter for external e-mail selection dialog. Opera 12 or older Opera 12 or older - - - Mozilla Thunderbird - Mozilla Thunderbird - Enter (optional) parameters: @@ -5936,93 +5875,88 @@ File filter for external e-mail selection dialog. - + Network - + Do not accept any incoming cookies - + Enable HTTP/2 - - WebEngine - - - - + Custom "QTWEBENGINE_CHROMIUM_FLAGS" flags - + Disable cache - + External web browser - + Always open hyperlinks in external web browser - - + + <html><head/><body><p>If unchecked, then default system-wide web browser is used.</p></body></html> - + Use custom external web browser - + Web browser executable - + Executable file of web browser - - + + &Browse - - + + Parameters - - + + Parameters passed to executable - - + + Use sample arguments for - + Select browser @@ -6032,27 +5966,27 @@ File filter for external e-mail selection dialog. - + External e-mail client - + Use custom external e-mail client - + E-mail client executable - + Executable file of e-mail client - + Select client @@ -6064,22 +5998,22 @@ File filter for external e-mail selection dialog. - + External tools - + &Add tool - + &Edit selected tool - + &Delete selected tool @@ -6843,21 +6777,11 @@ Also, relaunch "Settings" dialog after you install Node.js. Node.js has version %1. - - - Node.js: %1. - - NPM has version %1. - - - NPM: %1. - - You cannot choose file, you have to choose FOLDER. diff --git a/src/librssguard/3rd-party/sc/simplecrypt.cpp b/src/librssguard/3rd-party/sc/simplecrypt.cpp index cf7297920..172106975 100644 --- a/src/librssguard/3rd-party/sc/simplecrypt.cpp +++ b/src/librssguard/3rd-party/sc/simplecrypt.cpp @@ -36,17 +36,11 @@ #include #include -SimpleCrypt::SimpleCrypt() : - m_key(0), - m_compressionMode(CompressionAlways), - m_protectionMode(ProtectionHash), - m_lastError(ErrorNoError) {} +SimpleCrypt::SimpleCrypt() + : m_key(0), m_compressionMode(CompressionAlways), m_protectionMode(ProtectionHash), m_lastError(ErrorNoError) {} -SimpleCrypt::SimpleCrypt(quint64 key) : - m_key(key), - m_compressionMode(CompressionAlways), - m_protectionMode(ProtectionHash), - m_lastError(ErrorNoError) { +SimpleCrypt::SimpleCrypt(quint64 key) + : m_key(key), m_compressionMode(CompressionAlways), m_protectionMode(ProtectionHash), m_lastError(ErrorNoError) { splitKey(); } @@ -86,13 +80,13 @@ QByteArray SimpleCrypt::encryptToByteArray(QByteArray plaintext) { CryptoFlags flags = CryptoFlagNone; if (m_compressionMode == CompressionAlways) { - ba = qCompress(ba, 9); //maximum compression + ba = qCompress(ba, 9); // maximum compression flags |= CryptoFlagCompression; } else if (m_compressionMode == CompressionAuto) { QByteArray compressed = qCompress(ba, 9); - if (compressed.count() < ba.count()) { + if (compressed.size() < ba.size()) { ba = compressed; flags |= CryptoFlagCompression; } @@ -118,13 +112,13 @@ QByteArray SimpleCrypt::encryptToByteArray(QByteArray plaintext) { integrityProtection += hash.result(); } - //prepend a random char to the string + // prepend a random char to the string char randomChar = char(QRandomGenerator::global()->generate() & 0xFF); ba = randomChar + integrityProtection + ba; int pos(0); char lastChar(0); - int cnt = ba.count(); + int cnt = ba.size(); while (pos < cnt) { ba[pos] = ba.at(pos) ^ m_keyParts.at(pos % 8) ^ lastChar; @@ -134,8 +128,8 @@ QByteArray SimpleCrypt::encryptToByteArray(QByteArray plaintext) { QByteArray resultArray; - resultArray.append(char(0x03)); //version for future updates to algorithm - resultArray.append(char(flags)); //encryption flags + resultArray.append(char(0x03)); // version for future updates to algorithm + resultArray.append(char(flags)); // encryption flags resultArray.append(ba); m_lastError = ErrorNoError; return resultArray; @@ -187,13 +181,13 @@ QByteArray SimpleCrypt::decryptToByteArray(QByteArray cypher) { QByteArray ba = cypher; - if (cypher.count() < 3) { + if (cypher.size() < 3) { return QByteArray(); } char version = ba.at(0); - if (version != 3) { //we only work with version 3 + if (version != 3) { // we only work with version 3 m_lastError = ErrorUnknownVersion; qWarning() << "Invalid version or not a cyphertext."; return QByteArray(); @@ -203,7 +197,7 @@ QByteArray SimpleCrypt::decryptToByteArray(QByteArray cypher) { ba = ba.mid(2); int pos(0); - int cnt(ba.count()); + int cnt(ba.size()); char lastChar = 0; while (pos < cnt) { @@ -214,7 +208,7 @@ QByteArray SimpleCrypt::decryptToByteArray(QByteArray cypher) { ++pos; } - ba = ba.mid(1); //chop off the random number at the start + ba = ba.mid(1); // chop off the random number at the start bool integrityOk(true); if (flags.testFlag(CryptoFlagChecksum)) { diff --git a/src/librssguard/3rd-party/sc/simplecrypt.h b/src/librssguard/3rd-party/sc/simplecrypt.h index cd888c3d2..39558d63c 100644 --- a/src/librssguard/3rd-party/sc/simplecrypt.h +++ b/src/librssguard/3rd-party/sc/simplecrypt.h @@ -58,15 +58,15 @@ class SimpleCrypt { public: - /** CompressionMode describes if compression will be applied to the data to be encrypted. */ enum CompressionMode { - CompressionAuto, /*!< Only apply compression if that results in a shorter plaintext. */ - CompressionAlways, /*!< Always apply compression. Note that for short inputs, a compression may result in longer data */ - CompressionNever /*!< Never apply compression. */ + CompressionAuto, /*!< Only apply compression if that results in a shorter plaintext. */ + CompressionAlways, /*!< Always apply compression. Note that for short inputs, a compression may result in longer + data */ + CompressionNever /*!< Never apply compression. */ }; /** @@ -78,19 +78,22 @@ class SimpleCrypt { appears to be valid after decryption. */ enum IntegrityProtectionMode { - ProtectionNone, /*!< The integerity of the encrypted data is not protected. It is not really possible to detect a wrong key, for instance. */ - ProtectionChecksum,/*!< A simple checksum is used to verify that the data is in order. If not, an empty string is returned. */ - ProtectionHash /*!< A cryptographic hash is used to verify the integrity of the data. This method produces a much stronger, but longer check */ + ProtectionNone, /*!< The integerity of the encrypted data is not protected. It is not really possible to detect a + wrong key, for instance. */ + ProtectionChecksum, /*!< A simple checksum is used to verify that the data is in order. If not, an empty string is + returned. */ + ProtectionHash /*!< A cryptographic hash is used to verify the integrity of the data. This method produces a much + stronger, but longer check */ }; /** Error describes the type of error that occured. */ enum Error { - ErrorNoError, /*!< No error occurred. */ - ErrorNoKeySet, /*!< No key was set. You can not encrypt or decrypt without a valid key. */ - ErrorUnknownVersion, /*!< The version of this data is unknown, or the data is otherwise not valid. */ - ErrorIntegrityFailed /*!< The integrity check of the data failed. Perhaps the wrong key was used. */ + ErrorNoError, /*!< No error occurred. */ + ErrorNoKeySet, /*!< No key was set. You can not encrypt or decrypt without a valid key. */ + ErrorUnknownVersion, /*!< The version of this data is unknown, or the data is otherwise not valid. */ + ErrorIntegrityFailed /*!< The integrity check of the data failed. Perhaps the wrong key was used. */ }; /** @@ -228,12 +231,14 @@ class SimpleCrypt { */ QByteArray decryptToByteArray(QByteArray cypher); - //enum to describe options that have been used for the encryption. Currently only one, but - //that only leaves room for future extensions like adding a cryptographic hash... - enum CryptoFlag {CryptoFlagNone = 0, - CryptoFlagCompression = 0x01, - CryptoFlagChecksum = 0x02, - CryptoFlagHash = 0x04}; + // enum to describe options that have been used for the encryption. Currently only one, but + // that only leaves room for future extensions like adding a cryptographic hash... + enum CryptoFlag { + CryptoFlagNone = 0, + CryptoFlagCompression = 0x01, + CryptoFlagChecksum = 0x02, + CryptoFlagHash = 0x04 + }; Q_DECLARE_FLAGS(CryptoFlags, CryptoFlag) diff --git a/src/librssguard/database/databasequeries.cpp b/src/librssguard/database/databasequeries.cpp index c42699e1e..7e9b514fa 100644 --- a/src/librssguard/database/databasequeries.cpp +++ b/src/librssguard/database/databasequeries.cpp @@ -678,8 +678,7 @@ ArticleCounts DatabaseQueries::getMessageCountsForFeed(const QSqlDatabase& db, q.setForwardOnly(true); q.prepare(QSL("SELECT COUNT(*), SUM(is_read) FROM Messages " - "WHERE feed = :feed AND is_deleted = 0 AND is_pdeleted = 0 AND " - " is_read = 0 AND account_id = :account_id;")); + "WHERE feed = :feed AND is_deleted = 0 AND is_pdeleted = 0 AND account_id = :account_id;")); q.bindValue(QSL(":feed"), feed_custom_id); q.bindValue(QSL(":account_id"), account_id);