Port KDE_struct_stat to QT_STATBUF; KDE::stat to QT_STAT

wilder-portage
Kurt Hindenburg 11 years ago
parent 649e3654c8
commit 959b7e3257
  1. 7
      src/Pty.cpp

@ -27,6 +27,7 @@
// Qt
#include <QtCore/QStringList>
#include <qplatformdefs.h>
// KDE
#include <QDebug>
@ -260,8 +261,8 @@ int Pty::start(const QString& programName,
void Pty::setWriteable(bool writeable)
{
KDE_struct_stat sbuf;
if (KDE::stat(pty()->ttyName(), &sbuf) == 0) {
QT_STATBUF sbuf;
if (QT_STAT(pty()->ttyName(), &sbuf) == 0) {
if (writeable) {
if (KDE::chmod(pty()->ttyName(), sbuf.st_mode | S_IWGRP) < 0) {
qWarning() << "Could not set writeable on "<<pty()->ttyName();
@ -271,6 +272,8 @@ void Pty::setWriteable(bool writeable)
qWarning() << "Could not unset writeable on "<<pty()->ttyName();
}
}
} else {
qWarning() << "Could not stat "<<pty()->ttyName();
}
}

Loading…
Cancel
Save