Commit f4f0986d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

React when theme color changed

parent 4e328879
Pipeline #159009 passed with stage
in 54 seconds
......@@ -57,7 +57,7 @@ set(LIBKDEPIM_LIB_VERSION "5.20.40")
set(LIBGRANTLEETHEME_LIB_VERSION "5.20.40")
set(PIMCOMMON_LIB_VERSION "5.20.40")
set(AKONADI_SEARCH_VERSION "5.20.40")
set(AKONADI_CONTACT_VERSION "5.20.40")
set(AKONADI_CONTACT_VERSION "5.20.41")
# Find KF5 package
find_package(KF5DBusAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
......
......@@ -303,6 +303,25 @@ MainWidget::MainWidget(KXMLGUIClient *guiClient, QWidget *parent)
initializeImportExportPlugin(guiClient->actionCollection());
QMetaObject::invokeMethod(this, &MainWidget::delayedInit, Qt::QueuedConnection);
updateQuickSearchText();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
connect(qApp, &QApplication::paletteChanged, this, &MainWidget::slotGeneralPaletteChanged);
#endif
}
void MainWidget::slotGeneralPaletteChanged()
{
mContactDetails->updateView();
mContactGroupDetails->updateView();
}
bool MainWidget::event(QEvent *e)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (e->type() == QEvent::ApplicationPaletteChange) {
slotGeneralPaletteChanged();
}
#endif
return QWidget::event(e);
}
void MainWidget::setFocusToTreeView()
......
......@@ -88,6 +88,9 @@ public Q_SLOTS:
void handleCommandLine(const QStringList &arguments);
protected:
Q_REQUIRED_RESULT bool event(QEvent *e) override;
private Q_SLOTS:
void slotImportExportActivated(PimCommon::AbstractGenericPluginInterface *interface);
void delayedInit();
......@@ -121,6 +124,7 @@ private:
void saveSplitterStates() const;
void restoreSplitterStates();
void initializeImportExportPlugin(KActionCollection *collection);
void slotGeneralPaletteChanged();
Akonadi::EntityTreeModel *entityTreeModel() const;
QAbstractItemModel *allContactsModel();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment