Merge branch 'master' of invent.kde.org:system/dolphin

This commit is contained in:
Christoph Feck 2020-08-05 09:43:32 +02:00
commit 5c41350eec
3 changed files with 15 additions and 6 deletions

View file

@ -567,6 +567,7 @@
<caption xml:lang="ca">Gestió de fitxers al Dolphin</caption>
<caption xml:lang="ca-valencia">Gestió de fitxers al Dolphin</caption>
<caption xml:lang="cs">Správa souborů v Dolphinu</caption>
<caption xml:lang="da">Filhåndtering i Dolphin</caption>
<caption xml:lang="de">Dateiverwaltung mit Dolphin</caption>
<caption xml:lang="el">Διαχείριση αρχείων στο Dolphin</caption>
<caption xml:lang="en-GB">File management in Dolphin</caption>

View file

@ -272,12 +272,14 @@ void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList&
allTags.sort(Qt::CaseInsensitive);
allTags.removeDuplicates();
const bool onlyOneTag = allTags.count() == 1;
for (const QString& tagName : qAsConst(allTags)) {
QAction* action = m_tagsSelector->menu()->addAction(QIcon::fromTheme(QStringLiteral("tag")), tagName);
action->setCheckable(true);
action->setChecked(m_searchTags.contains(tagName));
connect(action, &QAction::triggered, this, [this, tagName](bool isChecked) {
connect(action, &QAction::triggered, this, [this, tagName, onlyOneTag](bool isChecked) {
if (isChecked) {
addSearchTag(tagName);
} else {
@ -285,7 +287,9 @@ void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList&
}
emit facetChanged();
m_tagsSelector->menu()->show();
if (!onlyOneTag) {
m_tagsSelector->menu()->show();
}
});
}

View file

@ -131,10 +131,14 @@ void PreviewsSettingsPage::applySettings()
KConfigGroup globalConfig(KSharedConfig::openConfig(), QStringLiteral("PreviewSettings"));
globalConfig.writeEntry("Plugins", m_enabledPreviewPlugins);
const qulonglong maximumLocalSize = static_cast<qulonglong>(m_localFileSizeBox->value()) * 1024 * 1024;
globalConfig.writeEntry("MaximumSize",
maximumLocalSize,
KConfigBase::Normal | KConfigBase::Global);
if (!m_localFileSizeBox->value()) {
globalConfig.deleteEntry("MaximumSize", KConfigBase::Normal | KConfigBase::Global);
} else {
const qulonglong maximumLocalSize = static_cast<qulonglong>(m_localFileSizeBox->value()) * 1024 * 1024;
globalConfig.writeEntry("MaximumSize",
maximumLocalSize,
KConfigBase::Normal | KConfigBase::Global);
}
const qulonglong maximumRemoteSize = static_cast<qulonglong>(m_remoteFileSizeBox->value()) * 1024 * 1024;
globalConfig.writeEntry("MaximumRemoteSize",