diff options
Diffstat (limited to 'wrappers')
-rw-r--r-- | wrappers/qfileinfoprototype.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/wrappers/qfileinfoprototype.cpp b/wrappers/qfileinfoprototype.cpp index ef1e54f..61716cd 100644 --- a/wrappers/qfileinfoprototype.cpp +++ b/wrappers/qfileinfoprototype.cpp @@ -37,16 +37,11 @@ namespace Internal { QScriptValue QFileInfoPrototype::construct(QScriptContext *context, QScriptEngine *engine) { - if ( context->isCalledAsConstructor() ) { - if ( context->argumentCount() != 1 ) { - context->throwError(tr("QFileInfo object must be constructed with a filename as parameter")); - return engine->undefinedValue(); - } - return engine->toScriptValue( QFileInfo(context->argument(0).toString())); - } - else { + if ( context->argumentCount() != 1 ) { + context->throwError(tr("QFileInfo object must be constructed with a filename as parameter")); return engine->undefinedValue(); } + return engine->toScriptValue( QFileInfo(context->argument(0).toString())); } #define FILE qscriptvalue_cast<QFileInfo>(thisObject()) |