aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c9a622c..358b91f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -148,7 +148,13 @@ MainWindow * getFocusedAppWindow()
// the same machine.
namespace ipc
{
- static char const * socket_name = "net.random-projects.kristall";
+ static const QString socket_name =
+#ifdef Q_OS_UNIX
+ QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) + "/"
+#elif defined Q_OS_WIN32
+ qEnvironmentVariable("USERNAME") + "-"
+#endif
+ "net.random-projects.kristall";
struct Message
{