summaryrefslogtreecommitdiffstats
path: root/dcop/dcopclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcop/dcopclient.cpp')
-rw-r--r--dcop/dcopclient.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index 5dff084af..e2650885f 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -213,13 +213,26 @@ public:
TQCString DCOPClient::iceauthPath()
{
-#ifdef Q_OS_WIN32
+#if defined(ICEAUTH_PATH)
+ if (
+# if defined(Q_WS_WIN)
+ access(ICEAUTH_PATH, 0) == 0
+# else
+ access(ICEAUTH_PATH, X_OK) == 0
+# endif
+ )
+ {
+ return TQCString(ICEAUTH_PATH);
+ }
+
+#elif defined(Q_OS_WIN32)
char szPath[512];
char * pszFilePart;
int ret;
ret = SearchPathA(NULL,"iceauth.exe",NULL,sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
if(ret != 0)
return TQCString(szPath);
+
#else
TQCString path = ::getenv("PATH");
if (path.isEmpty())
@@ -233,9 +246,9 @@ TQCString DCOPClient::iceauthPath()
{
return fPath;
}
-
fPath = strtok(NULL, ":\b");
}
+
#endif
return 0;
}