diff --git a/src/mirall/owncloudsetup.cpp b/src/mirall/owncloudsetup.cpp index 075de6961..104e1a3e2 100644 --- a/src/mirall/owncloudsetup.cpp +++ b/src/mirall/owncloudsetup.cpp @@ -96,6 +96,13 @@ void OwncloudSetup::slotCreateOCLocalhost() args << "install"; args << "--server-type" << "local"; args << "--root_helper" << "kdesu -c"; + + const QString adminUser = _ocWizard->field("OCUser").toString(); + const QString adminPwd = _ocWizard->field("OCPasswd").toString(); + + args << "--admin-user" << adminUser; + args << "--admin-password" << adminPwd; + runOwncloudAdmin( args ); // define @@ -112,7 +119,8 @@ void OwncloudSetup::slotInstallOCServer() const QString server = _ocWizard->field("ftpUrl").toString(); const QString user = _ocWizard->field("ftpUser").toString(); const QString passwd = _ocWizard->field("ftpPasswd").toString(); - const QString dir; // = _ocWizard->field("ftpDir").toString(); + const QString adminUser = _ocWizard->field("OCUser").toString(); + const QString adminPwd = _ocWizard->field("OCPasswd").toString(); qDebug() << "Install OC on " << server << " as user " << user; @@ -120,13 +128,13 @@ void OwncloudSetup::slotInstallOCServer() args << "install"; args << "--server-type" << "ftp"; args << "--server" << server; - args << "--user" << user; + args << "--ftp-user" << user; if( ! passwd.isEmpty() ) { - args << "--password" << passwd; - } - if( !dir.isEmpty() ) { - args << "--ftpdir" << dir; + args << "--ftp-password" << passwd; } + args << "--admin-user" << adminUser; + args << "--admin-password" << adminPwd; + runOwncloudAdmin( args ); _ocWizard->setField( "OCUrl", QString( "%1/owncloud/").arg(_ocWizard->field("myOCDomain").toString() )); } @@ -160,7 +168,7 @@ void OwncloudSetup::slotReadyReadStandardOutput() void OwncloudSetup::slotReadyReadStandardError() { - qDebug() << _process->readAllStandardError(); + qDebug() << "!! " <<_process->readAllStandardError(); } void OwncloudSetup::slotStateChanged( QProcess::ProcessState ) @@ -168,9 +176,9 @@ void OwncloudSetup::slotStateChanged( QProcess::ProcessState ) } -void OwncloudSetup::slotError( QProcess::ProcessError ) +void OwncloudSetup::slotError( QProcess::ProcessError err ) { - + qDebug() << "An Error happend with owncloud-admin: " << err << ", exit-Code: " << _process->exitCode(); } void OwncloudSetup::slotStarted() @@ -186,6 +194,7 @@ void OwncloudSetup::slotFinished( int res, QProcess::ExitStatus ) _ocWizard->button( QWizard::BackButton)->setEnabled( true ); QApplication::restoreOverrideCursor(); + qDebug() << "exit code: " << res; if( res ) { _ocWizard->appendToResultWidget( tr("Installation of ownCloud failed!") ); _ocWizard->showOCUrlLabel( false ); @@ -204,6 +213,7 @@ void OwncloudSetup::slotFinished( int res, QProcess::ExitStatus ) void OwncloudSetup::startWizard() { _ocWizard->setOCUrl( ownCloudUrl() ); + _ocWizard->restart(); _ocWizard->show(); } diff --git a/src/mirall/owncloudwizard.cpp b/src/mirall/owncloudwizard.cpp index 14b013d32..4bafeddcc 100644 --- a/src/mirall/owncloudwizard.cpp +++ b/src/mirall/owncloudwizard.cpp @@ -85,6 +85,8 @@ OwncloudCredentialsPage::OwncloudCredentialsPage() _ui.setupUi(this); registerField( "OCUser", _ui.OCUserEdit ); registerField( "OCPasswd", _ui.OCPasswdEdit ); + + connect( _ui.OCPasswdEdit, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); } OwncloudCredentialsPage::~OwncloudCredentialsPage() @@ -94,7 +96,7 @@ OwncloudCredentialsPage::~OwncloudCredentialsPage() bool OwncloudCredentialsPage::isComplete() const { - + return !(_ui.OCPasswdEdit->text().isEmpty() ); } void OwncloudCredentialsPage::initializePage() @@ -227,7 +229,7 @@ void OwncloudWizardResultPage::appendResultText( const QString& msg ) void OwncloudWizardResultPage::showOCUrlLabel( const QString& url, bool show ) { - _ui.ocLinkLabel->setText( tr("Congratulations! Your new ownCloud is now up and running!").arg(url) ); + _ui.ocLinkLabel->setText( tr("Congratulations! Your new ownCloud is now up and running!").arg(url) ); _ui.ocLinkLabel->setOpenExternalLinks( true ); if( show ) {