Konqueror bugfixorama:
- Don't get confused by files and directories containing wildcard characters (such as "[" and "]") - Fix usage of wildcards in the location bar in filemanager mode - Unmount CD-ROM devices before ejecting them. Approved by: portmgr (linimon)
This commit is contained in:
parent
86aed5fe8a
commit
d3877038ff
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140799
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= kdebase
|
||||
PORTVERSION= ${KDE_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11 kde
|
||||
MASTER_SITES= ${MASTER_SITE_KDE}
|
||||
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
|
||||
|
@ -0,0 +1,56 @@
|
||||
--- kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp.orig Sat Aug 6 01:48:21 2005
|
||||
+++ kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp Sat Aug 6 01:58:48 2005
|
||||
@@ -216,6 +216,7 @@
|
||||
QString path;
|
||||
QString ref;
|
||||
QString query;
|
||||
+ QString nameFilter;
|
||||
|
||||
if (KURL::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
|
||||
path = cmd;
|
||||
@@ -228,7 +229,8 @@
|
||||
// but not for "/tmp/a#b", if "a#b" is an existing file,
|
||||
// or for "/tmp/a?b" (#58990)
|
||||
if ( ( url.hasRef() || !url.query().isEmpty() ) // avoid the calling exists() when not needed
|
||||
- && QFile::exists(url.path()) )
|
||||
+ && QFile::exists(url.path())
|
||||
+ && !url.path().endsWith(QFL1("/")) ) // /tmp/?foo is a namefilter, not a query
|
||||
{
|
||||
path = url.path();
|
||||
ref = url.ref();
|
||||
@@ -338,6 +340,24 @@
|
||||
if( isLocalFullPath && !exists )
|
||||
{
|
||||
exists = ( stat( QFile::encodeName(path).data() , &buff ) == 0 );
|
||||
+ if ( !exists ) {
|
||||
+ // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter
|
||||
+ // If the app using this filter doesn't support it, well, it'll simply error out itself
|
||||
+ int lastSlash = path.findRev( '/' );
|
||||
+ if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
|
||||
+ {
|
||||
+ QString fileName = path.mid( lastSlash + 1 );
|
||||
+ QString testPath = path.left( lastSlash + 1 );
|
||||
+ if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
+ && stat( QFile::encodeName(testPath).data(), &buff ) == 0 )
|
||||
+ {
|
||||
+ nameFilter = fileName;
|
||||
+ kdDebug() << "Setting nameFilter to " << nameFilter << endl;
|
||||
+ path = testPath;
|
||||
+ exists = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
//kdDebug() << "path =" << path << " isLocalFullPath=" << isLocalFullPath << " exists=" << exists << endl;
|
||||
@@ -370,7 +390,9 @@
|
||||
// Open "uri" as file:/xxx if it is a non-executable local resource.
|
||||
if( isDir || S_ISREG( buff.st_mode ) )
|
||||
{
|
||||
- //kdDebug() << "Abs path as local file" << endl;
|
||||
+ //kdDebug() << "Abs path as local file or directory" << endl;
|
||||
+ if ( !nameFilter.isEmpty() )
|
||||
+ u.setFileName( nameFilter );
|
||||
setFilteredURI( data, u );
|
||||
setURIType( data, ( isDir ) ? KURIFilterData::LOCAL_DIR : KURIFilterData::LOCAL_FILE );
|
||||
return true;
|
@ -0,0 +1,22 @@
|
||||
--- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Fri Aug 5 14:26:27 2005
|
||||
+++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Fri Aug 5 14:27:25 2005
|
||||
@@ -79,7 +79,7 @@
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
}
|
||||
- else if (args->isSet("s"))
|
||||
+ else if (args->isSet("s") || args->isSet("e"))
|
||||
{
|
||||
if (medium.isMounted())
|
||||
{
|
||||
@@ -93,10 +93,6 @@
|
||||
{
|
||||
invokeEject(device, true);
|
||||
}
|
||||
- }
|
||||
- else if (args->isSet("e"))
|
||||
- {
|
||||
- invokeEject(device);
|
||||
}
|
||||
else
|
||||
{
|
19
x11/kde4-baseapps/files/patch-konqueror_konq_mainwindow.cc
Normal file
19
x11/kde4-baseapps/files/patch-konqueror_konq_mainwindow.cc
Normal file
@ -0,0 +1,19 @@
|
||||
--- konqueror/konq_mainwindow.cc.orig Wed Jul 20 12:04:01 2005
|
||||
+++ konqueror/konq_mainwindow.cc Sat Aug 6 00:20:37 2005
|
||||
@@ -98,6 +98,7 @@
|
||||
#include <kiconloader.h>
|
||||
#include <kpopupmenu.h>
|
||||
#include <kprocess.h>
|
||||
+#include <kio/netaccess.h>
|
||||
#include <kio/scheduler.h>
|
||||
#include <kaccelmanager.h>
|
||||
#include <kuser.h>
|
||||
@@ -428,7 +429,7 @@
|
||||
QString fileName = path.mid( lastSlash + 1 );
|
||||
QString testPath = path.left( lastSlash + 1 );
|
||||
if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
- && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
|
||||
+ && ( !url.isLocalFile() || QFile::exists( testPath ) ) && !KIO::NetAccess::exists( url, true ) )
|
||||
{
|
||||
nameFilter = fileName;
|
||||
url.setFileName( QString::null );
|
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= kdebase
|
||||
PORTVERSION= ${KDE_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11 kde
|
||||
MASTER_SITES= ${MASTER_SITE_KDE}
|
||||
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
|
||||
|
@ -0,0 +1,56 @@
|
||||
--- kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp.orig Sat Aug 6 01:48:21 2005
|
||||
+++ kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp Sat Aug 6 01:58:48 2005
|
||||
@@ -216,6 +216,7 @@
|
||||
QString path;
|
||||
QString ref;
|
||||
QString query;
|
||||
+ QString nameFilter;
|
||||
|
||||
if (KURL::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
|
||||
path = cmd;
|
||||
@@ -228,7 +229,8 @@
|
||||
// but not for "/tmp/a#b", if "a#b" is an existing file,
|
||||
// or for "/tmp/a?b" (#58990)
|
||||
if ( ( url.hasRef() || !url.query().isEmpty() ) // avoid the calling exists() when not needed
|
||||
- && QFile::exists(url.path()) )
|
||||
+ && QFile::exists(url.path())
|
||||
+ && !url.path().endsWith(QFL1("/")) ) // /tmp/?foo is a namefilter, not a query
|
||||
{
|
||||
path = url.path();
|
||||
ref = url.ref();
|
||||
@@ -338,6 +340,24 @@
|
||||
if( isLocalFullPath && !exists )
|
||||
{
|
||||
exists = ( stat( QFile::encodeName(path).data() , &buff ) == 0 );
|
||||
+ if ( !exists ) {
|
||||
+ // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter
|
||||
+ // If the app using this filter doesn't support it, well, it'll simply error out itself
|
||||
+ int lastSlash = path.findRev( '/' );
|
||||
+ if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
|
||||
+ {
|
||||
+ QString fileName = path.mid( lastSlash + 1 );
|
||||
+ QString testPath = path.left( lastSlash + 1 );
|
||||
+ if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
+ && stat( QFile::encodeName(testPath).data(), &buff ) == 0 )
|
||||
+ {
|
||||
+ nameFilter = fileName;
|
||||
+ kdDebug() << "Setting nameFilter to " << nameFilter << endl;
|
||||
+ path = testPath;
|
||||
+ exists = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
//kdDebug() << "path =" << path << " isLocalFullPath=" << isLocalFullPath << " exists=" << exists << endl;
|
||||
@@ -370,7 +390,9 @@
|
||||
// Open "uri" as file:/xxx if it is a non-executable local resource.
|
||||
if( isDir || S_ISREG( buff.st_mode ) )
|
||||
{
|
||||
- //kdDebug() << "Abs path as local file" << endl;
|
||||
+ //kdDebug() << "Abs path as local file or directory" << endl;
|
||||
+ if ( !nameFilter.isEmpty() )
|
||||
+ u.setFileName( nameFilter );
|
||||
setFilteredURI( data, u );
|
||||
setURIType( data, ( isDir ) ? KURIFilterData::LOCAL_DIR : KURIFilterData::LOCAL_FILE );
|
||||
return true;
|
@ -0,0 +1,22 @@
|
||||
--- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Fri Aug 5 14:26:27 2005
|
||||
+++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Fri Aug 5 14:27:25 2005
|
||||
@@ -79,7 +79,7 @@
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
}
|
||||
- else if (args->isSet("s"))
|
||||
+ else if (args->isSet("s") || args->isSet("e"))
|
||||
{
|
||||
if (medium.isMounted())
|
||||
{
|
||||
@@ -93,10 +93,6 @@
|
||||
{
|
||||
invokeEject(device, true);
|
||||
}
|
||||
- }
|
||||
- else if (args->isSet("e"))
|
||||
- {
|
||||
- invokeEject(device);
|
||||
}
|
||||
else
|
||||
{
|
19
x11/kde4-runtime/files/patch-konqueror_konq_mainwindow.cc
Normal file
19
x11/kde4-runtime/files/patch-konqueror_konq_mainwindow.cc
Normal file
@ -0,0 +1,19 @@
|
||||
--- konqueror/konq_mainwindow.cc.orig Wed Jul 20 12:04:01 2005
|
||||
+++ konqueror/konq_mainwindow.cc Sat Aug 6 00:20:37 2005
|
||||
@@ -98,6 +98,7 @@
|
||||
#include <kiconloader.h>
|
||||
#include <kpopupmenu.h>
|
||||
#include <kprocess.h>
|
||||
+#include <kio/netaccess.h>
|
||||
#include <kio/scheduler.h>
|
||||
#include <kaccelmanager.h>
|
||||
#include <kuser.h>
|
||||
@@ -428,7 +429,7 @@
|
||||
QString fileName = path.mid( lastSlash + 1 );
|
||||
QString testPath = path.left( lastSlash + 1 );
|
||||
if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
- && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
|
||||
+ && ( !url.isLocalFile() || QFile::exists( testPath ) ) && !KIO::NetAccess::exists( url, true ) )
|
||||
{
|
||||
nameFilter = fileName;
|
||||
url.setFileName( QString::null );
|
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= kdebase
|
||||
PORTVERSION= ${KDE_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11 kde
|
||||
MASTER_SITES= ${MASTER_SITE_KDE}
|
||||
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
|
||||
|
@ -0,0 +1,56 @@
|
||||
--- kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp.orig Sat Aug 6 01:48:21 2005
|
||||
+++ kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp Sat Aug 6 01:58:48 2005
|
||||
@@ -216,6 +216,7 @@
|
||||
QString path;
|
||||
QString ref;
|
||||
QString query;
|
||||
+ QString nameFilter;
|
||||
|
||||
if (KURL::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
|
||||
path = cmd;
|
||||
@@ -228,7 +229,8 @@
|
||||
// but not for "/tmp/a#b", if "a#b" is an existing file,
|
||||
// or for "/tmp/a?b" (#58990)
|
||||
if ( ( url.hasRef() || !url.query().isEmpty() ) // avoid the calling exists() when not needed
|
||||
- && QFile::exists(url.path()) )
|
||||
+ && QFile::exists(url.path())
|
||||
+ && !url.path().endsWith(QFL1("/")) ) // /tmp/?foo is a namefilter, not a query
|
||||
{
|
||||
path = url.path();
|
||||
ref = url.ref();
|
||||
@@ -338,6 +340,24 @@
|
||||
if( isLocalFullPath && !exists )
|
||||
{
|
||||
exists = ( stat( QFile::encodeName(path).data() , &buff ) == 0 );
|
||||
+ if ( !exists ) {
|
||||
+ // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter
|
||||
+ // If the app using this filter doesn't support it, well, it'll simply error out itself
|
||||
+ int lastSlash = path.findRev( '/' );
|
||||
+ if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
|
||||
+ {
|
||||
+ QString fileName = path.mid( lastSlash + 1 );
|
||||
+ QString testPath = path.left( lastSlash + 1 );
|
||||
+ if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
+ && stat( QFile::encodeName(testPath).data(), &buff ) == 0 )
|
||||
+ {
|
||||
+ nameFilter = fileName;
|
||||
+ kdDebug() << "Setting nameFilter to " << nameFilter << endl;
|
||||
+ path = testPath;
|
||||
+ exists = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
//kdDebug() << "path =" << path << " isLocalFullPath=" << isLocalFullPath << " exists=" << exists << endl;
|
||||
@@ -370,7 +390,9 @@
|
||||
// Open "uri" as file:/xxx if it is a non-executable local resource.
|
||||
if( isDir || S_ISREG( buff.st_mode ) )
|
||||
{
|
||||
- //kdDebug() << "Abs path as local file" << endl;
|
||||
+ //kdDebug() << "Abs path as local file or directory" << endl;
|
||||
+ if ( !nameFilter.isEmpty() )
|
||||
+ u.setFileName( nameFilter );
|
||||
setFilteredURI( data, u );
|
||||
setURIType( data, ( isDir ) ? KURIFilterData::LOCAL_DIR : KURIFilterData::LOCAL_FILE );
|
||||
return true;
|
@ -0,0 +1,22 @@
|
||||
--- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Fri Aug 5 14:26:27 2005
|
||||
+++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Fri Aug 5 14:27:25 2005
|
||||
@@ -79,7 +79,7 @@
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
}
|
||||
- else if (args->isSet("s"))
|
||||
+ else if (args->isSet("s") || args->isSet("e"))
|
||||
{
|
||||
if (medium.isMounted())
|
||||
{
|
||||
@@ -93,10 +93,6 @@
|
||||
{
|
||||
invokeEject(device, true);
|
||||
}
|
||||
- }
|
||||
- else if (args->isSet("e"))
|
||||
- {
|
||||
- invokeEject(device);
|
||||
}
|
||||
else
|
||||
{
|
19
x11/kde4-workspace/files/patch-konqueror_konq_mainwindow.cc
Normal file
19
x11/kde4-workspace/files/patch-konqueror_konq_mainwindow.cc
Normal file
@ -0,0 +1,19 @@
|
||||
--- konqueror/konq_mainwindow.cc.orig Wed Jul 20 12:04:01 2005
|
||||
+++ konqueror/konq_mainwindow.cc Sat Aug 6 00:20:37 2005
|
||||
@@ -98,6 +98,7 @@
|
||||
#include <kiconloader.h>
|
||||
#include <kpopupmenu.h>
|
||||
#include <kprocess.h>
|
||||
+#include <kio/netaccess.h>
|
||||
#include <kio/scheduler.h>
|
||||
#include <kaccelmanager.h>
|
||||
#include <kuser.h>
|
||||
@@ -428,7 +429,7 @@
|
||||
QString fileName = path.mid( lastSlash + 1 );
|
||||
QString testPath = path.left( lastSlash + 1 );
|
||||
if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
- && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
|
||||
+ && ( !url.isLocalFile() || QFile::exists( testPath ) ) && !KIO::NetAccess::exists( url, true ) )
|
||||
{
|
||||
nameFilter = fileName;
|
||||
url.setFileName( QString::null );
|
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= kdebase
|
||||
PORTVERSION= ${KDE_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11 kde
|
||||
MASTER_SITES= ${MASTER_SITE_KDE}
|
||||
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
|
||||
|
@ -0,0 +1,56 @@
|
||||
--- kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp.orig Sat Aug 6 01:48:21 2005
|
||||
+++ kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp Sat Aug 6 01:58:48 2005
|
||||
@@ -216,6 +216,7 @@
|
||||
QString path;
|
||||
QString ref;
|
||||
QString query;
|
||||
+ QString nameFilter;
|
||||
|
||||
if (KURL::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
|
||||
path = cmd;
|
||||
@@ -228,7 +229,8 @@
|
||||
// but not for "/tmp/a#b", if "a#b" is an existing file,
|
||||
// or for "/tmp/a?b" (#58990)
|
||||
if ( ( url.hasRef() || !url.query().isEmpty() ) // avoid the calling exists() when not needed
|
||||
- && QFile::exists(url.path()) )
|
||||
+ && QFile::exists(url.path())
|
||||
+ && !url.path().endsWith(QFL1("/")) ) // /tmp/?foo is a namefilter, not a query
|
||||
{
|
||||
path = url.path();
|
||||
ref = url.ref();
|
||||
@@ -338,6 +340,24 @@
|
||||
if( isLocalFullPath && !exists )
|
||||
{
|
||||
exists = ( stat( QFile::encodeName(path).data() , &buff ) == 0 );
|
||||
+ if ( !exists ) {
|
||||
+ // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter
|
||||
+ // If the app using this filter doesn't support it, well, it'll simply error out itself
|
||||
+ int lastSlash = path.findRev( '/' );
|
||||
+ if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
|
||||
+ {
|
||||
+ QString fileName = path.mid( lastSlash + 1 );
|
||||
+ QString testPath = path.left( lastSlash + 1 );
|
||||
+ if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
+ && stat( QFile::encodeName(testPath).data(), &buff ) == 0 )
|
||||
+ {
|
||||
+ nameFilter = fileName;
|
||||
+ kdDebug() << "Setting nameFilter to " << nameFilter << endl;
|
||||
+ path = testPath;
|
||||
+ exists = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
//kdDebug() << "path =" << path << " isLocalFullPath=" << isLocalFullPath << " exists=" << exists << endl;
|
||||
@@ -370,7 +390,9 @@
|
||||
// Open "uri" as file:/xxx if it is a non-executable local resource.
|
||||
if( isDir || S_ISREG( buff.st_mode ) )
|
||||
{
|
||||
- //kdDebug() << "Abs path as local file" << endl;
|
||||
+ //kdDebug() << "Abs path as local file or directory" << endl;
|
||||
+ if ( !nameFilter.isEmpty() )
|
||||
+ u.setFileName( nameFilter );
|
||||
setFilteredURI( data, u );
|
||||
setURIType( data, ( isDir ) ? KURIFilterData::LOCAL_DIR : KURIFilterData::LOCAL_FILE );
|
||||
return true;
|
@ -0,0 +1,22 @@
|
||||
--- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Fri Aug 5 14:26:27 2005
|
||||
+++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Fri Aug 5 14:27:25 2005
|
||||
@@ -79,7 +79,7 @@
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
}
|
||||
- else if (args->isSet("s"))
|
||||
+ else if (args->isSet("s") || args->isSet("e"))
|
||||
{
|
||||
if (medium.isMounted())
|
||||
{
|
||||
@@ -93,10 +93,6 @@
|
||||
{
|
||||
invokeEject(device, true);
|
||||
}
|
||||
- }
|
||||
- else if (args->isSet("e"))
|
||||
- {
|
||||
- invokeEject(device);
|
||||
}
|
||||
else
|
||||
{
|
19
x11/kdebase3/files/patch-konqueror_konq_mainwindow.cc
Normal file
19
x11/kdebase3/files/patch-konqueror_konq_mainwindow.cc
Normal file
@ -0,0 +1,19 @@
|
||||
--- konqueror/konq_mainwindow.cc.orig Wed Jul 20 12:04:01 2005
|
||||
+++ konqueror/konq_mainwindow.cc Sat Aug 6 00:20:37 2005
|
||||
@@ -98,6 +98,7 @@
|
||||
#include <kiconloader.h>
|
||||
#include <kpopupmenu.h>
|
||||
#include <kprocess.h>
|
||||
+#include <kio/netaccess.h>
|
||||
#include <kio/scheduler.h>
|
||||
#include <kaccelmanager.h>
|
||||
#include <kuser.h>
|
||||
@@ -428,7 +429,7 @@
|
||||
QString fileName = path.mid( lastSlash + 1 );
|
||||
QString testPath = path.left( lastSlash + 1 );
|
||||
if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
- && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
|
||||
+ && ( !url.isLocalFile() || QFile::exists( testPath ) ) && !KIO::NetAccess::exists( url, true ) )
|
||||
{
|
||||
nameFilter = fileName;
|
||||
url.setFileName( QString::null );
|
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= kdebase
|
||||
PORTVERSION= ${KDE_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11 kde
|
||||
MASTER_SITES= ${MASTER_SITE_KDE}
|
||||
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
|
||||
|
@ -0,0 +1,56 @@
|
||||
--- kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp.orig Sat Aug 6 01:48:21 2005
|
||||
+++ kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp Sat Aug 6 01:58:48 2005
|
||||
@@ -216,6 +216,7 @@
|
||||
QString path;
|
||||
QString ref;
|
||||
QString query;
|
||||
+ QString nameFilter;
|
||||
|
||||
if (KURL::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
|
||||
path = cmd;
|
||||
@@ -228,7 +229,8 @@
|
||||
// but not for "/tmp/a#b", if "a#b" is an existing file,
|
||||
// or for "/tmp/a?b" (#58990)
|
||||
if ( ( url.hasRef() || !url.query().isEmpty() ) // avoid the calling exists() when not needed
|
||||
- && QFile::exists(url.path()) )
|
||||
+ && QFile::exists(url.path())
|
||||
+ && !url.path().endsWith(QFL1("/")) ) // /tmp/?foo is a namefilter, not a query
|
||||
{
|
||||
path = url.path();
|
||||
ref = url.ref();
|
||||
@@ -338,6 +340,24 @@
|
||||
if( isLocalFullPath && !exists )
|
||||
{
|
||||
exists = ( stat( QFile::encodeName(path).data() , &buff ) == 0 );
|
||||
+ if ( !exists ) {
|
||||
+ // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter
|
||||
+ // If the app using this filter doesn't support it, well, it'll simply error out itself
|
||||
+ int lastSlash = path.findRev( '/' );
|
||||
+ if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
|
||||
+ {
|
||||
+ QString fileName = path.mid( lastSlash + 1 );
|
||||
+ QString testPath = path.left( lastSlash + 1 );
|
||||
+ if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
+ && stat( QFile::encodeName(testPath).data(), &buff ) == 0 )
|
||||
+ {
|
||||
+ nameFilter = fileName;
|
||||
+ kdDebug() << "Setting nameFilter to " << nameFilter << endl;
|
||||
+ path = testPath;
|
||||
+ exists = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
//kdDebug() << "path =" << path << " isLocalFullPath=" << isLocalFullPath << " exists=" << exists << endl;
|
||||
@@ -370,7 +390,9 @@
|
||||
// Open "uri" as file:/xxx if it is a non-executable local resource.
|
||||
if( isDir || S_ISREG( buff.st_mode ) )
|
||||
{
|
||||
- //kdDebug() << "Abs path as local file" << endl;
|
||||
+ //kdDebug() << "Abs path as local file or directory" << endl;
|
||||
+ if ( !nameFilter.isEmpty() )
|
||||
+ u.setFileName( nameFilter );
|
||||
setFilteredURI( data, u );
|
||||
setURIType( data, ( isDir ) ? KURIFilterData::LOCAL_DIR : KURIFilterData::LOCAL_FILE );
|
||||
return true;
|
@ -0,0 +1,22 @@
|
||||
--- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Fri Aug 5 14:26:27 2005
|
||||
+++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Fri Aug 5 14:27:25 2005
|
||||
@@ -79,7 +79,7 @@
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
}
|
||||
- else if (args->isSet("s"))
|
||||
+ else if (args->isSet("s") || args->isSet("e"))
|
||||
{
|
||||
if (medium.isMounted())
|
||||
{
|
||||
@@ -93,10 +93,6 @@
|
||||
{
|
||||
invokeEject(device, true);
|
||||
}
|
||||
- }
|
||||
- else if (args->isSet("e"))
|
||||
- {
|
||||
- invokeEject(device);
|
||||
}
|
||||
else
|
||||
{
|
@ -0,0 +1,19 @@
|
||||
--- konqueror/konq_mainwindow.cc.orig Wed Jul 20 12:04:01 2005
|
||||
+++ konqueror/konq_mainwindow.cc Sat Aug 6 00:20:37 2005
|
||||
@@ -98,6 +98,7 @@
|
||||
#include <kiconloader.h>
|
||||
#include <kpopupmenu.h>
|
||||
#include <kprocess.h>
|
||||
+#include <kio/netaccess.h>
|
||||
#include <kio/scheduler.h>
|
||||
#include <kaccelmanager.h>
|
||||
#include <kuser.h>
|
||||
@@ -428,7 +429,7 @@
|
||||
QString fileName = path.mid( lastSlash + 1 );
|
||||
QString testPath = path.left( lastSlash + 1 );
|
||||
if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
- && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
|
||||
+ && ( !url.isLocalFile() || QFile::exists( testPath ) ) && !KIO::NetAccess::exists( url, true ) )
|
||||
{
|
||||
nameFilter = fileName;
|
||||
url.setFileName( QString::null );
|
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= kdebase
|
||||
PORTVERSION= ${KDE_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11 kde
|
||||
MASTER_SITES= ${MASTER_SITE_KDE}
|
||||
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
|
||||
|
@ -0,0 +1,56 @@
|
||||
--- kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp.orig Sat Aug 6 01:48:21 2005
|
||||
+++ kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp Sat Aug 6 01:58:48 2005
|
||||
@@ -216,6 +216,7 @@
|
||||
QString path;
|
||||
QString ref;
|
||||
QString query;
|
||||
+ QString nameFilter;
|
||||
|
||||
if (KURL::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
|
||||
path = cmd;
|
||||
@@ -228,7 +229,8 @@
|
||||
// but not for "/tmp/a#b", if "a#b" is an existing file,
|
||||
// or for "/tmp/a?b" (#58990)
|
||||
if ( ( url.hasRef() || !url.query().isEmpty() ) // avoid the calling exists() when not needed
|
||||
- && QFile::exists(url.path()) )
|
||||
+ && QFile::exists(url.path())
|
||||
+ && !url.path().endsWith(QFL1("/")) ) // /tmp/?foo is a namefilter, not a query
|
||||
{
|
||||
path = url.path();
|
||||
ref = url.ref();
|
||||
@@ -338,6 +340,24 @@
|
||||
if( isLocalFullPath && !exists )
|
||||
{
|
||||
exists = ( stat( QFile::encodeName(path).data() , &buff ) == 0 );
|
||||
+ if ( !exists ) {
|
||||
+ // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter
|
||||
+ // If the app using this filter doesn't support it, well, it'll simply error out itself
|
||||
+ int lastSlash = path.findRev( '/' );
|
||||
+ if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
|
||||
+ {
|
||||
+ QString fileName = path.mid( lastSlash + 1 );
|
||||
+ QString testPath = path.left( lastSlash + 1 );
|
||||
+ if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
+ && stat( QFile::encodeName(testPath).data(), &buff ) == 0 )
|
||||
+ {
|
||||
+ nameFilter = fileName;
|
||||
+ kdDebug() << "Setting nameFilter to " << nameFilter << endl;
|
||||
+ path = testPath;
|
||||
+ exists = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
//kdDebug() << "path =" << path << " isLocalFullPath=" << isLocalFullPath << " exists=" << exists << endl;
|
||||
@@ -370,7 +390,9 @@
|
||||
// Open "uri" as file:/xxx if it is a non-executable local resource.
|
||||
if( isDir || S_ISREG( buff.st_mode ) )
|
||||
{
|
||||
- //kdDebug() << "Abs path as local file" << endl;
|
||||
+ //kdDebug() << "Abs path as local file or directory" << endl;
|
||||
+ if ( !nameFilter.isEmpty() )
|
||||
+ u.setFileName( nameFilter );
|
||||
setFilteredURI( data, u );
|
||||
setURIType( data, ( isDir ) ? KURIFilterData::LOCAL_DIR : KURIFilterData::LOCAL_FILE );
|
||||
return true;
|
@ -0,0 +1,22 @@
|
||||
--- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Fri Aug 5 14:26:27 2005
|
||||
+++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Fri Aug 5 14:27:25 2005
|
||||
@@ -79,7 +79,7 @@
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
}
|
||||
- else if (args->isSet("s"))
|
||||
+ else if (args->isSet("s") || args->isSet("e"))
|
||||
{
|
||||
if (medium.isMounted())
|
||||
{
|
||||
@@ -93,10 +93,6 @@
|
||||
{
|
||||
invokeEject(device, true);
|
||||
}
|
||||
- }
|
||||
- else if (args->isSet("e"))
|
||||
- {
|
||||
- invokeEject(device);
|
||||
}
|
||||
else
|
||||
{
|
@ -0,0 +1,19 @@
|
||||
--- konqueror/konq_mainwindow.cc.orig Wed Jul 20 12:04:01 2005
|
||||
+++ konqueror/konq_mainwindow.cc Sat Aug 6 00:20:37 2005
|
||||
@@ -98,6 +98,7 @@
|
||||
#include <kiconloader.h>
|
||||
#include <kpopupmenu.h>
|
||||
#include <kprocess.h>
|
||||
+#include <kio/netaccess.h>
|
||||
#include <kio/scheduler.h>
|
||||
#include <kaccelmanager.h>
|
||||
#include <kuser.h>
|
||||
@@ -428,7 +429,7 @@
|
||||
QString fileName = path.mid( lastSlash + 1 );
|
||||
QString testPath = path.left( lastSlash + 1 );
|
||||
if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
- && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
|
||||
+ && ( !url.isLocalFile() || QFile::exists( testPath ) ) && !KIO::NetAccess::exists( url, true ) )
|
||||
{
|
||||
nameFilter = fileName;
|
||||
url.setFileName( QString::null );
|
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= kdebase
|
||||
PORTVERSION= ${KDE_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11 kde
|
||||
MASTER_SITES= ${MASTER_SITE_KDE}
|
||||
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
|
||||
|
@ -0,0 +1,56 @@
|
||||
--- kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp.orig Sat Aug 6 01:48:21 2005
|
||||
+++ kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp Sat Aug 6 01:58:48 2005
|
||||
@@ -216,6 +216,7 @@
|
||||
QString path;
|
||||
QString ref;
|
||||
QString query;
|
||||
+ QString nameFilter;
|
||||
|
||||
if (KURL::isRelativeURL(cmd) && QDir::isRelativePath(cmd)) {
|
||||
path = cmd;
|
||||
@@ -228,7 +229,8 @@
|
||||
// but not for "/tmp/a#b", if "a#b" is an existing file,
|
||||
// or for "/tmp/a?b" (#58990)
|
||||
if ( ( url.hasRef() || !url.query().isEmpty() ) // avoid the calling exists() when not needed
|
||||
- && QFile::exists(url.path()) )
|
||||
+ && QFile::exists(url.path())
|
||||
+ && !url.path().endsWith(QFL1("/")) ) // /tmp/?foo is a namefilter, not a query
|
||||
{
|
||||
path = url.path();
|
||||
ref = url.ref();
|
||||
@@ -338,6 +340,24 @@
|
||||
if( isLocalFullPath && !exists )
|
||||
{
|
||||
exists = ( stat( QFile::encodeName(path).data() , &buff ) == 0 );
|
||||
+ if ( !exists ) {
|
||||
+ // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter
|
||||
+ // If the app using this filter doesn't support it, well, it'll simply error out itself
|
||||
+ int lastSlash = path.findRev( '/' );
|
||||
+ if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
|
||||
+ {
|
||||
+ QString fileName = path.mid( lastSlash + 1 );
|
||||
+ QString testPath = path.left( lastSlash + 1 );
|
||||
+ if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
+ && stat( QFile::encodeName(testPath).data(), &buff ) == 0 )
|
||||
+ {
|
||||
+ nameFilter = fileName;
|
||||
+ kdDebug() << "Setting nameFilter to " << nameFilter << endl;
|
||||
+ path = testPath;
|
||||
+ exists = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
//kdDebug() << "path =" << path << " isLocalFullPath=" << isLocalFullPath << " exists=" << exists << endl;
|
||||
@@ -370,7 +390,9 @@
|
||||
// Open "uri" as file:/xxx if it is a non-executable local resource.
|
||||
if( isDir || S_ISREG( buff.st_mode ) )
|
||||
{
|
||||
- //kdDebug() << "Abs path as local file" << endl;
|
||||
+ //kdDebug() << "Abs path as local file or directory" << endl;
|
||||
+ if ( !nameFilter.isEmpty() )
|
||||
+ u.setFileName( nameFilter );
|
||||
setFilteredURI( data, u );
|
||||
setURIType( data, ( isDir ) ? KURIFilterData::LOCAL_DIR : KURIFilterData::LOCAL_FILE );
|
||||
return true;
|
@ -0,0 +1,22 @@
|
||||
--- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Fri Aug 5 14:26:27 2005
|
||||
+++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Fri Aug 5 14:27:25 2005
|
||||
@@ -79,7 +79,7 @@
|
||||
connect( job, SIGNAL( result( KIO::Job * ) ),
|
||||
this, SLOT( slotResult( KIO::Job * ) ) );
|
||||
}
|
||||
- else if (args->isSet("s"))
|
||||
+ else if (args->isSet("s") || args->isSet("e"))
|
||||
{
|
||||
if (medium.isMounted())
|
||||
{
|
||||
@@ -93,10 +93,6 @@
|
||||
{
|
||||
invokeEject(device, true);
|
||||
}
|
||||
- }
|
||||
- else if (args->isSet("e"))
|
||||
- {
|
||||
- invokeEject(device);
|
||||
}
|
||||
else
|
||||
{
|
19
x11/kdebase4/files/patch-konqueror_konq_mainwindow.cc
Normal file
19
x11/kdebase4/files/patch-konqueror_konq_mainwindow.cc
Normal file
@ -0,0 +1,19 @@
|
||||
--- konqueror/konq_mainwindow.cc.orig Wed Jul 20 12:04:01 2005
|
||||
+++ konqueror/konq_mainwindow.cc Sat Aug 6 00:20:37 2005
|
||||
@@ -98,6 +98,7 @@
|
||||
#include <kiconloader.h>
|
||||
#include <kpopupmenu.h>
|
||||
#include <kprocess.h>
|
||||
+#include <kio/netaccess.h>
|
||||
#include <kio/scheduler.h>
|
||||
#include <kaccelmanager.h>
|
||||
#include <kuser.h>
|
||||
@@ -428,7 +429,7 @@
|
||||
QString fileName = path.mid( lastSlash + 1 );
|
||||
QString testPath = path.left( lastSlash + 1 );
|
||||
if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
|
||||
- && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
|
||||
+ && ( !url.isLocalFile() || QFile::exists( testPath ) ) && !KIO::NetAccess::exists( url, true ) )
|
||||
{
|
||||
nameFilter = fileName;
|
||||
url.setFileName( QString::null );
|
Loading…
Reference in New Issue
Block a user