new KRun -> magic. thanks to dfaure for jogging my poor brain.

svn path=/trunk/KDE/kdebase/runtime/; revision=1205333
This commit is contained in:
Aaron J. Seigo 2010-12-10 22:09:06 +00:00
parent 8b67c15937
commit abe038a09e

View File

@ -214,7 +214,8 @@ QScriptValue ScriptEnv::openUrl(QScriptContext *context, QScriptEngine *engine)
QScriptValue v = context->argument(0);
KUrl url = v.isString() ? KUrl(v.toString()) : qscriptvalue_cast<KUrl>(v);
if (url.isValid()) {
return KRun::runUrl(url, KMimeType::findByUrl(url)->name(), 0);
KMimeType::Ptr mimetype = KMimeType::findByUrl(url, 0, false, false);
new KRun(url, 0);
}
return false;