Browse Source

drop support for old versions of QT4

Ashish Kulkarni 11 years ago
parent
commit
56b3ae0387
4 changed files with 0 additions and 16 deletions
  1. 0 2
      src/lib/converter.cc
  2. 0 2
      src/lib/multipageloader.cc
  3. 0 2
      src/pdf/pdfarguments.cc
  4. 0 10
      src/shared/commonarguments.cc

+ 0 - 2
src/lib/converter.cc

@@ -46,14 +46,12 @@ void ConverterPrivate::updateWebSettings(QWebSettings * ws, const settings::Web
 	ws->setAttribute(QWebSettings::JavascriptCanOpenWindows, false);
 	ws->setAttribute(QWebSettings::JavascriptCanAccessClipboard, false);
 	ws->setFontSize(QWebSettings::MinimumFontSize, s.minimumFontSize);
-#if QT_VERSION >= 0x040500
 	//Newer versions of QT have even more settings to change
 	ws->setAttribute(QWebSettings::PrintElementBackgrounds, s.background);
 	ws->setAttribute(QWebSettings::AutoLoadImages, s.loadImages);
 	ws->setAttribute(QWebSettings::PluginsEnabled, s.enablePlugins);
 	if (!s.userStyleSheet.isEmpty())
 		ws->setUserStyleSheetUrl(MultiPageLoader::guessUrlFromString(s.userStyleSheet));
-#endif
 }
 
 void ConverterPrivate::fail() {

+ 0 - 2
src/lib/multipageloader.cc

@@ -188,11 +188,9 @@ ResourceObject::ResourceObject(MultiPageLoaderPrivate & mpl, const QUrl & u, con
 		// to retrieve a web page, it's not needed to use a fully transparent
 		// http proxy. Moreover, the CONNECT() method is frequently disabled
 		// by proxies administrators.
-#if QT_VERSION >= 0x040500
 		if (settings.proxy.type == QNetworkProxy::HttpProxy)
 			proxy.setCapabilities(QNetworkProxy::CachingCapability |
 			                      QNetworkProxy::TunnelingCapability);
-#endif
 		if (!settings.proxy.user.isEmpty())
 			proxy.setUser(settings.proxy.user);
 		if (!settings.proxy.password.isEmpty())

+ 0 - 2
src/pdf/pdfarguments.cc

@@ -240,10 +240,8 @@ PdfCommandLineParser::PdfCommandLineParser(PdfGlobal & s, QList<PdfObject> & ps)
 	addWebArgs(od.web);
 	extended(true);
  	qthack(false);
-#if QT_VERSION >= 0x040500 //Not printing the background was added in QT4.5
  	addarg("no-background",0,"Do not print background", new ConstSetter<bool>(od.web.background, false));
  	addarg("background",0,"Do print background", new ConstSetter<bool>(od.web.background, true));
-#endif
 
 	extended(true);
  	qthack(true);

+ 0 - 10
src/shared/commonarguments.cc

@@ -173,24 +173,16 @@ void CommandLineParserBase::addWebArgs(Web & s) {
  	addarg("disable-plugins",0,"Disable installed plugins", new ConstSetter<bool>(s.enablePlugins,false));
 
 	addarg("minimum-font-size",0,"Minimum font size", new IntSetter(s.minimumFontSize,"int"));
-
-#if QT_VERSION >= 0x040500 //Not printing the background was added in QT4.5
  	addarg("user-style-sheet",0,"Specify a user style sheet, to load with every page", new QStrSetter(s.userStyleSheet,"url"));
-#endif
-
-#if QT_VERSION >= 0x040600
 	addarg("no-images",0,"Do not load or print images", new ConstSetter<bool>(s.loadImages, false));
 	addarg("images",0,"Do load or print images", new ConstSetter<bool>(s.loadImages, true));
-#endif
 
 	addarg("disable-javascript",'n',"Do not allow web pages to run javascript", new ConstSetter<bool>(s.enableJavascript,false));
 	addarg("enable-javascript",0,"Do allow web pages to run javascript", new ConstSetter<bool>(s.enableJavascript,true));
 
 	extended(true);
  	qthack(true);
-#if QT_VERSION >= 0x040600
  	qthack(false);
-#endif
  	addarg("encoding", 0, "Set the default text encoding, for input", new QStrSetter(s.defaultEncoding,"encoding"));
 
 
@@ -224,10 +216,8 @@ void CommandLineParserBase::addPageLoadArgs(LoadPage & s) {
 
 	addarg("debug-javascript", 0,"Show javascript debugging output", new ConstSetter<bool>(s.debugJavascript, true));
 	addarg("no-debug-javascript", 0,"Do not show javascript debugging output", new ConstSetter<bool>(s.debugJavascript, false));
-#if QT_VERSION >= 0x040600
 	addarg("stop-slow-scripts", 0, "Stop slow running javascripts", new ConstSetter<bool>(s.stopSlowScripts, true));
 	addarg("no-stop-slow-scripts", 0, "Do not Stop slow running javascripts", new ConstSetter<bool>(s.stopSlowScripts, false));
-#endif
 	addarg("run-script", 0, "Run this additional javascript after the page is done loading (repeatable)", new StringListSetter(s.runScript, "js"));
 
 	addarg("checkbox-svg", 0, "Use this SVG file when rendering unchecked checkboxes", new QStrSetter(s.checkboxSvg, "path", ""));