mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
- Some more signal/slot fixing
This commit is contained in:
parent
41c6a847b9
commit
51638eddcc
@ -61,7 +61,6 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
|||||||
finishedList->header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
finishedList->header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
connect(finishedList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedHoSMenu(const QPoint&)));
|
connect(finishedList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedHoSMenu(const QPoint&)));
|
||||||
connect(finishedList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(notifyTorrentDoubleClicked(const QModelIndex&)));
|
connect(finishedList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(notifyTorrentDoubleClicked(const QModelIndex&)));
|
||||||
connect(BTSession, SIGNAL(forceFinishedListUpdate()), this, SLOT(updateFinishedList()));
|
|
||||||
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
|
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
|
||||||
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
||||||
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png")));
|
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png")));
|
||||||
|
@ -177,8 +177,6 @@ class bittorrent : public QObject {
|
|||||||
void updateFileSize(QString hash);
|
void updateFileSize(QString hash);
|
||||||
void downloadFromUrlFailure(QString url, QString reason);
|
void downloadFromUrlFailure(QString url, QString reason);
|
||||||
void torrentFinishedChecking(QTorrentHandle& h);
|
void torrentFinishedChecking(QTorrentHandle& h);
|
||||||
void forceUnfinishedListUpdate();
|
|
||||||
void forceFinishedListUpdate();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,7 +67,7 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
|
|||||||
downloadList->hideColumn(HASH);
|
downloadList->hideColumn(HASH);
|
||||||
loadHiddenColumns();
|
loadHiddenColumns();
|
||||||
|
|
||||||
connect(BTSession, SIGNAL(torrentFinishedChecking(QString)), this, SLOT(sortProgressColumn(QString)));
|
connect(BTSession, SIGNAL(torrentFinishedChecking(QTorrentHandle&)), this, SLOT(sortProgressColumn(QTorrentHandle&)));
|
||||||
|
|
||||||
// Load last columns width for download list
|
// Load last columns width for download list
|
||||||
if(!loadColWidthDLList()) {
|
if(!loadColWidthDLList()) {
|
||||||
@ -674,12 +674,12 @@ void DownloadingTorrents::toggleDownloadListSortOrder(int index) {
|
|||||||
settings.setValue(QString::fromUtf8("DownloadListSortedCol"), misc::toQString(index)+sortOrderLetter);
|
settings.setValue(QString::fromUtf8("DownloadListSortedCol"), misc::toQString(index)+sortOrderLetter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadingTorrents::sortProgressColumn(QString hash) {
|
void DownloadingTorrents::sortProgressColumn(QTorrentHandle& h) {
|
||||||
|
QString hash = h.hash();
|
||||||
int index = downloadList->header()->sortIndicatorSection();
|
int index = downloadList->header()->sortIndicatorSection();
|
||||||
if(index == PROGRESS) {
|
if(index == PROGRESS) {
|
||||||
int row = getRowFromHash(hash);
|
int row = getRowFromHash(hash);
|
||||||
if(row >= 0) {
|
if(row >= 0) {
|
||||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
|
||||||
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
||||||
Qt::SortOrder sortOrder = downloadList->header()->sortIndicatorOrder();
|
Qt::SortOrder sortOrder = downloadList->header()->sortIndicatorOrder();
|
||||||
sortDownloadListFloat(index, sortOrder);
|
sortDownloadListFloat(index, sortOrder);
|
||||||
|
@ -92,7 +92,7 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{
|
|||||||
void updateFileSizeAndProgress(QString hash);
|
void updateFileSizeAndProgress(QString hash);
|
||||||
void showPropertiesFromHash(QString hash);
|
void showPropertiesFromHash(QString hash);
|
||||||
void hidePriorityColumn(bool hide);
|
void hidePriorityColumn(bool hide);
|
||||||
void sortProgressColumn(QString hash);
|
void sortProgressColumn(QTorrentHandle& h);
|
||||||
void loadLastSortedColumn();
|
void loadLastSortedColumn();
|
||||||
void addTorrent(QString hash);
|
void addTorrent(QString hash);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user