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
|
TYPE OPTIONAL
|
||||||
)
|
)
|
||||||
if(AppStreamQt_FOUND)
|
if(AppStreamQt_FOUND)
|
||||||
add_definitions(-DHAVE_APPSTREAM)
|
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
|
||||||
list(APPEND _extra_libraries AppStreamQt)
|
list(APPEND _extra_libraries AppStreamQt)
|
||||||
list(APPEND _extra_src ItemAppStream.cpp)
|
list(APPEND _extra_src ItemAppStream.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "ItemAppData.h"
|
#include "ItemAppData.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_APPSTREAM
|
#ifdef HAVE_APPSTREAM_VERSION
|
||||||
#include "ItemAppStream.h"
|
#include "ItemAppStream.h"
|
||||||
#include <AppStreamQt/pool.h>
|
#include <AppStreamQt/pool.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -257,7 +257,7 @@ fillModel( PackageListModel* model, const QVariantList& items )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_APPSTREAM
|
#ifdef HAVE_APPSTREAM_VERSION
|
||||||
std::unique_ptr< AppStream::Pool > pool;
|
std::unique_ptr< AppStream::Pool > pool;
|
||||||
bool poolOk = false;
|
bool poolOk = false;
|
||||||
#endif
|
#endif
|
||||||
@ -284,7 +284,7 @@ fillModel( PackageListModel* model, const QVariantList& items )
|
|||||||
}
|
}
|
||||||
else if ( item_map.contains( "appstream" ) )
|
else if ( item_map.contains( "appstream" ) )
|
||||||
{
|
{
|
||||||
#ifdef HAVE_APPSTREAM
|
#ifdef HAVE_APPSTREAM_VERSION
|
||||||
if ( !pool )
|
if ( !pool )
|
||||||
{
|
{
|
||||||
pool = std::make_unique< AppStream::Pool >();
|
pool = std::make_unique< AppStream::Pool >();
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#ifdef HAVE_APPDATA
|
#ifdef HAVE_APPDATA
|
||||||
#include "ItemAppData.h"
|
#include "ItemAppData.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_APPSTREAM
|
#ifdef HAVE_APPSTREAM_VERSION
|
||||||
#include "ItemAppStream.h"
|
#include "ItemAppStream.h"
|
||||||
#endif
|
#endif
|
||||||
#include "PackageModel.h"
|
#include "PackageModel.h"
|
||||||
|
@ -46,7 +46,7 @@ if(BUILD_APPSTREAM)
|
|||||||
TYPE OPTIONAL
|
TYPE OPTIONAL
|
||||||
)
|
)
|
||||||
if(AppStreamQt_FOUND)
|
if(AppStreamQt_FOUND)
|
||||||
add_definitions(-DHAVE_APPSTREAM)
|
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
|
||||||
list(APPEND _extra_libraries AppStreamQt)
|
list(APPEND _extra_libraries AppStreamQt)
|
||||||
list(APPEND _extra_src ${_packagechooser}/ItemAppStream.cpp)
|
list(APPEND _extra_src ${_packagechooser}/ItemAppStream.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user