<div dir="ltr">Hey all, in cleaning up libqapt for the KDE review board I'm wanting to kill these InstallProtect() deprecation warnings I'm seeing. Here's what I mean:<div><br></div><div><div>[ 14%] Building CXX object src/CMakeFiles/qapt.dir/backend.o</div>

<div>/home/manchicken/Documents/Devel/kubuntu/libqapt/src/backend.cpp: In member function ‘bool QApt::Backend::loadSelections(const QString&)’:</div><div>/home/manchicken/Documents/Devel/kubuntu/libqapt/src/backend.cpp:1295:24: warning: ‘void pkgProblemResolver::InstallProtect()’ is deprecated (declared at /usr/include/apt-pkg/algorithms.h:137) [-Wdeprecated-declarations]</div>

<div>     Fix.InstallProtect();</div><div>                        ^</div><div>[ 15%] Building CXX object src/CMakeFiles/qapt.dir/cache.o</div><div>[ 17%] Building CXX object src/CMakeFiles/qapt.dir/package.o                                                            </div>

<div>/home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp: In member function ‘QUrl QApt::Package::screenshotUrl(QApt::ScreenshotType) const’:</div><div>/home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp:578:12: warning: enumeration value ‘UnknownType’ not handled in switch [-Wswitch]</div>

<div>     switch (type) {</div><div>            ^</div><div>/home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp: In member function ‘void QApt::Package::setRemove()’:</div><div>/home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp:1250:24: warning: ‘void pkgProblemResolver::InstallProtect()’ is deprecated (declared at /usr/include/apt-pkg/algorithms.h:137) [-Wdeprecated-declarations]</div>

<div>     Fix.InstallProtect();</div><div>                        ^</div><div>/home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp: In member function ‘void QApt::Package::setPurge()’:</div><div>/home/manchicken/Documents/Devel/kubuntu/libqapt/src/package.cpp:1270:24: warning: ‘void pkgProblemResolver::InstallProtect()’ is deprecated (declared at /usr/include/apt-pkg/algorithms.h:137) [-Wdeprecated-declarations]</div>

<div>     Fix.InstallProtect();</div><div>                        ^</div><div><br></div><div>I have found exactly zero documents describing this part of apt-pkg, and I'm hoping someone else might have some context or advice surrounding this method, its prior usefulness, and maybe even some ideas on how to migrate away from it. If they're going to remove this method at some point, I'd like us to be off of it if possible so that we don't end up with an emergency.</div>

<div><br></div><div>Much thanks.</div><div><br></div>-- <br>~ Michael D. Stemle, Jr.
</div></div>