1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Using "Intel Mac" in user agent when compiling on intel. Closes #148

This commit is contained in:
nowrep 2012-01-16 16:28:41 +01:00
parent af5f2ed9e7
commit 52e0e206b5
3 changed files with 13 additions and 1 deletions

View File

@ -59,6 +59,12 @@ QLineEdit* SearchToolBar::searchLine()
return ui->lineEdit;
}
void SearchToolBar::hide()
{
p_QupZilla->weView()->setFocus();
AnimatedWidget::hide();
}
void SearchToolBar::findNext()
{
m_findFlags = QWebPage::FindWrapsAroundDocument;
@ -139,7 +145,6 @@ bool SearchToolBar::eventFilter(QObject* obj, QEvent* event)
{
if (event->type() == QEvent::KeyPress && static_cast<QKeyEvent*>(event)->key() == Qt::Key_Escape) {
hide();
p_QupZilla->weView()->setFocus();
return false;
}

View File

@ -56,6 +56,8 @@ public slots:
void findNext();
void findPrevious();
void hide();
private:
Ui::SearchToolbar* ui;
QupZilla* p_QupZilla;

View File

@ -291,6 +291,11 @@ QString WebPage::userAgentForUrl(const QUrl &url) const
{
if (UserAgent.isEmpty()) {
UserAgent = QWebPage::userAgentForUrl(url);
#ifdef Q_WS_MAC
#ifdef __i386__ || __x86_64__
UserAgent.replace("PPC Mac OS X", "Intel Mac OS X");
#endif
#endif
}
return UserAgent;