mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Merge pull request #2808 from ngosang/AnnounceToAllTrackers
Change default preferences
This commit is contained in:
commit
1be26cf2bd
@ -297,7 +297,7 @@ void Preferences::setMinimizeToTray(bool b)
|
|||||||
|
|
||||||
bool Preferences::closeToTray() const
|
bool Preferences::closeToTray() const
|
||||||
{
|
{
|
||||||
return value("Preferences/General/CloseToTray", false).toBool();
|
return value("Preferences/General/CloseToTray", true).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setCloseToTray(bool b)
|
void Preferences::setCloseToTray(bool b)
|
||||||
@ -629,7 +629,7 @@ int Preferences::getSessionPort() const
|
|||||||
QReadLocker locker(&lock);
|
QReadLocker locker(&lock);
|
||||||
if (useRandomPort())
|
if (useRandomPort())
|
||||||
return m_randomPort;
|
return m_randomPort;
|
||||||
return value("Preferences/Connection/PortRangeMin", 6881).toInt();
|
return value("Preferences/Connection/PortRangeMin", 8999).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setSessionPort(int port)
|
void Preferences::setSessionPort(int port)
|
||||||
@ -860,7 +860,7 @@ void Preferences::setMaxConnecsPerTorrent(int val)
|
|||||||
|
|
||||||
int Preferences::getMaxUploads() const
|
int Preferences::getMaxUploads() const
|
||||||
{
|
{
|
||||||
return value("Preferences/Bittorrent/MaxUploads", 8).toInt();
|
return value("Preferences/Bittorrent/MaxUploads", -1).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setMaxUploads(int val)
|
void Preferences::setMaxUploads(int val)
|
||||||
@ -872,7 +872,7 @@ void Preferences::setMaxUploads(int val)
|
|||||||
|
|
||||||
int Preferences::getMaxUploadsPerTorrent() const
|
int Preferences::getMaxUploadsPerTorrent() const
|
||||||
{
|
{
|
||||||
return value("Preferences/Bittorrent/MaxUploadsPerTorrent", 4).toInt();
|
return value("Preferences/Bittorrent/MaxUploadsPerTorrent", -1).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setMaxUploadsPerTorrent(int val)
|
void Preferences::setMaxUploadsPerTorrent(int val)
|
||||||
@ -1022,7 +1022,7 @@ void Preferences::setExecutionLogEnabled(bool b)
|
|||||||
// Queueing system
|
// Queueing system
|
||||||
bool Preferences::isQueueingSystemEnabled() const
|
bool Preferences::isQueueingSystemEnabled() const
|
||||||
{
|
{
|
||||||
return value("Preferences/Queueing/QueueingEnabled", false).toBool();
|
return value("Preferences/Queueing/QueueingEnabled", true).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setQueueingSystemEnabled(bool enabled)
|
void Preferences::setQueueingSystemEnabled(bool enabled)
|
||||||
@ -1481,7 +1481,7 @@ void Preferences::resolvePeerHostNames(bool resolve)
|
|||||||
|
|
||||||
int Preferences::getMaxHalfOpenConnections() const
|
int Preferences::getMaxHalfOpenConnections() const
|
||||||
{
|
{
|
||||||
const int val = value("Preferences/Connection/MaxHalfOpenConnec", 50).toInt();
|
const int val = value("Preferences/Connection/MaxHalfOpenConnec", 20).toInt();
|
||||||
if (val <= 0)
|
if (val <= 0)
|
||||||
return -1;
|
return -1;
|
||||||
return val;
|
return val;
|
||||||
@ -1556,7 +1556,7 @@ void Preferences::enableSuperSeeding(bool enabled)
|
|||||||
|
|
||||||
bool Preferences::announceToAllTrackers() const
|
bool Preferences::announceToAllTrackers() const
|
||||||
{
|
{
|
||||||
return value("Preferences/Advanced/AnnounceToAllTrackers", false).toBool();
|
return value("Preferences/Advanced/AnnounceToAllTrackers", true).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setAnnounceToAllTrackers(bool enabled)
|
void Preferences::setAnnounceToAllTrackers(bool enabled)
|
||||||
|
@ -239,19 +239,16 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Start seeding after creation</string>
|
<string>Start seeding after creation</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkIgnoreShareLimits">
|
<widget class="QCheckBox" name="checkIgnoreShareLimits">
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Ignore share ratio limits for this torrent</string>
|
<string>Ignore share ratio limits for this torrent</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -1068,7 +1068,7 @@
|
|||||||
<number>65535</number>
|
<number>65535</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<number>6881</number>
|
<number>8999</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -1177,7 +1177,7 @@
|
|||||||
<string>Maximum number of upload slots per torrent:</string>
|
<string>Maximum number of upload slots per torrent:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -1236,7 +1236,7 @@
|
|||||||
<string>Global maximum number of upload slots:</string>
|
<string>Global maximum number of upload slots:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -329,8 +329,8 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation,
|
|||||||
if (orientation == Qt::Horizontal) {
|
if (orientation == Qt::Horizontal) {
|
||||||
if (role == Qt::DisplayRole) {
|
if (role == Qt::DisplayRole) {
|
||||||
switch(section) {
|
switch(section) {
|
||||||
case TorrentModelItem::TR_NAME: return tr("Name", "i.e: torrent name");
|
|
||||||
case TorrentModelItem::TR_PRIORITY: return "#";
|
case TorrentModelItem::TR_PRIORITY: return "#";
|
||||||
|
case TorrentModelItem::TR_NAME: return tr("Name", "i.e: torrent name");
|
||||||
case TorrentModelItem::TR_SIZE: return tr("Size", "i.e: torrent size");
|
case TorrentModelItem::TR_SIZE: return tr("Size", "i.e: torrent size");
|
||||||
case TorrentModelItem::TR_PROGRESS: return tr("Done", "% Done");
|
case TorrentModelItem::TR_PROGRESS: return tr("Done", "% Done");
|
||||||
case TorrentModelItem::TR_STATUS: return tr("Status", "Torrent status (e.g. downloading, seeding, paused)");
|
case TorrentModelItem::TR_STATUS: return tr("Status", "Torrent status (e.g. downloading, seeding, paused)");
|
||||||
|
@ -42,7 +42,7 @@ class TorrentModelItem : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Column {TR_NAME, TR_PRIORITY, TR_SIZE, TR_TOTAL_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_AMOUNT_DOWNLOADED, TR_AMOUNT_UPLOADED, TR_AMOUNT_LEFT, TR_TIME_ELAPSED, TR_SAVE_PATH, TR_COMPLETED, TR_RATIO_LIMIT, TR_SEEN_COMPLETE_DATE, TR_LAST_ACTIVITY, TR_AMOUNT_DOWNLOADED_SESSION, TR_AMOUNT_UPLOADED_SESSION, NB_COLUMNS};
|
enum Column {TR_PRIORITY, TR_NAME, TR_SIZE, TR_TOTAL_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_AMOUNT_DOWNLOADED, TR_AMOUNT_UPLOADED, TR_AMOUNT_DOWNLOADED_SESSION, TR_AMOUNT_UPLOADED_SESSION, TR_AMOUNT_LEFT, TR_TIME_ELAPSED, TR_SAVE_PATH, TR_COMPLETED, TR_RATIO_LIMIT, TR_SEEN_COMPLETE_DATE, TR_LAST_ACTIVITY, NB_COLUMNS};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TorrentModelItem(BitTorrent::TorrentHandle *torrent);
|
TorrentModelItem(BitTorrent::TorrentHandle *torrent);
|
||||||
|
@ -101,7 +101,6 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window)
|
|||||||
|
|
||||||
// Default hidden columns
|
// Default hidden columns
|
||||||
if (!column_loaded) {
|
if (!column_loaded) {
|
||||||
setColumnHidden(TorrentModelItem::TR_PRIORITY, true);
|
|
||||||
setColumnHidden(TorrentModelItem::TR_ADD_DATE, true);
|
setColumnHidden(TorrentModelItem::TR_ADD_DATE, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_SEED_DATE, true);
|
setColumnHidden(TorrentModelItem::TR_SEED_DATE, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_UPLIMIT, true);
|
setColumnHidden(TorrentModelItem::TR_UPLIMIT, true);
|
||||||
@ -109,6 +108,8 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window)
|
|||||||
setColumnHidden(TorrentModelItem::TR_TRACKER, true);
|
setColumnHidden(TorrentModelItem::TR_TRACKER, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_AMOUNT_DOWNLOADED, true);
|
setColumnHidden(TorrentModelItem::TR_AMOUNT_DOWNLOADED, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_AMOUNT_UPLOADED, true);
|
setColumnHidden(TorrentModelItem::TR_AMOUNT_UPLOADED, true);
|
||||||
|
setColumnHidden(TorrentModelItem::TR_AMOUNT_DOWNLOADED_SESSION, true);
|
||||||
|
setColumnHidden(TorrentModelItem::TR_AMOUNT_UPLOADED_SESSION, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_AMOUNT_LEFT, true);
|
setColumnHidden(TorrentModelItem::TR_AMOUNT_LEFT, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_TIME_ELAPSED, true);
|
setColumnHidden(TorrentModelItem::TR_TIME_ELAPSED, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_SAVE_PATH, true);
|
setColumnHidden(TorrentModelItem::TR_SAVE_PATH, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user