mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07:00
Allow to set qBittorrent as default program
Register qBittorrent as possible default program for .torrent files and magnet links during install. PR #19446.
This commit is contained in:
parent
9de32a78f1
commit
6860c0d60d
10 changed files with 90 additions and 256 deletions
|
@ -885,23 +885,6 @@ int Application::exec()
|
|||
#endif
|
||||
m_window = new MainWindow(this, windowState);
|
||||
delete m_startupProgressDialog;
|
||||
#ifdef Q_OS_WIN
|
||||
auto *pref = Preferences::instance();
|
||||
if (!pref->neverCheckFileAssoc() && (!Utils::OS::isTorrentFileAssocSet() || !Utils::OS::isMagnetLinkAssocSet()))
|
||||
{
|
||||
if (QMessageBox::question(m_window, tr("Torrent file association")
|
||||
, tr("qBittorrent is not the default application for opening torrent files or Magnet links.\nDo you want to make qBittorrent the default application for these?")
|
||||
, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
|
||||
{
|
||||
Utils::OS::setTorrentFileAssoc(true);
|
||||
Utils::OS::setMagnetLinkAssoc(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
pref->setNeverCheckFileAssoc();
|
||||
}
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
#ifndef DISABLE_WEBUI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue