<table><tr><td style="">mpyne created this revision.<br />mpyne added reviewers: Frameworks, graesslin.<br />Herald added a project: Frameworks.<br />Herald added a subscriber: kde-frameworks-devel.<br />mpyne requested review of this revision.
</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/D17647">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>After a recent system upgrade to Qt git <tt style="background: #ebebeb; font-size: 13px;">dev</tt> branch (for upcoming 5.13), kglobalaccel started to fail to build due to problems compiling a moc file. Oddly, all other frameworks in KF5 (except those depending upon kglobalaccel) compiled fine.</p>

<p>I spent some time looking into several potential Qt moc or other issues, but to save you all the time I wasted on it, the essence is that you shouldn't <tt style="background: #ebebeb; font-size: 13px;">#include "foo.moc"</tt> from within a C++ namespace. Previously this would have worked since only symbols relevant to the current C++ namespace were defined.</p>

<p>But with updated Qt, the moc generates files that rely on parts of the C++ standard library being available, and duly includes a line <tt style="background: #ebebeb; font-size: 13px;">#include <memory></tt>. At the top namespace level this works great. Including <tt style="background: #ebebeb; font-size: 13px;"><memory></tt> from within our own namespace works less well, producing error messages that cause LLVM to give up early.</p>

<p>I fix by just removing the entry since CMake is automoc'ing anyways. If we need to include the entry then moving it to the end of the file instead would probably work just as well. Note that moc is itself smart enough to capture the namespacing of the class we declare.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Completed build of KGlobalAccel, installs successfully, dependent modules install successfully, new Plasma desktop loads fine.</p>

<p>All 2 autotests still pass.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R268 KGlobalAccel</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17647">https://phabricator.kde.org/D17647</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/runtime/component.cpp</div></div></div><br /><div><strong>To: </strong>mpyne, Frameworks, graesslin<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>