Paste option is not available in folder_actions_popover

Bug #1243854 reported by Para Siva on 2013-10-23
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu File Manager App
High
Carlos Jose Mazieri

Bug Description

Only 'Properties' and 'Create New Folder' options are available in the Actions popover of folder toolbar at the moment (with trusty image 3) and this is making some smoke tests fail.

http://reports.qa.ubuntu.com/smokeng/trusty/touch/maguro/3:20131022.1:20131015/4792/ubuntu-filemanager-app-autopilot/498319/ is one of the impacted jobs

The following is the corresponding error message:
Traceback (most recent call last):
File "/home/phablet/autopilot/ubuntu_filemanager_app/tests/test_filemanager.py", line 585, in test_cut_file
folder_actions_popover.click_button('Paste 1 File')
File "/home/phablet/autopilot/ubuntu_filemanager_app/emulators.py", line 237, in click_button
'Button with text "{0}" not found.'.format(text))
ValueError: Button with text "Paste 1 File" not found.

Steps:
1. Open filemanager app
2. Crate a folder in the home directory (call it 'tempfoler')
3. Create a file in the home directory (though there is no explicit option for this, you could do it by connecting to a host and doing 'touch tempfile')
4. Now hold and press on the 'tempfile' until popover options are available. Select 'Cut'
5. Now open 'tempfolder' created in step 2
6. Try to past the cut file, 'tempfile' by choosing 'Actions' in the folder toolbar at the bottom.
7. It could be noticed that there is no 'Paste' option available

Related branches

Para Siva (psivaa) on 2013-10-23
description: updated
Changed in ubuntu-filemanager-app:
status: New → Confirmed
importance: Undecided → Medium
Changed in ubuntu-filemanager-app:
assignee: nobody → Carlos Jose Mazieri (carlos-mazieri)
Changed in ubuntu-filemanager-app:
importance: Medium → Critical
Changed in ubuntu-filemanager-app:
status: Confirmed → Triaged
importance: Critical → High
Nicholas Skaggs (nskaggs) wrote :

Carlos, here is a log demonstrating the issue:

http://paste.ubuntu.com/6325809/

Nicholas Skaggs (nskaggs) wrote :

I ran that on my phone and it is showing the clipboard is not populated.

Nicholas Skaggs (nskaggs) wrote :

Please re-enable

test_copy_directory
test_cut_file
test_cut_directory
test_copy_file

as part of the merge that fixes this issue.

Is this also failing on Desktop?

if not, perhaps it is due to Qt clipboard handling has some relationship with X11 and it is not present on devices.

Are you able to build and run a file manager regression test on the device? (it is necessary to use some cross compiling)
if so try:
                  bzr push lp:ubuntu-filemanager-app/plugin
                  qmake test_folderlistmodel/regression/regression_folderlistmodel.pro
                  make
                  copy the binary to device and run it

Nicholas Skaggs (nskaggs) wrote :

Carlos, it is not failing on the desktop, it works on the desktop. i can try using the phone with the old surfaceflinger instead of Mir if you wish to try and debug the issue. I'll also run what you are suggesting and report back.

Hi Nicholas,

I think that lacks interface implementation between Qt and the
platform. As you work for Cannonical you can report that.

For clipboard when there is X11, Qt uses X11 clipboard storage, so
Ubuntu File manager can copy/paste among several file managers on
Desktop Linux.
So when using Qt in a embedded platform without X11 it is necessary to
look at QClipboard and see if it needs some extra implementation.

It looks like QClipboard does not emit the signal when the clipboard
changes. On Desktop for instance you can copy on nautilus and Ubuntu
file manager detects that by receiving this signal from Qt, so the
file manager will enable paste menu. I can work around this by sending
this signal myself, but I am afraid we will loose inter-application
clipboard communication.

Can you tell me if there is any compiler directive on Qt saying if it
is using MIR/X11 or Wayland?

Thanks,
Carlos

On 10/30/13, Nicholas Skaggs <email address hidden> wrote:
> Carlos, it is not failing on the desktop, it works on the desktop. i can
> try using the phone with the old surfaceflinger instead of Mir if you
> wish to try and debug the issue. I'll also run what you are suggesting
> and report back.
>
> --
> You received this bug notification because you are a bug assignee.
> Matching subscriptions: File Manager App Bugmail
> https://bugs.launchpad.net/bugs/1243854
>
> Title:
> Paste option is not available in folder_actions_popover
>
> Status in File Manager application for Ubuntu devices:
> Triaged
>
> Bug description:
> Only 'Properties' and 'Create New Folder' options are available in the
> Actions popover of folder toolbar at the moment (with trusty image 3)
> and this is making some smoke tests fail.
>
>
> http://reports.qa.ubuntu.com/smokeng/trusty/touch/maguro/3:20131022.1:20131015/4792
> /ubuntu-filemanager-app-autopilot/498319/ is one of the impacted jobs
>
> The following is the corresponding error message:
> Traceback (most recent call last):
> File
> "/home/phablet/autopilot/ubuntu_filemanager_app/tests/test_filemanager.py",
> line 585, in test_cut_file
> folder_actions_popover.click_button('Paste 1 File')
> File "/home/phablet/autopilot/ubuntu_filemanager_app/emulators.py", line
> 237, in click_button
> 'Button with text "{0}" not found.'.format(text))
> ValueError: Button with text "Paste 1 File" not found.
>
> Steps:
> 1. Open filemanager app
> 2. Crate a folder in the home directory (call it 'tempfoler')
> 3. Create a file in the home directory (though there is no explicit option
> for this, you could do it by connecting to a host and doing 'touch
> tempfile')
> 4. Now hold and press on the 'tempfile' until popover options are
> available. Select 'Cut'
> 5. Now open 'tempfolder' created in step 2
> 6. Try to past the cut file, 'tempfile' by choosing 'Actions' in the
> folder toolbar at the bottom.
> 7. It could be noticed that there is no 'Paste' option available
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1243854/+subscriptions
>

The problem here is that Qt's QClipboard class does not work as expected in the Ubuntu Touch platform, it does not give notification about clipboard changes as clipboard is expected to work across applications, even it looks like does not storage clipboard data.

File manager plugin is already ready to work with its own clipboard data in cases like that, a similar problem was found some time ago when testing in Nemo Mobile emulator, the merge proposal below just enables its own cliboard data which is already in place.

mege proposal: https://code.launchpad.net/~ubuntu-filemanager-dev/ubuntu-filemanager-app/plugin/+activereviews

Nicholas Skaggs (nskaggs) wrote :

Carlos, thanks for the info on the QClipboard class. Let's try and get a concise bug opened for it. I guess we'll file against the platform sdk and go from there.

Bug is here:
https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1247880

Fix committed into lp:ubuntu-filemanager-app/plugin at revision 38, scheduled for release in ubuntu-filemanager-app, milestone Unknown

Changed in ubuntu-filemanager-app:
status: Triaged → Fix Committed
Changed in ubuntu-filemanager-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers