@@ -161,8 +161,10 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
assert(connect(_editbookmarks.get(), SIGNAL(accepted()),
|
||||
SLOT(saveBookmarks())));
|
||||
} else {
|
||||
QLabel* label(new QLabel(_toolbar));
|
||||
QLineEdit* label(new QLineEdit(_toolbar));
|
||||
_url = label;
|
||||
label->setReadOnly(true);
|
||||
label->setEnabled(false);
|
||||
_toolbar->addWidget(_url);
|
||||
}
|
||||
if (!_kiosk) {
|
||||
@@ -293,7 +295,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
if (qobject_cast<QComboBox*>(_url))
|
||||
load(qobject_cast<QComboBox*>(_url)->currentText());
|
||||
else
|
||||
load(qobject_cast<QLabel*>(_url)->text());
|
||||
load(qobject_cast<QLineEdit*>(_url)->text());
|
||||
}
|
||||
|
||||
void load(QString page) {
|
||||
@@ -661,9 +663,10 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
->url().toString());
|
||||
qobject_cast<QComboBox*>(_url)->lineEdit()->setCursorPosition(0);
|
||||
} else {
|
||||
qobject_cast<QLabel*>(_url)->setText
|
||||
qobject_cast<QLineEdit*>(_url)->setText
|
||||
(qobject_cast<QWebView*>(_tabs->currentWidget())
|
||||
->url().toString());
|
||||
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0);
|
||||
}
|
||||
activateTab();
|
||||
}
|
||||
@@ -944,7 +947,8 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
qobject_cast<QComboBox*>(_url)->setEditText(url.toString());
|
||||
qobject_cast<QComboBox*>(_url)->lineEdit()->setCursorPosition(0);
|
||||
} else {
|
||||
qobject_cast<QLabel*>(_url)->setText(url.toString());
|
||||
qobject_cast<QLineEdit*>(_url)->setText(url.toString());
|
||||
qobject_cast<QLineEdit*>(_url)->setCursorPosition(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1521,7 +1525,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
|
||||
(qobject_cast<QComboBox*>(_url)->lineEdit())
|
||||
->changeStyleSheet(tr("background-color: white", "valid url"));
|
||||
else
|
||||
qobject_cast<QLabel*>(_url)
|
||||
qobject_cast<QLineEdit*>(_url)
|
||||
->setStyleSheet(tr("background-color: white", "valid url"));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user