mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Fixed sync start after ownCloud initial configuration.
This commit is contained in:
parent
eb1fd2d5f8
commit
596e824b54
3 changed files with 11 additions and 13 deletions
|
@ -167,6 +167,7 @@ void Application::slotNoOwnCloudFound( QNetworkReply::NetworkError err )
|
|||
_actionAddFolder->setEnabled( false );
|
||||
setupContextMenu();
|
||||
}
|
||||
|
||||
void Application::slotCheckAuthentication()
|
||||
{
|
||||
_ocInfo->getRequest("/", true ); // this call needs to be authenticated.
|
||||
|
@ -332,6 +333,7 @@ void Application::slotAddFolder()
|
|||
|
||||
if( goodData ) {
|
||||
_folderMan->addFolderDefinition( backend, alias, sourceFolder, targetPath, onlyThisLAN );
|
||||
_folderMan->setupFolderFromConfigFile( alias );
|
||||
_statusDialog->slotAddFolder( _folderMan->folder( alias ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -312,9 +312,9 @@ void FolderMan::slotFolderSyncFinished( const SyncResult& )
|
|||
* QString targetPath on remote
|
||||
* bool onlyThisLAN, currently unused.
|
||||
*/
|
||||
Folder* FolderMan::addFolderDefinition( const QString& backend, const QString& alias,
|
||||
const QString& sourceFolder, const QString& targetPath,
|
||||
bool onlyThisLAN )
|
||||
void FolderMan::addFolderDefinition( const QString& backend, const QString& alias,
|
||||
const QString& sourceFolder, const QString& targetPath,
|
||||
bool onlyThisLAN )
|
||||
{
|
||||
// Create a settings file named after the alias
|
||||
QSettings settings( _folderConfigPath + "/" + alias, QSettings::IniFormat);
|
||||
|
@ -326,10 +326,6 @@ Folder* FolderMan::addFolderDefinition( const QString& backend, const QString& a
|
|||
settings.setValue(QString("%1/onlyThisLAN").arg(alias), onlyThisLAN );
|
||||
settings.sync();
|
||||
|
||||
Folder *folder = setupFolderFromConfigFile(alias);
|
||||
// setupContextMenu(); FIXME: Refresh GUI elements.
|
||||
|
||||
return folder;
|
||||
}
|
||||
|
||||
void FolderMan::slotRemoveFolder( const QString& alias )
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
* QString targetPath on remote
|
||||
* bool onlyThisLAN, currently unused.
|
||||
*/
|
||||
Folder *addFolderDefinition( const QString&, const QString&, const QString&, const QString&, bool );
|
||||
void addFolderDefinition( const QString&, const QString&, const QString&, const QString&, bool );
|
||||
|
||||
/**
|
||||
* return the folder by alias or NULL if no folder with the alias exists.
|
||||
|
@ -63,6 +63,11 @@ public:
|
|||
*/
|
||||
SyncResult syncResult( const QString& );
|
||||
|
||||
/**
|
||||
* creates a folder for a specific configuration, identified by alias.
|
||||
*/
|
||||
Folder* setupFolderFromConfigFile(const QString & );
|
||||
|
||||
signals:
|
||||
/**
|
||||
* signal to indicate a folder named by alias has changed its sync state.
|
||||
|
@ -93,11 +98,6 @@ private:
|
|||
|
||||
void removeFolder( const QString& );
|
||||
|
||||
|
||||
// creates a folder for a specific
|
||||
// configuration
|
||||
Folder* setupFolderFromConfigFile(const QString & );
|
||||
|
||||
FolderWatcher *_configFolderWatcher;
|
||||
Folder::Map _folderMap;
|
||||
QHash<QString, bool> _folderEnabledMap;
|
||||
|
|
Loading…
Reference in a new issue