[Bug 80674] Codepage choose need in the file open dialog

Jens Dagerbo jens.dagerbo at swipnet.se
Fri May 14 22:36:02 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=80674      
jens.dagerbo swipnet se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jens.dagerbo swipnet se  2004-05-14 22:35 -------
CVS commit by dagerbo: 

Make it possible to open files using an other than default encoding.

CCMAIL: 80674-done bugs kde org


  M +12 -6     partcontroller.cpp   1.129


--- kdevelop/src/partcontroller.cpp  #1.128:1.129
 @ -38,4 +38,5  @
 #include <kiconloader.h>
 #include <kuserprofile.h>
+#include <kencodingfiledialog.h>
 
 #include <ktexteditor/view.h>
 @ -1045,8 +1046,10  @ void PartController::slotCurrentChanged(
 void PartController::slotOpenFile()
 {
-  KURL::List fileNames = KFileDialog::getOpenURLs(QString::null, QString::null, TopLevel::getInstance()->main(), QString::null);
+        KEncodingFileDialog::Result result = KEncodingFileDialog::getOpenURLsAndEncoding(QString::null, QString::null, 
+                QString::null, TopLevel::getInstance()->main(), QString::null);
 
-  for ( KURL::List::Iterator it = fileNames.begin(); it != fileNames.end(); ++it )
+        for ( KURL::List::Iterator it = result.URLs.begin(); it != result.URLs.end(); ++it )
   {
+                m_presetEncoding = result.encoding;
     editDocument( *it );
   }
 @ -1247,4 +1250,5  @ void PartController::revertFiles( const 
 /////////////////////////////////////////////////////////////////////////////
 
+//BEGIN History methods
 
 PartController::HistoryEntry::HistoryEntry( const KURL & u, int l, int c) 
 @ -1377,4 +1381,6  @ void PartController::addHistoryEntry(con
 }
 
+//END History methods
+
 void PartController::slotWaitForFactoryHack( )
 {




More information about the KDevelop-devel mailing list