fix qtmoc issue

This commit is contained in:
therecipe 2017-05-10 16:29:50 +02:00
parent f8a61cbf84
commit 54686f2b6c
7 changed files with 23 additions and 8 deletions

View file

@ -200,13 +200,14 @@ func CppTemplate(module string, mode int, target string) []byte {
continue
}
implementedVirtuals[f.Name+f.OverloadNumber] = struct{}{}
var f = *f
f.SignalMode = parser.CALLBACK
f.Fullname = fmt.Sprintf("%v::%v", class.Name, f.Name)
f.Fullname = fmt.Sprintf("%v::%v", f.FindDeepestImplementation(), f.Name)
if f.Meta == parser.SLOT || f.Meta == parser.SIGNAL || f.Virtual == parser.IMPURE || f.Virtual == parser.PURE {
implementedVirtuals[f.Name+f.OverloadNumber] = struct{}{}
fmt.Fprintf(bb, "\t%v\n", cppFunctionCallback(&f))
}
}

View file

@ -73,8 +73,12 @@ func Test(target string, docker bool) {
"gui": []string{"analogclock", "rasterwindow"},
"qml": []string{"application", "drawer_nav_x", "gallery", "material",
"prop", "prop2" /*"webview"*/},
"qml": []string{"adding", "application", "drawer_nav_x",
filepath.Join("extending", "chapter1-basics"),
filepath.Join("extending", "chapter2-methods"),
filepath.Join("extending", "chapter3-bindings"),
filepath.Join("extending", "chapter4-customPropertyTypes"),
"gallery", "material", "prop", "prop2" /*"todo", "webview"*/},
"qt3d": []string{"audio-visualizer-qml"},
@ -87,8 +91,10 @@ func Test(target string, docker bool) {
"uitools": []string{"calculator"},
"webchannel": []string{"chatserver-go", "standalone" /*"webview"*/},
"widgets": []string{"bridge2" /*"dropsite"*/, "graphicsscene", "line_edits", "pixel_editor",
/*"renderer"*/ "systray" /*"table"*/, "textedit", filepath.Join("treeview", "treeview_dual"),
/*"renderer"*/ "share", "systray" /*"table"*/, "textedit", filepath.Join("treeview", "treeview_dual"),
filepath.Join("treeview", "treeview_filelist"), "video_player" /*"webengine"*/},
}
} else {

View file

@ -73,14 +73,14 @@ func GetImports(path, target string, level int, onlyDirect bool) []string {
continue
}
if strings.Contains(dep, filepath.Join("github.com", "therecipe", "qt")) && !strings.Contains(dep, filepath.Join("qt", "internal")) {
continue
}
if strings.Contains(dep, filepath.Join("github.com", "therecipe", "qt", "q")) {
iparser.LibDeps[iparser.MOC] = append(iparser.LibDeps[iparser.MOC], "Qml")
}
if strings.Contains(dep, filepath.Join("github.com", "therecipe", "qt")) && !strings.Contains(dep, filepath.Join("qt", "internal")) {
continue
}
importMap[dep] = struct{}{}
imported[l] = dep
}

View file

@ -1,3 +1,5 @@
//source: http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html
package main
import (

View file

@ -1,3 +1,5 @@
//source: http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html
package main
import (

View file

@ -1,3 +1,5 @@
//source: http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html
package main
import (

View file

@ -1,3 +1,5 @@
//source: http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html
package main
import (