Commit 1a0d8a55 authored by Bertjan Broeksema's avatar Bertjan Broeksema
Browse files

Let AgentBase know if network is needed for the configured path.

svn path=/trunk/KDE/kdepim/akonadi/; revision=879154
parent 13700697
......@@ -44,6 +44,8 @@ class SingleFileResource : public SingleFileResourceBase
public:
SingleFileResource( const QString &id ) : SingleFileResourceBase( id )
{
// The resource needs network when the path refers to a non local file.
setNeedsNetwork( !KUrl( Settings::self()->path() ).isLocalFile() );
}
/**
......
......@@ -76,7 +76,11 @@ void SingleFileResourceBase::collectionChanged(const Akonadi::Collection & colle
void SingleFileResourceBase::reloadFile()
{
// if we have something loaded already, make sure we write that back in case the settings changed
// Update the network setting.
setNeedsNetwork( !mCurrentUrl.isEmpty() && !mCurrentUrl.isLocalFile() );
// if we have something loaded already, make sure we write that back in case
// the settings changed
if ( !mCurrentUrl.isEmpty() )
writeFile();
readFile();
......
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