is now QLabel; shall I really spend my time on this tosh instead of solving real functional problems?; refs #129

master
Marc Wäckerlin 12 years ago
parent d350c7c0b9
commit a508779362
  1. 15
      src/browser.hxx

@ -158,11 +158,8 @@ class Browser: public QMainWindow, protected Ui::Browser {
assert(connect(_editbookmarks.get(), SIGNAL(accepted()),
SLOT(saveBookmarks())));
} else {
QLineEdit* label(new QLineEdit(_toolbar));
QLabel* label(new QLabel(_toolbar));
_url = label;
label->setReadOnly(true);
// _url->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
// QSizePolicy::Minimum));
_toolbar->addWidget(_url);
}
if (!_kiosk) {
@ -289,7 +286,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
if (qobject_cast<QComboBox*>(_url))
load(qobject_cast<QComboBox*>(_url)->currentText());
else
load(qobject_cast<QLineEdit*>(_url)->text());
load(qobject_cast<QLabel*>(_url)->text());
}
void load(QString page) {
@ -649,10 +646,9 @@ class Browser: public QMainWindow, protected Ui::Browser {
->url().toString());
qobject_cast<QComboBox*>(_url)->lineEdit()->setCursorPosition(0);
} else {
qobject_cast<QLineEdit*>(_url)->setText
qobject_cast<QLabel*>(_url)->setText
(qobject_cast<QWebView*>(_tabs->currentWidget())
->url().toString());
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0);
}
activateTab();
}
@ -932,8 +928,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
qobject_cast<QComboBox*>(_url)->setEditText(url.toString());
qobject_cast<QComboBox*>(_url)->lineEdit()->setCursorPosition(0);
} else {
qobject_cast<QLineEdit*>(_url)->setText(url.toString());
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0);
qobject_cast<QLabel*>(_url)->setText(url.toString());
}
}
@ -1508,7 +1503,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
(qobject_cast<QComboBox*>(_url)->lineEdit())
->changeStyleSheet(tr("background-color: white", "valid url"));
else
qobject_cast<QLineEdit*>(_url)
qobject_cast<QLabel*>(_url)
->setStyleSheet(tr("background-color: white", "valid url"));
}

Loading…
Cancel
Save