mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
Merge branch konsole:master into master
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include <QDebug>
|
||||
#include <QtGlobal>
|
||||
|
||||
#if defined(Q_OS_FREEBSD) || defined(Q_OS_OPEN_BSD) || defined(Q_OS_MACOS)
|
||||
#if defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_MACOS)
|
||||
#include <QSharedPointer>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,10 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(KONSOLE_TEST_LIBS Qt::Test konsoleprivate konsolecharacters konsoledecoders konsoleapp)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||
set(KONSOLE_TEST_LIBS ${KONSOLE_TEST_LIBS} kvm)
|
||||
endif()
|
||||
|
||||
# Temporary bypass for BKO 432379
|
||||
if(BUILD_SHARED_LIBS)
|
||||
ecm_add_test(KeyboardTranslatorTest.cpp LINK_LIBRARIES ${KONSOLE_TEST_LIBS})
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#if defined(Q_OS_LINUX)
|
||||
#include <unistd.h>
|
||||
#elif defined(Q_OS_OPENBSD)
|
||||
#include <fcntl.h>
|
||||
#include <kvm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
@@ -232,11 +233,11 @@ void TerminalInterfaceTest::testTerminalInterfaceUsingSpy()
|
||||
QVERIFY(procExeTarget.open(QIODevice::ReadOnly));
|
||||
QCOMPARE(QStringLiteral(procExeTarget.readAll()), command);
|
||||
#elif defined(Q_OS_OPENBSD)
|
||||
kvm_t *kd = kvm_openfiles(NULL, NULL, NULL, O_RD_ONLY, NULL);
|
||||
kvm_t *kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL);
|
||||
int count;
|
||||
auto kProcStruct = ::kvm_getprocs(kd, KERN_PROC_PID, foregroundProcessId, &count);
|
||||
auto kProcStruct = ::kvm_getprocs(kd, KERN_PROC_PID, foregroundProcessId, sizeof(struct kinfo_proc), &count);
|
||||
QCOMPARE(count, 1);
|
||||
QCOMPARE(QStringLiteral(kProcStruct->p_comm), command);
|
||||
QCOMPARE(QString::fromUtf8(kProcStruct->p_comm), command);
|
||||
kvm_close(kd);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -219,10 +219,14 @@ void TabbedViewContainer::konsoleConfigChanged()
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(0);
|
||||
|
||||
layout->addWidget(KonsoleSettings::searchTabsButton() == 0 ? _searchTabsButton : nullptr);
|
||||
if (KonsoleSettings::searchTabsButton() == 0) {
|
||||
layout->addWidget(_searchTabsButton);
|
||||
}
|
||||
_searchTabsButton->setVisible(KonsoleSettings::searchTabsButton() == 0);
|
||||
|
||||
layout->addWidget(KonsoleSettings::closeTabButton() == 1 ? _closeTabButton : nullptr);
|
||||
if (KonsoleSettings::closeTabButton() == 1) {
|
||||
layout->addWidget(_closeTabButton);
|
||||
}
|
||||
_closeTabButton->setVisible(KonsoleSettings::closeTabButton() == 1);
|
||||
|
||||
QWidget *rightCornerWidget = new QWidget();
|
||||
|
||||
Reference in New Issue
Block a user