Changeset View
Changeset View
Standalone View
Standalone View
src/search/dolphinsearchbox.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | |||||
76 | 76 | | |||
77 | QString DolphinSearchBox::text() const | 77 | QString DolphinSearchBox::text() const | ||
78 | { | 78 | { | ||
79 | return m_searchInput->text(); | 79 | return m_searchInput->text(); | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | void DolphinSearchBox::setSearchPath(const QUrl& url) | 82 | void DolphinSearchBox::setSearchPath(const QUrl& url) | ||
83 | { | 83 | { | ||
84 | if (url == m_searchPath) { | ||||
85 | return; | ||||
86 | } | ||||
87 | | ||||
84 | m_searchPath = url; | 88 | m_searchPath = url; | ||
85 | 89 | | |||
86 | QFontMetrics metrics(m_fromHereButton->font()); | 90 | QFontMetrics metrics(m_fromHereButton->font()); | ||
87 | const int maxWidth = metrics.height() * 8; | 91 | const int maxWidth = metrics.height() * 8; | ||
88 | 92 | | |||
89 | const QUrl cleanedUrl = url.adjusted(QUrl::RemoveUserInfo | QUrl::StripTrailingSlash); | 93 | const QUrl cleanedUrl = url.adjusted(QUrl::RemoveUserInfo | QUrl::StripTrailingSlash); | ||
90 | QString location = cleanedUrl.fileName(); | 94 | QString location = cleanedUrl.fileName(); | ||
91 | if (location.isEmpty()) { | 95 | if (location.isEmpty()) { | ||
▲ Show 20 Lines • Show All 473 Lines • Show Last 20 Lines |