diff -uNr qt3.orig/src/dialogs/qfiledialog.cpp qt3/src/dialogs/qfiledialog.cpp --- qt3.orig/src/dialogs/qfiledialog.cpp 2005-09-30 17:58:32.000000000 +0200 +++ qt3/src/dialogs/qfiledialog.cpp 2006-10-07 22:54:36.000000000 +0200 @@ -5732,6 +5732,17 @@ QString p = QDir::convertSeparators(u.path()); if(p.contains(':') == 1) return TRUE; +#elif defined(Q_OS_CYGWIN) + QString p = u.path(); + if ( p == "/" ) + return TRUE; + if ( p[0] == '/' && p[1] == '/' ) { + int slashes = p.contains( '/' ); + if ( slashes <= 2 ) + return TRUE; + if ( slashes == 3 && p[ (int)p.length() - 1 ] == '/' ) + return TRUE; + } #elif defined(Q_OS_UNIX) if ( u.path() == "/" ) return TRUE; diff -uNr qt3.orig/src/kernel/qurl.cpp qt3/src/kernel/qurl.cpp --- qt3.orig/src/kernel/qurl.cpp 2006-02-16 04:23:44.000000000 +0100 +++ qt3/src/kernel/qurl.cpp 2006-10-07 22:56:36.000000000 +0200 @@ -833,7 +833,7 @@ if ( !d->host.isEmpty() && d->host[ 0 ] == '@' ) d->host.remove( (uint)0, 1 ); -#if defined(Q_OS_WIN32) +#if defined(Q_OS_WIN32) || defined (Q_OS_CYGWIN) // hack for windows file://machine/path syntax if ( d->protocol == "file" ) { if ( url.left( 7 ) == "file://" && @@ -1027,7 +1027,7 @@ if ( QDir::isRelativePath( d->path ) ) { d->cleanPath = d->path; } else if ( isLocalFile() ) { -#if defined(Q_OS_WIN32) +#if defined(Q_OS_WIN32) || defined(Q_OS_CYGWIN) // hack for stuff like \\machine\path and //machine/path on windows if ( ( d->path.left( 1 ) == "/" || d->path.left( 1 ) == "\\" ) && d->path.length() > 1 ) { diff -uNr qt3.orig/src/tools/qdir.cpp qt3/src/tools/qdir.cpp --- qt3.orig/src/tools/qdir.cpp 2006-02-15 19:26:24.000000000 +0100 +++ qt3/src/tools/qdir.cpp 2006-10-07 23:00:02.000000000 +0200 @@ -1293,6 +1293,9 @@ } else { newPath = name.left(2) + newPath; } +#elif defined(Q_OS_CYGWIN) + if ( name[0] == '/' && name[1] == '/' ) // "//machine/x/ ..." + newPath.insert( 0, '/' ); #endif } return newPath;