Created
February 16, 2013 15:19
-
-
Save niconil/4967345 to your computer and use it in GitHub Desktop.
constructeur plus évolué de l'objet scriptable File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QScriptValue File::constructor(QScriptContext *context, QScriptEngine *engine) | |
{ | |
if(context->argumentCount() > 1) | |
{ | |
throwError(context, engine, "ParameterCountError", tr("Incorrect parameter count")); | |
return false; | |
} | |
if(context->argumentCount() == 1) | |
return CodeClass::constructor(new File(context->argument(0).toString()), context, engine); | |
else | |
return CodeClass::constructor(new File, context, engine); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment