mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-30 20:28:05 -06:00
Revise legal notice
For GUI and non-daemon console, the legal notice won't ask for user acceptance anymore and only provide an OK button (or Enter key in console) from now on. For daemon mode, qbt will print the legal notice and continue to run. It will also notify user to use command line option `--confirm-legal-notice` to suppress the message. The message will be printed on every start up unless user specify the command line option once. PR #20080.
This commit is contained in:
@@ -1480,19 +1480,6 @@ void Preferences::setDNSLastIP(const QString &ip)
|
||||
setValue(u"DNSUpdater/lastIP"_s, ip);
|
||||
}
|
||||
|
||||
bool Preferences::getAcceptedLegal() const
|
||||
{
|
||||
return value(u"LegalNotice/Accepted"_s, false);
|
||||
}
|
||||
|
||||
void Preferences::setAcceptedLegal(const bool accepted)
|
||||
{
|
||||
if (accepted == getAcceptedLegal())
|
||||
return;
|
||||
|
||||
setValue(u"LegalNotice/Accepted"_s, accepted);
|
||||
}
|
||||
|
||||
QByteArray Preferences::getMainGeometry() const
|
||||
{
|
||||
return value<QByteArray>(u"MainWindow/geometry"_s);
|
||||
|
||||
@@ -340,8 +340,6 @@ public:
|
||||
void setDNSLastUpd(const QDateTime &date);
|
||||
QString getDNSLastIP() const;
|
||||
void setDNSLastIP(const QString &ip);
|
||||
bool getAcceptedLegal() const;
|
||||
void setAcceptedLegal(bool accepted);
|
||||
QByteArray getMainGeometry() const;
|
||||
void setMainGeometry(const QByteArray &geometry);
|
||||
bool isFiltersSidebarVisible() const;
|
||||
|
||||
@@ -224,3 +224,9 @@ bool SettingsStorage::hasKey(const QString &key) const
|
||||
const QReadLocker locker {&m_lock};
|
||||
return m_data.contains(key);
|
||||
}
|
||||
|
||||
bool SettingsStorage::isEmpty() const
|
||||
{
|
||||
const QReadLocker locker {&m_lock};
|
||||
return m_data.isEmpty();
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ public:
|
||||
|
||||
void removeValue(const QString &key);
|
||||
bool hasKey(const QString &key) const;
|
||||
bool isEmpty() const;
|
||||
|
||||
public slots:
|
||||
bool save();
|
||||
|
||||
Reference in New Issue
Block a user