https://bugs.kde.org/show_bug.cgi?id=411197
vialav <d...@bk.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |d...@bk.ru --- Comment #1 from vialav <d...@bk.ru> --- Hi, Raphael, I've stumbled upon the same issue, and solved it this way: - clone the falkon repo, and, - revert commit f792104be55fca03ad17cdc4244aafce47d0914e (or apply the patch below), which is essentially what you've asked for (the only lost is the ability to remove locally installed themes, which I'm sure you could live without), - compile it without Python plugins support (see below); There is a caveat, however, that you most likely would need to revert commit 479933e095168d07a54913f88642cfed4828c167 to compile it with PySide2 << 5.12, if you want Python plugins support under Qt 5.9.6. Be aware that last revert needs some extra "polishing" plus back-porting of the two special commits-fixes "from a future version" to alleviate a bug in PySide2 I'm myself a happy user of the latest Falkon and nearly latest the KDE Plasma, all are the manually compiled Ubuntu system packages under Qt 5.9.5 LTS ;-) --- src/lib/preferences/thememanager.cpp +++ src/lib/preferences/thememanager.cpp @@ -26,17 +26,15 @@ #include "mainapplication.h" #include <QDir> -#include <QMessageBox> ThemeManager::ThemeManager(QWidget* parent, Preferences* preferences) - : QWidget(parent) + : QWidget() , ui(new Ui::ThemeManager) , m_preferences(preferences) { ui->setupUi(parent); ui->listWidget->setLayoutDirection(Qt::LeftToRight); ui->license->hide(); - ui->remove->setIcon(QIcon::fromTheme(QSL("edit-delete"))); Settings settings; settings.beginGroup("Themes"); @@ -69,7 +67,6 @@ ThemeManager::ThemeManager(QWidget* pare connect(ui->listWidget, &QListWidget::currentItemChanged, this, &ThemeManager::currentChanged); connect(ui->license, &ClickableLabel::clicked, this, &ThemeManager::showLicense); - connect(ui->remove, &QPushButton::clicked, this, &ThemeManager::removeTheme); currentChanged(); } @@ -88,25 +85,6 @@ void ThemeManager::showLicense() v->show(); } -void ThemeManager::removeTheme() -{ - QListWidgetItem* currentItem = ui->listWidget->currentItem(); - if (!currentItem) { - return; - } - Theme currentTheme = m_themeHash[currentItem->data(Qt::UserRole).toString()]; - - const auto button = QMessageBox::warning(this, tr("Confirmation"), - tr("Are you sure you want to remove '%1'?").arg(currentTheme.name), - QMessageBox::Yes | QMessageBox::No); - if (button != QMessageBox::Yes) { - return; - } - - QDir(currentTheme.themePath).removeRecursively(); - delete currentItem; -} - void ThemeManager::currentChanged() { QListWidgetItem* currentItem = ui->listWidget->currentItem(); @@ -120,7 +98,6 @@ void ThemeManager::currentChanged() ui->author->setText(currentTheme.author); ui->description->setText(currentTheme.description); ui->license->setHidden(currentTheme.license.isEmpty()); - ui->remove->setEnabled(QFileInfo(currentTheme.themePath).isWritable()); } ThemeManager::Theme ThemeManager::parseTheme(const QString &path, const QString &name) @@ -137,7 +114,6 @@ ThemeManager::Theme ThemeManager::parseT info.name = metadata.name(); info.description = metadata.comment(); info.author = metadata.value(QSL("X-Falkon-Author")).toString(); - info.themePath = path.chopped(1); const QString iconName = metadata.icon(); if (!iconName.isEmpty()) { --- src/lib/preferences/thememanager.h +++ src/lib/preferences/thememanager.h @@ -45,7 +45,6 @@ public: private Q_SLOTS: void currentChanged(); void showLicense(); - void removeTheme(); private: struct Theme { @@ -55,7 +54,6 @@ private: QString author; QString description; QString license; - QString themePath; }; Theme parseTheme(const QString &path, const QString &name); -- You are receiving this mail because: You are watching all bug changes.