Improving application architecture (Redesign). #2058

Closed
opened 2026-02-21 16:00:21 -05:00 by deekerman · 110 comments
Owner

Originally created by @glassez on GitHub (Jan 17, 2015).

Lately I've been increasingly involved in the development of qBittorrent. In this regard, I dive into the source code more and more. And the more I do it, the more I cultivate the desire to restore order there.
qBittorrent needs overhaul - that is my conclusion.
I will not give here the details, so as not to waste my time. Let me just say that there are a lot of problems here, starting with excessively long functions, various inconsistencies and cross-dependencies of different classes and subsystems, and to the lack of a clear architecture.
One of the important problems is the widespread dependence of our code from libtorrent code.
(Those who now consider me a fool and say "qBittorrent is based on libtorrent", I will answer immediately - no comments about this, if you do not understand what I mean - you can continue to regard me as a fool.)
To @sledgehammer999 mostly:
The circumstances are so that I can over the next few months to do this job.
I would like to discuss issues of cooperation.
This work is long and extensive code changes will be made. It is clear that I'm going to target it at a later release (after 3.2). As soon the lack of support for Qt4, I would prefer not to support Qt4. And still it is necessary to strictly set the minimum supported version of Qt5.
For the same reasons (major changes) some time after the beginning of my work (a very short time, I think) I will not be able more to rebase my code. And this is a problem because there will be concurrent commits.
Any ideas or comments?

Smaller issues.
I also have the idea to use our modification of QtSingleApplication in all qBittorrent builds. I want to take as a basis QtSingleApplication from QtCreator, which is more powerful than the one that is now represented in QtSolutions (and which we use).
Using libtorrent 0.16.x also questionable, but in any case, I initially will support both branches in order to better design the abstraction layer.

Next, I'll publish materials related to this (plans, ideas, models, and so on).

Originally created by @glassez on GitHub (Jan 17, 2015). Lately I've been increasingly involved in the development of qBittorrent. In this regard, I dive into the source code more and more. And the more I do it, the more I cultivate the desire to restore order there. qBittorrent needs overhaul - that is my conclusion. I will not give here the details, so as not to waste my time. Let me just say that there are a lot of problems here, starting with excessively long functions, various inconsistencies and cross-dependencies of different classes and subsystems, and to the lack of a clear architecture. One of the important problems is the widespread dependence of our code from _libtorrent_ code. (Those who now consider me a fool and say "qBittorrent is based on libtorrent", I will answer immediately - no comments about this, if you do not understand what I mean - you can continue to regard me as a fool.) To @sledgehammer999 mostly: The circumstances are so that I can over the next few months to do this job. I would like to discuss issues of cooperation. This work is long and extensive code changes will be made. It is clear that I'm going to target it at a later release (after 3.2). As soon the lack of support for Qt4, I would prefer not to support Qt4. And still it is necessary to strictly set the minimum supported version of Qt5. For the same reasons (major changes) some time after the beginning of my work (a very short time, I think) I will not be able more to rebase my code. And this is a problem because there will be concurrent commits. Any ideas or comments? Smaller issues. I also have the idea to use our modification of QtSingleApplication in all qBittorrent builds. I want to take as a basis QtSingleApplication from QtCreator, which is more powerful than the one that is now represented in QtSolutions (and which we use). Using libtorrent 0.16.x also questionable, but in any case, I initially will support both branches in order to better design the abstraction layer. Next, I'll publish materials related to this (plans, ideas, models, and so on).
deekerman 2026-02-21 16:00:21 -05:00
  • closed this issue
  • added the
    Meta
    label
Author
Owner

@sledgehammer999 commented on GitHub (Jan 17, 2015):

Let me just say that there are a lot of problems here, starting with excessively long functions, various inconsistencies and cross-dependencies of different classes and subsystems, and to the lack of a clear architecture.

I kinda agree on most of that.

One of the important problems is the widespread dependence of our code from libtorrent code.

I don't understand what you mean here. Can you give an example or explain more?

In the past few toys I am toying with the idea of dropping qt4 and libtorrent 0.16.x after v3.2.0. And I think I'll definitely do it.

Why different QtSingleApplication? We maintain only a Windows-specific modification and nothing else.
What more features do we need from the one QtCreator uses?

As for how to continue work on this without stalling the rest of the development for you or having you constantly rebasing well I can think only one way. You should declare/acquire a "mutex" on files that you intend to work on for you next PR. You'll do that by opening a new issue stating what you are doing and which files you don't want touched and a rough ETA.
Of course you should try to lock as few files as possible on each iteration. Or at least permit for some rebasing on your part too.

@sledgehammer999 commented on GitHub (Jan 17, 2015): > Let me just say that there are a lot of problems here, starting with excessively long functions, various inconsistencies and cross-dependencies of different classes and subsystems, and to the lack of a clear architecture. I kinda agree on most of that. > One of the important problems is the widespread dependence of our code from libtorrent code. I don't understand what you mean here. Can you give an example or explain more? In the past few toys I am toying with the idea of dropping qt4 and libtorrent 0.16.x after v3.2.0. And I think I'll definitely do it. Why different QtSingleApplication? We maintain only a Windows-specific modification and nothing else. What more features do we need from the one QtCreator uses? As for how to continue work on this without stalling the rest of the development for you or having you constantly rebasing well I can think only one way. You should declare/acquire a "mutex" on files that you intend to work on for you next PR. You'll do that by opening a new issue stating what you are doing and which files you don't want touched and a rough ETA. Of course you should try to lock as few files as possible on each iteration. Or at least permit for some rebasing on your part too.
Author
Owner

@glassez commented on GitHub (Jan 17, 2015):

One of the important problems is the widespread dependence of our code from libtorrent code.

I don't understand what you mean here. Can you give an example or explain more?

We widely use the data types of libtorrent, call its functions, etc. It makes excessive dependence on it. Another problem is the set of States of the torrent, which gives us libtorrent, does not correspond to the set that we use on the user side. Hence, multiple transformations, check the version of libtorrent and so on. For example, in another version, the developers change something, and we have to edit a lot of code to insert there #ifdef's and so on. I want to isolate all interaction with libtorrent in some abstraction layer. I understand that to get rid of all problems completely will not work even with this approach, but will get rid of some.

@glassez commented on GitHub (Jan 17, 2015): > > One of the important problems is the widespread dependence of our code from libtorrent code. > > I don't understand what you mean here. Can you give an example or explain more? We widely use the data types of libtorrent, call its functions, etc. It makes excessive dependence on it. Another problem is the set of States of the torrent, which gives us libtorrent, does not correspond to the set that we use on the user side. Hence, multiple transformations, check the version of libtorrent and so on. For example, in another version, the developers change something, and we have to edit a lot of code to insert there #ifdef's and so on. I want to isolate all interaction with libtorrent in some abstraction layer. I understand that to get rid of all problems completely will not work even with this approach, but will get rid of some.
Author
Owner

@sledgehammer999 commented on GitHub (Jan 17, 2015):

Another problem is the set of States of the torrent, which gives us libtorrent, does not correspond to the set that we use on the user side.

Yes! I wanted to change that too.

Let's say that I agree with you on libtorrent but I am not too fond of over-abstracting stuff. I think libtorrent dependence should be the last thing to "fix".
The effort should concentrate on the other stuff you mentioned first.

@sledgehammer999 commented on GitHub (Jan 17, 2015): > Another problem is the set of States of the torrent, which gives us libtorrent, does not correspond to the set that we use on the user side. Yes! I wanted to change that too. Let's say that I agree with you on libtorrent but I am not too fond of over-abstracting stuff. I think libtorrent dependence should be the last thing to "fix". The effort should concentrate on the other stuff you mentioned first.
Author
Owner

@glassez commented on GitHub (Jan 17, 2015):

Let's say that I agree with you on libtorrent but I am not too fond of over-abstracting stuff. I think libtorrent dependence should be the last thing to "fix".
The effort should concentrate on the other stuff you mentioned first.

Actually, I don't have to do it too Intrusive. I also don't like that. Much of what I mean by this abstraction will be made as a by-product of other work.

In the past few toys I am toying with the idea of dropping qt4 and libtorrent 0.16.x after v3.2.0. And I think I'll definitely do it.

For specifics. What do I expect? I, in principle, may not remove support for Qt4. But it will increase my work, and I will be a pity if this support will be removed when I finish.

@glassez commented on GitHub (Jan 17, 2015): > Let's say that I agree with you on libtorrent but I am not too fond of over-abstracting stuff. I think libtorrent dependence should be the last thing to "fix". > The effort should concentrate on the other stuff you mentioned first. Actually, I don't have to do it too Intrusive. I also don't like that. Much of what I mean by this abstraction will be made as a by-product of other work. > In the past few toys I am toying with the idea of dropping qt4 and libtorrent 0.16.x after v3.2.0. And I think I'll definitely do it. For specifics. What do I expect? I, in principle, may not remove support for Qt4. But it will increase my work, and I will be a pity if this support will be removed when I finish.
Author
Owner

@sledgehammer999 commented on GitHub (Jan 17, 2015):

For specifics. What do I expect? I, in principle, may not remove support for Qt4. But it will increase my work, and I will be a pity if this support will be removed when I finish.

One question. Do you use KDE at all? If yes, can you tell me what is the penetration of qt5 in relation to qt4? Are most apps using qt5 now?

@sledgehammer999 commented on GitHub (Jan 17, 2015): > For specifics. What do I expect? I, in principle, may not remove support for Qt4. But it will increase my work, and I will be a pity if this support will be removed when I finish. One question. Do you use KDE at all? If yes, can you tell me what is the penetration of qt5 in relation to qt4? Are most apps using qt5 now?
Author
Owner

@glassez commented on GitHub (Jan 17, 2015):

Why different QtSingleApplication?

I thought to implement this functionality in our code more deeply, if possible. I don't like, for example, the current situation with daemon.

@glassez commented on GitHub (Jan 17, 2015): > Why different QtSingleApplication? I thought to implement this functionality in our code more deeply, if possible. I don't like, for example, the current situation with _daemon_.
Author
Owner

@glassez commented on GitHub (Jan 17, 2015):

One question. Do you use KDE at all? If yes, can you tell me what is the penetration of qt5 in relation to qt4? Are most apps using qt5 now?

I am currently not related with Linux and KDE. I use them only for testing qBittorrent builds and even sometimes.
As for Qt, then I guess it won't be me caring at first. So you have time to think it over.

