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

List:       kde-commits
Subject:    KDE/kdevelop
From:       Adam Treat <treat () kde ! org>
Date:       2006-02-05 20:52:01
Message-ID: 1139172721.622784.4674.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 506143 by treat:

* Move away from kdevelop internal url API.  This
  removes any calls to URLUtil in trunk.  I'd like to
  remove urltutil.cpp altogether as it is no longer
  needed since most functions are either in 
  QDir/QFile/QUrl/KUrl ... and if they are not, we have
  the opportunity to add them.  If no one objects, I'm
  going to remove it.



 M  +2 -2      lib/interfaces/kdevcore.cpp  
 M  +5 -6      lib/interfaces/kdevproject.cpp  
 M  +1 -2      lib/projectmanager/kdevprojectmanager_part.cpp  
 M  +1 -2      parts/outputviews/makewidget.cpp  
 M  +1 -2      parts/tools/tools_part.cpp  
 M  +1 -3      src/documentcontroller.cpp  


--- trunk/KDE/kdevelop/lib/interfaces/kdevcore.cpp #506142:506143
@@ -24,7 +24,7 @@
 #include "kdevcoreiface.h"
 #include "kdevcore.h"
 
-#include "urlutil.h"
+#include <QDir>
 
 ///////////////////////////////////////////////////////////////////////////////
 // class Context
@@ -121,7 +121,7 @@
         else
         {
             m_fileName = m_urls[0].path();
-            m_isDirectory = URLUtil::isDirectory( m_urls[0] );
+            m_isDirectory = QDir( m_fileName ).exists();
         }
     }
     Private( const QString &fileName, bool isDirectory )
--- trunk/KDE/kdevelop/lib/interfaces/kdevproject.cpp #506142:506143
@@ -25,7 +25,6 @@
 #include <kdebug.h>
 
 #include "kdevproject.h"
-#include <urlutil.h>
 #include <qfileinfo.h>
 #include <qtimer.h>
 #include "kdevprojectiface.h"
@@ -105,9 +104,9 @@
     for( QStringList::ConstIterator it=fileList.begin(); it!=fileList.end(); ++it )
     {
 	QFileInfo fileInfo( projectDirectory() + "/" + *it );
-	d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it;
+	d->m_absToRel[ fileInfo.canonicalFilePath() ] = *it;
 	
-        if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() )
+        if ( fileInfo.canonicalFilePath() != fileInfo.absFilePath() )
         {
             d->m_symlinkList << *it;
         }
@@ -131,9 +130,9 @@
 	while( it != fileList.end() )
 	{
 		QFileInfo fileInfo( projectDirectory() + "/" + *it );
-		d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it;
+		d->m_absToRel[ fileInfo.canonicalFilePath() ] = *it;
 		
-		if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() )
+    	if ( fileInfo.canonicalFilePath() != fileInfo.absFilePath() )
 		{
 			d->m_symlinkList << *it;
 		}
@@ -148,7 +147,7 @@
 	while( it != fileList.end() )
 	{
 		QFileInfo fileInfo( projectDirectory() + "/" + *it );
-		d->m_absToRel.remove( URLUtil::canonicalPath(fileInfo.absFilePath()) );
+    	d->m_absToRel.remove( fileInfo.canonicalFilePath() );
 		
 		d->m_symlinkList.remove( *it );
 
--- trunk/KDE/kdevelop/lib/projectmanager/kdevprojectmanager_part.cpp #506142:506143
@@ -30,7 +30,6 @@
 #include <kdevcore.h>
 #include <kdevdocumentcontroller.h>
 #include <kdevmainwindow.h>
-#include <urlutil.h>
 
 #include <kaction.h>
 #include <kiconloader.h>
@@ -272,7 +271,7 @@
 QString KDevProjectManagerPart::activeDirectory() const // ### do we really need it?
 {
   if (KDevProjectFolderItem *folder = m_projectOverview->currentFolderItem())
-    return URLUtil::relativePath(projectDirectory(), folder->name());
+    return KUrl::relativePath(projectDirectory(), folder->name());
 
   return QString();
 }
--- trunk/KDE/kdevelop/parts/outputviews/makewidget.cpp #506142:506143
@@ -17,7 +17,6 @@
 #include "processlinemaker.h"
 #include "makeviewpart.h"
 #include "makeitem.h"
-#include "urlutil.h"
 
 #include <ktexteditor/document.h>
 #include <ktexteditor/view.h>
@@ -496,7 +495,7 @@
     while ( it != projectFiles.end() )
     {
         QString file = m_part->project() ->projectDirectory() + "/" + *it;
-        if ( name == URLUtil::canonicalPath( file ) )
+        if ( name == QFileInfo( file ).canonicalFilePath() )
         {
             kdDebug( 9004 ) << "Found file in project - " << file << " == " << name << endl;
             return file;
--- trunk/KDE/kdevelop/parts/tools/tools_part.cpp #506142:506143
@@ -27,7 +27,6 @@
 #include "kdevdocumentcontroller.h"
 #include "kdevappfrontend.h"
 #include "kdevplugininfo.h"
-#include "urlutil.h"
 #include "configwidgetproxy.h"
 
 #include "toolsconfig.h"
@@ -234,7 +233,7 @@
     config->setGroup("External Tools");
     QStringList filecontextList = config->readListEntry("File Context");
 
-    if (URLUtil::isDirectory(m_contextFileName)) {
+    if (QDir(m_contextFileName).exists()) {
         QStringList l = config->readListEntry("Dir Context");
         QStringList::ConstIterator it;
         for (it = l.begin(); it != l.end(); ++it)
--- trunk/KDE/kdevelop/src/documentcontroller.cpp #506142:506143
@@ -50,7 +50,6 @@
 
 #include "api.h"
 #include "core.h"
-#include "urlutil.h"
 #include "toplevel.h"
 #include "editorproxy.h"
 #include "kdevproject.h"
@@ -637,8 +636,7 @@
     url.cleanPath( true );
     if ( url.isLocalFile() )
     {
-        QString path = url.path();
-        path = URLUtil::canonicalPath( path );
+        QString path = QFileInfo( url.path() ).canonicalFilePath();
         if ( !path.isEmpty() )
             url.setPath( path );
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

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