Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix half-translated GUI strings on Windows #7489

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
00c11b2
Only display server name in multiple override servers dropdown
claucambra Oct 24, 2024
ab31f87
Merge pull request #7413 from nextcloud/bugfix/display-multi-enforced…
claucambra Oct 28, 2024
9194a19
Bump cpp-linter/cpp-linter-action from 2.13.2 to 2.13.3
dependabot[bot] Oct 21, 2024
ad492ef
Merge pull request #7379 from nextcloud/dependabot/github_actions/cpp…
claucambra Oct 28, 2024
d3cc398
Fix(l10n): Update translations from Transifex
nextcloud-bot Oct 29, 2024
d038ae8
Remove call to wantsAccountSaved when clearing the cookies.
camilasan Oct 28, 2024
33cc5a2
Validate http_user value before assigning it to user in the config file.
camilasan Oct 28, 2024
d080261
Use const auto.
camilasan Oct 28, 2024
eea2153
Merge pull request #7426 from nextcloud/bugfix/accounts
camilasan Oct 29, 2024
88e94ca
Fix(l10n): Update translations from Transifex
nextcloud-bot Oct 30, 2024
6af7f81
Fix(l10n): Update translations from Transifex
nextcloud-bot Oct 31, 2024
817a161
Update share link for AppImage tool.
camilasan Oct 31, 2024
569a694
Merge pull request #7439 from nextcloud/bugfix/appimage
mgallien Oct 31, 2024
b27d360
Add xml-escaped version of application vendor variable in CMakeLists
claucambra Oct 28, 2024
a57eb77
Use xml-escaped application vendor in info plist, fixing code-signing…
claucambra Oct 28, 2024
a5b6df9
Merge pull request #7423 from nextcloud/bugfix/escaped-infoplist-xml-…
claucambra Oct 31, 2024
a58e64f
Remove checks for the update channel from the getter function.
camilasan Oct 17, 2024
bf09295
Change the list of update channels when server capabilities change.
camilasan Oct 16, 2024
85a3658
Do not override the subscription value if one of the account has ente…
camilasan Oct 17, 2024
664a131
Do not override the channels list if one of the account has enterprise.
camilasan Oct 17, 2024
d0f87c3
Save serverHasValidsubcription in the account.
camilasan Oct 17, 2024
a7144ca
Fix logic for initial load of update channels and priority for user w…
camilasan Oct 17, 2024
b9b9813
Update config value when serverHasValidSubscription when accounts are…
camilasan Oct 17, 2024
60e04bd
Address PR feedback.
camilasan Oct 17, 2024
19db552
Remove check in setServerHasValidSubscription.
camilasan Oct 31, 2024
9b33cb5
Fix compiling when BUILD_UPDATER is set to OFF.
camilasan Oct 31, 2024
eb50768
Merge pull request #7350 from nextcloud/bugfix/updatechannels
mgallien Oct 31, 2024
b39f4aa
Do not alter the user's debug and expiration settings when changing t…
claucambra Oct 25, 2024
f6b6e23
Merge pull request #7418 from nextcloud/bugfix/change-log-settings-fix
claucambra Oct 31, 2024
416c191
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 1, 2024
1c979d2
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 2, 2024
3e04869
Bump platisd/clang-tidy-pr-comments from 1.5.0 to 1.5.1
dependabot[bot] Oct 28, 2024
64a3e84
Merge pull request #7428 from nextcloud/dependabot/github_actions/pla…
claucambra Nov 3, 2024
7f4b86f
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 3, 2024
8f84745
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 4, 2024
e8defb9
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 5, 2024
2214c1d
Do not attempt to reach out to FileProviderExt every single time we w…
claucambra Oct 23, 2024
eae8e76
Slash semaphore wait delta on reachability down to 1 second
claucambra Oct 23, 2024
4ecaed4
Increase reachability retry timeout
claucambra Oct 23, 2024
c48ecf8
Store reachability of FileProviderExt by respective account
claucambra Oct 23, 2024
01da699
Merge pull request #7397 from nextcloud/bugfix/mac-vfs-syncstatechang…
claucambra Nov 5, 2024
4f8a83b
Start counting storage usage from 0 for macOS virtual files account
claucambra Oct 23, 2024
a255c1f
Merge pull request #7401 from nextcloud/bugfix/materialised-storage-c…
claucambra Nov 5, 2024
7142f55
Update copyright year in macOS info.plist template
claucambra Oct 23, 2024
e1449cc
Merge pull request #7398 from nextcloud/bugfix/copyright-year-macOS
claucambra Nov 5, 2024
c75a324
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 7, 2024
fa33dd6
Only present proxy password delete error if it is not a "does not exi…
claucambra Nov 6, 2024
c0ffd38
Merge pull request #7468 from nextcloud/bugfix/delete-proxypass-whene…
claucambra Nov 8, 2024
be314c3
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 9, 2024
279b8e4
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 10, 2024
b3f2930
Fix(l10n): Update translations from Transifex
nextcloud-bot Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/[email protected].2
- uses: cpp-linter/[email protected].3
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
/usr/bin/git config --global --add safe.directory "$GITHUB_WORKSPACE"
/usr/bin/git diff -U0 HEAD^ | clang-tidy-diff-15.py -checks='-*,modernize-use-auto,modernize-use-using,modernize-use-nodiscard,modernize-use-nullptr,modernize-use-override,cppcoreguidelines-pro-type-static-cast-downcast' -p1 -path build -export-fixes clang-tidy-result/fixes.yml
- name: Run clang-tidy-pr-comments action
uses: platisd/[email protected].0 # >1.4.3 switches to composite method w/ a forced python version and breaks things: https://github.com/actions/setup-python/issues/871
uses: platisd/[email protected].1 # >1.4.3 switches to composite method w/ a forced python version and breaks things: https://github.com/actions/setup-python/issues/871
with:
# The GitHub token (or a personal access token)
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ string(REPLACE "&" "&" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME}")
string(REPLACE "<" "&lt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
string(REPLACE ">" "&gt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")

string(REPLACE "&" "&amp;" APPLICATION_VENDOR_XML_ESCAPED "${APPLICATION_VENDOR}")
string(REPLACE "<" "&lt;" APPLICATION_VENDOR_XML_ESCAPED "${APPLICATION_VENDOR_XML_ESCAPED}")
string(REPLACE ">" "&gt;" APPLICATION_VENDOR_XML_ESCAPED "${APPLICATION_VENDOR_XML_ESCAPED}")

if (NOT DEFINED LINUX_PACKAGE_SHORTNAME)
set(LINUX_PACKAGE_SHORTNAME "${APPLICATION_SHORTNAME}")
endif()
Expand Down
2 changes: 1 addition & 1 deletion admin/linux/build-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export LD_LIBRARY_PATH=/app/usr/lib:${QT_BASE_DIR}/lib:/usr/local/lib/x86_64-lin
# Use linuxdeploy-plugin-qt to deploy qt dependencies
export APPIMAGE_NAME=linuxdeploy-plugin-qt-x86_64.AppImage
# TODO: this share link is supposed to be a workaround, we need an url pointing to github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/tag/continuous, see github.com/linuxdeploy/linuxdeploy-plugin-qt/pull/186
wget -O ${APPIMAGE_NAME} --ca-directory=/etc/ssl/certs -c "https://cloud.nextcloud.com/s/TxcGkDiSs2enKoN/download/linuxdeploy-plugin-qt-x86_64.AppImage"
wget -O ${APPIMAGE_NAME} --ca-directory=/etc/ssl/certs -c "https://cloud.nextcloud.com/s/2TDi3Md257Lb8Wf/download/linuxdeploy-plugin-qt-x86_64.AppImage"
chmod a+x ${APPIMAGE_NAME}
./${APPIMAGE_NAME} --appimage-extract
rm ./${APPIMAGE_NAME}
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/MacOSXBundleInfo.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<key>CFBundleShortVersionString</key>
<string>@MIRALL_VERSION_STRING@</string>
<key>NSHumanReadableCopyright</key>
<string>(C) 2014-2022 @APPLICATION_VENDOR@</string>
<string>(C) 2014-2024 @APPLICATION_VENDOR_XML_ESCAPED@</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>NSRequiresAquaSystemAppearance</key>
Expand Down
40 changes: 37 additions & 3 deletions src/gui/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s
settings.setValue(QLatin1String(serverVersionC), acc->_serverVersion);
settings.setValue(QLatin1String(serverColorC), acc->_serverColor);
settings.setValue(QLatin1String(serverTextColorC), acc->_serverTextColor);
settings.setValue(QLatin1String(serverHasValidSubscriptionC), acc->capabilities().serverHasValidSubscription());
settings.setValue(QLatin1String(serverHasValidSubscriptionC), acc->serverHasValidSubscription());

if (!acc->_skipE2eeMetadataChecksumValidation) {
settings.remove(QLatin1String(skipE2eeMetadataChecksumValidationC));
Expand All @@ -363,6 +363,8 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s
connect(job, &QKeychain::Job::finished, this, [](const QKeychain::Job *const incomingJob) {
if (incomingJob->error() == QKeychain::NoError) {
qCInfo(lcAccountManager) << "Deleted proxy password from keychain";
} else if (incomingJob->error() == QKeychain::EntryNotFound) {
qCDebug(lcAccountManager) << "Proxy password not found in keychain, can't delete";
} else {
qCWarning(lcAccountManager) << "Failed to delete proxy password to keychain" << incomingJob->errorString();
}
Expand Down Expand Up @@ -393,13 +395,18 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s

const auto settingsMapKeys = acc->_settingsMap.keys();
for (const auto &key : settingsMapKeys) {
if (!acc->_settingsMap.value(key).isValid()) {
continue;
}

settings.setValue(key, acc->_settingsMap.value(key));
}
settings.setValue(QLatin1String(authTypeC), acc->_credentials->authType());

// HACK: Save http_user also as user
if (acc->_settingsMap.contains(httpUserC)) {
settings.setValue(userC, acc->_settingsMap.value(httpUserC));
const auto settingsMap = acc->_settingsMap;
if (settingsMap.contains(httpUserC) && settingsMap.value(httpUserC).isValid()) {
settings.setValue(userC, settingsMap.value(httpUserC));
}
}

Expand Down Expand Up @@ -606,10 +613,30 @@ void AccountManager::deleteAccount(OCC::AccountState *account)

account->account()->deleteAppToken();

// clean up config from subscriptions if the account removed was the only with valid subscription
if (account->account()->serverHasValidSubscription()) {
updateServerHasValidSubscriptionConfig();
}

emit accountSyncConnectionRemoved(account);
emit accountRemoved(account);
}

void AccountManager::updateServerHasValidSubscriptionConfig()
{
auto serverHasValidSubscription = false;
for (const auto &account : _accounts) {
if (!account->account()->serverHasValidSubscription()) {
continue;
}

serverHasValidSubscription = true;
break;
}

ConfigFile().setServerHasValidSubscription(serverHasValidSubscription);
}

AccountPtr AccountManager::createAccount()
{
const auto acc = Account::create();
Expand Down Expand Up @@ -665,10 +692,17 @@ void AccountManager::addAccountState(AccountState *const accountState)
Q_ASSERT(accountState->account());

QObject::connect(accountState->account().data(), &Account::wantsAccountSaved, this, &AccountManager::saveAccount);
QObject::connect(accountState->account().data(), &Account::capabilitiesChanged, this, &AccountManager::capabilitiesChanged);

AccountStatePtr ptr(accountState);
_accounts << ptr;
ptr->trySignIn();

// update config subscriptions if the account added is the only with valid subscription
if (accountState->account()->serverHasValidSubscription() && !ConfigFile().serverHasValidSubscription()) {
updateServerHasValidSubscriptionConfig();
}

emit accountAdded(accountState);
}

Expand Down
4 changes: 4 additions & 0 deletions src/gui/accountmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#pragma once

#include "account.h"

Check failure on line 17 in src/gui/accountmanager.h

View workflow job for this annotation

GitHub Actions / build

src/gui/accountmanager.h:17:10 [clang-diagnostic-error]

'account.h' file not found
#include "accountstate.h"

namespace OCC {
Expand Down Expand Up @@ -114,6 +114,7 @@
void accountSyncConnectionRemoved(OCC::AccountState *account);
void removeAccountFolders(OCC::AccountState *account);
void forceLegacyImportChanged();
void capabilitiesChanged();

private:
// saving and loading Account to settings
Expand All @@ -128,6 +129,9 @@
// Adds an account to the tracked list, emitting accountAdded()
void addAccountState(AccountState *const accountState);

// update config serverHasValidSubscription when accounts list changes
void updateServerHasValidSubscriptionConfig();

AccountManager() = default;
QList<AccountStatePtr> _accounts;
/// Account ids from settings that weren't read
Expand Down
2 changes: 1 addition & 1 deletion src/gui/creds/webflowcredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void WebFlowCredentials::forgetSensitiveData() {

_account->deleteAppPassword();

const QString kck = keychainKey(_account->url().toString(), _user, _account->id());
const auto kck = keychainKey(_account->url().toString(), _user, _account->id());
if (kck.isEmpty()) {
qCDebug(lcWebFlowCredentials()) << "InvalidateToken: User is empty, bailing out!";
return;
Expand Down
22 changes: 15 additions & 7 deletions src/gui/generalsettings.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*

Check notice on line 1 in src/gui/generalsettings.cpp

View workflow job for this annotation

GitHub Actions / build

Run clang-format on src/gui/generalsettings.cpp

File src/gui/generalsettings.cpp does not conform to Custom style guidelines. (lines 294)
* Copyright (C) by Daniel Molkentin <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -244,6 +244,10 @@
// accountAdded means the wizard was finished and the wizard might change some options.
connect(AccountManager::instance(), &AccountManager::accountAdded, this, &GeneralSettings::loadMiscSettings);

#if defined(BUILD_UPDATER)
loadUpdateChannelsList();
#endif

customizeStyle();
}

Expand Down Expand Up @@ -284,18 +288,22 @@
_ui->stopExistingFolderNowBigSyncCheckBox->setChecked(_ui->existingFolderLimitCheckBox->isChecked() && cfgFile.stopSyncingExistingFoldersOverLimit());
_ui->newExternalStorage->setChecked(cfgFile.confirmExternalStorage());
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
}

#if defined(BUILD_UPDATER)
void GeneralSettings::loadUpdateChannelsList() {
ConfigFile cfgFile;
const auto validUpdateChannels = cfgFile.validUpdateChannels();
_ui->updateChannel->clear();
_ui->updateChannel->addItems(validUpdateChannels);
const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(cfgFile.currentUpdateChannel());
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0);
connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged);
#endif
if (_currentUpdateChannelList.isEmpty() || (_currentUpdateChannelList != validUpdateChannels && !cfgFile.serverHasValidSubscription())) {
_currentUpdateChannelList = validUpdateChannels;
_ui->updateChannel->clear();
_ui->updateChannel->addItems(_currentUpdateChannelList);
const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel());
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0);
connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged);
}
}

#if defined(BUILD_UPDATER)
void GeneralSettings::slotUpdateInfo()
{
ConfigFile config;
Expand Down
5 changes: 5 additions & 0 deletions src/gui/generalsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifndef MIRALL_GENERALSETTINGS_H
#define MIRALL_GENERALSETTINGS_H

#include "config.h"

Check failure on line 18 in src/gui/generalsettings.h

View workflow job for this annotation

GitHub Actions / build

src/gui/generalsettings.h:18:10 [clang-diagnostic-error]

'config.h' file not found

#include <QWidget>
#include <QPointer>
Expand All @@ -23,6 +23,7 @@
namespace OCC {
class IgnoreListEditor;
class SyncLogDialog;
class AccountState;

namespace Ui {
class GeneralSettings;
Expand All @@ -43,6 +44,9 @@

public slots:
void slotStyleChanged();
#if defined(BUILD_UPDATER)
void loadUpdateChannelsList();
#endif

private slots:
void saveMiscSettings();
Expand All @@ -67,6 +71,7 @@
Ui::GeneralSettings *_ui;
QPointer<IgnoreListEditor> _ignoreEditor;
bool _currentlyLoading = false;
QStringList _currentUpdateChannelList;
};


Expand Down
5 changes: 3 additions & 2 deletions src/gui/macOS/fileprovidersettingscontroller_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,17 @@ void enumerateMaterialisedFilesForDomainManager(NSFileProviderManager * const ma
const auto qDomainIdentifier = QString::fromNSString(domain.identifier);
QVector<FileProviderItemMetadata> qMaterialisedItems;
qMaterialisedItems.reserve(items.count);
unsigned long long storageUsage = 0;
for (const id<NSFileProviderItem> item in items) {
const auto itemMetadata = FileProviderItemMetadata::fromNSFileProviderItem(item, qDomainIdentifier);
const auto storageUsage = _storageUsage.value(qDomainIdentifier) + itemMetadata.documentSize();
storageUsage += itemMetadata.documentSize();
qCDebug(lcFileProviderSettingsController) << "Adding item" << itemMetadata.identifier()
<< "with size" << itemMetadata.documentSize()
<< "to storage usage for account" << qDomainIdentifier
<< "with total size" << storageUsage;
qMaterialisedItems.append(itemMetadata);
_storageUsage.insert(qDomainIdentifier, storageUsage);
}
_storageUsage.insert(qDomainIdentifier, storageUsage);
_materialisedFiles.insert(qDomainIdentifier, qMaterialisedItems);

emit q->localStorageUsageForAccountChanged(qDomainIdentifier);
Expand Down
4 changes: 3 additions & 1 deletion src/gui/macOS/fileproviderxpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
* for more details.
*/

#include <QObject>

Check failure on line 15 in src/gui/macOS/fileproviderxpc.h

View workflow job for this annotation

GitHub Actions / build

src/gui/macOS/fileproviderxpc.h:15:10 [clang-diagnostic-error]

'QObject' file not found
#include <QHash>
#include <QDateTime>

#include "accountstate.h"

Expand All @@ -34,7 +35,7 @@
public:
explicit FileProviderXPC(QObject *parent = nullptr);

[[nodiscard]] bool fileProviderExtReachable(const QString &extensionAccountId) const;
[[nodiscard]] bool fileProviderExtReachable(const QString &extensionAccountId);

// Returns enabled and set state of fast enumeration for the given extension
[[nodiscard]] std::optional<std::pair<bool, bool>> fastEnumerationStateForExtension(const QString &extensionAccountId) const;
Expand All @@ -53,6 +54,7 @@

private:
QHash<QString, void*> _clientCommServices;
QHash<QString, QDateTime> _unreachableAccountExtensions;
};

} // namespace OCC::Mac
20 changes: 18 additions & 2 deletions src/gui/macOS/fileproviderxpc_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#include "gui/macOS/fileproviderxpc_mac_utils.h"

namespace {
constexpr int64_t semaphoreWaitDelta = 3000000000; // 3 seconds
constexpr int64_t semaphoreWaitDelta = 1000000000; // 1 seconds
constexpr auto reachableRetryTimeout = 300; // seconds
}

namespace OCC::Mac {
Expand Down Expand Up @@ -143,19 +144,34 @@
}
}

bool FileProviderXPC::fileProviderExtReachable(const QString &extensionAccountId) const
bool FileProviderXPC::fileProviderExtReachable(const QString &extensionAccountId)
{
const auto lastUnreachableTime = _unreachableAccountExtensions.value(extensionAccountId);
if (lastUnreachableTime.isValid() && lastUnreachableTime.secsTo(QDateTime::currentDateTime()) < ::reachableRetryTimeout) {
qCInfo(lcFileProviderXPC) << "File provider extension was unreachable less than a minute ago. "
<< "Not checking again";
return false;
}

const auto service = (NSObject<ClientCommunicationProtocol> *)_clientCommServices.value(extensionAccountId);
if (service == nil) {
return false;
}

__block auto response = false;
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
[service getExtensionAccountIdWithCompletionHandler:^(NSString *const, NSError *const) {
response = true;
dispatch_semaphore_signal(semaphore);
}];
dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, semaphoreWaitDelta));

if (response) {
_unreachableAccountExtensions.remove(extensionAccountId);
} else {
qCWarning(lcFileProviderXPC) << "Could not reach file provider extension.";
_unreachableAccountExtensions.insert(extensionAccountId, QDateTime::currentDateTime());
}
return response;
}

Expand Down
11 changes: 9 additions & 2 deletions src/gui/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,13 @@
// Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching)
connect(this, &SettingsDialog::styleChanged, generalSettings, &GeneralSettings::slotStyleChanged);

