diff options
author | Leon Bottou <leon@bottou.org> | 2018-06-10 03:36:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-10 03:36:45 +0300 |
commit | 8371bcf8e459f3441d6aaebb96624e8a0cb75c36 (patch) | |
tree | e3ceaa72860186127136bd82901b6c529bce2a31 | |
parent | 246dce80dfb756f7d23b2226cb31902fe6f59827 (diff) | |
parent | c3befe63e3467eea386b484adeaec452f4762b5d (diff) |
Merge branch 'master' into master
-rw-r--r-- | doc/qtgui.md | 2 | ||||
-rw-r--r-- | doc/qtide.md | 4 | ||||
-rw-r--r-- | packages/qtwidget/qtlualistener.cpp | 4 | ||||
-rw-r--r-- | packages/qtwidget/qtwidget.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/doc/qtgui.md b/doc/qtgui.md index 9985c94..025006b 100644 --- a/doc/qtgui.md +++ b/doc/qtgui.md @@ -345,7 +345,7 @@ for selecting an existing file. * Argument `opt` are the [file dialog options](http://doc.trolltech.com/4.4/qfiledialog.html#Option-enum). The function returns a `qt.QString` containing the selected file name -and a `qt.QString` contaning the selected filter. +and a `qt.QString` containing the selected filter. <a name="qfiledialog.getOpenFileNames"></a> ### qt.QFileDialog.getOpenFileNames([p,[c,[d,[f,[s,[opt]]]]]]) ### diff --git a/doc/qtide.md b/doc/qtide.md index b19b5b9..de71a2b 100644 --- a/doc/qtide.md +++ b/doc/qtide.md @@ -67,7 +67,7 @@ Not yet implemented Starts the QLua Integrated Development Environment (IDE) and ensure that the main window is visible. -This function is called implicitely when program `qlua` +This function is called implicitly when program `qlua` is executed with option `-ide`. The optional argument `style` is a string @@ -98,7 +98,7 @@ a graphic console. <a name="qluaide"></a> ### qt.QLuaIde ### -Object `qt.qLuaIde` represetns the global state of the IDE. +Object `qt.qLuaIde` represents the global state of the IDE. This is the unique instance of class `qt.QLuaIde` which inherits [qt.QObject](qt.md#qobject). Most of its capabilities are conveniently diff --git a/packages/qtwidget/qtlualistener.cpp b/packages/qtwidget/qtlualistener.cpp index a88c8f1..3c2097d 100644 --- a/packages/qtwidget/qtlualistener.cpp +++ b/packages/qtwidget/qtlualistener.cpp @@ -21,8 +21,8 @@ f_enumerator(const char *s) static const QMetaObject* qt() { return &staticQtMetaObject; } }; const QMetaObject *mo = QFakeObject::qt(); - int index = mo->indexOfEnumerator(s); - if (mo >= (void *)0) + int index = (mo) ? mo->indexOfEnumerator(s) : -1; + if (index >= 0) return mo->enumerator(index); return QMetaEnum(); } diff --git a/packages/qtwidget/qtwidget.cpp b/packages/qtwidget/qtwidget.cpp index f1aa536..29e3402 100644 --- a/packages/qtwidget/qtwidget.cpp +++ b/packages/qtwidget/qtwidget.cpp @@ -38,8 +38,8 @@ static QMetaEnum f_enumerator(const char *s, const QMetaObject *mo) { - int index = mo->indexOfEnumerator(s); - if (mo >= (void *)0) + int index = (mo) ? mo->indexOfEnumerator(s) : -1; + if (index >= 0) return mo->enumerator(index); return QMetaEnum(); } |