┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt18
-rw-r--r--src/dolphinviewcontainer.cpp11
-rw-r--r--src/dolphinviewcontainer.h2
-rw-r--r--src/kitemviews/kfileitemmodel.cpp2
-rw-r--r--src/views/dolphinremoteencoding.cpp5
5 files changed, 30 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b7aa5b385..a0beafa80 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,16 +1,28 @@
-macro_optional_find_package(Soprano)
macro_optional_find_package(NepomukCore)
-macro_optional_find_package(NepomukWidgets)
-macro_log_feature(NepomukCore_FOUND "Nepomuk" "Nepomuk" "http://www.kde.org" FALSE "" "For adding desktop-wide tagging support to dolphin")
+set_package_properties(NepomukCore PROPERTIES DESCRIPTION "Nepomuk Core libraries"
+ URL "http://www.kde.org"
+ TYPE OPTIONAL
+ PURPOSE "For adding desktop-wide tagging support to dolphin"
+ )
+
macro_bool_to_01(NepomukCore_FOUND HAVE_NEPOMUK)
configure_file(config-nepomuk.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-nepomuk.h )
+macro_optional_find_package(NepomukWidgets)
+
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER)
configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h )
include_directories( ${KACTIVITIES_INCLUDE_DIRS} )
if (NepomukCore_FOUND)
+ find_package(Soprano 2.7.56)
+ set_package_properties(Soprano PROPERTIES DESCRIPTION "Qt-based RDF storage and parsing solution"
+ URL "http://soprano.sourceforge.net"
+ TYPE REQUIRED
+ PURPOSE "Required for everything (storage and general data management)"
+ )
+
# Yes, Soprano includes is what we need here
include_directories( ${SOPRANO_INCLUDE_DIR} ${NEPOMUK_CORE_INCLUDE_DIR} ${NEPOMUK_WIDGETS_INCLUDE_DIR} )
endif (NepomukCore_FOUND)
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 8800a1732..26a6803ae 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -128,6 +128,8 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) :
this, SLOT(slotUrlNavigatorLocationChanged(KUrl)));
connect(m_urlNavigator, SIGNAL(historyChanged()),
this, SLOT(slotHistoryChanged()));
+ connect(m_urlNavigator, SIGNAL(returnPressed()),
+ this, SLOT(slotReturnPressed()));
// Initialize status bar
m_statusBar = new DolphinStatusBar(this);
@@ -574,6 +576,8 @@ void DolphinViewContainer::slotUrlNavigatorLocationAboutToBeChanged(const KUrl&
void DolphinViewContainer::slotUrlNavigatorLocationChanged(const KUrl& url)
{
+ slotReturnPressed();
+
if (KProtocolManager::supportsListing(url)) {
setSearchModeEnabled(isSearchUrl(url));
m_view->setUrl(url);
@@ -657,6 +661,13 @@ void DolphinViewContainer::slotHistoryChanged()
}
}
+void DolphinViewContainer::slotReturnPressed()
+{
+ if (!GeneralSettings::editableUrl()) {
+ m_urlNavigator->setUrlEditable(false);
+ }
+}
+
void DolphinViewContainer::startSearching()
{
const KUrl url = m_searchBox->urlForSearching();
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h
index e2d1b1875..bc58531a2 100644
--- a/src/dolphinviewcontainer.h
+++ b/src/dolphinviewcontainer.h
@@ -282,6 +282,8 @@ private slots:
void slotHistoryChanged();
+ void slotReturnPressed();
+
/**
* Gets the search URL from the searchbox and starts searching.
*/
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 231bfe077..6c015db37 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -1499,7 +1499,7 @@ int KFileItemModel::expandedParentsCountCompare(const ItemData* a, const ItemDat
if (index > maxIndex) {
index = maxIndex;
}
- while ((pathA.at(index) != QLatin1Char('/') || pathB.at(index) != QLatin1Char('/')) && index > 0) {
+ while (index > 0 && (pathA.at(index) != QLatin1Char('/') || pathB.at(index) != QLatin1Char('/'))) {
--index;
}
diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp
index 375b3fd46..04b350eda 100644
--- a/src/views/dolphinremoteencoding.cpp
+++ b/src/views/dolphinremoteencoding.cpp
@@ -38,7 +38,6 @@
#include <KMenu>
#include <KProtocolInfo>
#include <KProtocolManager>
-#include <KIO/SlaveConfig>
#include <KIO/Scheduler>
#include <KConfigGroup>
@@ -132,9 +131,7 @@ void DolphinRemoteEncoding::updateMenu()
m_menu->menu()->actions().at(i)->setChecked(false);
}
- QString charset = KGlobal::charsets()->descriptionForEncoding(KIO::SlaveConfig::self()->configData(m_currentURL.protocol(),
- m_currentURL.host(), DATA_KEY));
-
+ const QString charset = KGlobal::charsets()->descriptionForEncoding(KProtocolManager::charsetFor(m_currentURL));
if (!charset.isEmpty()) {
int id = 0;
bool isFound = false;