#include <QBoxLayout>
#include <QTimer>
#include <QScrollBar>
+#include <QMimeData>
#include <KDesktopFile>
#include <KFileItemDelegate>
this, SLOT(dropUrls(KUrl,QDropEvent*)));
connect(m_urlNavigator, SIGNAL(activated()),
this, SLOT(activate()));
- connect(m_urlNavigator->editor(), SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- this, SLOT(saveUrlCompletionMode(KGlobalSettings::Completion)));
+ connect(m_urlNavigator->editor(), SIGNAL(completionModeChanged(KCompletion::CompletionMode)),
+ this, SLOT(saveUrlCompletionMode(KCompletion::CompletionMode)));
const GeneralSettings* settings = GeneralSettings::self();
m_urlNavigator->setUrlEditable(settings->editableUrl());
m_urlNavigator->setShowFullPath(settings->showFullPath());
m_urlNavigator->setHomeUrl(KUrl(settings->homeUrl()));
KUrlComboBox* editor = m_urlNavigator->editor();
- editor->setCompletionMode(KGlobalSettings::Completion(settings->urlCompletionMode()));
+ editor->setCompletionMode(KCompletion::CompletionMode(settings->urlCompletionMode()));
m_searchBox = new DolphinSearchBox(this);
m_searchBox->hide();
{
if (newUrl != m_urlNavigator->locationUrl()) {
m_urlNavigator->setLocationUrl(newUrl);
- } else if (m_view->itemsCount() == 0) {
- // Maybe a previously unmounted device has been mounted again.
- // Let's reload the view to be safe (see https://bugs.kde.org/show_bug.cgi?id=161385).
- m_view->reload();
}
#ifdef KActivities_FOUND
}
if (isSearchUrl(url()) && m_view->itemsCount() == 0) {
- // The dir lister has been completed on a Nepomuk-URI and no items have been found. Instead
+ // The dir lister has been completed on a Baloo-URI and no items have been found. Instead
// of showing the default status bar information ("0 items") a more helpful information is given:
m_statusBar->setText(i18nc("@info:status", "No items found."));
} else {
return;
}
- item.run();
+ new KRun(item.targetUrl(), this);
}
void DolphinViewContainer::slotItemsActivated(const KFileItemList& items)
m_view->setFocus();
}
-void DolphinViewContainer::saveUrlCompletionMode(KGlobalSettings::Completion completion)
+void DolphinViewContainer::saveUrlCompletionMode(KCompletion::CompletionMode completion)
{
GeneralSettings::setUrlCompletionMode(completion);
}
bool DolphinViewContainer::isSearchUrl(const KUrl& url) const
{
const QString protocol = url.protocol();
- return protocol.contains("search") || (protocol == QLatin1String("nepomuk"));
+ return protocol.contains("search");
}
void DolphinViewContainer::saveViewState()