Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewPackagename_ #42

Closed
5k3105 opened this issue Jun 20, 2016 · 2 comments
Closed

NewPackagename_ #42

5k3105 opened this issue Jun 20, 2016 · 2 comments

Comments

@5k3105
Copy link
Contributor

5k3105 commented Jun 20, 2016

Hi,

The moc generates method names that I am using so I have to rename those. But it is also using camelcase NewPackagename for my struct creations - which is kind of aggravating because I'm not sure what I should rename all my struct creators. I began putting underscores at the end of the method names to distinguish them. Now I am putting underscores behind the struct creators. Is it possible to have your moc program use these alternate name + underscore instead so my code doesn't look so strange?

Thanks

package controlbox

type Controlbox struct {
    *widgets.QWidget
    Mode            string
    Tool            string
    }

func NewControlbox(canvas *widgets.QWidget, statusbar *widgets.QStatusBar) *Controlbox {

    cb := &Controlbox{}
    ... }
controlbox\moc.go:56: NewControlbox redeclared in this block
        previous declaration at controlbox\controlbox.go:22
@therecipe
Copy link
Owner

therecipe commented Jun 20, 2016

Hey

I modified qtmoc, so that it shouldn't interfere your function names anymore. 2750c77
(I didn't change the generated names, but qtmoc will now only create the moc* files if it's really necessary)

You may need to update to Qt 5.7 and also change your PATH to point to the new g++.exe C:\Qt\Qt5.7.0\Tools\mingw530_32\bin

@5k3105
Copy link
Contributor Author

5k3105 commented Jun 21, 2016

It works! Thank you!

@5k3105 5k3105 closed this as completed Jun 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants