Check for file association on startup and ask the user if he wants to (Win32 only)

Added an executable icon on Win32
This commit is contained in:
Christophe Dumez
2010-05-30 21:34:15 +00:00
parent 12b4ee72fa
commit c15a890952
5 changed files with 47 additions and 0 deletions

View File

@@ -217,6 +217,15 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
}
qDebug("GUI Built");
#ifdef Q_WS_WIN
if(!Preferences::isFileAssocOk()) {
if(QMessageBox::question(0, tr("Torrent file association"),
tr("qBittorrent is not the default application to open torrent files.\nDo you want to associate qBittorrent to torrent files?"),
QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) {
Preferences::setFileAssoc();
}
}
#endif
}
// Destructor