[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeutils/ark
From:       Thiago Macieira <thiago () kde ! org>
Date:       2005-03-21 2:03:16
Message-ID: 20050321020316.2BB83EF06 () office ! kde ! org
[Download RAW message or body]

CVS commit by thiago: 

Fixing some of the URL-to-path hacks. There could still be some, but my
tests have worked so far.

Patch approved by maintainer. To be backported.
BUG:102014
BUG:102027


  M +1 -1      arkwidget.cpp   1.97
  M +5 -3      compressedfile.cpp   1.26


--- kdeutils/ark/arkwidget.cpp  #1.96:1.97
@@ -2308,5 +2308,5 @@ Arch * ArkWidget::getNewArchive( const Q
     Arch * newArch = 0;
 
-    QString type = KMimeType::findByURL( _fileName )->name();
+    QString type = KMimeType::findByURL( KURL::fromPathOrURL(_fileName) )->name();
     ArchType archtype = ArchiveFormatInfo::self()->archTypeForMimeType(type);
     kdDebug( 1601 ) << "archtype is recognised as: " << archtype << endl;

--- kdeutils/ark/compressedfile.cpp  #1.25:1.26
@@ -271,7 +271,9 @@ void CompressedFile::addFile( const QStr
   Q_ASSERT(urls.count() == 1);
 
-  QString file = urls.first();
-  if (file.left(5) == "file:")
-    file = file.right(file.length() - 5);
+  KURL url = KURL::fromPathOrURL(urls.first());
+  Q_ASSERT(url.isLocalFile());
+
+  QString file;
+  file = url.path();
 
   KProcess proc;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic