[Kde-bindings] KFileTreeView and Korundum
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Fri Dec 16 16:43:27 UTC 2005
On Friday 16 December 2005 13:36, Diego 'Flameeyes' Pettenò wrote:
> > But the animation doesn't stop, and it does crash for me with the same
> > error - so I'll have a look at it...
>
> I've rebuilt ruby, qt, smoke, qtruby and korundum with debug info (long
> life split debug :P) and have a more interesting backtrace (while it does
> not carry all the locals as it's still optimized).
> It's at http://dev.gentoo.org/~flameeyes/kdigest-crash-backtrace.bz2 (11K
> compressed).
I think you were using the api wrongly - I don't know where it's documented,
but I'm pretty sure I've worked it out looking at the code. You need to
change these lines in kdigestview.rb:
# Now we complete setting up the @allDirs tree
home = KDE::FileTreeBranch.new(@allDirs,
KDE::URL.new(Qt::Dir::home().path), "Home",
KDE::Global.iconLoader.loadIcon("folder_home", KDE::Icon::Small))
@allDirs.setDirOnlyMode(home, true)
@root = KDE::FileTreeBranch.new(@allDirs, KDE::URL.new("file:/"),
"Root",
KDE::Global.iconLoader.loadIcon("folder_red", KDE::Icon::Small))
@allDirs.setDirOnlyMode(@root, true);
To:
# Now we complete setting up the @allDirs tree
home = @allDirs.addBranch(KDE::URL.new(Qt::Dir::home().path), "Home",
KDE::Global.iconLoader.loadIcon("folder_home", KDE::Icon::Small))
@allDirs.setDirOnlyMode(home, true)
@root = @allDirs.addBranch(KDE::URL.new("file:/"), "Root",
KDE::Global.iconLoader.loadIcon("folder_red", KDE::Icon::Small))
@allDirs.setDirOnlyMode(@root, true);
If you don't go via the KDE::FileTreeView.addBranch() method, it doesn't
correctly connect the slot to terminate the animation after loading the file
path.
-- Richard
More information about the Kde-bindings
mailing list