comparison demos/browser/urllineedit.d @ 74:37caa90ce503

more porting
author mandel
date Fri, 22 May 2009 23:43:58 +0000
parents 7bfd46c330dc
children 0654fc9bac95
comparison
equal deleted inserted replaced
73:7bfd46c330dc 74:37caa90ce503
324 QRect progressRect(backgroundRect.x(), backgroundRect.y(), mid, backgroundRect.height()); 324 QRect progressRect(backgroundRect.x(), backgroundRect.y(), mid, backgroundRect.height());
325 painter.drawRect(progressRect); 325 painter.drawRect(progressRect);
326 } 326 }
327 } 327 }
328 328
329 void focusOutEvent(QFocusEvent event); 329 void focusOutEvent(QFocusEvent event)
330 { 330 {
331 if (m_lineEdit.text().isEmpty() && m_webView) 331 if (m_lineEdit.text().isEmpty() && m_webView)
332 m_lineEdit.setText(QString.fromUtf8(m_webView.url().toEncoded())); 332 m_lineEdit.setText(QString.fromUtf8(m_webView.url().toEncoded()));
333 ExLineEdit.focusOutEvent(event); 333 ExLineEdit.focusOutEvent(event);
334 } 334 }
341 m_lineEdit.setCursorPosition(0); 341 m_lineEdit.setCursorPosition(0);
342 } 342 }
343 343
344 void webViewIconChanged() 344 void webViewIconChanged()
345 { 345 {
346 QUrl url = (m_webView) ? m_webView.url() : QUrl(); 346 QUrl url = (m_webView) ? m_webView.url() : new QUrl();
347 QIcon icon = BrowserApplication.instance().icon(url); 347 QIcon icon = BrowserApplication.instance().icon(url);
348 QPixmap pixmap(icon.pixmap(16, 16)); 348 QPixmap pixmap(icon.pixmap(16, 16));
349 m_iconLabel.setPixmap(pixmap); 349 m_iconLabel.setPixmap(pixmap);
350 } 350 }
351 351