summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-17 22:19:23 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-17 22:19:23 +0000
commiteedf09ff395e6a32efa8ec6b86bcf889ef088e13 (patch)
tree437e13b11fe3fbc0b4bdb3ca7cda78996f1424e2
parentd7fee1a2ef53c7cab48946360cc6b83057b9a62c (diff)
downloadgtk-qt-engine-eedf09ff395e6a32efa8ec6b86bcf889ef088e13.tar.gz
gtk-qt-engine-eedf09ff395e6a32efa8ec6b86bcf889ef088e13.zip
Fix gtk-qt-engine FTBFS
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gtk-qt-engine@1247893 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--src/qt_qt_wrapper.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/qt_qt_wrapper.cpp b/src/qt_qt_wrapper.cpp
index bc99cf3..7379888 100644
--- a/src/qt_qt_wrapper.cpp
+++ b/src/qt_qt_wrapper.cpp
@@ -21,6 +21,8 @@
#include <cstdlib>
#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
#ifdef USE_FREEBSD
#include <kvm.h>
@@ -286,7 +288,7 @@ void createTQApp()
close(fd);
}
}
-
+
if (ret == -1)
{
printf("Gtk-Qt theme engine warning:\n");
@@ -320,7 +322,7 @@ void createTQApp()
#endif // USE_SOLARIS
mozillaFix = (cmdLine.contains("mozilla") || cmdLine.contains("firefox"));
-
+
openOfficeFix = (cmdLine.endsWith("soffice.bin"))
| (cmdLine.endsWith("swriter.bin"))
| (cmdLine.endsWith("scalc.bin"))
@@ -329,12 +331,12 @@ void createTQApp()
| (cmdLine.endsWith("simpress.bin"));
eclipseFix = cmdLine.contains("eclipse");
-
+
gtkQtDebug = (getenv("GTK_TQT_ENGINE_DEBUG") != NULL) ? 1 : 0;
-
+
if (gtkQtDebug)
printf("createTQApp()\n");
-
+
char* sessionEnv = getenv("SESSION_MANAGER");
if (TQString(sessionEnv).endsWith(TQString::number(getpid())) || cmdLine.contains("nspluginviewer") || cmdLine.contains("gnome-wm") || cmdLine.contains("metacity") || cmdLine.contains("xfwm4") || (getenv("GTK_TQT_ENGINE_DISABLE") != NULL))
{
@@ -346,15 +348,15 @@ void createTQApp()
int (*original_xio_errhandler)( Display *dpy );
original_x_errhandler = XSetErrorHandler( dummy_x_errhandler );
original_xio_errhandler = XSetIOErrorHandler( dummy_xio_errhandler );
-
+
#ifndef USE_SOLARIS
unsetenv("SESSION_MANAGER");
#else
putenv("SESSION_MANAGER=");
#endif
-
+
initKdeSettings();
-
+
if (!tqApp)
{
new TQApplication(gdk_x11_get_default_xdisplay());