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

List:       kde-commits
Subject:    trunk
From:       Pascal Létourneau <pascal.letourneau () kdemail ! net>
Date:       2006-09-28 20:02:12
Message-ID: 1159473732.325661.24334.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 589865 by pletourn:

Assert on fileName(false)


 M  +1 -1      KDE/kdeaddons/noatun-plugins/luckytag/parsedmp3filename.cpp  
 M  +2 -2      KDE/kdegraphics/kooka/scanpackager.cpp  
 M  +1 -0      KDE/kdelibs/kdecore/kurl.cpp  
 M  +3 -3      koffice/libs/kofficecore/KoMainWindow.cpp  


--- trunk/KDE/kdeaddons/noatun-plugins/luckytag/parsedmp3filename.cpp #589864:589865
@@ -28,7 +28,7 @@
 {
 	KUrl url = path;
 	
-	QString fileName = url.fileName(false);
+	QString fileName = url.fileName(KUrl::ObeyTrailingSlash);
 	m_directories = QStringList::split("/", url.directory());
 	
 	if (fileName.startsWith("(") && fileName.contains(")"))
--- trunk/KDE/kdegraphics/kooka/scanpackager.cpp #589864:589865
@@ -987,7 +987,7 @@
 
       // initial += fromUrl.filename(false);
       QString initial = m_currCopyDir + '/';
-      initial += fromUrl.fileName(false);
+      initial += fromUrl.fileName(KUrl::ObeyTrailingSlash);
       KUrl fileName = KFileDialog::getSaveUrl ( initial,
 						filter, this );
 
@@ -1045,7 +1045,7 @@
        if( ! urls.empty() )
        {
            KUrl nextSel = copyTo;
-           nextSel.addPath( urls.back().fileName(false));
+           nextSel.addPath( urls.back().fileName(KUrl::ObeyTrailingSlash));
 
            kDebug(28000) << "Selecting next url: " << nextSel.url() << endl;
            m_nextUrlToShow = nextSel;
--- trunk/KDE/kdelibs/kdecore/kurl.cpp #589864:589865
@@ -931,6 +931,7 @@
 
 QString KUrl::fileName( const DirectoryOptions& options ) const
 {
+  Q_ASSERT( options != 0 ); //Disallow options == false
   QString fname;
   if (hasSubUrl()) { // If we have a suburl, then return the filename from there
     KUrl::List list = KUrl::split(*this);
--- trunk/koffice/libs/kofficecore/KoMainWindow.cpp #589864:589865
@@ -537,8 +537,8 @@
         caption += i18n("(write protected)");
 
       setCaption( caption, rootDocument()->isModified() );
-      if ( !rootDocument()->url().fileName(false).isEmpty() )
-        d->m_paSave->setToolTip( i18n("Save as %1", \
rootDocument()->url().fileName(false)) ); +      if ( \
!rootDocument()->url().fileName(KUrl::ObeyTrailingSlash).isEmpty() ) +        \
d->m_paSave->setToolTip( i18n("Save as %1", \
rootDocument()->url().fileName(KUrl::ObeyTrailingSlash)) );  else
         d->m_paSave->setToolTip( i18n("Save") );
   }
@@ -1636,7 +1636,7 @@
     else
     {
         fileURL = rootDocument()->url().url();
-        theSubject = i18n("Document - %1", rootDocument()->url().fileName(false));
+        theSubject = i18n("Document - %1", \
rootDocument()->url().fileName(KUrl::ObeyTrailingSlash));  urls.append( fileURL );
     }
 


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

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