Closed Bug 1145599 Opened 9 years ago Closed 9 years ago

[gui] add a combobox for choosing the bits of the application to bisect

Categories

(Testing :: mozregression, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: parkouss, Assigned: hrudayranjansahoo0208, Mentored)

Details

(Whiteboard: [lang=py][good first bug])

Attachments

(1 file)

Currently the first page of the wizard only allows to choose an app and a kind of bisection. It would be good to allow the user to select the bits (eg 32 or 64) for the application to bisect when applicable.
Hello! I was able to install the mozregression GUI succesfully on my local system (Ubuntu) and run it. I am relatively new to "python GUI" field and so I want to know more about it! Is it possible that someone can assign me to this bug as it seems to be a very good first bug?
Sure!
Assignee: nobody → hrudayranjansahoo0208
Ok, some help here - just in case you are new to QT or pyqt4 development.

To add the combobox, you have to edit the corresponding ui file (http://doc.qt.io/qt-4.8/designer-using-a-ui-file.html). A .ui file is an xml file generated by designer (a qt tool). So to edit the file under ubuntu:

designer-qt4 mozregui/ui/intro.ui

Now you can edit the intro.ui via the designer tool, which is pretty convenient. You can find some documentation to use it here: http://doc.qt.io/qt-4.8/designer-manual.html

Once you modified the file, you have to compile this .ui file to a new .py file. This will be done automatically if you run:

python build.py run

as stated in the README file.

if everything goes well, the running application should reflect your changes. Note that you can have access of your new combobox in the code by using the ui.<object name of your combobox> attribute.

For example, the combobox for the application (on the same intro.ui file) as an objectName of "app_combo". I choosed this name, and defined it in the designer. Then in the code, I can reference this combobox by using ui.app_combo:

https://github.com/mozilla/mozregression/blob/master/gui/mozregui/wizard.py#L60

That's it. There is quite a lot of things to know about Qt, like these ui files, signals/slots, etc. You can follow some tutorial on the web to get started if you feel lost about all this.

Last thing to know is that PyQt4 is just some python bindings around the C++ framework Qt4. This means that you can look at the documentation for the c++ code, every methods / classes will exist in PyQt4, and there are good chances that the names of methods, parameters and the way to use this will be exactly the same - just expressed in python.

So, if you are looking for documentation about QComboBox (you may need that :)), you can look at:

http://doc.qt.io/qt-4.8/qcombobox.html [c++ documentation]
http://pyqt.sourceforge.net/Docs/PyQt4/qcombobox.html [pyqt4 documentation]

Note that I found these links just by hitting "QComboBox" and "QComboBox pyqt4" in google - it was the firsts results.

Hope that helps - do not hesitate to send me mails, and we can discuss on irc if you need some help. :)
Hi~ I knew some knowledge about Python and PyQt. So, I am pretty sure I can fix this bug:)
Please assign this job to me and I will commit first patch as soon as possible. Thanks a lot!
Hello MikeLing,

This bug is already assigned. :) I can find you another bug if you're interested with Python and PyQt (for the same tool, mozregression-gui). Just give me a few days, I have to write the issues in bugzilla.

Thanks for your interest! I'll let you know as soon as I got something to work on.
(In reply to Julien Pagès from comment #5)

Great! I'm very interesting about it and please take your time. Thank you very much.:)
Hello MikeLing,

I just created bug 1156937, bug 1156940 and bug 1156945 as a start. Feel free to look at it, and then post a message on any of them if you are interested to work on it or want some more information. :)
Attachment #8598648 - Flags: review?
Attachment #8598648 - Flags: review? → review?(j.parkouss)
It seems that there is indentation issues for pep8 here:

https://travis-ci.org/mozilla/mozregression/builds/60382356#L673

It is probably related to what I noted on the PR (as a comment). Once you fixed it please say it here so I'll give a proper review.

Thanks!
(In reply to Julien Pagès from comment #9)
> It seems that there is indentation issues for pep8 here:
> 
> https://travis-ci.org/mozilla/mozregression/builds/60382356#L673
> 
> It is probably related to what I noted on the PR (as a comment). Once you
> fixed it please say it here so I'll give a proper review.
> 
> Thanks!

Yeah, I fixed it.. :) Henceforth, I will remember to run flake8 and pep8 on the files before comitting to the repository. But frankly speaking PEP8 checkings should not be too strict... Programmers are humans too... :P
Comment on attachment 8598648 [details] [review]
Added the code for adding a ComboBox for inputting the no. of bits for an apllication and created a github pull request

(In reply to Hrudaya Rn. Sahoo from comment #10)
> But frankly speaking PEP8
> checkings should not be too strict... Programmers are humans too... :P

Ah! That's exactly why I think it is useful - it can detect some of our human mistakes :)

Thank you for the patch! Looks good to me.
Attachment #8598648 - Flags: review?(j.parkouss) → review+
Merged in. :) As we discussed on irc, I will soon (probably tomorrow) open a new bug for some useful checks that we can add around the bits and assign it to you Hrudaya.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: