Summary: | Codepage choose need in the file open dialog | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Andrey Cherepanov <sibskull> |
Component: | general | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.0.2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andrey Cherepanov
2004-04-30 08:38:55 UTC
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( ) { |