void Application::slotOwnCloudFound( const QString& url, const QString& versionStr, const QString& version, const QString& edition) { qDebug() << "** Application: ownCloud found: " << url << " with version " << versionStr << "(" << version << ")"; // now check the authentication MirallConfigFile cfgFile; cfgFile.setOwnCloudVersion( version ); // disconnect from ownCloudInfo disconnect( ownCloudInfo::instance(),SIGNAL(ownCloudInfoFound(QString,QString,QString,QString)), this, SLOT(slotOwnCloudFound(QString,QString,QString,QString))); disconnect( ownCloudInfo::instance(),SIGNAL(noOwncloudFound(QNetworkReply*)), this, SLOT(slotNoOwnCloudFound(QNetworkReply*))); if( version.startsWith("4.0") ) { QMessageBox::warning(0, tr("%1 Server Mismatch").arg(_theme->appNameGUI()), tr("<p>The configured server for this client is too old.</p>" "<p>Please update to the latest %1 server and restart the client.</p>").arg(_theme->appNameGUI())); return; } QTimer::singleShot( 0, this, SLOT( slotFetchCredentials() )); }
void ConnectionValidator::slotStatusFound( const QString& url, const QString& versionStr, const QString& version, const QString& edition) { // status.php was found. qDebug() << "** Application: ownCloud found: " << url << " with version " << versionStr << "(" << version << ")"; // now check the authentication MirallConfigFile cfgFile(_connection); cfgFile.setOwnCloudVersion( version ); // disconnect from ownCloudInfo disconnect( ownCloudInfo::instance(),SIGNAL(ownCloudInfoFound(QString,QString,QString,QString)), this, SLOT(slotStatusFound(QString,QString,QString,QString))); disconnect( ownCloudInfo::instance(),SIGNAL(noOwncloudFound(QNetworkReply*)), this, SLOT(slotNoStatusFound(QNetworkReply*))); if( version.startsWith("4.0") ) { _errors.append( tr("<p>The configured server for this client is too old.</p>" "<p>Please update to the latest server and restart the client.</p>")); emit connectionResult( ServerVersionMismatch ); return; } QTimer::singleShot( 0, this, SLOT( slotFetchCredentials() )); }