~ubuntu-branches/ubuntu/gutsy/kde4libs/gutsy

« back to all changes in this revision

Viewing changes to kjsembed/kjsembed/url.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-02-21 11:00:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070221110012-6kw8khr9knv6lmg1
Tags: 3.80.3-0ubuntu1
New upstream unstable release

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
using namespace KJSEmbed;
26
26
 
27
 
const KJS::ClassInfo UrlBinding::info = { "QUrl", &ValueBinding::info, 0, 0 };
 
27
const KJS::ClassInfo UrlBinding::info = { "QUrl", &VariantBinding::info, 0, 0 };
28
28
UrlBinding::UrlBinding( KJS::ExecState *exec, const QUrl &value )
29
 
    : ValueBinding(exec, value )
 
29
    : VariantBinding(exec, value )
30
30
{
31
 
    StaticBinding::publish( exec, this, ValueFactory::methods() );
 
31
    StaticBinding::publish( exec, this, VariantFactory::methods() );
32
32
    StaticBinding::publish( exec, this, Url::methods() );
33
33
}
34
34
 
37
37
 
38
38
START_VARIANT_METHOD( callisValid, QUrl )
39
39
    bool cppValue = value.isValid();
40
 
    result = KJS::Boolean(cppValue);
 
40
    result = KJS::jsBoolean(cppValue);
41
41
END_VARIANT_METHOD
42
42
 
43
43
START_VARIANT_METHOD( toString, QUrl )
44
44
    QUrl::FormattingOptions opts = (QUrl::FormattingOptions)KJSEmbed::extractInt(exec, args, 0, QUrl::None);
45
 
    result = KJS::String( value.toString( opts ) );
 
45
    result = KJS::jsString( value.toString( opts ) );
46
46
END_VARIANT_METHOD
47
47
}
48
48