@glassez commented on GitHub (Jan 17, 2015): > One question. Do you use KDE at all? If yes, can you tell me what is the penetration of qt5 in relation to qt4? Are most apps using qt5 now? I am currently not related with Linux and KDE. I use them only for testing qBittorrent builds and even sometimes. As for Qt, then I guess it won't be me caring at first. So you have time to think it over.
Author
Owner

@pmzqla commented on GitHub (Jan 17, 2015):

One question. Do you use KDE at all? If yes, can you tell me what is the penetration of qt5 in relation to qt4? Are most apps using qt5 now?

If I'm not wrong the developement of KDE works as follows now. There are three different main components: Framework, Plasma and Applications. Currently KDE Frameworks 5 requires Qt5(.3?), Plasma 5 too if I'm not wrong, while I think most of the applications haven't drop Qt4 yet.

KDE SC 4.x is no longer developed (each 4.x release included all the components that are now released separately).

Here the schedule.

That saod, I'd expect a better Qt5 support by most of the distros in the near future.

@pmzqla commented on GitHub (Jan 17, 2015): > One question. Do you use KDE at all? If yes, can you tell me what is the penetration of qt5 in relation to qt4? Are most apps using qt5 now? If I'm not wrong the developement of KDE works as follows now. There are three different main components: Framework, Plasma and Applications. Currently KDE Frameworks 5 requires Qt5(.3?), Plasma 5 too if I'm not wrong, while I think most of the applications haven't drop Qt4 yet. KDE SC 4.x is no longer developed (each 4.x release included all the components that are now released separately). <a href="https://techbase.kde.org/Schedules">Here</a> the schedule. That saod, I'd expect a better Qt5 support by most of the distros in the near future.
Author
Owner

@sledgehammer999 commented on GitHub (Jan 18, 2015):

Dropping 0.16.x is almost certain for the 3.3.x.
Dropping qt4 is still considered.

@sledgehammer999 commented on GitHub (Jan 18, 2015): Dropping 0.16.x is almost certain for the 3.3.x. Dropping qt4 is still considered.
Author
Owner

@glassez commented on GitHub (Jan 19, 2015):

OK. I will support yet.

@glassez commented on GitHub (Jan 19, 2015): OK. I will support yet.
Author
Owner

@Gelmir commented on GitHub (Jan 19, 2015):

Hello, just wanted to ask if anything will be done about downloadUrlAndSkipDialog and addMagnetSkipAddDlg in QBtSession. After implementing possibility of overriding global 'add paused' option for RSS feeds on per-rule basis we have quite an ugly set of default args, not counting headless ifdefs.

addTorrent and addMagnetUri might also need a revamp.

I propose using TorrentTempData or similar mechanics (maybe some kind of structure) for adding torrents and magnets, because with growing code complexity (and by complexity I mean different input conditionals for torrent/magnets addition) the number of arguments will grow by margin.

@Gelmir commented on GitHub (Jan 19, 2015): Hello, just wanted to ask if anything will be done about `downloadUrlAndSkipDialog` and `addMagnetSkipAddDlg` in `QBtSession`. After implementing possibility of overriding global 'add paused' option for RSS feeds on per-rule basis we have quite an ugly set of default args, not counting headless ifdefs. `addTorrent` and `addMagnetUri` might also need a revamp. I propose using `TorrentTempData` or similar mechanics (maybe some kind of structure) for adding torrents and magnets, because with growing code complexity (and by complexity I mean different input conditionals for torrent/magnets addition) the number of arguments will grow by margin.
Author
Owner

@glassez commented on GitHub (Jan 20, 2015):

@Gelmir OK. I will bear in mind it.

@glassez commented on GitHub (Jan 20, 2015): @Gelmir OK. I will bear in mind it.
Author
Owner

@ximply commented on GitHub (Jan 21, 2015):

That's a great job!
Can some important data in ini file now turn to database, just like sqlite, because sometimes I found data lost when qBittorent crashed or exit with exceptions.

@ximply commented on GitHub (Jan 21, 2015): That's a great job! Can some important data in ini file now turn to database, just like sqlite, because sometimes I found data lost when qBittorent crashed or exit with exceptions.
Author
Owner

@chrishirst commented on GitHub (Jan 21, 2015):

I dive into the source code more and more. And the more I do it, the more I cultivate the desire to restore order there.
qBittorrent needs overhaul - that is my conclusion.

So it's not just me that finds it a disorganised mish-mash of almost incomprehensible 'bolt-ons' then.

@chrishirst commented on GitHub (Jan 21, 2015): > I dive into the source code more and more. And the more I do it, the more I cultivate the desire to restore order there. > qBittorrent needs overhaul - that is my conclusion. So it's not just me that finds it a disorganised mish-mash of almost incomprehensible 'bolt-ons' then.
Author
Owner

@ngosang commented on GitHub (Jan 31, 2015):

I would love to see some of these changes as soon as possible. I'm working on a new tab with upload and download speed charts.
Let's make qBittorrent something bigger!

@ngosang commented on GitHub (Jan 31, 2015): I would love to see some of these changes as soon as possible. I'm working on a new tab with upload and download speed charts. Let's make qBittorrent something bigger!
Author
Owner

@sledgehammer999 commented on GitHub (Feb 12, 2015):

@glassez you mentioned that you are refactoring QBtSession and QTorrentHandle. You also mentioned that you won't have anything to show for about a month.
However, I would be interested if you have time to write quickly what you are trying to achieve/do. Not very detailed or with code. I don't want an implementation of course. Just things like "I noticed that qtorrenthandle doesn't hold a state of the torrent and I refactoring it to always keep a cached copy of the last torrent_status".
I want an idea where you are going because:

  1. mostly about being informed
  2. maybe I can suggest and alternative
  3. to stop you from possibly wasting your time because I won't merge your changes. Highly unlikely. You have proven that you aren't stupid.
@sledgehammer999 commented on GitHub (Feb 12, 2015): @glassez you mentioned that you are refactoring QBtSession and QTorrentHandle. You also mentioned that you won't have anything to show for about a month. However, I would be interested if you have time to write quickly what you are trying to achieve/do. Not very detailed or with code. I don't want an implementation of course. Just things like "I noticed that qtorrenthandle doesn't hold a state of the torrent and I refactoring it to always keep a cached copy of the last torrent_status". I want an idea where you are going because: 1. mostly about being informed 2. maybe I can suggest and alternative 3. to stop you from possibly wasting your time because I won't merge your changes. Highly unlikely. You have proven that you aren't stupid.
Author
Owner

@glassez commented on GitHub (Feb 12, 2015):

Just things like "I noticed that qtorrenthandle doesn't hold a state of the torrent and I refactoring it to always keep a cached copy of the last torrent_status".

@sledgehammer999 You read my mind! 👍
Discrete BitTorrent session state model is one of the first innovations. This is in part already exists in some places. Need to do this at a basic level.

However, I would be interested if you have time to write quickly what you are trying to achieve/do. Not very detailed or with code.

Well. I just didn't want to spend time on it. But you're right. Later I will provide a list of potential design problem (some even will have a way to correct them).

to stop you from possibly wasting your time because I won't merge your changes. Highly unlikely.

Will be very sorry if we will have conflicts on some issues. I'm always open to criticism and dialogue, if it is objectively.

@glassez commented on GitHub (Feb 12, 2015): > Just things like "I noticed that qtorrenthandle doesn't hold a state of the torrent and I refactoring it to always keep a cached copy of the last torrent_status". @sledgehammer999 You read my mind! :+1: Discrete BitTorrent session state model is one of the first innovations. This is in part already exists in some places. Need to do this at a basic level. > However, I would be interested if you have time to write quickly what you are trying to achieve/do. Not very detailed or with code. Well. I just didn't want to spend time on it. But you're right. Later I will provide a list of potential design problem (some even will have a way to correct them). > to stop you from possibly wasting your time because I won't merge your changes. Highly unlikely. Will be very sorry if we will have conflicts on some issues. I'm always open to criticism and dialogue, if it is objectively.
Author
Owner

@glassez commented on GitHub (Feb 12, 2015):

You also mentioned that you won't have anything to show for about a month.

I may from time to time publish individual files (or fragments) until mergable/buildable PR is ready.

@glassez commented on GitHub (Feb 12, 2015): > You also mentioned that you won't have anything to show for about a month. I may from time to time publish individual files (or fragments) until mergable/buildable PR is ready.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 12, 2015):

@sorokin since you did a lot of refactoring regarding cpu efficiency, your input here would be greatly appreciated. -after of course @glassez writes what he wants to do-

@glassez if new PRs arrive with trivial changes in QBtSession/QTorrentHandle I'll tag you to say if I can merge it.

@sledgehammer999 commented on GitHub (Feb 12, 2015): @sorokin since you did a lot of refactoring regarding cpu efficiency, your input here would be greatly appreciated. -after of course @glassez writes what he wants to do- @glassez if new PRs arrive with trivial changes in QBtSession/QTorrentHandle I'll tag you to say if I can merge it.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 12, 2015):

@glassez One last thing: Try to keep it as simple as possible. No need for complex data structures or exotic design. -unless the situation can't be solved otherwise-.
Are you also trying to tackle the issue of syncronously adding torrents? If yes, I and sorokin had an offtopic discussion about this with some pretty interesting ideas. I'll tell them to you if you are working on it too.

@sledgehammer999 commented on GitHub (Feb 12, 2015): @glassez One last thing: Try to keep it as simple as possible. No need for complex data structures or exotic design. -unless the situation can't be solved otherwise-. Are you also trying to tackle the issue of syncronously adding torrents? If yes, I and sorokin had an offtopic discussion about this with some pretty interesting ideas. I'll tell them to you if you are working on it too.
Author
Owner

@glassez commented on GitHub (Feb 12, 2015):

Are you also trying to tackle the issue of syncronously adding torrents? If yes, I and sorokin had an offtopic discussion about this with some pretty interesting ideas. I'll tell them to you if you are working on it too.

Yes. It is in my plans too. Point me to this discussion. And get some summary if possible.

@glassez commented on GitHub (Feb 12, 2015): > Are you also trying to tackle the issue of syncronously adding torrents? If yes, I and sorokin had an offtopic discussion about this with some pretty interesting ideas. I'll tell them to you if you are working on it too. Yes. It is in my plans too. Point me to this discussion. And get some summary if possible.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 12, 2015):

