summaryrefslogtreecommitdiff
blob: e861ce6c73f432b534733d08a32972157d2b4467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
From 5a5d7b57fee23d934d90989133f870404557ff6f Mon Sep 17 00:00:00 2001
From: Christoph Cullmann <cullmann@kde.org>
Date: Mon, 29 Mar 2021 19:41:56 +0200
Subject: [PATCH] Revert "add private header to avoid extern in .cpp file"

This reverts commit bd648dd0755d03dc01b267b3cdcec09b045da696.
---
 src/kiconloader.cpp |  7 ++-----
 src/kicontheme.cpp  |  4 +++-
 src/kicontheme_p.h  | 19 -------------------
 3 files changed, 5 insertions(+), 25 deletions(-)
 delete mode 100644 src/kicontheme_p.h

diff --git a/src/kiconloader.cpp b/src/kiconloader.cpp
index 3a6bf2b..33c378b 100644
--- a/src/kiconloader.cpp
+++ b/src/kiconloader.cpp
@@ -11,7 +11,6 @@
 */
 
 #include "kiconloader.h"
-#include "kicontheme_p.h"
 
 // kdecore
 #include <KConfigGroup>
@@ -384,6 +383,8 @@ public:
     bool mCustomPalette = false;
 };
 
+extern void initRCCIconTheme();
+
 class KIconLoaderGlobalData : public QObject
 {
     Q_OBJECT
@@ -391,10 +392,6 @@ class KIconLoaderGlobalData : public QObject
 public:
     KIconLoaderGlobalData()
     {
-        // we trigger the rcc loading & fallback theme setting here instead of the old way via Q_COREAPP_STARTUP_FUNCTION
-        // so that loading the icon engine plugin doesn't trigger changing the icon theme while loading the first icon
-        // if nothing else initialized this before.
-
         // ensure we load rcc files for application bundles (+ setup their theme)
         initRCCIconTheme();
 
diff --git a/src/kicontheme.cpp b/src/kicontheme.cpp
index af9fd81..8e499d2 100644
--- a/src/kicontheme.cpp
+++ b/src/kicontheme.cpp
@@ -10,7 +10,6 @@
 */
 
 #include "kicontheme.h"
-#include "kicontheme_p.h"
 
 #include "debug.h"
 
@@ -33,6 +32,9 @@
 
 Q_GLOBAL_STATIC(QString, _themeOverride)
 
+// Support for icon themes in RCC files.
+// The intended use case is standalone apps on Windows / MacOS / etc.
+// For this reason we use AppDataLocation: BINDIR/data on Windows, Resources on OS X
 void initRCCIconTheme()
 {
     const QString iconThemeRcc = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("icontheme.rcc"));
diff --git a/src/kicontheme_p.h b/src/kicontheme_p.h
deleted file mode 100644
index eea889f..0000000
--- a/src/kicontheme_p.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-    This file is part of the KDE libraries
-    SPDX-FileCopyrightText: 2021 Christoph Cullmann <cullmann@kde.org>
-
-    SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#ifndef KICONTHEME_P_H
-#define KICONTHEME_P_H
-
-/**
- * Support for icon themes in RCC files.
- * The intended use case is standalone apps on Windows / MacOS / etc.
- * For this reason we use AppDataLocation: BINDIR/data on Windows, Resources on OS X.
- * Will be triggered by KIconLoaderGlobalData construction.
- */
-void initRCCIconTheme();
-
-#endif
-- 
GitLab