<table><tr><td style="">aacid added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D22488">View Revision</a></tr></table><br /><div><div><p>Wouldn't it make more sense to fix in Qt?</p>

<p>Something like</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="diff" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp</span>
<span style="color: #000080">index 41fe649fc5..f86ad3c760 100644</span>
<span style="color: #a00000">--- a/src/gui/image/qicon.cpp</span>
<span style="color: #00a000">+++ b/src/gui/image/qicon.cpp</span>
<span style="color: #800080">@@ -1260,7 +1260,7 @@ QString QIcon::fallbackThemeName()</span>
 */
 void QIcon::setFallbackThemeName(const QString &name)
 {
<span style="color: #a00000">-    QIconLoader::instance()->setFallbackThemeName(name);</span>
<span style="color: #00a000">+    QIconLoader::instance(NoInializeNeeded)->setFallbackThemeName(name);</span>
 }
 
 /*!
<span style="color: #000080">diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp</span>
<span style="color: #000080">index 15ab1b3cd9..96dfd9163d 100644</span>
<span style="color: #a00000">--- a/src/gui/image/qiconloader.cpp</span>
<span style="color: #00a000">+++ b/src/gui/image/qiconloader.cpp</span>
<span style="color: #800080">@@ -125,10 +125,12 @@ void QIconLoader::ensureInitialized()</span>
     }
 }
 
<span style="color: #a00000">-QIconLoader *QIconLoader::instance()</span>
<span style="color: #00a000">+QIconLoader *QIconLoader::instance(InstanceOptions o)</span>
 {
<span style="color: #a00000">-   iconLoaderInstance()->ensureInitialized();</span>
<span style="color: #a00000">-   return iconLoaderInstance();</span>
<span style="color: #00a000">+    if (o == EnsureInitialized) {</span>
<span style="color: #00a000">+        iconLoaderInstance()->ensureInitialized();</span>
<span style="color: #00a000">+    }</span>
<span style="color: #00a000">+    return iconLoaderInstance();</span>
 }
 
 // Queries the system theme and invalidates existing
<span style="color: #000080">diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h</span>
<span style="color: #000080">index fac18b5d79..a69da4a5f7 100644</span>
<span style="color: #a00000">--- a/src/gui/image/qiconloader_p.h</span>
<span style="color: #00a000">+++ b/src/gui/image/qiconloader_p.h</span>
<span style="color: #800080">@@ -185,7 +185,11 @@ public:</span>
     void setFallbackSearchPaths(const QStringList &searchPaths);
     QStringList fallbackSearchPaths() const;
     QIconDirInfo dirInfo(int dirindex);
<span style="color: #a00000">-    static QIconLoader *instance();</span>
<span style="color: #00a000">+    enum InstanceOptions {</span>
<span style="color: #00a000">+        NoInializeNeeded = 0,</span>
<span style="color: #00a000">+        EnsureInitialized = 1</span>
<span style="color: #00a000">+    }</span>
<span style="color: #00a000">+    static QIconLoader *instance(InstanceOptions o = EnsureInitialized);</span>
     void updateSystemTheme();
     void invalidateKey() { m_themeKey++; }
     void ensureInitialized();</pre></div>

<p>I think this should be relatively easy to push though in Qt explaining that small ordering issue there is</p>

<p>Not sure it compiles, for some reason i can't compile Qt 5.15 branch right now</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R302 KIconThemes</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D22488">https://phabricator.kde.org/D22488</a></div></div><br /><div><strong>To: </strong>mart, Frameworks, Plasma<br /><strong>Cc: </strong>aacid, mlaurent, broulik, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns<br /></div>