<table><tr><td style="">rjvbb 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/D10415" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D10415#203663" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D10415#203663</a>, <a href="https://phabricator.kde.org/p/sbragin/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@sbragin</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>It does work. The old one uses deprecated methods, doesn't work properly and can not be even compiled, in fact.</p></div>
</blockquote>
<p>How so? I have been building Okular on Mac for a long time (IIRC since before the master branch was KF5 based) and the only change I currently make to utils.cpp is</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/core/utils.cpp b/core/utils.cpp</span>
<span style="color: #000080">index c9bfc2d56be26ee8a49164eb93f566352adb0696..b8c955fef9a4de7659632d7ee509961b4a540937 100644</span>
<span style="color: #a00000">--- a/core/utils.cpp</span>
<span style="color: #00a000">+++ b/core/utils.cpp</span>
<span style="color: #800080">@@ -134,7 +134,7 @@ QSizeF Utils::realDpi(QWidget* widgetOnScreen)</span>
return err;
}
<span style="color: #a00000">-double Utils::realDpiX()</span>
<span style="color: #00a000">+static double realDpiX()</span>
{
double x,y;
CGDisplayErr err = GetDisplayDPI( CGDisplayCurrentMode(kCGDirectMainDisplay),
<span style="color: #800080">@@ -144,7 +144,7 @@ double Utils::realDpiX()</span>
return err == CGDisplayNoErr ? x : 72.0;
}
<span style="color: #a00000">-double Utils::realDpiY()</span>
<span style="color: #00a000">+static double realDpiY()</span>
{
double x,y;
CGDisplayErr err = GetDisplayDPI( CGDisplayCurrentMode(kCGDirectMainDisplay),</pre></div>
<p>Which is probably the equivalent of the proposed change :) The resulting code compiles, however, on 10.9.5 and newer (IIRC also on 10.13).</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>Does it apply also [...] on all the supported versions of macOS?</p></blockquote>
<p>What are the supported versions of OS X anyway, beyond those called macOS? All versions that run an unpatched minimum Qt version (that would mean OS X 10.9)?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10415" rel="noreferrer">https://phabricator.kde.org/D10415</a></div></div><br /><div><strong>To: </strong>sbragin, Okular<br /><strong>Cc: </strong>rjvbb, cullmann, aacid, kde-mac, ltoscano, Okular, michaelweghorn, ngraham<br /></div>