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