Browse Source

should speed up startup

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
8b40e43432
  1. 1
      src/FinishedTorrents.cpp
  2. 2
      src/FinishedTorrents.h
  3. 2
      src/GUI.cpp
  4. 3
      src/downloadingTorrents.cpp
  5. 2
      src/downloadingTorrents.h

1
src/FinishedTorrents.cpp

@ -124,7 +124,6 @@ void FinishedTorrents::addTorrent(QString hash){ @@ -124,7 +124,6 @@ void FinishedTorrents::addTorrent(QString hash){
// Update the number of finished torrents
++nbFinished;
emit finishedTorrentsNumberChanged(nbFinished);
sortFinishedList();
}
void FinishedTorrents::torrentAdded(QTorrentHandle& h) {

2
src/FinishedTorrents.h

@ -60,7 +60,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding { @@ -60,7 +60,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void displayFinishedHoSMenu(const QPoint&);
void setRowColor(int row, QString color);
void saveColWidthFinishedList() const;
void loadLastSortedColumn();
void toggleFinishedListSortOrder(int index);
void sortFinishedList(int index=-1, Qt::SortOrder sortOrder=Qt::AscendingOrder);
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
@ -84,6 +83,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding { @@ -84,6 +83,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void propertiesSelection();
void deleteTorrent(QString hash);
void showPropertiesFromHash(QString hash);
void loadLastSortedColumn();
signals:
void torrentMovedFromFinishedList(QString);

2
src/GUI.cpp

@ -166,6 +166,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis @@ -166,6 +166,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
configureSession(true);
// Resume unfinished torrents
BTSession->resumeUnfinishedTorrents();
downloadingTorrentTab->loadLastSortedColumn();
finishedTorrentTab->loadLastSortedColumn();
// Add torrent given on command line
processParams(torrentCmdLine);
// Initialize Web UI

3
src/downloadingTorrents.cpp

@ -617,7 +617,6 @@ void DownloadingTorrents::addTorrent(QString hash) { @@ -617,7 +617,6 @@ void DownloadingTorrents::addTorrent(QString hash) {
}
++nbTorrents;
emit unfinishedTorrentsNumberChanged(nbTorrents);
sortDownloadList();
}
void DownloadingTorrents::sortDownloadListFloat(int index, Qt::SortOrder sortOrder) {
@ -773,7 +772,6 @@ bool DownloadingTorrents::loadColWidthDLList() { @@ -773,7 +772,6 @@ bool DownloadingTorrents::loadColWidthDLList() {
for(unsigned int i=0; i<listSize; ++i) {
downloadList->header()->resizeSection(i, width_list.at(i).toInt());
}
loadLastSortedColumn();
qDebug("Download list columns width loaded");
return true;
}
@ -823,7 +821,6 @@ void DownloadingTorrents::torrentAdded(QTorrentHandle& h) { @@ -823,7 +821,6 @@ void DownloadingTorrents::torrentAdded(QTorrentHandle& h) {
}
++nbTorrents;
emit unfinishedTorrentsNumberChanged(nbTorrents);
sortDownloadList();
}
void DownloadingTorrents::updateFileSizeAndProgress(QString hash) {

2
src/downloadingTorrents.h

@ -84,7 +84,6 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{ @@ -84,7 +84,6 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{
void hideOrShowColumnRatio();
void hideOrShowColumnEta();
void hideOrShowColumnPriority();
void loadLastSortedColumn();
void forceRecheck();
public slots:
@ -97,6 +96,7 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{ @@ -97,6 +96,7 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{
void showPropertiesFromHash(QString hash);
void hidePriorityColumn(bool hide);
void sortProgressColumn(QString hash);
void loadLastSortedColumn();
};

Loading…
Cancel
Save