From a4c1b93a429d9e7e0316b0702302217b9ff8a39a Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 14 Mar 2011 19:18:52 +0000 Subject: [PATCH] Added debug output --- src/mainwindow.cpp | 4 ++-- src/properties/propertieswidget.cpp | 2 ++ src/qtlibtorrent/torrentmodel.cpp | 2 ++ src/statusbar.h | 2 ++ src/torrentfilesmodel.h | 4 ++++ src/transferlistwidget.cpp | 2 ++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d172276c8..8ee6e6feb 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -917,8 +917,8 @@ void MainWindow::processParams(const QString& params_str) { } void MainWindow::processParams(const QStringList& params) { - QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool(); + Preferences pref; + const bool useTorrentAdditionDialog = pref.useAdditionDialog(); foreach(QString param, params) { param = param.trimmed(); if(misc::isUrl(param)) { diff --git a/src/properties/propertieswidget.cpp b/src/properties/propertieswidget.cpp index f56949720..443cee073 100644 --- a/src/properties/propertieswidget.cpp +++ b/src/properties/propertieswidget.cpp @@ -130,6 +130,7 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra } PropertiesWidget::~PropertiesWidget() { + qDebug() << Q_FUNC_INFO << "ENTER"; saveFilesListState(); delete refreshTimer; delete trackerList; @@ -139,6 +140,7 @@ PropertiesWidget::~PropertiesWidget() { delete PropListModel; delete PropDelegate; delete m_tabBar; + qDebug() << Q_FUNC_INFO << "EXIT"; } void PropertiesWidget::showPiecesAvailability(bool show) { diff --git a/src/qtlibtorrent/torrentmodel.cpp b/src/qtlibtorrent/torrentmodel.cpp index f9e7ccd08..cddb28c99 100644 --- a/src/qtlibtorrent/torrentmodel.cpp +++ b/src/qtlibtorrent/torrentmodel.cpp @@ -224,8 +224,10 @@ void TorrentModel::populate() { } TorrentModel::~TorrentModel() { + qDebug() << Q_FUNC_INFO << "ENTER"; qDeleteAll(m_torrents); m_torrents.clear(); + qDebug() << Q_FUNC_INFO << "EXIT"; } QVariant TorrentModel::headerData(int section, Qt::Orientation orientation, diff --git a/src/statusbar.h b/src/statusbar.h index 84e8b39d4..091eea9c6 100644 --- a/src/statusbar.h +++ b/src/statusbar.h @@ -39,6 +39,7 @@ #include #include #include +#include #include "qbtsession.h" #include "speedlimitdlg.h" #include "iconprovider.h" @@ -136,6 +137,7 @@ public: } ~StatusBar() { + qDebug() << Q_FUNC_INFO; } QPushButton* connectionStatusButton() const { diff --git a/src/torrentfilesmodel.h b/src/torrentfilesmodel.h index 47dd02afc..b04757a9c 100644 --- a/src/torrentfilesmodel.h +++ b/src/torrentfilesmodel.h @@ -345,8 +345,10 @@ public: } ~TorrentFilesModel() { + qDebug() << Q_FUNC_INFO << "ENTER"; delete [] files_index; delete rootItem; + qDebug() << Q_FUNC_INFO << "EXIT"; } void updateFilesProgress(std::vector fp) { @@ -625,7 +627,9 @@ public: } ~TorrentFilesFilterModel() { + qDebug() << Q_FUNC_INFO << "ENTER"; delete m_model; + qDebug() << Q_FUNC_INFO << "EXIT"; } TorrentFilesModel* model() const { diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index 158706bb0..a05695c00 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -129,6 +129,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window, } TransferListWidget::~TransferListWidget() { + qDebug() << Q_FUNC_INFO << "ENTER"; // Save settings saveSettings(); // Clean up @@ -137,6 +138,7 @@ TransferListWidget::~TransferListWidget() { delete nameFilterModel; delete listModel; delete listDelegate; + qDebug() << Q_FUNC_INFO << "EXIT"; } TorrentModel* TransferListWidget::getSourceModel() const {