I'll find it later. It was in a commit comment.
The gist of it is:
The big problem with the current loading of torrents on startup is that it slows down the qbt startup and especially the GUI. This is more prevalent when the user has many many torrents in his list.
The problem arises because we synchronously load the torrent into the libtorrent session.
This can be avoided if we use async_add_torrent() and listen for the appropriate alert.
The only issue is that I want to finally implement #583. This is already implement in part by the custom values we load/save in the .fastresume files. However, we still need that ini file to determine the order of the torrents in the queue. Otherwise we would need to first read all the .fastresume fields, parse them, sort them and then load them. This isn't very efficient.
The clever idea that @sorokin mentioned is: "We already code the hash in the filename. Why don't we code the queue number too. We'll only need to get a list of filenames and sort them.".

Of course we didn't talk about magnets. But this could be solved by having a bencoded file written in BT_backup called magnets. It would hold info about ALL the magnets that don't have metadata and of course their queue number. -even today the paused state of magnets isn't remembered-

So what were your plans on this?

@sledgehammer999 commented on GitHub (Feb 12, 2015): I'll find it later. It was in a commit comment. The gist of it is: The big problem with the current loading of torrents on startup is that it slows down the qbt startup and especially the GUI. This is more prevalent when the user has many many torrents in his list. The problem arises because we synchronously load the torrent into the libtorrent session. This can be avoided if we use async_add_torrent() and listen for the appropriate alert. The only issue is that I want to finally implement #583. This is already implement in part by the custom values we load/save in the .fastresume files. However, we still need that ini file to determine the order of the torrents in the queue. Otherwise we would need to first read all the .fastresume fields, parse them, sort them and then load them. This isn't very efficient. The clever idea that @sorokin mentioned is: "We already code the hash in the filename. Why don't we code the queue number too. We'll only need to get a list of filenames and sort them.". Of course we didn't talk about magnets. But this could be solved by having a bencoded file written in BT_backup called magnets. It would hold info about ALL the magnets that don't have metadata and of course their queue number. -even today the paused state of magnets isn't remembered- So what were your plans on this?
Author
Owner

@glassez commented on GitHub (Feb 12, 2015):

Not so fast. I haven't delved into this issue. I just saw async_add_torrent() function and thought, "Why don't we use it? We must consider this option." So it is in my plans, but not in priority. First I would like to finish with a redesign.

@glassez commented on GitHub (Feb 12, 2015): Not so fast. I haven't delved into this issue. I just saw async_add_torrent() function and thought, "Why don't we use it? We must consider this option." So it is in my plans, but not in priority. First I would like to finish with a redesign.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 12, 2015):

First I would like to finish with a redesign.

No problem.

@sledgehammer999 commented on GitHub (Feb 12, 2015): > First I would like to finish with a redesign. No problem.
Author
Owner

@glassez commented on GitHub (Feb 12, 2015):

since @sorokin did a lot of refactoring regarding cpu efficiency...

I don't agree with some of his cases. Now I'm looking at QAlertDispatcher and it seems too far-fetched (I would even say - monstrous). No, all done well, if we consider it in itself, but I think I can make it much easier.

@glassez commented on GitHub (Feb 12, 2015): > since @sorokin did a lot of refactoring regarding cpu efficiency... I don't agree with some of his cases. Now I'm looking at QAlertDispatcher and it seems too far-fetched (I would even say - monstrous). No, all done well, if we consider it in itself, but I think I can make it much easier.
Author
Owner

@glassez commented on GitHub (Feb 12, 2015):

What were the reasons to refuse the use of pop_alerts() in favor of set_alert_dispatch()?

@glassez commented on GitHub (Feb 12, 2015): What were the reasons to refuse the use of pop_alerts() in favor of set_alert_dispatch()?
Author
Owner

@sledgehammer999 commented on GitHub (Feb 12, 2015):

What were the reasons to refuse the use of pop_alerts() in favor of set_alert_dispatch()?

I think it showed as slow. More info in the #1668 megathread and in its PR #1703
Now I remembered the most important reason. We did away with the fixed timer. The dispatcher reacts in realtime. With pop_alerts() you react in fixed time. If you have many torrents in the queue, each time you pop_alerts() a lot of alerts will have accumulated and it will result in small gui freezes because you'll have to process them all at that time.
I am not so sure we should change this. If the dispatcher can be simplified I am game. But IMO we should continue processing in realtime.

@sledgehammer999 commented on GitHub (Feb 12, 2015): > What were the reasons to refuse the use of pop_alerts() in favor of set_alert_dispatch()? I think it showed as slow. More info in the #1668 megathread and in its PR #1703 Now I remembered the most important reason. We did away with the fixed timer. The dispatcher reacts in realtime. With pop_alerts() you react in fixed time. If you have many torrents in the queue, each time you pop_alerts() a lot of alerts will have accumulated and it will result in small gui freezes because you'll have to process them all at that time. I am not so sure we should change this. If the dispatcher can be simplified I am game. But IMO we should continue processing in realtime.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 12, 2015):

And the discussion about async_add_torrent() at the end of this commit github.com/qbittorrent/qBittorrent@a1a5fb065e

@sledgehammer999 commented on GitHub (Feb 12, 2015): And the discussion about async_add_torrent() at the end of this commit https://github.com/qbittorrent/qBittorrent/commit/a1a5fb065e33caa7ec1e0d430b8413a652a11096
Author
Owner

@glassez commented on GitHub (Feb 13, 2015):

We did away with the fixed timer. The dispatcher reacts in realtime. With pop_alerts() you react in fixed time

Realtime is a Chimera.
I have studied in detail the algorithm of the current code and came to the conclusion that we can get rid of QAlertDispatcher without any harm.
Description:
Now when the first alert appears (dispath() called) QAlertDispatcher adds an event to the Event Loop of the application and collects further alerts as long as the application does not handle this event (and process current alerts). And so on. While the app is idle, it processes the alerts one by one. When it is busy, the alerts have time to accumulate, and the app handles multiple.
When using an idle timer (QTimer with interval = 0) so it turns out: QTimer adds an event to App Event Loop. When application can handle this event (his turn came), we call pop_alerts() and process current alerts. The rest is the same. While the app is idle, it processes the alerts one by one. When it is busy, the alerts have time to accumulate, and the app handles multiple. But only qBittorrent not doing it now, and libtorrent itself. I.e., we simplify the code by removing unnecessary duplication of existing functionality.
The only thing here that may be like a slower work, this is the time when the application is idle and libtorrent is also idle. In this case, we still will occasionally call pop_alerts(), which will return no alerts.
But the main thing here is that the app is IDLE, and we will not reduce its performance. With a strong desire we can make adaptive adjustment of the timer, so that to set some interval is greater than zero during libtorrent session idle. But it seems to me that the situation, when libtorrent session is idle, very rare, and it is possible not to worry about it.

@glassez commented on GitHub (Feb 13, 2015): > We did away with the fixed timer. The dispatcher reacts in realtime. With pop_alerts() you react in fixed time Realtime is a Chimera. I have studied in detail the algorithm of the current code and came to the conclusion that we can get rid of QAlertDispatcher without any harm. Description: Now when the first alert appears (dispath() called) QAlertDispatcher adds an event to the Event Loop of the application and collects further alerts as long as the application does not handle this event (and process current alerts). And so on. While the app is idle, it processes the alerts one by one. When it is busy, the alerts have time to accumulate, and the app handles multiple. When using an idle timer (QTimer with interval = 0) so it turns out: QTimer adds an event to App Event Loop. When application can handle this event (his turn came), we call pop_alerts() and process current alerts. The rest is the same. _While the app is idle, it processes the alerts one by one. When it is busy, the alerts have time to accumulate, and the app handles multiple._ But only qBittorrent not doing it now, and libtorrent itself. I.e., we simplify the code by removing unnecessary duplication of existing functionality. The only thing here that may be like a slower work, this is the time when the application is idle and libtorrent is also idle. In this case, we still will occasionally call pop_alerts(), which will return no alerts. But the main thing here is that the app is IDLE, and we will not reduce its performance. With a strong desire we can make adaptive adjustment of the timer, so that to set some interval is greater than zero during libtorrent session idle. But it seems to me that the situation, when libtorrent session is idle, very rare, and it is possible not to worry about it.
Author
Owner

@glassez commented on GitHub (Feb 14, 2015):

With a strong desire we can make adaptive adjustment of the timer, so that to set some interval is greater than zero during libtorrent session idle. But it seems to me that the situation, when libtorrent session is idle, very rare, and it is possible not to worry about it.

I've tested it. Adaptive timer shows good results (without over-complicated code). I set the interval to 500 ms. after pop_alerts() returns no alert, and reset it to 0 when alerts appear.
My initial assumption that it is possible to do without interval correction, was not correct. If you do not do this, it is high CPU usage when idle libtorrent session.

@glassez commented on GitHub (Feb 14, 2015): > With a strong desire we can make adaptive adjustment of the timer, so that to set some interval is greater than zero during libtorrent session idle. But it seems to me that the situation, when libtorrent session is idle, very rare, and it is possible not to worry about it. I've tested it. Adaptive timer shows good results (without over-complicated code). I set the interval to 500 ms. after pop_alerts() returns no alert, and reset it to 0 when alerts appear. My initial assumption that it is possible to do without interval correction, was not correct. If you do not do this, it is high CPU usage when idle libtorrent session.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 14, 2015):

If you do not do this, it is high CPU usage when idle libtorrent session.

I suspected such a thing when I read your post late at night yesterday.
Anyway, the decision should be based on objective data. What I intend to do when/if you do PR changing to a timer.
I'll make 3 builds. One pre-QAlertDispatcher, one QAlertDispatcher and one with your timer. Test all 3 with 1000 torrents and run them under a performance analysis tool. Then compare the data. If the timer approach seems slightly worse than QAlertDispatcher, it will still be preferred due to its simplicity.
If it shows too slow it will be dropped.
@sorokin your expertise with vtune would be greatly appreciated. If you could do benchmarks that would be really great.

Sidenote: Today I'll be mostly unavailable. Why? My new pc parts arrive and I'll be building my new rig and reinstalling Windows(drivers, programs, etc) and transferring data from the old HDDs. Plus rebuilding my toolchain.
Interesting specs for compiling: amd fx8320 (8 cores) and 8GB RAM.

