Skip to content

Instantly share code, notes, and snippets.

@patrobinson
Last active August 29, 2015 14:25
Show Gist options
  • Save patrobinson/ac4af3cf291fdb09ffc9 to your computer and use it in GitHub Desktop.
Save patrobinson/ac4af3cf291fdb09ffc9 to your computer and use it in GitHub Desktop.
Description: Fix --encoding option
Author: Emmanuel Bouthenot <[email protected]>
Forwarded: not-needed
Last-Update: 2010-10-12
--- a/src/pageconverter.cc
+++ b/src/pageconverter.cc
@@ -59,14 +59,14 @@
phaseDescriptions.push_back("Resolving links");
phaseDescriptions.push_back("Counting pages");
phaseDescriptions.push_back("Loading headers and footers");
- if (!settings.defaultEncoding.isEmpty())
- QWebSettings::globalSettings()->setDefaultTextEncoding(settings.defaultEncoding);
if (!settings.enableIntelligentShrinking) {
QWebSettings::globalSettings()->setPrintingMaximumShrinkFactor(1.0);
QWebSettings::globalSettings()->setPrintingMinimumShrinkFactor(1.0);
}
QWebSettings::globalSettings()->setPrintingMediaType(settings.printMediaType?"print":"screen");
#else
+ if (!settings.defaultEncoding.isEmpty())
+ QWebSettings::globalSettings()->setDefaultTextEncoding(settings.defaultEncoding);
phaseDescriptions.push_back("Loading page");
#endif
phaseDescriptions.push_back("Printing pages");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment