[Uml-devel] KDE/kdesdk/umbrello/umbrello

Laurent Montel montel at kde.org
Thu Jun 22 14:31:09 UTC 2006


SVN commit 553929 by mlaurent:

Port++


 M  +1 -1      CMakeLists.txt  
 M  +5 -7      classparser/urlutil.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/CMakeLists.txt #553928:553929
@@ -16,8 +16,8 @@
 macro_additional_clean_files( ${CMAKE_CURRENT_BINARY_DIR}/version.h )
 create_version(${CMAKE_SOURCE_DIR}/umbrello/VERSION version.h)
 
+include_directories (${CMAKE_CURRENT_SOURCE_DIR}/dialogs/)
 
-
 set(libcodegenerator_SRCS
 	codegenerators/codegenfactory.cpp 
 	codegenerators/classifierinfo.cpp 
--- trunk/KDE/kdesdk/umbrello/umbrello/classparser/urlutil.cpp #553928:553929
@@ -60,9 +60,7 @@
     return slashPrefix ? QString("/") : QString("");
 
   if (!parent.isParentOf(child)) return QString();
-  int a=slashPrefix ? -1 : 1;
-  int b=slashSuffix ? 1 : -1;
-  return child.path(b).mid(parent.path(a).length());
+  return child.path( slashSuffix ? KUrl::RemoveTrailingSlash:KUrl::AddTrailingSlash).mid(parent.path(slashSuffix ? KUrl::AddTrailingSlash:KUrl::RemoveTrailingSlash).length());
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -93,9 +91,9 @@
   if (dest == child) return source;
 
   // calculate
-  QString childUrlStr = child.url(-1);
-  QString destStemStr = dest.url(1);
-  QString sourceStemStr = source.url(1);
+  QString childUrlStr = child.url(KUrl::RemoveTrailingSlash);
+  QString destStemStr = dest.url(KUrl::AddTrailingSlash );
+  QString sourceStemStr = source.url(KUrl::AddTrailingSlash);
   return KUrl(sourceStemStr.append( childUrlStr.mid( destStemStr.length() ) ) );
 
 }
@@ -156,7 +154,7 @@
 QString URLUtil::extractPathNameAbsolute( const KUrl &url )
 {
   if (isDirectory( url ))
-    return url.path( +1 ); // with trailing "/" if none is present
+    return url.path( KUrl::AddTrailingSlash ); // with trailing "/" if none is present
   else
   {
     // Ok, this is an over-tight pre-condition on "url" since I hope nobody will never




More information about the umbrello-devel mailing list