[bt-devel] Doxygen
Olaf Radicke
briefkasten at olaf-radicke.de
Tue Jul 20 14:29:05 MST 2010
Hi Joachim, and all!
Am Dienstag, den 20.07.2010, 21:15 +0200 schrieb Joachim Ansorg:
> At first, may I ask if you use any kind of development tools ? (KDevelop, for
> example). This is usually very helpful to navigate and analyze the codebase.
...I use kate & emacs.
look...
http://sourcearchives.com/doxygen/bibletime/annotated.html
How many classes have a comment?
german: Kaum eine Klasse ist kommentiert. Und die Namen lassen auch
selten erraten was sie tun. Dann tun viele Klassen noch Dinge, die sie
gar nichts angehen, und delegieren Aufgaben, die sie besser selber
erledigen sollten. Banalste Dinge werden über drei Vererbungshierarchien
durch gereicht. Der Codeleser denkt immer nur: "...warum, warum,
warum?".
> Third, you're absolutely right. Large parts of the code are not very well
> written. There are many reasons for that. One certainly is "learning by
> doing". As you already mentioned there is way to much inheritance, too large
> classes, bad inheritance, too much responsibilities for a single class, and
> so on.
which I am see is, the GUI have much complex code, but it is not
effective. I am cannot see where the many features is.
german: Ich sehe mir den Code der GUI an, und ich denke, für die paar
Funktionen die BibleTime bietet, ist das wirklich beachtlich fiel Code
und unglaublich komplex. Ich meine, wenn ich hier eine Textverarbeitung
wie OpenOffice hätte - Okay. Aber was macht denn BibleTime großartiges?
Es holt Text aus einer Datenbank und stellt es dar.
> Fourth, start small. Rewriting all things at once or looking at everything at
> the same time usually ends in chaos and frustration.
At present, the GUI-Code is definitely chaos and frustration. I mean,
it's not to be salvageable. I do not have yet intensively seen the
backend. when the backend have clean interfaces, it's easy, change the
GUI or write a second alternative GUI.
germen: Chaos und Frustration ist nicht das Ende, sonder er eine gute
Beschreibung des Ist-Zustand. Ich glaube nicht das der GUI-Code zu
retten ist. Ich habe mir den Rest des Codes noch nicht angesehen. Wenn
das Backend saubere Schnittstellen hat, wäre es leichter die GUI aus zu
tauschen oder eine zweite, alternative GUI zu entwickeln.
> Fifth, for the following information I only used the doxygen pages. I did not
> checkout the source code.
>
> The start page of doxygen gives a short introduction. There is a link to the
> frontend introduction,
> http://sourcearchives.com/doxygen/bibletime/frontend.html . It's actually a
> good idea to read it ;)
> It mentions the window classas and a class CDisplay (in a cryptic sentence).
> The name sounds like it display something, doesn't it? Click it to see the
> hierarchy. There is CReadDisplay and CWriteDisplay with various
> subclasses. "read" sounds like what you're looking for, I think.
>
> So, have a look at the methods of that class and of CReadDisplay (in the
> diagram). Because you're looking where the text comes from,
> CDisplay::setText() sounds like a good guess to me.
>
> Scroll down to the list "Public Member Functions", click on setText . Look at
> the referencing methods, lookupSwordKey is my best guess here. Click on it,
> read the source code of that method.
>
> It doesn't look too bad, does it?
>
> There is the call display->text(...). I did not look further, but obviously
> the text lookup happens in that method, doesn't it?
> > greeting
http://sourcearchives.com/doxygen/bibletime/dd/d4e/cplainwritedisplay_8cpp-source.html
00042 void CPlainWriteDisplay::setText( const QString& newText ) {
00043 //make sure the text has been converted to show \n instead of <br/>
00044 QString text = newText;
00045 // text.replace("\n<br /><!-- BT newline -->\n", "\n");
00046 text.replace("<br />", "\n"); //inserted by BT or the Qt textedit widget
00047
00048 QTextEdit::setText(text);
00049 }
I do not understand why here is call a static function of QTextEdit.
german: Mir ist schleierhaft, was der Code-Schnipsel hier tu. Welchen
sinn könnte es machen den Slot der Klasse QTextEdit als static-Methode
auf zu rufen? Ich dachte, man bräuchte eine Instanz der Klasse.
greeting
Olaf Radicke
More information about the bt-devel
mailing list