@sledgehammer999 commented on GitHub (Feb 14, 2015): > If you do not do this, it is high CPU usage when idle libtorrent session. I suspected such a thing when I read your post late at night yesterday. Anyway, the decision should be based on objective data. What I intend to do when/if you do PR changing to a timer. I'll make 3 builds. One pre-QAlertDispatcher, one QAlertDispatcher and one with your timer. Test all 3 with 1000 torrents and run them under a performance analysis tool. Then compare the data. If the timer approach seems **slightly worse** than QAlertDispatcher, it will still be preferred due to its simplicity. If it shows too slow it will be dropped. @sorokin your expertise with vtune would be greatly appreciated. If you could do benchmarks that would be really great. Sidenote: Today I'll be mostly unavailable. Why? My new pc parts arrive and I'll be building my new rig and reinstalling Windows(drivers, programs, etc) and transferring data from the old HDDs. Plus rebuilding my toolchain. Interesting specs for compiling: amd fx8320 (8 cores) and 8GB RAM.
Author
Owner

@glassez commented on GitHub (Feb 14, 2015):

If the timer approach seems slightly worse than QAlertDispatcher, it will still be preferred due to its simplicity.
If it shows too slow it will be dropped.

Ok. I'll send PR soon.
I have no way to test it with big data. So, if my assumptions regarding the performance will turn out to be wrong, you can throw it without regret. Besides, I have another idea about this. Some intermediate option.

@glassez commented on GitHub (Feb 14, 2015): > If the timer approach seems slightly worse than QAlertDispatcher, it will still be preferred due to its simplicity. > If it shows too slow it will be dropped. Ok. I'll send PR soon. I have no way to test it with big data. So, if my assumptions regarding the performance will turn out to be wrong, you can throw it without regret. Besides, I have another idea about this. Some intermediate option.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 15, 2015):

It took me way longer than I thought to have things working. I haven't managed yet to completely transfer old settings/files/data over to the new system. The good news now are these

  • I am using Windows 7 now
  • I am also using msvc 2013(express).
  • I finally managed to make it compile qbt that will also run on Windows XP :D
  • Now that I use msvc2013, I'll probably use it permanently for the official releases. That means that we could start using c++11. But this isn't panacea...
  • Way faster builds. My old rig build v3.1.11 in 27-30mins. The new rig builds the same version(with same accompanying libs) in ~5:25mins 😄

From tomorrow I'll slowly begin the reviewing all the PRs that have accumulated.

@sledgehammer999 commented on GitHub (Feb 15, 2015): It took me way longer than I thought to have things working. I haven't managed yet to completely transfer old settings/files/data over to the new system. The good news now are these - I am using Windows 7 now - I am also using msvc 2013(express). - I finally managed to make it compile qbt that will also run on Windows XP :D - Now that I use msvc2013, I'll probably use it permanently for the official releases. That means that we could start using c++11. But this isn't panacea... - Way faster builds. My old rig build v3.1.11 in 27-30mins. The new rig builds the same version(with same accompanying libs) in ~5:25mins :smile: From tomorrow I'll slowly begin the reviewing all the PRs that have accumulated.
Author
Owner

@glassez commented on GitHub (Feb 16, 2015):

That means that we could start using c++11.

I love it! But if you really want to do this, you must formally specify the minimum version of the compilers that qBittorrent supports. Otherwise we will get a new headache, and not improving.

@glassez commented on GitHub (Feb 16, 2015): > That means that we could start using c++11. I love it! But if you really want to do this, you must formally specify the minimum version of the compilers that qBittorrent supports. Otherwise we will get a new headache, and not improving.
Author
Owner

@glassez commented on GitHub (Feb 17, 2015):

qBittorrent top-level design (To-Be Model):

top-level

Here is the design that I want to embody.
Its key components:

  1. Application. It owns all other components, creates and destroys them, exposes one to other components (if possible). Also implements the basic CLI.
  2. Core. It owns libtorrent and other core-wide components and utils (like BitTorrent Session, Tracker etc.).
  3. GUI. GUI components. It can uses Core components (trough Application).
  4. WebUI. Web access implementation. It can uses Core components (trough Application).

The most important thing here is that we need to get rid of cross-dependencies wherever it is not required (and such cases are very rare). Core should not in any way depend on UI components. UI components use Core, and not Vice versa. It's not supposed to know about that and how its uses, but only to provide an interface in terms of their subject area. This mainly applies to BitTorrent session, but other Core code should not have external dependencies. Ideally, the Core should compile no matter what other top-level components used in this build, while not having any #ifndef DISABLE_GUI etc.

One more thing. I want the application structure was reflected everywhere - in the directory structure of the project, and used the names (namespaces, where necessary), and the method of inclusion of headers. Opening any project file, we need to understand that it uses, what classes and types belong to one or another part of the application structure.

@glassez commented on GitHub (Feb 17, 2015): qBittorrent top-level design (To-Be Model): ![top-level](https://cloud.githubusercontent.com/assets/5063477/6224925/f2c247ae-b694-11e4-9a10-c1b2525a041a.jpg) Here is the design that I want to embody. Its key components: 1. Application. It owns all other components, creates and destroys them, exposes one to other components (if possible). Also implements the basic CLI. 2. Core. It owns libtorrent and other core-wide components and utils (like BitTorrent Session, Tracker etc.). 3. GUI. GUI components. It can uses Core components (trough Application). 4. WebUI. Web access implementation. It can uses Core components (trough Application). The most important thing here is that we need to get rid of cross-dependencies wherever it is not required (and such cases are very rare). Core should not in any way depend on UI components. UI components use Core, and not Vice versa. It's not supposed to know about that and how its uses, but only to provide an interface in terms of their subject area. This mainly applies to BitTorrent session, but other Core code should not have external dependencies. Ideally, the Core should compile no matter what other top-level components used in this build, while not having any `#ifndef DISABLE_GUI` etc. One more thing. I want the application structure was reflected everywhere - in the directory structure of the project, and used the names (namespaces, where necessary), and the method of inclusion of headers. Opening any project file, we need to understand that it uses, what classes and types belong to one or another part of the application structure.
Author
Owner

@Gelmir commented on GitHub (Feb 17, 2015):

@glassez, where would RSS/Search code go in this model?

@Gelmir commented on GitHub (Feb 17, 2015): @glassez, where would RSS/Search code go in this model?
Author
Owner

@glassez commented on GitHub (Feb 17, 2015):

I haven't come to RSS... as for the search, its basic components must belong to the Core that you can use them not only from the GUI. Already have a request to access them from WebUI.

@glassez commented on GitHub (Feb 17, 2015): I haven't come to RSS... as for the search, its basic components must belong to the Core that you can use them not only from the GUI. Already have a request to access them from WebUI.
Author
Owner

@glassez commented on GitHub (Feb 17, 2015):

@sledgehammer999 There is really a lot of work, and I can't do everything at once. So we'll have to do it by parts.
The first part is torrents data caching. Also I can implement asynchronous torrents addition, if we make a decision regarding the queue storage.
I have read your discussion. The option of encoding priority in the name of .fastresume file is simple only at first glance. It's just when loading, but can be difficult when you save, because you need to worry about deleting old files, which names contains outdated priority. Although, we can keep the current name of .fastresume file, and if the new will not match with it, delete the old file.
Other options here are either to store an ordered list of torrents in a separate file (you can use a simple text file for quick parsing), or to use a database (we could store queue and other data there, including fastresume and persistent data).

@glassez commented on GitHub (Feb 17, 2015): @sledgehammer999 There is really a lot of work, and I can't do everything at once. So we'll have to do it by parts. The first part is torrents data caching. Also I can implement asynchronous torrents addition, if we make a decision regarding the queue storage. I have read your discussion. The option of encoding priority in the name of .fastresume file is simple only at first glance. It's just when loading, but can be difficult when you save, because you need to worry about deleting old files, which names contains outdated priority. Although, we can keep the current name of .fastresume file, and if the new will not match with it, delete the old file. Other options here are either to store an ordered list of torrents in a separate file (you can use a simple text file for quick parsing), or to use a database (we could store queue and other data there, including fastresume and persistent data).
Author
Owner

@sledgehammer999 commented on GitHub (Feb 17, 2015):

@glassez I generally agree with the picture.

about the async loading: Isn't it simpler to manage the deleting of old files this way. Fist of all, the queue number should be coded in the fastresume filename in this way <hash>.<queue number>.fastresume. Then before saving the new fastresume, we query the file list in BT_backup, filter by .fastresume and delete all those that begin with our hash. No need to remember the old queue number.

@sledgehammer999 commented on GitHub (Feb 17, 2015): @glassez I generally agree with the picture. about the async loading: Isn't it simpler to manage the deleting of old files this way. Fist of all, the queue number should be coded in the fastresume filename in this way `<hash>.<queue number>.fastresume`. Then before saving the new fastresume, we query the file list in BT_backup, filter by .fastresume and delete all those that begin with our hash. No need to remember the old queue number.
Author
Owner

@glassez commented on GitHub (Feb 17, 2015):

Storing the queue number (and not the full file name, as I suggested earlier), we will win in performance, since get rid of unnecessary disk operations and sorts.

@glassez commented on GitHub (Feb 17, 2015): Storing the queue number (and not the full file name, as I suggested earlier), we will win in performance, since get rid of unnecessary disk operations and sorts.
Author
Owner

@glassez commented on GitHub (Feb 17, 2015):

Sorry, not sorts but filtering.

@glassez commented on GitHub (Feb 17, 2015): Sorry, not sorts but filtering.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 17, 2015):

Storing the queue number (and not the full file name, as I suggested earlier), we will win in performance, since get rid of unnecessary disk operations and sorts.

Oh you were talking only about the storing of the queue number in a txt/db
On second thought, do we really need to store it on disk?
Why not have a QHash that will store the previous file name for each hash? We look it up before saving the new fastresume, we save it, we delete the old one, we update the QHash.
I don't think this needs to survive between sessions.

@sledgehammer999 commented on GitHub (Feb 17, 2015): > Storing the queue number (and not the full file name, as I suggested earlier), we will win in performance, since get rid of unnecessary disk operations and sorts. Oh you were talking only about the storing of the queue number in a txt/db On second thought, do we really need to store it on disk? Why not have a QHash that will store the previous file name for each hash? We look it up before saving the new fastresume, we save it, we delete the old one, we update the QHash. I don't think this needs to survive between sessions.
Author
Owner

@glassez commented on GitHub (Feb 17, 2015):

Blame the language barrier!
I do not propose to keep the queue in the database. I just suggested several cases:

  1. We do not include queue number into file name and store an ordered list of torrents (its hashes) in a separate file (in plain text file as an option). During session startup we just read this file and obtain the order of torrents and then load approprite .fastresume files.
  2. We include queue number into file name, we also store last queue number of torrents (or even last filename) in memory and delete old files.
  3. We do not use .fastresume file at all, and the fastresume data stored in the database. There we store the queue number and other persistent data. During session startup we just query records from database ordered by queue number.
@glassez commented on GitHub (Feb 17, 2015): Blame the language barrier! I do not propose to keep the queue in the database. I just suggested several cases: 1. We _do not include queue number into file name_ and store an ordered list of torrents (its hashes) in a separate file (in plain text file as an option). During session startup we just read this file and obtain the order of torrents and then load approprite .fastresume files. 2. We _include queue number into file name_, we also store last queue number of torrents (or even last filename) in memory and delete old files. 3. We do not use .fastresume file at all, and the fastresume data stored in the database. There we store the queue number and other persistent data. During session startup we just query records from database ordered by queue number.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 17, 2015):

Number 2 is the better of the 3.

@sledgehammer999 commented on GitHub (Feb 17, 2015): Number 2 is the better of the 3.
Author
Owner

@glassez commented on GitHub (Feb 17, 2015):

Number 2 is the better of the 3.

I already understood that you dislike the database. But now it does not matter. I'm going to implement the second option. Perhaps some other time I implement this using a database as an alternative (possibly specified in the configuration). But not now. Now there are more important things to do.

Last clarification. Now all persistent data will be stored in .fastresume file? Queue number was the last that was preventing the rejection from the storing this data in a separate file?

@glassez commented on GitHub (Feb 17, 2015): > Number 2 is the better of the 3. I already understood that you dislike the database. But now it does not matter. I'm going to implement the second option. Perhaps some other time I implement this using a database as an alternative (possibly specified in the configuration). But not now. Now there are more important things to do. Last clarification. Now all persistent data will be stored in .fastresume file? Queue number was the last that was preventing the rejection from the storing this data in a separate file?
Author
Owner

@sledgehammer999 commented on GitHub (Feb 17, 2015):

Queue number was the last that was preventing the rejection from the storing this data in a separate file?

IIRC, yes. Unless we added some extra field in the meantime. Anyway, if there is some obstacle you will discover it during the refactoring. But I am confident that there isn't any.

@sledgehammer999 commented on GitHub (Feb 17, 2015): > Queue number was the last that was preventing the rejection from the storing this data in a separate file? IIRC, yes. Unless we added some extra field in the meantime. Anyway, if there is some obstacle you will discover it during the refactoring. But I am confident that there isn't any.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 23, 2015):

@glassez I think all your next changes will be for v3.3.0. I also am considering dropping qt4 entirely after v3.2.0. Do you have know any reason why I shouldn't do this?
@pmzqla IIRC you use linux right? qt5 support is ok there, right? We don't have any problems?
@Noctem what is qt5 support in OSX?

@glassez if qt4 is dropped we can choose to use QSaveFile and be sure no data is lost. (and of course it will be used for the .inis too)

