Commit 68fd4f96 authored by Christian Loose's avatar Christian Loose

Cleanup open sandbox methods

svn path=/trunk/kdesdk/cervisia/; revision=195800
parent ba8d056f
......@@ -117,7 +117,7 @@ KConfig *CervisiaPart::config()
bool CervisiaPart::openURL( const KURL &u )
{
slotOpenSandbox( u );
openSandbox( u.path() );
return true;
}
......@@ -139,7 +139,7 @@ void CervisiaPart::setupActions()
action->setWhatsThis( hint );
recent = new KRecentFilesAction( i18n("Recent Sandboxes"), 0,
this, SLOT( slotOpenSandbox( const KURL & ) ),
this, SLOT( openURL( const KURL & ) ),
actionCollection(), "file_open_recent" );
action = new KAction( i18n("&Insert ChangeLog Entry..."), 0,
......@@ -596,11 +596,6 @@ void CervisiaPart::slotOpenSandbox()
}
void CervisiaPart::slotOpenSandbox( const KURL &url )
{
openSandbox( url.path() );
}
void CervisiaPart::slotChangeLog()
{
// Modal dialog
......
......@@ -64,9 +64,9 @@ signals:
void filterStatusChanged(QString status);
public slots:
// unused because we overwrite the default behaviour of openURL()
virtual bool openFile() { return true; }
virtual bool openURL( const KURL & );
void openSandbox(const QString &dirname);
void openFile(QString filename);
void openFiles(const QStringList &filenames);
......@@ -74,9 +74,7 @@ public slots:
void updateActions();
void aboutCervisia();
void slotOpenSandbox( const KURL &url );
void slotOpenSandbox();
void slotOpen();
void slotResolve();
void slotStatus();
......@@ -131,9 +129,14 @@ public slots:
protected slots:
void slotJobFinished(bool /*success*/);
private slots:
// called by menu action "Open Sandbox..."
void slotOpenSandbox();
private:
void setupActions();
void openSandbox(const QString &dirname);
void updateOrStatus(bool noact, const QString &extraopt);
void commitOrAddOrRemove(CommitDialog::ActionType action);
void addOrRemoveWatch(WatchDialog::ActionType action);
......
......@@ -25,6 +25,7 @@
#include <klocale.h>
#include <kstdaction.h>
#include <kstatusbar.h>
#include <kurl.h>
#include "cervisiapart.h"
......@@ -189,7 +190,7 @@ void CervisiaShell::readProperties(KConfig *config)
QString currentDir = config->readEntry("Current Directory");
if (!currentDir.isEmpty())
part->openSandbox(currentDir);
part->openURL( KURL::fromPathOrURL(currentDir) );
}
void CervisiaShell::saveProperties(KConfig *config)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment