Am Sonntag, 27. August 2006 03:15 schrieb Enrico Forestieri:
> On Windows, LyX fails to open a file dropped from a shared drive, i.e.,
> from an explorer window whose path is something like \\host\path.
> 
> The attached patch fixes this. It took a while to understand that it
> was not me messing with paths in the cygwin port of Qt4 ;-)
> 
> -- 
> Enrico
> dragdrop.diff
>   Index: src/frontends/qt4/GuiWorkArea.C
> ===================================================================
> --- src/frontends/qt4/GuiWorkArea.C     (revision 14845)
> +++ src/frontends/qt4/GuiWorkArea.C     (working copy)
> @@ -221,7 +221,7 @@ void GuiWorkArea::dropEvent(QDropEvent* 
>  
>         lyxerr[Debug::GUI] << "GuiWorkArea::dropEvent: got URIs!" << 
endl;
>         for (int i = 0; i!=files.size(); ++i) {
> -               string const file = 
os::internal_path(fromqstr(files.at(i).toString()));
> +               string const file = 
os::internal_path(fromqstr(files.at(i).toLocalFile()));
>                 if (!file.empty())
>                         dispatch(FuncRequest(LFUN_FILE_OPEN, file));

How does toLocalFile format the string, and how does the result of toString 
look like?
I ask because LyX should be able to deal with \\host\path style paths, e.g. 
passing \\host\path as a command line argument should work as well. If 
that is not the case then we might need to fix it somewhere else.


Georg

Reply via email to