mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 00:06:16 -07:00
Add file association settings to program preferences (Windows)
This commit is contained in:
parent
11a068dfdd
commit
b58b4d0066
5 changed files with 110 additions and 35 deletions
|
@ -284,11 +284,12 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
|
|||
|
||||
qDebug("GUI Built");
|
||||
#ifdef Q_WS_WIN
|
||||
if(!pref.neverCheckFileAssoc() && !Preferences::isFileAssocOk()) {
|
||||
if(!pref.neverCheckFileAssoc() && (!Preferences::isTorrentFileAssocSet() || !Preferences::isMagnetLinkAssocSet())) {
|
||||
if(QMessageBox::question(0, tr("Torrent file association"),
|
||||
tr("qBittorrent is not the default application to open torrent files or Magnet links.\nDo you want to associate qBittorrent to torrent files and Magnet links?"),
|
||||
QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) {
|
||||
Preferences::setFileAssoc();
|
||||
Preferences::setTorrentFileAssoc(true);
|
||||
Preferences::setMagnetLinkAssoc(true);
|
||||
} else {
|
||||
pref.setNeverCheckFileAssoc();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue