From fb9ebce9c6ecaf8cb028b7d7736c5fd7d520602d Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 11 Nov 2015 11:19:16 +0800 Subject: [PATCH] Fix pluginselectdlg position Fix peerlistwidget position Fix mainwindow position --- src/gui/mainwindow.cpp | 4 ++-- src/gui/properties/peerlistwidget.cpp | 4 ++-- src/gui/search/pluginselectdlg.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 1e546a703..d31cf7a1d 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -385,7 +385,7 @@ MainWindow::MainWindow(QWidget *parent) qDebug("GUI Built"); #ifdef Q_OS_WIN if (!pref->neverCheckFileAssoc() && (!Preferences::isTorrentFileAssocSet() || !Preferences::isMagnetLinkAssocSet())) { - if (QMessageBox::question(0, tr("Torrent file association"), + if (QMessageBox::question(this, 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::setTorrentFileAssoc(true); @@ -841,7 +841,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHand if (pref->recursiveDownloadDisabled()) return; // Get Torrent name QString torrentName = torrent->name(); - QMessageBox confirmBox(QMessageBox::Question, tr("Recursive download confirmation"), tr("The torrent '%1' contains torrent files, do you want to proceed with their download?").arg(torrentName)); + QMessageBox confirmBox(QMessageBox::Question, tr("Recursive download confirmation"), tr("The torrent '%1' contains torrent files, do you want to proceed with their download?").arg(torrentName), QMessageBox::NoButton, this); QPushButton *yes = confirmBox.addButton(tr("Yes"), QMessageBox::YesRole); /*QPushButton *no = */ confirmBox.addButton(tr("No"), QMessageBox::NoRole); QPushButton *never = confirmBox.addButton(tr("Never"), QMessageBox::NoRole); diff --git a/src/gui/properties/peerlistwidget.cpp b/src/gui/properties/peerlistwidget.cpp index ade3b2d82..569ce3652 100644 --- a/src/gui/properties/peerlistwidget.cpp +++ b/src/gui/properties/peerlistwidget.cpp @@ -258,9 +258,9 @@ void PeerListWidget::showPeerListMenu(const QPoint &) } } if (peerCount < peersList.length()) - QMessageBox::information(0, tr("Peer addition"), tr("Some peers could not be added. Check the Log for details.")); + QMessageBox::information(this, tr("Peer addition"), tr("Some peers could not be added. Check the Log for details.")); else if (peerCount > 0) - QMessageBox::information(0, tr("Peer addition"), tr("The peers were added to this torrent.")); + QMessageBox::information(this, tr("Peer addition"), tr("The peers were added to this torrent.")); return; } if (act == banAct) { diff --git a/src/gui/search/pluginselectdlg.cpp b/src/gui/search/pluginselectdlg.cpp index c53c9e325..86878ce3f 100644 --- a/src/gui/search/pluginselectdlg.cpp +++ b/src/gui/search/pluginselectdlg.cpp @@ -208,9 +208,9 @@ void PluginSelectDlg::on_actionUninstall_triggered() } if (error) - QMessageBox::warning(0, tr("Uninstall warning"), tr("Some plugins could not be uninstalled because they are included in qBittorrent. Only the ones you added yourself can be uninstalled.\nThose plugins were disabled.")); + QMessageBox::warning(this, tr("Uninstall warning"), tr("Some plugins could not be uninstalled because they are included in qBittorrent. Only the ones you added yourself can be uninstalled.\nThose plugins were disabled.")); else - QMessageBox::information(0, tr("Uninstall success"), tr("All selected plugins were uninstalled successfully")); + QMessageBox::information(this, tr("Uninstall success"), tr("All selected plugins were uninstalled successfully")); } void PluginSelectDlg::enableSelection(bool enable)