Bug 249864 - Can select arbitray file as data source for Account
Summary: Can select arbitray file as data source for Account
Status: VERIFIED FIXED
Alias: None
Product: KOrganizer Mobile
Classification: Applications
Component: tasks (show other bugs)
Version: unspecified
Platform: Windows CE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-02 11:26 UTC by Felix Wolfsteller
Modified: 2011-02-15 17:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Wolfsteller 2010-09-02 11:26:17 UTC
In the "Action" flap->"Accounts"->"Personal Calendar"->"Edit" arbitray files can be specified without feedback if vile is not a valid source.

This will remove the "Personal Calendar" folder from the main view.

Found in 4:4.5~20100902.1170752-1maemo1.1170522 .
Comment 1 Bertjan Broeksema 2010-10-06 18:36:41 UTC
I get a file dialog that is filtered by default on ICS/VCS. Do you have this as well? 

If not, that would be a bug, note though that I test this on a desktop computer (running korganizer-mobile of course).

I'm not sure how much sense it would make to disallow other files than those ending with .ics or .vcs. These might still be valid (either because they're new file or because they contain actually valid data).
Comment 2 Tobias Koenig 2010-11-29 13:42:34 UTC
Felix, any news?
Comment 3 Bjoern Ricks 2010-11-30 17:57:54 UTC
It's still possible to select ANY file with 4:4.6~20101130.1202227-1maemo1.1202030 on maemo. Somebody should test if it's the same on wince.
Comment 4 Andre Heinecke 2011-01-03 12:57:13 UTC
On Windows CE:
I get a dialog with a KUrlrequester  where i can type in the filename i would like.

- Hitting the folder selector i get an open file dialog with the All Files Filter.

Test 1:
 1. Select a random binary file / Change the name:
   - No Message
   - Everything looks like before
   - Name has not changed
 2. Synchronize all accounts:
   - Local Calendar is still shown (also not with the changed name)
   - Trying to edit the Account again does (or nothing is shown) (waited for 2 minutes) No hidden window in the background (checked with taskmanager)
     Trying to edit a kolab account brings up the correct dialog.
 3. Select Local Calendar and create a new appointment
   - Appointment is created
   - Selected binary file from step 1 is still existing
 4. Restarting KOrganizer
   - Nothing changed
 5. Restarting KOrganizer and Akonadi
   - Account is shown as ICal Calendar file
   - Edit dialog comes up again (But is frozen and then dissapears, maybe hidden would need to debug more what happens there if requested)
   - Calendar is still shown as Local Calendar instead of the modified name
   - Binary file is still valid and unmodified

Test 2:
   - Adding an ical account with a binary file chosen fails with timeout on creating ressource instance.
Comment 5 Tobias Koenig 2011-01-05 10:56:35 UTC
commit 36697fb1dab3fd2e1b550ba94807d30016720b38
branch master
Author: Tobias Koenig <tokoe@kde.org>
Date:   Wed Jan 5 10:58:45 2011 +0100

    Use explicit file extension filter on mobile
    
    In mobile mode the automatic expansion of mimetype aliases
    does not work for file extension filters, so set them explicitly.
    
    BUG: 249864

diff --git a/resources/ical/icalresourcebase.cpp b/resources/ical/icalresourcebase.cpp
index 860ef3f..0d18f06 100644
--- a/resources/ical/icalresourcebase.cpp
+++ b/resources/ical/icalresourcebase.cpp
@@ -78,7 +78,11 @@ void ICalResourceBase::aboutToQuit()
 
 void ICalResourceBase::customizeConfigDialog( SingleFileResourceConfigDialog<Settings> *dlg )
 {
+#ifndef KDEPIM_MOBILE_UI
   dlg->setFilter( "text/calendar" );
+#else
+  dlg->setFilter( "*.ics *.vcs" );
+#endif
   dlg->setCaption( i18n("Select Calendar") );
   dlg->setLocalFileOnly( true );
 }