[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    [Differential] [Accepted] D4795: Correctly load the Qt-native translations
From:       Josef Weidendorfer <noreply () phabricator ! kde ! org>
Date:       2017-02-27 21:11:25
Message-ID: 20170227211125.92606.54334.C71BCF17 () phabricator ! kde ! org
[Download RAW message or body]

weidendo accepted this revision.
weidendo added a comment.
This revision is now accepted and ready to land.


  > the things I'd like to more is whether my guess about Q_COREAPP_STARTUP_FUNCTION \
is correct  
  As far as I see, the Q_COREAPP_STARTUP_FUNCTION macro uses the \
Q_CONSTRUCTOR_FUNCTION macro.  According to https://wiki.qt.io/QtResources \
(Q_CONSTRUCTOR_FUNCTION uses the "constructor function trick"):  
  > The constructor function trick works only if the generated C++ file is compiled \
and linked to the main application directly. If the resources are used in a static \
library and the library is then linked to the main application, the constructor \
function will never get called. This is the by nature of C/C++ linking- functions and \
variables in libraries that are unused/uncalled from the final program are removed \
from the final binary (optimized out). If the resources are in a shared library, then \
the constructor function does get invoked.  
  So your guess is correct.

REPOSITORY
  R49 KCacheGrind

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D4795

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: ltoscano, #localization, weidendo
Cc: weidendo, aacid, #localization


[Attachment #3 (text/html)]

<table><tr><td style="">weidendo accepted this revision.<br />weidendo added a \
comment.<br />This revision is now accepted and ready to land. </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/D4795" \
rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote \
style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: \
4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>the things I&#039;d \
like to more is whether my guess about Q_COREAPP_STARTUP_FUNCTION is \
correct</p></blockquote>

<p>As far as I see, the Q_COREAPP_STARTUP_FUNCTION macro uses the \
Q_CONSTRUCTOR_FUNCTION macro.<br /> According to <a \
href="https://wiki.qt.io/QtResources" class="remarkup-link" target="_blank" \
rel="noreferrer">https://wiki.qt.io/QtResources</a> (Q_CONSTRUCTOR_FUNCTION uses the \
&quot;constructor function trick&quot;):</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: \
italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>The \
constructor function trick works only if the generated C++ file is compiled and \
linked to the main application directly. If the resources are used in a static \
library and the library is then linked to the main application, the constructor \
function will never get called. This is the by nature of C/C++ linking- functions and \
variables in libraries that are unused/uncalled from the final program are removed \
from the final binary (optimized out). If the resources are in a shared library, then \
the constructor function does get invoked.</p></blockquote>

<p>So your guess is correct.</p></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R49 KCacheGrind</div></div></div><br \
/><div><strong>BRANCH</strong><div><div>master</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D4795" \
rel="noreferrer">https://phabricator.kde.org/D4795</a></div></div><br \
/><div><strong>EMAIL PREFERENCES</strong><div><a \
href="https://phabricator.kde.org/settings/panel/emailpreferences/" \
rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br \
/><div><strong>To: </strong>ltoscano, Localization, weidendo<br /><strong>Cc: \
</strong>weidendo, aacid, Localization<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic