Changeset View
Changeset View
Standalone View
Standalone View
src/kdeinit/kinit.cpp
Show First 20 Lines • Show All 1356 Lines • ▼ Show 20 Line(s) | 1356 | #endif | |||
---|---|---|---|---|---|
1357 | } | 1357 | } | ||
1358 | } | 1358 | } | ||
1359 | 1359 | | |||
1360 | static void generate_socket_name() | 1360 | static void generate_socket_name() | ||
1361 | { | 1361 | { | ||
1362 | 1362 | | |||
1363 | #if HAVE_X11 || HAVE_XCB // qt5: see displayEnvVarName_c() | 1363 | #if HAVE_X11 || HAVE_XCB // qt5: see displayEnvVarName_c() | ||
1364 | QByteArray display = qgetenv(displayEnvVarName_c()); | 1364 | QByteArray display = qgetenv(displayEnvVarName_c()); | ||
1365 | if (display.isEmpty()) { | | |||
1366 | fprintf(stderr, "kdeinit5: Aborting. $%s is not set. \n", displayEnvVarName_c()); | | |||
1367 | exit(255); | | |||
1368 | } | | |||
1369 | int i; | 1365 | int i; | ||
1370 | if ((i = display.lastIndexOf('.')) > display.lastIndexOf(':') && i >= 0) { | 1366 | if ((i = display.lastIndexOf('.')) > display.lastIndexOf(':') && i >= 0) { | ||
1371 | display.truncate(i); | 1367 | display.truncate(i); | ||
1372 | } | 1368 | } | ||
1373 | 1369 | | |||
1374 | display.replace(':', '_'); | 1370 | display.replace(':', '_'); | ||
1375 | #ifdef __APPLE__ | 1371 | #ifdef __APPLE__ | ||
1376 | // not entirely impossible, so let's leave it | 1372 | // not entirely impossible, so let's leave it | ||
▲ Show 20 Lines • Show All 412 Lines • Show Last 20 Lines |