load now sets url field to page url; refs #141

master
Marc Wäckerlin 13 years ago
parent 085e6a73bf
commit 2adc5c544d
  1. 6
      src/browser.hxx

@ -300,6 +300,10 @@ class Browser: public QMainWindow, protected Ui::Browser {
void load(QString page) {
_settings.replaceSearchEngine(page);
if (QUrl(page).scheme()=="") page = "http://"+page;
if (qobject_cast<QComboBox*>(_url))
qobject_cast<QComboBox*>(_url)->lineEdit()->setText(page);
else
qobject_cast<QLineEdit*>(_url)->setText(page);
load(QUrl(page));
}
@ -922,8 +926,10 @@ class Browser: public QMainWindow, protected Ui::Browser {
urls = _settings()->value("Window/Urls").toStringList();
}
if (qobject_cast<QComboBox*>(_url)) {
QString ci(qobject_cast<QComboBox*>(_url)->currentText());
qobject_cast<QComboBox*>(_url)->clear();
qobject_cast<QComboBox*>(_url)->addItems(urls);
qobject_cast<QComboBox*>(_url)->lineEdit()->setText(ci);
}
if (_bookmarks) {
_bookmarks->clear();

Loading…
Cancel
Save