<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hello everyone,</p>
<p><br>
</p>
<p>I would like to access <span>QgisApp::instance() (<span>src/app/qgisapp.cpp)</span> from a provider like <span>QgsOgrProvider::extent()</span> (<span>src/core/providers/ogr/qgsogrprovider.cpp</span>. </span></p>
<p>Yet I cannot include "qgisapp.h" into the provider. <br>
</p>
<p><br>
</p>
<p>When looking for this information I found some inactivating preprocessor code block comments like this one (qgswfsdataitems.cpp):</p>
<p>#if 0<br>
</p>
<p></p>
<div>    // TODO: how to emit message from provider (which does not know about QgisApp)<br>
    QgisApp::instance()->messageBar()->pushMessage( tr( "Cannot copy style" ),<br>
        errorMsg,<br>
        Qgis::MessageLevel::Critical, messageTimeout() );<br>
#endif</div>
<p></p>
<p><br>
</p>
<p></p>
<div>Does anybody know what is the idea to access the current <span>QgisApp::instance() from outside the QgisApp realm?</span></div>
<div><span><br>
</span></div>
<div><span><br>
</span></div>
<div><span>Best regards, Tobias</span><br>
</div>
<font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)"> </span></font></span></font>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div><span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">--</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)"> </span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">ZAE
 Bayern</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Dipl.-Ing.
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Tobias Schmetzer</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Systementwicklung
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">|
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Systems Engineering</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Bereich
 Energiespeicherung </span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">|
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Division Energy Storage</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Walther-Meißner-Straße
 6</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">85748
 Garching</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)"> </span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Tel.:
 +49 89 329442-</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)"><span style="font-size:8pt">65</span><span style="font-size:8pt"></span></span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Fax:
 +49 89 329442-12</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Mobil
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">|
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Cell: +49
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">151 56964756</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">tobias</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">.</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">schmetzer</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">@zae-bayern.de</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">https://www.zae-bayern.de</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)"> </span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">ZAE
 Bayern</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Bayerisches
 Zentrum für Angewandte Energieforschung e. V. </span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">| Bavarian Center for Applied Energy Research</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Vorstand
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">|
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Board: Dr. Andreas Hauer (Vorsitzender
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">|
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Chairman), Dr. Hans-Peter Ebert</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Sitz
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">|
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Registered Office: Würzburg</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Registergericht
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">|
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Register Court: Amtsgericht Würzburg</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Registernummer
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="black"><span style="font-size:8pt; color:rgb(0,0,0)">|
</span></font><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Register Number: VR 1386</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)"> </span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span>
<div style="margin:0"><font style="font-family:Calibri,sans-serif,serif,"EmojiFont"" size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font style="font-family:Arial,sans-serif,serif,"EmojiFont"" size="1" face="Arial,sans-serif" color="#1F497D"><span style="font-size:8pt; color:rgb(0,0,0)">Hinweise
 zum Datenschutz unter https://www.zae-bayern.de/datenschutz</span></font></span></font></div>
<span style="color:rgb(0,0,0); font-size:8pt"></span></div>
<br>
</div>
</div>
</div>
</body>
</html>