mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Use shorter code for QString().arg(int)
This commit is contained in:
parent
1d37a6867c
commit
b6b7edd187
@ -453,7 +453,7 @@ QString QupZillaSchemeReply::configPage()
|
||||
|
||||
case QVariant::Point: {
|
||||
const QPoint point = keyValue.toPoint();
|
||||
keyString = QString("QPoint(%1, %2)").arg(QString::number(point.x()), QString::number(point.y()));
|
||||
keyString = QString("QPoint(%1, %2)").arg(point.x()).arg(point.y());
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -275,8 +275,7 @@ QString Scripts::getFormData(const QPoint &pos)
|
||||
"return res;"
|
||||
"})()");
|
||||
|
||||
return source.arg(QString::number(pos.x()), QString::number(pos.y()));
|
||||
|
||||
return source.arg(pos.x()).arg(pos.y());
|
||||
}
|
||||
|
||||
QString Scripts::toggleMediaPause(const QPoint &pos)
|
||||
@ -291,8 +290,7 @@ QString Scripts::toggleMediaPause(const QPoint &pos)
|
||||
" e.pause();"
|
||||
"})()");
|
||||
|
||||
return source.arg(QString::number(pos.x()), QString::number(pos.y()));
|
||||
|
||||
return source.arg(pos.x()).arg(pos.y());
|
||||
}
|
||||
|
||||
QString Scripts::toggleMediaMute(const QPoint &pos)
|
||||
@ -304,6 +302,5 @@ QString Scripts::toggleMediaMute(const QPoint &pos)
|
||||
"e.muted = !e.muted;"
|
||||
"})()");
|
||||
|
||||
return source.arg(QString::number(pos.x()), QString::number(pos.y()));
|
||||
|
||||
return source.arg(pos.x()).arg(pos.y());
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ WebHitTestResult::WebHitTestResult(const WebPage *page, const QPoint &pos)
|
||||
"})()");
|
||||
|
||||
WebPage *p = const_cast<WebPage*>(page);
|
||||
const QString &js = source.arg(QString::number(pos.x()), QString::number(pos.y()));
|
||||
const QString &js = source.arg(pos.x()).arg(pos.y());
|
||||
init(page->url(), p->execJavaScript(js).toMap());
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ WebHitTestResult WebPage::hitTestContent(const QPoint &pos) const
|
||||
|
||||
void WebPage::scroll(int x, int y)
|
||||
{
|
||||
runJavaScript(QSL("window.scrollTo(window.scrollX + %1, window.scrollY + %2)").arg(QString::number(x), QString::number(y)));
|
||||
runJavaScript(QSL("window.scrollTo(window.scrollX + %1, window.scrollY + %2)").arg(x).arg(y));
|
||||
}
|
||||
|
||||
void WebPage::scheduleAdjustPage()
|
||||
|
@ -200,7 +200,7 @@ void PIM_Handler::pimInsert()
|
||||
" v += \"%3\" + e.value.substring(e.selectionEnd);"
|
||||
" e.value = v;"
|
||||
"}");
|
||||
source = source.arg(QString::number(m_clickedPos.x()), QString::number(m_clickedPos.y()), info);
|
||||
source = source.arg(m_clickedPos.x()).arg(m_clickedPos.y()).arg(info);
|
||||
m_view->page()->runJavaScript(source);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user