Fixing QNetworkAccessManager use

Boudewijn Rempt boud at valdyas.org
Wed Feb 19 13:30:35 GMT 2020


On woensdag 19 februari 2020 14:09:06 CET Friedrich W. H. Kossebau wrote:
> Am Mittwoch, 19. Februar 2020, 08:05:01 CET schrieb Ben Cooksley:
> > On Mon, Feb 3, 2020 at 7:42 AM Volker Krause <vkrause at kde.org> wrote:
> > > It would also help to know where specifically we have that problem, so we
> > > can actually solve it, and so we can figure out why we failed to fix this
> > > there earlier.
> > 
> > Just bringing this up again - it seems we've not had much movement on
> > this aside from the Wiki page.
> 
> The wiki page currently still just recommends to set
> "networkAccessManger->setAttribute(QNetworkRequest::FollowRedirectsAttribute, 
> true);"
> 


Which confuses me a bit, because that doesn't build? 

[ 44%] Building CXX object libs/ui/CMakeFiles/kritaui.dir/KisNetworkAccessManager.cpp.o
/home/boud/dev/krita/libs/ui/KisNetworkAccessManager.cpp: In constructor ‘KisNetworkAccessManager::KisNetworkAccessManager(QObject*)’:
/home/boud/dev/krita/libs/ui/KisNetworkAccessManager.cpp:30:5: error: ‘setAttribute’ was not declared in this scope
     setAttribute(QNetworkRequest::NoLessSafeRedirectPolicy, true);
     ^~~~~~~~~~~~
/home/boud/dev/krita/libs/ui/KisNetworkAccessManager.cpp:30:5: note: suggested alternative: ‘setstate’
     setAttribute(QNetworkRequest::NoLessSafeRedirectPolicy, true);
     ^~~~~~~~~~~~

Shouldn't it be setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);

-- 
https://www.krita.org







More information about the kde-core-devel mailing list