D25401: Fix deprecation syntax in ktcpsocket.h
    David Faure 
    noreply at phabricator.kde.org
       
    Tue Nov 19 14:11:19 GMT 2019
    
    
  
dfaure added a comment.
  As a data point: this commit changes things for kimap, which has code saying
  
    src/imapstreamparser.cpp:493:            } else if (KTcpSocket *socket = qobject_cast<KTcpSocket *>(m_socket)) {
    src/imapstreamparser.cpp-494-                qWarning() << "No incoming packet for" << dt.elapsed()/1000 << "seconds on TCP socket. state=" << socket->state() << "error=" << socket->error() << socket->errorString();
  
  With the class being deprecated, this code now fails to build (because of the "-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000" big hammer).
  The obvious fix is then to add this to kimap's CMakeLists.txt:
  
    add_definitions(-DKIOCORE_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054000) # We need KTcpSocket
  
  IMHO this is all correct. We *are* using a deprecated class, it's important to know it, even if we didn't instantiate it ourselves. Because this means there will be porting effort when the class is removed.
  In some cases one can right away port to a non-deprecated solution, or in this case where we do need to keep support for older KF5 versions, we need to enable the use of the deprecated class for a little while longer.
REPOSITORY
  R241 KIO
REVISION DETAIL
  https://phabricator.kde.org/D25401
To: dfaure, vkrause, kossebau
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191119/c77defa1/attachment.html>
    
    
More information about the Kde-frameworks-devel
mailing list