mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:12:01 +03:00
Use the new owncloud-admin version
This commit is contained in:
parent
aa8ba76e3c
commit
e660fe25b1
2 changed files with 23 additions and 11 deletions
|
@ -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("<font color=\"red\">Installation of ownCloud failed!</font>") );
|
||||
_ocWizard->showOCUrlLabel( false );
|
||||
|
@ -204,6 +213,7 @@ void OwncloudSetup::slotFinished( int res, QProcess::ExitStatus )
|
|||
void OwncloudSetup::startWizard()
|
||||
{
|
||||
_ocWizard->setOCUrl( ownCloudUrl() );
|
||||
_ocWizard->restart();
|
||||
_ocWizard->show();
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <a href=\"%1\">new ownCloud</a> is now up and running!").arg(url) );
|
||||
_ui.ocLinkLabel->setText( tr("Congratulations! Your <a href=\"%1\" title=\"%1\">new ownCloud</a> is now up and running!").arg(url) );
|
||||
_ui.ocLinkLabel->setOpenExternalLinks( true );
|
||||
|
||||
if( show ) {
|
||||
|
|
Loading…
Reference in a new issue