mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 13:04:23 +00:00
Code optimization
This commit is contained in:
parent
284fbf5512
commit
8589eb7c0f
@ -420,6 +420,8 @@ QStringList QTorrentHandle::absolute_files_path_uneeded() const {
|
|||||||
QDir saveDir(save_path());
|
QDir saveDir(save_path());
|
||||||
QStringList res;
|
QStringList res;
|
||||||
std::vector<int> fp = torrent_handle::file_priorities();
|
std::vector<int> fp = torrent_handle::file_priorities();
|
||||||
|
qDebug() << fp.size() << num_files();
|
||||||
|
Q_ASSERT(fp.size() == num_files());
|
||||||
for(int i = 0; i < num_files(); ++i) {
|
for(int i = 0; i < num_files(); ++i) {
|
||||||
if(fp[i] == 0) {
|
if(fp[i] == 0) {
|
||||||
const QString file_path = QDir::cleanPath(saveDir.absoluteFilePath(filepath_at(i)));
|
const QString file_path = QDir::cleanPath(saveDir.absoluteFilePath(filepath_at(i)));
|
||||||
|
@ -360,7 +360,7 @@ public:
|
|||||||
emit dataChanged(index(0,0), index(rowCount(), columnCount()));
|
emit dataChanged(index(0,0), index(rowCount(), columnCount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateFilesPriorities(std::vector<int> fprio) {
|
void updateFilesPriorities(const std::vector<int> &fprio) {
|
||||||
emit layoutAboutToBeChanged();
|
emit layoutAboutToBeChanged();
|
||||||
for(unsigned int i=0; i<fprio.size(); ++i) {
|
for(unsigned int i=0; i<fprio.size(); ++i) {
|
||||||
//qDebug("Called updateFilesPriorities with %d", fprio[i]);
|
//qDebug("Called updateFilesPriorities with %d", fprio[i]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user