Index: /diffs/psi_0.16.diff
===================================================================
--- /diffs/psi_0.16.diff	(revision 184)
+++ /diffs/psi_0.16.diff	(revision 185)
@@ -1,6 +1,15 @@
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/configure trunk/configure
---- vendor/current/configure	2016-05-02 17:29:30.000000000 +0200
-+++ trunk/configure	2016-05-02 17:28:48.000000000 +0200
-@@ -1090,8 +1090,8 @@
+--- vendor/current/configure	2016-11-17 17:03:00.000000000 +0100
++++ trunk/configure	2016-11-18 11:32:54.000000000 +0100
+@@ -393,7 +393,7 @@
+ 		if [ "$QC_VERBOSE" = "Y" ]; then
+ 			echo "running: $cmd"
+ 		fi
+-		vout=`/bin/sh -c "$cmd" 2>&1`
++		vout=`sh -c "$cmd" 2>&1`
+ 		case "${vout}" in
+ 			?.?.?)
+ 				vmaj="${vout%%.*}"
+@@ -1137,8 +1137,8 @@
  	QString shortname() const { return "qjdns"; }
  	bool exec()
@@ -13,5 +22,5 @@
  		return true;
  #else
-@@ -1207,13 +1207,13 @@
+@@ -1254,13 +1254,13 @@
  	qc_qdbus(Conf *c) : ConfObj(c) {}
  	QString name() const { return "QDBUS"; }
@@ -30,5 +39,5 @@
  #else
  		if (!conf->getenv("QC_DISABLE_qdbus").isEmpty())
-@@ -2225,18 +2225,36 @@
+@@ -2307,18 +2307,36 @@
  	QString path = qc_getenv("PATH");
  	if(!path.isEmpty())
@@ -69,5 +78,5 @@
  {
  	QString out;
-@@ -2250,8 +2268,8 @@
+@@ -2332,8 +2350,8 @@
  			break;
  		}
