summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_qws.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-07 12:31:58 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-07 12:31:58 (GMT)
commit103334ced3b0cb6e69a1ed3075d9b81e591f37e9 (patch)
treec7e36b012a042ce864556f9851cb1220d9f385c5 /src/gui/kernel/qapplication_qws.cpp
parenta4391dfd2aef38e3a3d37bee07900296ced2521c (diff)
parent490f135caa35831646dac7e00f1c9422cb09aca9 (diff)
downloadQt-103334ced3b0cb6e69a1ed3075d9b81e591f37e9.zip
Qt-103334ced3b0cb6e69a1ed3075d9b81e591f37e9.tar.gz
Qt-103334ced3b0cb6e69a1ed3075d9b81e591f37e9.tar.bz2
Merge commit 'qt/master' into kinetic-graphicseffect
Conflicts: src/gui/graphicsview/graphicsview.pri src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem.h src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene.cpp tests/auto/auto.pro
Diffstat (limited to 'src/gui/kernel/qapplication_qws.cpp')
-rw-r--r--src/gui/kernel/qapplication_qws.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp
index 347afc8..00695fa 100644
--- a/src/gui/kernel/qapplication_qws.cpp
+++ b/src/gui/kernel/qapplication_qws.cpp
@@ -101,7 +101,11 @@
#include <locale.h>
#include <errno.h>
#include <fcntl.h>
-#include <sys/time.h>
+#ifdef Q_OS_VXWORKS
+# include <sys/times.h>
+#else
+# include <sys/time.h>
+#endif
#include <sys/stat.h>
#include <sys/types.h>
@@ -194,7 +198,14 @@ QString qws_dataDir()
static QString result;
if (!result.isEmpty())
return result;
- QByteArray dataDir = QString::fromLatin1("/tmp/qtembedded-%1").arg(qws_display_id).toLocal8Bit();
+ QByteArray dataDir;
+#ifdef QT_QWS_TEMP_DIR
+ dataDir = QT_QWS_TEMP_DIR;
+#else
+ dataDir = "/tmp";
+#endif
+ dataDir += "/qtembedded-";
+ dataDir += QByteArray::number(qws_display_id);
if (QT_MKDIR(dataDir, 0700)) {
if (errno != EEXIST) {
qFatal("Cannot create Qt for Embedded Linux data directory: %s", dataDir.constData());
@@ -208,7 +219,7 @@ QString qws_dataDir()
if (!S_ISDIR(buf.st_mode))
qFatal("%s is not a directory", dataDir.constData());
-#ifndef Q_OS_INTEGRITY
+#if !defined(Q_OS_INTEGRITY) && !defined(Q_OS_VXWORKS)
if (buf.st_uid != getuid())
qFatal("Qt for Embedded Linux data directory is not owned by user %d", getuid());