Skip to content

Commit

Permalink
Merge branch 'homerun/1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
eikehein committed Apr 9, 2014
2 parents a65c5a3 + 36d35e8 commit 5e003f5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -3,7 +3,7 @@ project(homerun)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})

# Packaging
set(HOMERUN_VERSION "1.2.2")
set(HOMERUN_VERSION "1.2.3")

# Dependencies
find_package(KDE4 4.10.0 REQUIRED)
Expand Down
9 changes: 9 additions & 0 deletions NEWS
@@ -1,3 +1,12 @@
# 2014.04.09 - 1.2.3

- This release enables compatibility with the revamped desktop search stack
in KDE SC 4.13. It is required for desktop search to work when Homerun is
used in KDE SC 4.13, both in the fullscreen version of Homerun (where
desktop search is exposed via the "KRunner" and "Runner: Desktop Search"
sources) and in Homerun Kicker. Existing user configurations continue to
work seamlessly, and versions older than 4.13 remain supported as well.

# 2014.03.22 - 1.2.2

- Fixed a bug causing icon setting changes from the configuration dialog of
Expand Down
21 changes: 20 additions & 1 deletion components/sourceregistry.cpp
Expand Up @@ -228,14 +228,33 @@ struct SourceRegistryPrivate
void registerSingleRunnerSources()
{
KPluginInfo::List list = Plasma::PluginLoader::pluginLoader()->listRunnerInfo();

// FIXME: SC 4.13 replaced Nepomuk with Baloo for desktop search. Modifications
// to this logic skip registering the "nepomuksearch" runner when "baloosearch"
// is found and alias the latter to the former in the source registry to keep
// existing config files working. This can be dropped again once we depend on a
// SC version guaranteed to have Baloo around.
bool gotBaloo = false;

Q_FOREACH(const KPluginInfo &info, list) {
if (info.pluginName() == "baloosearch") {
gotBaloo = true;
}
}

Q_FOREACH(const KPluginInfo &info, list) {
if (!info.property("X-Plasma-AdvertiseSingleRunnerQueryMode").toBool()) {
if (!info.property("X-Plasma-AdvertiseSingleRunnerQueryMode").toBool()
|| (gotBaloo && info.pluginName() == "nepomuksearch")) {
continue;
}
QString runnerId = info.pluginName();
SingleRunnerSource *source = new SingleRunnerSource(runnerId, q);
QString name = i18n("Runner: %1", info.name());
registerSource("SingleRunner/" + runnerId, source, name, info.comment());

if (runnerId == "baloosearch") {
registerSource("SingleRunner/nepomuksearch", source, name, info.comment());
}
}
}
};
Expand Down
5 changes: 3 additions & 2 deletions components/sources/runners/runnermodel.cpp
Expand Up @@ -248,10 +248,11 @@ void RunnerModel::loadRunners()
{
Q_ASSERT(m_manager);

// FIXME: KDE 4.12 replaced Nepomuk with Baloo for desktop search. Homerun's
// FIXME: SC 4.13 replaced Nepomuk with Baloo for desktop search. Homerun's
// default configs reference Nepomuk's "nepomuksearch" runner. The following
// is a runtime approach to rewriting this to "baloosearch" when found. This
// keeps things working on <4.13 while enabling 4.13+ compatibility.
// keeps things working on <4.13 while enabling 4.13+ compatibility. It can
// be dropped once we depend on a SC version guaranteed to have Baloo around.
KPluginInfo::List runners = m_manager->listRunnerInfo();

foreach(const KPluginInfo &runner, runners) {
Expand Down

0 comments on commit 5e003f5

Please sign in to comment.