+
+ // if the URL navigator is editable and focused, select the whole
+ // URL instead of all items of the view
+
+ KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator();
+ QLineEdit* lineEdit = urlNavigator->editor()->lineEdit();
+ const bool selectUrl = urlNavigator->isUrlEditable() &&
+ lineEdit->hasFocus();
+ if (selectUrl) {
+ lineEdit->selectAll();
+ } else {
+ m_activeViewContainer->view()->selectAll();
+ }