mirror of
https://github.com/bluszcz/cutego.git
synced 2024-09-28 21:25:16 +03:00
fix setup issues on linux + detect go version at runtime + let examples use NewQVariant1 + add pkg-config to docker images
This commit is contained in:
parent
543fb14d45
commit
0167e2b766
72 changed files with 149 additions and 130 deletions
|
@ -249,7 +249,11 @@ func shouldBuildForTarget(module, target string, min bool) bool {
|
||||||
for _, m := range cmd.GetQtStdImports() {
|
for _, m := range cmd.GetQtStdImports() {
|
||||||
if strings.ToLower(module) == strings.ToLower(m) ||
|
if strings.ToLower(module) == strings.ToLower(m) ||
|
||||||
(strings.ToLower(module) == "svg" && (target == "js" || target == "wasm" || strings.HasPrefix(target, "ios") || utils.QT_STATIC())) {
|
(strings.ToLower(module) == "svg" && (target == "js" || target == "wasm" || strings.HasPrefix(target, "ios") || utils.QT_STATIC())) {
|
||||||
return true
|
if State.Minimal {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return shouldBuildForTarget(module, target, false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -848,7 +848,7 @@ func BuildEnv(target, name, depPath string) (map[string]string, []string, []stri
|
||||||
env["PATH"] = env["PATH"] + ":" + env["EMSDK"] + ":" + env["LLVM_ROOT"] + ":" + env["NODE_JS"] + ":" + env["EMSCRIPTEN"]
|
env["PATH"] = env["PATH"] + ":" + env["EMSDK"] + ":" + env["LLVM_ROOT"] + ":" + env["NODE_JS"] + ":" + env["EMSCRIPTEN"]
|
||||||
}
|
}
|
||||||
|
|
||||||
if runtime.GOOS != target || strings.Contains(runtime.Version(), "1.10") {
|
if runtime.GOOS != target || strings.Contains(utils.GOVERSION(), "1.10") {
|
||||||
env["CGO_CFLAGS_ALLOW"] = utils.CGO_CFLAGS_ALLOW()
|
env["CGO_CFLAGS_ALLOW"] = utils.CGO_CFLAGS_ALLOW()
|
||||||
env["CGO_CXXFLAGS_ALLOW"] = utils.CGO_CXXFLAGS_ALLOW()
|
env["CGO_CXXFLAGS_ALLOW"] = utils.CGO_CXXFLAGS_ALLOW()
|
||||||
env["CGO_LDFLAGS_ALLOW"] = utils.CGO_LDFLAGS_ALLOW()
|
env["CGO_LDFLAGS_ALLOW"] = utils.CGO_LDFLAGS_ALLOW()
|
||||||
|
|
|
@ -689,7 +689,7 @@ export CXX=%v
|
||||||
|
|
||||||
go tool link -f -o $PWD/relinked -importcfg $PWD/b001/importcfg.link -buildmode=%v -w -extld=%v $PWD/b001/_pkg_.a`,
|
go tool link -f -o $PWD/relinked -importcfg $PWD/b001/importcfg.link -buildmode=%v -w -extld=%v $PWD/b001/_pkg_.a`,
|
||||||
|
|
||||||
runtime.Version(),
|
utils.GOVERSION(),
|
||||||
runtime.GOOS,
|
runtime.GOOS,
|
||||||
runtime.GOARCH,
|
runtime.GOARCH,
|
||||||
utils.QT_VERSION(),
|
utils.QT_VERSION(),
|
||||||
|
|
|
@ -54,7 +54,7 @@ func build(mode, target, path, ldFlagsCustom, tagsCustom, name, depPath string,
|
||||||
}
|
}
|
||||||
|
|
||||||
var pattern string
|
var pattern string
|
||||||
if strings.Contains(runtime.Version(), "1.1") || strings.Contains(runtime.Version(), "devel") {
|
if v := utils.GOVERSION(); strings.Contains(v, "1.1") || strings.Contains(v, "devel") {
|
||||||
pattern = "all="
|
pattern = "all="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ func build_sailfish(target, path, ldFlagsCustom, name string) {
|
||||||
sailfish_ssh("2222", "root", "ln", "-s", fmt.Sprintf("/srv/mer/toolings/SailfishOS-"+utils.QT_SAILFISH_VERSION()+"/opt/cross/bin/%v-meego-linux-%v-ld", arch, gcc), fmt.Sprintf("/srv/mer/toolings/SailfishOS-"+utils.QT_SAILFISH_VERSION()+"/opt/cross/libexec/gcc/%v-meego-linux-%v/4.8.3/ld", arch, gcc))
|
sailfish_ssh("2222", "root", "ln", "-s", fmt.Sprintf("/srv/mer/toolings/SailfishOS-"+utils.QT_SAILFISH_VERSION()+"/opt/cross/bin/%v-meego-linux-%v-ld", arch, gcc), fmt.Sprintf("/srv/mer/toolings/SailfishOS-"+utils.QT_SAILFISH_VERSION()+"/opt/cross/libexec/gcc/%v-meego-linux-%v/4.8.3/ld", arch, gcc))
|
||||||
|
|
||||||
var pattern string
|
var pattern string
|
||||||
if strings.Contains(runtime.Version(), "1.1") || strings.Contains(runtime.Version(), "devel") {
|
if v := utils.GOVERSION(); strings.Contains(v, "1.1") || strings.Contains(v, "devel") {
|
||||||
pattern = "all="
|
pattern = "all="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ func Test_escapeFlags(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pattern string
|
var pattern string
|
||||||
if strings.Contains(runtime.Version(), "1.1") || strings.Contains(runtime.Version(), "devel") {
|
if v := utils.GOVERSION(); strings.Contains(v, "1.1") || strings.Contains(v, "devel") {
|
||||||
pattern = "all="
|
pattern = "all="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ func Check(target string, docker, vagrant bool) {
|
||||||
vars := [][]string{
|
vars := [][]string{
|
||||||
{"GOOS", runtime.GOOS},
|
{"GOOS", runtime.GOOS},
|
||||||
{"GOARCH", utils.GOARCH()},
|
{"GOARCH", utils.GOARCH()},
|
||||||
{"GOVERSION", strings.Split(utils.RunCmd(exec.Command("go", "version"), "get go version"), " ")[2]},
|
{"GOVERSION", utils.GOVERSION()},
|
||||||
{"GOROOT", runtime.GOROOT()},
|
{"GOROOT", runtime.GOROOT()},
|
||||||
{"GOPATH", utils.MustGoPath()},
|
{"GOPATH", utils.MustGoPath()},
|
||||||
{"GOBIN", utils.GOBIN()},
|
{"GOBIN", utils.GOBIN()},
|
||||||
|
|
|
@ -98,7 +98,7 @@ func Install(target string, docker, vagrant, failfast bool) {
|
||||||
env["CGO_ENABLED"] = "0"
|
env["CGO_ENABLED"] = "0"
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command("go", "install", "-i", "-p", strconv.Itoa(runtime.GOMAXPROCS(0)), "-v")
|
cmd := exec.Command("go", "install", "-p", strconv.Itoa(runtime.GOMAXPROCS(0)), "-v")
|
||||||
if len(tags) > 0 {
|
if len(tags) > 0 {
|
||||||
cmd.Args = append(cmd.Args, fmt.Sprintf("-tags=\"%v\"", strings.Join(tags, "\" \"")))
|
cmd.Args = append(cmd.Args, fmt.Sprintf("-tags=\"%v\"", strings.Join(tags, "\" \"")))
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ func Install(target string, docker, vagrant, failfast bool) {
|
||||||
if target == "js" {
|
if target == "js" {
|
||||||
cmd.Args = append(cmd.Args, "-v")
|
cmd.Args = append(cmd.Args, "-v")
|
||||||
} else {
|
} else {
|
||||||
if target == "linux" && (utils.QT_PKG_CONFIG() || utils.QT_STATIC()) {
|
if target == "linux" {
|
||||||
env["CGO_LDFLAGS"] = strings.Replace(env["CGO_LDFLAGS"], "-Wl,-rpath,$ORIGIN/lib -Wl,--disable-new-dtags", "", -1)
|
env["CGO_LDFLAGS"] = strings.Replace(env["CGO_LDFLAGS"], "-Wl,-rpath,$ORIGIN/lib -Wl,--disable-new-dtags", "", -1)
|
||||||
}
|
}
|
||||||
for key, value := range env {
|
for key, value := range env {
|
||||||
|
|
|
@ -31,7 +31,7 @@ func Test(target string, docker, vagrant bool, vagrantsystem string) {
|
||||||
minimal.Minimal(path, target, "")
|
minimal.Minimal(path, target, "")
|
||||||
|
|
||||||
var pattern string
|
var pattern string
|
||||||
if strings.Contains(runtime.Version(), "1.1") || strings.Contains(runtime.Version(), "devel") {
|
if v := utils.GOVERSION(); strings.Contains(v, "1.1") || strings.Contains(v, "devel") {
|
||||||
pattern = "all="
|
pattern = "all="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,4 +89,4 @@ RUN $GOPATH/bin/qtsetup generate android-emulator
|
||||||
RUN $GOPATH/bin/qtsetup install android-emulator
|
RUN $GOPATH/bin/qtsetup install android-emulator
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/androidextras/jni && $GOPATH/bin/qtdeploy build android-emulator || true && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/androidextras/jni && $GOPATH/bin/qtdeploy build android-emulator || true && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -14,7 +14,7 @@ RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install automak
|
||||||
RUN git clone -q --depth 1 https://github.com/mackyle/xar.git && cd /xar/xar && ./autogen.sh --prefix=/osxcross/target && make -j $(grep -c ^processor /proc/cpuinfo) && make install -j $(grep -c ^processor /proc/cpuinfo) && ./autogen.sh --prefix=/usr && make -j $(grep -c ^processor /proc/cpuinfo) && make install -j $(grep -c ^processor /proc/cpuinfo)
|
RUN git clone -q --depth 1 https://github.com/mackyle/xar.git && cd /xar/xar && ./autogen.sh --prefix=/osxcross/target && make -j $(grep -c ^processor /proc/cpuinfo) && make install -j $(grep -c ^processor /proc/cpuinfo) && ./autogen.sh --prefix=/usr && make -j $(grep -c ^processor /proc/cpuinfo) && make install -j $(grep -c ^processor /proc/cpuinfo)
|
||||||
|
|
||||||
ENV LD_LIBRARY_PATH=/osxcross/target/lib
|
ENV LD_LIBRARY_PATH=/osxcross/target/lib
|
||||||
RUN git clone -q --depth 1 -b 2.0.0 https://github.com/tpoechtrager/apple-libtapi.git && cd /apple-libtapi && INSTALLPREFIX=/osxcross/target ./build.sh && ./install.sh
|
RUN git clone -q --depth 1 -b 1000.10.8 https://github.com/tpoechtrager/apple-libtapi.git && cd /apple-libtapi && INSTALLPREFIX=/osxcross/target ./build.sh && ./install.sh
|
||||||
RUN git clone -q --depth 1 https://github.com/tpoechtrager/cctools-port.git && cd /cctools-port/cctools && ./configure --prefix=/osxcross/target --target=x86_64-apple-darwin18 --with-libtapi=/osxcross/target && make -j $(grep -c ^processor /proc/cpuinfo) && make install -j $(grep -c ^processor /proc/cpuinfo)
|
RUN git clone -q --depth 1 https://github.com/tpoechtrager/cctools-port.git && cd /cctools-port/cctools && ./configure --prefix=/osxcross/target --target=x86_64-apple-darwin18 --with-libtapi=/osxcross/target && make -j $(grep -c ^processor /proc/cpuinfo) && make install -j $(grep -c ^processor /proc/cpuinfo)
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,4 +76,4 @@ RUN $GOPATH/bin/qtsetup check darwin
|
||||||
RUN $GOPATH/bin/qtsetup generate darwin
|
RUN $GOPATH/bin/qtsetup generate darwin
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build darwin && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build darwin && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -28,4 +28,4 @@ RUN $GOPATH/bin/qtsetup generate js
|
||||||
RUN $GOPATH/bin/qtsetup install js
|
RUN $GOPATH/bin/qtsetup install js
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build js && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build js && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -28,4 +28,4 @@ RUN $GOPATH/bin/qtsetup generate js
|
||||||
RUN $GOPATH/bin/qtsetup install js
|
RUN $GOPATH/bin/qtsetup install js
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build js && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build js && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -26,4 +26,4 @@ RUN $GOPATH/bin/qtsetup generate wasm
|
||||||
RUN $GOPATH/bin/qtsetup install wasm
|
RUN $GOPATH/bin/qtsetup install wasm
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build wasm && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build wasm && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -26,4 +26,4 @@ RUN $GOPATH/bin/qtsetup generate wasm
|
||||||
RUN $GOPATH/bin/qtsetup install wasm
|
RUN $GOPATH/bin/qtsetup install wasm
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build wasm && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build wasm && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -41,4 +41,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -42,4 +42,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -39,4 +39,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -33,4 +33,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN pacman -S --noconfirm --needed --noprogressbar --quiet ca-certificates git
|
RUN pacman -S --noconfirm --needed --noprogressbar --quiet ca-certificates git pkg-config
|
|
@ -53,4 +53,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -1,6 +1,6 @@
|
||||||
FROM ubuntu:16.04 as base
|
FROM ubuntu:16.04 as base
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install build-essential libglib2.0-dev libglu1-mesa-dev libpulse-dev \
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install build-essential libglib2.0-dev libglu1-mesa-dev libpulse-dev \
|
||||||
&& apt-get --no-install-recommends -qq -y install fontconfig libasound2 libegl1-mesa libnss3 libpci3 libxcomposite1 libxcursor1 libxi6 libxrandr2 libxtst6
|
&& apt-get --no-install-recommends -qq -y install fontconfig libasound2 libegl1-mesa libnss3 libpci3 libxcomposite1 libxcursor1 libxi6 libxrandr2 libxtst6
|
||||||
|
|
|
@ -26,4 +26,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN zypper -q ref && zypper -n -q install --no-recommends git
|
RUN zypper -q ref && zypper -n -q install --no-recommends git pkg-config
|
|
@ -27,4 +27,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN zypper -q ref && zypper -n -q install --no-recommends git
|
RUN zypper -q ref && zypper -n -q install --no-recommends git pkg-config
|
|
@ -30,4 +30,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/bridge2 && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/bridge2 && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -30,4 +30,4 @@ RUN $GOPATH/bin/qtsetup check
|
||||||
RUN $GOPATH/bin/qtsetup generate
|
RUN $GOPATH/bin/qtsetup generate
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build linux && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -15,4 +15,4 @@ RUN $GOPATH/bin/qtsetup generate rpi1
|
||||||
RUN $GOPATH/bin/qtsetup install rpi1
|
RUN $GOPATH/bin/qtsetup install rpi1
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build rpi1 && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build rpi1 && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -15,4 +15,4 @@ RUN $GOPATH/bin/qtsetup generate rpi2
|
||||||
RUN $GOPATH/bin/qtsetup install rpi2
|
RUN $GOPATH/bin/qtsetup install rpi2
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build rpi2 && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build rpi2 && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -15,4 +15,4 @@ RUN $GOPATH/bin/qtsetup generate rpi3
|
||||||
RUN $GOPATH/bin/qtsetup install rpi3
|
RUN $GOPATH/bin/qtsetup install rpi3
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build rpi3 && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build rpi3 && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -23,4 +23,4 @@ RUN $GOPATH/bin/qtsetup check ubports
|
||||||
RUN $GOPATH/bin/qtsetup generate ubports
|
RUN $GOPATH/bin/qtsetup generate ubports
|
||||||
RUN $GOPATH/bin/qtsetup install ubports
|
RUN $GOPATH/bin/qtsetup install ubports
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -21,4 +21,4 @@ RUN $GOPATH/bin/qtsetup check ubports
|
||||||
RUN $GOPATH/bin/qtsetup generate ubports
|
RUN $GOPATH/bin/qtsetup generate ubports
|
||||||
RUN $GOPATH/bin/qtsetup install ubports
|
RUN $GOPATH/bin/qtsetup install ubports
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -26,4 +26,4 @@ RUN $GOPATH/bin/qtsetup check ubports
|
||||||
RUN $GOPATH/bin/qtsetup generate ubports || true
|
RUN $GOPATH/bin/qtsetup generate ubports || true
|
||||||
RUN $GOPATH/bin/qtsetup install ubports
|
RUN $GOPATH/bin/qtsetup install ubports
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -23,4 +23,4 @@ RUN $GOPATH/bin/qtsetup check ubports
|
||||||
RUN $GOPATH/bin/qtsetup generate ubports
|
RUN $GOPATH/bin/qtsetup generate ubports
|
||||||
RUN $GOPATH/bin/qtsetup install ubports
|
RUN $GOPATH/bin/qtsetup install ubports
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -21,4 +21,4 @@ RUN $GOPATH/bin/qtsetup generate windows
|
||||||
RUN $GOPATH/bin/qtsetup install windows
|
RUN $GOPATH/bin/qtsetup install windows
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -1,6 +1,6 @@
|
||||||
FROM ubuntu:16.04 as base
|
FROM ubuntu:16.04 as base
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
||||||
RUN git clone -q --depth 1 https://github.com/mxe/mxe.git /usr/lib/mxe
|
RUN git clone -q --depth 1 https://github.com/mxe/mxe.git /usr/lib/mxe
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils lzip
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils lzip
|
||||||
|
|
||||||
|
|
|
@ -21,4 +21,4 @@ RUN $GOPATH/bin/qtsetup generate windows
|
||||||
RUN $GOPATH/bin/qtsetup install windows
|
RUN $GOPATH/bin/qtsetup install windows
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -1,6 +1,6 @@
|
||||||
FROM ubuntu:16.04 as base
|
FROM ubuntu:16.04 as base
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
||||||
RUN git clone -q --depth 1 https://github.com/mxe/mxe.git /usr/lib/mxe
|
RUN git clone -q --depth 1 https://github.com/mxe/mxe.git /usr/lib/mxe
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils lzip
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils lzip
|
||||||
|
|
||||||
|
|
|
@ -21,4 +21,4 @@ RUN $GOPATH/bin/qtsetup generate windows
|
||||||
RUN $GOPATH/bin/qtsetup install windows
|
RUN $GOPATH/bin/qtsetup install windows
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -1,6 +1,6 @@
|
||||||
FROM ubuntu:16.04 as base
|
FROM ubuntu:16.04 as base
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
||||||
RUN git clone -q --depth 1 https://github.com/mxe/mxe.git /usr/lib/mxe
|
RUN git clone -q --depth 1 https://github.com/mxe/mxe.git /usr/lib/mxe
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils lzip
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils lzip
|
||||||
|
|
||||||
|
|
|
@ -21,4 +21,4 @@ RUN $GOPATH/bin/qtsetup generate windows
|
||||||
RUN $GOPATH/bin/qtsetup install windows
|
RUN $GOPATH/bin/qtsetup install windows
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -1,6 +1,6 @@
|
||||||
FROM ubuntu:16.04 as base
|
FROM ubuntu:16.04 as base
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
||||||
RUN git clone -q --depth 1 https://github.com/mxe/mxe.git /usr/lib/mxe
|
RUN git clone -q --depth 1 https://github.com/mxe/mxe.git /usr/lib/mxe
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils lzip
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils lzip
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,4 @@ RUN $GOPATH/bin/qtsetup generate windows
|
||||||
RUN $GOPATH/bin/qtsetup install windows
|
RUN $GOPATH/bin/qtsetup install windows
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -27,4 +27,4 @@ RUN $GOPATH/bin/qtsetup generate windows
|
||||||
RUN $GOPATH/bin/qtsetup install windows
|
RUN $GOPATH/bin/qtsetup install windows
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -27,4 +27,4 @@ RUN $GOPATH/bin/qtsetup generate windows
|
||||||
RUN $GOPATH/bin/qtsetup install windows
|
RUN $GOPATH/bin/qtsetup install windows
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -27,4 +27,4 @@ RUN $GOPATH/bin/qtsetup generate windows
|
||||||
RUN $GOPATH/bin/qtsetup install windows
|
RUN $GOPATH/bin/qtsetup install windows
|
||||||
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
RUN cd $GOPATH/src/github.com/therecipe/qt/internal/examples/widgets/line_edits && $GOPATH/bin/qtdeploy build windows && rm -rf ./deploy
|
||||||
|
|
||||||
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git
|
RUN apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates git pkg-config
|
|
@ -55,7 +55,7 @@ func (v *SlideView) updateStatus(status quick.QQuickView__Status) {
|
||||||
println("Found qml Presentation as rootObject")
|
println("Found qml Presentation as rootObject")
|
||||||
}
|
}
|
||||||
|
|
||||||
ri.SetProperty("allowDelay", core.NewQVariant11(false)) //Disable partial reveals on slide pages
|
ri.SetProperty("allowDelay", core.NewQVariant1(false)) //Disable partial reveals on slide pages
|
||||||
slides := ri.Property("slides").ToList()
|
slides := ri.Property("slides").ToList()
|
||||||
v.m_slidesLeft = len(slides)
|
v.m_slidesLeft = len(slides)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ func main() {
|
||||||
|
|
||||||
view := quick.NewQQuickView(nil)
|
view := quick.NewQQuickView(nil)
|
||||||
view.RootContext().SetContextProperty("fileTransfer", fileTransfer)
|
view.RootContext().SetContextProperty("fileTransfer", fileTransfer)
|
||||||
view.RootContext().SetContextProperty2("SystemPictureFolder", core.NewQVariant14(core.QStandardPaths_StandardLocations(core.QStandardPaths__PicturesLocation)[0]))
|
view.RootContext().SetContextProperty2("SystemPictureFolder", core.NewQVariant1(core.QStandardPaths_StandardLocations(core.QStandardPaths__PicturesLocation)[0]))
|
||||||
|
|
||||||
fmt.Println(core.QStandardPaths_StandardLocations(core.QStandardPaths__PicturesLocation))
|
fmt.Println(core.QStandardPaths_StandardLocations(core.QStandardPaths__PicturesLocation))
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,8 @@ func (c *Chart) init() {
|
||||||
c.AddSeries(c.m_series)
|
c.AddSeries(c.m_series)
|
||||||
c.CreateDefaultAxes()
|
c.CreateDefaultAxes()
|
||||||
c.SetAxisX(c.m_axis, c.m_series)
|
c.SetAxisX(c.m_axis, c.m_series)
|
||||||
c.AxisX(nil).SetRange(core.NewQVariant12(0), core.NewQVariant12(10))
|
c.AxisX(nil).SetRange(core.NewQVariant1(0), core.NewQVariant1(10))
|
||||||
c.AxisY(nil).SetRange(core.NewQVariant12(-5), core.NewQVariant12(10))
|
c.AxisY(nil).SetRange(core.NewQVariant1(-5), core.NewQVariant1(10))
|
||||||
|
|
||||||
c.m_timer.Start2()
|
c.m_timer.Start2()
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ func inputWidgets() {
|
||||||
if role != int(core.Qt__DisplayRole) {
|
if role != int(core.Qt__DisplayRole) {
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
}
|
}
|
||||||
return core.NewQVariant14(listDB[index.Row()])
|
return core.NewQVariant1(listDB[index.Row()])
|
||||||
})
|
})
|
||||||
|
|
||||||
//Combo Box
|
//Combo Box
|
||||||
|
|
|
@ -26,7 +26,7 @@ func itemViews() {
|
||||||
if _, ok := listRoles[role]; !ok {
|
if _, ok := listRoles[role]; !ok {
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
}
|
}
|
||||||
return core.NewQVariant14(listDB[index.Row()][listRoles[role].ConstData()])
|
return core.NewQVariant1(listDB[index.Row()][listRoles[role].ConstData()])
|
||||||
})
|
})
|
||||||
listModel.ConnectRoleNames(func() map[int]*core.QByteArray {
|
listModel.ConnectRoleNames(func() map[int]*core.QByteArray {
|
||||||
return listRoles
|
return listRoles
|
||||||
|
|
|
@ -32,7 +32,7 @@ func inputWidgets() {
|
||||||
if role != int(core.Qt__DisplayRole) {
|
if role != int(core.Qt__DisplayRole) {
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
}
|
}
|
||||||
return core.NewQVariant14(items[index.Row()])
|
return core.NewQVariant1(items[index.Row()])
|
||||||
})
|
})
|
||||||
|
|
||||||
comboBoxL.SetModel(listModel)
|
comboBoxL.SetModel(listModel)
|
||||||
|
|
|
@ -22,7 +22,7 @@ func itemViews() {
|
||||||
if role != int(core.Qt__DisplayRole) {
|
if role != int(core.Qt__DisplayRole) {
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
}
|
}
|
||||||
return core.NewQVariant14(list[index.Row()])
|
return core.NewQVariant1(list[index.Row()])
|
||||||
})
|
})
|
||||||
listView.SetModel(listModel)
|
listView.SetModel(listModel)
|
||||||
addWidget(listView)
|
addWidget(listView)
|
||||||
|
@ -83,7 +83,7 @@ func itemViews() {
|
||||||
if role != int(core.Qt__DisplayRole) {
|
if role != int(core.Qt__DisplayRole) {
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
}
|
}
|
||||||
return core.NewQVariant14(table[index.Row()][index.Column()])
|
return core.NewQVariant1(table[index.Row()][index.Column()])
|
||||||
})
|
})
|
||||||
tableView.SetModel(tableModel)
|
tableView.SetModel(tableModel)
|
||||||
addWidget(tableView)
|
addWidget(tableView)
|
||||||
|
|
|
@ -45,9 +45,9 @@ func main() {
|
||||||
ret.ConnectSayHello(func(s string) []*core.QVariant {
|
ret.ConnectSayHello(func(s string) []*core.QVariant {
|
||||||
var out, err = client.SayHello(s)
|
var out, err = client.SayHello(s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return []*core.QVariant{core.NewQVariant14(out), core.NewQVariant14(err.Error())}
|
return []*core.QVariant{core.NewQVariant1(out), core.NewQVariant1(err.Error())}
|
||||||
}
|
}
|
||||||
return []*core.QVariant{core.NewQVariant14(out)}
|
return []*core.QVariant{core.NewQVariant1(out)}
|
||||||
})
|
})
|
||||||
|
|
||||||
ret.ConnectShutdown(func() error {
|
ret.ConnectShutdown(func() error {
|
||||||
|
|
|
@ -63,8 +63,8 @@ func NewCustomReply(op network.QNetworkAccessManager__Operation, req *network.QN
|
||||||
*data = string(content[offset : offset+number])
|
*data = string(content[offset : offset+number])
|
||||||
offset += number
|
offset += number
|
||||||
|
|
||||||
customReply.SetAttribute(network.QNetworkRequest__HttpStatusCodeAttribute, core.NewQVariant7(200))
|
customReply.SetAttribute(network.QNetworkRequest__HttpStatusCodeAttribute, core.NewQVariant1(200))
|
||||||
customReply.SetAttribute(network.QNetworkRequest__HttpReasonPhraseAttribute, core.NewQVariant14("OK"))
|
customReply.SetAttribute(network.QNetworkRequest__HttpReasonPhraseAttribute, core.NewQVariant1("OK"))
|
||||||
|
|
||||||
return number
|
return number
|
||||||
})
|
})
|
||||||
|
@ -78,7 +78,7 @@ func NewCustomReply(op network.QNetworkAccessManager__Operation, req *network.QN
|
||||||
})
|
})
|
||||||
|
|
||||||
customReply.Open(core.QIODevice__ReadOnly | core.QIODevice__Unbuffered)
|
customReply.Open(core.QIODevice__ReadOnly | core.QIODevice__Unbuffered)
|
||||||
customReply.SetHeader(network.QNetworkRequest__ContentLengthHeader, core.NewQVariant9(int64(len(content))))
|
customReply.SetHeader(network.QNetworkRequest__ContentLengthHeader, core.NewQVariant1(int64(len(content))))
|
||||||
|
|
||||||
customReply.MetaDataChanged()
|
customReply.MetaDataChanged()
|
||||||
customReply.DownloadProgress(int64(len(content)), int64(len(content)))
|
customReply.DownloadProgress(int64(len(content)), int64(len(content)))
|
||||||
|
|
|
@ -22,9 +22,9 @@ func main() {
|
||||||
style = quickcontrols2.QQuickStyle_Name()
|
style = quickcontrols2.QQuickStyle_Name()
|
||||||
)
|
)
|
||||||
if style != "" {
|
if style != "" {
|
||||||
settings.SetValue("style", core.NewQVariant14(style))
|
settings.SetValue("style", core.NewQVariant1(style))
|
||||||
} else {
|
} else {
|
||||||
quickcontrols2.QQuickStyle_SetStyle(settings.Value("style", core.NewQVariant14("")).ToString())
|
quickcontrols2.QQuickStyle_SetStyle(settings.Value("style", core.NewQVariant1("")).ToString())
|
||||||
}
|
}
|
||||||
|
|
||||||
var engine = qml.NewQQmlApplicationEngine(nil)
|
var engine = qml.NewQQmlApplicationEngine(nil)
|
||||||
|
|
|
@ -19,8 +19,8 @@ func main() {
|
||||||
|
|
||||||
var someBool bool
|
var someBool bool
|
||||||
fmt.Println("Property value:", object.Property("someNumber").ToInt(&someBool), someBool)
|
fmt.Println("Property value:", object.Property("someNumber").ToInt(&someBool), someBool)
|
||||||
object.SetProperty("someNumber", core.NewQVariant7(5000))
|
object.SetProperty("someNumber", core.NewQVariant1(5000))
|
||||||
fmt.Println("Property value:", object.Property("someNumber").ToInt(&someBool), someBool)
|
fmt.Println("Property value:", object.Property("someNumber").ToInt(&someBool), someBool)
|
||||||
object.SetProperty("someNumber", core.NewQVariant7(200))
|
object.SetProperty("someNumber", core.NewQVariant1(200))
|
||||||
fmt.Println("Property value:", object.Property("someNumber").ToInt(&someBool), someBool)
|
fmt.Println("Property value:", object.Property("someNumber").ToInt(&someBool), someBool)
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ func initQmlContext(quickWidget *quick.QQuickWidget) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("initQmlContext", err)
|
log.Println("initQmlContext", err)
|
||||||
}
|
}
|
||||||
quickWidget.RootContext().SetContextProperty2("qmlInitContext", core.NewQVariant14(string(b)))
|
quickWidget.RootContext().SetContextProperty2("qmlInitContext", core.NewQVariant1(string(b)))
|
||||||
}
|
}
|
||||||
|
|
||||||
type QmlBridge struct {
|
type QmlBridge struct {
|
||||||
|
|
|
@ -52,7 +52,7 @@ Item {
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
mainComponent.SetData(core.NewQByteArray2(qmlString, len(qmlString)), core.NewQUrl())
|
mainComponent.SetData(core.NewQByteArray2(qmlString, -1), core.NewQUrl())
|
||||||
|
|
||||||
view.Show()
|
view.Show()
|
||||||
widgets.QApplication_Exec()
|
widgets.QApplication_Exec()
|
||||||
|
|
|
@ -33,8 +33,8 @@ func init() {
|
||||||
|
|
||||||
func (m *PersonModel) init() {
|
func (m *PersonModel) init() {
|
||||||
m.SetRoles(map[int]*core.QByteArray{
|
m.SetRoles(map[int]*core.QByteArray{
|
||||||
FirstName: core.NewQByteArray2("firstName", len("firstName")),
|
FirstName: core.NewQByteArray2("firstName", -1),
|
||||||
LastName: core.NewQByteArray2("lastName", len("lastName")),
|
LastName: core.NewQByteArray2("lastName", -1),
|
||||||
})
|
})
|
||||||
|
|
||||||
m.ConnectData(m.data)
|
m.ConnectData(m.data)
|
||||||
|
@ -61,12 +61,12 @@ func (m *PersonModel) data(index *core.QModelIndex, role int) *core.QVariant {
|
||||||
switch role {
|
switch role {
|
||||||
case FirstName:
|
case FirstName:
|
||||||
{
|
{
|
||||||
return core.NewQVariant14(p.FirstName())
|
return core.NewQVariant1(p.FirstName())
|
||||||
}
|
}
|
||||||
|
|
||||||
case LastName:
|
case LastName:
|
||||||
{
|
{
|
||||||
return core.NewQVariant14(p.LastName())
|
return core.NewQVariant1(p.LastName())
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -33,8 +33,8 @@ func init() {
|
||||||
|
|
||||||
func (m *PersonModel) init() {
|
func (m *PersonModel) init() {
|
||||||
m.SetRoles(map[int]*core.QByteArray{
|
m.SetRoles(map[int]*core.QByteArray{
|
||||||
FirstName: core.NewQByteArray2("firstName", len("firstName")),
|
FirstName: core.NewQByteArray2("firstName", -1),
|
||||||
LastName: core.NewQByteArray2("lastName", len("lastName")),
|
LastName: core.NewQByteArray2("lastName", -1),
|
||||||
})
|
})
|
||||||
|
|
||||||
m.ConnectData(m.data)
|
m.ConnectData(m.data)
|
||||||
|
@ -61,12 +61,12 @@ func (m *PersonModel) data(index *core.QModelIndex, role int) *core.QVariant {
|
||||||
switch role {
|
switch role {
|
||||||
case FirstName:
|
case FirstName:
|
||||||
{
|
{
|
||||||
return core.NewQVariant14(p.FirstName())
|
return core.NewQVariant1(p.FirstName())
|
||||||
}
|
}
|
||||||
|
|
||||||
case LastName:
|
case LastName:
|
||||||
{
|
{
|
||||||
return core.NewQVariant14(p.LastName())
|
return core.NewQVariant1(p.LastName())
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -33,8 +33,8 @@ func init() {
|
||||||
|
|
||||||
func (m *PersonModel) init() {
|
func (m *PersonModel) init() {
|
||||||
m.SetRoles(map[int]*core.QByteArray{
|
m.SetRoles(map[int]*core.QByteArray{
|
||||||
FirstName: core.NewQByteArray2("firstName", len("firstName")),
|
FirstName: core.NewQByteArray2("firstName", -1),
|
||||||
LastName: core.NewQByteArray2("lastName", len("lastName")),
|
LastName: core.NewQByteArray2("lastName", -1),
|
||||||
})
|
})
|
||||||
|
|
||||||
m.ConnectData(m.data)
|
m.ConnectData(m.data)
|
||||||
|
|
|
@ -55,20 +55,20 @@ func (m *FilesModel) data(index *core.QModelIndex, role int) *core.QVariant {
|
||||||
switch {
|
switch {
|
||||||
case index.Column() == 0 && role == int(core.Qt__DisplayRole) || //needed for sort filter model
|
case index.Column() == 0 && role == int(core.Qt__DisplayRole) || //needed for sort filter model
|
||||||
role == int(core.Qt__UserRole)+1:
|
role == int(core.Qt__UserRole)+1:
|
||||||
return core.NewQVariant14(dbItem.Name)
|
return core.NewQVariant1(dbItem.Name)
|
||||||
|
|
||||||
case role == int(core.Qt__UserRole)+2:
|
case role == int(core.Qt__UserRole)+2:
|
||||||
return core.NewQVariant14(dbItem.Size)
|
return core.NewQVariant1(dbItem.Size)
|
||||||
|
|
||||||
case role == int(core.Qt__UserRole)+3:
|
case role == int(core.Qt__UserRole)+3:
|
||||||
return core.NewQVariant14(dbItem.Redundancy)
|
return core.NewQVariant1(dbItem.Redundancy)
|
||||||
|
|
||||||
case role == int(core.Qt__UserRole)+4:
|
case role == int(core.Qt__UserRole)+4:
|
||||||
return core.NewQVariant25(map[string]*core.QVariant{
|
return core.NewQVariant1(map[string]*core.QVariant{
|
||||||
"available": core.NewQVariant11(dbItem.Available),
|
"available": core.NewQVariant1(dbItem.Available),
|
||||||
"text": core.NewQVariant14(dbItem.ProgressText),
|
"text": core.NewQVariant1(dbItem.ProgressText),
|
||||||
"value": core.NewQVariant12(dbItem.ProgressValue),
|
"value": core.NewQVariant1(dbItem.ProgressValue),
|
||||||
"error": core.NewQVariant11(dbItem.Error != ""),
|
"error": core.NewQVariant1(dbItem.Error != ""),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,22 +46,22 @@ func (m *WalletModel) data(index *core.QModelIndex, role int) *core.QVariant {
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case role == int(core.Qt__UserRole)+1:
|
case role == int(core.Qt__UserRole)+1:
|
||||||
return core.NewQVariant14(dbItem.Status)
|
return core.NewQVariant1(dbItem.Status)
|
||||||
|
|
||||||
case role == int(core.Qt__UserRole)+2:
|
case role == int(core.Qt__UserRole)+2:
|
||||||
return core.NewQVariant14(dbItem.Date)
|
return core.NewQVariant1(dbItem.Date)
|
||||||
|
|
||||||
case role == int(core.Qt__UserRole)+3:
|
case role == int(core.Qt__UserRole)+3:
|
||||||
return core.NewQVariant14(dbItem.Amount)
|
return core.NewQVariant1(dbItem.Amount)
|
||||||
|
|
||||||
case role == int(core.Qt__UserRole)+4:
|
case role == int(core.Qt__UserRole)+4:
|
||||||
return core.NewQVariant14(dbItem.Type)
|
return core.NewQVariant1(dbItem.Type)
|
||||||
|
|
||||||
case role == int(core.Qt__UserRole)+5:
|
case role == int(core.Qt__UserRole)+5:
|
||||||
return core.NewQVariant14(dbItem.Total)
|
return core.NewQVariant1(dbItem.Total)
|
||||||
|
|
||||||
case role == int(core.Qt__UserRole)+6:
|
case role == int(core.Qt__UserRole)+6:
|
||||||
return core.NewQVariant14(dbItem.ID)
|
return core.NewQVariant1(dbItem.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
|
|
|
@ -97,9 +97,9 @@ func (d *Dialog) addNewArtist(name string) int {
|
||||||
f2 := sql.NewQSqlField("artist", core.QVariant__String)
|
f2 := sql.NewQSqlField("artist", core.QVariant__String)
|
||||||
f3 := sql.NewQSqlField("albumcount", core.QVariant__Int)
|
f3 := sql.NewQSqlField("albumcount", core.QVariant__Int)
|
||||||
|
|
||||||
f1.SetValue(core.NewQVariant7(id))
|
f1.SetValue(core.NewQVariant1(id))
|
||||||
f2.SetValue(core.NewQVariant14(name))
|
f2.SetValue(core.NewQVariant1(name))
|
||||||
f3.SetValue(core.NewQVariant7(0))
|
f3.SetValue(core.NewQVariant1(0))
|
||||||
record.Append(f1)
|
record.Append(f1)
|
||||||
record.Append(f2)
|
record.Append(f2)
|
||||||
record.Append(f3)
|
record.Append(f3)
|
||||||
|
@ -118,10 +118,10 @@ func (d *Dialog) addNewAlbum(title string, artistId int) int {
|
||||||
f3 := sql.NewQSqlField("artistid", core.QVariant__Int)
|
f3 := sql.NewQSqlField("artistid", core.QVariant__Int)
|
||||||
f4 := sql.NewQSqlField("year", core.QVariant__Int)
|
f4 := sql.NewQSqlField("year", core.QVariant__Int)
|
||||||
|
|
||||||
f1.SetValue(core.NewQVariant7(id))
|
f1.SetValue(core.NewQVariant1(id))
|
||||||
f2.SetValue(core.NewQVariant14(title))
|
f2.SetValue(core.NewQVariant1(title))
|
||||||
f3.SetValue(core.NewQVariant7(artistId))
|
f3.SetValue(core.NewQVariant1(artistId))
|
||||||
f4.SetValue(core.NewQVariant7(d.yearEditor.Value()))
|
f4.SetValue(core.NewQVariant1(d.yearEditor.Value()))
|
||||||
record.Append(f1)
|
record.Append(f1)
|
||||||
record.Append(f2)
|
record.Append(f2)
|
||||||
record.Append(f3)
|
record.Append(f3)
|
||||||
|
@ -175,7 +175,7 @@ func (d *Dialog) increaseAlbumCount(artistIndex *core.QModelIndex) {
|
||||||
albumCountIndex := artistIndex.Sibling(artistIndex.Row(), 2)
|
albumCountIndex := artistIndex.Sibling(artistIndex.Row(), 2)
|
||||||
|
|
||||||
albumCount := albumCountIndex.Data(0).ToInt(nil)
|
albumCount := albumCountIndex.Data(0).ToInt(nil)
|
||||||
artistModel.SetData(albumCountIndex, core.NewQVariant7(albumCount+1), 0)
|
artistModel.SetData(albumCountIndex, core.NewQVariant1(albumCount+1), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Dialog) revert() {
|
func (d *Dialog) revert() {
|
||||||
|
|
|
@ -237,7 +237,7 @@ func (w *MainWindow) decreaseAlbumCount(artistIndex *core.QModelIndex) {
|
||||||
artists.RemoveRow(row, core.NewQModelIndex())
|
artists.RemoveRow(row, core.NewQModelIndex())
|
||||||
w.showImageLabel()
|
w.showImageLabel()
|
||||||
} else {
|
} else {
|
||||||
artists.SetData(albumCountIndex, core.NewQVariant7(albumCount-1), 0)
|
artists.SetData(albumCountIndex, core.NewQVariant1(albumCount-1), 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ func (m *listModel) data(index *core.QModelIndex, role int) *core.QVariant {
|
||||||
if role != int(core.Qt__DisplayRole) {
|
if role != int(core.Qt__DisplayRole) {
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
}
|
}
|
||||||
return core.NewQVariant14(getArtistForID(index.Row()).Name)
|
return core.NewQVariant1(getArtistForID(index.Row()).Name)
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,16 +27,16 @@ func (m *ViewModel) headerData(section int, orientation core.Qt__Orientation, ro
|
||||||
|
|
||||||
switch section {
|
switch section {
|
||||||
case 0:
|
case 0:
|
||||||
return core.NewQVariant14("ID")
|
return core.NewQVariant1("ID")
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return core.NewQVariant14("Title")
|
return core.NewQVariant1("Title")
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
return core.NewQVariant14("Artist")
|
return core.NewQVariant1("Artist")
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
return core.NewQVariant14("Year")
|
return core.NewQVariant1("Year")
|
||||||
}
|
}
|
||||||
|
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
|
@ -67,25 +67,25 @@ func (m *ViewModel) data(index *core.QModelIndex, role int) *core.QVariant {
|
||||||
index.Column() == 0 && role == int(core.Qt__DisplayRole) || //widgets
|
index.Column() == 0 && role == int(core.Qt__DisplayRole) || //widgets
|
||||||
role == int(core.Qt__UserRole)+1: //qml
|
role == int(core.Qt__UserRole)+1: //qml
|
||||||
|
|
||||||
return core.NewQVariant7(dbItem.Album.ID)
|
return core.NewQVariant1(dbItem.Album.ID)
|
||||||
|
|
||||||
case
|
case
|
||||||
index.Column() == 1 && role == int(core.Qt__DisplayRole) || //widgets
|
index.Column() == 1 && role == int(core.Qt__DisplayRole) || //widgets
|
||||||
role == int(core.Qt__UserRole)+2: //qml
|
role == int(core.Qt__UserRole)+2: //qml
|
||||||
|
|
||||||
return core.NewQVariant14(dbItem.Album.Title)
|
return core.NewQVariant1(dbItem.Album.Title)
|
||||||
|
|
||||||
case
|
case
|
||||||
index.Column() == 2 && role == int(core.Qt__DisplayRole) || //widgets
|
index.Column() == 2 && role == int(core.Qt__DisplayRole) || //widgets
|
||||||
role == int(core.Qt__UserRole)+3: //qml
|
role == int(core.Qt__UserRole)+3: //qml
|
||||||
|
|
||||||
return core.NewQVariant14(dbItem.Artist.Name)
|
return core.NewQVariant1(dbItem.Artist.Name)
|
||||||
|
|
||||||
case
|
case
|
||||||
index.Column() == 3 && role == int(core.Qt__DisplayRole) || //widgets
|
index.Column() == 3 && role == int(core.Qt__DisplayRole) || //widgets
|
||||||
role == int(core.Qt__UserRole)+4: //qml
|
role == int(core.Qt__UserRole)+4: //qml
|
||||||
|
|
||||||
return core.NewQVariant7(dbItem.Album.Year)
|
return core.NewQVariant1(dbItem.Album.Year)
|
||||||
}
|
}
|
||||||
|
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
|
|
|
@ -25,9 +25,9 @@ func (m *CustomSqlModel) data(index *core.QModelIndex, role int) *core.QVariant
|
||||||
var value = m.DataDefault(index, role)
|
var value = m.DataDefault(index, role)
|
||||||
if value.IsValid() && role == int(core.Qt__DisplayRole) {
|
if value.IsValid() && role == int(core.Qt__DisplayRole) {
|
||||||
if index.Column() == 0 {
|
if index.Column() == 0 {
|
||||||
return core.NewQVariant14("#" + value.ToString())
|
return core.NewQVariant1("#" + value.ToString())
|
||||||
} else if index.Column() == 2 {
|
} else if index.Column() == 2 {
|
||||||
return core.NewQVariant14(strings.ToUpper(value.ToString()))
|
return core.NewQVariant1(strings.ToUpper(value.ToString()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,23 +53,23 @@ func (m *EditableSqlModel) setData(index *core.QModelIndex, value *core.QVariant
|
||||||
|
|
||||||
func (m *EditableSqlModel) refresh() {
|
func (m *EditableSqlModel) refresh() {
|
||||||
m.SetQuery2("select * from person", db)
|
m.SetQuery2("select * from person", db)
|
||||||
m.SetHeaderData(0, core.Qt__Horizontal, core.NewQVariant14("ID"), 0)
|
m.SetHeaderData(0, core.Qt__Horizontal, core.NewQVariant1("ID"), 0)
|
||||||
m.SetHeaderData(1, core.Qt__Horizontal, core.NewQVariant14("First Name"), 0)
|
m.SetHeaderData(1, core.Qt__Horizontal, core.NewQVariant1("First Name"), 0)
|
||||||
m.SetHeaderData(2, core.Qt__Horizontal, core.NewQVariant14("Last Name"), 0)
|
m.SetHeaderData(2, core.Qt__Horizontal, core.NewQVariant1("Last Name"), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *EditableSqlModel) setFirstName(personId int, firstName string) bool {
|
func (m *EditableSqlModel) setFirstName(personId int, firstName string) bool {
|
||||||
var query = sql.NewQSqlQuery3(db)
|
var query = sql.NewQSqlQuery3(db)
|
||||||
query.Prepare("update person set firstname = ? where id = ?")
|
query.Prepare("update person set firstname = ? where id = ?")
|
||||||
query.AddBindValue(core.NewQVariant14(firstName), 0)
|
query.AddBindValue(core.NewQVariant1(firstName), 0)
|
||||||
query.AddBindValue(core.NewQVariant7(personId), 0)
|
query.AddBindValue(core.NewQVariant1(personId), 0)
|
||||||
return query.Exec2()
|
return query.Exec2()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *EditableSqlModel) setLastName(personId int, lastName string) bool {
|
func (m *EditableSqlModel) setLastName(personId int, lastName string) bool {
|
||||||
var query = sql.NewQSqlQuery3(db)
|
var query = sql.NewQSqlQuery3(db)
|
||||||
query.Prepare("update person set lastname = ? where id = ?")
|
query.Prepare("update person set lastname = ? where id = ?")
|
||||||
query.AddBindValue(core.NewQVariant14(lastName), 0)
|
query.AddBindValue(core.NewQVariant1(lastName), 0)
|
||||||
query.AddBindValue(core.NewQVariant7(personId), 0)
|
query.AddBindValue(core.NewQVariant1(personId), 0)
|
||||||
return query.Exec2()
|
return query.Exec2()
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,9 @@ import (
|
||||||
|
|
||||||
func initializeModel(model *sql.QSqlQueryModel) {
|
func initializeModel(model *sql.QSqlQueryModel) {
|
||||||
model.SetQuery2("select * from person", db)
|
model.SetQuery2("select * from person", db)
|
||||||
model.SetHeaderData(0, core.Qt__Horizontal, core.NewQVariant14("ID"), 0)
|
model.SetHeaderData(0, core.Qt__Horizontal, core.NewQVariant1("ID"), 0)
|
||||||
model.SetHeaderData(1, core.Qt__Horizontal, core.NewQVariant14("First name"), 0)
|
model.SetHeaderData(1, core.Qt__Horizontal, core.NewQVariant1("First name"), 0)
|
||||||
model.SetHeaderData(2, core.Qt__Horizontal, core.NewQVariant14("Last name"), 0)
|
model.SetHeaderData(2, core.Qt__Horizontal, core.NewQVariant1("Last name"), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
var offset int
|
var offset int
|
||||||
|
|
|
@ -34,7 +34,7 @@ func (t *WebSocketTransport) sendMessage(message *core.QJsonObject) {
|
||||||
|
|
||||||
func (t *WebSocketTransport) textMessageReceived(messageData string) {
|
func (t *WebSocketTransport) textMessageReceived(messageData string) {
|
||||||
var error *core.QJsonParseError
|
var error *core.QJsonParseError
|
||||||
message := core.QJsonDocument_FromJson(core.NewQByteArray2(messageData, len(messageData)), error)
|
message := core.QJsonDocument_FromJson(core.NewQByteArray2(messageData, -1), error)
|
||||||
|
|
||||||
if error.Error() != 0 {
|
if error.Error() != 0 {
|
||||||
fmt.Printf("Failed to parse text message as JSON object: %v\nError is: %v\n", messageData, error.ErrorString())
|
fmt.Printf("Failed to parse text message as JSON object: %v\nError is: %v\n", messageData, error.ErrorString())
|
||||||
|
|
|
@ -80,7 +80,7 @@ func main() {
|
||||||
stopbutton.SetMaximumSize(sx)
|
stopbutton.SetMaximumSize(sx)
|
||||||
stopbutton.ConnectClicked(func(_ bool) { stopbutton_click() })
|
stopbutton.ConnectClicked(func(_ bool) { stopbutton_click() })
|
||||||
|
|
||||||
gif := core.NewQByteArray2("gif", len("gif"))
|
gif := core.NewQByteArray2("gif", -1)
|
||||||
NavImage = gui.NewQMovie3(":/icons/loading.gif", gif, window)
|
NavImage = gui.NewQMovie3(":/icons/loading.gif", gif, window)
|
||||||
NavImage.SetScaledSize(core.NewQSize2(35, 35))
|
NavImage.SetScaledSize(core.NewQSize2(35, 35))
|
||||||
NavImage.SetSpeed(200)
|
NavImage.SetSpeed(200)
|
||||||
|
|
|
@ -117,7 +117,7 @@ func createEditor(parent *widgets.QWidget, option *widgets.QStyleOptionViewItem,
|
||||||
}
|
}
|
||||||
|
|
||||||
func textchanged(text string) {
|
func textchanged(text string) {
|
||||||
model.SetData(textIndex, core.NewQVariant14(text), 2) // edit role
|
model.SetData(textIndex, core.NewQVariant1(text), 2) // edit role
|
||||||
}
|
}
|
||||||
|
|
||||||
func setEditorData(editor *widgets.QWidget, index *core.QModelIndex) {
|
func setEditorData(editor *widgets.QWidget, index *core.QModelIndex) {
|
||||||
|
@ -129,7 +129,7 @@ func setEditorData(editor *widgets.QWidget, index *core.QModelIndex) {
|
||||||
func setModelData(editor *widgets.QWidget, model *core.QAbstractItemModel, index *core.QModelIndex) {
|
func setModelData(editor *widgets.QWidget, model *core.QAbstractItemModel, index *core.QModelIndex) {
|
||||||
lineedit := widgets.NewQLineEditFromPointer(editor.Pointer())
|
lineedit := widgets.NewQLineEditFromPointer(editor.Pointer())
|
||||||
text := lineedit.Text()
|
text := lineedit.Text()
|
||||||
model.SetData(index, core.NewQVariant14(text), int(core.Qt__EditRole))
|
model.SetData(index, core.NewQVariant1(text), int(core.Qt__EditRole))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,14 +139,14 @@ func updateEditorGeometry(editor *widgets.QWidget, option *widgets.QStyleOptionV
|
||||||
|
|
||||||
func headerdata(section int, orientation core.Qt__Orientation, role int) *core.QVariant {
|
func headerdata(section int, orientation core.Qt__Orientation, role int) *core.QVariant {
|
||||||
if orientation == 1 && role == 0 { // Qt__Horizontal, Qt__DisplayRole
|
if orientation == 1 && role == 0 { // Qt__Horizontal, Qt__DisplayRole
|
||||||
return core.NewQVariant14("column" + strconv.Itoa(section+1))
|
return core.NewQVariant1("column" + strconv.Itoa(section+1))
|
||||||
}
|
}
|
||||||
|
|
||||||
if orientation == 2 && role == 0 {
|
if orientation == 2 && role == 0 {
|
||||||
if section < list.Size()-1 {
|
if section < list.Size()-1 {
|
||||||
return core.NewQVariant14(strconv.Itoa(section + 1))
|
return core.NewQVariant1(strconv.Itoa(section + 1))
|
||||||
} else {
|
} else {
|
||||||
return core.NewQVariant14("*")
|
return core.NewQVariant1("*")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return core.NewQVariant()
|
return core.NewQVariant()
|
||||||
|
@ -167,11 +167,11 @@ func data(index *core.QModelIndex, role int) *core.QVariant {
|
||||||
switch deducedText := text.(type) {
|
switch deducedText := text.(type) {
|
||||||
case int:
|
case int:
|
||||||
{
|
{
|
||||||
return core.NewQVariant7(deducedText)
|
return core.NewQVariant1(deducedText)
|
||||||
}
|
}
|
||||||
case string:
|
case string:
|
||||||
{
|
{
|
||||||
return core.NewQVariant14(deducedText)
|
return core.NewQVariant1(deducedText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,7 +360,7 @@ func GoList(args ...string) *exec.Cmd {
|
||||||
|
|
||||||
var skip bool
|
var skip bool
|
||||||
for i := 5; i <= 10; i++ {
|
for i := 5; i <= 10; i++ {
|
||||||
if v := runtime.Version(); strings.Contains(v, fmt.Sprintf("go1.%v.", i)) || strings.HasSuffix(v, fmt.Sprintf("go1.%v", i)) {
|
if v := GOVERSION(); strings.Contains(v, fmt.Sprintf("go1.%v.", i)) || strings.HasSuffix(v, fmt.Sprintf("go1.%v", i)) {
|
||||||
skip = true
|
skip = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -404,3 +404,18 @@ func QT_STATIC() bool {
|
||||||
func QT_NOT_CACHED() bool {
|
func QT_NOT_CACHED() bool {
|
||||||
return os.Getenv("QT_NOT_CACHED") == "true"
|
return os.Getenv("QT_NOT_CACHED") == "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
goVersionCache string
|
||||||
|
goVersionCacheMutex = new(sync.Mutex)
|
||||||
|
)
|
||||||
|
|
||||||
|
func GOVERSION() (r string) {
|
||||||
|
goVersionCacheMutex.Lock()
|
||||||
|
if goVersionCache == "" {
|
||||||
|
goVersionCache = strings.Split(RunCmd(exec.Command("go", "version"), "get go version"), " ")[2]
|
||||||
|
}
|
||||||
|
r = goVersionCache
|
||||||
|
goVersionCacheMutex.Unlock()
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue