Skip to content

Commit

Permalink
Merge branch 'master' into work/fix-spaces-folder-in-spaces-root
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing authored Mar 19, 2024
2 parents 947e7e1 + 70b5b0f commit 6d23434
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 127 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ownCloud admins and users.
* Change - Removal of selective sync tree from account status page: [#11357](https://github.com/owncloud/client/issues/11357)
* Change - Fix three badly styled warning messages: [#11412](https://github.com/owncloud/client/issues/11412)
* Change - Removed support for limiting sync of big new folder & external storage: [#11517](https://github.com/owncloud/client/pull/11517)
* Change - Set the 'No' button as default action in the Unknown Certificate dialog: [#11531](https://github.com/owncloud/client/issues/11531)
* Enhancement - Add option to pause synchronization on metered connections: [#4808](https://github.com/owncloud/client/issues/4808)
* Enhancement - Add option to move files to trash instead of deleting: [#9001](https://github.com/owncloud/client/issues/9001)
* Enhancement - Prevent same default sync folder for multiple accounts with Spaces: [#11204](https://github.com/owncloud/client/issues/11204)
Expand Down Expand Up @@ -186,6 +187,14 @@ ownCloud admins and users.

https://github.com/owncloud/client/pull/11517

* Change - Set the 'No' button as default action in the Unknown Certificate dialog: [#11531](https://github.com/owncloud/client/issues/11531)

When an unknown certificate is used by the server, the safe action is to reject
this certificate. So the default action for this dialog should be not to accept
this unknown certificate.

https://github.com/owncloud/client/issues/11531

* Enhancement - Add option to pause synchronization on metered connections: [#4808](https://github.com/owncloud/client/issues/4808)

On platforms that support metered-connection detection, an option is now
Expand Down
7 changes: 7 additions & 0 deletions changelog/unreleased/11531
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Change: Set the 'No' button as default action in the Unknown Certificate dialog

When an unknown certificate is used by the server, the safe action is to
reject this certificate. So the default action for this dialog should be
not to accept this unknown certificate.

https://github.com/owncloud/client/issues/11531
2 changes: 2 additions & 0 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ qt_add_qml_module(owncloudCore
URI org.ownCloud.qmlcomponents
VERSION 1.0
NAMESPACE OCC
# compat to qt < 6.5
RESOURCE_PREFIX "/qt/qml/"
QML_FILES
qml/FolderDelegate.qml
qml/FolderError.qml
Expand Down
5 changes: 2 additions & 3 deletions src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ AccountSettings::AccountSettings(const AccountStatePtr &accountState, QWidget *p
ui->quickWidget->engine()->addImageProvider(QStringLiteral("space"), new SpaceImageProvider(_accountState));
ui->quickWidget->engine()->addImageProvider(QStringLiteral("ownCloud"), new Resources::CoreImageProvider());
ui->quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
ui->quickWidget->setSource(QUrl::fromLocalFile(QStringLiteral(":/qt/qml/org/ownCloud/qmlcomponents/qml/FolderDelegate.qml")));
ui->quickWidget->setSource(QUrl(QStringLiteral("qrc:/qt/qml/org/ownCloud/qmlcomponents/qml/FolderDelegate.qml")));
if (!ui->quickWidget->errors().isEmpty()) {
qCCritical(lcAccountSettings) << "A qml error occured" << ui->quickWidget->errors();
auto box = new QMessageBox(QMessageBox::Critical, QStringLiteral("QML Error"), QDebug::toString(ui->quickWidget->errors()));
box->setAttribute(Qt::WA_DeleteOnClose);
box->exec();
qApp->quit();
qFatal("A qml error occured %s", qPrintable(QDebug::toString(ui->quickWidget->errors())));
}

createAccountToolbox();
Expand Down
7 changes: 4 additions & 3 deletions src/gui/models/protocolitemmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ QVariant ProtocolItemModel::data(const QModelIndex &index, int role) const
|| status == SyncFileItem::FatalError
|| status == SyncFileItem::DetailError
|| status == SyncFileItem::BlacklistedError) {
return Resources::themeIcon(Theme::instance()->syncStateIconName(SyncResult{SyncResult::Error}));
return Resources::getCoreIcon(QStringLiteral("states/error"));
;
} else if (Progress::isWarningKind(status) || status == SyncFileItem::Excluded) {
return Resources::themeIcon(Theme::instance()->syncStateIconName(SyncResult{SyncResult::Problem}));
return Resources::getCoreIcon(QStringLiteral("states/information"));
} else {
return Resources::themeIcon(Theme::instance()->syncStateIconName(SyncResult{SyncResult::Success}));
return Resources::getCoreIcon(QStringLiteral("states/ok"));
}
}
break;
Expand Down
15 changes: 5 additions & 10 deletions src/gui/newwizard/setupwizardwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@
<item>
<widget class="QStackedWidget" name="contentWidget">
<widget class="QWidget" name="transitionPage">
<widget class="QProgressIndicator" name="transitionProgressIndicator" native="true">
<property name="geometry">
<rect>
<x>320</x>
<y>280</y>
<width>120</width>
<height>80</height>
</rect>
</property>
</widget>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QProgressIndicator" name="transitionProgressIndicator" native="true"/>
</item>
</layout>
</widget>
</widget>
</item>
Expand Down
5 changes: 5 additions & 0 deletions src/gui/tlserrordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ TlsErrorDialog::TlsErrorDialog(const QList<QSslError> &sslErrors, const QString

connect(_ui->buttonBox, &QDialogButtonBox::accepted, this, &TlsErrorDialog::accept);
connect(_ui->buttonBox, &QDialogButtonBox::rejected, this, &TlsErrorDialog::reject);

// Try to set the No-button (which will also emit the reject signal when cliced) as the default
if (QPushButton *noButton = _ui->buttonBox->button(QDialogButtonBox::No)) {
noButton->setDefault(true);
}
}

TlsErrorDialog::~TlsErrorDialog()
Expand Down
6 changes: 6 additions & 0 deletions src/libsync/theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject
protected:
Theme();

// compat with legacy themes
[[deprecated("Use Resources::themeUniversalIcon")]] auto themeUniversalIcon(const QString &iconName) const
{
return Resources::themeUniversalIcon(iconName);
}

signals:
void systrayUseMonoIconsChanged(bool);

Expand Down
9 changes: 7 additions & 2 deletions src/resources/resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@

#include <QDebug>
#include <QFileInfo>
#include <QLoggingCategory>
#include <QPalette>

using namespace OCC;
using namespace Resources;

Q_LOGGING_CATEGORY(lcResources, "sync.resoruces", QtInfoMsg)

namespace {

QString vanillaThemePath()
Expand Down Expand Up @@ -146,7 +150,7 @@ QIcon OCC::Resources::loadIcon(const QString &flavor, const QString &name, IconT
cached.addFile(pixmapName, {size, size});
} else if (size >= 128) {
if (!previousIcon.isEmpty()) {
qWarning() << "Upscaling:" << previousIcon << "to" << size;
qCWarning(lcResources) << "Upscaling:" << previousIcon << "to" << size;
cached.addPixmap(QPixmap(previousIcon).scaled({size, size}, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
}
Expand All @@ -156,7 +160,8 @@ QIcon OCC::Resources::loadIcon(const QString &flavor, const QString &name, IconT
if (!useCoreIcon && iconType == IconType::BrandedIconWithFallbackToVanillaIcon) {
return loadIcon(flavor, name, IconType::VanillaIcon);
}
qWarning() << "Failed to locate the icon" << name;
qCWarning(lcResources) << "Failed to locate the icon" << name;
Q_ASSERT(false);
}
return cached;
}
Expand Down
Loading

0 comments on commit 6d23434

Please sign in to comment.