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

List:       kde-commits
Subject:    branches/KDE/4.0/kdelibs/kfile
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2008-01-11 23:58:27
Message-ID: 1200095907.405832.9206.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 760132 by aacid:

backport r760130
****************
we also need to check for the current extension so that in case the current extension \
is a .foo.bar we don't duplicate .foo lastExtension is there for a similar purpose \
but only when changing the current file type thorugh the combo


 M  +2 -0      kfilewidget.cpp  


--- branches/KDE/4.0/kdelibs/kfile/kfilewidget.cpp #760131:760132
@@ -1828,6 +1828,8 @@
         // catch "double extensions" like ".tar.gz"
         if (lastExtension.length() && fileName.endsWith (lastExtension))
             fileName.truncate (len - lastExtension.length());
+        else if (extension.length() && fileName.endsWith (extension))
+            fileName.truncate (len - extension.length());
         // can only handle "single extensions"
         else
             fileName.truncate (dot);


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

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