Changeset View
Changeset View
Standalone View
Standalone View
src/scripting/scriptengine/AmarokStatusbarScript.cpp
Show All 10 Lines | |||||
11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. * | 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. * | ||
12 | * * | 12 | * * | ||
13 | * You should have received a copy of the GNU General Public License along with * | 13 | * You should have received a copy of the GNU General Public License along with * | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. * | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. * | ||
15 | ****************************************************************************************/ | 15 | ****************************************************************************************/ | ||
16 | 16 | | |||
17 | #include "AmarokStatusbarScript.h" | 17 | #include "AmarokStatusbarScript.h" | ||
18 | 18 | | |||
19 | #include "core/interfaces/Logger.h" | 19 | #include "core/logger/Logger.h" | ||
20 | #include "core/support/Components.h" | 20 | #include "core/support/Components.h" | ||
21 | 21 | | |||
22 | #include <QScriptEngine> | 22 | #include <QScriptEngine> | ||
23 | 23 | | |||
24 | using namespace AmarokScript; | 24 | using namespace AmarokScript; | ||
25 | 25 | | |||
26 | AmarokStatusbarScript::AmarokStatusbarScript( QScriptEngine *engine ) | 26 | AmarokStatusbarScript::AmarokStatusbarScript( QScriptEngine *engine ) | ||
27 | : QObject( engine ) | 27 | : QObject( engine ) | ||
28 | { | 28 | { | ||
29 | QScriptValue scriptObject = engine->newQObject( this, QScriptEngine::AutoOwnership, | 29 | QScriptValue scriptObject = engine->newQObject( this, QScriptEngine::AutoOwnership, | ||
30 | QScriptEngine::ExcludeSuperClassContents ); | 30 | QScriptEngine::ExcludeSuperClassContents ); | ||
31 | QScriptValue windowObject = engine->globalObject().property( "Amarok" ).property( "Window" ); | 31 | QScriptValue windowObject = engine->globalObject().property( "Amarok" ).property( "Window" ); | ||
32 | windowObject.setProperty( "Statusbar", scriptObject ); | 32 | windowObject.setProperty( "Statusbar", scriptObject ); | ||
33 | } | 33 | } | ||
34 | 34 | | |||
35 | void | 35 | void | ||
36 | AmarokStatusbarScript::longMessage( const QString &text ) | 36 | AmarokStatusbarScript::longMessage( const QString &text ) | ||
37 | { | 37 | { | ||
38 | Amarok::Components::logger()->longMessage( text ); | 38 | Amarok::Logger::longMessage( text ); | ||
39 | } | 39 | } | ||
40 | 40 | | |||
41 | void | 41 | void | ||
42 | AmarokStatusbarScript::shortMessage( const QString &text ) | 42 | AmarokStatusbarScript::shortMessage( const QString &text ) | ||
43 | { | 43 | { | ||
44 | Amarok::Components::logger()->shortMessage( text ); | 44 | Amarok::Logger::shortMessage( text ); | ||
45 | } | 45 | } |