Commit f3159503 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen Committed by Tomaz Canabrava
Browse files

remove pretenses of windows support

kpty code is (as of now) unix-only, so konsole as a whole cannot
possibly work on windows (without a thick emulation layer). therefore,
remove the pointless #ifdefs that only reduce the code's legibility.
parent 3955ca70
......@@ -10,9 +10,7 @@
// Own
#include "NullProcessInfo.h"
#include "ProcessInfo.h"
#if !defined(Q_OS_WIN)
#include "UnixProcessInfo.h"
#endif
#include "SSHProcessInfo.h"
// Unix
......
......@@ -11,9 +11,7 @@
// System
#include <csignal>
#if !defined(Q_OS_WIN)
#include <sys/ioctl.h> //ioctl() and TIOCSWINSZ
#endif
#include <termios.h>
// Qt
......@@ -88,14 +86,12 @@ void Pty::setWindowSize(int columns, int lines)
if (pty()->masterFd() >= 0) {
pty()->setWinSize(lines, columns);
#if !defined(Q_OS_WIN)
struct winsize w;
w.ws_xpixel = _windowWidth;
w.ws_ypixel = _windowHeight;
w.ws_col = _windowColumns;
w.ws_row = _windowLines;
ioctl(pty()->masterFd(), TIOCSWINSZ, &w);
#endif
}
}
......
......@@ -5,9 +5,7 @@
*/
// Own
#if !defined(Q_OS_WIN)
#include "UnixProcessInfo.h"
#endif
// Unix
#include <arpa/inet.h>
......@@ -23,8 +21,6 @@
using namespace Konsole;
#if !defined(Q_OS_WIN)
UnixProcessInfo::UnixProcessInfo(int pid)
: ProcessInfo(pid)
{
......@@ -87,5 +83,3 @@ void UnixProcessInfo::readUserName()
}
delete[] getpwBuffer;
}
#endif
......@@ -19,14 +19,12 @@ TemporaryFilesSettings::TemporaryFilesSettings(QWidget *aParent)
const QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
QString cachePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
#ifdef Q_OS_UNIX
// Use "~" instead of full path. It looks nice and helps
// in cases when home path is really long.
const QString homePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
if (cachePath.startsWith(homePath)) {
cachePath.replace(0, homePath.length(), QStringLiteral("~"));
}
#endif
// There's no way of doing this with strings placed in .ui file
kcfg_scrollbackUseSystemLocation->setText(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment