mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kdesudo: store the DISPLAY environment variable as QString
otherwise it will be converted as if it is ASCII later on several times Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
90dcef2ec2
commit
a5017377d2
1 changed files with 2 additions and 2 deletions
|
@ -137,7 +137,7 @@ KdeSudo::KdeSudo(const QString &icon, const QString &appname)
|
|||
// 'man xauth' for more info on xauth cookies.
|
||||
m_tmpName = KTemporaryFile::filePath("/tmp/kdesudo-XXXXXXXXXX-xauth");
|
||||
|
||||
QByteArray disp = qgetenv("DISPLAY");
|
||||
const QString disp = QString::fromLocal8Bit(qgetenv("DISPLAY"));
|
||||
if (disp.isEmpty()) {
|
||||
kError() << "$DISPLAY is not set.";
|
||||
exit(1);
|
||||
|
@ -151,7 +151,7 @@ KdeSudo::KdeSudo(const QString &icon, const QString &appname)
|
|||
xauth_ext.setStandardOutputProcess(&xauth_merge);
|
||||
|
||||
// Start the first
|
||||
xauth_ext.start("xauth", QStringList() << "extract" << "-" << QString::fromLocal8Bit(disp), QIODevice::ReadOnly);
|
||||
xauth_ext.start("xauth", QStringList() << "extract" << "-" << disp, QIODevice::ReadOnly);
|
||||
if (!xauth_ext.waitForStarted()) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue