Differential D11867 Diff 31103 src/core-impl/collections/nepomukcollection/NepomukCollectionFactory.cpp
Changeset View
Changeset View
Standalone View
Standalone View
src/core-impl/collections/nepomukcollection/NepomukCollectionFactory.cpp
Show All 13 Lines | |||||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. * | 14 | * this program. If not, see <http://www.gnu.org/licenses/>. * | ||
15 | ****************************************************************************************/ | 15 | ****************************************************************************************/ | ||
16 | 16 | | |||
17 | #define DEBUG_PREFIX "NepomukCollection Factory" | 17 | #define DEBUG_PREFIX "NepomukCollection Factory" | ||
18 | 18 | | |||
19 | #include "NepomukCollection.h" | 19 | #include "NepomukCollection.h" | ||
20 | #include "NepomukCollectionFactory.h" | 20 | #include "NepomukCollectionFactory.h" | ||
21 | 21 | | |||
22 | #include "core/interfaces/Logger.h" | 22 | #include "core/logger/Logger.h" | ||
23 | #include "core/support/Components.h" | 23 | #include "core/support/Components.h" | ||
24 | #include "core/support/Debug.h" | 24 | #include "core/support/Debug.h" | ||
25 | 25 | | |||
26 | #include <Nepomuk2/ResourceManager> | 26 | #include <Nepomuk2/ResourceManager> | ||
27 | 27 | | |||
28 | void | 28 | void | ||
29 | NepomukCollectionFactory::init() | 29 | NepomukCollectionFactory::init() | ||
30 | { | 30 | { | ||
31 | DEBUG_BLOCK | 31 | DEBUG_BLOCK | ||
32 | m_initialized = true; | 32 | m_initialized = true; | ||
33 | 33 | | |||
34 | // check if Nepomuk service is running | 34 | // check if Nepomuk service is running | ||
35 | if( Nepomuk2::ResourceManager::instance()->initialized() ) | 35 | if( Nepomuk2::ResourceManager::instance()->initialized() ) | ||
36 | { | 36 | { | ||
37 | // if it is, create a new NepomukCollection | 37 | // if it is, create a new NepomukCollection | ||
38 | emit newCollection( new Collections::NepomukCollection() ); | 38 | emit newCollection( new Collections::NepomukCollection() ); | ||
39 | return; | 39 | return; | ||
40 | } | 40 | } | ||
41 | else | 41 | else | ||
42 | { | 42 | { | ||
43 | warning() << "Couldn't initialize Nepomuk Collection. " | 43 | warning() << "Couldn't initialize Nepomuk Collection. " | ||
44 | "Check if 'Nepomuk Semantic Desktop' is enabled in System Settings -> Desktop Search. " | 44 | "Check if 'Nepomuk Semantic Desktop' is enabled in System Settings -> Desktop Search. " | ||
45 | "Nepomuk Plugin won't be loaded unless Nepomuk is enabled."; | 45 | "Nepomuk Plugin won't be loaded unless Nepomuk is enabled."; | ||
46 | 46 | | |||
47 | Amarok::Components::logger()->longMessage( | 47 | Amarok::Logger::longMessage( | ||
48 | i18n( "Couldn't initialize Nepomuk Collection. " | 48 | i18n( "Couldn't initialize Nepomuk Collection. " | ||
49 | "Check if 'Nepomuk Semantic Desktop' is enabled in System Settings -> Desktop Search. " | 49 | "Check if 'Nepomuk Semantic Desktop' is enabled in System Settings -> Desktop Search. " | ||
50 | "Nepomuk Plugin won't be loaded unless Nepomuk is enabled." ), | 50 | "Nepomuk Plugin won't be loaded unless Nepomuk is enabled." ), | ||
51 | Amarok::Logger::Warning ); | 51 | Amarok::Logger::Warning ); | ||
52 | } | 52 | } | ||
53 | } | 53 | } | ||
54 | 54 | | |||
55 | NepomukCollectionFactory::NepomukCollectionFactory( QObject *parent, | 55 | NepomukCollectionFactory::NepomukCollectionFactory( QObject *parent, | ||
Show All 11 Lines |