b8077df49f
* Wed Sep 03 2008 Lukáš Tinkl <ltinkl@redhat.com> 4.1.1-5 - fixed crash on setting cookies on empty domains (like the file system), KDE bug #170147 - fix URL navigator focus in file dialogs, KDE bug #169497, #170211
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
Index: kfile/kurlnavigator.cpp
|
|
===================================================================
|
|
--- kfile/kurlnavigator.cpp (revision 856402)
|
|
+++ kfile/kurlnavigator.cpp (revision 856403)
|
|
@@ -344,6 +344,7 @@
|
|
// initialize the path box of the traditional view
|
|
m_pathBox = new KUrlComboBox(KUrlComboBox::Both, true, q);
|
|
m_pathBox->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
|
|
+ m_pathBox->installEventFilter(q);
|
|
|
|
KUrlCompletion* kurlCompletion = new KUrlCompletion(KUrlCompletion::DirCompletion);
|
|
m_pathBox->setCompletionObject(kurlCompletion);
|
|
@@ -1122,6 +1123,16 @@
|
|
QWidget::resizeEvent(event);
|
|
}
|
|
|
|
+bool KUrlNavigator::eventFilter(QObject* watched, QEvent* event)
|
|
+{
|
|
+ if ((watched == d->m_pathBox) && (event->type() == QEvent::FocusIn)) {
|
|
+ requestActivation();
|
|
+ setFocus();
|
|
+ }
|
|
+
|
|
+ return QWidget::eventFilter(watched, event);
|
|
+}
|
|
+
|
|
int KUrlNavigator::historySize() const
|
|
{
|
|
return d->m_history.count();
|
|
Index: kfile/kurlnavigator.h
|
|
===================================================================
|
|
--- kfile/kurlnavigator.h (revision 856402)
|
|
+++ kfile/kurlnavigator.h (revision 856403)
|
|
@@ -312,6 +312,8 @@
|
|
/* @see QWidget::resizeEvent() */
|
|
virtual void resizeEvent(QResizeEvent* event);
|
|
|
|
+ virtual bool eventFilter(QObject* watched, QEvent* event);
|
|
+
|
|
private:
|
|
Q_PRIVATE_SLOT(d, void slotReturnPressed(const QString& text))
|
|
Q_PRIVATE_SLOT(d, void slotReturnPressed())
|