Fix a ### in Regexp.toString
authorLars Knoll <lars.knoll@digia.com>
Tue, 16 Apr 2013 07:15:56 +0000 (09:15 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Tue, 16 Apr 2013 09:01:23 +0000 (11:01 +0200)
The global flag wasn't converted back

Change-Id: I50a5518f6abf6315dee057ce5a4fe97550748cbb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/v4vm/qv4regexpobject.cpp

index 4dabb76..71c9f68 100644 (file)
@@ -233,7 +233,8 @@ Value RegExpPrototype::method_toString(SimpleCallContext *ctx)
 
     QString result = QChar('/') + r->value->pattern();
     result += QChar('/');
-    // ### 'g' option missing
+    if (r->global)
+        result += QChar('g');
     if (r->value->ignoreCase())
         result += QChar('i');
     if (r->value->multiLine())