only override font in Qt versions where it's needed

This commit is contained in:
Thomas Walpole 2017-11-02 14:09:12 -07:00
parent d63c3c8e3a
commit f85308bbe6
2 changed files with 7 additions and 1 deletions

View File

@ -2069,14 +2069,17 @@ describe Capybara::Webkit::Driver do
end
it "ignores custom fonts" do
skip "font replacement not needed for QT >= 5" unless driver.version =~ /Qt: 4/
expect(font_family).to eq "Arial"
end
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"
end
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"
end
end

View File

@ -25,7 +25,10 @@ WebPage::WebPage(WebPageManager *manager, QObject *parent) : QWebPage(parent) {
setForwardUnsupportedContent(true);
loadJavascript();
setUserStylesheet();
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
setUserStylesheet();
#endif
this->setCustomNetworkAccessManager();