#include <KShell>
#include <KUrlComboBox>
#include <KUrlNavigator>
-#include <kio_version.h>
#include <QDropEvent>
#include <QLoggingCategory>
m_urlNavigator(nullptr),
m_emptyTrashButton(nullptr),
m_searchBox(nullptr),
+ m_searchModeEnabled(false),
m_messageWidget(nullptr),
m_view(nullptr),
m_filterBar(nullptr),
m_topLayout = new QVBoxLayout(this);
m_topLayout->setSpacing(0);
- m_topLayout->setMargin(0);
+ m_topLayout->setContentsMargins(0, 0, 0, 0);
m_navigatorWidget = new QWidget(this);
QHBoxLayout* navigatorLayout = new QHBoxLayout(m_navigatorWidget);
navigatorLayout->setSpacing(0);
- navigatorLayout->setMargin(0);
+ navigatorLayout->setContentsMargins(0, 0, 0, 0);
m_urlNavigator = new KUrlNavigator(DolphinPlacesModelSingleton::instance().placesModel(), url, this);
connect(m_urlNavigator, &KUrlNavigator::activated,
m_messageWidget->setText(msg);
+ // TODO: wrap at arbitrary character positions once QLabel can do this
+ // https://bugreports.qt.io/browse/QTBUG-1276
+ m_messageWidget->setWordWrap(true);
+
switch (type) {
case Information: m_messageWidget->setMessageType(KMessageWidget::Information); break;
case Warning: m_messageWidget->setMessageType(KMessageWidget::Warning); break;
}
m_urlNavigator->setLocationUrl(url);
}
+
+ m_searchModeEnabled = enabled;
}
bool DolphinViewContainer::isSearchModeEnabled() const
{
- return m_searchBox->isVisible();
+ return m_searchModeEnabled;
}
QString DolphinViewContainer::placesText() const
void DolphinViewContainer::slotUrlSelectionRequested(const QUrl& url)
{
- qCDebug(DolphinDebug) << "slotUrlSelectionRequested: " << url;
m_view->markUrlsAsSelected({url});
m_view->markUrlAsCurrent(url); // makes the item scroll into view
}