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

What to Learn to Work on KTorrent

Tags: None
(comma "," separated)
xevix
Registered Member
Posts
34
Karma
0

What to Learn to Work on KTorrent

Fri Apr 27, 2007 10:52 pm
Hey, I'm interested in working on ktorrent, but I'm not sure what I need to know to do that. I've loaded the project in KDevelop and looked around, but it's quite a bit to take in. Any specific suggestions on what to learn to make sense of the source?
George
Moderator
Posts
5421
Karma
1

Sat Apr 28, 2007 6:14 pm
There isn't really a document which describes the architecture of KTorrent. I think your best option is probably to just ask what you want to know.
xevix
Registered Member
Posts
34
Karma
0

Sat Apr 28, 2007 11:44 pm
Well not a document, but like, where I should begin from. Let me be more specific: what part of the code to start reading from?
imported4-Ivan
Registered Member
Posts
819
Karma
0

Sun Apr 29, 2007 11:10 am
Try generating doxygen documentation and take a look at the libktorrent/interfaces for start.
xevix
Registered Member
Posts
34
Karma
0

Sun Apr 29, 2007 7:33 pm
First off, thanks for the reply. I built the doxygen docs in kdevelop and have started snooping around and found bt::TorrentControl which seems to be the heart of the system. I'm not sure which interfaces belong to libktorrent and which not, doxygen just gives me namespaces like bt, kt. Any specific interfaces I can look for?

#2: How do I build KTorrent in KDevelop? It complains of no Makefile or autogen.sh present.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Sun Apr 29, 2007 8:03 pm
Interfaces are in libktorrent/interfaces directory like I mentioned and interface for bt::TorrentControl is kt::TorrentInterface.

#2
Where did you get the sources from?
xevix
Registered Member
Posts
34
Karma
0

Sun Apr 29, 2007 8:26 pm
Ah ok, I'll look at that interface first then.

I downloaded the sources from ktorrent.org.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Mon Apr 30, 2007 6:13 am
Download the sources from SVN trunk (see FAQ) and you'll have a project ready to be used with KDevelop.
xevix
Registered Member
Posts
34
Karma
0

Mon Apr 30, 2007 6:26 am
Alright, will download from SVN later. I'm still somewhat new to Qt, and I'm used to having a main widget in main.cpp before the QApplication (or KApplication in this case) going into its execution loop. What is the main widget here? If it's too hard to answer, I was hoping you could direct me to some documentation about how that works.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Mon Apr 30, 2007 3:12 pm
apps/main.cpp
imported4-Ivan
Registered Member
Posts
819
Karma
0

Mon Apr 30, 2007 3:12 pm
I lied, sorry

apps/ktorrent/main.cpp is the correct path
xevix
Registered Member
Posts
34
Karma
0

Mon Apr 30, 2007 6:45 pm
Yes, that's the main.cpp that I referred to in my last question. I'm not asking its path, I'm asking about the lack of a main widget inside the main function of that file.
George
Moderator
Posts
5421
Karma
1

Mon Apr 30, 2007 7:43 pm
The actual main widget is created in KTorrentApp::newInstance
xevix
Registered Member
Posts
34
Karma
0

Mon Apr 30, 2007 8:03 pm
OK, So I checked in the newInstance function inherited from KUniqueApplication http://developer.kde.org/documentation/library/3.5-api/kdelibs-apidocs/kdecore/html/kuniqueapplication_8cpp-source.html#l00466

It seems to depend on there being a main widget defined somewhere, but in KTorrent's main.cpp I couldn't find one.

Also:

I downloaded the SVN from 4/28 but it's not compiling in KDevelop either, complains about no active targets.
George
Moderator
Posts
5421
Karma
1

Tue May 01, 2007 11:22 am
xevix wrote:OK, So I checked in the newInstance function inherited from KUniqueApplication http://developer.kde.org/documentation/library/3.5-api/kdelibs-apidocs/kdecore/html/kuniqueapplication_8cpp-source.html#l00466

It seems to depend on there being a main widget defined somewhere, but in KTorrent's main.cpp I couldn't find one.


The main widget is created in KTorrentApp::newInstance, we override the one defined in KUniqueApplication

I downloaded the SVN from 4/28 but it's not compiling in KDevelop either, complains about no active targets.


Try it from the commandline then.


Bookmarks



Who is online

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