Use mostLocalURL for saving history; doesn't work yet as mostLocalURL doesn't work for non-existing files yet.

CCBUG: 105513 

svn path=/trunk/KDE/kdebase/konsole/; revision=418782
wilder-portage
Kurt Hindenburg 21 years ago
parent f63f78be5b
commit 25be086a6a
  1. 9
      konsole/konsole.cpp

@ -128,6 +128,7 @@ Time to start a requirement list.
#include <kparts/componentfactory.h>
#include <kcharsets.h>
#include <kcolordialog.h>
#include <kio/netaccess.h>
#include "konsole.h"
#include <netwm.h>
@ -3766,9 +3767,13 @@ void Konsole::slotFindDone()
void Konsole::slotSaveHistory()
{
KURL url = KFileDialog::getSaveURL(QString::null, QString::null, 0L, i18n("Save History"));
if( url.isEmpty())
// FIXME - mostLocalURL can't handle non-existing files yet, so this
// code doesn't work.
KURL s_url = KFileDialog::getSaveURL(QString::null, QString::null, 0L, i18n("Save History"));
if( s_url.isEmpty())
return;
KURL url = KIO::NetAccess::mostLocalURL( s_url, 0 );
if( !url.isLocalFile() ) {
KMessageBox::sorry(this, i18n("This is not a local file.\n"));
return;

Loading…
Cancel
Save