Commit 85a91b90 authored by Christian Loose's avatar Christian Loose

(seems like nobody wanted to review this or understood my mail)

Prevent Cervisia from incorrectly displaying an error message when a path was passed to it as a command-line argument and the "automatic cvs status on open" option is activate for the last opened working directory.

svn path=/trunk/kdesdk/cervisia/; revision=278006
parent 5aae43cf
......@@ -127,6 +127,13 @@ void CervisiaShell::setupActions()
}
void CervisiaShell::openURL()
{
if( !m_lastOpenDir.isEmpty() )
part->openURL(KURL::fromPathOrURL(m_lastOpenDir));
}
void CervisiaShell::openURL(const KURL& url)
{
part->openURL(url);
......@@ -168,9 +175,7 @@ void CervisiaShell::readSettings()
KConfig* config = KGlobal::config();
config->setGroup("Session");
QString currentDir = config->readPathEntry("Current Directory");
if( !currentDir.isEmpty() )
openURL( KURL::fromPathOrURL(currentDir) );
m_lastOpenDir = config->readPathEntry("Current Directory");
}
......
......@@ -35,6 +35,7 @@ public:
void restorePseudo(const QString &dirname);
public slots:
void openURL();
void openURL(const KURL& url);
void slotConfigureKeys();
void slotConfigureToolBars();
......@@ -52,6 +53,7 @@ private:
void writeSettings();
KParts::ReadOnlyPart *part;
QString m_lastOpenDir;
};
#endif // CERVISIASHELL_H
......
......@@ -149,6 +149,8 @@ int main(int argc, char **argv)
KURL directory = args->url(0);
shell->openURL(directory);
}
else
shell->openURL();
shell->setIcon(app.icon());
app.setMainWidget(shell);
......
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