|
|
@ -623,15 +623,17 @@ class Browser: public QMainWindow, protected Ui::Browser { |
|
|
|
on__tabs_tabCloseRequested(_tabs->currentIndex()); |
|
|
|
on__tabs_tabCloseRequested(_tabs->currentIndex()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void on__tabs_currentChanged(int index) { |
|
|
|
void on__tabs_currentChanged(int) { |
|
|
|
if (qobject_cast<QComboBox*>(_url)) |
|
|
|
if (qobject_cast<QComboBox*>(_url)) { |
|
|
|
qobject_cast<QComboBox*>(_url)->setEditText |
|
|
|
qobject_cast<QComboBox*>(_url)->setEditText |
|
|
|
(qobject_cast<QWebView*>(_tabs->currentWidget()) |
|
|
|
(qobject_cast<QWebView*>(_tabs->currentWidget()) |
|
|
|
->url().toString()); |
|
|
|
->url().toString()); |
|
|
|
else |
|
|
|
} else { |
|
|
|
qobject_cast<QLineEdit*>(_url)->setText |
|
|
|
qobject_cast<QLineEdit*>(_url)->setText |
|
|
|
(qobject_cast<QWebView*>(_tabs->currentWidget()) |
|
|
|
(qobject_cast<QWebView*>(_tabs->currentWidget()) |
|
|
|
->url().toString()); |
|
|
|
->url().toString()); |
|
|
|
|
|
|
|
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0); |
|
|
|
|
|
|
|
} |
|
|
|
activateTab(); |
|
|
|
activateTab(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -883,10 +885,12 @@ class Browser: public QMainWindow, protected Ui::Browser { |
|
|
|
LOG<<url.toString(); |
|
|
|
LOG<<url.toString(); |
|
|
|
if (sender()!=_tabs->currentWidget()) return; |
|
|
|
if (sender()!=_tabs->currentWidget()) return; |
|
|
|
LOG<<"signal on current tab"; |
|
|
|
LOG<<"signal on current tab"; |
|
|
|
if (qobject_cast<QComboBox*>(_url)) |
|
|
|
if (qobject_cast<QComboBox*>(_url)) { |
|
|
|
qobject_cast<QComboBox*>(_url)->setEditText(url.toString()); |
|
|
|
qobject_cast<QComboBox*>(_url)->setEditText(url.toString()); |
|
|
|
else |
|
|
|
} else { |
|
|
|
qobject_cast<QLineEdit*>(_url)->setText(url.toString()); |
|
|
|
qobject_cast<QLineEdit*>(_url)->setText(url.toString()); |
|
|
|
|
|
|
|
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void linkClicked(const QUrl& url) { |
|
|
|
void linkClicked(const QUrl& url) { |
|
|
|