From a508779362e6c4d5484699156be61699cea0dbdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 18 Apr 2012 14:27:24 +0000 Subject: [PATCH] is now QLabel; shall I really spend my time on this tosh instead of solving real functional problems?; refs #129 --- src/browser.hxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/browser.hxx b/src/browser.hxx index 96f12b6..1773aca 100644 --- a/src/browser.hxx +++ b/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(_url)) load(qobject_cast(_url)->currentText()); else - load(qobject_cast(_url)->text()); + load(qobject_cast(_url)->text()); } void load(QString page) { @@ -649,10 +646,9 @@ class Browser: public QMainWindow, protected Ui::Browser { ->url().toString()); qobject_cast(_url)->lineEdit()->setCursorPosition(0); } else { - qobject_cast(_url)->setText + qobject_cast(_url)->setText (qobject_cast(_tabs->currentWidget()) ->url().toString()); - qobject_cast(_url)->setCursorPosition(0); } activateTab(); } @@ -932,8 +928,7 @@ class Browser: public QMainWindow, protected Ui::Browser { qobject_cast(_url)->setEditText(url.toString()); qobject_cast(_url)->lineEdit()->setCursorPosition(0); } else { - qobject_cast(_url)->setText(url.toString()); - qobject_cast(_url)->setCursorPosition(0); + qobject_cast(_url)->setText(url.toString()); } } @@ -1508,7 +1503,7 @@ class Browser: public QMainWindow, protected Ui::Browser { (qobject_cast(_url)->lineEdit()) ->changeStyleSheet(tr("background-color: white", "valid url")); else - qobject_cast(_url) + qobject_cast(_url) ->setStyleSheet(tr("background-color: white", "valid url")); }