This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Time torrent was added

Tags: None
(comma "," separated)
0xab
Registered Member
Posts
3
Karma
0

Time torrent was added

Sun Jan 31, 2010 11:14 am
Hi,

Here's a patch to record and display the time a torrent was added. I called it the creation time for lack of something better, maybe time_added is nicer. It also fixes the fact that the total number of columns in the viewmodel is hardcoded.

http://0xab.com/patches/ktorrent-time.diff

A version of this patch from my git repository also strips away excess whitespace at the end of lines (there seems to be a lot).
http://0xab.com/code/ktorrent.git

Last edited by 0xab on Tue Feb 02, 2010 5:16 pm, edited 1 time in total.
George
Moderator
Posts
5421
Karma
1

Re: Time torrent was added

Sun Jan 31, 2010 7:23 pm
Two problems:
- You should use KGlobal::locale()->formatDateTime to format QDateTime objects, this ensures that ktorrent sticks to global KDE settings
- I don't like 'created', ktorrent already creates torrents, and it is not exactly the creation time of the torrent. Further more 'creation date' is an optional element in a torrent file, so this could lead to some confusion. So maybe 'date added' would be a better choice.
0xab
Registered Member
Posts
3
Karma
0

Re: Time torrent was added

Tue Feb 02, 2010 5:24 am
Thanks for the feedback. Changed 'created' to 'added' and formatted the date using formatDateTime.

http://0xab.com/patches/ktorrent-added.diff

Last edited by 0xab on Tue Feb 02, 2010 5:16 pm, edited 1 time in total.
George
Moderator
Posts
5421
Karma
1

Re: Time torrent was added

Tue Feb 02, 2010 5:06 pm
Patch looks good, I'm gonna commit it
George
Moderator
Posts
5421
Karma
1

Re: Time torrent was added

Tue Feb 02, 2010 5:17 pm
Which name should I put in the credits ?
0xab
Registered Member
Posts
3
Karma
0

Re: Time torrent was added

Tue Feb 02, 2010 5:25 pm
Andrei Barbu, andrei@0xab.com

Thanks


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]