@@ -80,5 +89,5 @@
  		{
  			fi = QFileInfo(list[n] + '/' + prog + ".exe");
-@@ -2268,7 +2286,7 @@
+@@ -2350,7 +2368,7 @@
  
  QString qc_findself(const QString &argv0)
@@ -89,5 +98,5 @@
  #else
  	if(argv0.contains('/'))
-@@ -2414,7 +2432,7 @@
+@@ -2496,7 +2514,7 @@
  				searchStart = true;
  				buf.clear();
@@ -98,5 +107,5 @@
  				escaped = true;
  				continue; // just add next symbol
-@@ -2488,7 +2506,7 @@
+@@ -2570,7 +2588,7 @@
  	// Using Windows-style '\\\\' can leads strange compilation error with MSYS which uses
  	// unix style.
@@ -107,5 +116,5 @@
  #endif
  	// trim trailing slashes
-@@ -2894,6 +2912,9 @@
+@@ -2976,6 +2994,9 @@
  	QStringList dirs;
  	dirs += "/usr/local/include";
@@ -117,5 +126,5 @@
  	{
  		if(checkHeader(*it, h))
-@@ -2936,6 +2957,19 @@
+@@ -3018,6 +3039,19 @@
  		*lib = "/usr/local/lib";
  		return true;
@@ -138,11 +147,11 @@
  
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/iris/configure trunk/iris/configure
---- vendor/current/iris/configure	2014-04-17 19:29:12.000000000 +0200
-+++ trunk/iris/configure	2014-04-23 10:36:10.000000000 +0200
-@@ -1018,8 +1018,8 @@
+--- vendor/current/iris/configure	2016-11-17 17:03:20.000000000 +0100
++++ trunk/iris/configure	2016-11-18 10:17:42.000000000 +0100
+@@ -1112,8 +1112,8 @@
  	QString shortname() const { return "qjdns"; }
  	bool exec()
  	{
--#if defined Q_OS_WIN || Q_OS_MAC
+-#if defined Q_OS_WIN || defined Q_OS_MAC
 -		// HACK: on Windows and Mac OS X, always use psi's bundled qjdns
 +#if defined Q_OS_WIN || defined Q_OS_MAC || defined Q_OS_OS2
@@ -1022,6 +1031,6 @@
  			QString XdgCacheHome = QString::fromLocal8Bit(getenv("XDG_CACHE_HOME"));
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/src/common.cpp trunk/src/common.cpp
---- vendor/current/src/common.cpp	2016-05-02 17:20:46.000000000 +0200
-+++ trunk/src/common.cpp	2016-05-02 17:54:10.000000000 +0200
+--- vendor/current/src/common.cpp	2016-11-17 17:03:02.000000000 +0100
++++ trunk/src/common.cpp	2016-11-18 10:32:32.000000000 +0100
 @@ -285,7 +285,7 @@
  		return;
@@ -1035,9 +1044,9 @@
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/src/config.h trunk/src/config.h
 --- vendor/current/src/config.h	1970-01-01 01:00:00.000000000 +0100
-+++ trunk/src/config.h	2016-04-13 16:30:38.000000000 +0200
++++ trunk/src/config.h	2016-11-18 11:34:06.000000000 +0100
 @@ -0,0 +1,3 @@
 +#define PSI_LIBDIR "/usr/local/lib/psi"
 +#define PSI_DATADIR "/usr/local/share/psi"
-+#define PSI_VERSION "0.16-dev-20160413"
++#define PSI_VERSION "0.16-dev-20161118"
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/src/homedirmigration.cpp trunk/src/homedirmigration.cpp
 --- vendor/current/src/homedirmigration.cpp	2016-04-08 16:55:16.000000000 +0200
@@ -1218,7 +1227,7 @@
 +}
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/src/main.cpp trunk/src/main.cpp
---- vendor/current/src/main.cpp	2016-04-08 16:55:16.000000000 +0200
-+++ trunk/src/main.cpp	2016-04-13 15:22:48.000000000 +0200
-@@ -486,7 +486,7 @@
+--- vendor/current/src/main.cpp	2016-11-17 17:03:02.000000000 +0100
++++ trunk/src/main.cpp	2016-11-18 11:09:52.000000000 +0100
+@@ -464,7 +464,7 @@
  	QByteArray val = qgetenv("QT_PLUGIN_PATH");
  	if(!val.isEmpty())
@@ -1256,9 +1265,9 @@
  			$$PWD/networkaccessmanager.h \
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/src/src.pro trunk/src/src.pro
---- vendor/current/src/src.pro	2016-04-08 16:55:18.000000000 +0200
-+++ trunk/src/src.pro	2016-04-13 15:54:12.000000000 +0200
-@@ -153,6 +153,9 @@
- 	# buggy MSVC workaround
- 	win32-msvc|win32-msvc.net|win32-msvc2005: QMAKE_LFLAGS += /FORCE:MULTIPLE
+--- vendor/current/src/src.pro	2016-11-17 17:03:02.000000000 +0100
++++ trunk/src/src.pro	2016-11-18 12:15:06.000000000 +0100
+@@ -159,6 +159,9 @@
+ windows {
+     RC_ICONS = ../win32/app.ico
  }
 +os2 {
@@ -1270,14 +1279,6 @@
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/src/systeminfo.cpp trunk/src/systeminfo.cpp
 --- vendor/current/src/systeminfo.cpp	2016-04-08 16:55:18.000000000 +0200
-+++ trunk/src/systeminfo.cpp	2016-04-13 16:05:58.000000000 +0200
-@@ -172,7 +172,6 @@
- {
- 	// Initialize
- 	os_str_ = "Unknown";
--	os_name_str_ = os_str_;
- 
- 	// Detect
- #if defined(HAVE_X11)
-@@ -236,6 +235,56 @@
++++ trunk/src/systeminfo.cpp	2016-11-18 10:58:42.000000000 +0100
+@@ -236,6 +236,56 @@
  		os_str_ = "Mac OS X";
  	} else {
@@ -1349,7 +1350,7 @@
  #endif
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/src/webview.cpp trunk/src/webview.cpp
---- vendor/current/src/webview.cpp	2016-04-08 16:55:18.000000000 +0200
-+++ trunk/src/webview.cpp	2016-04-13 16:13:32.000000000 +0200
-@@ -146,7 +146,11 @@
+--- vendor/current/src/webview.cpp	2016-11-17 17:03:02.000000000 +0100
++++ trunk/src/webview.cpp	2016-11-18 12:01:52.000000000 +0100
+@@ -150,7 +150,11 @@
  	QDrag *drag = new QDrag(this);
  	QMimeData *mimeData = new QMimeData;
@@ -1363,5 +1364,5 @@
  	mimeData->setText(TextUtil::rich2plain(html));
  
-@@ -157,7 +161,11 @@
+@@ -161,7 +165,11 @@
  void WebView::convertClipboardHtmlImages(QClipboard::Mode mode)
  {
@@ -1375,5 +1376,5 @@
  	data->setHtml(html);
  	data->setText(TextUtil::rich2plain(html, false));
-@@ -170,6 +178,22 @@
+@@ -174,6 +182,22 @@
  	page()->mainFrame()->evaluateJavaScript(scriptSource);
  }
@@ -1398,4 +1399,16 @@
  {
  	return TextUtil::rich2plain(TextUtil::img2title(selectedHtml()));
+@@ -183,7 +207,11 @@
+ {
+ 	// use native selectedText w/o clipboard hacks.
+ 	// ideally we should call something like hasSelection() but there is no such method in Qt API for webkit classes.
++#ifdef Q_OS_OS2 //remove with qt 4.8 or better
++	if (!page()->selectedText().isEmpty()) {
++#else
+ 	if (page()->hasSelection()) {
++#endif
+ 		page()->triggerAction(QWebPage::Copy);
+ 		textCopiedEvent();
+ 	}
 diff -Naur -x Makefile -x Makefile.initvars -x '*.dll' -x 'conf*.pri' -x '*.zip' -x '*.exe' -x '*.map' -x '*.obj' -x '*.moc' -x '*.rcc' -x iris.prl -x irisnet.prl -x '*.sym' -x .ui -x '*.bak' -x '*.lib' -x '*.rsp' -x 'moc_*.cpp' -x Info.plist -x conf.log -x .qmake.cache -x build.sh -x '*.pem' vendor/current/src/webview.h trunk/src/webview.h
 --- vendor/current/src/webview.h	2015-09-15 16:33:22.000000000 +0200
