Skip to content

Commit

Permalink
Restore src compatibility with older Qt versions (<5.15)
Browse files Browse the repository at this point in the history
  • Loading branch information
shundhammer committed May 20, 2020
1 parent b331000 commit 151f5d8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/YQPkgDescriptionView.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "YQUI.h"
#include <qbuffer.h>

#if (QT_VERSION < QT_VERSION_CHECK( 5, 15, 0 ))
# define QT_KEEP_EMPTY_PARTS QString::KeepEmptyParts
#else
# define QT_KEEP_EMPTY_PARTS Qt::KeepEmptyParts
#endif

#define DESKTOP_TRANSLATIONS "desktop_translations"
#define DESKTOPFILEDIR "\\/share\\/applications\\/.*\\.desktop$" // RegExp



using std::list;
using std::endl;
using std::string;
using namespace zypp;



YQPkgDescriptionView::YQPkgDescriptionView( QWidget * parent, bool showSupportability )
: YQPkgGenericDetailsView( parent )
, _showSupportability ( showSupportability )
Expand Down Expand Up @@ -156,7 +163,7 @@ QString YQPkgDescriptionView::simpleHtmlParagraphs( QString text )
bool foundAuthorsList = false;
QString html_text = "<p>";

QStringList lines = text.trimmed().split( '\n', Qt::KeepEmptyParts );
QStringList lines = text.trimmed().split( '\n', QT_KEEP_EMPTY_PARTS );
QStringList::const_iterator it = lines.begin();

while ( it != lines.end() )
Expand Down

0 comments on commit 151f5d8

Please sign in to comment.