1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-02 09:55:55 +00:00

Set expiration date for newly added cookie to +2 years from now, instead

of +99 years.

This fixes the ambiguity that users could assume the date was in the
past, but in fact it's in the future.
Ex. now date is 5/28/17, +99 years = 5/28/16, +2 years = 5/28/19
This commit is contained in:
Chocobo1 2017-05-29 00:22:59 +08:00
parent a585b02e76
commit 1ac7d779a7

View File

@ -145,7 +145,7 @@ bool CookiesModel::insertRows(int row, int count, const QModelIndex &parent)
if ((row < 0) || (row > m_cookies.size())) return false;
QNetworkCookie newCookie;
newCookie.setExpirationDate(QDateTime::currentDateTime().addYears(99));
newCookie.setExpirationDate(QDateTime::currentDateTime().addYears(2));
beginInsertRows(parent, row, row + count - 1);
while (count-- > 0)