set cursor position to 0 in kiosk-mode; refs #106
This commit is contained in:
@@ -623,15 +623,17 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
on__tabs_tabCloseRequested(_tabs->currentIndex());
|
||||
}
|
||||
|
||||
void on__tabs_currentChanged(int index) {
|
||||
if (qobject_cast<QComboBox*>(_url))
|
||||
void on__tabs_currentChanged(int) {
|
||||
if (qobject_cast<QComboBox*>(_url)) {
|
||||
qobject_cast<QComboBox*>(_url)->setEditText
|
||||
(qobject_cast<QWebView*>(_tabs->currentWidget())
|
||||
->url().toString());
|
||||
else
|
||||
} else {
|
||||
qobject_cast<QLineEdit*>(_url)->setText
|
||||
(qobject_cast<QWebView*>(_tabs->currentWidget())
|
||||
->url().toString());
|
||||
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0);
|
||||
}
|
||||
activateTab();
|
||||
}
|
||||
|
||||
@@ -883,10 +885,12 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
LOG<<url.toString();
|
||||
if (sender()!=_tabs->currentWidget()) return;
|
||||
LOG<<"signal on current tab";
|
||||
if (qobject_cast<QComboBox*>(_url))
|
||||
if (qobject_cast<QComboBox*>(_url)) {
|
||||
qobject_cast<QComboBox*>(_url)->setEditText(url.toString());
|
||||
else
|
||||
} else {
|
||||
qobject_cast<QLineEdit*>(_url)->setText(url.toString());
|
||||
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0);
|
||||
}
|
||||
}
|
||||
|
||||
void linkClicked(const QUrl& url) {
|
||||
|
Reference in New Issue
Block a user