only override font in Qt versions where it's needed
This commit is contained in:
parent
d63c3c8e3a
commit
f85308bbe6
|
@ -2069,14 +2069,17 @@ describe Capybara::Webkit::Driver do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "ignores custom fonts" do
|
it "ignores custom fonts" do
|
||||||
|
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
|
||||||
expect(font_family).to eq "Arial"
|
expect(font_family).to eq "Arial"
|
||||||
end
|
end
|
||||||
|
|
||||||
it "ignores custom fonts before an element" do
|
it "ignores custom fonts before an element" do
|
||||||
|
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
|
||||||
expect(font_family).to eq "Arial"
|
expect(font_family).to eq "Arial"
|
||||||
end
|
end
|
||||||
|
|
||||||
it "ignores custom fonts after an element" do
|
it "ignores custom fonts after an element" do
|
||||||
|
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
|
||||||
expect(font_family).to eq "Arial"
|
expect(font_family).to eq "Arial"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,7 +25,10 @@ WebPage::WebPage(WebPageManager *manager, QObject *parent) : QWebPage(parent) {
|
||||||
|
|
||||||
setForwardUnsupportedContent(true);
|
setForwardUnsupportedContent(true);
|
||||||
loadJavascript();
|
loadJavascript();
|
||||||
setUserStylesheet();
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||||
|
setUserStylesheet();
|
||||||
|
#endif
|
||||||
|
|
||||||
this->setCustomNetworkAccessManager();
|
this->setCustomNetworkAccessManager();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue