packagechooser: rename #define for AppStreamQt
Make explicit that it is set to a version (if it is defined at all).
This commit is contained in:
parent
350be92cd1
commit
a6dd49ac07
@ -35,7 +35,7 @@ if(BUILD_APPSTREAM)
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if(AppStreamQt_FOUND)
|
||||
add_definitions(-DHAVE_APPSTREAM)
|
||||
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
|
||||
list(APPEND _extra_libraries AppStreamQt)
|
||||
list(APPEND _extra_src ItemAppStream.cpp)
|
||||
endif()
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ItemAppData.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_APPSTREAM
|
||||
#ifdef HAVE_APPSTREAM_VERSION
|
||||
#include "ItemAppStream.h"
|
||||
#include <AppStreamQt/pool.h>
|
||||
#include <memory>
|
||||
@ -257,7 +257,7 @@ fillModel( PackageListModel* model, const QVariantList& items )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_APPSTREAM
|
||||
#ifdef HAVE_APPSTREAM_VERSION
|
||||
std::unique_ptr< AppStream::Pool > pool;
|
||||
bool poolOk = false;
|
||||
#endif
|
||||
@ -284,7 +284,7 @@ fillModel( PackageListModel* model, const QVariantList& items )
|
||||
}
|
||||
else if ( item_map.contains( "appstream" ) )
|
||||
{
|
||||
#ifdef HAVE_APPSTREAM
|
||||
#ifdef HAVE_APPSTREAM_VERSION
|
||||
if ( !pool )
|
||||
{
|
||||
pool = std::make_unique< AppStream::Pool >();
|
||||
|
@ -12,7 +12,7 @@
|
||||
#ifdef HAVE_APPDATA
|
||||
#include "ItemAppData.h"
|
||||
#endif
|
||||
#ifdef HAVE_APPSTREAM
|
||||
#ifdef HAVE_APPSTREAM_VERSION
|
||||
#include "ItemAppStream.h"
|
||||
#endif
|
||||
#include "PackageModel.h"
|
||||
|
@ -46,7 +46,7 @@ if(BUILD_APPSTREAM)
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if(AppStreamQt_FOUND)
|
||||
add_definitions(-DHAVE_APPSTREAM)
|
||||
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
|
||||
list(APPEND _extra_libraries AppStreamQt)
|
||||
list(APPEND _extra_src ${_packagechooser}/ItemAppStream.cpp)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user