mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 23:17:13 +03:00
Merge branch '2.3'
Conflicts: src/libsync/owncloudpropagator.cpp
This commit is contained in:
commit
13df7fcee0
67 changed files with 5808 additions and 5618 deletions
|
@ -1,11 +1,11 @@
|
|||
ChangeLog
|
||||
=========
|
||||
|
||||
version 2.3.0 (2017-02-xx)
|
||||
version 2.3.0 (2017-03-03)
|
||||
* Decreased memory usage during sync
|
||||
* Overlay icons: Lower CPU usage
|
||||
* Allow to not sync the server's external storages by default
|
||||
* Switch Windows and OS X build to 5.6.2
|
||||
* Switch Windows and OS X build to Qt 5.6.2
|
||||
* Switch to new ownCloud server WebDAV endpoint
|
||||
* Chunking NG: New file upload chunking algorithmn for ownCloud server 9.2
|
||||
* Allow to sync a folder to multiple different servers (Filename change from .csync_journal.db to _sync_$HASH.db)
|
||||
|
@ -33,7 +33,6 @@ version 2.3.0 (2017-02-xx)
|
|||
* Allow sync directory to be a symlinked directory
|
||||
* Add manifest file on Windows to make the application UAC aware
|
||||
* macOS: Improve monochrome tray icons
|
||||
* Don't blacklist 507 Insufficent Storage #5346 (#5424)
|
||||
* Shibboleth bugfixes
|
||||
* Fixes with regards to low disk space
|
||||
* A ton of other bugfixes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
set( MIRALL_VERSION_MAJOR 2 )
|
||||
set( MIRALL_VERSION_MINOR 3 )
|
||||
set( MIRALL_VERSION_PATCH 0 )
|
||||
set( MIRALL_VERSION_PATCH 1 )
|
||||
set( MIRALL_VERSION_YEAR 2016 )
|
||||
set( MIRALL_SOVERSION 0 )
|
||||
|
||||
|
|
|
@ -733,6 +733,39 @@ X-GNOME-Autostart-Delay=3
|
|||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
Comment[oc]=@APPLICATION_NAME@ sincronizacion del client
|
||||
GenericName[oc]=Dorsièr de Sincronizacion
|
||||
|
|
|
@ -552,10 +552,12 @@ void AccountSettings::slotAccountStateChanged(int state)
|
|||
_model->slotUpdateFolderState(folder);
|
||||
}
|
||||
|
||||
QString server = QString::fromLatin1("<a href=\"%1\">%2</a>").arg(account->url().toString(), safeUrl.toString());
|
||||
QString server = QString::fromLatin1("<a href=\"%1\">%2</a>")
|
||||
.arg(Utility::escape(account->url().toString()),
|
||||
Utility::escape(safeUrl.toString()));
|
||||
QString serverWithUser = server;
|
||||
if (AbstractCredentials *cred = account->credentials()) {
|
||||
serverWithUser = tr("%1 as <i>%2</i>").arg(server, cred->user());
|
||||
serverWithUser = tr("%1 as <i>%2</i>").arg(server, Utility::escape(cred->user()));
|
||||
}
|
||||
|
||||
if (state == AccountState::Connected) {
|
||||
|
@ -569,13 +571,14 @@ void AccountSettings::slotAccountStateChanged(int state)
|
|||
} else if (state == AccountState::SignedOut) {
|
||||
showConnectionLabel( tr("Signed out from %1.").arg(serverWithUser) );
|
||||
} else {
|
||||
showConnectionLabel( tr("No connection to %1 at %2.")
|
||||
.arg(Theme::instance()->appNameGUI(),
|
||||
server), _accountState->connectionErrors() );
|
||||
showConnectionLabel(tr("No connection to %1 at %2.")
|
||||
.arg(Utility::escape(Theme::instance()->appNameGUI()), server),
|
||||
_accountState->connectionErrors());
|
||||
}
|
||||
} else {
|
||||
// ownCloud is not yet configured.
|
||||
showConnectionLabel( tr("No %1 connection configured.").arg(Theme::instance()->appNameGUI()) );
|
||||
showConnectionLabel(tr("No %1 connection configured.")
|
||||
.arg(Utility::escape(Theme::instance()->appNameGUI())));
|
||||
}
|
||||
|
||||
/* Allow to expand the item if the account is connected. */
|
||||
|
@ -664,7 +667,8 @@ void AccountSettings::refreshSelectiveSyncStatus()
|
|||
}
|
||||
QModelIndex theIndx = _model->indexForPath(folder, myFolder);
|
||||
if(theIndx.isValid()) {
|
||||
msg += QString::fromLatin1("<a href=\"%1?folder=%2\">%1</a>").arg(myFolder).arg(folder->alias());
|
||||
msg += QString::fromLatin1("<a href=\"%1?folder=%2\">%1</a>")
|
||||
.arg(Utility::escape(myFolder), Utility::escape(folder->alias()));
|
||||
} else {
|
||||
msg += myFolder; // no link because we do not know the index yet.
|
||||
}
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
<property name="text">
|
||||
<string>Connected with <server> as <user></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -75,6 +78,9 @@
|
|||
<property name="text">
|
||||
<string>Storage space: ...</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -145,6 +151,9 @@
|
|||
<property name="text">
|
||||
<string>Unchecked folders will be <b>removed</b> from your local file system and will not be synchronized to this computer anymore</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
|
|
@ -142,9 +142,9 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
|
||||
QString timeStr;
|
||||
if ( accountOnline ) {
|
||||
timeStr = tr("%1 on %2").arg(timeText).arg(accountRole);
|
||||
timeStr = tr("%1 on %2").arg(timeText, accountRole);
|
||||
} else {
|
||||
timeStr = tr("%1 on %2 (disconnected)").arg(timeText).arg(accountRole);
|
||||
timeStr = tr("%1 on %2 (disconnected)").arg(timeText, accountRole);
|
||||
QPalette p = option.palette;
|
||||
painter->setPen(p.color(QPalette::Disabled, QPalette::Text));
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
@ -64,6 +67,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
|
@ -87,6 +93,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
|
|
|
@ -30,6 +30,7 @@ AuthenticationDialog::AuthenticationDialog(const QString &realm, const QString &
|
|||
setWindowTitle(tr("Authentication Required"));
|
||||
QVBoxLayout *lay = new QVBoxLayout(this);
|
||||
QLabel *label = new QLabel(tr("Enter username and password for '%1' at %2.").arg(realm, domain));
|
||||
label->setTextFormat(Qt::PlainText);
|
||||
lay->addWidget(label);
|
||||
|
||||
QFormLayout *form = new QFormLayout;
|
||||
|
|
|
@ -383,16 +383,16 @@ void Folder::createGuiLog( const QString& filename, LogStatus status, int count,
|
|||
break;
|
||||
case LogStatusRename:
|
||||
if( count > 1 ) {
|
||||
text = tr("%1 has been renamed to %2 and %n other file(s) have been renamed.", "", count-1).arg(file).arg(renameTarget);
|
||||
text = tr("%1 has been renamed to %2 and %n other file(s) have been renamed.", "", count-1).arg(file, renameTarget);
|
||||
} else {
|
||||
text = tr("%1 has been renamed to %2.", "%1 and %2 name files.").arg(file).arg(renameTarget);
|
||||
text = tr("%1 has been renamed to %2.", "%1 and %2 name files.").arg(file, renameTarget);
|
||||
}
|
||||
break;
|
||||
case LogStatusMove:
|
||||
if( count > 1 ) {
|
||||
text = tr("%1 has been moved to %2 and %n other file(s) have been moved.", "", count-1).arg(file).arg(renameTarget);
|
||||
text = tr("%1 has been moved to %2 and %n other file(s) have been moved.", "", count-1).arg(file, renameTarget);
|
||||
} else {
|
||||
text = tr("%1 has been moved to %2.").arg(file).arg(renameTarget);
|
||||
text = tr("%1 has been moved to %2.").arg(file, renameTarget);
|
||||
}
|
||||
break;
|
||||
case LogStatusConflict:
|
||||
|
|
|
@ -164,10 +164,11 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
|
|||
{
|
||||
const auto &x = static_cast<SubFolderInfo *>(index.internalPointer())->_subs[index.row()];
|
||||
switch (role) {
|
||||
case Qt::ToolTipRole:
|
||||
case Qt::DisplayRole:
|
||||
//: Example text: "File.txt (23KB)"
|
||||
return x._size < 0 ? x._name : tr("%1 (%2)").arg(x._name, Utility::octetsToString(x._size));
|
||||
case Qt::ToolTipRole:
|
||||
return QString(QLatin1String("<qt>") + Utility::escape(x._size < 0 ? x._name : tr("%1 (%2)").arg(x._name, Utility::octetsToString(x._size))) + QLatin1String("</qt>"));
|
||||
case Qt::CheckStateRole:
|
||||
return x._checked;
|
||||
case Qt::DecorationRole:
|
||||
|
|
|
@ -65,7 +65,7 @@ FolderWizardLocalPath::FolderWizardLocalPath(const AccountPtr& account)
|
|||
connect(_ui.localFolderChooseBtn, SIGNAL(clicked()), this, SLOT(slotChooseLocalFolder()));
|
||||
_ui.localFolderChooseBtn->setToolTip(tr("Click to select a local folder to sync."));
|
||||
|
||||
QString defaultPath = QString::fromLatin1( "%1/%2").arg( QDir::homePath() ).arg(Theme::instance()->appName() );
|
||||
QString defaultPath = QDir::homePath() + QLatin1Char('/') + Theme::instance()->appName();
|
||||
_ui.localFolderLineEdit->setText( QDir::toNativeSeparators( defaultPath ) );
|
||||
_ui.localFolderLineEdit->setToolTip(tr("Enter the path to the local folder."));
|
||||
|
||||
|
@ -441,7 +441,8 @@ bool FolderWizardRemotePath::isComplete() const
|
|||
if (QDir::cleanPath(dir) == QDir::cleanPath(curDir)) {
|
||||
warnStrings.append(tr("This folder is already being synced."));
|
||||
} else if (dir.startsWith(curDir + QLatin1Char('/'))) {
|
||||
warnStrings.append(tr("You are already syncing <i>%1</i>, which is a parent folder of <i>%2</i>.").arg(curDir).arg(dir));
|
||||
warnStrings.append(tr("You are already syncing <i>%1</i>, which is a parent folder of <i>%2</i>.").arg(
|
||||
Utility::escape(curDir), Utility::escape(dir)));
|
||||
}
|
||||
|
||||
if (curDir == QLatin1String("/")) {
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>3</number>
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
|
@ -155,6 +158,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
|
|
|
@ -178,10 +178,10 @@ void OwncloudSetupWizard::slotOwnCloudFoundAuth(const QUrl& url, const QVariantM
|
|||
auto serverVersion = CheckServerJob::version(info);
|
||||
|
||||
_ocWizard->appendToConfigurationLog(tr("<font color=\"green\">Successfully connected to %1: %2 version %3 (%4)</font><br/><br/>")
|
||||
.arg(url.toString())
|
||||
.arg(Theme::instance()->appNameGUI())
|
||||
.arg(CheckServerJob::versionString(info))
|
||||
.arg(serverVersion));
|
||||
.arg(Utility::escape(url.toString()),
|
||||
Utility::escape(Theme::instance()->appNameGUI()),
|
||||
Utility::escape(CheckServerJob::versionString(info)),
|
||||
Utility::escape(serverVersion)));
|
||||
|
||||
_ocWizard->account()->setServerVersion(serverVersion);
|
||||
|
||||
|
@ -212,9 +212,9 @@ void OwncloudSetupWizard::slotNoOwnCloudFoundAuth(QNetworkReply *reply)
|
|||
msg = tr("Invalid URL");
|
||||
} else {
|
||||
msg = tr("Failed to connect to %1 at %2:<br/>%3")
|
||||
.arg(Theme::instance()->appNameGUI(),
|
||||
reply->url().toString(),
|
||||
reply->errorString());
|
||||
.arg(Utility::escape(Theme::instance()->appNameGUI()),
|
||||
Utility::escape(reply->url().toString()),
|
||||
Utility::escape(reply->errorString()));
|
||||
}
|
||||
bool isDowngradeAdvised = checkDowngradeAdvised(reply);
|
||||
|
||||
|
@ -244,9 +244,10 @@ void OwncloudSetupWizard::slotNoOwnCloudFoundAuth(QNetworkReply *reply)
|
|||
|
||||
void OwncloudSetupWizard::slotNoOwnCloudFoundAuthTimeout(const QUrl&url)
|
||||
{
|
||||
_ocWizard->displayError(tr("Timeout while trying to connect to %1 at %2.")
|
||||
.arg(Theme::instance()->appNameGUI(),
|
||||
url.toString()), false);
|
||||
_ocWizard->displayError(
|
||||
tr("Timeout while trying to connect to %1 at %2.")
|
||||
.arg(Utility::escape(Theme::instance()->appNameGUI()), Utility::escape(url.toString())),
|
||||
false);
|
||||
}
|
||||
|
||||
void OwncloudSetupWizard::slotConnectToOCUrl( const QString& url )
|
||||
|
@ -267,6 +268,9 @@ void OwncloudSetupWizard::testOwnCloudConnect()
|
|||
|
||||
auto *job = new PropfindJob(account, "/", this);
|
||||
job->setIgnoreCredentialFailure(true);
|
||||
// There is custom redirect handling in the error handler,
|
||||
// so don't automatically follow redirects.
|
||||
job->setFollowRedirects(false);
|
||||
job->setProperties(QList<QByteArray>() << "getlastmodified");
|
||||
connect(job, SIGNAL(result(QVariantMap)), _ocWizard, SLOT(successfulStep()));
|
||||
connect(job, SIGNAL(finishedWithError()), this, SLOT(slotAuthError()));
|
||||
|
@ -304,7 +308,7 @@ void OwncloudSetupWizard::slotAuthError()
|
|||
}
|
||||
errorMsg = tr("The authenticated request to the server was redirected to "
|
||||
"'%1'. The URL is bad, the server is misconfigured.")
|
||||
.arg(redirectUrl.toString());
|
||||
.arg(Utility::escape(redirectUrl.toString()));
|
||||
|
||||
// A 404 is actually a success: we were authorized to know that the folder does
|
||||
// not exist. It will be created later...
|
||||
|
@ -317,7 +321,7 @@ void OwncloudSetupWizard::slotAuthError()
|
|||
if (!_ocWizard->account()->credentials()->stillValid(reply)) {
|
||||
errorMsg = tr("Access forbidden by server. To verify that you have proper access, "
|
||||
"<a href=\"%1\">click here</a> to access the service with your browser.")
|
||||
.arg(_ocWizard->account()->url().toString());
|
||||
.arg(Utility::escape(_ocWizard->account()->url().toString()));
|
||||
} else {
|
||||
errorMsg = errorMessage(reply->errorString(), reply->readAll());
|
||||
}
|
||||
|
@ -366,7 +370,9 @@ void OwncloudSetupWizard::slotCreateLocalAndRemoteFolders(const QString& localFo
|
|||
if( fi.exists() ) {
|
||||
// there is an existing local folder. If its non empty, it can only be synced if the
|
||||
// ownCloud is newly created.
|
||||
_ocWizard->appendToConfigurationLog( tr("Local sync folder %1 already exists, setting it up for sync.<br/><br/>").arg(localFolder));
|
||||
_ocWizard->appendToConfigurationLog(
|
||||
tr("Local sync folder %1 already exists, setting it up for sync.<br/><br/>")
|
||||
.arg(Utility::escape(localFolder)));
|
||||
} else {
|
||||
QString res = tr("Creating local sync folder %1...").arg(localFolder);
|
||||
if( fi.mkpath( localFolder ) ) {
|
||||
|
@ -376,7 +382,7 @@ void OwncloudSetupWizard::slotCreateLocalAndRemoteFolders(const QString& localFo
|
|||
} else {
|
||||
res += tr("failed.");
|
||||
qDebug() << "Failed to create " << fi.path();
|
||||
_ocWizard->displayError(tr("Could not create local folder %1").arg(localFolder), false);
|
||||
_ocWizard->displayError(tr("Could not create local folder %1").arg(Utility::escape(localFolder)), false);
|
||||
nextStep = false;
|
||||
}
|
||||
_ocWizard->appendToConfigurationLog( res );
|
||||
|
@ -412,7 +418,7 @@ void OwncloudSetupWizard::slotRemoteFolderExists(QNetworkReply *reply)
|
|||
}
|
||||
|
||||
if( !ok ) {
|
||||
_ocWizard->displayError(error, false);
|
||||
_ocWizard->displayError(Utility::escape(error), false);
|
||||
}
|
||||
|
||||
finalizeSetup( ok );
|
||||
|
@ -452,8 +458,8 @@ void OwncloudSetupWizard::slotCreateRemoteFolderFinished( QNetworkReply::Network
|
|||
_remoteFolder.clear();
|
||||
success = false;
|
||||
} else {
|
||||
_ocWizard->appendToConfigurationLog( tr("Remote folder %1 creation failed with error <tt>%2</tt>.").arg(_remoteFolder).arg(error));
|
||||
_ocWizard->displayError( tr("Remote folder %1 creation failed with error <tt>%2</tt>.").arg(_remoteFolder).arg(error), false );
|
||||
_ocWizard->appendToConfigurationLog( tr("Remote folder %1 creation failed with error <tt>%2</tt>.").arg(Utility::escape(_remoteFolder)).arg(error));
|
||||
_ocWizard->displayError( tr("Remote folder %1 creation failed with error <tt>%2</tt>.").arg(Utility::escape(_remoteFolder)).arg(error), false );
|
||||
_remoteFolder.clear();
|
||||
success = false;
|
||||
}
|
||||
|
@ -469,8 +475,9 @@ void OwncloudSetupWizard::finalizeSetup( bool success )
|
|||
const QString localFolder = _ocWizard->property("localFolder").toString();
|
||||
if( success ) {
|
||||
if( !(localFolder.isEmpty() || _remoteFolder.isEmpty() )) {
|
||||
_ocWizard->appendToConfigurationLog( tr("A sync connection from %1 to remote directory %2 was set up.")
|
||||
.arg(localFolder).arg(_remoteFolder));
|
||||
_ocWizard->appendToConfigurationLog(
|
||||
tr("A sync connection from %1 to remote directory %2 was set up.")
|
||||
.arg(localFolder, _remoteFolder));
|
||||
}
|
||||
_ocWizard->appendToConfigurationLog( QLatin1String(" "));
|
||||
_ocWizard->appendToConfigurationLog( QLatin1String("<p><font color=\"green\"><b>")
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
|
|
|
@ -73,6 +73,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -58,8 +58,7 @@ void ProxyAuthHandler::handleProxyAuthenticationRequired(
|
|||
return;
|
||||
}
|
||||
|
||||
QString key = QString::fromLatin1("%1:%2").arg(
|
||||
proxy.hostName(), QString::number(proxy.port()));
|
||||
QString key = proxy.hostName() + QLatin1Char(':') + QString::number(proxy.port());
|
||||
|
||||
// If the proxy server has changed, forget what we know.
|
||||
if (key != _proxy) {
|
||||
|
|
|
@ -252,7 +252,7 @@ void SettingsDialog::customizeStyle()
|
|||
QString altBase(palette().alternateBase().color().name());
|
||||
QString dark(palette().dark().color().name());
|
||||
QString background(palette().base().color().name());
|
||||
_toolBar->setStyleSheet(QString::fromAscii(TOOLBAR_CSS).arg(background).arg(dark).arg(highlightColor).arg(altBase));
|
||||
_toolBar->setStyleSheet(QString::fromAscii(TOOLBAR_CSS).arg(background,dark,highlightColor,altBase));
|
||||
|
||||
Q_FOREACH(QAction *a, _actionGroup->actions()) {
|
||||
QIcon icon = createColorAwareIcon(a->property("iconPath").toString());
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<property name="text">
|
||||
<string>share label</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
|
@ -46,6 +49,9 @@
|
|||
<property name="text">
|
||||
<string>ownCloud Path:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
|
|
|
@ -321,7 +321,7 @@ void ShareLinkWidget::redrawElidedUrl()
|
|||
const QUrl realUrl(_shareUrl);
|
||||
QString elidedUrl = fm.elidedText(_shareUrl, Qt::ElideRight, linkLengthPixel);
|
||||
|
||||
u = QString("<a href=\"%1\">%2</a>").arg(realUrl.toString(QUrl::None)).arg(elidedUrl);
|
||||
u = QString("<a href=\"%1\">%2</a>").arg(Utility::escape(realUrl.toString(QUrl::None)), Utility::escape(elidedUrl));
|
||||
}
|
||||
_ui->_labelShareLink->setText(u);
|
||||
}
|
||||
|
|
|
@ -76,6 +76,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
|
|
|
@ -345,7 +345,7 @@ QSharedPointer<LinkShare> ShareManager::parseLinkShare(const QVariantMap &data)
|
|||
url = QUrl(data.value("url").toString());
|
||||
} else if (_account->serverVersionInt() >= (8 << 16)) {
|
||||
// From ownCloud server version 8 on, a different share link scheme is used.
|
||||
url = QUrl(Utility::concatUrlPath(_account->url(), QString("index.php/s/%1").arg(data.value("token").toString())).toString());
|
||||
url = QUrl(Utility::concatUrlPath(_account->url(), QLatin1String("index.php/s/") + data.value("token").toString())).toString();
|
||||
} else {
|
||||
QList<QPair<QString, QString>> queryArgs;
|
||||
queryArgs.append(qMakePair(QString("service"), QString("files")));
|
||||
|
|
|
@ -67,6 +67,9 @@
|
|||
<property name="text">
|
||||
<string notr="true">Placeholder for Error text</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
|
|
@ -58,7 +58,9 @@ static QString addCertDetailsField(const QString &key, const QString &value)
|
|||
if (value.isEmpty())
|
||||
return QString();
|
||||
|
||||
return QString::fromLatin1("<tr><td style=\"vertical-align: top;\"><b>%1</b></td><td style=\"vertical-align: bottom;\">%2</td></tr>").arg(key).arg(value);
|
||||
return QLatin1String("<tr><td style=\"vertical-align: top;\"><b>") + key
|
||||
+ QLatin1String("</b></td><td style=\"vertical-align: bottom;\">") + value
|
||||
+ QLatin1String("</td></tr>");
|
||||
}
|
||||
|
||||
|
||||
|
@ -162,7 +164,9 @@ QMenu* SslButton::buildCertMenu(QMenu *parent, const QSslCertificate& cert,
|
|||
// create label first
|
||||
QLabel *label = new QLabel(parent);
|
||||
label->setStyleSheet(QLatin1String("QLabel { padding: 8px; background-color: #fff; }"));
|
||||
label->setTextFormat(Qt::RichText);
|
||||
label->setText(details);
|
||||
|
||||
// plug label into widget action
|
||||
QWidgetAction *action = new QWidgetAction(parent);
|
||||
action->setDefaultWidget(label);
|
||||
|
|
|
@ -339,7 +339,8 @@ void NSISUpdater::showDialog(const UpdateInfo &info)
|
|||
QLabel *lbl = new QLabel;
|
||||
QString txt = tr("<p>A new version of the %1 Client is available.</p>"
|
||||
"<p><b>%2</b> is available for download. The installed version is %3.</p>")
|
||||
.arg(Theme::instance()->appNameGUI()).arg(info.versionString()).arg(clientVersion());
|
||||
.arg(Utility::escape(Theme::instance()->appNameGUI()),
|
||||
Utility::escape(info.versionString()), Utility::escape(clientVersion()));
|
||||
|
||||
lbl->setText(txt);
|
||||
lbl->setTextFormat(Qt::RichText);
|
||||
|
|
|
@ -156,10 +156,10 @@ void OwncloudAdvancedSetupPage::updateStatus()
|
|||
if( _remoteFolder.isEmpty() || _remoteFolder == QLatin1String("/") ) {
|
||||
t = "";
|
||||
} else {
|
||||
t = tr("%1 folder '%2' is synced to local folder '%3'")
|
||||
.arg(Theme::instance()->appName()).arg(_remoteFolder)
|
||||
.arg(QDir::toNativeSeparators(locFolder));
|
||||
_ui.rSyncEverything->setText(tr("Sync the folder '%1'").arg(_remoteFolder));
|
||||
t = Utility::escape(tr("%1 folder '%2' is synced to local folder '%3'")
|
||||
.arg(Theme::instance()->appName(), _remoteFolder,
|
||||
QDir::toNativeSeparators(locFolder)));
|
||||
_ui.rSyncEverything->setText(tr("Sync the folder '%1'").arg(_remoteFolder));
|
||||
}
|
||||
|
||||
const bool dirNotEmpty(QDir(locFolder).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).count() > 0);
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
|
@ -249,6 +252,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -351,6 +357,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -385,6 +394,9 @@
|
|||
<property name="text">
|
||||
<string>Status message</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
|
@ -401,6 +413,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
|
@ -89,6 +92,9 @@
|
|||
<property name="text">
|
||||
<string notr="true">Error Label</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -124,6 +130,9 @@
|
|||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
|
@ -131,6 +140,9 @@
|
|||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
|
@ -156,6 +159,9 @@
|
|||
<property name="text">
|
||||
<string>Error Label</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -189,6 +195,9 @@
|
|||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -93,6 +93,11 @@ void AbstractNetworkJob::setIgnoreCredentialFailure(bool ignore)
|
|||
_ignoreCredentialFailure = ignore;
|
||||
}
|
||||
|
||||
void AbstractNetworkJob::setFollowRedirects(bool follow)
|
||||
{
|
||||
_followRedirects = follow;
|
||||
}
|
||||
|
||||
void AbstractNetworkJob::setPath(const QString &path)
|
||||
{
|
||||
_path = path;
|
||||
|
|
|
@ -54,6 +54,18 @@ public:
|
|||
void setIgnoreCredentialFailure(bool ignore);
|
||||
bool ignoreCredentialFailure() const { return _ignoreCredentialFailure; }
|
||||
|
||||
/** Whether to handle redirects transparently.
|
||||
*
|
||||
* If true, a follow-up request is issued automatically when
|
||||
* a redirect is encountered. The finished() function is only
|
||||
* called if there are no more redirects (or there are problems
|
||||
* with the redirect).
|
||||
*
|
||||
* The transparent redirect following may be disabled for some
|
||||
* requests where custom handling is necessary.
|
||||
*/
|
||||
void setFollowRedirects(bool follow);
|
||||
|
||||
QByteArray responseTimestamp();
|
||||
|
||||
qint64 timeoutMsec() { return _timer.interval(); }
|
||||
|
|
|
@ -185,14 +185,14 @@ QVariant ConfigFile::getPolicySetting(const QString &setting, const QVariant& de
|
|||
if (Utility::isWindows()) {
|
||||
// check for policies first and return immediately if a value is found.
|
||||
QSettings userPolicy(QString::fromLatin1("HKEY_CURRENT_USER\\Software\\Policies\\%1\\%2")
|
||||
.arg(APPLICATION_VENDOR).arg(Theme::instance()->appName()),
|
||||
.arg(APPLICATION_VENDOR, Theme::instance()->appName()),
|
||||
QSettings::NativeFormat);
|
||||
if(userPolicy.contains(setting)) {
|
||||
return userPolicy.value(setting);
|
||||
}
|
||||
|
||||
QSettings machinePolicy(QString::fromLatin1("HKEY_LOCAL_MACHINE\\Software\\Policies\\%1\\%2")
|
||||
.arg(APPLICATION_VENDOR).arg(APPLICATION_NAME),
|
||||
.arg(APPLICATION_VENDOR, APPLICATION_NAME),
|
||||
QSettings::NativeFormat);
|
||||
if(machinePolicy.contains(setting)) {
|
||||
return machinePolicy.value(setting);
|
||||
|
@ -257,7 +257,7 @@ QString ConfigFile::excludeFileFromSystem()
|
|||
fi.setFile( QCoreApplication::applicationDirPath(), exclFile );
|
||||
#endif
|
||||
#ifdef Q_OS_UNIX
|
||||
fi.setFile( QString( SYSCONFDIR "/%1").arg(Theme::instance()->appName()), exclFile );
|
||||
fi.setFile(QString(SYSCONFDIR "/" + Theme::instance()->appName()), exclFile);
|
||||
if ( ! fi.exists() ) {
|
||||
// Prefer to return the preferred path! Only use the fallback location
|
||||
// if the other path does not exist and the fallback is valid.
|
||||
|
@ -489,8 +489,8 @@ QVariant ConfigFile::getValue(const QString& param, const QString& group,
|
|||
systemSetting = systemSettings.value(param, defaultValue);
|
||||
} else { // Windows
|
||||
QSettings systemSettings(QString::fromLatin1("HKEY_LOCAL_MACHINE\\Software\\%1\\%2")
|
||||
.arg(APPLICATION_VENDOR).arg(Theme::instance()->appName()),
|
||||
QSettings::NativeFormat);
|
||||
.arg(APPLICATION_VENDOR, Theme::instance()->appName()),
|
||||
QSettings::NativeFormat);
|
||||
if (!group.isEmpty()) {
|
||||
systemSettings.beginGroup(group);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "version.h"
|
||||
#include "config.h"
|
||||
#include "utility.h"
|
||||
|
||||
namespace OCC {
|
||||
|
||||
|
@ -53,9 +54,9 @@ QString ownCloudTheme::about() const
|
|||
"ownCloud and the ownCloud Logo are registered trademarks of ownCloud GmbH "
|
||||
"in the United States, other countries, or both.</p>"
|
||||
)
|
||||
.arg(MIRALL_VERSION_STRING)
|
||||
.arg("https://" MIRALL_STRINGIFY(APPLICATION_DOMAIN))
|
||||
.arg(MIRALL_STRINGIFY(APPLICATION_DOMAIN));
|
||||
.arg(Utility::escape(MIRALL_VERSION_STRING),
|
||||
Utility::escape("https://" MIRALL_STRINGIFY(APPLICATION_DOMAIN)),
|
||||
Utility::escape(MIRALL_STRINGIFY(APPLICATION_DOMAIN)));
|
||||
|
||||
devString += gitSHA1();
|
||||
return devString;
|
||||
|
|
|
@ -180,8 +180,7 @@ static QLatin1String platform()
|
|||
QByteArray Utility::userAgentString()
|
||||
{
|
||||
QString re = QString::fromLatin1("Mozilla/5.0 (%1) mirall/%2")
|
||||
.arg(platform())
|
||||
.arg(QLatin1String(MIRALL_VERSION_STRING));
|
||||
.arg(platform(), QLatin1String(MIRALL_VERSION_STRING));
|
||||
|
||||
QLatin1String appName(APPLICATION_SHORTNAME);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue