mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-18 21:43:54 +03:00
parent
7be27f7770
commit
2e66ddb0a0
2 changed files with 71 additions and 69 deletions
|
@ -118,7 +118,10 @@ namespace
|
|||
const QString KEY_DOWNLOAD_TRACKER_FAVICON = NOTIFICATIONS_SETTINGS_KEY("DownloadTrackerFavicon");
|
||||
|
||||
// just a shortcut
|
||||
inline SettingsStorage *settings() { return SettingsStorage::instance(); }
|
||||
inline SettingsStorage *settings()
|
||||
{
|
||||
return SettingsStorage::instance();
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
|
@ -609,7 +612,6 @@ void MainWindow::displayRSSTab(bool enable)
|
|||
else if (m_rssWidget) {
|
||||
delete m_rssWidget;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::updateRSSTabLabel(int count)
|
||||
|
@ -630,7 +632,6 @@ void MainWindow::displaySearchTab(bool enable)
|
|||
else if (m_searchWidget) {
|
||||
delete m_searchWidget;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::updateNbTorrents()
|
||||
|
@ -854,10 +855,9 @@ void MainWindow::on_actionSetGlobalDownloadLimit_triggered()
|
|||
void MainWindow::on_actionExit_triggered()
|
||||
{
|
||||
// UI locking enforcement.
|
||||
if (isHidden() && m_uiLocked) {
|
||||
if (isHidden() && m_uiLocked)
|
||||
// Ask for UI lock password
|
||||
if (!unlockUI()) return;
|
||||
}
|
||||
|
||||
m_forceExit = true;
|
||||
close();
|
||||
|
@ -999,12 +999,11 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
|||
m_forceExit = false;
|
||||
return;
|
||||
}
|
||||
if (confirmBox.clickedButton() == alwaysBtn) {
|
||||
if (confirmBox.clickedButton() == alwaysBtn)
|
||||
// Remember choice
|
||||
Preferences::instance()->setConfirmOnExit(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// abort search if any
|
||||
if (m_searchWidget)
|
||||
|
@ -1348,8 +1347,8 @@ void MainWindow::downloadFromURLList(const QStringList& urlList)
|
|||
{
|
||||
const bool useTorrentAdditionDialog = AddNewTorrentDialog::isEnabled();
|
||||
foreach (QString url, urlList) {
|
||||
if ((url.size() == 40 && !url.contains(QRegExp("[^0-9A-Fa-f]")))
|
||||
|| (url.size() == 32 && !url.contains(QRegExp("[^2-7A-Za-z]"))))
|
||||
if (((url.size() == 40) && !url.contains(QRegExp("[^0-9A-Fa-f]")))
|
||||
|| ((url.size() == 32) && !url.contains(QRegExp("[^2-7A-Za-z]"))))
|
||||
url = "magnet:?xt=urn:btih:" + url;
|
||||
|
||||
if (useTorrentAdditionDialog)
|
||||
|
@ -1590,6 +1589,7 @@ void MainWindow::handleUpdateCheckFinished(bool updateAvailable, QString newVers
|
|||
if (Preferences::instance()->isUpdateCheckEnabled() && (answer == QMessageBox::Yes))
|
||||
m_programUpdateTimer->start();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void MainWindow::on_actionDonateMoney_triggered()
|
||||
|
@ -1734,6 +1734,7 @@ void MainWindow::checkProgramUpdate()
|
|||
connect(updater, SIGNAL(updateCheckFinished(bool,QString,bool)), SLOT(handleUpdateCheckFinished(bool,QString,bool)));
|
||||
updater->checkForUpdates();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
@ -1812,4 +1813,5 @@ void MainWindow::pythonDownloadFailure(const QString &url, const QString &error)
|
|||
setCursor(QCursor(Qt::ArrowCursor));
|
||||
QMessageBox::warning(this, tr("Download error"), tr("Python setup could not be downloaded, reason: %1.\nPlease install it manually.").arg(error));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue