mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 21:35:47 +03:00
remote folder check for oC finished
This commit is contained in:
parent
f4c5b9adbb
commit
ecc3a9edd5
2 changed files with 12 additions and 4 deletions
|
@ -82,7 +82,6 @@ FolderWizardTargetPage::FolderWizardTargetPage()
|
|||
_timer->setSingleShot( true );
|
||||
connect( _timer, SIGNAL(timeout()), SLOT(slotTimerFires()));
|
||||
|
||||
_ownCloudInfo = new ownCloudInfo( this );
|
||||
_ownCloudDirCheck = new ownCloudDirCheck( this );
|
||||
|
||||
connect( _ownCloudDirCheck, SIGNAL(directoryExists(QString,bool)),
|
||||
|
@ -91,11 +90,14 @@ FolderWizardTargetPage::FolderWizardTargetPage()
|
|||
|
||||
void FolderWizardTargetPage::slotFolderTextChanged( const QString& t)
|
||||
{
|
||||
_dirChecked = false;
|
||||
emit completeChanged();
|
||||
|
||||
if( t.isEmpty() ) {
|
||||
_timer->stop();
|
||||
return;
|
||||
}
|
||||
qDebug() << "XX new folder string: " << t;
|
||||
|
||||
_timer->start(500);
|
||||
}
|
||||
|
||||
|
@ -103,13 +105,14 @@ void FolderWizardTargetPage::slotTimerFires()
|
|||
{
|
||||
const QString folder = _ui.OCFolderLineEdit->text();
|
||||
qDebug() << "Querying folder " << folder;
|
||||
|
||||
_ownCloudDirCheck->checkDirectory( folder );
|
||||
}
|
||||
|
||||
void FolderWizardTargetPage::slotInfoReply(const QString &url, bool exists )
|
||||
{
|
||||
qDebug() << "Got reply from ownCloudInfo: " << url << " :" << exists;
|
||||
_dirChecked = exists;
|
||||
emit completeChanged();
|
||||
}
|
||||
|
||||
|
||||
|
@ -126,7 +129,12 @@ bool FolderWizardTargetPage::isComplete() const
|
|||
QUrl url(_ui.urlFolderLineEdit->text());
|
||||
return url.isValid() && (url.scheme() == "sftp" || url.scheme() == "smb");
|
||||
} else if( _ui.OCRadioBtn->isChecked()) {
|
||||
QString dir = _ui.OCFolderLineEdit->text();
|
||||
if( dir.isEmpty() ) {
|
||||
return true;
|
||||
} else {
|
||||
return _dirChecked;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -86,8 +86,8 @@ protected slots:
|
|||
private:
|
||||
Ui_FolderWizardTargetPage _ui;
|
||||
QTimer *_timer;
|
||||
ownCloudInfo *_ownCloudInfo;
|
||||
ownCloudDirCheck *_ownCloudDirCheck;
|
||||
bool _dirChecked;
|
||||
};
|
||||
|
||||
class FolderWizardNetworkPage : public QWizardPage
|
||||
|
|
Loading…
Reference in a new issue