#if defined(BUILD_UPDATER)
connect(AccountManager::instance(), &AccountManager::accountAdded, generalSettings, &GeneralSettings::loadUpdateChannelsList);
connect(AccountManager::instance(), &AccountManager::accountRemoved, generalSettings, &GeneralSettings::loadUpdateChannelsList);
connect(AccountManager::instance(), &AccountManager::capabilitiesChanged, generalSettings, &GeneralSettings::loadUpdateChannelsList);
#endif

QAction *networkAction = createColorAwareAction(QLatin1String(":/client/theme/network.svg"), tr("Network"));

Check warning on line 137 in src/gui/settingsdialog.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/settingsdialog.cpp:137:14 [cppcoreguidelines-init-variables]

variable 'networkAction' is not initialized
_actionGroup->addAction(networkAction);
_toolBar->addAction(networkAction);
auto *networkSettings = new NetworkSettings;
Expand All @@ -137,8 +143,9 @@
_actionGroupWidgets.insert(generalAction, generalSettings);
_actionGroupWidgets.insert(networkAction, networkSettings);

foreach(auto ai, AccountManager::instance()->accounts()) {
accountAdded(ai.data());
const auto accountsList = AccountManager::instance()->accounts();
for (const auto &account : accountsList) {
accountAdded(account.data());
}

QTimer::singleShot(1, this, &SettingsDialog::showFirstPage);
Expand Down
4 changes: 2 additions & 2 deletions src/gui/wizard/owncloudadvancedsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* for more details.
*/

#include <QDir>

Check failure on line 16 in src/gui/wizard/owncloudadvancedsetuppage.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/wizard/owncloudadvancedsetuppage.cpp:16:10 [clang-diagnostic-error]

'QDir' file not found
#include <QFileDialog>
#include <QUrl>
#include <QTimer>
Expand Down Expand Up @@ -355,8 +355,8 @@

QUrl OwncloudAdvancedSetupPage::serverUrl() const
{
const QString urlString = dynamic_cast<OwncloudWizard *>(wizard())->ocUrl();
const QString user = dynamic_cast<OwncloudWizard *>(wizard())->getCredentials()->user();
const auto urlString = dynamic_cast<OwncloudWizard *>(wizard())->ocUrl();
const auto user = dynamic_cast<OwncloudWizard *>(wizard())->getCredentials()->user();

QUrl url(urlString);
url.setUserName(user);
Expand Down
3 changes: 1 addition & 2 deletions src/gui/wizard/owncloudsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* for more details.
*/

#include <QDir>

Check failure on line 16 in src/gui/wizard/owncloudsetuppage.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/wizard/owncloudsetuppage.cpp:16:10 [clang-diagnostic-error]

'QDir' file not found
#include <QFileDialog>
#include <QUrl>
#include <QTimer>
Expand Down Expand Up @@ -63,8 +63,7 @@
const auto serverObject = serverJson.toObject();
const auto serverName = serverObject.value("name").toString();
const auto serverUrl = serverObject.value("url").toString();
const auto serverDisplayString = QString("%1 (%2)").arg(serverName, serverUrl);
_ui.comboBox->addItem(serverDisplayString, serverUrl);
_ui.comboBox->addItem(serverName, serverUrl);
}
} else if (theme->forceOverrideServerUrl()) {
_ui.comboBox->hide();
Expand Down
Loading
Loading