Discussion:
QML help sought
Robert Helling
2018-08-08 15:40:13 UTC
Permalink
Hi,

I thought I could work on a feature to make it easy to file a bug report directly from the mobile app (to motivate users to do that rather than give a bad rating in the app store). But I failed right from the start. If you feel at least a bit comfortable with qml, please have a look at

https://github.com/atdotde/subsurface/tree/reportbug

The problem is that I fail to understand how to tell QML that there should be an additional page containing the elements to file a bug report. So if you could point me to how to avoid the

INFO: qrc:///qml/main.qml:380: ReferenceError: reportBug is not defined

error that would be appreciated.

Best
Robert

--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
Jan Iversen
2018-08-08 16:47:45 UTC
Permalink
Hmmm when I look at line 380, it is the “developer” action, I assume you mean something different.

However this sounds like something I get quite often, because I have forgotten to declare the page (a bit later in the same qml file).

Search for AboutPage (line 576) for an example. Remark qml have some weird definition that the first letter needs to be capital.

hope this helps a little bit.
rgds
jan i

Enviado desde mi iPad
Post by Robert Helling
Hi,
I thought I could work on a feature to make it easy to file a bug report directly from the mobile app (to motivate users to do that rather than give a bad rating in the app store). But I failed right from the start. If you feel at least a bit comfortable with qml, please have a look at
https://github.com/atdotde/subsurface/tree/reportbug
The problem is that I fail to understand how to tell QML that there should be an additional page containing the elements to file a bug report. So if you could point me to how to avoid the
INFO: qrc:///qml/main.qml:380: ReferenceError: reportBug is not defined
error that would be appreciated.
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de
Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
_______________________________________________
subsurface mailing list
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Robert Helling
2018-08-08 16:52:56 UTC
Permalink
Jan,
Hmmm when I look at line 380, it is the “developer” action, I assume you mean something different.
However this sounds like something I get quite often, because I have forgotten to declare the page (a bit later in the same qml file).
Search for AboutPage (line 576) for an example. Remark qml have some weird definition that the first letter needs to be capital.
thanks for the hints. But if I uncomment lines 586ff in main.qml (and capitalise the first word) it won’t even start up citing

INFO: qrc:///qml/main.qml:587 ReportBug is not a type

as an excuse. Also Qt Creator fails to highlight ReportBug and can’t do anything upon “Follow symbol” whereas it can when I do the same on Settings. So at least Creator also cannot find my reportBugPage.qml file it seems.

Best
Robert

--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
Jan Iversen
2018-08-08 17:02:25 UTC
Permalink
I think you have forgotten to push your local branch to github, I am looking in your account in the subsurface repo in branch reportbug, and cannot see your changes.

There are some tricky naming issues, which might be the issue, once I see your files I hopefully can help,

rgds
jan i

Enviado desde mi iPad
Jan,
Post by Jan Iversen
Hmmm when I look at line 380, it is the “developer” action, I assume you mean something different.
However this sounds like something I get quite often, because I have forgotten to declare the page (a bit later in the same qml file).
Search for AboutPage (line 576) for an example. Remark qml have some weird definition that the first letter needs to be capital.
thanks for the hints. But if I uncomment lines 586ff in main.qml (and capitalise the first word) it won’t even start up citing
INFO: qrc:///qml/main.qml:587 ReportBug is not a type
as an excuse. Also Qt Creator fails to highlight ReportBug and can’t do anything upon “Follow symbol” whereas it can when I do the same on Settings. So at least Creator also cannot find my reportBugPage.qml file it seems.
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de
Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
Robert Helling
2018-08-09 10:29:15 UTC
Permalink
Jan,
Post by Jan Iversen
I think you have forgotten to push your local branch to github, I am looking in your account in the subsurface repo in branch reportbug, and cannot see your changes.
There are some tricky naming issues, which might be the issue, once I see your files I hopefully can help,
I did push but I forgot to commit before. It should be there now.

Thanks for your help
Robert

--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
Joakim Bygdell
2018-08-09 11:46:18 UTC
Permalink
Hi Robert,

You need to add "import QtQuick.Controls 2.2 as Controls" in the
reportBugPage.qml
<https://github.com/atdotde/subsurface/commit/1cbaff35bd52528dab6dabe1fc12da7ad781140a#diff-a35b623941dfd036d7debee452c3e84f>
file

/ Jocke
Jan Iversen
2018-08-09 12:06:02 UTC
Permalink
Hi

things like that happen.

I have looked at the files and I see a couple of problems.

mobile-resources.qrc refer to “reportBugPage.qml” that needs to be “ReportBugPage.qml” (no idea why, but start with lower letters never worked for me).

reportBugPage.qml rename to ReportBugPage.qml (I would leave out Page to make it consistent with the rest).
objectName and id should follow the filename (to avoid confusion)
as noted by Joakim you miss the import statement.

now (nearly) most important
main.qml
line 589 refers to ReportBug, but the file is reportBugPage.qml
same problem in line 349.

I should have a little spare time in 3-4 hours then I will make you a PR.

rgds
jan i

Enviado desde mi iPad
Post by Joakim Bygdell
Hi Robert,
You need to add "import QtQuick.Controls 2.2 as Controls" in the reportBugPage.qml file
/ Jocke
_______________________________________________
subsurface mailing list
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Robert Helling
2018-08-09 12:22:28 UTC
Permalink
Hi,
Post by Jan Iversen
things like that happen.
I have looked at the files and I see a couple of problems.
mobile-resources.qrc refer to “reportBugPage.qml” that needs to be “ReportBugPage.qml” (no idea why, but start with lower letters never worked for me).
reportBugPage.qml rename to ReportBugPage.qml (I would leave out Page to make it consistent with the rest).
objectName and id should follow the filename (to avoid confusion)
as noted by Joakim you miss the import statement.
now (nearly) most important
main.qml
line 589 refers to ReportBug, but the file is reportBugPage.qml
same problem in line 349.
I should have a little spare time in 3-4 hours then I will make you a PR.
I indeed made some progress along these lines: Indeed, the file name was critical. Now I have a button but pressing it produces an error message coming form inside kirigami.

If you don’t mind, have a look at the updated branch.

Thanks a lot everybody!

Best
Robert

--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
Jan Iversen
2018-08-09 13:00:23 UTC
Permalink
Enviado desde mi iPad
Post by Robert Helling
Hi,
Post by Jan Iversen
things like that happen.
I have looked at the files and I see a couple of problems.
mobile-resources.qrc refer to “reportBugPage.qml” that needs to be “ReportBugPage.qml” (no idea why, but start with lower letters never worked for me).
reportBugPage.qml rename to ReportBugPage.qml (I would leave out Page to make it consistent with the rest).
objectName and id should follow the filename (to avoid confusion)
as noted by Joakim you miss the import statement.
now (nearly) most important
main.qml
line 589 refers to ReportBug, but the file is reportBugPage.qml
same problem in line 349.
I should have a little spare time in 3-4 hours then I will make you a PR.
I indeed made some progress along these lines: Indeed, the file name was critical. Now I have a button but pressing it produces an error message coming form inside kirigami.
If you don’t mind, have a look at the updated branch.
Had a readers look (still away from my computer), try to use parent.returnTopPage() (which is main.qml). rootItem as far as I remember is the kirigami globalDrawer.

but at least you are making progress, I look forward to see this in the product, please do not forget to include the logs (see About.qml).

rgds
jan I
Post by Robert Helling
Thanks a lot everybody!
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de
Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
Jan Iversen
2018-08-09 15:06:52 UTC
Permalink
Bad advice, your code should work with rootItem.

I am trying to download your commit as a patch, and debug it.

rgds
jan i

Enviado desde mi iPad
Post by Robert Helling
Hi,
Post by Jan Iversen
things like that happen.
I have looked at the files and I see a couple of problems.
mobile-resources.qrc refer to “reportBugPage.qml” that needs to be “ReportBugPage.qml” (no idea why, but start with lower letters never worked for me).
reportBugPage.qml rename to ReportBugPage.qml (I would leave out Page to make it consistent with the rest).
objectName and id should follow the filename (to avoid confusion)
as noted by Joakim you miss the import statement.
now (nearly) most important
main.qml
line 589 refers to ReportBug, but the file is reportBugPage.qml
same problem in line 349.
I should have a little spare time in 3-4 hours then I will make you a PR.
I indeed made some progress along these lines: Indeed, the file name was critical. Now I have a button but pressing it produces an error message coming form inside kirigami.
If you don’t mind, have a look at the updated branch.
Thanks a lot everybody!
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de
Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
Jan Iversen
2018-08-09 15:51:42 UTC
Permalink
Got it....another id error

stackView.push in main.qml refers to the id, use “reportBugWindow” and it works.

also I would delete “objectName” in ReportBug.qml as it is set automatically (to a different value) and not needed.

another error in ReportBug.qml gridwidth is not defined, but it works fine without setting it.

I just test with the mobile version, I can click the button without getting any error messages.

If you need more help feel free to mail me.

have a good time
rgds
jan i

Enviado desde mi iPad
Post by Robert Helling
Hi,
Post by Jan Iversen
things like that happen.
I have looked at the files and I see a couple of problems.
mobile-resources.qrc refer to “reportBugPage.qml” that needs to be “ReportBugPage.qml” (no idea why, but start with lower letters never worked for me).
reportBugPage.qml rename to ReportBugPage.qml (I would leave out Page to make it consistent with the rest).
objectName and id should follow the filename (to avoid confusion)
as noted by Joakim you miss the import statement.
now (nearly) most important
main.qml
line 589 refers to ReportBug, but the file is reportBugPage.qml
same problem in line 349.
I should have a little spare time in 3-4 hours then I will make you a PR.
I indeed made some progress along these lines: Indeed, the file name was critical. Now I have a button but pressing it produces an error message coming form inside kirigami.
If you don’t mind, have a look at the updated branch.
Thanks a lot everybody!
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de
Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
Robert Helling
2018-08-09 16:21:25 UTC
Permalink
Jan,
Post by Jan Iversen
Got it....another id error
stackView.push in main.qml refers to the id, use “reportBugWindow” and it works.
also I would delete “objectName” in ReportBug.qml as it is set automatically (to a different value) and not needed.
another error in ReportBug.qml gridwidth is not defined, but it works fine without setting it.
I just test with the mobile version, I can click the button without getting any error messages.
If you need more help feel free to mail me.
thanks a lot. That indeed did the trick (plus taking care of capitalisation
).

This gets me going.

Now I have to find out why this does not build on my laptop (doing this on the desktop)


Best
Robert

--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F

Jan Iversen
2018-08-08 17:05:36 UTC
Permalink
Just a stray thought, did you remember to add the file to mobile-resources.qrc ?

not doing so would guarantee the error message you see.

rgds
jan i

Enviado desde mi iPad
Post by Jan Iversen
Hmmm when I look at line 380, it is the “developer” action, I assume you mean something different.
However this sounds like something I get quite often, because I have forgotten to declare the page (a bit later in the same qml file).
Search for AboutPage (line 576) for an example. Remark qml have some weird definition that the first letter needs to be capital.
hope this helps a little bit.
rgds
jan i
Enviado desde mi iPad
Post by Robert Helling
Hi,
I thought I could work on a feature to make it easy to file a bug report directly from the mobile app (to motivate users to do that rather than give a bad rating in the app store). But I failed right from the start. If you feel at least a bit comfortable with qml, please have a look at
https://github.com/atdotde/subsurface/tree/reportbug
The problem is that I fail to understand how to tell QML that there should be an additional page containing the elements to file a bug report. So if you could point me to how to avoid the
INFO: qrc:///qml/main.qml:380: ReferenceError: reportBug is not defined
error that would be appreciated.
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
http://www.atdotde.de
Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515 BB44 0820 367C 36BC 0C1D and
DCED 37B6 251C 7861 270D 5613 95C7 9D32 9A8D 9B8F
_______________________________________________
subsurface mailing list
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Loading...