@sledgehammer999 commented on GitHub (Feb 23, 2015): @glassez I think all your next changes will be for v3.3.0. I also am considering dropping qt4 entirely after v3.2.0. Do you have know any reason why I shouldn't do this? @pmzqla IIRC you use linux right? qt5 support is ok there, right? We don't have any problems? @Noctem what is qt5 support in OSX? @glassez if qt4 is dropped we can choose to use [QSaveFile](http://doc.qt.io/qt-5/qsavefile.html) and be sure no data is lost. (and of course it will be used for the .inis too)
Author
Owner

@pmzqla commented on GitHub (Feb 23, 2015):

I use Debian (sid). I've just built qBittorrent with Qt5 with no problems. This means that it will be possible to build qBittorrent with Qt5 on the next Debian stable.

EDIT: and it seems lot of stuff had been backported, so it's maybe even possible to build it with Qt5 on the current stable.

@pmzqla commented on GitHub (Feb 23, 2015): I use Debian (sid). I've just built qBittorrent with Qt5 with no problems. This means that it will be possible to build qBittorrent with Qt5 on the next Debian stable. EDIT: and it seems lot of stuff had been backported, so it's maybe even possible to build it with Qt5 on the current stable.
Author
Owner

@Noctem commented on GitHub (Feb 23, 2015):

@sledgehammer999 Qt5 is working well in OS X. I use 3.2.0 with Qt5 everyday, and it looks better than Qt4. Do you plan on distributing the 3.2 release with Qt5?

@Noctem commented on GitHub (Feb 23, 2015): @sledgehammer999 Qt5 is working well in OS X. I use 3.2.0 with Qt5 everyday, and it looks better than Qt4. Do you plan on distributing the 3.2 release with Qt5?
Author
Owner

@glassez commented on GitHub (Feb 24, 2015):

I think all your next changes will be for v3.3.0. I also am considering dropping qt4 entirely after v3.2.0. Do you have know any reason why I shouldn't do this?

The only reason that may prevent migration to Qt5 is possible lack of support for it in linux distros. You need to check what version of Qt are available in the main distros.

@glassez commented on GitHub (Feb 24, 2015): > I think all your next changes will be for v3.3.0. I also am considering dropping qt4 entirely after v3.2.0. Do you have know any reason why I shouldn't do this? The only reason that may prevent migration to Qt5 is possible lack of support for it in linux distros. You need to check what version of Qt are available in the main distros.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 24, 2015):

You need to check what version of Qt are available in the main distros.

Debian testing(which will become the next stable) has qt5 support. The same goes for Ubuntu.
I suspect Mint will not have a problem since it derives from Ubuntu/Debian. Fedora also has qt5.
And Arch is a rolling distro so it already has it.
I think those are the major distros.

@sledgehammer999 commented on GitHub (Feb 24, 2015): > You need to check what version of Qt are available in the main distros. Debian testing(which will become the next stable) has qt5 support. The same goes for Ubuntu. I suspect Mint will not have a problem since it derives from Ubuntu/Debian. Fedora also has qt5. And Arch is a rolling distro so it already has it. I think those are the major distros.
Author
Owner

@sledgehammer999 commented on GitHub (Feb 24, 2015):

As for v3.2.0, most of the issues I left in the corresponding milestone are related to the build system.
I intend to make the usage of qt4 an explicit option. The script will look for qt5 and fail if it doesn't exist and the invoker has used the "--use-qt4" option. I'll do the same for libtorrent 0.16.x. Default will be libtorrent 1.0.x.
Of course the Windows binaries will be build using qt5 and libtorrent 1.0.x.

@sledgehammer999 commented on GitHub (Feb 24, 2015): As for v3.2.0, most of the issues I left in the corresponding milestone are related to the build system. I intend to make the usage of qt4 an explicit option. The script will look for qt5 and fail if it doesn't exist and the invoker has used the "--use-qt4" option. I'll do the same for libtorrent 0.16.x. Default will be libtorrent 1.0.x. Of course the Windows binaries will be build using qt5 and libtorrent 1.0.x.
Author
Owner

@ngosang commented on GitHub (Feb 24, 2015):

And Arch is a rolling distro so it already has it.

The QT5 applications work well. The problem is that QT5 applications do not use the default theme and look very ugly.
Qt4 left (the KDE4 theme), Qt5 right.

@ngosang commented on GitHub (Feb 24, 2015): > And Arch is a rolling distro so it already has it. The QT5 applications work well. The problem is that QT5 applications do not use the default theme and look very ugly. Qt4 left (the KDE4 theme), Qt5 right. ![](http://i46.tinypic.com/j607tk.png)
Author
Owner

@sledgehammer999 commented on GitHub (Feb 24, 2015):

The problem is that QT5 applications do not use the default theme and look very ugly.

Is that fixable? For example under GTK DEs you can use the qt4-qtconfig program. Is there a similar solution for qt5 apps?

@sledgehammer999 commented on GitHub (Feb 24, 2015): > The problem is that QT5 applications do not use the default theme and look very ugly. Is that fixable? For example under GTK DEs you can use the `qt4-qtconfig` program. Is there a similar solution for qt5 apps?
Author
Owner

@ngosang commented on GitHub (Feb 24, 2015):

Is that fixable?

For now you can not do anything. Qt4 themes are not compatible with Qt5. The Qt guys are working to make a Qt5 theme that mimics the Oxygen theme used in Qt4.

@ngosang commented on GitHub (Feb 24, 2015): > Is that fixable? For now you can not do anything. Qt4 themes are not compatible with Qt5. The Qt guys are working to make a Qt5 theme that mimics the Oxygen theme used in Qt4.
Author
Owner

@ngosang commented on GitHub (Feb 24, 2015):

There is an ugly hack that partially works. You can run a Qt5 app with this parameter "-style=gtk+" and the app uses the Qt5 theme that it's used to run GTK apps in KDE5 desktop. Works only in the apps that doesn't enforce one specific theme. 😖 😖 😖
https://bbs.archlinux.org/viewtopic.php?id=160206

@ngosang commented on GitHub (Feb 24, 2015): There is an ugly hack that partially works. You can run a Qt5 app with this parameter "-style=gtk+" and the app uses the Qt5 theme that it's used to run GTK apps in KDE5 desktop. Works only in the apps that doesn't enforce one specific theme. :confounded: :confounded: :confounded: https://bbs.archlinux.org/viewtopic.php?id=160206
Author
Owner

@pmzqla commented on GitHub (Feb 24, 2015):

Oxygen had been already ported to Qt5. The problem is that it depends on KF5. I don't think it will be possible to have oxygen for Qt5 without it. Funnily, qBittorrent blends in perfectly if the DE is not depending on Qt, Gnome for instance.

@ngosang
-style gtk should tell qBittorrent to use the style used for GTK application, which can also be qtcurve. The integration is not perfect though. The default theme should be fusion, which is not the one of the second window in the screenshot you posted.

This is how qBittorrent looks with fusion (yes, it's not perfect):
fusion

This is how it looks in Gnome (I don't know if it's normal the white line on top of the left column, right above "TORRENTS". I never use Gnome, this screen was taken from inside a virtual machine):
gtk

@pmzqla commented on GitHub (Feb 24, 2015): Oxygen had been already ported to Qt5. The problem is that it depends on KF5. I don't think it will be possible to have oxygen for Qt5 without it. Funnily, qBittorrent blends in perfectly if the DE is not depending on Qt, Gnome for instance. @ngosang `-style gtk` should tell qBittorrent to use the style used for GTK application, which can also be qtcurve. The integration is not perfect though. The default theme should be fusion, which is not the one of the second window in the screenshot you posted. This is how qBittorrent looks with fusion (yes, it's not perfect): ![fusion](https://cloud.githubusercontent.com/assets/6256149/6360228/c49f02e2-bc78-11e4-9408-d098b06b461b.png) This is how it looks in Gnome (I don't know if it's normal the white line on top of the left column, right above "TORRENTS". I never use Gnome, this screen was taken from inside a virtual machine): ![gtk](https://cloud.githubusercontent.com/assets/6256149/6360348/b53003e6-bc79-11e4-8e89-7e339dfc934c.png)
Author
Owner

@pmzqla commented on GitHub (Feb 24, 2015):

I don't know if I should create a separate issue for this, but I think that QBtSession::handleTorrentFinishedAlert() has to be reworked.

Currently it's called when a download is completed and it does the followings:

  • Remove .!qB from all the files
  • Move the files from the temp folder
  • Recheck the torrent
  • Launch external program
  • (send email)
  • Shutdown the computer

The main problem is that the first two operations are asynchronous and the others depend on them. This causes some problems, such as #2107 #2561 and I've seen other problems reported with the extension appended.

@pmzqla commented on GitHub (Feb 24, 2015): I don't know if I should create a separate issue for this, but I think that `QBtSession::handleTorrentFinishedAlert()` has to be reworked. Currently it's called when a download is completed and it does the followings: - Remove .!qB from all the files - Move the files from the temp folder - Recheck the torrent - Launch external program - (send email) - Shutdown the computer The main problem is that the first two operations are asynchronous and the others depend on them. This causes some problems, such as #2107 #2561 and I've seen other problems reported with the extension appended.
Author
Owner

@ngosang commented on GitHub (Feb 24, 2015):

@pmzqla Thanks for the explanation.

@ngosang commented on GitHub (Feb 24, 2015): @pmzqla Thanks for the explanation.
Author
Owner

@andoruB commented on GitHub (Mar 1, 2015):

It would be really awesome if some performance improvements can be achieved. Currently I have around 250 torrents loaded in the client, and I have to wait ~3 minutes when I start qBitorrent and it constantly takes about 10% CPU when running (not sure if this is expected behaviour). In other words, same thing @sledgehammer999 mentioned in an earlier comment.

@andoruB commented on GitHub (Mar 1, 2015): It would be really awesome if some performance improvements can be achieved. Currently I have around 250 torrents loaded in the client, and I have to wait ~3 minutes when I start qBitorrent and it constantly takes about 10% CPU when running (not sure if this is expected behaviour). In other words, same thing @sledgehammer999 mentioned in an earlier comment.
Author
Owner

@glassez commented on GitHub (Mar 1, 2015):

@andoruB Since I don't have much of torrents, I need your help (and other users with a large number of torrents) to test the new behavior, when I do it.

@glassez commented on GitHub (Mar 1, 2015): @andoruB Since I don't have much of torrents, I need your help (and other users with a large number of torrents) to test the new behavior, when I do it.
Author
Owner

@andoruB commented on GitHub (Mar 1, 2015):

I forgot to mention that I'm using an older version of qB, one that's made available in the Debian unstable repos (3.1.11) so this version doesn't have any of your modifications included. But I'm building qB source cloned from this git and will let you know how it works.
I would be glad to help with my limited expertise :)

@andoruB commented on GitHub (Mar 1, 2015): I forgot to mention that I'm using an older version of qB, one that's made available in the Debian unstable repos (3.1.11) so this version doesn't have any of your modifications included. But I'm building qB source cloned from this git and will let you know how it works. I would be glad to help with my limited expertise :)
Author
Owner

@sledgehammer999 commented on GitHub (Mar 1, 2015):

@andoruB CPU during runtime should be minimal with current git master.
However, currently there isn't any optimization about the startup.

@sledgehammer999 commented on GitHub (Mar 1, 2015): @andoruB CPU during runtime should be minimal with current git master. However, currently there isn't any optimization about the startup.
Author
Owner

@andoruB commented on GitHub (Mar 1, 2015):

Weird, the client startup is now a lot snappier, but the CPU usage during runtime is the same.
I built it without the webui, could that contribute to anything?

@andoruB commented on GitHub (Mar 1, 2015): Weird, the client startup is now a lot snappier, but the CPU usage during runtime is the same. I built it without the webui, could that contribute to anything?
Author
Owner

@glassez commented on GitHub (Apr 6, 2015):

Yay! My branch is finally released from non-buildable state.
This does not mean that I completely finished the redesign - there are still a lot of work. But I almost finished to make the changes that affect a lot of files. Soon I will make some more edits and make preliminary tests and then publish this BIG PR.
@sledgehammer999 In this regard, I ask not to merge any significant changes during this time. It's damn hard to support it!

@glassez commented on GitHub (Apr 6, 2015): Yay! My branch is finally released from non-buildable state. This does not mean that I completely finished the redesign - there are still a lot of work. But I almost finished to make the changes that affect a lot of files. Soon I will make some more edits and make preliminary tests and then publish this BIG PR. @sledgehammer999 In this regard, I ask not to merge any significant changes during this time. It's damn hard to support it!
Author
Owner

@sledgehammer999 commented on GitHub (Apr 6, 2015):

Good to know.
I'll try to comply. However, v3.2.0 takes precedents. I suspect only minor mods are necessary in the files under "qtlibtorrent" folder.
I'll make them as PR first and give you a heads up.

@sledgehammer999 commented on GitHub (Apr 6, 2015): Good to know. I'll try to comply. However, v3.2.0 takes precedents. I suspect only minor mods are necessary in the files under "qtlibtorrent" folder. I'll make them as PR first and give you a heads up.
Author
Owner

@glassez commented on GitHub (Apr 18, 2015):

As for v3.2.0, most of the issues I left in the corresponding milestone are related to the build system.
I intend to make the usage of qt4 an explicit option. The script will look for qt5 and fail if it doesn't exist and the invoker has used the "--use-qt4" option. I'll do the same for libtorrent 0.16.x. Default will be libtorrent 1.0.x.
Of course the Windows binaries will be build using qt5 and libtorrent 1.0.x.

You're going to leave support for libtorrent 0.16.x in v3.3?
I already finished preparing PR. But it remains to fix support for libtorrent 0.16.x. Or should I drop it?

@glassez commented on GitHub (Apr 18, 2015): > As for v3.2.0, most of the issues I left in the corresponding milestone are related to the build system. > I intend to make the usage of qt4 an explicit option. The script will look for qt5 and fail if it doesn't exist and the invoker has used the "--use-qt4" option. I'll do the same for libtorrent 0.16.x. Default will be libtorrent 1.0.x. > Of course the Windows binaries will be build using qt5 and libtorrent 1.0.x. You're going to leave support for libtorrent 0.16.x in v3.3? I already finished preparing PR. But it remains to fix support for libtorrent 0.16.x. Or should I drop it?
Author
Owner

@sledgehammer999 commented on GitHub (Apr 18, 2015):

I am in a huge dilemma here. I want to drop 0.16 for v3.3.0.
I was also considering backporting your restructuring back into v3.2.x. Why? Because there is a ton of PRs waiting to be merged. If I don't backport your changes then the PR authors should need to do double work. One PR for the v3.2.x branch and one for the master. I don't know if they would like to do that.
So, the 0.16 dropping, it depends on if I should backport your changes or not.
Any suggestions on how to proceed?

@sledgehammer999 commented on GitHub (Apr 18, 2015): I am in a huge dilemma here. I want to drop 0.16 for v3.3.0. I was also considering backporting your restructuring back into v3.2.x. Why? Because there is a ton of PRs waiting to be merged. If I don't backport your changes then the PR authors should need to do double work. One PR for the v3.2.x branch and one for the master. I don't know if they would like to do that. So, the 0.16 dropping, it depends on if I should backport your changes or not. Any suggestions on how to proceed?
Author
Owner

@glassez commented on GitHub (Apr 19, 2015):

Okay, then I'll just finish support for libtorrent 0.16.x. Besides, it will show how decreased dependent code, but also show how to add support for other (newer) versions.

P.S. About backporting... Not sure you will be able to achieve great success in this matter. I am afraid when I see how you (and others) will review my changes - they are huge. As I expected, I won't be able to break it into small independent commits. Although I was on the way and came across some minor problems, I had to correct them on the go, not to spend time on creating and maintaining separate commits. Sorry...

@glassez commented on GitHub (Apr 19, 2015): Okay, then I'll just finish support for libtorrent 0.16.x. Besides, it will show how decreased dependent code, but also show how to add support for other (newer) versions. P.S. About backporting... Not sure you will be able to achieve great success in this matter. I am afraid when I see how you (and others) will review my changes - they are huge. As I expected, I won't be able to break it into small independent commits. Although I was on the way and came across some minor problems, I had to correct them on the go, not to spend time on creating and maintaining separate commits. Sorry...
Author
Owner

@duytrung commented on GitHub (Apr 19, 2015):

Using QT, I found that it is not necessary because I found that the user interface of QBittorrent is simple. There is no many things to display except a few buttons, some directory display content of torrent. Focusing on the practical functions such as download algorithms, swarm merging, etc.. probably the best thing :-)

@duytrung commented on GitHub (Apr 19, 2015): Using QT, I found that it is not necessary because I found that the user interface of QBittorrent is simple. There is no many things to display except a few buttons, some directory display content of torrent. Focusing on the practical functions such as download algorithms, swarm merging, etc.. probably the best thing :-)
Author
Owner

@Chocobo1 commented on GitHub (Apr 22, 2015):

This is what I have in mind (in regard to the big change, not taking future milestones into consideration):

  1. fix all v3.2.0 blockers and release v3.2.0
  2. merge glassez's redesign asap and branch to v3.3.0
  3. PR rebase onto v3.3.0

v3.2.x should only accept maintaining fixes, cherry pick important PR from v3.3.0 to backport
v3.3.x will be the new developing branch, also try to give out early alpha builds for users to test and report.
And hope future refactoring could be done more easily and in smaller steps.

@Chocobo1 commented on GitHub (Apr 22, 2015): This is what I have in mind (in regard to the big change, not taking future milestones into consideration): 1. fix all v3.2.0 blockers and release v3.2.0 2. merge glassez's redesign asap and branch to v3.3.0 3. PR rebase onto v3.3.0 v3.2.x should only accept maintaining fixes, cherry pick important PR from v3.3.0 to backport v3.3.x will be the new developing branch, also try to give out early alpha builds for users to test and report. And hope future refactoring could be done more easily and in smaller steps.
Author
Owner

@glassez commented on GitHub (Apr 25, 2015):

PR #2892 published.

@glassez commented on GitHub (Apr 25, 2015): PR #2892 published.
Author
Owner

@sledgehammer999 commented on GitHub (Jun 11, 2015):

@glassez now that #2892 is merged I want to mention something relevant.
We should continue using the BT_backup folder. Obviously you used another name because now we use a different naming scheme for the fastresumes.
My proposal is to have a transitioning code that will test for the existence of files ending in .fastresume. If it finds them, it will also mark the corresponding .torrent files, otherwise they will be added as not having a fastresume by the fallback mechanism.
When the UI is up, inform the user that "You updated from an older version that saved things differently. You must migrate to the new saving system. If you click yes, you will not be able to go back and use an older version than v3.3.0." If user clicks "Abort", qbt should exit.
Of course in the meantime no torrents should be loaded, if it is detected that the user is coming from and old installation and before he chooses to migrate.
If he chooses to migrate, we read the fastresumes and rename them according to the saved queue number. Then call the default load function.

What do you say?

@sledgehammer999 commented on GitHub (Jun 11, 2015): @glassez now that #2892 is merged I want to mention something relevant. We should continue using the `BT_backup` folder. Obviously you used another name because now we use a different naming scheme for the fastresumes. My proposal is to have a transitioning code that will test for the existence of files ending in .fastresume. If it finds them, it will also mark the corresponding .torrent files, otherwise they will be added as not having a fastresume by the fallback mechanism. When the UI is up, inform the user that "You updated from an older version that saved things differently. You must migrate to the new saving system. If you click yes, you will not be able to go back and use an older version than v3.3.0." If user clicks "Abort", qbt should exit. Of course in the meantime no torrents should be loaded, if it is detected that the user is coming from and old installation and before he chooses to migrate. If he chooses to migrate, we read the fastresumes and rename them according to the saved queue number. Then call the default load function. What do you say?
Author
Owner

@glassez commented on GitHub (Jun 12, 2015):

@sledgehammer999

My proposal is to have a transitioning code

Undoubtedly it should be.
But I want something else to change before that.
I really don't like that we have to use two files to resume the torrent. I want to do only one .fastresume. libtorrent allows you to save metadata in it. If this works correctly, then we will be able to do it without storing separate .torrent file. This should simplify the resume logic.
Once this is done (or rejected) we can work to create a transitional mechanism.

Here I have so far only one comment (offhand):

When the UI is up, inform the user that...

We also need to consider options for NoGUI builds.

@glassez commented on GitHub (Jun 12, 2015): @sledgehammer999 > My proposal is to have a transitioning code Undoubtedly it should be. But I want something else to change before that. I really don't like that we have to use two files to resume the torrent. I want to do only one .fastresume. **libtorrent** allows you to save metadata in it. If this works correctly, then we will be able to do it without storing separate .torrent file. This should simplify the resume logic. Once this is done (or rejected) we can work to create a transitional mechanism. Here I have so far only one comment (offhand): > When the UI is up, inform the user that... We also need to consider options for NoGUI builds.
Author
Owner

@Chocobo1 commented on GitHub (Jun 12, 2015):

Just asking, in the foreseeable future, is there going to be another large refactor?

@Chocobo1 commented on GitHub (Jun 12, 2015): Just asking, in the foreseeable future, is there going to be another large refactor?
Author
Owner

@glassez commented on GitHub (Jun 12, 2015):

Redesign is not over yet. But the rest (I think) can be done gradually in small (relatively small) commits.

@glassez commented on GitHub (Jun 12, 2015): Redesign is not over yet. But the rest (I think) can be done gradually in small (relatively small) commits.
Author
Owner

@ngosang commented on GitHub (Jun 12, 2015):

@glassez This bug is still there in master https://github.com/qbittorrent/qBittorrent/pull/2892#issuecomment-98361957 Can you take a look again?

@ngosang commented on GitHub (Jun 12, 2015): @glassez This bug is still there in master https://github.com/qbittorrent/qBittorrent/pull/2892#issuecomment-98361957 Can you take a look again?
Author
Owner

@glassez commented on GitHub (Jun 12, 2015):

@ngosang Can you test #3194? This should fix it.

@glassez commented on GitHub (Jun 12, 2015): @ngosang Can you test #3194? This should fix it.
Author
Owner

@sledgehammer999 commented on GitHub (Jun 13, 2015):

@glassez I don't think it is a good idea to merge metadata+resumedata into one file. We already have cases where torrent progress is lost due to various reasons (crashes, OS killing the program, etc). Separate .torrent files, since they written only once, ensure that the user at least has torrent added and it doesn't just vanish if crash happens.

@sledgehammer999 commented on GitHub (Jun 13, 2015): @glassez I don't think it is a good idea to merge metadata+resumedata into one file. We already have cases where torrent progress is lost due to various reasons (crashes, OS killing the program, etc). Separate .torrent files, since they written only once, ensure that the user at least has torrent added and it doesn't just vanish if crash happens.
Author
Owner

@glassez commented on GitHub (Jun 13, 2015):

Separate .torrent files, since they written only once, ensure that the user at least has torrent added and it doesn't just vanish if crash happens.

In General, the presence of only the torrent file doesn't give us anything.
When we find such a file, it raises some questions without having the answers, we will not be able to do with this torrent nothing useful.
Here are those questions:

  1. Where to save this torrent? Because the user is unlikely to want to re-download anything big, for example.
  2. What are the names of the files contained in this torrent (because they could be renamed)?
    What about this?
@glassez commented on GitHub (Jun 13, 2015): > Separate .torrent files, since they written only once, ensure that the user at least has torrent added and it doesn't just vanish if crash happens. In General, the presence of only the torrent file doesn't give us anything. When we find such a file, it raises some questions without having the answers, we will not be able to do with this torrent nothing useful. Here are those questions: 1. Where to save this torrent? Because the user is unlikely to want to re-download anything big, for example. 2. What are the names of the files contained in this torrent (because they could be renamed)? What about this?
Author
Owner

@sledgehammer999 commented on GitHub (Jun 13, 2015):

Clearly .torrent file by itself is the indication of an error. So the least we can do for the user is to inform him of that. With that in mind:

Where to save this torrent? Because the user is unlikely to want to re-download anything big, for example.

Add it in paused mode and point it to the current default path.

What are the names of the files contained in this torrent (because they could be renamed)?

If added in paused, the user can at least review the state and probably re-import the file.

The general idea should be: Do as little as possible in terms of destructive(or writing) operations and wait for the user to take action.

PS: Because in such a catastrophic failure we can't do much else. This is the last line of defense.

@sledgehammer999 commented on GitHub (Jun 13, 2015): Clearly .torrent file by itself is the indication of an error. So the least we can do for the user is to inform him of that. With that in mind: > Where to save this torrent? Because the user is unlikely to want to re-download anything big, for example. Add it in paused mode and point it to the current default path. > What are the names of the files contained in this torrent (because they could be renamed)? If added in paused, the user can at least review the state and probably re-import the file. The general idea should be: Do as little as possible in terms of destructive(or writing) operations and wait for the user to take action. PS: Because in such a catastrophic failure we can't do much else. This is the last line of defense.
Author
Owner

@glassez commented on GitHub (Jun 15, 2015):

Well. In this case, consider #3224 and we can begin to implement a transitioning code.

@glassez commented on GitHub (Jun 15, 2015): Well. In this case, consider #3224 and we can begin to implement a transitioning code.
Author
Owner

@sledgehammer999 commented on GitHub (Jun 17, 2015):

@glassez I came here to also suggest you prioritize the transitioning code. I want to provide alpha builds in the forum, so users can help testing the new code.
(of course I'll look into #3224)

@sledgehammer999 commented on GitHub (Jun 17, 2015): @glassez I came here to also suggest you prioritize the transitioning code. I want to provide alpha builds in the forum, so users can help testing the new code. (of course I'll look into #3224)
Author
Owner

@glassez commented on GitHub (Jun 17, 2015):

I want to provide alpha builds in the forum, so users can help testing the new code.

In that case, I'll do it now. But first we need to finish with #3224, because they have overlapping code.

@glassez commented on GitHub (Jun 17, 2015): > I want to provide alpha builds in the forum, so users can help testing the new code. In that case, I'll do it now. But first we need to finish with #3224, because they have overlapping code.
Author
Owner
@sledgehammer999 commented on GitHub (Jun 21, 2015): @glassez 2 regressions: 1. https://qbforums.shiki.hu/index.php/topic,3606.msg18026.html#msg18026 2. https://qbforums.shiki.hu/index.php/topic,3606.msg18028.html#msg18028
Author
Owner

@glassez commented on GitHub (Jun 21, 2015):

@sledgehammer999 I honestly have never used the RSS feature. Please give me some instructions how I can use this so I could run some tests.

@glassez commented on GitHub (Jun 21, 2015): @sledgehammer999 I honestly have never used the RSS feature. Please give me some instructions how I can use this so I could run some tests.
Author
Owner

@Matth7878 commented on GitHub (Jun 21, 2015):

@glassez I'm the one who did report this regression. To reproduce :

  1. display rss tab with menu view->rss reader
  2. go to rss tab, click on new subscription button, enter an rss url (like https://kat.cr/tv/?rss=1 )
    click on added rss feeds and you should see all torrents in right pane
  3. double click one => with version 3.2.0 it displays dialog to add torrent (if you did select in option to "display torrent content and some options" when adding torrent). Alpha 3.3.0 do not respect this setting and add torrent without displaying dialog
@Matth7878 commented on GitHub (Jun 21, 2015): @glassez I'm the one who did report this regression. To reproduce : 1. display rss tab with menu view->rss reader 2. go to rss tab, click on new subscription button, enter an rss url (like https://kat.cr/tv/?rss=1 ) click on added rss feeds and you should see all torrents in right pane 3. double click one => with version 3.2.0 it displays dialog to add torrent (if you did select in option to "display torrent content and some options" when adding torrent). Alpha 3.3.0 do not respect this setting and add torrent without displaying dialog
Author
Owner

@sledgehammer999 commented on GitHub (Jun 21, 2015):

Please give me some instructions how I can use this so I could run some tests.

@glassez I think the problem is here. IIRC you had left some old code there and I reminded you to update it in the same way you did for torrent addition in the rest of the code. Apparently both of us missed the obvious mistake. IMO it should be:

if (Preferences::instance()->useAdditionDialog())
    AddNewTorrentDialog::show(torrentLink, this);
else
    BitTorrent::Session::instance()->addTorrent(torrentLink);
@sledgehammer999 commented on GitHub (Jun 21, 2015): > Please give me some instructions how I can use this so I could run some tests. @glassez I think the problem is [here](https://github.com/qbittorrent/qBittorrent/blob/master/src/gui/rss/rss_imp.cpp#L349). IIRC you had left some old code there and I reminded you to update it in the same way you did for torrent addition in the rest of the code. Apparently both of us missed the obvious mistake. IMO it should be: ``` c++ if (Preferences::instance()->useAdditionDialog()) AddNewTorrentDialog::show(torrentLink, this); else BitTorrent::Session::instance()->addTorrent(torrentLink); ```
Author
Owner

@sledgehammer999 commented on GitHub (Jun 21, 2015):

PS: I am not sure about the this pointer.

@sledgehammer999 commented on GitHub (Jun 21, 2015): PS: I am not sure about the `this` pointer.
Author
Owner

@glassez commented on GitHub (Jun 21, 2015):

@sledgehammer999 I think you right here. I'll test it tomorrow.

@glassez commented on GitHub (Jun 21, 2015): @sledgehammer999 I think you right here. I'll test it tomorrow.
Author
Owner

@ngosang commented on GitHub (Jun 23, 2015):

@glassez One more bug. (I don't know if it was already in v3.2.0)

  1. Select one torrent.
  2. Go to the Trackers tab.
  3. Delete one tracker (or more).
  4. Restart qBittorrent.
  5. The tracker is there again...
@ngosang commented on GitHub (Jun 23, 2015): @glassez One more bug. (I don't know if it was already in v3.2.0) 1) Select one torrent. 2) Go to the Trackers tab. 3) Delete one tracker (or more). 4) Restart qBittorrent. 5) The tracker is there again...
Author
Owner

@glassez commented on GitHub (Jun 24, 2015):

@ngosang Please try #3290.

@glassez commented on GitHub (Jun 24, 2015): @ngosang Please try #3290.
Author
Owner

@ngosang commented on GitHub (Jun 28, 2015):

@glassez Must be a bug in the trackers list. This happened when I added a magnet but I can't replicate.
Sometimes the info displayed in the tracker list is incorrect (all trackers display 0 peers). If I change the selected torrent or close/open the lower panel the error persists. In the transfer list (in the Seeds Peers columns) the displayed value is correct. This torrent has a lot of Seeds/Peers but in the tracker list all trackers report 0 peers (even dht).

@ngosang commented on GitHub (Jun 28, 2015): @glassez Must be a bug in the trackers list. This happened when I added a magnet but I can't replicate. Sometimes the info displayed in the tracker list is incorrect (all trackers display 0 peers). If I change the selected torrent or close/open the lower panel the error persists. In the transfer list (in the Seeds Peers columns) the displayed value is correct. This torrent has a lot of Seeds/Peers but in the tracker list all trackers report 0 peers (even dht).
Author
Owner

@zeule commented on GitHub (May 11, 2016):

What about droping Qt4 support?

@zeule commented on GitHub (May 11, 2016): What about droping Qt4 support?
Author
Owner

@glassez commented on GitHub (May 11, 2016):

What about droping Qt4 support?

If we were talking only about Windows, we could do this for a long time. But as I understand it, there are some problems with Qt5 support in Linux.

@glassez commented on GitHub (May 11, 2016): > What about droping Qt4 support? If we were talking only about Windows, we could do this for a long time. But as I understand it, there are some problems with Qt5 support in Linux.
Author
Owner

@zeule commented on GitHub (May 11, 2016):

But as I understand it, there are some problems with Qt5 support in Linux.

I'm not aware of them. There might be a lack of Qt5 for a NAS systems. But you hardly find a desktop distribution without Qt5.

@zeule commented on GitHub (May 11, 2016): > But as I understand it, there are some problems with Qt5 support in Linux. I'm not aware of them. There might be a lack of Qt5 for a NAS systems. But you hardly find a desktop distribution without Qt5.
Author
Owner

@glassez commented on GitHub (May 11, 2016):

@evsh you should ask somebody other. I don't know much about it. I remember we discussed it and there were problems in this.

@glassez commented on GitHub (May 11, 2016): @evsh you should ask somebody other. I don't know much about it. I remember we discussed it and there were problems in this.
Author
Owner

@zeule commented on GitHub (May 11, 2016):

@all:
What were the problems with Qt5 and Linux? In this thread I found only the style problem, which is resolved long time ago.

@zeule commented on GitHub (May 11, 2016): @all: What were the problems with Qt5 and Linux? In this thread I found only the style problem, which is resolved long time ago.
Author
Owner

@ngosang commented on GitHub (May 11, 2016):

I use Linux + KDE5 + Qt5 without any problem.

@ngosang commented on GitHub (May 11, 2016): I use Linux + KDE5 + Qt5 without any problem.
Author
Owner

@glassez commented on GitHub (May 12, 2016):

However, @sledgehammer999 rejected it. Maybe we should ask him?

@glassez commented on GitHub (May 12, 2016): However, @sledgehammer999 rejected it. Maybe we should ask him?
Author
Owner

@zywo commented on GitHub (May 12, 2016):

I think @sledgehammer999 wants support Qt4 until EOL of Ubuntu 14.04 (2019).

@zywo commented on GitHub (May 12, 2016): I think @sledgehammer999 wants support Qt4 until EOL of Ubuntu 14.04 (2019).
Author
Owner

@zeule commented on GitHub (May 12, 2016):

There is Qt 5.2.1 in Ubuntu 14.04. @sledgehammer999 ?

@zeule commented on GitHub (May 12, 2016): There is Qt 5.2.1 in Ubuntu 14.04. @sledgehammer999 ?
Author
Owner

@zywo commented on GitHub (May 12, 2016):

See the 2nd part of this comment https://github.com/qbittorrent/qBittorrent/issues/5091#issuecomment-209096887

@zywo commented on GitHub (May 12, 2016): See the 2nd part of this comment https://github.com/qbittorrent/qBittorrent/issues/5091#issuecomment-209096887
Author
Owner

@zeule commented on GitHub (May 12, 2016):

Thanks, @zywo!

@zeule commented on GitHub (May 12, 2016): Thanks, @zywo!
Author
Owner

@zeule commented on GitHub (May 13, 2016):

I would be happy to implement plugins for qBt (not external executables, but shared modules). Don't think it is needed to name possible advantages of the plugin system. Our core API is Qt-centric and thus, it would be convenient to use Qt plugins engine. But, unfortunately, Qt4 and Qt5 have incompatible plugin APIs, that is why I'm interested in dropping Qt4 as soon as it became possible. Or it would be needed to maintain a custom plugins manager.

@zeule commented on GitHub (May 13, 2016): I would be happy to implement plugins for qBt (not external executables, but shared modules). Don't think it is needed to name possible advantages of the plugin system. Our core API is Qt-centric and thus, it would be convenient to use Qt plugins engine. But, unfortunately, Qt4 and Qt5 have incompatible plugin APIs, that is why I'm interested in dropping Qt4 as soon as it became possible. Or it would be needed to maintain a custom plugins manager.
Author
Owner

@glassez commented on GitHub (May 15, 2016):

I would be happy to implement plugins for qBt

For what purpose? And what do you see a benefit from their use?

@glassez commented on GitHub (May 15, 2016): > I would be happy to implement plugins for qBt For what purpose? And what do you see a benefit from their use?
Author
Owner

@sledgehammer999 commented on GitHub (May 15, 2016):

For qt4 pretty much what @zywo linked to.
For plugins: Why!?!? Don't tell me you want something like deluge does(and other non-torrent programs). Facilities to extend program functionality. IMO that is too much work, code changes and for little benefit and I suspect it will add a lot of code complexity. Also we would have to be careful to be API/ABI compatible for released plugins. I am not ready to make such a commitment!!!
We are an open source program. If something gets denied for merging it is probably for good reason. Besides, I rarely deny new PRs. So IMO no need for plugin system.

@sledgehammer999 commented on GitHub (May 15, 2016): For qt4 pretty much what @zywo linked to. For plugins: Why!?!? Don't tell me you want something like deluge does(and other non-torrent programs). Facilities to extend program functionality. IMO that is too much work, code changes and for little benefit and I suspect it will add a lot of code complexity. Also we would have to be careful to be API/ABI compatible for released plugins. I am not ready to make such a commitment!!! We are an open source program. If something gets denied for merging it is probably for good reason. Besides, I rarely deny new PRs. So IMO no need for plugin system.
Author
Owner

@zeule commented on GitHub (May 23, 2016):

I don't think that a plugin architecture (aside from binary compatibility) would actually add complexity. Plugin architecture would allow formalising interfaces inside of qBt. And I think about it not only as a way to add additional functionality but also as a way to remove something. For example, WebUI might be a plugin, Python-based search might be a plugin to name big parts. Launching external program for completed torrents might be a plugin, extended categories might be a plugin, a colour theme might also be a plugin (and maybe you accept a Plasma-based one in that way :D). All these parts could be unneeded for a user and it would be great to have a possibility to disable them not only to save resources but to simplify UI too.

@zeule commented on GitHub (May 23, 2016): I don't think that a plugin architecture (aside from binary compatibility) would actually add complexity. Plugin architecture would allow formalising interfaces inside of qBt. And I think about it not only as a way to add additional functionality but also as a way to remove something. For example, WebUI might be a plugin, Python-based search might be a plugin to name big parts. Launching external program for completed torrents might be a plugin, extended categories might be a plugin, a colour theme might also be a plugin (and maybe you accept a Plasma-based one in that way :D). All these parts could be unneeded for a user and it would be great to have a possibility to disable them not only to save resources but to simplify UI too.
Author
Owner

@ximply commented on GitHub (May 23, 2016):

I think that a plugin architecture is more for developers but not users.

@ximply commented on GitHub (May 23, 2016): I think that a plugin architecture is more for developers but not users.
Author
Owner

@thalieht commented on GitHub (Sep 18, 2018):

This can be closed, right?

@thalieht commented on GitHub (Sep 18, 2018): This can be closed, right?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#2058
No description provided.