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

ReferenceError: Can't find variable: theme

Tags: None
(comma "," separated)
JoKer__777
Registered Member
Posts
10
Karma
0
OS
Hello

My kde is compiled from source (trunk) and only for a specific user.
When I start a kde session with this user kde works fine but not everything is displayed properly on plasma.(especially when I click on "add Widgets..." button)

X Session Log keeps telling me:

///home/joker/kde/lib/kde4/imports/org/kde/plasma/components/Label.qml:53: ReferenceError: Can't find variable: theme

with different files (for example Button.qml) and different lines too

When I kill the plasma-desktop process and start it from a Konsole plasma doesn't have these problems anymore but not when I call it from krunner.

Can anyone help me with this problem?

thanks a lot

Johannes
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It sounds like your environment may not be fully setup. How are you getting your Trunk installation to be used? Where do you set the needed environment variables?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
lamarque
Registered Member
Posts
152
Karma
2
OS
I think this is a bug in the components. They should declare the theme element like this:

PlasmaCore.Theme {
id: theme
}


Software engineer at Petrobrás http://www.petrobras.com.br/en/about-us/
KDE's Network Management maintainer
JoKer__777
Registered Member
Posts
10
Karma
0
OS
Hey...thanks a lot for your replies!!

@bcooksley
I've got a file "myenv.sh" in "~/.kde/env" which looks like this

#!/bin/bash
export QTDIRS=$HOME/qt4:/usr/local:/usr:$QTDIRS
export KDEDIRS=$HOME/kde:/usr/local:/usr:$KDEDIRS
export XDG_DATA_DIRS=$HOME/.local/share:$HOME/kde/share:/usr/local/share:/usr/share
export LD_LIBRARY_PATH=$HOME/kde/lib:$HOME/qt4/lib:$HOME/kde/lib:$HOME/qt4/lib
export QT_PLUGIN_PATH=$HOME/.kde/lib/kde4/plugins/:$HOME/kde/lib/kde4/plugins/:/usr/lib/kde4/plugins/

I already assumed that it has s.th. to do with my environment variables. I tested if these variables are set when I'm on a different session (ctrl+alt+f1) but some of these variables were not set. After I added them to /etc/profile they were set the same problems remains though.

@lamarque

Yes...I found this out too but didn't it change lately?
One of the latest commit of kde-runtime/plasma/declarativeimports/core/corebindingsplugin.h/cpp says:

"PlasmaCore.Theme is registered by the inport no more need to declare it every time -> memory saving"

I already said that plasma works fine if I start it from Konsole but not when it started on kde startup or from krunner.

I also think that it has s.th. to do with my env variables but I just can't figure out what is wrong.

cheers

Johannes
User avatar
sebas
KDE Developer
Posts
88
Karma
2
OS
Where did you find this commit, I can't easily see it in kde-runtime master...?


-- sebas
JoKer__777
Registered Member
Posts
10
Karma
0
OS
Its easier when you go to the specific file

plasma/declarativeimports/core/corebindingsplugin.h

and look at the commits where this file has been changed (it is on master)

thanks for your help


the commit hash is e929fa0c2325904b01a56add7797f50a458b827d
User avatar
sebas
KDE Developer
Posts
88
Karma
2
OS
Could it be that your krunner and startkde simpy use a different version of kde-runtime, and don't pick the master version?

I've checked, and theme doesn't have to be instantiated, but should be just there in master.

That's a fairly recent change as you note, so maybe you're mixing versions inadvertently.


-- sebas
JoKer__777
Registered Member
Posts
10
Karma
0
OS
Hi

I found the solution..

...this line was the problem:

export KDEDIRS=$HOME/kde:/usr/local:/usr:$KDEDIRS

I had an older version of kde installed system wide and because KDEDIRS had /usr/local even though $HOME/kde was bevore it, it somehow used kde-runtim in /usr/local

It only worked in Konsole because I had these lines in my .bashrc ;-)

export KDEDIR=~/kde
export KDEDIRS=$KDEDIR

thanks everyone for helping me


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]