Version: (using KDE 4.2.0) OS: Linux Installed from: SuSE RPMs Hi, I'm a developer of the Krusader team. If I try viewing a file in Krusader F3, the text editor part is loaded instead of the viewer. This used to work in KDE 4.1.x. I think, that if I load the text part as ReadOnlyPart, then it shouldn't behave like an editor. Thanks, Csaba Code: KParts::ReadOnlyPart* PanelViewer::getPart( QString mimetype ) { KParts::ReadOnlyPart * part = 0L; KPluginFactory *factory = 0; KService::Ptr ptr = KMimeTypeTrader::self()->preferredService( mimetype, "KParts/ReadOnlyPart" ); if ( ptr ) { QStringList args; QVariant argsProp = ptr->property( "X-KDE-BrowserView-Args" ); if ( argsProp.isValid() ) { QString argStr = argsProp.toString(); args = argStr.split( " " ); } QVariant prop = ptr->property( "X-KDE-BrowserView-AllowAsDefault" ); if ( !prop.isValid() || prop.toBool() ) // defaults to true { factory = KLibLoader::self() ->factory( ptr->library().toLatin1() ); if ( factory ) { if( ptr->serviceTypes().contains( "Browser/View" ) ) part = static_cast<KParts::ReadOnlyPart *>( factory->create( this, QString( "Browser/View" ).toLatin1(), args ) ); if( !part ) part = static_cast<KParts::ReadOnlyPart *>( factory->create( this, QString( "KParts::ReadOnlyPart" ).toLatin1(), args ) ); } } } if ( part ) { KParts::BrowserExtension * ext = KParts::BrowserExtension::childObject( part ); if ( ext ) { connect( ext, SIGNAL( openUrlRequestDelayed( const KUrl &, const KParts::OpenUrlArguments&, const KParts::BrowserArguments& ) ), this, SLOT( openUrl( const KUrl & ) ) ); connect( ext, SIGNAL( openUrlRequestDelayed( const KUrl &, const KParts::OpenUrlArguments&, const KParts::BrowserArguments& ) ), this, SIGNAL( openUrlRequest( const KUrl & ) ) ); } } return part; }
Konqueror also loads the editor if I open a text file.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? Thank you for helping us make KDE software even better for everyone!
No response; assuming it was fixed since then.