- m_pendingPreview = false;
-
- const KUrl itemUrl = item.url();
- const bool isSearchUrl = itemUrl.protocol().contains("search") && item.nepomukUri().isEmpty();
- if (!applyPlace(itemUrl)) {
- setNameLabelText(item.text());
- if (isSearchUrl) {
- // in the case of a search-URL the URL is not readable for humans
- // (at least not useful to show in the Information Panel)
- KIconLoader iconLoader;
- QPixmap icon = iconLoader.loadIcon("nepomuk",
- KIconLoader::NoGroup,
- KIconLoader::SizeEnormous);
- m_preview->setPixmap(icon);
- } else {
- // try to get a preview pixmap from the item...
- m_pendingPreview = true;
-
- // Mark the currently shown preview as outdated. This is done
- // with a small delay to prevent a flickering when the next preview
- // can be shown within a short timeframe. This timer is not started
- // for directories, as directory previews might fail and return the
- // same icon.
- if (!item.isDir()) {
- m_outdatedPreviewTimer->start();
- }
-
- if (m_enabledPlugins.isEmpty()) {
- const KConfigGroup globalConfig(KGlobal::config(), "PreviewSettings");
- m_enabledPlugins = globalConfig.readEntry("Plugins", QStringList()
- << "directorythumbnail"
- << "imagethumbnail"
- << "jpegthumbnail");
- }