Merge lp:~diegosarmentero/ubuntuone-control-panel/tab-shares-functions into lp:ubuntuone-control-panel
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Roberto Alsina on 2012-08-28 | ||||
| Approved revision: | 363 | ||||
| Merged at revision: | 352 | ||||
| Proposed branch: | lp:~diegosarmentero/ubuntuone-control-panel/tab-shares-functions | ||||
| Merge into: | lp:ubuntuone-control-panel | ||||
| Diff against target: |
2027 lines (+1644/-41) 17 files modified
data/qt/images.qrc (+1/-0) data/qt/share_file.ui (+94/-0) data/qt/share_links.ui (+196/-10) data/qt/ubuntuone.qss (+61/-0) ubuntuone/controlpanel/backend.py (+36/-1) ubuntuone/controlpanel/gui/__init__.py (+2/-0) ubuntuone/controlpanel/gui/qt/share_file.py (+63/-0) ubuntuone/controlpanel/gui/qt/share_links.py (+189/-1) ubuntuone/controlpanel/gui/qt/share_links_search.py (+318/-0) ubuntuone/controlpanel/gui/qt/tests/__init__.py (+18/-0) ubuntuone/controlpanel/gui/qt/tests/test_share_file.py (+76/-0) ubuntuone/controlpanel/gui/qt/tests/test_share_links.py (+161/-3) ubuntuone/controlpanel/gui/qt/tests/test_share_links_search.py (+302/-0) ubuntuone/controlpanel/gui/qt/tests/test_systray.py (+15/-26) ubuntuone/controlpanel/sd_client/__init__.py (+20/-0) ubuntuone/controlpanel/tests/test_backend.py (+64/-0) ubuntuone/controlpanel/tests/test_sd_client.py (+28/-0) |
||||
| To merge this branch: | bzr merge lp:~diegosarmentero/ubuntuone-control-panel/tab-shares-functions | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Roberto Alsina (community) | Approve on 2012-08-28 | ||
| Alejandro J. Cura (community) | 2012-08-24 | Approve on 2012-08-28 | |
|
Review via email:
|
|||
Commit Message
- Adding functionality to the Share Links Tab (LP: #1039142).
- 352. By Diego Sarmentero on 2012-08-27
-
fixing docstrings
| Diego Sarmentero (diegosarmentero) wrote : | # |
> This is a huge branch, that could have been split in at least three branches.
> :-(
I know, we talk about the length of the branch with ralsina on friday.
A lot of parts are really trivial, comment, qss, xml and docstring anyway...
>
> Please fix the commented lines in the last three testcases.
> Does this need a freeze exception?
Docstrings fixed.
- 353. By Diego Sarmentero on 2012-08-27
-
retrieving folders data asynchronously
| Alejandro J. Cura (alecu) wrote : | # |
Some comments so far:
5 docstrings are copypasted with: """Obtain the data to create the sync menu."""
Please make them unique.
---
There's an extra blank line after "class ShareLinksPanel" and its docstring.
- 354. By Diego Sarmentero on 2012-08-27
-
enhanced line button updated
| Alejandro J. Cura (alecu) wrote : | # |
Let's move all QLabel font sizes and color styles used in <span>s into one file with all styling constants.
This is not blocking for this branch, so a new bug is being opened.
---
Empty lines before the docstrings in class ActionsButtons and class EnhancedLineEdit.
----
It's never a good idea to touch class variables in tests, because the state of the class variable is not resetted between tests. Please use regular instances for the fake objects instead every time you can, something like:
class FakeDesktopServ
"""Fake QDesktopService."""
def __init__(self):
def openUrl(self, url):
"""Fake openUrl."""
[...]
def test_open_
"""Test the execution of open_in_browser."""
url = 'http://
expected = QtCore.QUrl(url)
And similarly in the two tests in ActionsButtonsT
----
Please, fix the docstrings in:
* test_move_
* test_get_
* test_copy
- 355. By Diego Sarmentero on 2012-08-27
-
tests fixed
- 356. By Diego Sarmentero on 2012-08-27
-
fixing docstring
| Diego Sarmentero (diegosarmentero) wrote : | # |
> Let's move all QLabel font sizes and color styles used in <span>s into one
> file with all styling constants.
> This is not blocking for this branch, so a new bug is being opened.
>
I've created a different bug for this:
https:/
> ---
>
> Empty lines before the docstrings in class ActionsButtons and class
> EnhancedLineEdit.
>
> ----
>
> It's never a good idea to touch class variables in tests, because the state of
> the class variable is not resetted between tests. Please use regular instances
> for the fake objects instead every time you can, something like:
>
> class FakeDesktopServ
> """Fake QDesktopService."""
>
> def __init__(self):
> self.opened_url = None
>
> def openUrl(self, url):
> """Fake openUrl."""
> self.opened_url = url
>
> [...]
>
> def test_open_
> """Test the execution of open_in_browser."""
> fake_desktop_
> self.patch(QtGui, "QDesktopServices", fake_desktop_
> url = 'http://
> self.ui.
> self.ui.
> expected = QtCore.QUrl(url)
> self.assertEqua
>
>
> And similarly in the two tests in ActionsButtonsT
>
> ----
>
> Please, fix the docstrings in:
> * test_move_
> * test_get_
> * test_copy
Fixed
| Alejandro J. Cura (alecu) wrote : | # |
There are no tests for keyPressEvent and moveEvent in SearchBox.
And also keyPressEvent could benefit from being refactored into smaller functions that are more easily testable.
----
The UI completely freezes for about 15 seconds when starting. The window manager even dims it, as it does with unresponsive windows.
This does not happen on trunk.
----
Besides the above two issues, all tests pass and the code looks good so far.
- 357. By Diego Sarmentero on 2012-08-27
-
FakeDesktopService improved
- 358. By Diego Sarmentero on 2012-08-27
-
fixing memory and performance issues
- 359. By Diego Sarmentero on 2012-08-27
-
tests fixed
| Diego Sarmentero (diegosarmentero) wrote : | # |
> There are no tests for keyPressEvent and moveEvent in SearchBox.
> And also keyPressEvent could benefit from being refactored into smaller
> functions that are more easily testable.
>
> ----
>
> The UI completely freezes for about 15 seconds when starting. The window
> manager even dims it, as it does with unresponsive windows.
>
> This does not happen on trunk.
>
> ----
>
> Besides the above two issues, all tests pass and the code looks good so far.
Fixed
- 360. By Diego Sarmentero on 2012-08-27
-
deleting legacy code
- 361. By Diego Sarmentero on 2012-08-27
-
adding missing docstring
- 362. By Diego Sarmentero on 2012-08-27
-
fixed docstrings
| Alejandro J. Cura (alecu) wrote : | # |
There are "ifs" in _key_down_pressed and _key_up_pressed, but there's only one test for each.
Please add more tests that check all possible combinations.
----
There's no need for this to be a dict:
self.
It should be just a variable:
self.
| Roberto Alsina (ralsina) wrote : | # |
I get this backtrace:
Traceback (most recent call last):
File "/home/
folders_data += self.get_
File "/home/
for root, _, files in os.walk(folder):
File "/usr/lib/
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/
if isdir(join(top, name)):
File "/usr/lib/
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 17: ordinal not in range(128)
| Diego Sarmentero (diegosarmentero) wrote : | # |
> There are "ifs" in _key_down_pressed and _key_up_pressed, but there's only
> one test for each.
> Please add more tests that check all possible combinations.
>
> ----
>
> There's no need for this to be a dict:
> self.fake_
>
> It should be just a variable:
> self.fake_
Fixed
- 363. By Diego Sarmentero on 2012-08-28
-
tests improved
| Roberto Alsina (ralsina) wrote : | # |
> I get this backtrace:
>
>
> Traceback (most recent call last):
> File "/home/
> ks_search.py", line 296, in run
> folders_data += self.get_
> File "/home/
> ks_search.py", line 316, in get_folder_info
> for root, _, files in os.walk(folder):
> File "/usr/lib/
> for x in walk(new_path, topdown, onerror, followlinks):
> File "/usr/lib/
> if isdir(join(top, name)):
> File "/usr/lib/
> path += '/' + b
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 17:
> ordinal not in range(128)
This was caused by files with invalid utf-8 names, which is not as critical. Removing this needsfixing.
| Roberto Alsina (ralsina) wrote : | # |
Removing objections, created separate bugs for them


This is a huge branch, that could have been split in at least three branches. :-(
Please fix the commented lines in the last three testcases.
Does this need a freeze exception?